| 1 | module |
| 2 | |
| 3 | public import E424.RoughElements.L9 |
| 4 | |
| 5 | @[expose] public section |
| 6 | |
| 7 | /-! |
| 8 | # Section 3 of the outline: L10 |
| 9 | -/ |
| 10 | |
| 11 | set_option linter.style.header false |
| 12 | open Finset |
| 13 | |
| 14 | namespace E424 |
| 15 | |
| 16 | /-- **Lemma 10**, macroscopic family. -/ |
| 17 | theorem L10 : ∃ cS > 0, ∀ τ : ℝ, 0 < τ → τ ≤ 1 → ∃ Y0 : ℝ, ∀ Y ≥ Y0, ∀ ρ : ℕ, ρ = 53 ∨ ρ = 23 → |
| 18 | ∃ S : Finset ℕ, MacroFam cS τ Y ρ S := by |
| 19 | classical |
| 20 | obtain ⟨a, b, c, X0, ha, ha1, hb1, hab, hc, hX0, h9⟩ := L9 |
| 21 | set r := b / a with hr |
| 22 | have hr1 : 1 < r := by rw [hr, lt_div_iff₀ ha]; linarith |
| 23 | have hlr : 0 < Real.log r := Real.log_pos hr1 |
| 24 | have hb0 : 0 < b := by linarith |
| 25 | refine ⟨c / (4 * b * Real.log r), by positivity, fun τ hτ hτ1 => ?_⟩ |
| 26 | refine ⟨max (max X0 2) (Real.exp (2 * Real.log r / τ)), fun Y hY ρ hρ => ?_⟩ |
| 27 | have hYX : X0 ≤ Y := (le_max_left _ _).trans ((le_max_left _ _).trans hY) |
| 28 | have hY1 : 1 < Y := hX0.trans_le hYX |
| 29 | have hY0 : 0 < Y := by linarith |
| 30 | have hYe : Real.exp (2 * Real.log r / τ) ≤ Y := (le_max_right _ _).trans hY |
| 31 | have hlY : 2 * Real.log r / τ ≤ Real.log Y := by |
| 32 | rwa [Real.le_log_iff_exp_le hY0] |
| 33 | have hlY' : 2 * Real.log r ≤ τ * Real.log Y := by |
| 34 | rw [div_le_iff₀ hτ] at hlY; linarith |
| 35 | have hlYpos : 0 < Real.log Y := Real.log_pos hY1 |
| 36 | set n : ℕ := ⌊τ * Real.log Y / Real.log r⌋₊ with hn |
| 37 | set X : ℕ → ℝ := fun i => Y / a * r ^ i with hX |
| 38 | have hXge : ∀ i, Y ≤ X i := fun i => by |
| 39 | have h1 : Y ≤ Y / a := by rw [le_div_iff₀ ha]; nlinarith |
| 40 | have h2 : 1 ≤ r ^ i := one_le_pow₀ hr1.le |
| 41 | calc Y ≤ Y / a := h1 |
| 42 | _ = Y / a * 1 := by ring |
| 43 | _ ≤ _ := by simp only [hX]; gcongr |
| 44 | have hbX : ∀ i, b * X i = Y * r ^ (i + 1) := fun i => by |
| 45 | simp only [hX, hr, pow_succ]; field_simp |
| 46 | have haX : ∀ i, a * X i = Y * r ^ i := fun i => by |
| 47 | simp only [hX]; field_simp |
| 48 | have hrpow : ∀ i, i < n → Y * r ^ (i + 1) ≤ Y ^ (1 + τ) := fun i hi => by |
| 49 | have hin : ((i + 1 : ℕ) : ℝ) ≤ τ * Real.log Y / Real.log r := |
| 50 | (Nat.le_floor_iff (by positivity)).mp (by omega) |
| 51 | rw [le_div_iff₀ hlr] at hin |
| 52 | rw [Real.rpow_add hY0, Real.rpow_one] |
| 53 | gcongr |
| 54 | have hr0 : 0 < r := by linarith |
| 55 | rw [← Real.log_le_log_iff (by positivity) (by positivity), Real.log_pow, Real.log_rpow hY0] |
| 56 | exact hin |
| 57 | set S : Finset ℕ := (range n).biUnion fun i => rough9 a b (X i) ρ with hS |
| 58 | have hmem : ∀ i s, s ∈ rough9 a b (X i) ρ → (Y * r ^ i < s ∧ (s : ℝ) ≤ Y * r ^ (i + 1)) ∧ s ∈ A ∧ |
| 59 | s % 54 = ρ ∧ Rough (X i ^ (1 / 100 : ℝ)) s := fun i s hs => by |
| 60 | have hXi := (hY0.trans_le (hXge i)).le |
| 61 | rw [mem_rough9 (by positivity) (by positivity), haX, hbX] at hs |
| 62 | exact hs |
| 63 | have hr0 : 0 < r := by linarith |
| 64 | refine ⟨S, ⟨fun s hs => ?_, ?_⟩⟩ |
| 65 | · obtain ⟨i, hi, hs⟩ := mem_biUnion.mp hs |
| 66 | obtain ⟨⟨h1, h2⟩, h3, h4, h5⟩ := hmem i s hs |
| 67 | refine ⟨h3, h4, ?_, h2.trans (hrpow i (mem_range.mp hi)), fun p hp hps => ?_⟩ |
| 68 | · have : 1 ≤ r ^ i := one_le_pow₀ hr1.le |
| 69 | nlinarith |
| 70 | · refine lt_of_le_of_lt ?_ (h5 p hp hps) |
| 71 | exact Real.rpow_le_rpow hY0.le (hXge i) (by norm_num) |
| 72 | · have hdisj : ∀ i ∈ range n, ∀ j ∈ range n, i ≠ j → |
| 73 | Disjoint (rough9 a b (X i) ρ) (rough9 a b (X j) ρ) := by |
| 74 | have key : ∀ i j, i < j → Disjoint (rough9 a b (X i) ρ) (rough9 a b (X j) ρ) := by |
| 75 | intro i j hij |
| 76 | refine disjoint_left.mpr fun s hs hs' => ?_ |
| 77 | have h1 := (hmem i s hs).1.2 |
| 78 | have h2 := (hmem j s hs').1.1 |
| 79 | have h3 : r ^ (i + 1) ≤ r ^ j := pow_le_pow_right₀ hr1.le hij |
| 80 | nlinarith |
| 81 | intro i _ j _ hij |
| 82 | rcases lt_or_gt_of_ne hij with h | h |
| 83 | · exact key i j h |
| 84 | · exact (key j i h).symm |
| 85 | have hsum : ms S = ∑ i ∈ range n, ms (rough9 a b (X i) ρ) := by |
| 86 | unfold ms; rw [hS, sum_biUnion hdisj] |
| 87 | have hterm : ∀ i ∈ range n, c / (2 * b * Real.log Y) ≤ ms (rough9 a b (X i) ρ) := by |
| 88 | intro i hi |
| 89 | have hXi0 : 0 < X i := hY0.trans_le (hXge i) |
| 90 | have hXi1 : 1 < X i := hY1.trans_le (hXge i) |
| 91 | have hlX : Real.log (X i) ≤ 2 * Real.log Y := by |
| 92 | have h1 : X i ≤ Y ^ (1 + τ) := by |
| 93 | refine le_trans ?_ (hrpow i (mem_range.mp hi)) |
| 94 | rw [← hbX]; nlinarith |
| 95 | have := Real.log_le_log hXi0 h1 |
| 96 | rw [Real.log_rpow hY0] at this |
| 97 | nlinarith |
| 98 | have hlX0 : 0 < Real.log (X i) := Real.log_pos hXi1 |
| 99 | have hcard := h9 (X i) (hYX.trans (hXge i)) ρ hρ |
| 100 | have hbXi : 0 < b * X i := by positivity |
| 101 | calc c / (2 * b * Real.log Y) ≤ c / (b * Real.log (X i)) := by |
| 102 | apply div_le_div_of_nonneg_left hc.le (by positivity) |
| 103 | nlinarith |
| 104 | _ = (c * X i / Real.log (X i)) * (1 / (b * X i)) := by field_simp |
| 105 | _ ≤ (rough9 a b (X i) ρ).card * (1 / (b * X i)) := by gcongr |
| 106 | _ = ∑ s ∈ rough9 a b (X i) ρ, 1 / (b * X i) := by rw [sum_const, nsmul_eq_mul] |
| 107 | _ ≤ ms (rough9 a b (X i) ρ) := by |
| 108 | refine sum_le_sum fun s hs => ?_ |
| 109 | obtain ⟨⟨h1, h2⟩, -⟩ := hmem i s hs |
| 110 | have : (0 : ℝ) < s := lt_of_le_of_lt (by positivity) h1 |
| 111 | rw [← hbX] at h2 |
| 112 | exact one_div_le_one_div_of_le this h2 |
| 113 | have hn2 : τ * Real.log Y / (2 * Real.log r) ≤ n := by |
| 114 | have h1 := Nat.lt_floor_add_one (τ * Real.log Y / Real.log r) |
| 115 | rw [← hn] at h1 |
| 116 | have h2 : 1 ≤ τ * Real.log Y / (2 * Real.log r) := by |
| 117 | rw [le_div_iff₀ (by positivity)]; linarith |
| 118 | have h3 : τ * Real.log Y / Real.log r = 2 * (τ * Real.log Y / (2 * Real.log r)) := by |
| 119 | field_simp |
| 120 | linarith |
| 121 | rw [hsum] |
| 122 | calc c / (4 * b * Real.log r) * τ |
| 123 | = τ * Real.log Y / (2 * Real.log r) * (c / (2 * b * Real.log Y)) := by field_simp; ring |
| 124 | _ ≤ n * (c / (2 * b * Real.log Y)) := by gcongr |
| 125 | _ = ∑ i ∈ range n, c / (2 * b * Real.log Y) := by rw [sum_const, card_range, nsmul_eq_mul] |
| 126 | _ ≤ _ := sum_le_sum hterm |
| 127 | |
| 128 | /-- **Lemma 11**, block at `z` (Lemma 10 with `Y = z^100`, `τ = 1`). -/ |
| 129 | theorem L11 : ∃ cS > 0, ∃ z0 : ℝ, ∀ z ≥ z0, ∀ ρ : ℕ, ρ = 53 ∨ ρ = 23 → |
| 130 | ∃ S : Finset ℕ, BlockFam cS z ρ S := by |
| 131 | obtain ⟨cS, hcS, h⟩ := L10 |
| 132 | obtain ⟨Y0, hY0⟩ := h 1 one_pos le_rfl |
| 133 | refine ⟨cS, hcS, max Y0 2, fun z hz ρ hρ => ?_⟩ |
| 134 | have hz2 : 2 ≤ z := (le_max_right _ _).trans hz |
| 135 | have hz1 : 1 ≤ z := by linarith |
| 136 | have hzY : Y0 ≤ z ^ 100 := ((le_max_left _ _).trans hz).trans (le_self_pow₀ hz1 (by norm_num)) |
| 137 | obtain ⟨S, hS⟩ := hY0 (z ^ 100) hzY ρ hρ |
| 138 | refine ⟨S, ⟨fun s hs => ?_, fun s hs => ?_, ?_⟩⟩ |
| 139 | · obtain ⟨h1, h2, h3, h4, h5⟩ := hS.mem s hs |
| 140 | refine ⟨lt_of_lt_of_le ?_ h3, ?_, ?_⟩ |
| 141 | · exact lt_self_pow₀ (by linarith) (by norm_num) |
| 142 | · rw [show (1 + 1 : ℝ) = ((2 : ℕ) : ℝ) by norm_num, Real.rpow_natCast, ← pow_mul] at h4 |
| 143 | exact h4 |
| 144 | · have : (z ^ 100) ^ (1 / 100 : ℝ) = z := by |
| 145 | rw [← Real.rpow_natCast, ← Real.rpow_mul (by linarith)]; norm_num |
| 146 | rwa [this] at h5 |
| 147 | · obtain ⟨h1, h2, h3, h4, h5⟩ := hS.mem s hs |
| 148 | exact ⟨h1, h2, h3⟩ |
| 149 | · have := hS.mass; linarith |
| 150 | |
| 151 | /-- Macroscopic families are θ-families at `Y^{1/100}`. -/ |
| 152 | theorem MacroFam.isFam {c τ Y : ℝ} {ρ : ℕ} {S : Finset ℕ} (hY : 1 < Y) (hτ : τ ≤ 1) |
| 153 | (h : MacroFam c τ Y ρ S) : IsFam (Y ^ (1 / 100 : ℝ)) S := by |
| 154 | intro s hs |
| 155 | obtain ⟨-, -, h3, h4, h5⟩ := h.mem s hs |
| 156 | refine ⟨lt_of_lt_of_le ?_ h3, h4.trans ?_, h5⟩ |
| 157 | · calc Y ^ (1 / 100 : ℝ) < Y ^ (1 : ℝ) := Real.rpow_lt_rpow_of_exponent_lt hY (by norm_num) |
| 158 | _ = Y := Real.rpow_one Y |
| 159 | · rw [← Real.rpow_natCast (Y ^ (1 / 100 : ℝ)), ← Real.rpow_mul (by linarith)] |
| 160 | exact Real.rpow_le_rpow_of_exponent_le hY.le (by norm_num; linarith) |
| 161 | |
| 162 | end E424 |
| 163 | |