| | @@ -5,8 +5,8 @@ import FormalConjectures.Wikipedia.RamseyNumbers |
| 5 | 5 | # Finite Ramsey thresholds for Erdős Problem 627 |
| 6 | 6 | |
| 7 | 7 | At and above `R(s,t)`, every graph has a clique of size `s` or an independent |
| 8 | | −set of size `t`. Below `R(k+1,k+1)`, a graph avoiding both gives the lower |
| 9 | | −bound `f(n) ≥ n/k²` for the maximum chromatic-to-clique ratio. |
| 8 | +set of size `t`. Below `R(a+1,b+1)`, a graph avoiding both gives the lower |
| 9 | +bound `f(n) ≥ n/(ab)` for the maximum chromatic-to-clique ratio. |
| 10 | 10 | -/ |
| 11 | 11 | |
| 12 | 12 | namespace ErdosSwarm.Erdos627 |
| | @@ -63,36 +63,66 @@ theorem cliqueNum_or_indepNum_of_classicalRamsey_le_card {V : Type*} [Fintype V] |
| 63 | 63 | exact h.imp (mt (CliqueFree.comap f.isContained)) |
| 64 | 64 | (mt (CliqueFree.comap (Embedding.complEquiv f).isContained)) |
| 65 | 65 | |
| 66 | | −/-- A graph whose clique and independence numbers are at most `K` gives `f(n) ≥ n/K²`. -/ |
| 67 | | −theorem div_sq_le_maxChromaticCliqueRatio_of_graph {n : ℕ} (G : SimpleGraph (Fin n)) {K : ℝ} |
| 68 | | − (hω : (G.cliqueNum : ℝ) ≤ K) (hα : (G.indepNum : ℝ) ≤ K) : |
| 69 | | − (n : ℝ) / K ^ 2 ≤ _root_.Erdos627.maxChromaticCliqueRatio n := by |
| 66 | +private lemma ratio_le_maxChromaticCliqueRatio {n : ℕ} (G : SimpleGraph (Fin n)) : |
| 67 | + (G.chromaticNumber.toNat : ℝ) / G.cliqueNum ≤ _root_.Erdos627.maxChromaticCliqueRatio n := by |
| 70 | 68 | classical |
| 71 | | − refine le_trans ?_ (le_ciSup (f := fun H : SimpleGraph (Fin n) ↦ |
| 72 | | − (H.chromaticNumber.toNat : ℝ) / H.cliqueNum) (Set.finite_range _).bddAbove G) |
| 69 | + exact le_ciSup (f := fun H : SimpleGraph (Fin n) ↦ |
| 70 | + (H.chromaticNumber.toNat : ℝ) / H.cliqueNum) (Set.finite_range _).bddAbove G |
| 71 | + |
| 72 | +private lemma maxChromaticCliqueRatio_nonneg (n : ℕ) : |
| 73 | + 0 ≤ _root_.Erdos627.maxChromaticCliqueRatio n := |
| 74 | + le_trans (by positivity) (ratio_le_maxChromaticCliqueRatio (⊥ : SimpleGraph (Fin n))) |
| 75 | + |
| 76 | +/-- A graph with clique number at most `A` and independence number at most `B` |
| 77 | +gives `n ≤ f(n) · (AB)`. The multiplicative form also holds at zero. -/ |
| 78 | +theorem card_le_maxChromaticCliqueRatio_mul_of_graph {n : ℕ} (G : SimpleGraph (Fin n)) {A B : ℝ} |
| 79 | + (hω : (G.cliqueNum : ℝ) ≤ A) (hα : (G.indepNum : ℝ) ≤ B) : |
| 80 | + (n : ℝ) ≤ _root_.Erdos627.maxChromaticCliqueRatio n * (A * B) := by |
| 81 | + have hA : 0 ≤ A := (Nat.cast_nonneg _).trans hω |
| 82 | + have hB : 0 ≤ B := (Nat.cast_nonneg _).trans hα |
| 73 | 83 | rcases Nat.eq_zero_or_pos n with rfl | hn |
| 74 | | − · simp only [Nat.cast_zero, zero_div] |
| 75 | | − positivity |
| 84 | + · simpa only [Nat.cast_zero] using mul_nonneg (maxChromaticCliqueRatio_nonneg 0) (mul_nonneg hA hB) |
| 76 | 85 | have hωnat : 1 ≤ G.cliqueNum := (not_cliqueFree_iff_le_cliqueNum G 1).1 fun h => |
| 77 | 86 | (cliqueFree_one.mp h).false (⟨0, hn⟩ : Fin n) |
| 78 | 87 | have hωpos : 0 < (G.cliqueNum : ℝ) := by exact_mod_cast hωnat |
| 79 | | − have hK : 0 < K := hωpos.trans_le hω |
| 80 | | − have hcard : (n : ℝ) ≤ (G.chromaticNumber.toNat : ℝ) * G.indepNum := by |
| 81 | | − exact_mod_cast (show n ≤ G.chromaticNumber.toNat * G.indepNum by |
| 82 | | − simpa using card_le_chromaticNumber_mul_indepNum G) |
| 83 | | − apply (div_le_div_iff₀ (sq_pos_of_pos hK) hωpos).2 |
| 84 | | − calc (n : ℝ) * G.cliqueNum ≤ ((G.chromaticNumber.toNat : ℝ) * G.indepNum) * G.cliqueNum := by |
| 85 | | − gcongr |
| 86 | | − _ ≤ (G.chromaticNumber.toNat : ℝ) * K * K := by gcongr |
| 87 | | − _ = _ := by ring |
| 88 | + calc |
| 89 | + (n : ℝ) ≤ (G.chromaticNumber.toNat : ℝ) * G.indepNum := by |
| 90 | + exact_mod_cast (show n ≤ G.chromaticNumber.toNat * G.indepNum by |
| 91 | + simpa using card_le_chromaticNumber_mul_indepNum G) |
| 92 | + _ = (G.chromaticNumber.toNat : ℝ) / G.cliqueNum * (G.cliqueNum * (G.indepNum : ℝ)) := by |
| 93 | + field_simp |
| 94 | + _ ≤ _ := mul_le_mul (ratio_le_maxChromaticCliqueRatio G) |
| 95 | + (mul_le_mul hω hα (Nat.cast_nonneg _) hA) (by positivity) |
| 96 | + (maxChromaticCliqueRatio_nonneg n) |
| 97 | + |
| 98 | +/-- A graph whose clique and independence numbers are at most `K` gives `f(n) ≥ n/K²`. -/ |
| 99 | +theorem div_sq_le_maxChromaticCliqueRatio_of_graph {n : ℕ} (G : SimpleGraph (Fin n)) {K : ℝ} |
| 100 | + (hω : (G.cliqueNum : ℝ) ≤ K) (hα : (G.indepNum : ℝ) ≤ K) : |
| 101 | + (n : ℝ) / K ^ 2 ≤ _root_.Erdos627.maxChromaticCliqueRatio n := by |
| 102 | + exact div_le_of_le_mul₀ (sq_nonneg K) (maxChromaticCliqueRatio_nonneg n) |
| 103 | + (by simpa only [sq] using card_le_maxChromaticCliqueRatio_mul_of_graph G hω hα) |
| 104 | + |
| 105 | +/-- Below the off-diagonal Ramsey threshold there is a graph with clique number at most `a` |
| 106 | +and independence number at most `b`, so `n ≤ f(n) · (ab)`. -/ |
| 107 | +theorem card_le_maxChromaticCliqueRatio_mul_of_lt_classicalRamsey {n a b : ℕ} |
| 108 | + (hn : n < classicalRamsey (a + 1) (b + 1)) : |
| 109 | + (n : ℝ) ≤ _root_.Erdos627.maxChromaticCliqueRatio n * ((a : ℝ) * b) := by |
| 110 | + have h := mt (classicalRamsey_le_iff (a + 1) (b + 1) n).2 (not_le_of_gt hn) |
| 111 | + simp only [not_forall, not_or, not_le, Nat.lt_succ_iff] at h |
| 112 | + obtain ⟨G, hω, hα⟩ := h |
| 113 | + exact card_le_maxChromaticCliqueRatio_mul_of_graph G (by exact_mod_cast hω) (by exact_mod_cast hα) |
| 114 | + |
| 115 | +/-- Below `R(a+1,b+1)` the maximum chromatic-to-clique ratio is at least `n/(ab)`. -/ |
| 116 | +theorem div_mul_le_maxChromaticCliqueRatio_of_lt_classicalRamsey {n a b : ℕ} |
| 117 | + (hn : n < classicalRamsey (a + 1) (b + 1)) : |
| 118 | + (n : ℝ) / ((a : ℝ) * b) ≤ _root_.Erdos627.maxChromaticCliqueRatio n := |
| 119 | + div_le_of_le_mul₀ (by positivity) (maxChromaticCliqueRatio_nonneg n) |
| 120 | + (card_le_maxChromaticCliqueRatio_mul_of_lt_classicalRamsey hn) |
| 88 | 121 | |
| 89 | 122 | /-- Below the diagonal Ramsey threshold there is a graph with both parameters at most `k`. -/ |
| 90 | 123 | theorem div_sq_le_maxChromaticCliqueRatio_of_lt_diagonalRamsey {n k : ℕ} |
| 91 | 124 | (hn : n < diagonalRamsey (k + 1)) : |
| 92 | 125 | (n : ℝ) / (k : ℝ) ^ 2 ≤ _root_.Erdos627.maxChromaticCliqueRatio n := by |
| 93 | | − have h := mt (classicalRamsey_le_iff (k + 1) (k + 1) n).2 (not_le_of_gt hn) |
| 94 | | − simp only [not_forall, not_or, not_le, Nat.lt_succ_iff] at h |
| 95 | | − obtain ⟨G, hω, hα⟩ := h |
| 96 | | − exact div_sq_le_maxChromaticCliqueRatio_of_graph G (by exact_mod_cast hω) (by exact_mod_cast hα) |
| 126 | + simpa only [sq] using div_mul_le_maxChromaticCliqueRatio_of_lt_classicalRamsey hn |
| 97 | 127 | |
| 98 | 128 | end ErdosSwarm.Erdos627 |