goldbach-spectral-bridge
Li and Liu's GRH + S ⇒ Goldbach in Lean, checked against the paper by Comparator: clean it up together, and settle S
| 1 | module |
| 2 | |
| 3 | public import ConditionalGoldbach.Proofs.HardyEvaluation |
| 4 | public import ConditionalGoldbach.Proofs.BetaIntegrals |
| 5 | |
| 6 | /-! Exact evaluation of the strip reproducing kernel, including its normalization. -/ |
| 7 | public section |
| 8 | |
| 9 | set_option autoImplicit false |
| 10 | noncomputable section |
| 11 | open MeasureTheory Filter Set Complex |
| 12 | open scoped Topology ComplexConjugate |
| 13 | namespace ConditionalGoldbach |
| 14 | |
| 15 | lemma euler_reflection_integral {v : ℂ} (hv : 0 < v.re) (hv' : v.re < 1) : |
| 16 | (∫ t in Ioi (0 : ℝ), (t : ℂ) ^ (v - 1) / (1 + t)) = |
| 17 | (Real.pi : ℂ) / Complex.sin (Real.pi * v) := by |
| 18 | have he1 : (-1 / 2 - (1 / 2 - v) : ℂ) = v - 1 := by ring |
| 19 | have he2 : (-1 / 2 - (1 / 2 : ℂ)) = -1 := by ring |
| 20 | have he3 : (1 / 2 - (1 / 2 - v) : ℂ) = v := by ring |
| 21 | have he4 : (1 / 2 - v + (1 / 2 : ℂ)) = 1 - v := by ring |
| 22 | have hi := beta_difference_integral 1 (by norm_num) (1 / 2 - v) (1 / 2) |
| 23 | simp only [he1, he2, he3, he4, Complex.ofReal_one, Complex.one_cpow, one_mul, |
| 24 | Complex.cpow_neg_one, ← div_eq_mul_inv] at hi |
| 25 | have hi' : (∫ t in Ioi (0 : ℝ), (t : ℂ) ^ (v - 1) / (1 + t)) = |
| 26 | betaIntegral v (1 - v) := by |
| 27 | convert hi using 1 |
| 28 | apply setIntegral_congr_fun measurableSet_Ioi |
| 29 | intro t ht |
| 30 | dsimp only |
| 31 | rw [add_comm (1 : ℂ)] |
| 32 | rw [hi', Complex.betaIntegral_eq_Gamma_mul_div v (1 - v) hv (by simp; linarith), |
| 33 | add_sub_cancel, Complex.Gamma_one, div_one, Complex.Gamma_mul_Gamma_one_sub] |
| 34 | |
| 35 | lemma exp_logistic_substitution (v : ℂ) (x : ℝ) : |
| 36 | Real.exp x • (((Real.exp x : ℝ) : ℂ) ^ (v - 1) / (1 + Real.exp x)) = |
| 37 | Complex.exp (v * x) / (1 + Real.exp x) := by |
| 38 | rw [Complex.real_smul, ← mul_div_assoc] |
| 39 | congr 1 |
| 40 | rw [Complex.cpow_def_of_ne_zero (Complex.ofReal_ne_zero.mpr (Real.exp_pos x).ne'), |
| 41 | ← Complex.ofReal_log (Real.exp_pos x).le, Real.log_exp, Complex.ofReal_exp, |
| 42 | ← Complex.exp_add] |
| 43 | congr 1 |
| 44 | ring |
| 45 | |
| 46 | lemma exp_logistic_integral {v : ℂ} (hv : 0 < v.re) (hv' : v.re < 1) : |
| 47 | (∫ x : ℝ, Complex.exp (v * x) / (1 + Real.exp x)) = |
| 48 | (Real.pi : ℂ) / Complex.sin (Real.pi * v) := by |
| 49 | rw [← euler_reflection_integral hv hv', ← integral_comp_exp] |
| 50 | apply integral_congr_ae |
| 51 | exact Eventually.of_forall (fun x => (exp_logistic_substitution v x).symm) |
| 52 | |
| 53 | lemma hardy_evaluation_integrand_scale (a b : ℝ) (u : ℂ) (τ : ℝ) (hab : a < b) : |
| 54 | Complex.exp (u * τ) / (hardyWeight a b τ : ℂ) = |
| 55 | Complex.exp (((u - 2 * a) / (2 * (b - a : ℝ))) * ((2 * (b - a) * τ : ℝ) : ℂ)) / |
| 56 | (1 + Real.exp (2 * (b - a) * τ)) := by |
| 57 | have hd : (2 * (b - a : ℝ) : ℂ) ≠ 0 := by |
| 58 | exact_mod_cast (show 2 * (b - a) ≠ 0 by linarith) |
| 59 | have he : ((u - 2 * a) / (2 * (b - a : ℝ))) * ((2 * (b - a) * τ : ℝ) : ℂ) = |
| 60 | u * τ - (2 * a * τ : ℝ) := by |
| 61 | have hba : (b : ℂ) - a ≠ 0 := by exact_mod_cast (sub_ne_zero.mpr hab.ne.symm) |
| 62 | push_cast |
| 63 | field_simp |
| 64 | rw [he, Complex.exp_sub] |
| 65 | have ha : (Real.exp (2 * a * τ) : ℂ) ≠ 0 := |
| 66 | Complex.ofReal_ne_zero.mpr (Real.exp_pos _).ne' |
| 67 | have hw : (hardyWeight a b τ : ℂ) = |
| 68 | (Real.exp (2 * a * τ) : ℂ) * (1 + Real.exp (2 * (b - a) * τ)) := by |
| 69 | unfold hardyWeight |
| 70 | push_cast |
| 71 | rw [mul_add, mul_one, ← Complex.exp_add] |
| 72 | congr 2 |
| 73 | ring |
| 74 | rw [hw, ← Complex.ofReal_exp, div_div] |
| 75 | |
| 76 | lemma hardy_evaluation_integral {a b : ℝ} (hab : a < b) (u : ℂ) |
| 77 | (hu : 2 * a < u.re) (hu' : u.re < 2 * b) : |
| 78 | (∫ τ : ℝ, Complex.exp (u * τ) / (hardyWeight a b τ : ℂ)) = |
| 79 | (2 * (b - a : ℝ) : ℂ)⁻¹ * |
| 80 | ((Real.pi : ℂ) / Complex.sin (Real.pi * ((u - 2 * a) / (2 * (b - a : ℝ))))) := by |
| 81 | let v : ℂ := (u - 2 * a) / (2 * (b - a : ℝ)) |
| 82 | have hd : 0 < 2 * (b - a) := by linarith |
| 83 | have hre : v.re = (u.re - 2 * a) / (2 * (b - a)) := by |
| 84 | dsimp [v] |
| 85 | have hc : (2 : ℂ) * ((b - a : ℝ) : ℂ) = ((2 * (b - a) : ℝ) : ℂ) := by push_cast; rfl |
| 86 | rw [hc, Complex.div_ofReal_re] |
| 87 | simp |
| 88 | have hv : 0 < v.re := by rw [hre]; exact div_pos (by linarith) hd |
| 89 | have hv' : v.re < 1 := by rw [hre]; exact (div_lt_one hd).mpr (by linarith) |
| 90 | calc |
| 91 | _ = ∫ τ : ℝ, Complex.exp (v * ((2 * (b - a) * τ : ℝ) : ℂ)) / |
| 92 | (1 + Real.exp (2 * (b - a) * τ)) := by |
| 93 | apply integral_congr_ae |
| 94 | exact Eventually.of_forall (fun τ => hardy_evaluation_integrand_scale a b u τ hab) |
| 95 | _ = |(2 * (b - a))⁻¹| • ∫ x : ℝ, Complex.exp (v * x) / (1 + Real.exp x) := |
| 96 | Measure.integral_comp_mul_left |
| 97 | (fun x : ℝ => Complex.exp (v * x) / (1 + Real.exp x)) (2 * (b - a)) |
| 98 | _ = _ := by |
| 99 | rw [abs_of_pos (inv_pos.mpr hd), exp_logistic_integral hv hv', Complex.real_smul, |
| 100 | Complex.ofReal_inv] |
| 101 | simp only [Complex.ofReal_mul, Complex.ofReal_ofNat, v] |
| 102 | |
| 103 | lemma evaluationVector_reproducingKernel {a b : ℝ} (hab : a < b) {s z : ℂ} |
| 104 | (hs : s ∈ strip a b) (hz : z ∈ strip a b) : |
| 105 | fourierLaplace (evaluationVector z : HardySpace a b) s = reproducingKernel a b s z := by |
| 106 | have hu : 2 * a < (s + conj z).re := by |
| 107 | simp only [Complex.add_re, Complex.conj_re] |
| 108 | linarith [hs.1, hz.1] |
| 109 | have hu' : (s + conj z).re < 2 * b := by |
| 110 | simp only [Complex.add_re, Complex.conj_re] |
| 111 | linarith [hs.2, hz.2] |
| 112 | rw [evaluationVector_fourierLaplace_integral hs hz, hardy_evaluation_integral hab _ hu hu'] |
| 113 | unfold reproducingKernel |
| 114 | have hc : (2 * Real.pi : ℂ)⁻¹ * (2 * (b - a : ℝ) : ℂ)⁻¹ * Real.pi = |
| 115 | (4 * (b - a : ℝ) : ℂ)⁻¹ := by |
| 116 | have hp : (Real.pi : ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr Real.pi_ne_zero |
| 117 | have hd : ((b - a : ℝ) : ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr (sub_ne_zero.mpr hab.ne.symm) |
| 118 | field_simp; ring |
| 119 | rw [← mul_assoc, ← mul_div_assoc, hc] |
| 120 | congr 2 |
| 121 | ring |
| 122 | |
| 123 | lemma reproducingKernel_diag {a b : ℝ} (hab : a < b) (s : ℂ) : |
| 124 | reproducingKernel a b s s = |
| 125 | ((1 / (4 * (b - a) * Real.sin (Real.pi * (s.re - a) / (b - a))) : ℝ) : ℂ) := by |
| 126 | have hs : s + conj s = (2 * s.re : ℝ) := by apply Complex.ext <;> simp; ring |
| 127 | unfold reproducingKernel |
| 128 | rw [hs] |
| 129 | have he : (Real.pi : ℂ) * ((2 * s.re : ℝ) - 2 * a) / (2 * (b - a : ℝ)) = |
| 130 | ((Real.pi * (s.re - a) / (b - a) : ℝ) : ℂ) := by |
| 131 | have hd : (b : ℂ) - a ≠ 0 := by exact_mod_cast (sub_ne_zero.mpr hab.ne.symm) |
| 132 | push_cast |
| 133 | field_simp |
| 134 | rw [he, ← Complex.ofReal_sin] |
| 135 | simp only [Complex.ofReal_mul, Complex.ofReal_sub, |
| 136 | Complex.ofReal_ofNat, Complex.ofReal_inv, one_mul, mul_inv, div_eq_mul_inv] |
| 137 | |
| 138 | theorem proposition_5_4_exact_norm (a b : ℝ) (hab : a < b) |
| 139 | (s : ℂ) (hs : s ∈ strip a b) : |
| 140 | ‖(evaluationVector s : HardySpace a b)‖ ^ 2 = |
| 141 | 1 / (4 * (b - a) * Real.sin (Real.pi * (s.re - a) / (b - a))) := by |
| 142 | have hv : (fourierLaplace (evaluationVector s : HardySpace a b) s).re = |
| 143 | ‖(evaluationVector s : HardySpace a b)‖ ^ 2 := by |
| 144 | rw [evaluationVector_spec hs, paperInner] |
| 145 | exact inner_self_eq_norm_sq (𝕜 := ℂ) (evaluationVector s : HardySpace a b) |
| 146 | rw [← hv, evaluationVector_reproducingKernel hab hs hs, reproducingKernel_diag hab] |
| 147 | rfl |
| 148 | |
| 149 | lemma sin_pi_mul_lower {t : ℝ} (ht : 0 ≤ t) (ht' : t ≤ 1) : |
| 150 | 2 * min t (1 - t) ≤ Real.sin (Real.pi * t) := by |
| 151 | by_cases hhalf : t ≤ 1 / 2 |
| 152 | · rw [min_eq_left (by linarith)] |
| 153 | convert Real.le_sin_mul (show 0 ≤ 2 * t by linarith) (show 2 * t ≤ 1 by linarith) using 1 |
| 154 | congr 1 |
| 155 | ring |
| 156 | · rw [min_eq_right (by linarith)] |
| 157 | have h := Real.le_sin_mul (show 0 ≤ 2 * (1 - t) by linarith) |
| 158 | (show 2 * (1 - t) ≤ 1 by linarith) |
| 159 | have he : Real.pi / 2 * (2 * (1 - t)) = Real.pi - Real.pi * t := by ring |
| 160 | rwa [he, Real.sin_pi_sub] at h |
| 161 | |
| 162 | lemma evaluationVector_norm_sq_le {a b : ℝ} (hab : a < b) {s : ℂ} |
| 163 | (hs : s ∈ strip a b) : |
| 164 | ‖(evaluationVector s : HardySpace a b)‖ ^ 2 ≤ 1 / (8 * pointDistance a b s) := by |
| 165 | rw [proposition_5_4_exact_norm a b hab s hs] |
| 166 | let t : ℝ := (s.re - a) / (b - a) |
| 167 | have hd : 0 < b - a := sub_pos.mpr hab |
| 168 | have ht : 0 < t := div_pos (sub_pos.mpr hs.1) hd |
| 169 | have ht' : t < 1 := (div_lt_one hd).mpr (by linarith [hs.2]) |
| 170 | have hsine := sin_pi_mul_lower ht.le ht'.le |
| 171 | have hdist : pointDistance a b s = (b - a) * min t (1 - t) := by |
| 172 | rw [mul_min_of_nonneg _ _ hd.le] |
| 173 | unfold pointDistance |
| 174 | congr 1 <;> dsimp [t] <;> field_simp; ring |
| 175 | have hp : 0 < pointDistance a b s := lt_min (sub_pos.mpr hs.1) (sub_pos.mpr hs.2) |
| 176 | have hden : 8 * pointDistance a b s ≤ |
| 177 | 4 * (b - a) * Real.sin (Real.pi * (s.re - a) / (b - a)) := by |
| 178 | rw [hdist] |
| 179 | have h := mul_le_mul_of_nonneg_left hsine (show 0 ≤ 4 * (b - a) by positivity) |
| 180 | dsimp [t] at h |
| 181 | rw [← mul_div_assoc] at h |
| 182 | nlinarith |
| 183 | exact one_div_le_one_div_of_le (by positivity) hden |
| 184 | |
| 185 | lemma evaluationVector_norm_product_le {a b : ℝ} (hab : a < b) {s z : ℂ} |
| 186 | (hs : s ∈ strip a b) (hz : z ∈ strip a b) : |
| 187 | ‖(evaluationVector s : HardySpace a b)‖ * ‖(evaluationVector z : HardySpace a b)‖ ≤ |
| 188 | 1 / (8 * Real.sqrt (pointDistance a b s * pointDistance a b z)) := by |
| 189 | have hds : 0 < pointDistance a b s := lt_min (sub_pos.mpr hs.1) (sub_pos.mpr hs.2) |
| 190 | have hdz : 0 < pointDistance a b z := lt_min (sub_pos.mpr hz.1) (sub_pos.mpr hz.2) |
| 191 | have hn := mul_le_mul (evaluationVector_norm_sq_le hab hs) (evaluationVector_norm_sq_le hab hz) |
| 192 | (sq_nonneg _) (by positivity : 0 ≤ 1 / (8 * pointDistance a b s)) |
| 193 | have hr := Real.sqrt_le_sqrt hn |
| 194 | rw [← mul_pow, Real.sqrt_sq (mul_nonneg (norm_nonneg _) (norm_nonneg _))] at hr |
| 195 | calc |
| 196 | _ ≤ Real.sqrt ((1 / (8 * pointDistance a b s)) * (1 / (8 * pointDistance a b z))) := hr |
| 197 | _ = _ := by |
| 198 | have he : (1 / (8 * pointDistance a b s)) * (1 / (8 * pointDistance a b z)) = |
| 199 | 1 / ((8 : ℝ) ^ 2 * (pointDistance a b s * pointDistance a b z)) := by ring |
| 200 | rw [he, Real.sqrt_div zero_le_one, Real.sqrt_one, Real.sqrt_mul (by positivity), |
| 201 | Real.sqrt_sq (by norm_num : (0 : ℝ) ≤ 8)] |
| 202 | |
| 203 | end ConditionalGoldbach |
