| 1 | module |
| 2 | |
| 3 | public import E424.HighBand.L32Aux1 |
| 4 | |
| 5 | @[expose] public section |
| 6 | |
| 7 | /-! |
| 8 | # Lemma 32, auxiliary part 2: the integral of `HH` (diagonal and off-diagonal) and the sum test |
| 9 | -/ |
| 10 | |
| 11 | set_option linter.style.header false |
| 12 | open Finset MeasureTheory |
| 13 | |
| 14 | namespace E424 |
| 15 | |
| 16 | /-- `qw (e^x - κ) qw (e^x) e^x`. -/ |
| 17 | noncomputable def GE (κ x : ℝ) : ℝ := qw (Real.exp x - κ) * qw (Real.exp x) * Real.exp x |
| 18 | |
| 19 | theorem HH_integral (κ t t' : ℝ) : ∫ v, HH κ t t' v = |
| 20 | ∫ x in (0 : ℝ)..Real.log 4, (GE κ x : ℂ) * |
| 21 | Complex.exp (((t' * x - t * Real.log (Real.exp x - κ) : ℝ) : ℂ) * Complex.I) := by |
| 22 | have h1 : ∫ v in (1 : ℝ)..4, HH κ t t' v = ∫ v, HH κ t t' v := by |
| 23 | refine intervalIntegral.integral_eq_integral_of_support_subset fun v hv => ?_ |
| 24 | by_contra hc |
| 25 | rw [Set.mem_Ioc, not_and_or, not_lt, not_le] at hc |
| 26 | exact hv (HH_eq_zero (hc.imp id le_of_lt)) |
| 27 | have h2 := intervalIntegral.integral_deriv_smul_comp (a := 0) (b := Real.log 4) (f := Real.exp) |
| 28 | (f' := Real.exp) (g := HH κ t t') (fun x _ => Real.hasDerivAt_exp x) |
| 29 | Real.continuous_exp.continuousOn (HH_contDiff κ t t').continuous |
| 30 | rw [Real.exp_zero, Real.exp_log (by norm_num)] at h2 |
| 31 | rw [← h1, ← h2] |
| 32 | refine intervalIntegral.integral_congr fun x _ => ?_ |
| 33 | simp only [Function.comp, HH, GE, Real.log_exp, Complex.real_smul] |
| 34 | push_cast |
| 35 | ring |
| 36 | |
| 37 | /-- Integration by L32_parts against `e^{iux}`. -/ |
| 38 | theorem L32_parts (F : ℝ → ℂ) (hF : ContDiff ℝ 1 F) (hc : HasCompactSupport F) (u : ℝ) : |
| 39 | ((u : ℂ) * Complex.I) * ∫ x : ℝ, F x * Complex.exp (((u * x : ℝ) : ℂ) * Complex.I) = |
| 40 | -∫ x : ℝ, deriv F x * Complex.exp (((u * x : ℝ) : ℂ) * Complex.I) := by |
| 41 | have hE : ∀ x : ℝ, HasDerivAt (fun x : ℝ => Complex.exp (((u * x : ℝ) : ℂ) * Complex.I)) |
| 42 | (Complex.exp (((u * x : ℝ) : ℂ) * Complex.I) * ((u : ℂ) * Complex.I)) x := fun x => by |
| 43 | have := (((hasDerivAt_id x).const_mul u).ofReal_comp.mul_const Complex.I).cexp |
| 44 | simpa using this |
| 45 | have cE : Continuous fun x : ℝ => Complex.exp (((u * x : ℝ) : ℂ) * Complex.I) := by fun_prop |
| 46 | have cF := hF.continuous |
| 47 | have cF' := hF.continuous_deriv le_rfl |
| 48 | have key := integral_mul_deriv_eq_deriv_mul_of_integrable (u := F) (u' := deriv F) |
| 49 | (v := fun x : ℝ => Complex.exp (((u * x : ℝ) : ℂ) * Complex.I)) |
| 50 | (v' := fun x : ℝ => Complex.exp (((u * x : ℝ) : ℂ) * Complex.I) * ((u : ℂ) * Complex.I)) |
| 51 | (fun x _ => (hF.differentiable (by norm_num) x).hasDerivAt) (fun x _ => hE x) |
| 52 | ((cF.mul (cE.mul continuous_const)).integrable_of_hasCompactSupport hc.mul_right) |
| 53 | ((cF'.mul cE).integrable_of_hasCompactSupport hc.deriv.mul_right) |
| 54 | ((cF.mul cE).integrable_of_hasCompactSupport hc.mul_right) |
| 55 | rw [← key, ← integral_const_mul] |
| 56 | congr 1; ext x; ring |
| 57 | |
| 58 | theorem GE_contDiff (κ : ℝ) : ContDiff ℝ 2 (GE κ) := by |
| 59 | unfold GE |
| 60 | have he : ContDiff ℝ 2 Real.exp := Real.contDiff_exp |
| 61 | exact ((qw_contDiff.comp (he.sub contDiff_const)).mul (qw_contDiff.comp he)).mul he |
| 62 | |
| 63 | theorem GE_eq_zero {κ x : ℝ} (h : x ≤ 0 ∨ Real.log 4 ≤ x) : GE κ x = 0 := by |
| 64 | have : qw (Real.exp x) = 0 := qw_eq_zero (h.imp Real.exp_le_one_iff.2 fun h => |
| 65 | (Real.log_le_iff_le_exp (by norm_num)).1 h) |
| 66 | simp [GE, this] |
| 67 | |
| 68 | theorem GE_compact (κ : ℝ) : HasCompactSupport fun x => (GE κ x : ℂ) := |
| 69 | HasCompactSupport.intro (K := Set.Icc 0 (Real.log 4)) isCompact_Icc fun x hx => by |
| 70 | rw [Set.mem_Icc, not_and_or, not_le, not_le] at hx |
| 71 | rw [GE_eq_zero (hx.imp le_of_lt le_of_lt), Complex.ofReal_zero] |
| 72 | |
| 73 | /-- Diagonal case. -/ |
| 74 | theorem L32_caseA : ∃ C > 0, ∀ t t' : ℝ, ‖∫ v, HH 0 t t' v‖ ≤ C / (1 + |t' - t|) ^ 2 := by |
| 75 | have hc : ContDiff ℝ 2 fun x => (GE 0 x : ℂ) := Complex.ofRealCLM.contDiff.comp (GE_contDiff 0) |
| 76 | set F : ℝ → ℂ := fun x => (GE 0 x : ℂ) with hFdef |
| 77 | have hF' : ContDiff ℝ 1 (deriv F) := by |
| 78 | have := hc |
| 79 | rw [show (2 : WithTop ℕ∞) = 1 + 1 by norm_num, contDiff_succ_iff_deriv] at this |
| 80 | exact this.2.2 |
| 81 | have hk : HasCompactSupport F := GE_compact 0 |
| 82 | have hn : ∀ (f : ℝ → ℂ) (u : ℝ), |
| 83 | ‖∫ x : ℝ, f x * Complex.exp (((u * x : ℝ) : ℂ) * Complex.I)‖ ≤ ∫ x, ‖f x‖ := fun f u => by |
| 84 | refine (norm_integral_le_integral_norm _).trans (le_of_eq ?_) |
| 85 | congr 1; ext x |
| 86 | rw [norm_mul, Complex.norm_exp_ofReal_mul_I, mul_one] |
| 87 | set M0 := ∫ x, ‖F x‖ |
| 88 | set M2 := ∫ x, ‖deriv (deriv F) x‖ |
| 89 | have hM0 : 0 ≤ M0 := integral_nonneg fun _ => norm_nonneg _ |
| 90 | have hM2 : 0 ≤ M2 := integral_nonneg fun _ => norm_nonneg _ |
| 91 | refine ⟨2 * (M0 + M2) + 1, by positivity, fun t t' => ?_⟩ |
| 92 | have hI : ∫ v, HH 0 t t' v = |
| 93 | ∫ x : ℝ, F x * Complex.exp ((((t' - t) * x : ℝ) : ℂ) * Complex.I) := by |
| 94 | rw [HH_integral, ← intervalIntegral.integral_eq_integral_of_support_subset (a := 0) |
| 95 | (b := Real.log 4)] |
| 96 | · refine intervalIntegral.integral_congr fun x _ => ?_ |
| 97 | simp only [sub_zero, Real.log_exp, hFdef, sub_mul] |
| 98 | · intro x hx |
| 99 | by_contra hcon |
| 100 | rw [Set.mem_Ioc, not_and_or, not_lt, not_le] at hcon |
| 101 | exact hx (by simp [hFdef, GE_eq_zero (hcon.imp id le_of_lt)]) |
| 102 | rw [hI] |
| 103 | set u := t' - t |
| 104 | have p1 := L32_parts F (hc.of_le (by norm_num)) hk u |
| 105 | have p2 := L32_parts (deriv F) hF' hk.deriv u |
| 106 | set I0 := ∫ x : ℝ, F x * Complex.exp (((u * x : ℝ) : ℂ) * Complex.I) |
| 107 | have b0 : ‖I0‖ ≤ M0 := hn F u |
| 108 | have b2 : u ^ 2 * ‖I0‖ ≤ M2 := by |
| 109 | have e : ((u : ℂ) * Complex.I) * (((u : ℂ) * Complex.I) * I0) = |
| 110 | ∫ x : ℝ, deriv (deriv F) x * Complex.exp (((u * x : ℝ) : ℂ) * Complex.I) := by |
| 111 | rw [p1, mul_neg, p2, neg_neg] |
| 112 | have := hn (deriv (deriv F)) u |
| 113 | rw [← e] at this |
| 114 | simp only [norm_mul, Complex.norm_real, Complex.norm_I, mul_one, Real.norm_eq_abs] at this |
| 115 | rw [← mul_assoc, ← sq, sq_abs] at this |
| 116 | exact this |
| 117 | rw [le_div_iff₀ (by positivity)] |
| 118 | have h3 : (1 + |u|) ^ 2 ≤ 2 * (1 + u ^ 2) := by |
| 119 | nlinarith [sq_abs u, sq_nonneg (1 - |u|)] |
| 120 | nlinarith [mul_le_mul_of_nonneg_left h3 (norm_nonneg I0)] |
| 121 | |
| 122 | /-- Off-diagonal case. -/ |
| 123 | theorem L32_caseB : ∃ C > 0, ∀ κ t t' : ℝ, |κ| ≤ 1 / 4 → 0 < t * κ → |
| 124 | ‖∫ v, HH κ t t' v‖ ≤ C / Real.sqrt (t * κ) := by |
| 125 | obtain ⟨B, hB, hq⟩ := qw_bound |
| 126 | obtain ⟨C, hC, hT⟩ := T8_second_derivative_integral |
| 127 | refine ⟨C * (4 * B ^ 2 + 36 * B ^ 2 * Real.log 4) * 5, by positivity, fun κ t t' hκ htκ => ?_⟩ |
| 128 | have hκ' := abs_le.1 hκ |
| 129 | have hl : (0 : ℝ) ≤ Real.log 4 := Real.log_nonneg (by norm_num) |
| 130 | have hx : ∀ x ∈ Set.Icc 0 (Real.log 4), 1 ≤ Real.exp x ∧ Real.exp x ≤ 4 := fun x hx => |
| 131 | ⟨Real.one_le_exp hx.1, (Real.le_log_iff_exp_le (by norm_num)).1 hx.2⟩ |
| 132 | have hne : ∀ x ∈ Set.Icc 0 (Real.log 4), 0 < Real.exp x - κ := fun x h => by |
| 133 | linarith [(hx x h).1] |
| 134 | rw [HH_integral] |
| 135 | have key := hT 0 (Real.log 4) (t * κ / 25) (4 * B ^ 2) (36 * B ^ 2) |
| 136 | (fun x => t' * x - t * Real.log (Real.exp x - κ)) |
| 137 | (fun x => t' - t * (Real.exp x / (Real.exp x - κ))) |
| 138 | (fun x => t * κ * (Real.exp x / (Real.exp x - κ) ^ 2)) |
| 139 | (GE κ) |
| 140 | (fun x => (deriv qw (Real.exp x - κ) * Real.exp x * qw (Real.exp x) + |
| 141 | qw (Real.exp x - κ) * (deriv qw (Real.exp x) * Real.exp x)) * Real.exp x + |
| 142 | qw (Real.exp x - κ) * qw (Real.exp x) * Real.exp x) |
| 143 | hl (by positivity) (by positivity) (by positivity) ?_ ?_ ?_ ?_ |
| 144 | · refine key.trans ?_ |
| 145 | rw [Real.sqrt_div htκ.le, show (25 : ℝ) = 5 ^ 2 by norm_num, Real.sqrt_sq (by norm_num)] |
| 146 | rw [sub_zero] |
| 147 | apply le_of_eq |
| 148 | field_simp |
| 149 | · intro x hxI |
| 150 | have hn := (hne x hxI).ne' |
| 151 | have hd : HasDerivAt (fun x => Real.exp x - κ) (Real.exp x) x := |
| 152 | (Real.hasDerivAt_exp x).sub_const κ |
| 153 | refine ⟨?_, ?_, ?_⟩ |
| 154 | · refine (((hasDerivAt_id x).const_mul t').sub ((hd.log hn).const_mul t)).congr_deriv ?_ |
| 155 | simp |
| 156 | · refine ((((Real.hasDerivAt_exp x).div hd hn).const_mul t).const_sub t').congr_deriv ?_ |
| 157 | field_simp |
| 158 | ring |
| 159 | · have h1 : 1 / 25 ≤ Real.exp x / (Real.exp x - κ) ^ 2 := by |
| 160 | rw [div_le_div_iff₀ (by norm_num) (by have := hne x hxI; positivity)] |
| 161 | nlinarith [hx x hxI, hne x hxI] |
| 162 | calc t * κ / 25 = t * κ * (1 / 25) := by ring |
| 163 | _ ≤ _ := by gcongr |
| 164 | · refine ContinuousOn.mul continuousOn_const (ContinuousOn.div (by fun_prop) (by fun_prop) ?_) |
| 165 | intro x hxI |
| 166 | have := hne x hxI |
| 167 | positivity |
| 168 | · intro x hxI |
| 169 | have hd : HasDerivAt (fun x => Real.exp x - κ) (Real.exp x) x := |
| 170 | (Real.hasDerivAt_exp x).sub_const κ |
| 171 | obtain ⟨e1, e4⟩ := hx x hxI |
| 172 | have e0 := Real.exp_pos x |
| 173 | have pm : ∀ x y : ℝ, |x| ≤ B → |y| ≤ B → |x * y| ≤ B ^ 2 := fun x y hx hy => by |
| 174 | rw [abs_mul, sq]; exact mul_le_mul hx hy (abs_nonneg _) hB.le |
| 175 | obtain ⟨q0, q1, -⟩ := hq (Real.exp x) |
| 176 | obtain ⟨p0, p1, -⟩ := hq (Real.exp x - κ) |
| 177 | refine ⟨?_, ?_, ?_⟩ |
| 178 | · exact (((qw_hasDerivAt _).comp x hd).mul ((qw_hasDerivAt _).comp x (Real.hasDerivAt_exp x))).mul |
| 179 | (Real.hasDerivAt_exp x) |
| 180 | · rw [GE, abs_mul, abs_of_pos e0] |
| 181 | nlinarith [pm _ _ p0 q0, abs_nonneg (qw (Real.exp x - κ) * qw (Real.exp x))] |
| 182 | · have r1 := pm _ _ p1 q0 |
| 183 | have r2 := pm _ _ p0 q1 |
| 184 | have r3 := pm _ _ p0 q0 |
| 185 | have e : (deriv qw (Real.exp x - κ) * Real.exp x * qw (Real.exp x) + |
| 186 | qw (Real.exp x - κ) * (deriv qw (Real.exp x) * Real.exp x)) * Real.exp x + |
| 187 | qw (Real.exp x - κ) * qw (Real.exp x) * Real.exp x = |
| 188 | (deriv qw (Real.exp x - κ) * qw (Real.exp x) + qw (Real.exp x - κ) * deriv qw (Real.exp x)) * |
| 189 | Real.exp x ^ 2 + qw (Real.exp x - κ) * qw (Real.exp x) * Real.exp x := by ring |
| 190 | rw [e] |
| 191 | refine (abs_add_le _ _).trans ?_ |
| 192 | rw [abs_mul, abs_mul _ (Real.exp x), abs_of_pos e0, |
| 193 | abs_of_nonneg (by positivity : 0 ≤ Real.exp x ^ 2)] |
| 194 | have r4 := (abs_add_le (deriv qw (Real.exp x - κ) * qw (Real.exp x)) |
| 195 | (qw (Real.exp x - κ) * deriv qw (Real.exp x))).trans (add_le_add r1 r2) |
| 196 | have s1 : Real.exp x ^ 2 ≤ 16 := by nlinarith |
| 197 | calc _ ≤ (B ^ 2 + B ^ 2) * 16 + B ^ 2 * 4 := by gcongr |
| 198 | _ = _ := by ring |
| 199 | · have c := qw_contDiff.continuous |
| 200 | have c' := qw'_contDiff.continuous |
| 201 | exact Continuous.continuousOn (by fun_prop) |
| 202 | |
| 203 | theorem L32_psi2_bounds {κ t t' v : ℝ} (hκ : |κ| ≤ 1 / 4) (h1 : 3 / 4 ≤ v) (h2 : v ≤ 5) |
| 204 | (hκt : 800 * |t * κ| ≤ t - t') : |
| 205 | (t - t') / 50 ≤ t * ((v - κ)⁻¹) ^ 2 - t' * (v⁻¹) ^ 2 ∧ |
| 206 | t * ((v - κ)⁻¹) ^ 2 - t' * (v⁻¹) ^ 2 ≤ 2 * (t - t') := by |
| 207 | have hκ' := abs_le.1 hκ |
| 208 | have ha0 : 0 ≤ v⁻¹ := inv_nonneg.2 (by linarith) |
| 209 | have hb0 : 0 ≤ (v - κ)⁻¹ := inv_nonneg.2 (by linarith) |
| 210 | have ha2 : v⁻¹ ≤ 4 / 3 := by |
| 211 | rw [inv_le_comm₀ (by linarith) (by norm_num)]; linarith |
| 212 | have ha5 : 1 / 5 ≤ v⁻¹ := by |
| 213 | rw [le_inv_comm₀ (by norm_num) (by linarith)]; linarith |
| 214 | have hb2 : (v - κ)⁻¹ ≤ 2 := by |
| 215 | rw [inv_le_comm₀ (by linarith) (by norm_num)]; linarith |
| 216 | have hab : v⁻¹ - (v - κ)⁻¹ = -κ * v⁻¹ * (v - κ)⁻¹ := by |
| 217 | have : v ≠ 0 := by linarith |
| 218 | have : v - κ ≠ 0 := by linarith |
| 219 | field_simp; ring |
| 220 | generalize v⁻¹ = a at * |
| 221 | generalize (v - κ)⁻¹ = b at * |
| 222 | have e2 : t * b ^ 2 - t' * a ^ 2 = (t - t') * a ^ 2 + t * κ * (a * b * (a + b)) := by |
| 223 | linear_combination (-t * (a + b)) * hab |
| 224 | have hab0 : 0 ≤ a * b := mul_nonneg ha0 hb0 |
| 225 | have h3 : |t * κ * (a * b * (a + b))| ≤ |t * κ| * 9 := by |
| 226 | rw [abs_mul, abs_of_nonneg (by positivity : 0 ≤ a * b * (a + b))] |
| 227 | have : a * b ≤ 8 / 3 := by nlinarith |
| 228 | have : a * b * (a + b) ≤ 9 := by nlinarith |
| 229 | gcongr |
| 230 | have h4 := abs_le.1 h3 |
| 231 | have a1 : 1 / 25 ≤ a ^ 2 := by nlinarith |
| 232 | have a2 : a ^ 2 ≤ 16 / 9 := by nlinarith |
| 233 | have hu : 0 ≤ t - t' := le_trans (by positivity) hκt |
| 234 | have m1 := mul_le_mul_of_nonneg_left a1 hu |
| 235 | have m2 := mul_le_mul_of_nonneg_left a2 hu |
| 236 | rw [e2] |
| 237 | constructor <;> linarith [h4.1, h4.2] |
| 238 | |
| 239 | /-- Large difference: van der Corput. -/ |
| 240 | theorem L32_caseC : ∃ C > 0, ∀ κ t t' Y s : ℝ, |κ| ≤ 1 / 4 → 1 ≤ Y → 0 ≤ s → s ≤ Y / 4 → |
| 241 | t' < t → 800 * |t * κ| ≤ t - t' → t - t' ≤ Y ^ 2 → |
| 242 | ‖∑ n ∈ Ioc ⌊Y⌋₊ ⌊5 * Y⌋₊, HH κ t t' (((n : ℝ) - s) / Y)‖ ≤ |
| 243 | C * (Real.sqrt (t - t') + Y / Real.sqrt (t - t')) := by |
| 244 | obtain ⟨B, hB, hq⟩ := qw_bound |
| 245 | obtain ⟨C, hC, hT⟩ := T7_second_derivative_sum |
| 246 | refine ⟨C * 100 * (9 * B ^ 2) * 20, by positivity, fun κ t t' Y s hκ hY hs hsY htt hκt hu => ?_⟩ |
| 247 | have hκ' := abs_le.1 hκ |
| 248 | have hY0 : 0 < Y := by linarith |
| 249 | have hu0 : 0 < t - t' := by linarith |
| 250 | have hπ := Real.pi_pos |
| 251 | set w := Real.sqrt (100 * Real.pi) with hw |
| 252 | have hw2 : w ^ 2 = 100 * Real.pi := Real.sq_sqrt (by positivity) |
| 253 | have hw0 : 0 < w := Real.sqrt_pos.2 (by positivity) |
| 254 | have hw1 : 1 ≤ w := by nlinarith [Real.pi_gt_three] |
| 255 | have hw20 : w ≤ 20 := by nlinarith [Real.pi_lt_four] |
| 256 | set r := Real.sqrt (t - t') with hr |
| 257 | have hr2 : r ^ 2 = t - t' := Real.sq_sqrt hu0.le |
| 258 | have hr0 : 0 < r := Real.sqrt_pos.2 hu0 |
| 259 | have hlam : Real.sqrt ((t - t') / (100 * Real.pi * Y ^ 2)) = r / (w * Y) := by |
| 260 | rw [Real.sqrt_div hu0.le, Real.sqrt_mul (by positivity), Real.sqrt_sq hY0.le] |
| 261 | have hl : ∀ x : ℝ, HasDerivAt (fun x : ℝ => (x - s) / Y) (1 / Y) x := fun x => |
| 262 | ((hasDerivAt_id x).sub_const s).div_const Y |
| 263 | have hv : ∀ x ∈ Set.Icc Y (5 * Y), 3 / 4 ≤ (x - s) / Y ∧ (x - s) / Y ≤ 5 := fun x hx => |
| 264 | ⟨by rw [le_div_iff₀ hY0]; linarith [hx.1], by rw [div_le_iff₀ hY0]; linarith [hx.2]⟩ |
| 265 | have key := hT Y (5 * Y) ((t - t') / (100 * Real.pi * Y ^ 2)) 100 (B ^ 2) (2 * B ^ 2 / Y) |
| 266 | (fun x => (t' * Real.log ((x - s) / Y) - t * Real.log ((x - s) / Y - κ)) / (2 * Real.pi)) |
| 267 | (fun x => (t' * ((x - s) / Y)⁻¹ - t * ((x - s) / Y - κ)⁻¹) * (1 / Y) / (2 * Real.pi)) |
| 268 | (fun x => (t * (((x - s) / Y - κ)⁻¹) ^ 2 - t' * (((x - s) / Y)⁻¹) ^ 2) * (1 / Y) * (1 / Y) / |
| 269 | (2 * Real.pi)) |
| 270 | (fun x => qw ((x - s) / Y - κ) * qw ((x - s) / Y)) |
| 271 | (fun x => (deriv qw ((x - s) / Y - κ) * qw ((x - s) / Y) + |
| 272 | qw ((x - s) / Y - κ) * deriv qw ((x - s) / Y)) * (1 / Y)) |
| 273 | hY0.le (by linarith) (by positivity) ?_ (by norm_num) (by positivity) (by positivity) ?_ ?_ |
| 274 | · have e : ∀ n ∈ Ioc ⌊Y⌋₊ ⌊5 * Y⌋₊, HH κ t t' (((n : ℝ) - s) / Y) = |
| 275 | ((qw (((n : ℝ) - s) / Y - κ) * qw (((n : ℝ) - s) / Y) : ℝ) : ℂ) * |
| 276 | ee ((t' * Real.log (((n : ℝ) - s) / Y) - t * Real.log (((n : ℝ) - s) / Y - κ)) / |
| 277 | (2 * Real.pi)) := fun n _ => by |
| 278 | rw [HH, ee, mul_div_cancel₀ _ (by positivity)] |
| 279 | rw [sum_congr rfl e] |
| 280 | refine key.trans ?_ |
| 281 | rw [hlam] |
| 282 | have e1 : B ^ 2 + 2 * B ^ 2 / Y * (5 * Y - Y) = 9 * B ^ 2 := by field_simp; ring |
| 283 | have e2 : 1 / (r / (w * Y)) = w * (Y / r) := by field_simp |
| 284 | have e3 : (5 * Y - Y) * (r / (w * Y)) = 4 * r / w := by field_simp; ring |
| 285 | rw [e1, e2, e3, mul_assoc (C * 100 * (9 * B ^ 2))] |
| 286 | refine mul_le_mul_of_nonneg_left ?_ (by positivity) |
| 287 | have h4 : 4 * r / w ≤ 20 * r := by |
| 288 | rw [div_le_iff₀ hw0]; nlinarith |
| 289 | have h5 : w * (Y / r) ≤ 20 * (Y / r) := by gcongr |
| 290 | linarith |
| 291 | · rw [div_le_one (by positivity)] |
| 292 | nlinarith [Real.pi_gt_three, sq_nonneg Y] |
| 293 | · intro x hx |
| 294 | obtain ⟨h1, h2⟩ := hv x hx |
| 295 | have n1 : (x - s) / Y ≠ 0 := by linarith |
| 296 | have n2 : (x - s) / Y - κ ≠ 0 := by linarith |
| 297 | refine ⟨?_, ?_, ?_⟩ |
| 298 | · exact ((L32_psi_deriv n1 n2).comp x (hl x)).div_const _ |
| 299 | · exact (((L32_psi_deriv2 n1 n2).comp x (hl x)).mul_const _).div_const _ |
| 300 | · obtain ⟨l1, l2⟩ := L32_psi2_bounds hκ h1 h2 hκt |
| 301 | constructor |
| 302 | · calc (t - t') / (100 * Real.pi * Y ^ 2) = (t - t') / 50 * (1 / Y) * (1 / Y) / (2 * Real.pi) := by |
| 303 | field_simp; ring |
| 304 | _ ≤ _ := by gcongr |
| 305 | · calc _ ≤ 2 * (t - t') * (1 / Y) * (1 / Y) / (2 * Real.pi) := by gcongr |
| 306 | _ = 100 * ((t - t') / (100 * Real.pi * Y ^ 2)) := by field_simp |
| 307 | · intro x hx |
| 308 | have pm : ∀ x y : ℝ, |x| ≤ B → |y| ≤ B → |x * y| ≤ B ^ 2 := fun x y hx hy => by |
| 309 | rw [abs_mul, sq]; exact mul_le_mul hx hy (abs_nonneg _) hB.le |
| 310 | obtain ⟨q0, q1, -⟩ := hq ((x - s) / Y) |
| 311 | obtain ⟨p0, p1, -⟩ := hq ((x - s) / Y - κ) |
| 312 | refine ⟨(Gq_deriv κ _).comp x (hl x), pm _ _ p0 q0, ?_⟩ |
| 313 | rw [abs_mul, abs_of_pos (one_div_pos.2 hY0), mul_one_div] |
| 314 | have := (abs_add_le (deriv qw ((x - s) / Y - κ) * qw ((x - s) / Y)) |
| 315 | (qw ((x - s) / Y - κ) * deriv qw ((x - s) / Y))).trans (add_le_add (pm _ _ p1 q0) (pm _ _ p0 q1)) |
| 316 | gcongr |
| 317 | linarith |
| 318 | |
| 319 | end E424 |
| 320 | |