@@ -30,44 +30,10 @@ these.
3030
3131@[expose] public section
3232
33- namespace Nat
34-
35- theorem centralBinom_monotone : Monotone centralBinom :=
36- fun n _ h ↦ (choose_le_choose n (mul_le_mul_left 2 h)).trans (choose_le_centralBinom _ _)
37-
38- theorem asc_le_pow_mul_factorial (s t : ℕ) : t.ascFactorial s ≤ s.factorial * t ^ s :=
39- match s with
40- | 0 => by simp
41- | n + 1 => by
42- rcases t.eq_zero_or_pos with rfl | ht
43- · simp [zero_ascFactorial] -- should be a `simp` lemma
44- rw [ascFactorial_succ, factorial_succ, pow_succ', mul_mul_mul_comm, add_one_mul]
45- grw [← Nat.le_mul_of_pos_right _ ht, add_comm, asc_le_pow_mul_factorial]
46-
47- theorem choose_add_le_pow_left (s t : ℕ) : (s + t).choose s ≤ (t + 1 ) ^ s := by
48- rw [add_comm, choose_eq_asc_factorial_div_factorial]
49- exact Nat.div_le_of_le_mul (asc_le_pow_mul_factorial _ _)
50-
51- theorem choose_le_pow_left (s t : ℕ) : s.choose t ≤ (s + 1 - t) ^ t := by
52- rcases le_or_gt t s with h | h
53- · obtain ⟨s, rfl⟩ := exists_add_of_le h
54- grw [choose_add_le_pow_left, add_assoc, Nat.add_sub_cancel_left]
55- · grw [choose_eq_zero_of_lt h, zero_le']
56-
57- end Nat
58-
5933namespace SimpleGraph
6034
6135variable {V : Type *}
6236
63- theorem neighborSet_bot {x : V} : (⊥ : SimpleGraph V).neighborSet x = ∅ := by
64- ext
65- simp
66-
67- theorem neighborSet_top {x : V} : (⊤ : SimpleGraph V).neighborSet x = {x}ᶜ := by
68- ext
69- simp [eq_comm]
70-
7137theorem neighborSet_sup {G H : SimpleGraph V} {x : V} :
7238 (G ⊔ H).neighborSet x = G.neighborSet x ∪ H.neighborSet x := by
7339 ext
@@ -683,7 +649,6 @@ theorem ramsey_fin_exists [Finite K] (n : K → ℕ) : ∃ N, IsRamseyValid (Fin
683649 by_cases h : ∃ k, n k = 0
684650 · exact ⟨0 , isRamseyValid_of_exists_zero _ h⟩
685651 push Not at h
686- dsimp at ih
687652 have : ∀ k, Function.update n k (n k - 1 ) < n :=
688653 by
689654 simp only [update_lt_self_iff]
@@ -1055,7 +1020,7 @@ theorem diagonalRamsey_monotone : Monotone diagonalRamsey := fun _ _ hnm ↦
10551020
10561021theorem ramseyNumber_le_choose : ∀ i j : ℕ, ramseyNumber ![i, j] ≤ (i + j - 2 ).choose (i - 1 )
10571022 | 0 , _ => by simp
1058- | _, 0 => by rw [ramseyNumber_pair_swap, ramseyNumber_cons_zero]; exact zero_le'
1023+ | _, 0 => by rw [ramseyNumber_pair_swap, ramseyNumber_cons_zero]; exact zero_le
10591024 | 1 , j + 1 => by rw [ramseyNumber_one_succ, Nat.choose_zero_right]
10601025 | i + 1 , 1 => by rw [ramseyNumber_succ_one, Nat.succ_sub_succ_eq_sub, Nat.choose_self]
10611026 | i + 2 , j + 2 => by
@@ -1071,7 +1036,7 @@ theorem diagonalRamsey_le_centralBinom (i : ℕ) : diagonalRamsey i ≤ (i - 1).
10711036 (by rw [Nat.centralBinom_eq_two_mul_choose, Nat.mul_sub_left_distrib, mul_one, two_mul])
10721037
10731038theorem diagonalRamsey_le_central_binom' (i : ℕ) : diagonalRamsey i ≤ i.centralBinom :=
1074- (diagonalRamsey_le_centralBinom _).trans (Nat.centralBinom_monotone (Nat.sub_le _ _))
1039+ (diagonalRamsey_le_centralBinom _).trans (Nat.centralBinom_strictMono.monotone (Nat.sub_le _ _))
10751040
10761041theorem ramseyNumber_pair_le_two_pow {i j : ℕ} : ramseyNumber ![i, j] ≤ 2 ^ (i + j - 2 ) :=
10771042 (ramseyNumber_le_choose _ _).trans (Nat.choose_le_two_pow _ _)
@@ -1093,12 +1058,13 @@ theorem ramseyNumber_le_right_pow_left (i j : ℕ) : ramseyNumber ![i, j] ≤ j
10931058 by
10941059 rcases Nat.eq_zero_or_pos j with (rfl | hj)
10951060 · rw [ramseyNumber_pair_swap, ramseyNumber_cons_zero]
1096- exact zero_le'
1061+ exact zero_le
10971062 refine (ramseyNumber_le_choose i j).trans ?_
10981063 have : i + j - 2 ≤ i - 1 + (j - 1 ) := add_tsub_add_le_tsub_add_tsub.trans' le_rfl
10991064 -- the way naturals are handled in lean 4 makes me need to change this proof
11001065 refine (Nat.choose_le_choose _ this).trans ?_
1101- refine (Nat.choose_add_le_pow_left _ _).trans_eq ?_
1066+ rw [add_comm]
1067+ refine (Nat.choose_add_le_add_one_pow _ _).trans_eq ?_
11021068 rw [Nat.sub_add_cancel hj]
11031069
11041070/-- A simplification of `ramsey_number_le_right_pow_left` which is more convenient for asymptotic
0 commit comments