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.SpectralPerronFubini |
| 4 | public import ConditionalGoldbach.Proofs.GammaDifference |
| 5 | |
| 6 | /-! Absolute summation of the Gamma resolvents in the smoothed Perron integral. -/ |
| 7 | public section |
| 8 | |
| 9 | set_option autoImplicit false |
| 10 | noncomputable section |
| 11 | open MeasureTheory Filter Set Complex |
| 12 | open scoped Topology ComplexConjugate BigOperators |
| 13 | namespace ConditionalGoldbach |
| 14 | |
| 15 | lemma two_bounds_geometric_mean {d v m : ℝ} (hd : 0 ≤ d) (hv : 0 < v) (hm : 0 < m) |
| 16 | (h1 : d ≤ 2/m) (h2 : d ≤ v/m^2) : |
| 17 | d ≤ 2*v^(1/2 : ℝ)*m^(-(3/2 : ℝ)) := by |
| 18 | have hh := mul_le_mul h1 h2 hd (by positivity : 0 ≤ 2/m) |
| 19 | have hs : d^2 ≤ 2*v/m^3 := by convert hh using 1 <;> ring |
| 20 | have hpv : (v^(1/2 : ℝ))^2 = v := by |
| 21 | rw [← Real.rpow_natCast, ← Real.rpow_mul hv.le] |
| 22 | norm_num |
| 23 | have hpm : (m^(-(3/2 : ℝ)))^2 = m⁻¹^3 := by |
| 24 | rw [← Real.rpow_natCast, ← Real.rpow_mul hm.le] |
| 25 | norm_num [Real.rpow_neg hm.le, inv_pow] |
| 26 | apply (sq_le_sq₀ hd (by positivity)).mp |
| 27 | rw [mul_pow,mul_pow,hpv,hpm] |
| 28 | have hpos : 0 ≤ v/m^3 := by positivity |
| 29 | simp only [inv_pow, ← div_eq_mul_inv] |
| 30 | calc |
| 31 | d^2 ≤ 2*(v/m^3) := by convert hs using 1; ring |
| 32 | _ ≤ 4*(v/m^3) := by nlinarith |
| 33 | _ = _ := by ring |
| 34 | |
| 35 | lemma gamma_perron_resolvent_bound {X c : ℝ} (hX : 1 < X) (hc : 0 < c) |
| 36 | {u : ℂ} (hu : 1/2 ≤ u.re) (n : ℕ) (t : ℝ) : |
| 37 | ‖smoothedPerronKernel X (line c (2*Real.pi*t)) * |
| 38 | ((line c (2*Real.pi*t)+(u+1+2*(n : ℂ)))⁻¹-(u+1+2*(n : ℂ))⁻¹)‖ ≤ |
| 39 | (2*perronKernelNormConstant X c*(c⁻¹+(2*Real.pi)⁻¹)^(3/2 : ℝ)) * |
| 40 | (((n : ℝ)+1)^(-(3/2 : ℝ)) * (1+|t|)^(-(3/2 : ℝ))) := by |
| 41 | let v := line c (2*Real.pi*t) |
| 42 | let a := u+1+2*(n : ℂ) |
| 43 | let m : ℝ := (n : ℝ)+1 |
| 44 | have hm : 0 < m := by dsimp [m]; positivity |
| 45 | have hAn : m ≤ ‖a‖ := by |
| 46 | have hh := Complex.re_le_norm a |
| 47 | have hre : a.re = u.re+1+2*(n : ℝ) := by simp [a] |
| 48 | rw [hre] at hh |
| 49 | dsimp [m] |
| 50 | nlinarith [Nat.cast_nonneg (α := ℝ) n] |
| 51 | have hBn : m ≤ ‖v+a‖ := by |
| 52 | have hh := Complex.re_le_norm (v+a) |
| 53 | have hre : (v+a).re = c+(u.re+1+2*(n : ℝ)) := by simp [a,v,line] |
| 54 | rw [hre] at hh |
| 55 | dsimp [m] |
| 56 | nlinarith [Nat.cast_nonneg (α := ℝ) n] |
| 57 | have hA : a ≠ 0 := norm_pos_iff.mp (hm.trans_le hAn) |
| 58 | have hB : v+a ≠ 0 := norm_pos_iff.mp (hm.trans_le hBn) |
| 59 | have hv : 0 < ‖v‖ := by |
| 60 | have hh := Complex.re_le_norm v |
| 61 | have hre : v.re = c := by simp [v,line] |
| 62 | rw [hre] at hh |
| 63 | exact hc.trans_le hh |
| 64 | have h1 : ‖(v+a)⁻¹-a⁻¹‖ ≤ 2/m := by |
| 65 | apply (norm_sub_le _ _).trans |
| 66 | rw [norm_inv,norm_inv] |
| 67 | have hh1 := inv_anti₀ hm hAn |
| 68 | have hh2 := inv_anti₀ hm hBn |
| 69 | simp only [div_eq_mul_inv] |
| 70 | linarith |
| 71 | have h2 : ‖(v+a)⁻¹-a⁻¹‖ ≤ ‖v‖/m^2 := by |
| 72 | rw [inv_sub_inv' hB hA,show a-(v+a) = -v by ring,norm_mul,norm_mul,norm_neg,norm_inv,norm_inv] |
| 73 | have hh1 := inv_anti₀ hm hAn |
| 74 | have hh2 := inv_anti₀ hm hBn |
| 75 | calc |
| 76 | _ ≤ m⁻¹*‖v‖*m⁻¹ := by gcongr |
| 77 | _ = _ := by ring_nf |
| 78 | have hmean := two_bounds_geometric_mean (norm_nonneg ((v+a)⁻¹-a⁻¹)) hv hm h1 h2 |
| 79 | have hK := smoothedPerronKernel_norm_bound hX c t |
| 80 | have hN := perron_line_inverse_bound hc t |
| 81 | have hC : 0 < c⁻¹+(2*Real.pi)⁻¹ := by positivity |
| 82 | have hpow := Real.rpow_le_rpow (norm_nonneg (v⁻¹)) hN (by norm_num : (0 : ℝ) ≤ 3/2) |
| 83 | have hid : ‖v⁻¹‖^2 * ‖v‖^(1/2 : ℝ) = ‖v⁻¹‖^(3/2 : ℝ) := by |
| 84 | rw [norm_inv, ← Real.rpow_two, Real.inv_rpow (norm_nonneg v), ← Real.rpow_neg (norm_nonneg v), |
| 85 | ← Real.rpow_add hv] |
| 86 | norm_num |
| 87 | rw [Real.inv_rpow (norm_nonneg v), Real.rpow_neg (norm_nonneg v)] |
| 88 | rw [norm_mul] |
| 89 | calc |
| 90 | _ ≤ (perronKernelNormConstant X c*‖v⁻¹‖^2) * (2*‖v‖^(1/2 : ℝ)*m^(-(3/2 : ℝ))) := |
| 91 | mul_le_mul hK hmean (norm_nonneg _) (by have := (perronKernelNormConstant_pos hX c).le; positivity) |
| 92 | _ = 2*perronKernelNormConstant X c*‖v⁻¹‖^(3/2 : ℝ)*m^(-(3/2 : ℝ)) := by |
| 93 | calc |
| 94 | _ = 2*perronKernelNormConstant X c*(‖v⁻¹‖^2*‖v‖^(1/2 : ℝ))*m^(-(3/2 : ℝ)) := by ring |
| 95 | _ = _ := by rw [hid] |
| 96 | _ ≤ 2*perronKernelNormConstant X c*((c⁻¹+(2*Real.pi)⁻¹)*(1+|t|)⁻¹)^(3/2 : ℝ)*m^(-(3/2 : ℝ)) := by |
| 97 | exact mul_le_mul_of_nonneg_right |
| 98 | (mul_le_mul_of_nonneg_left hpow |
| 99 | (by have := (perronKernelNormConstant_pos hX c).le; positivity)) |
| 100 | (Real.rpow_nonneg hm.le _) |
| 101 | _ = _ := by |
| 102 | rw [Real.mul_rpow hC.le (by positivity),Real.inv_rpow (by positivity : 0 ≤ 1+|t|), |
| 103 | ← Real.rpow_neg (by positivity : 0 ≤ 1+|t|)] |
| 104 | dsimp [m] |
| 105 | ring |
| 106 | |
| 107 | |
| 108 | lemma gamma_perron_resolvent_sum {X c : ℝ} (hX : 1 < X) (hc : 0 < c) |
| 109 | {u : ℂ} (hu : 1/2 ≤ u.re) : |
| 110 | Integrable (fun t : ℝ => ∑' n : ℕ, smoothedPerronKernel X (line c (2*Real.pi*t)) * |
| 111 | ((line c (2*Real.pi*t)+(u+1+2*(n : ℂ)))⁻¹-(u+1+2*(n : ℂ))⁻¹)) ∧ |
| 112 | (∫ t : ℝ, ∑' n : ℕ, smoothedPerronKernel X (line c (2*Real.pi*t)) * |
| 113 | ((line c (2*Real.pi*t)+(u+1+2*(n : ℂ)))⁻¹-(u+1+2*(n : ℂ))⁻¹)) = |
| 114 | ∑' n : ℕ, smoothedPerronKernel X (-(u+1+2*(n : ℂ))) := by |
| 115 | let F := fun (n : ℕ) (t : ℝ) => smoothedPerronKernel X (line c (2*Real.pi*t)) * |
| 116 | ((line c (2*Real.pi*t)+(u+1+2*(n : ℂ)))⁻¹-(u+1+2*(n : ℂ))⁻¹) |
| 117 | have ha (n : ℕ) : 0 < (u+1+2*(n : ℂ)).re := by |
| 118 | simp only [add_re, mul_re, natCast_re, natCast_im] |
| 119 | norm_num |
| 120 | linarith [Nat.cast_nonneg (α := ℝ) n] |
| 121 | have hF (n : ℕ) : Integrable (F n) := |
| 122 | (perron_resolvent_difference_integral hX hc (ha n)).1 |
| 123 | let B := 2*perronKernelNormConstant X c*(c⁻¹+(2*Real.pi)⁻¹)^(3/2 : ℝ) |
| 124 | let I := ∫ t : ℝ, (1+|t|)^(-(3/2 : ℝ)) |
| 125 | have hw : Summable (fun n : ℕ => ((n : ℝ)+1)^(-(3/2 : ℝ))) := by |
| 126 | simpa only [Nat.cast_add, Nat.cast_one] using |
| 127 | (summable_nat_add_iff (f := fun n : ℕ => (n : ℝ)^(-(3/2 : ℝ))) 1).mpr |
| 128 | (Real.summable_nat_rpow.mpr (by norm_num)) |
| 129 | have hsum : Summable (fun n : ℕ => ∫ t : ℝ, ‖F n t‖) := by |
| 130 | apply (hw.mul_left (B*I)).of_nonneg_of_le |
| 131 | (fun n => integral_nonneg (fun t => norm_nonneg _)) |
| 132 | intro n |
| 133 | calc |
| 134 | _ ≤ ∫ t : ℝ, (B*((n : ℝ)+1)^(-(3/2 : ℝ)))*(1+|t|)^(-(3/2 : ℝ)) := by |
| 135 | apply integral_mono (hF n).norm (hardy_decay_integrable.const_mul _) |
| 136 | intro t |
| 137 | simpa only [F, B, mul_assoc] using gamma_perron_resolvent_bound hX hc hu n t |
| 138 | _ = _ := by rw [integral_const_mul]; dsimp [I]; ring |
| 139 | refine ⟨integrable_tsum_of_summable_norm_integral hF hsum, ?_⟩ |
| 140 | rw [← integral_tsum_of_summable_integral_norm hF hsum] |
| 141 | exact tsum_congr (fun n => (perron_resolvent_difference_integral hX hc (ha n)).2) |
| 142 | |
| 143 | lemma gamma_half_difference_resolvents {u v : ℂ} (hu : 1/2 ≤ u.re) (hv : 0 ≤ v.re) : |
| 144 | (logDeriv Gamma ((u+v+1)/2)-logDeriv Gamma ((u+1)/2))/2 = |
| 145 | -(∑' n : ℕ, ((v+(u+1+2*(n : ℂ)))⁻¹-(u+1+2*(n : ℂ))⁻¹)) := by |
| 146 | have hu' : 0 < ((u+v+1)/2).re := by simp; linarith |
| 147 | have hv' : 0 < ((u+1)/2).re := by simp; linarith |
| 148 | have h := (Gamma_logDeriv_difference_hasSum hu' hv').div_const (2 : ℂ) |
| 149 | have he (n : ℕ) : (1/((u+1)/2+(n : ℂ))-1/((u+v+1)/2+(n : ℂ)))/2 = |
| 150 | -((v+(u+1+2*(n : ℂ)))⁻¹-(u+1+2*(n : ℂ))⁻¹) := by |
| 151 | have h1 : (u+1)/2+(n : ℂ) = (u+1+2*(n : ℂ))/2 := by ring |
| 152 | have h2 : (u+v+1)/2+(n : ℂ) = (v+(u+1+2*(n : ℂ)))/2 := by ring |
| 153 | rw [h1,h2] |
| 154 | simp only [one_div, inv_div] |
| 155 | ring |
| 156 | simp_rw [he] at h |
| 157 | exact h.tsum_eq.symm.trans tsum_neg |
| 158 | |
| 159 | lemma gamma_perron_integral_eq {X c : ℝ} (hX : 1 < X) (hc : 0 < c) |
| 160 | {u : ℂ} (hu : 1/2 ≤ u.re) : |
| 161 | Integrable (fun t : ℝ => smoothedPerronKernel X (line c (2*Real.pi*t)) * |
| 162 | ((logDeriv Gamma ((u+line c (2*Real.pi*t)+1)/2)-logDeriv Gamma ((u+1)/2))/2)) ∧ |
| 163 | (∫ t : ℝ, smoothedPerronKernel X (line c (2*Real.pi*t)) * |
| 164 | ((logDeriv Gamma ((u+line c (2*Real.pi*t)+1)/2)-logDeriv Gamma ((u+1)/2))/2)) = |
| 165 | -(∑' n : ℕ, smoothedPerronKernel X (-(u+1+2*(n : ℂ)))) := by |
| 166 | have hh := gamma_perron_resolvent_sum hX hc hu |
| 167 | have he (t : ℝ) : smoothedPerronKernel X (line c (2*Real.pi*t)) * |
| 168 | ((logDeriv Gamma ((u+line c (2*Real.pi*t)+1)/2)-logDeriv Gamma ((u+1)/2))/2) = |
| 169 | -(∑' n : ℕ, smoothedPerronKernel X (line c (2*Real.pi*t)) * |
| 170 | ((line c (2*Real.pi*t)+(u+1+2*(n : ℂ)))⁻¹-(u+1+2*(n : ℂ))⁻¹)) := by |
| 171 | rw [gamma_half_difference_resolvents hu (by simpa [line] using hc.le), mul_neg, tsum_mul_left] |
| 172 | simp_rw [he] |
| 173 | exact ⟨hh.1.neg, by rw [integral_neg, hh.2]⟩ |
| 174 | |
| 175 | lemma gamma_perron_kernel_bound {X : ℝ} (hX : 2 ≤ X) {u : ℂ} |
| 176 | (hu : 1/2 ≤ u.re) (n : ℕ) : |
| 177 | ‖smoothedPerronKernel X (-(u+1+2*(n : ℂ)))‖ ≤ 8/((n : ℝ)+1)^2 := by |
| 178 | let a := u+1+2*(n : ℂ) |
| 179 | have ha : (n : ℝ)+1 ≤ a.re := by simp [a]; linarith [Nat.cast_nonneg (α := ℝ) n] |
| 180 | have han : (n : ℝ)+1 ≤ ‖a‖ := ha.trans (Complex.re_le_norm a) |
| 181 | have hx : 1 < X := by linarith |
| 182 | have hxs : 1 < Real.sqrt X := (Real.lt_sqrt (by norm_num)).mpr (by simpa using hx) |
| 183 | have hlog : 1/4 ≤ Real.log (Real.sqrt X) := by |
| 184 | have h2 := Real.one_sub_inv_le_log_of_pos (by norm_num : (0 : ℝ) < 2) |
| 185 | have hmono := Real.log_le_log (by norm_num : (0 : ℝ) < 2) hX |
| 186 | rw [Real.log_sqrt (by linarith : 0 ≤ X)] |
| 187 | norm_num at h2 |
| 188 | linarith |
| 189 | have hnum : ‖(X : ℂ)^(-a)-(Real.sqrt X : ℂ)^(-a)‖ ≤ 2 := by |
| 190 | apply (norm_sub_le _ _).trans |
| 191 | rw [Complex.norm_cpow_eq_rpow_re_of_pos (by linarith : 0 < X), |
| 192 | Complex.norm_cpow_eq_rpow_re_of_pos (by linarith : 0 < Real.sqrt X)] |
| 193 | have haneg : (-a).re ≤ 0 := by simp only [neg_re]; linarith [Nat.cast_nonneg (α := ℝ) n] |
| 194 | have h1 := Real.rpow_le_one_of_one_le_of_nonpos hx.le haneg |
| 195 | have h2 := Real.rpow_le_one_of_one_le_of_nonpos hxs.le haneg |
| 196 | linarith |
| 197 | change ‖smoothedPerronKernel X (-a)‖ ≤ _ |
| 198 | unfold smoothedPerronKernel |
| 199 | rw [norm_div, norm_mul, norm_pow, norm_neg, Complex.norm_real, Real.norm_eq_abs, |
| 200 | abs_of_pos (Real.log_pos hxs)] |
| 201 | have hden : ((n : ℝ)+1)^2/4 ≤ ‖a‖^2*Real.log (Real.sqrt X) := by |
| 202 | have hn := sq_le_sq₀ (by positivity : (0 : ℝ) ≤ n+1) (norm_nonneg a) |>.mpr han |
| 203 | nlinarith [mul_le_mul hn hlog (by norm_num : (0 : ℝ) ≤ 1/4) (sq_nonneg ‖a‖)] |
| 204 | calc |
| 205 | _ ≤ 2 / (((n : ℝ)+1)^2/4) := |
| 206 | div_le_div₀ (by norm_num) hnum (by positivity) hden |
| 207 | _ = _ := by simp only [div_div_eq_mul_div]; ring |
| 208 | |
| 209 | lemma gamma_perron_integral_bound {X c : ℝ} (hX : 2 ≤ X) (hc : 0 < c) |
| 210 | {u : ℂ} (hu : 1/2 ≤ u.re) : |
| 211 | Integrable (fun t : ℝ => smoothedPerronKernel X (line c (2*Real.pi*t)) * |
| 212 | ((logDeriv Gamma ((u+line c (2*Real.pi*t)+1)/2)-logDeriv Gamma ((u+1)/2))/2)) ∧ |
| 213 | ‖∫ t : ℝ, smoothedPerronKernel X (line c (2*Real.pi*t)) * |
| 214 | ((logDeriv Gamma ((u+line c (2*Real.pi*t)+1)/2)-logDeriv Gamma ((u+1)/2))/2)‖ ≤ 16 := by |
| 215 | have hh := gamma_perron_integral_eq (by linarith : 1 < X) hc hu |
| 216 | refine ⟨hh.1, ?_⟩ |
| 217 | rw [hh.2, norm_neg] |
| 218 | have hs : Summable (fun n : ℕ => 1/((n : ℝ)+1)^2) := by |
| 219 | simpa only [Nat.cast_add, Nat.cast_one] using |
| 220 | (summable_nat_add_iff (f := fun n : ℕ => 1/(n : ℝ)^2) 1).mpr |
| 221 | (Real.summable_one_div_nat_pow.mpr (by norm_num : 1 < (2 : ℕ))) |
| 222 | have hK : Summable (fun n : ℕ => ‖smoothedPerronKernel X (-(u+1+2*(n : ℂ)))‖) := |
| 223 | (hs.mul_left 8).of_nonneg_of_le (fun _ => norm_nonneg _) |
| 224 | (fun n => by simpa only [mul_one_div] using gamma_perron_kernel_bound hX hu n) |
| 225 | have hs2 : (∑' n : ℕ, 1/((n : ℝ)+1)^2) ≤ 2 := by |
| 226 | apply le_of_tendsto hs.hasSum.tendsto_sum_nat |
| 227 | exact Eventually.of_forall (fun n => (sum_one_div_nat_add_one_sq_le n).trans |
| 228 | (by |
| 229 | have hn : 0 ≤ 2/((n : ℝ)+1) := by positivity |
| 230 | linarith)) |
| 231 | calc |
| 232 | _ ≤ ∑' n : ℕ, ‖smoothedPerronKernel X (-(u+1+2*(n : ℂ)))‖ := norm_tsum_le_tsum_norm hK |
| 233 | _ ≤ ∑' n : ℕ, 8*(1/((n : ℝ)+1)^2) := |
| 234 | hK.tsum_le_tsum (fun n => by simpa only [mul_one_div] using gamma_perron_kernel_bound hX hu n) (hs.mul_left 8) |
| 235 | _ = 8*(∑' n : ℕ, 1/((n : ℝ)+1)^2) := tsum_mul_left |
| 236 | _ ≤ 16 := by linarith |
| 237 | |
| 238 | end ConditionalGoldbach |
