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 Mathlib.Analysis.MellinInversion |
| 4 | public import ConditionalGoldbach.Proofs.MellinDifferentiation |
| 5 | public import ConditionalGoldbach.Proofs.MellinConvolution |
| 6 | public import ConditionalGoldbach.Proofs.MellinContourShift |
| 7 | |
| 8 | /-! Mellin decay for smooth compact functions whose support can meet zero. -/ |
| 9 | public section |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | noncomputable section |
| 13 | open scoped BigOperators ComplexConjugate Topology ContDiff |
| 14 | open MeasureTheory Filter Set Complex |
| 15 | namespace ConditionalGoldbach |
| 16 | |
| 17 | lemma compact_mellin_regular (f : ℝ → ℝ) (hf : Continuous f) (A B : ℝ) |
| 18 | (hsupp : Function.support f ⊆ Icc A B) (s : ℂ) (hs : 0 < s.re) : |
| 19 | MellinConvergent (fun y => (f y : ℂ)) s ∧ |
| 20 | DifferentiableAt ℂ (mellin (fun y => (f y : ℂ))) s := by |
| 21 | have hc : Continuous (fun y => (f y : ℂ)) := Complex.continuous_ofReal.comp hf |
| 22 | have htop : (fun y => (f y : ℂ)) =ᶠ[atTop] 0 := by |
| 23 | filter_upwards [eventually_gt_atTop B] with y hy |
| 24 | have hz : f y = 0 := by |
| 25 | by_contra hn |
| 26 | exact (not_lt_of_ge (hsupp hn).2) hy |
| 27 | simp [hz] |
| 28 | have hbot : (fun y => (f y : ℂ)) =O[𝓝[>] (0 : ℝ)] (fun y : ℝ => y ^ (-(0 : ℝ))) := by |
| 29 | simpa using (hc.continuousAt.tendsto.mono_left nhdsWithin_le_nhds).isBigO_one ℝ |
| 30 | have hloc := (hc.locallyIntegrable (μ := volume)).locallyIntegrableOn (Ioi (0 : ℝ)) |
| 31 | exact ⟨mellinConvergent_of_isBigO_rpow (a := s.re + 1) (b := 0) hloc |
| 32 | (htop.trans_isBigO (Asymptotics.isBigO_zero _ _)) (by linarith) hbot hs, |
| 33 | mellin_differentiableAt_of_isBigO_rpow (a := s.re + 1) (b := 0) hloc |
| 34 | (htop.trans_isBigO (Asymptotics.isBigO_zero _ _)) (by linarith) hbot hs⟩ |
| 35 | |
| 36 | lemma mellinD_support_Icc {f : ℝ → ℝ} {A B : ℝ} |
| 37 | (hs : Function.support f ⊆ Icc A B) : Function.support (mellinD f) ⊆ Icc A B := by |
| 38 | have ht : tsupport f ⊆ Icc A B := closure_minimal hs isClosed_Icc |
| 39 | intro x hx |
| 40 | by_contra hout |
| 41 | have hz : f x = 0 := by by_contra hn; exact hout (hs hn) |
| 42 | have hdz : deriv f x = 0 := by by_contra hn; exact hout (ht (support_deriv_subset hn)) |
| 43 | exact hx (by simp [mellinD, hz, hdz]) |
| 44 | |
| 45 | lemma mellinD_transform_positive (f : ℝ → ℝ) (hf : ContDiff ℝ ∞ f) (A B : ℝ) |
| 46 | (hsupp : Function.support f ⊆ Icc A B) (s : ℂ) (hs : 0 < s.re) : |
| 47 | mellin (fun u => (mellinD f u : ℂ)) s = (1 + s) * mellin (fun u => (f u : ℂ)) s := by |
| 48 | let F : ℝ → ℂ := fun u => (u : ℂ) ^ (s - 1) * (f u : ℂ) |
| 49 | let G : ℝ → ℂ := fun u => (u : ℂ) ^ s * ((deriv f u : ℝ) : ℂ) |
| 50 | have hdf : ContDiff ℝ ∞ (deriv f) := (contDiff_infty_iff_deriv.mp hf).2 |
| 51 | have hdfs : Function.support (deriv f) ⊆ Icc A B := |
| 52 | support_deriv_subset.trans (closure_minimal hsupp isClosed_Icc) |
| 53 | have hF : IntegrableOn F (Ioi 0) := (compact_mellin_regular f hf.continuous A B hsupp s hs).1 |
| 54 | have hG : IntegrableOn G (Ioi 0) := by |
| 55 | have h := (compact_mellin_regular (deriv f) hdf.continuous A B hdfs (s + 1) (by simpa using hs.trans (lt_add_one s.re))).1 |
| 56 | simpa only [MellinConvergent, add_sub_cancel_right, smul_eq_mul, G] using h |
| 57 | have hs0 : s ≠ 0 := by intro h; simp [h] at hs |
| 58 | have hFTC : (∫ u in Ioi (0 : ℝ), s * F u + G u) = 0 := by |
| 59 | have hd (u : ℝ) (hu : u ∈ Ioi (0 : ℝ)) : |
| 60 | HasDerivAt (fun u : ℝ => (u : ℂ) ^ s * (f u : ℂ)) (s * F u + G u) u := by |
| 61 | have hcp := hasDerivAt_ofReal_cpow_const (ne_of_gt hu) hs0 |
| 62 | convert hcp.mul ((hf.differentiable (by norm_num) u).hasDerivAt.ofReal_comp) using 1 |
| 63 | dsimp [F, G] |
| 64 | ring |
| 65 | have hc : ContinuousWithinAt (fun u : ℝ => (u : ℂ) ^ s * (f u : ℂ)) (Ici 0) 0 := |
| 66 | ((Complex.continuousAt_ofReal_cpow_const 0 s (Or.inl hs)).mul |
| 67 | (Complex.continuous_ofReal.continuousAt.comp hf.continuous.continuousAt)).continuousWithinAt |
| 68 | have htop : Tendsto (fun u : ℝ => (u : ℂ) ^ s * (f u : ℂ)) atTop (𝓝 0) := by |
| 69 | apply tendsto_const_nhds.congr' |
| 70 | filter_upwards [eventually_gt_atTop B] with u hu |
| 71 | have hz : f u = 0 := by |
| 72 | by_contra hn |
| 73 | exact (not_lt_of_ge (hsupp hn).2) hu |
| 74 | simp [hz] |
| 75 | have heq := integral_Ioi_of_hasDerivAt_of_tendsto hc hd ((hF.const_mul s).add hG) htop |
| 76 | simpa only [ofReal_zero, zero_cpow hs0, zero_mul, sub_self] using heq |
| 77 | rw [integral_add (hF.const_mul s) hG, integral_const_mul] at hFTC |
| 78 | have heq : (∫ u in Ioi (0 : ℝ), (u : ℂ) ^ (s - 1) * (mellinD f u : ℂ)) = |
| 79 | ∫ u in Ioi (0 : ℝ), F u - G u := by |
| 80 | apply setIntegral_congr_fun measurableSet_Ioi |
| 81 | intro u hu |
| 82 | have hu0 : (u : ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr hu.ne' |
| 83 | have hp : (u : ℂ) ^ (s - 1) * u = (u : ℂ) ^ s := by |
| 84 | calc |
| 85 | _ = (u : ℂ) ^ (s - 1) * (u : ℂ) ^ (1 : ℂ) := by rw [cpow_one] |
| 86 | _ = (u : ℂ) ^ ((s - 1) + 1) := (cpow_add _ _ hu0).symm |
| 87 | _ = _ := by rw [sub_add_cancel] |
| 88 | dsimp [F, G, mellinD] |
| 89 | push_cast |
| 90 | rw [mul_sub, ← mul_assoc, hp] |
| 91 | unfold mellin |
| 92 | simp only [smul_eq_mul] |
| 93 | rw [heq, integral_sub hF hG] |
| 94 | change (∫ u in Ioi (0 : ℝ), F u) - (∫ u in Ioi (0 : ℝ), G u) = |
| 95 | (1 + s) * ∫ u in Ioi (0 : ℝ), F u |
| 96 | linear_combination -hFTC |
| 97 | |
| 98 | lemma compact_mellin_uniform_bound (f : ℝ → ℝ) (hf : Continuous f) (A B : ℝ) |
| 99 | (hsupp : Function.support f ⊆ Icc A B) (lo hi : ℝ) (hlo : 0 < lo) (hlohi : lo ≤ hi) : |
| 100 | ∃ C : ℝ, 0 < C ∧ ∀ s : ℂ, s.re ∈ Icc lo hi → |
| 101 | ‖mellin (fun u => (f u : ℂ)) s‖ ≤ C := by |
| 102 | let L : ℝ → ℝ := fun u => ‖(u : ℂ) ^ ((lo : ℂ) - 1) * (f u : ℂ)‖ |
| 103 | let H : ℝ → ℝ := fun u => ‖(u : ℂ) ^ ((hi : ℂ) - 1) * (f u : ℂ)‖ |
| 104 | have hL : IntegrableOn L (Ioi 0) := (compact_mellin_regular f hf A B hsupp lo hlo).1.norm |
| 105 | have hH : IntegrableOn H (Ioi 0) := (compact_mellin_regular f hf A B hsupp hi (hlo.trans_le hlohi)).1.norm |
| 106 | let C := ∫ u in Ioi (0 : ℝ), L u + H u |
| 107 | have hC : 0 ≤ C := integral_nonneg (fun u => add_nonneg (norm_nonneg _) (norm_nonneg _)) |
| 108 | refine ⟨C + 1, by positivity, fun s hs => ?_⟩ |
| 109 | apply le_trans _ (by linarith : C ≤ C + 1) |
| 110 | unfold mellin |
| 111 | simp only [smul_eq_mul] |
| 112 | apply (norm_integral_le_integral_norm _).trans |
| 113 | apply integral_mono_ae (compact_mellin_regular f hf A B hsupp s (hlo.trans_le hs.1)).1.norm (hL.add hH) |
| 114 | filter_upwards [ae_restrict_mem measurableSet_Ioi] with u hu |
| 115 | dsimp [L, H] |
| 116 | simp only [norm_mul, Complex.norm_cpow_eq_rpow_re_of_pos hu, sub_re, ofReal_re, one_re] |
| 117 | by_cases hu1 : u ≤ 1 |
| 118 | · have hp := mul_le_mul_of_nonneg_right |
| 119 | (Real.rpow_le_rpow_of_exponent_ge hu hu1 (sub_le_sub_right hs.1 1)) (norm_nonneg (f u : ℂ)) |
| 120 | exact hp.trans (le_add_of_nonneg_right (mul_nonneg (Real.rpow_nonneg hu.le _) (norm_nonneg _))) |
| 121 | · have hp := mul_le_mul_of_nonneg_right |
| 122 | (Real.rpow_le_rpow_of_exponent_le (le_of_not_ge hu1) (sub_le_sub_right hs.2 1)) (norm_nonneg (f u : ℂ)) |
| 123 | exact hp.trans (le_add_of_nonneg_left (mul_nonneg (Real.rpow_nonneg hu.le _) (norm_nonneg _))) |
| 124 | |
| 125 | lemma mellinD_iterate_regular_Icc (f : ℝ → ℝ) (hf : ContDiff ℝ ∞ f) (A B : ℝ) |
| 126 | (hsupp : Function.support f ⊆ Icc A B) (k : ℕ) : |
| 127 | ContDiff ℝ ∞ (mellinD^[k] f) ∧ Function.support (mellinD^[k] f) ⊆ Icc A B := by |
| 128 | induction k with |
| 129 | | zero => exact ⟨hf, hsupp⟩ |
| 130 | | succ k ih => |
| 131 | rw [Function.iterate_succ_apply'] |
| 132 | exact ⟨mellinD_contDiff ih.1, mellinD_support_Icc ih.2⟩ |
| 133 | |
| 134 | lemma mellinD_iterate_transform_positive (f : ℝ → ℝ) (hf : ContDiff ℝ ∞ f) (A B : ℝ) |
| 135 | (hsupp : Function.support f ⊆ Icc A B) (k : ℕ) (s : ℂ) (hs : 0 < s.re) : |
| 136 | mellin (fun u => (mellinD^[k] f u : ℂ)) s = |
| 137 | (1 + s) ^ k * mellin (fun u => (f u : ℂ)) s := by |
| 138 | induction k with |
| 139 | | zero => simp |
| 140 | | succ k ih => |
| 141 | rw [Function.iterate_succ_apply', mellinD_transform_positive _ |
| 142 | (mellinD_iterate_regular_Icc f hf A B hsupp k).1 A B |
| 143 | (mellinD_iterate_regular_Icc f hf A B hsupp k).2 s hs, ih, pow_succ] |
| 144 | ring |
| 145 | |
| 146 | lemma compact_mellin_rapid_decay (f : ℝ → ℝ) (hf : ContDiff ℝ ∞ f) |
| 147 | (A B : ℝ) (hsupp : Function.support f ⊆ Icc A B) |
| 148 | (lo hi : ℝ) (hlo : 0 < lo) (hlohi : lo ≤ hi) (k : ℕ) : |
| 149 | ∃ C : ℝ, 0 < C ∧ ∀ s : ℂ, s.re ∈ Icc lo hi → |
| 150 | ‖mellin (fun u => (f u : ℂ)) s‖ ≤ C * (1 + |s.im|)⁻¹ ^ k := by |
| 151 | obtain ⟨C₀, hC₀, hzero⟩ := compact_mellin_uniform_bound f hf.continuous A B hsupp lo hi hlo hlohi |
| 152 | obtain ⟨Ck, hCk, hk⟩ := compact_mellin_uniform_bound (mellinD^[k] f) |
| 153 | (mellinD_iterate_regular_Icc f hf A B hsupp k).1.continuous A B |
| 154 | (mellinD_iterate_regular_Icc f hf A B hsupp k).2 lo hi hlo hlohi |
| 155 | refine ⟨2 ^ k * (C₀ + Ck), by positivity, fun s hsl => ?_⟩ |
| 156 | have hnorm := hk s hsl |
| 157 | rw [mellinD_iterate_transform_positive f hf A B hsupp k s (hlo.trans_le hsl.1), norm_mul, norm_pow] at hnorm |
| 158 | have him : |s.im| ≤ ‖1 + s‖ := by simpa only [add_im, one_im, zero_add] using Complex.abs_im_le_norm (1 + s) |
| 159 | have hpower : |s.im| ^ k * ‖mellin (fun u => (f u : ℂ)) s‖ ≤ Ck := |
| 160 | (mul_le_mul_of_nonneg_right (pow_le_pow_left₀ (abs_nonneg _) him k) (norm_nonneg _)).trans hnorm |
| 161 | have hden : 0 < (1 + |s.im|) ^ k := by positivity |
| 162 | rw [inv_pow, ← div_eq_mul_inv, le_div_iff₀ hden] |
| 163 | by_cases hsmall : |s.im| ≤ 1 |
| 164 | · have hpow : (1 + |s.im|) ^ k ≤ (2 : ℝ) ^ k := |
| 165 | pow_le_pow_left₀ (by positivity) (by linarith) k |
| 166 | calc |
| 167 | _ ≤ C₀ * (2 : ℝ) ^ k := mul_le_mul (hzero s hsl) hpow (by positivity) hC₀.le |
| 168 | _ ≤ _ := by nlinarith [mul_nonneg (show 0 ≤ (2 : ℝ) ^ k by positivity) hCk.le] |
| 169 | · have hlarge : 1 < |s.im| := lt_of_not_ge hsmall |
| 170 | have hpow : (1 + |s.im|) ^ k ≤ (2 * |s.im|) ^ k := |
| 171 | pow_le_pow_left₀ (by positivity) (by linarith) k |
| 172 | calc |
| 173 | _ ≤ ‖mellin (fun u => (f u : ℂ)) s‖ * (2 * |s.im|) ^ k := |
| 174 | mul_le_mul_of_nonneg_left hpow (norm_nonneg _) |
| 175 | _ = (2 : ℝ) ^ k * (|s.im| ^ k * ‖mellin (fun u => (f u : ℂ)) s‖) := by rw [mul_pow]; ring |
| 176 | _ ≤ (2 : ℝ) ^ k * Ck := mul_le_mul_of_nonneg_left hpower (by positivity) |
| 177 | _ ≤ _ := mul_le_mul_of_nonneg_left (by linarith) (by positivity) |
| 178 | |
| 179 | lemma compact_mellin_verticalIntegrable (f : ℝ → ℝ) (hf : ContDiff ℝ ∞ f) (A B : ℝ) |
| 180 | (hsupp : Function.support f ⊆ Icc A B) (σ : ℝ) (hσ : 0 < σ) : |
| 181 | VerticalIntegrable (mellin (fun u => (f u : ℂ))) σ := by |
| 182 | obtain ⟨C, _, hC⟩ := compact_mellin_rapid_decay f hf A B hsupp σ σ hσ le_rfl 2 |
| 183 | apply integrable_of_uniform_vertical_decay _ σ C |
| 184 | · apply continuous_iff_continuousAt.mpr |
| 185 | intro t |
| 186 | apply (compact_mellin_regular f hf.continuous A B hsupp (line σ t) |
| 187 | (by simpa [line] using hσ)).2.continuousAt.comp |
| 188 | unfold line |
| 189 | fun_prop |
| 190 | · intro t |
| 191 | simpa [line] using hC (line σ t) (by simp [line]) |
| 192 | |
| 193 | lemma compact_mellin_inversion (f : ℝ → ℝ) (hf : ContDiff ℝ ∞ f) (A B : ℝ) |
| 194 | (hsupp : Function.support f ⊆ Icc A B) (σ : ℝ) (hσ : 0 < σ) (u : ℝ) (hu : 0 < u) : |
| 195 | (f u : ℂ) = verticalMellin σ (fun s => mellin (fun y => (f y : ℂ)) s * (u : ℂ) ^ (-s)) := by |
| 196 | have h := mellinInv_mellin_eq σ (fun u => (f u : ℂ)) hu |
| 197 | (compact_mellin_regular f hf.continuous A B hsupp σ hσ).1 |
| 198 | (compact_mellin_verticalIntegrable f hf A B hsupp σ hσ) |
| 199 | (Complex.continuous_ofReal.continuousAt.comp hf.continuous.continuousAt) |
| 200 | rw [← h] |
| 201 | unfold mellinInv verticalMellin |
| 202 | simp only [Complex.real_smul, Complex.ofReal_mul, Complex.ofReal_ofNat, one_div, Complex.ofReal_inv] |
| 203 | congr 1 |
| 204 | apply integral_congr_ae |
| 205 | exact Eventually.of_forall (fun t => mul_comm _ _) |
| 206 | |
| 207 | lemma compact_mellin_inversion_integrable (f : ℝ → ℝ) (hf : ContDiff ℝ ∞ f) (A B : ℝ) |
| 208 | (hsupp : Function.support f ⊆ Icc A B) (σ : ℝ) (hσ : 0 < σ) (u : ℝ) (hu : 0 < u) : |
| 209 | Integrable (fun t : ℝ => mellin (fun y => (f y : ℂ)) (line σ t) * (u : ℂ) ^ (-line σ t)) := by |
| 210 | have hpow : Continuous (fun t : ℝ => (u : ℂ) ^ (-line σ t)) := by |
| 211 | apply Continuous.const_cpow |
| 212 | · unfold line |
| 213 | fun_prop |
| 214 | · exact Or.inl (Complex.ofReal_ne_zero.mpr hu.ne') |
| 215 | have hb : ∀ᵐ t : ℝ, ‖(u : ℂ) ^ (-line σ t)‖ ≤ Real.rpow u (-σ) := by |
| 216 | filter_upwards [] with t |
| 217 | rw [Complex.norm_cpow_eq_rpow_re_of_pos hu] |
| 218 | simp [line] |
| 219 | simpa only [line, mul_comm] using |
| 220 | (compact_mellin_verticalIntegrable f hf A B hsupp σ hσ).bdd_mul hpow.aestronglyMeasurable hb |
| 221 | |
| 222 | lemma signedConvolution_mellin_decay (φ : ℝ → ℝ) (hφ : IsWeight φ) |
| 223 | (lo hi : ℝ) (hlo : 0 < lo) (hlohi : lo ≤ hi) : |
| 224 | ∃ C : ℝ, 0 < C ∧ ∀ σ ∈ Icc lo hi, ∀ t : ℝ, |
| 225 | ‖mellin (fun y => (signedConvolution φ y : ℂ)) (line σ t)‖ ≤ C * (1 + |t|)⁻¹ ^ 6 := by |
| 226 | obtain ⟨C, hC, hb⟩ := compact_mellin_rapid_decay (signedConvolution φ) |
| 227 | (signedConvolution_contDiff φ hφ) (-(1 / 3)) (4 / 3) |
| 228 | (signedConvolution_support φ hφ) lo hi hlo hlohi 6 |
| 229 | refine ⟨C, hC, fun σ hσ t => ?_⟩ |
| 230 | simpa [line] using hb (line σ t) (by simpa [line] using hσ) |
| 231 | |
| 232 | lemma signedConvolution_mellin_inversion (φ : ℝ → ℝ) (hφ : IsWeight φ) |
| 233 | (σ : ℝ) (hσ : 0 < σ) (u : ℝ) (hu : 0 < u) : |
| 234 | (signedConvolution φ u : ℂ) = verticalMellin σ (fun s => |
| 235 | mellin (fun y => (signedConvolution φ y : ℂ)) s * (u : ℂ) ^ (-s)) := |
| 236 | compact_mellin_inversion (signedConvolution φ) (signedConvolution_contDiff φ hφ) |
| 237 | (-(1 / 3)) (4 / 3) (signedConvolution_support φ hφ) σ hσ u hu |
| 238 | |
| 239 | end ConditionalGoldbach |
