| 1 | module |
| 2 | |
| 3 | public import E424.LowBand.L37 |
| 4 | public import E424.LowBand.L38Aux |
| 5 | public import E424.RoughElements.L12 |
| 6 | |
| 7 | @[expose] public section |
| 8 | |
| 9 | /-! |
| 10 | # Section 9 of the outline: L38 |
| 11 | |
| 12 | `U = Uset W τ v` is compact and has volume at least `c1 · Lt`. |
| 13 | |
| 14 | Proof. Split `S` by `dq(log s) ≤ √v` (good) or not (bad). Markov gives `ms(good) ≥ ms/2`. |
| 15 | Let `λ = √v / (8 Q)` with `Q = Qs (Wy W).lo`. Cut the log-range `[ell, ell + Lt]` into cells |
| 16 | `[ell + kλ, ell + (k+1)λ)`. For good `s` in cell `k`, the cell lies in `U` (Lipschitz bound of L37). |
| 17 | Each cell carries `s`-mass `≤ 400 C λ / log Y` by `L12_short`, so `#cells · λ` is large. |
| 18 | -/ |
| 19 | |
| 20 | set_option linter.style.header false |
| 21 | open Finset MeasureTheory |
| 22 | |
| 23 | namespace E424 |
| 24 | |
| 25 | set_option maxHeartbeats 1600000 in |
| 26 | /-- **Lemma 38**, `U` is compact and thick. `c1` depends on `cS` only. -/ |
| 27 | theorem L38 (cS : ℝ) (hc : 0 < cS) : ∃ c1 > 0, ∀ η τ v : ℝ, 0 < η → η ≤ 1 / 1000 → 0 < τ → |
| 28 | τ ≤ 1 / 100 → τ ≤ η / 4 → 0 < v → v ≤ 1 / 4 → ∃ N0 : ℝ, ∀ W : Win, W.Adm η N0 → |
| 29 | ∀ (ρ : ℕ) (S : Finset ℕ), ρ = 53 ∨ ρ = 23 → MacroFam cS τ (Y5 W) ρ S → |
| 30 | (∑ s ∈ S, 1 / (s : ℝ) * dq W τ (Real.log s)) / ms S ≤ v → |
| 31 | IsCompact (Uset W τ v) ∧ c1 * Lt W τ ≤ (volume (Uset W τ v)).toReal := by |
| 32 | obtain ⟨C, hC, hS12⟩ := L12_short |
| 33 | refine ⟨cS / (800 * C), by positivity, fun η τ v hη hη1 hτ hτ1 hτη hv0 hv1 => ?_⟩ |
| 34 | obtain ⟨N1, hN1⟩ := L37 η τ hη hη1 hτ hτη |
| 35 | have hsv : 0 < Real.sqrt v := Real.sqrt_pos.2 hv0 |
| 36 | have hsv2 : Real.sqrt v ≤ 1 / 2 := by |
| 37 | rw [Real.sqrt_le_left (by norm_num)] |
| 38 | linarith |
| 39 | -- `Y = lo^(2/5)` is large: `Y ≥ 2^100` and `Y^0.105 ≥ 16/√v` |
| 40 | have hev : ∀ᶠ Y in Filter.atTop, (2 : ℝ) ^ 100 ≤ Y ∧ 16 / Real.sqrt v ≤ Y ^ (0.105 : ℝ) := |
| 41 | (Filter.eventually_ge_atTop _).and |
| 42 | ((tendsto_rpow_atTop (by norm_num : (0 : ℝ) < 0.105)).eventually_ge_atTop _) |
| 43 | obtain ⟨N2, hN2⟩ := Filter.eventually_atTop.1 |
| 44 | ((tendsto_rpow_atTop (by norm_num : (0 : ℝ) < 0.4)).eventually hev) |
| 45 | refine ⟨max (max N1 N2) (Real.exp (8 / η)), fun W hW ρ S hρ hM hmean => ?_⟩ |
| 46 | have hle := hW.le_lo |
| 47 | have h1 : N1 ≤ W.lo := le_trans ((le_max_left N1 N2).trans (le_max_left _ _)) hle |
| 48 | have h2 : N2 ≤ W.lo := le_trans ((le_max_right N1 N2).trans (le_max_left _ _)) hle |
| 49 | have h3 : Real.exp (8 / η) ≤ W.lo := le_trans (le_max_right _ _) hle |
| 50 | have hlo0 : 0 < W.lo := by linarith [hW.three_le] |
| 51 | have hhi0 : 0 < W.hi := by linarith [hW.lo_lt] |
| 52 | have hlog : 8 / η ≤ Real.log W.lo := (Real.le_log_iff_exp_le hlo0).2 h3 |
| 53 | obtain ⟨hY1, hY2⟩ := hN2 W.lo h2 |
| 54 | -- `Y = Y5 W` and its basic facts |
| 55 | set Y := Y5 W with hYdef |
| 56 | replace hY1 : (2 : ℝ) ^ 100 ≤ Y := hY1 |
| 57 | replace hY2 : 16 / Real.sqrt v ≤ Y ^ (0.105 : ℝ) := hY2 |
| 58 | have hYpos : 0 < Y := by linarith [show (0 : ℝ) < 2 ^ 100 by norm_num] |
| 59 | have hY1' : 1 < Y := by linarith [show (1 : ℝ) < 2 ^ 100 by norm_num] |
| 60 | have hlogY : Real.log Y = ell W := by |
| 61 | rw [hYdef]; unfold Y5 ell; exact Real.log_rpow hlo0 _ |
| 62 | have hlogY0 : 0 < Real.log Y := Real.log_pos hY1' |
| 63 | set Q := Qs (Wy W).lo with hQdef |
| 64 | have hQ' : Q = Y ^ (0.885 : ℝ) := Qs_Wy hlo0 |
| 65 | have hQ1 : 1 ≤ Q := by |
| 66 | rw [hQ']; exact Real.one_le_rpow hY1'.le (by norm_num) |
| 67 | set lam := Real.sqrt v / (8 * Q) with hlamdef |
| 68 | have hlam0 : 0 < lam := div_pos hsv (by linarith) |
| 69 | have hlam16 : lam ≤ 1 / 16 := by |
| 70 | rw [hlamdef, div_le_iff₀ (by linarith)] |
| 71 | linarith |
| 72 | -- `Y^(1/100) · 8Q ≤ Y √v`, which is `8 ≤ Y^0.105 √v` |
| 73 | have hkey : Y ^ (1 / 100 : ℝ) * (8 * Q) ≤ Y * Real.sqrt v := by |
| 74 | have e1 : Y ^ (1 / 100 : ℝ) * Y ^ (0.885 : ℝ) = Y ^ (0.895 : ℝ) := by |
| 75 | rw [← Real.rpow_add hYpos]; norm_num |
| 76 | have e2 : Y = Y ^ (0.895 : ℝ) * Y ^ (0.105 : ℝ) := by |
| 77 | rw [← Real.rpow_add hYpos]; norm_num |
| 78 | have hpos : 0 < Y ^ (0.895 : ℝ) := Real.rpow_pos_of_pos hYpos _ |
| 79 | have h16 : 16 ≤ Y ^ (0.105 : ℝ) * Real.sqrt v := by |
| 80 | rw [div_le_iff₀ hsv] at hY2 |
| 81 | linarith |
| 82 | have hmul := mul_le_mul_of_nonneg_left h16 hpos.le |
| 83 | have hexp : Y ^ (1 / 100 : ℝ) * (8 * Q) = 8 * (Y ^ (1 / 100 : ℝ) * Y ^ (0.885 : ℝ)) := by |
| 84 | rw [hQ']; ring |
| 85 | rw [hexp, e1] |
| 86 | nth_rewrite 2 [e2] |
| 87 | linarith |
| 88 | have hzlam : Y ^ (1 / 100 : ℝ) ≤ Y * lam := by |
| 89 | have : Y * lam = Y * Real.sqrt v / (8 * Q) := by rw [hlamdef]; ring |
| 90 | rw [this, le_div_iff₀ (by linarith)] |
| 91 | linarith |
| 92 | have hz_lt : Y ^ (1 / 100 : ℝ) < Y := by |
| 93 | have := mul_le_mul_of_nonneg_left hlam16 hYpos.le |
| 94 | linarith |
| 95 | have hz2 : 2 ≤ Y ^ (1 / 100 : ℝ) := by |
| 96 | calc (2 : ℝ) = ((2 : ℝ) ^ (100 : ℕ)) ^ (1 / 100 : ℝ) := by |
| 97 | rw [← Real.rpow_natCast, ← Real.rpow_mul (by norm_num)]; norm_num |
| 98 | _ ≤ Y ^ (1 / 100 : ℝ) := Real.rpow_le_rpow (by positivity) hY1 (by norm_num) |
| 99 | have hlogz : Real.log (Y ^ (1 / 100 : ℝ)) = 1 / 100 * Real.log Y := |
| 100 | Real.log_rpow hYpos _ |
| 101 | -- `S` is a family at `z = Y^(1/100)` |
| 102 | have hfam : ∀ S : Finset ℕ, MacroFam cS τ Y ρ S → IsFam (Y ^ (1 / 100 : ℝ)) S := by |
| 103 | intro S hS s hs |
| 104 | obtain ⟨-, -, hYs, hsY, hR⟩ := hS.mem s hs |
| 105 | refine ⟨lt_of_lt_of_le hz_lt hYs, ?_, hR⟩ |
| 106 | have hz200 : (Y ^ (1 / 100 : ℝ)) ^ (200 : ℕ) = Y ^ (2 : ℝ) := by |
| 107 | rw [← Real.rpow_natCast, ← Real.rpow_mul hYpos.le]; norm_num |
| 108 | rw [hz200] |
| 109 | exact le_trans hsY (Real.rpow_le_rpow_of_exponent_le hY1'.le (by linarith)) |
| 110 | have hX := Xlen_nonneg hW hη hτη hlog |
| 111 | have hdq0 := dq_nonneg hX hlo0 hhi0 |
| 112 | have hmpos : 0 < ms S := lt_of_lt_of_le (mul_pos hc hτ) hM.mass |
| 113 | have hsum : ∑ s ∈ S, 1 / (s : ℝ) * dq W τ (Real.log (s : ℝ)) ≤ v * ms S := |
| 114 | (div_le_iff₀ hmpos).1 hmean |
| 115 | have hYe : Y = Real.exp (ell W) := by rw [← hlogY, Real.exp_log hYpos] |
| 116 | -- Markov: the good `s` carry at least half of the mass |
| 117 | set G := S.filter (fun s : ℕ => dq W τ (Real.log (s : ℝ)) ≤ Real.sqrt v) with hG |
| 118 | have hbad : Real.sqrt v * ∑ s ∈ S.filter (fun s : ℕ => ¬ dq W τ (Real.log (s : ℝ)) ≤ Real.sqrt v), |
| 119 | 1 / (s : ℝ) ≤ v * ms S := by |
| 120 | calc Real.sqrt v * ∑ s ∈ S.filter (fun s : ℕ => ¬ dq W τ (Real.log (s : ℝ)) ≤ Real.sqrt v), 1 / (s : ℝ) |
| 121 | = ∑ s ∈ S.filter (fun s : ℕ => ¬ dq W τ (Real.log (s : ℝ)) ≤ Real.sqrt v), |
| 122 | Real.sqrt v * (1 / (s : ℝ)) := by rw [Finset.mul_sum] |
| 123 | _ ≤ ∑ s ∈ S.filter (fun s : ℕ => ¬ dq W τ (Real.log (s : ℝ)) ≤ Real.sqrt v), |
| 124 | 1 / (s : ℝ) * dq W τ (Real.log (s : ℝ)) := by |
| 125 | refine Finset.sum_le_sum fun s hs => ?_ |
| 126 | have h := (Finset.mem_filter.1 hs).2 |
| 127 | push_neg at h |
| 128 | have h1 : 0 ≤ 1 / (s : ℝ) := by positivity |
| 129 | linarith [mul_le_mul_of_nonneg_left h.le h1] |
| 130 | _ ≤ ∑ s ∈ S, 1 / (s : ℝ) * dq W τ (Real.log (s : ℝ)) := |
| 131 | Finset.sum_le_sum_of_subset_of_nonneg (Finset.filter_subset _ _) |
| 132 | (fun s _ _ => mul_nonneg (by positivity) (hdq0 _)) |
| 133 | _ ≤ v * ms S := hsum |
| 134 | have hsplit : ms S = ms G + |
| 135 | ∑ s ∈ S.filter (fun s : ℕ => ¬ dq W τ (Real.log (s : ℝ)) ≤ Real.sqrt v), 1 / (s : ℝ) := by |
| 136 | unfold ms |
| 137 | rw [hG, Finset.sum_filter_add_sum_filter_not] |
| 138 | have hvv : v = Real.sqrt v * Real.sqrt v := (Real.mul_self_sqrt hv0.le).symm |
| 139 | have hbad' : ∑ s ∈ S.filter (fun s : ℕ => ¬ dq W τ (Real.log (s : ℝ)) ≤ Real.sqrt v), 1 / (s : ℝ) |
| 140 | ≤ Real.sqrt v * ms S := by |
| 141 | refine le_of_mul_le_mul_left ?_ hsv |
| 142 | calc _ ≤ v * ms S := hbad |
| 143 | _ = Real.sqrt v * (Real.sqrt v * ms S) := by linear_combination (ms S) * hvv |
| 144 | have hGhalf : ms S / 2 ≤ ms G := by |
| 145 | linarith [mul_nonneg (sub_nonneg.2 hsv2) hmpos.le] |
| 146 | -- the cells |
| 147 | have hu : ∀ s ∈ S, ell W ≤ Real.log (s : ℝ) ∧ Real.log (s : ℝ) ≤ ell W + Lt W τ := by |
| 148 | intro s hs |
| 149 | obtain ⟨-, -, hYs, hsY, -⟩ := hM.mem s hs |
| 150 | have hs0 : 0 < (s : ℝ) := lt_of_lt_of_le hYpos hYs |
| 151 | refine ⟨?_, ?_⟩ |
| 152 | · rw [← hlogY]; exact Real.log_le_log hYpos hYs |
| 153 | · have := Real.log_le_log hs0 hsY |
| 154 | rw [Real.log_rpow hYpos, hlogY] at this |
| 155 | unfold Lt |
| 156 | exact this.trans_eq (by ring) |
| 157 | have hκ : ∀ s ∈ S, ∀ k : ℕ, ⌊(Real.log (s : ℝ) - ell W) / lam⌋₊ = k → |
| 158 | (k : ℝ) * lam ≤ Real.log (s : ℝ) - ell W ∧ Real.log (s : ℝ) - ell W < (k + 1) * lam := by |
| 159 | intro s hs k hk |
| 160 | have h0 : 0 ≤ (Real.log (s : ℝ) - ell W) / lam := |
| 161 | div_nonneg (by linarith [(hu s hs).1]) hlam0.le |
| 162 | obtain ⟨h1, h2⟩ := (Nat.floor_eq_iff h0).1 hk |
| 163 | rw [le_div_iff₀ hlam0] at h1 |
| 164 | rw [div_lt_iff₀ hlam0] at h2 |
| 165 | exact ⟨h1, h2⟩ |
| 166 | have hcellmass : ∀ k : ℕ, ∑ s ∈ G.filter (fun s : ℕ => ⌊(Real.log (s : ℝ) - ell W) / lam⌋₊ = k), 1 / (s : ℝ) |
| 167 | ≤ 400 * C * lam / Real.log Y := by |
| 168 | intro k |
| 169 | obtain ⟨e1, e2, e3⟩ := exp_facts hlam0.le (by linarith) |
| 170 | obtain ⟨l, hl⟩ : ∃ l, l = Real.exp (2 * lam) - 1 := ⟨_, rfl⟩ |
| 171 | rw [← hl] at e1 e2 |
| 172 | obtain ⟨x, hx⟩ : ∃ x, x = Real.exp (ell W + k * lam - lam) := ⟨_, rfl⟩ |
| 173 | have hx0 : 0 < x := hx ▸ Real.exp_pos _ |
| 174 | have hxY : Y / 2 ≤ x := by |
| 175 | have h1 : x = Y * Real.exp (k * lam - lam) := by |
| 176 | rw [hx, hYe, ← Real.exp_add]; congr 1; ring |
| 177 | have h2 : (1 / 2 : ℝ) ≤ Real.exp (k * lam - lam) := by |
| 178 | refine le_trans e3 (Real.exp_le_exp.2 ?_) |
| 179 | have : 0 ≤ (k : ℝ) * lam := by positivity |
| 180 | linarith |
| 181 | rw [h1]; nlinarith |
| 182 | have hzl : Y ^ (1 / 100 : ℝ) ≤ x * l := by |
| 183 | have : Y / 2 * (2 * lam) ≤ x * l := |
| 184 | mul_le_mul hxY (by linarith) (by positivity) hx0.le |
| 185 | linarith |
| 186 | have hmain := hS12 (Y ^ (1 / 100 : ℝ)) hz2 S (hfam S hM) x l hx0 hzl |
| 187 | have hsub : (G.filter fun s : ℕ => ⌊(Real.log (s : ℝ) - ell W) / lam⌋₊ = k) ⊆ |
| 188 | S.filter fun s : ℕ => x < (s : ℕ) ∧ (s : ℝ) ≤ x * (1 + l) := by |
| 189 | intro s hs |
| 190 | obtain ⟨hsG, hsk⟩ := Finset.mem_filter.1 hs |
| 191 | have hsS := (Finset.mem_filter.1 hsG).1 |
| 192 | obtain ⟨h1, h2⟩ := hκ s hsS k hsk |
| 193 | have hs0 : 0 < (s : ℝ) := by |
| 194 | obtain ⟨-, -, hYs, -⟩ := hM.mem s hsS |
| 195 | exact lt_of_lt_of_le hYpos hYs |
| 196 | refine Finset.mem_filter.2 ⟨hsS, ?_, ?_⟩ |
| 197 | · rw [hx, ← Real.exp_log hs0] |
| 198 | exact Real.exp_lt_exp.2 (by linarith) |
| 199 | · have : x * (1 + l) = Real.exp (ell W + (k + 1) * lam) := by |
| 200 | rw [hx, hl, add_sub_cancel, ← Real.exp_add]; congr 1; ring |
| 201 | rw [this, ← Real.exp_log hs0] |
| 202 | exact Real.exp_le_exp.2 (by linarith) |
| 203 | calc ∑ s ∈ G.filter (fun s : ℕ => ⌊(Real.log (s : ℝ) - ell W) / lam⌋₊ = k), 1 / (s : ℝ) |
| 204 | ≤ ∑ s ∈ S with x < (s : ℕ) ∧ (s : ℝ) ≤ x * (1 + l), 1 / (s : ℝ) := |
| 205 | Finset.sum_le_sum_of_subset_of_nonneg hsub (fun s _ _ => by positivity) |
| 206 | _ ≤ C * l / Real.log (Y ^ (1 / 100 : ℝ)) := hmain |
| 207 | _ ≤ 400 * C * lam / Real.log Y := by |
| 208 | rw [hlogz, div_le_div_iff₀ (by positivity) hlogY0] |
| 209 | linarith [mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left e2 hC.le) hlogY0.le] |
| 210 | -- Lipschitz bound on `U`'s ambient interval |
| 211 | have hL37 : ∀ u ∈ Set.Icc (ell W - 1) (ell W + Lt W τ + 1), |
| 212 | ∀ u' ∈ Set.Icc (ell W - 1) (ell W + Lt W τ + 1), |
| 213 | |dq W τ u - dq W τ u'| ≤ 8 * Q * |u - u'| := hN1 W (hW.mono ((le_max_left _ _).trans (le_max_left _ _))) |
| 214 | have hUeq : Uset W τ v = Set.Icc (ell W - 1) (ell W + Lt W τ + 1) ∩ |
| 215 | dq W τ ⁻¹' Set.Iic (2 * Real.sqrt v) := rfl |
| 216 | have hcont : ContinuousOn (dq W τ) (Set.Icc (ell W - 1) (ell W + Lt W τ + 1)) := by |
| 217 | have hlip : LipschitzOnWith (8 * Q).toNNReal (dq W τ) |
| 218 | (Set.Icc (ell W - 1) (ell W + Lt W τ + 1)) := by |
| 219 | refine LipschitzOnWith.of_dist_le_mul fun u hu' u' hu'' => ?_ |
| 220 | rw [Real.coe_toNNReal _ (by linarith), Real.dist_eq, Real.dist_eq] |
| 221 | exact hL37 u hu' u' hu'' |
| 222 | exact hlip.continuousOn |
| 223 | have hclosed : IsClosed (Uset W τ v) := by |
| 224 | rw [hUeq] |
| 225 | exact hcont.preimage_isClosed_of_isClosed isClosed_Icc isClosed_Iic |
| 226 | have hcompact : IsCompact (Uset W τ v) := |
| 227 | isCompact_Icc.of_isClosed_subset hclosed (fun u hu => hu.1) |
| 228 | refine ⟨hcompact, ?_⟩ |
| 229 | -- the occupied cells |
| 230 | set H := G.image (fun s : ℕ => ⌊(Real.log (s : ℝ) - ell W) / lam⌋₊) with hH |
| 231 | have hsubU : ∀ k ∈ H, Set.Ico (ell W + k * lam) (ell W + (k + 1) * lam) ⊆ Uset W τ v := by |
| 232 | intro k hk u' hu' |
| 233 | obtain ⟨s, hsG, hsk⟩ := Finset.mem_image.1 hk |
| 234 | have hsS := (Finset.mem_filter.1 hsG).1 |
| 235 | have hgood := (Finset.mem_filter.1 hsG).2 |
| 236 | obtain ⟨h1, h2⟩ := hκ s hsS k hsk |
| 237 | obtain ⟨hu1, hu2⟩ := hu s hsS |
| 238 | have hk0 : 0 ≤ (k : ℝ) * lam := by positivity |
| 239 | have hmem : Real.log (s : ℝ) ∈ Set.Icc (ell W - 1) (ell W + Lt W τ + 1) := |
| 240 | ⟨by linarith, by linarith [hlam16]⟩ |
| 241 | have hmem' : u' ∈ Set.Icc (ell W - 1) (ell W + Lt W τ + 1) := |
| 242 | ⟨by linarith [hu'.1], by linarith [hu'.2]⟩ |
| 243 | refine ⟨hmem', ?_⟩ |
| 244 | have hdist : |Real.log (s : ℝ) - u'| ≤ lam := by |
| 245 | rw [abs_le]; constructor <;> linarith [hu'.1, hu'.2] |
| 246 | have hlip := hL37 _ hmem' _ hmem |
| 247 | have hQlam : 8 * Q * lam = Real.sqrt v := by rw [hlamdef]; field_simp |
| 248 | have h8 : 8 * Q * |u' - Real.log (s : ℝ)| ≤ Real.sqrt v := by |
| 249 | rw [abs_sub_comm, ← hQlam] |
| 250 | exact mul_le_mul_of_nonneg_left hdist (by linarith) |
| 251 | have := (abs_le.1 hlip).2 |
| 252 | show dq W τ u' ≤ 2 * Real.sqrt v |
| 253 | linarith |
| 254 | have hvol := card_mul_le_volume hcompact hlam0 hsubU |
| 255 | -- counting |
| 256 | have hfib : ∑ k ∈ H, ∑ s ∈ G.filter (fun s : ℕ => ⌊(Real.log (s : ℝ) - ell W) / lam⌋₊ = k), 1 / (s : ℝ) = ms G := by |
| 257 | unfold ms |
| 258 | exact Finset.sum_fiberwise_of_maps_to (fun s hs => Finset.mem_image_of_mem _ hs) _ |
| 259 | have hGle : ms G ≤ H.card * (400 * C * lam / Real.log Y) := by |
| 260 | rw [← hfib] |
| 261 | calc _ ≤ ∑ k ∈ H, 400 * C * lam / Real.log Y := Finset.sum_le_sum fun k _ => hcellmass k |
| 262 | _ = _ := by rw [Finset.sum_const, nsmul_eq_mul] |
| 263 | have hmass := hM.mass |
| 264 | have hkey2 : cS * τ * Real.log Y ≤ 800 * C * (H.card * lam) := by |
| 265 | have h := le_trans (by linarith : cS * τ / 2 ≤ ms G) hGle |
| 266 | rw [mul_div_assoc', le_div_iff₀ hlogY0] at h |
| 267 | linarith |
| 268 | have hLt : Lt W τ = τ * Real.log Y := by rw [hlogY]; rfl |
| 269 | calc cS / (800 * C) * Lt W τ ≤ H.card * lam := by |
| 270 | rw [hLt, div_mul_eq_mul_div, div_le_iff₀ (by positivity)] |
| 271 | linarith |
| 272 | _ ≤ _ := hvol |
| 273 | |
| 274 | end E424 |
| 275 | |