| 1 | module |
| 2 | |
| 3 | public import E424.HighBand.L35Aux1 |
| 4 | |
| 5 | @[expose] public section |
| 6 | |
| 7 | /-! |
| 8 | # Lemma 35, part 2: the Fourier side |
| 9 | -/ |
| 10 | |
| 11 | set_option linter.style.header false |
| 12 | open Finset MeasureTheory |
| 13 | |
| 14 | namespace E424.Sm35 |
| 15 | |
| 16 | /-- Coefficients of `Fp N`. -/ |
| 17 | noncomputable def cf (N : ℝ) (n : ℕ) : ℝ := gw (n / N) * F n / n |
| 18 | |
| 19 | /-- `∑ gw(n/N) F(n)/n ψ_r(x - log n)`. -/ |
| 20 | noncomputable def Sm (N r x : ℝ) : ℝ := |
| 21 | ∑ n ∈ Icc 1 ⌊4 * N⌋₊, cf N n * tri r (x - Real.log n) |
| 22 | |
| 23 | theorem cf_nonneg (N : ℝ) (n : ℕ) : 0 ≤ cf N n := |
| 24 | div_nonneg (mul_nonneg (gw_nonneg _) (F_nonneg n)) n.cast_nonneg |
| 25 | |
| 26 | theorem cf_le (N : ℝ) (n : ℕ) : cf N n ≤ 1 / n := by |
| 27 | unfold cf |
| 28 | refine div_le_div_of_nonneg_right ?_ n.cast_nonneg |
| 29 | nlinarith [gw_nonneg (n / N), gw_le_one (n / N), F_nonneg n, F_le_one n] |
| 30 | |
| 31 | theorem cf_eq_zero {N : ℝ} (hN : 0 < N) {n : ℕ} (h : (n : ℝ) ≤ N ∨ 4 * N ≤ n) : cf N n = 0 := by |
| 32 | unfold cf |
| 33 | rw [gw_eq_zero, zero_mul, zero_div] |
| 34 | rcases h with h | h |
| 35 | · exact Or.inl ((div_le_one hN).mpr h) |
| 36 | · exact Or.inr ((le_div_iff₀ hN).mpr h) |
| 37 | |
| 38 | theorem hasCompactSupport_tri {r : ℝ} (hr : 0 < r) (a : ℝ) : |
| 39 | HasCompactSupport fun x => tri r (x - a) := by |
| 40 | refine HasCompactSupport.intro (K := Set.Icc (a - 1 / r) (a + 1 / r)) isCompact_Icc fun x hx => ?_ |
| 41 | refine tri_eq_zero hr ?_ |
| 42 | by_contra hc |
| 43 | rw [not_le, abs_lt] at hc |
| 44 | exact hx ⟨by linarith, by linarith⟩ |
| 45 | |
| 46 | theorem continuous_Sm (N r : ℝ) : Continuous (Sm N r) := by |
| 47 | unfold Sm |
| 48 | exact continuous_finsetSum _ fun n _ => continuous_const.mul ((continuous_tri r).comp (by fun_prop)) |
| 49 | |
| 50 | theorem hasCompactSupport_Sm {r : ℝ} (N : ℝ) (hr : 0 < r) : HasCompactSupport (Sm N r) := by |
| 51 | unfold Sm |
| 52 | induction Icc 1 ⌊4 * N⌋₊ using Finset.induction_on with |
| 53 | | empty => simp only [sum_empty]; exact HasCompactSupport.zero |
| 54 | | insert a s ha ih => |
| 55 | simp only [sum_insert ha] |
| 56 | exact ((hasCompactSupport_tri hr _).mul_left).add ih |
| 57 | |
| 58 | theorem ft_shift {r : ℝ} (hr : 0 < r) (a t : ℝ) : |
| 59 | ∫ x, (tri r (x - a) : ℂ) * Complex.exp (-(t * x : ℝ) * Complex.I) = |
| 60 | ((Real.sinc (t / (2 * r)) ^ 2 : ℝ) : ℂ) * Complex.exp (-(t * a : ℝ) * Complex.I) := by |
| 61 | rw [← T11_fourier_tri r t hr, ← integral_mul_const] |
| 62 | rw [← integral_sub_right_eq_self (fun x => (tri r x : ℂ) * Complex.exp (-(t * x : ℝ) * Complex.I) * |
| 63 | Complex.exp (-(t * a : ℝ) * Complex.I)) a] |
| 64 | congr 1 |
| 65 | funext x |
| 66 | rw [mul_assoc, ← Complex.exp_add] |
| 67 | congr 2 |
| 68 | push_cast; ring |
| 69 | |
| 70 | theorem ft_Sm {r : ℝ} (hr : 0 < r) (N t : ℝ) : |
| 71 | ∫ x, (Sm N r x : ℂ) * Complex.exp (-(t * x : ℝ) * Complex.I) = |
| 72 | ((Real.sinc (t / (2 * r)) ^ 2 : ℝ) : ℂ) * Fp N t := by |
| 73 | have e : ∀ x, (Sm N r x : ℂ) * Complex.exp (-(t * x : ℝ) * Complex.I) = |
| 74 | ∑ n ∈ Icc 1 ⌊4 * N⌋₊, (cf N n : ℂ) * ((tri r (x - Real.log n) : ℂ) * |
| 75 | Complex.exp (-(t * x : ℝ) * Complex.I)) := by |
| 76 | intro x |
| 77 | unfold Sm |
| 78 | push_cast |
| 79 | rw [sum_mul] |
| 80 | exact sum_congr rfl fun n _ => by ring |
| 81 | simp_rw [e] |
| 82 | rw [integral_finsetSum] |
| 83 | · unfold Fp |
| 84 | rw [mul_sum] |
| 85 | refine sum_congr rfl fun n _ => ?_ |
| 86 | rw [integral_const_mul, ft_shift hr] |
| 87 | unfold nit cf |
| 88 | ring |
| 89 | · intro n _ |
| 90 | refine Integrable.const_mul ?_ _ |
| 91 | refine Continuous.integrable_of_hasCompactSupport ?_ ?_ |
| 92 | · refine Continuous.mul ?_ (by fun_prop) |
| 93 | exact Complex.continuous_ofReal.comp ((continuous_tri r).comp (by fun_prop)) |
| 94 | · exact ((hasCompactSupport_tri hr _).comp_left (g := fun y : ℝ => (y : ℂ)) (by simp)).mul_right |
| 95 | |
| 96 | /-- Plancherel for the difference of two smoothings. -/ |
| 97 | theorem plancherel_Sm {r s : ℝ} (hr : 0 < r) (hs : 0 < s) (N : ℝ) : |
| 98 | ∫ t, (Real.sinc (t / (2 * r)) ^ 2 - Real.sinc (t / (2 * s)) ^ 2) ^ 2 * ‖Fp N t‖ ^ 2 = |
| 99 | 2 * Real.pi * ∫ x, (Sm N r x - Sm N s x) ^ 2 := by |
| 100 | have hc : ∀ q, Continuous fun x => (Sm N q x : ℂ) := fun q => |
| 101 | Complex.continuous_ofReal.comp (continuous_Sm N q) |
| 102 | have hcs : ∀ q, 0 < q → HasCompactSupport fun x => (Sm N q x : ℂ) := fun q hq => |
| 103 | (hasCompactSupport_Sm N hq).comp_left (g := fun y : ℝ => (y : ℂ)) (by simp) |
| 104 | have h := T11_plancherel (fun x => (Sm N r x : ℂ) - (Sm N s x : ℂ)) ((hc r).sub (hc s)) |
| 105 | ((hcs r hr).sub (hcs s hs)) |
| 106 | have e1 : ∀ x, ‖(Sm N r x : ℂ) - (Sm N s x : ℂ)‖ ^ 2 = (Sm N r x - Sm N s x) ^ 2 := by |
| 107 | intro x |
| 108 | rw [← Complex.ofReal_sub, Complex.norm_real, Real.norm_eq_abs, sq_abs] |
| 109 | have e2 : ∀ t : ℝ, ∫ x, ((Sm N r x : ℂ) - (Sm N s x : ℂ)) * Complex.exp (-(t * x : ℝ) * Complex.I) = |
| 110 | ((Real.sinc (t / (2 * r)) ^ 2 - Real.sinc (t / (2 * s)) ^ 2 : ℝ) : ℂ) * Fp N t := by |
| 111 | intro t |
| 112 | simp_rw [sub_mul] |
| 113 | rw [integral_sub, ft_Sm hr, ft_Sm hs] |
| 114 | · push_cast; ring |
| 115 | · exact ((hc r).mul (by fun_prop)).integrable_of_hasCompactSupport (hcs r hr).mul_right |
| 116 | · exact ((hc s).mul (by fun_prop)).integrable_of_hasCompactSupport (hcs s hs).mul_right |
| 117 | simp_rw [e1, e2, norm_mul, mul_pow, Complex.norm_real, Real.norm_eq_abs, sq_abs] at h |
| 118 | exact h |
| 119 | |
| 120 | /-- T4 for `Fp N`. -/ |
| 121 | theorem mean_Fp : ∃ K > 0, ∀ N T : ℝ, 1 ≤ N → 0 ≤ T → |
| 122 | ∫ t in Set.Icc (-T) T, ‖Fp N t‖ ^ 2 ≤ K * ((T + N) / N) := by |
| 123 | obtain ⟨C, hC, h⟩ := T4_mean_value |
| 124 | refine ⟨4 * C, by positivity, fun N T hN hT => ?_⟩ |
| 125 | have hN0 : 0 < N := by linarith |
| 126 | set s := (Icc 1 ⌊4 * N⌋₊).filter fun n : ℕ => N ≤ n ∧ (n : ℝ) ≤ 4 * N with hs |
| 127 | have e : ∀ t, Fp N t = ∑ n ∈ s, (cf N n : ℂ) * nit n t := by |
| 128 | intro t |
| 129 | unfold Fp |
| 130 | symm |
| 131 | refine sum_subset (filter_subset _ _) fun n hn hn' => ?_ |
| 132 | have : cf N n = 0 := by |
| 133 | refine cf_eq_zero hN0 ?_ |
| 134 | by_contra hc |
| 135 | rw [not_or, not_le, not_le] at hc |
| 136 | exact hn' (mem_filter.mpr ⟨hn, hc.1.le, hc.2.le⟩) |
| 137 | rw [this]; simp |
| 138 | have h1 := h N T hN hT s (fun n => (cf N n : ℂ)) (fun n hn => by |
| 139 | have := (mem_filter.mp hn).2 |
| 140 | exact ⟨this.1, by linarith⟩) |
| 141 | rw [intervalIntegral.integral_of_le (by linarith), ← integral_Icc_eq_integral_Ioc] at h1 |
| 142 | simp_rw [e] |
| 143 | refine h1.trans ?_ |
| 144 | have h2 : ∑ n ∈ s, ‖(cf N n : ℂ)‖ ^ 2 ≤ 4 * N * (1 / N ^ 2) := by |
| 145 | have : ∀ n ∈ s, ‖(cf N n : ℂ)‖ ^ 2 ≤ 1 / N ^ 2 := by |
| 146 | intro n hn |
| 147 | rw [Complex.norm_real, Real.norm_eq_abs, sq_abs, one_div, ← inv_pow] |
| 148 | refine pow_le_pow_left₀ (cf_nonneg N n) ((cf_le N n).trans ?_) 2 |
| 149 | rw [← one_div] |
| 150 | exact one_div_le_one_div_of_le hN0 (mem_filter.mp hn).2.1 |
| 151 | refine (sum_le_sum this).trans ?_ |
| 152 | rw [sum_const, nsmul_eq_mul] |
| 153 | refine mul_le_mul_of_nonneg_right ?_ (by positivity) |
| 154 | have := card_le (M := ⌊4 * N⌋₊) (a := N) (b := 4 * N) (by linarith) |
| 155 | linarith |
| 156 | calc _ ≤ C * (T + N) * (4 * N * (1 / N ^ 2)) := by gcongr |
| 157 | _ = _ := by field_simp |
| 158 | |
| 159 | /-- From bounds on `[-R, R]` to a bound on `ℝ`. -/ |
| 160 | theorem integral_le_of_forall {f : ℝ → ℝ} {T B : ℝ} (hT : 0 < T) (hB : 0 ≤ B) |
| 161 | (h : ∀ J : ℕ, ∫ t in Set.Icc (-(2 ^ J * T)) (2 ^ J * T), f t ≤ B) : ∫ t, f t ≤ B := by |
| 162 | by_cases hf : Integrable f |
| 163 | · have ht : Filter.Tendsto (fun J : ℕ => 2 ^ J * T) Filter.atTop Filter.atTop := |
| 164 | (tendsto_pow_atTop_atTop_of_one_lt (by norm_num : (1 : ℝ) < 2)).atTop_mul_const hT |
| 165 | have := intervalIntegral_tendsto_integral hf (Filter.tendsto_neg_atTop_atBot.comp ht) ht |
| 166 | refine le_of_tendsto' this fun J => ?_ |
| 167 | have hJ : -(2 ^ J * T) ≤ 2 ^ J * T := by |
| 168 | have : 0 < 2 ^ J * T := by positivity |
| 169 | linarith |
| 170 | change ∫ t in (-(2 ^ J * T))..(2 ^ J * T), f t ≤ B |
| 171 | rw [intervalIntegral.integral_of_le hJ, ← integral_Icc_eq_integral_Ioc] |
| 172 | exact h J |
| 173 | · rw [integral_undef hf]; exact hB |
| 174 | |
| 175 | theorem sinc_sq_le {t r : ℝ} (ht : t ≠ 0) (hr : 0 < r) : |
| 176 | Real.sinc (t / (2 * r)) ^ 2 ≤ 4 * (r / |t|) ^ 2 := by |
| 177 | have h0 : t / (2 * r) ≠ 0 := div_ne_zero ht (by positivity) |
| 178 | rw [Real.sinc_of_ne_zero h0, div_pow (Real.sin _), div_pow r] |
| 179 | have h1 : 0 < |t| := abs_pos.mpr ht |
| 180 | have h2 : (t / (2 * r)) ^ 2 = |t| ^ 2 / (4 * r ^ 2) := by rw [div_pow, sq_abs]; ring |
| 181 | rw [h2] |
| 182 | calc Real.sin (t / (2 * r)) ^ 2 / (|t| ^ 2 / (4 * r ^ 2)) ≤ 1 / (|t| ^ 2 / (4 * r ^ 2)) := by |
| 183 | gcongr; exact Real.sin_sq_le_one _ |
| 184 | _ = _ := by field_simp |
| 185 | |
| 186 | theorem dyadic {T y : ℝ} (h : T < y) : ∀ J : ℕ, y ≤ 2 ^ J * T → |
| 187 | ∃ j < J, 2 ^ j * T < y ∧ y ≤ 2 ^ (j + 1) * T := by |
| 188 | intro J |
| 189 | induction J with |
| 190 | | zero => intro hy; simp at hy; linarith |
| 191 | | succ J ih => |
| 192 | intro hy |
| 193 | by_cases hc : y ≤ 2 ^ J * T |
| 194 | · obtain ⟨j, hj, h1⟩ := ih hc; exact ⟨j, by omega, h1⟩ |
| 195 | · exact ⟨J, by omega, not_le.mp hc, hy⟩ |
| 196 | |
| 197 | /-- The three ranges of `t`. -/ |
| 198 | theorem weight_bound : ∃ K > 0, ∀ N T1 T0 q Q : ℝ, 1 ≤ N → 0 ≤ T1 → T1 ≤ N → 0 < T0 → T0 ≤ N → |
| 199 | 0 < Q → Q ≤ q → |
| 200 | ∫ t, (Real.sinc (t / (2 * q)) ^ 2 - Real.sinc (t / (2 * Q)) ^ 2) ^ 2 * ‖Fp N t‖ ^ 2 ≤ |
| 201 | K * ((T1 / Q) ^ 2 + (q / T0) ^ 4) + ∫ t in {t : ℝ | T1 ≤ |t| ∧ |t| ≤ T0}, ‖Fp N t‖ ^ 2 := by |
| 202 | obtain ⟨K, hK, hm⟩ := mean_Fp |
| 203 | refine ⟨2 * K + 16 * K * 8, by positivity, fun N T1 T0 q Q hN hT1 hT1N hT0 hT0N hQ hQq => ?_⟩ |
| 204 | have hq : 0 < q := hQ.trans_le hQq |
| 205 | have hN0 : 0 < N := by linarith |
| 206 | set G : ℝ → ℝ := fun t => ‖Fp N t‖ ^ 2 with hG |
| 207 | have hGc : Continuous G := ((continuous_Fp N).norm).pow 2 |
| 208 | have hG0 : ∀ t, 0 ≤ G t := fun t => by positivity |
| 209 | set w : ℝ → ℝ := fun t => Real.sinc (t / (2 * q)) ^ 2 - Real.sinc (t / (2 * Q)) ^ 2 with hw |
| 210 | have hsc : ∀ r t : ℝ, 0 ≤ 1 - Real.sinc (t / (2 * r)) ^ 2 ∧ |
| 211 | 1 - Real.sinc (t / (2 * r)) ^ 2 ≤ min 1 |t / r| := by |
| 212 | intro r t |
| 213 | have := T11_sinc (t / r) |
| 214 | rwa [div_div, mul_comm r 2] at this |
| 215 | have hw1 : ∀ t, w t ^ 2 ≤ 1 := by |
| 216 | intro t |
| 217 | have a := hsc q t |
| 218 | have b := hsc Q t |
| 219 | have a' := sq_nonneg (Real.sinc (t / (2 * q))) |
| 220 | have b' := sq_nonneg (Real.sinc (t / (2 * Q))) |
| 221 | rw [sq_le_one_iff_abs_le_one, abs_le] |
| 222 | constructor <;> simp only [hw] <;> linarith |
| 223 | have hwlow : ∀ t, |t| ≤ T1 → w t ^ 2 ≤ (T1 / Q) ^ 2 := by |
| 224 | intro t ht |
| 225 | have a := hsc q t |
| 226 | have b := hsc Q t |
| 227 | have hd : ∀ r, Q ≤ r → min 1 |t / r| ≤ T1 / Q := by |
| 228 | intro r hr |
| 229 | refine (min_le_right _ _).trans ?_ |
| 230 | rw [abs_div, abs_of_pos (hQ.trans_le hr)] |
| 231 | gcongr |
| 232 | rw [← sq_abs] |
| 233 | refine pow_le_pow_left₀ (abs_nonneg _) ?_ 2 |
| 234 | rw [abs_le] |
| 235 | have := hd q hQq |
| 236 | have := hd Q le_rfl |
| 237 | constructor <;> simp only [hw] <;> linarith |
| 238 | have hwhigh : ∀ t, t ≠ 0 → w t ^ 2 ≤ 16 * (q / |t|) ^ 4 := by |
| 239 | intro t ht |
| 240 | have a := sinc_sq_le ht hq |
| 241 | have b := sinc_sq_le ht hQ |
| 242 | have a' := sq_nonneg (Real.sinc (t / (2 * q))) |
| 243 | have b' := sq_nonneg (Real.sinc (t / (2 * Q))) |
| 244 | have c : 4 * (Q / |t|) ^ 2 ≤ 4 * (q / |t|) ^ 2 := by gcongr |
| 245 | have e : 16 * (q / |t|) ^ 4 = (4 * (q / |t|) ^ 2) ^ 2 := by ring |
| 246 | rw [e, ← sq_abs] |
| 247 | refine pow_le_pow_left₀ (abs_nonneg _) ?_ 2 |
| 248 | rw [abs_le] |
| 249 | constructor <;> simp only [hw] <;> linarith |
| 250 | set Bd : Set ℝ := {t : ℝ | T1 ≤ |t| ∧ |t| ≤ T0} with hBd |
| 251 | have hBdc : IsCompact Bd := by |
| 252 | refine Metric.isCompact_of_isClosed_isBounded ?_ ?_ |
| 253 | · exact (isClosed_le continuous_const continuous_abs).inter |
| 254 | (isClosed_le continuous_abs continuous_const) |
| 255 | · exact (Metric.isBounded_Icc (-T0) T0).subset fun t ht => abs_le.mp ht.2 |
| 256 | have hind : ∀ S : Set ℝ, IsCompact S → Integrable (S.indicator G) := fun S hS => |
| 257 | (integrable_indicator_iff hS.measurableSet).mpr (hGc.continuousOn.integrableOn_compact hS) |
| 258 | set Ij : ℕ → Set ℝ := fun j => Set.Icc (-(2 ^ (j + 1) * T0)) (2 ^ (j + 1) * T0) with hIj |
| 259 | have hint0 : 0 ≤ ∫ t in Bd, G t := integral_nonneg fun t => hG0 t |
| 260 | refine integral_le_of_forall (T := T0) hT0 (by positivity) fun J => ?_ |
| 261 | set H : ℝ → ℝ := fun t => (T1 / Q) ^ 2 * (Set.Icc (-T1) T1).indicator G t + Bd.indicator G t + |
| 262 | ∑ j ∈ range J, 16 * (q / T0) ^ 4 * (1 / 16) ^ j * (Ij j).indicator G t with hH |
| 263 | have hHi : Integrable H := by |
| 264 | refine (((hind _ isCompact_Icc).const_mul _).add (hind _ hBdc)).add ?_ |
| 265 | exact integrable_finsetSum _ fun j _ => (hind _ isCompact_Icc).const_mul _ |
| 266 | have hi0 : ∀ (S : Set ℝ) t, 0 ≤ S.indicator G t := fun S t => Set.indicator_nonneg (fun t _ => hG0 t) t |
| 267 | have hH0 : ∀ t, 0 ≤ H t := by |
| 268 | intro t |
| 269 | refine add_nonneg (add_nonneg (mul_nonneg (by positivity) (hi0 _ _)) (hi0 _ _)) ?_ |
| 270 | exact sum_nonneg fun j _ => mul_nonneg (by positivity) (hi0 _ _) |
| 271 | have hpt : ∀ t ∈ Set.Icc (-(2 ^ J * T0)) (2 ^ J * T0), w t ^ 2 * G t ≤ H t := by |
| 272 | intro t ht |
| 273 | have ht' : |t| ≤ 2 ^ J * T0 := abs_le.mpr ht |
| 274 | have p1 : 0 ≤ (T1 / Q) ^ 2 * (Set.Icc (-T1) T1).indicator G t := mul_nonneg (by positivity) (hi0 _ _) |
| 275 | have p2 := hi0 Bd t |
| 276 | have p3 : ∀ j ∈ range J, 0 ≤ 16 * (q / T0) ^ 4 * (1 / 16) ^ j * (Ij j).indicator G t := |
| 277 | fun j _ => mul_nonneg (by positivity) (hi0 _ _) |
| 278 | by_cases c1 : |t| ≤ T1 |
| 279 | · have : (Set.Icc (-T1) T1).indicator G t = G t := Set.indicator_of_mem (show t ∈ Set.Icc (-T1) T1 from abs_le.mp c1) G |
| 280 | have h1 : w t ^ 2 * G t ≤ (T1 / Q) ^ 2 * (Set.Icc (-T1) T1).indicator G t := by |
| 281 | rw [this]; exact mul_le_mul_of_nonneg_right (hwlow t c1) (hG0 t) |
| 282 | have := sum_nonneg p3 |
| 283 | simp only [hH]; linarith |
| 284 | rw [not_le] at c1 |
| 285 | by_cases c2 : |t| ≤ T0 |
| 286 | · have : Bd.indicator G t = G t := Set.indicator_of_mem (show t ∈ Bd from ⟨c1.le, c2⟩) G |
| 287 | have h1 : w t ^ 2 * G t ≤ Bd.indicator G t := by |
| 288 | rw [this]; have := hG0 t; have := hw1 t; nlinarith |
| 289 | have := sum_nonneg p3 |
| 290 | simp only [hH]; linarith |
| 291 | rw [not_le] at c2 |
| 292 | obtain ⟨j, hj, h1, h2⟩ := dyadic c2 J ht' |
| 293 | have h3 := single_le_sum p3 (mem_range.mpr hj) |
| 294 | have : (Ij j).indicator G t = G t := Set.indicator_of_mem (show t ∈ Ij j from abs_le.mp h2) G |
| 295 | rw [this] at h3 |
| 296 | have hne : t ≠ 0 := by |
| 297 | rintro rfl; rw [abs_zero] at c2; linarith |
| 298 | have h4 : w t ^ 2 ≤ 16 * (q / T0) ^ 4 * (1 / 16) ^ j := by |
| 299 | refine (hwhigh t hne).trans ?_ |
| 300 | have : (q / |t|) ^ 4 ≤ (q / (2 ^ j * T0)) ^ 4 := by gcongr |
| 301 | calc 16 * (q / |t|) ^ 4 ≤ 16 * (q / (2 ^ j * T0)) ^ 4 := by gcongr |
| 302 | _ = 16 * (q / T0) ^ 4 * (1 / 16) ^ j := by |
| 303 | have e16 : (16 : ℝ) ^ j = (2 ^ j) ^ 4 := by rw [← pow_mul, mul_comm, pow_mul]; norm_num |
| 304 | rw [div_pow 1, one_pow, e16]; field_simp |
| 305 | have h5 : w t ^ 2 * G t ≤ 16 * (q / T0) ^ 4 * (1 / 16) ^ j * G t := |
| 306 | mul_le_mul_of_nonneg_right h4 (hG0 t) |
| 307 | simp only [hH]; linarith |
| 308 | have hfin : ∫ t in Set.Icc (-(2 ^ J * T0)) (2 ^ J * T0), w t ^ 2 * G t ≤ ∫ t, H t := by |
| 309 | have hwc : Continuous fun t => w t ^ 2 * G t := by |
| 310 | have : Continuous Real.sinc := Real.continuous_sinc |
| 311 | simp only [hw]; fun_prop |
| 312 | refine (setIntegral_mono_on (hwc.continuousOn.integrableOn_compact isCompact_Icc) hHi.integrableOn |
| 313 | measurableSet_Icc hpt).trans ?_ |
| 314 | exact setIntegral_le_integral hHi (Filter.Eventually.of_forall hH0) |
| 315 | refine hfin.trans ?_ |
| 316 | have hH_int : ∫ t, H t = (T1 / Q) ^ 2 * (∫ t in Set.Icc (-T1) T1, G t) + (∫ t in Bd, G t) + |
| 317 | ∑ j ∈ range J, 16 * (q / T0) ^ 4 * (1 / 16) ^ j * ∫ t in Ij j, G t := by |
| 318 | simp only [hH] |
| 319 | rw [integral_add, integral_add, integral_const_mul, integral_indicator measurableSet_Icc, |
| 320 | integral_indicator hBdc.measurableSet, integral_finsetSum] |
| 321 | · congr 1 |
| 322 | refine sum_congr rfl fun j _ => ?_ |
| 323 | rw [integral_const_mul, integral_indicator measurableSet_Icc] |
| 324 | · exact fun j _ => (hind _ isCompact_Icc).const_mul _ |
| 325 | · exact (hind _ isCompact_Icc).const_mul _ |
| 326 | · exact hind _ hBdc |
| 327 | · exact ((hind _ isCompact_Icc).const_mul _).add (hind _ hBdc) |
| 328 | · exact integrable_finsetSum _ fun j _ => (hind _ isCompact_Icc).const_mul _ |
| 329 | rw [hH_int] |
| 330 | have b1 : ∫ t in Set.Icc (-T1) T1, G t ≤ 2 * K := by |
| 331 | refine (hm N T1 hN hT1).trans ?_ |
| 332 | have : (T1 + N) / N ≤ 2 := by rw [div_le_iff₀ hN0]; linarith |
| 333 | nlinarith |
| 334 | have b2 : ∀ j, ∫ t in Ij j, G t ≤ K * (4 * 2 ^ j) := by |
| 335 | intro j |
| 336 | refine (hm N (2 ^ (j + 1) * T0) hN (by positivity)).trans ?_ |
| 337 | refine mul_le_mul_of_nonneg_left ?_ hK.le |
| 338 | rw [div_le_iff₀ hN0, pow_succ] |
| 339 | have : (1 : ℝ) ≤ 2 ^ j := one_le_pow₀ (by norm_num) |
| 340 | have h1 : 2 ^ j * T0 ≤ 2 ^ j * N := by gcongr |
| 341 | nlinarith |
| 342 | have b3 : ∑ j ∈ range J, 16 * (q / T0) ^ 4 * (1 / 16) ^ j * (∫ t in Ij j, G t) ≤ |
| 343 | 16 * K * 8 * (q / T0) ^ 4 := by |
| 344 | have : ∀ j ∈ range J, 16 * (q / T0) ^ 4 * (1 / 16) ^ j * (∫ t in Ij j, G t) ≤ |
| 345 | 64 * K * (q / T0) ^ 4 * (1 / 8) ^ j := by |
| 346 | intro j _ |
| 347 | calc _ ≤ 16 * (q / T0) ^ 4 * (1 / 16) ^ j * (K * (4 * 2 ^ j)) := by gcongr; exact b2 j |
| 348 | _ = 64 * K * (q / T0) ^ 4 * ((1 / 16) ^ j * 2 ^ j) := by ring |
| 349 | _ = _ := by rw [← mul_pow]; norm_num |
| 350 | refine (sum_le_sum this).trans ?_ |
| 351 | rw [← mul_sum] |
| 352 | have hg : ∑ j ∈ range J, (1 / 8 : ℝ) ^ j ≤ 2 := by |
| 353 | have := (summable_geometric_of_lt_one (by norm_num : (0 : ℝ) ≤ 1 / 8) (by norm_num)).sum_le_tsum |
| 354 | (range J) (fun j _ => by positivity) |
| 355 | rw [tsum_geometric_of_lt_one (by norm_num) (by norm_num)] at this |
| 356 | refine this.trans (by norm_num) |
| 357 | calc _ ≤ 64 * K * (q / T0) ^ 4 * 2 := by gcongr |
| 358 | _ = _ := by ring |
| 359 | have b4 : (T1 / Q) ^ 2 * (∫ t in Set.Icc (-T1) T1, G t) ≤ (T1 / Q) ^ 2 * (2 * K) := by gcongr |
| 360 | have b5 : 0 ≤ 2 * K * (q / T0) ^ 4 := by positivity |
| 361 | have b6 : 0 ≤ 16 * K * 8 * (T1 / Q) ^ 2 := by positivity |
| 362 | nlinarith |
| 363 | |
| 364 | end E424.Sm35 |
| 365 | |