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.Definitions.Characters |
| 4 | public import ConditionalGoldbach.Definitions.Hardy |
| 5 | public import Mathlib.Analysis.Meromorphic.Basic |
| 6 | import Mathlib.Tactic.NormNum.RealSqrt |
| 7 | |
| 8 | public section |
| 9 | |
| 10 | set_option autoImplicit false |
| 11 | noncomputable section |
| 12 | open scoped BigOperators ComplexConjugate Topology |
| 13 | open MeasureTheory Filter Set Complex |
| 14 | namespace ConditionalGoldbach |
| 15 | attribute [local instance] Classical.propDecidable |
| 16 | |
| 17 | /-- Scaling the Poisson density reduces it to the integrable Cauchy kernel. -/ |
| 18 | theorem poissonKernelReal_scaled (a : ℝ) (ha : 0 < a) (t : ℝ) : |
| 19 | poissonKernelReal a t = (1 / (Real.pi * a)) * (1 + (a⁻¹ * t) ^ 2)⁻¹ := by |
| 20 | have h₁ : a ^ 2 + t ^ 2 ≠ 0 := ne_of_gt (add_pos_of_pos_of_nonneg (sq_pos_of_pos ha) (sq_nonneg _)) |
| 21 | have h₂ : 1 + (a⁻¹ * t) ^ 2 ≠ 0 := ne_of_gt (by positivity) |
| 22 | unfold poissonKernelReal |
| 23 | field_simp [ha.ne', Real.pi_ne_zero, h₁, h₂] |
| 24 | |
| 25 | /-- The Poisson density is integrable and has total mass one. -/ |
| 26 | theorem poissonKernelReal_integral (a : ℝ) (ha : 0 < a) : |
| 27 | Integrable (poissonKernelReal a) ∧ (∫ t : ℝ, poissonKernelReal a t) = 1 := by |
| 28 | have heq : poissonKernelReal a = fun t => (1 / (Real.pi * a)) * (1 + (a⁻¹ * t) ^ 2)⁻¹ := |
| 29 | funext (poissonKernelReal_scaled a ha) |
| 30 | rw [heq] |
| 31 | refine ⟨(integrable_inv_one_add_mul_sq (inv_ne_zero ha.ne')).const_mul _, ?_⟩ |
| 32 | rw [integral_const_mul, integral_univ_inv_one_add_mul_sq, abs_of_pos (inv_pos.mpr ha)] |
| 33 | field_simp [ha.ne', Real.pi_ne_zero] |
| 34 | |
| 35 | /-- The exact Poisson-action specification in Lemma 6.4. -/ |
| 36 | theorem lemma_6_4_poisson_action_spec : |
| 37 | (∀ f : ℝ → ℝ, poissonAction 0 f = f) ∧ |
| 38 | ∀ ℓ : ℝ, 0 < ℓ → |
| 39 | Integrable (poissonKernelReal ℓ) ∧ |
| 40 | (∀ t : ℝ, 0 ≤ poissonKernelReal ℓ t) ∧ |
| 41 | (∫ t : ℝ, poissonKernelReal ℓ t) = 1 ∧ |
| 42 | ∀ f : ℝ → ℝ, |
| 43 | poissonAction ℓ f = realConvolution (poissonKernelReal ℓ) f := by |
| 44 | refine ⟨fun f => by simp [poissonAction], fun ℓ hℓ => ?_⟩ |
| 45 | obtain ⟨hi, hm⟩ := poissonKernelReal_integral ℓ hℓ |
| 46 | exact ⟨hi, fun t => by unfold poissonKernelReal; positivity, hm, |
| 47 | fun f => ite_eq_right hℓ.ne'⟩ |
| 48 | |
| 49 | /-- The smoothed Perron kernel is meromorphic, with residue one at the origin. -/ |
| 50 | theorem lemma_6_4_perron_residue (X : ℝ) (hX : 1 < X) : |
| 51 | MeromorphicOn (smoothedPerronKernel X) Set.univ ∧ |
| 52 | Tendsto (fun v : ℂ => v * smoothedPerronKernel X v) |
| 53 | (𝓝[≠] (0 : ℂ)) (𝓝 1) := by |
| 54 | have hXp : 0 < X := lt_trans zero_lt_one hX |
| 55 | have hS : 0 < Real.sqrt X := Real.sqrt_pos.mpr hXp |
| 56 | have hXc : (X : ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr hXp.ne' |
| 57 | have hSc : (Real.sqrt X : ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr hS.ne' |
| 58 | have hlog : Real.log (Real.sqrt X) ≠ 0 := by |
| 59 | rw [Real.log_sqrt hXp.le] |
| 60 | exact div_ne_zero (Real.log_pos hX).ne' (by norm_num) |
| 61 | have hlogc : (Real.log (Real.sqrt X) : ℂ) ≠ 0 := Complex.ofReal_ne_zero.mpr hlog |
| 62 | constructor |
| 63 | · intro z hz |
| 64 | have hx : AnalyticAt ℂ (fun v : ℂ => (X : ℂ) ^ v) z := by |
| 65 | simp only [Complex.cpow_def_of_ne_zero hXc] |
| 66 | exact (analyticAt_const.mul analyticAt_id).cexp' |
| 67 | have hs : AnalyticAt ℂ (fun v : ℂ => (Real.sqrt X : ℂ) ^ v) z := by |
| 68 | simp only [Complex.cpow_def_of_ne_zero hSc] |
| 69 | exact (analyticAt_const.mul analyticAt_id).cexp' |
| 70 | exact (hx.sub hs).meromorphicAt.div ((analyticAt_id.pow 2).mul analyticAt_const).meromorphicAt |
| 71 | · have hd := (Complex.hasStrictDerivAt_const_cpow (y := (0 : ℂ)) (Or.inl hXc)).hasDerivAt.sub |
| 72 | ((Complex.hasStrictDerivAt_const_cpow (y := (0 : ℂ)) (Or.inl hSc)).hasDerivAt) |
| 73 | have ht := hd.tendsto_slope_zero.div_const (Real.log (Real.sqrt X) : ℂ) |
| 74 | have hl : (Complex.log (X : ℂ) - Complex.log (Real.sqrt X : ℂ)) / |
| 75 | (Real.log (Real.sqrt X) : ℂ) = 1 := by |
| 76 | rw [← Complex.ofReal_log hXp.le, ← Complex.ofReal_log hS.le, Real.log_sqrt hXp.le] |
| 77 | push_cast |
| 78 | field_simp [(Real.log_pos hX).ne'] |
| 79 | ring |
| 80 | simp only [Pi.sub_apply, zero_add, Complex.cpow_zero, one_mul, sub_self, sub_zero, smul_eq_mul, hl] at ht |
| 81 | apply ht.congr' |
| 82 | filter_upwards [self_mem_nhdsWithin] with v hv |
| 83 | have hv' : v ≠ 0 := hv |
| 84 | unfold smoothedPerronKernel |
| 85 | field_simp [hv', hlogc] |
| 86 | |
| 87 | end ConditionalGoldbach |
