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.SpectralPerronIntegral |
| 4 | public import ConditionalGoldbach.Proofs.CharacterShortPolynomial |
| 5 | |
| 6 | /-! The smoothed Perron integral on its initial absolutely convergent line. -/ |
| 7 | public section |
| 8 | |
| 9 | set_option autoImplicit false |
| 10 | noncomputable section |
| 11 | open scoped BigOperators ComplexConjugate Topology |
| 12 | open MeasureTheory Filter Set Complex |
| 13 | namespace ConditionalGoldbach |
| 14 | attribute [local instance] Classical.propDecidable |
| 15 | |
| 16 | lemma perron_dirichlet_term (n : ℕ) (u v : ℂ) (b : ℂ) : |
| 17 | (mangoldt n : ℂ) * b * (n : ℂ)^(-u) * (n : ℂ)^(-v) = |
| 18 | (mangoldt n : ℂ) * b / (n : ℂ)^(u + v) := by |
| 19 | by_cases hn : n = 0 |
| 20 | · subst n |
| 21 | simp [mangoldt] |
| 22 | · have hnc : (n : ℂ) ≠ 0 := by exact_mod_cast hn |
| 23 | rw [mul_assoc ((mangoldt n : ℂ) * b), ← Complex.cpow_add _ _ hnc, |
| 24 | show -u + -v = -(u + v) by ring, Complex.cpow_neg, div_eq_mul_inv] |
| 25 | |
| 26 | lemma smoothedPolynomial_perron_initial {N : ℕ} [NeZero N] (χ : Character N) |
| 27 | {X c : ℝ} (hX : 1 < X) (hc : 0 < c) (u : ℂ) (hu : 1 < u.re + c) : |
| 28 | (∫ t : ℝ, -logDerivative χ (u - 1 / 2 + line c (2 * Real.pi * t)) * |
| 29 | smoothedPerronKernel X (line c (2 * Real.pi * t))) = |
| 30 | smoothedDirichletPolynomial χ X u := by |
| 31 | let v : ℝ → ℂ := fun t => line c (2 * Real.pi * t) |
| 32 | let a : ℕ → ℂ := fun n => (mangoldt n : ℂ) * χ n * (n : ℂ)^(-u) |
| 33 | let b : ℕ → ℂ := fun n => (mangoldt n : ℂ) * χ n / (n : ℂ)^(u + (c : ℂ)) |
| 34 | let F : ℕ → ℝ → ℂ := fun n t => a n * ((n : ℂ)^(-v t) * smoothedPerronKernel X (v t)) |
| 35 | have hK : Integrable (fun t => smoothedPerronKernel X (v t)) := by |
| 36 | simpa only [Nat.cast_one, Complex.one_cpow, one_mul] using (perron_weight_integral hX hc 1 (by omega)).1 |
| 37 | have hb : Summable b := by |
| 38 | have hs : 1 / 2 < (u + (c : ℂ) - 1 / 2).re := by simp; linarith |
| 39 | convert summable_logDerivative_terms χ hs using 1 |
| 40 | funext n |
| 41 | dsimp [b] |
| 42 | congr 2 |
| 43 | ring |
| 44 | have hFterm (n : ℕ) (t : ℝ) : F n t = |
| 45 | ((mangoldt n : ℂ) * χ n / (n : ℂ)^(u + v t)) * smoothedPerronKernel X (v t) := by |
| 46 | dsimp [F, a] |
| 47 | rw [← mul_assoc, perron_dirichlet_term] |
| 48 | have hFnorm (n : ℕ) (t : ℝ) : ‖F n t‖ = ‖b n‖ * ‖smoothedPerronKernel X (v t)‖ := by |
| 49 | rw [hFterm, norm_mul] |
| 50 | by_cases hn : n = 0 |
| 51 | · subst n |
| 52 | simp [b, mangoldt] |
| 53 | · have hnpos : 0 < n := Nat.pos_of_ne_zero hn |
| 54 | congr 1 |
| 55 | dsimp [b] |
| 56 | rw [norm_div, norm_div, Complex.norm_natCast_cpow_of_pos hnpos, |
| 57 | Complex.norm_natCast_cpow_of_pos hnpos] |
| 58 | simp [v, line] |
| 59 | have hFint (n : ℕ) : Integrable (F n) := by |
| 60 | by_cases hn : n = 0 |
| 61 | · subst n |
| 62 | simp [F, a, mangoldt] |
| 63 | · exact (perron_weight_integral hX hc n (Nat.pos_of_ne_zero hn)).1.const_mul (a n) |
| 64 | have hnormIntegral (n : ℕ) : (∫ t : ℝ, ‖F n t‖) = |
| 65 | ‖b n‖ * (∫ t : ℝ, ‖smoothedPerronKernel X (v t)‖) := by |
| 66 | simp_rw [hFnorm] |
| 67 | rw [integral_const_mul] |
| 68 | have hsumInt : Summable (fun n => ∫ t : ℝ, ‖F n t‖) := by |
| 69 | simp_rw [hnormIntegral] |
| 70 | exact hb.norm.mul_right _ |
| 71 | have htermIntegral (n : ℕ) : (∫ t : ℝ, F n t) = a n * (smoothedPerronWeight X n : ℂ) := by |
| 72 | by_cases hn : n = 0 |
| 73 | · subst n |
| 74 | simp [F, a, mangoldt] |
| 75 | · dsimp only [F, v] |
| 76 | rw [integral_const_mul, (perron_weight_integral hX hc n (Nat.pos_of_ne_zero hn)).2] |
| 77 | have hsum (t : ℝ) : (∑' n, F n t) = |
| 78 | -logDerivative χ (u - 1 / 2 + v t) * smoothedPerronKernel X (v t) := by |
| 79 | have hs : 1 / 2 < (u - 1 / 2 + v t).re := by simp [v, line]; linarith |
| 80 | simp_rw [hFterm] |
| 81 | rw [tsum_mul_right, logDerivative_eq_neg_tsum χ hs, neg_neg] |
| 82 | congr 2 |
| 83 | funext n |
| 84 | congr 2 |
| 85 | ring |
| 86 | calc |
| 87 | _ = ∫ t : ℝ, ∑' n, F n t := by simp only [hsum, v] |
| 88 | _ = ∑' n, ∫ t : ℝ, F n t := (integral_tsum_of_summable_integral_norm hFint hsumInt).symm |
| 89 | _ = ∑' n, a n * (smoothedPerronWeight X n : ℂ) := tsum_congr htermIntegral |
| 90 | _ = ∑ n ∈ Finset.range (⌊X⌋₊ + 1), a n * (smoothedPerronWeight X n : ℂ) := by |
| 91 | apply tsum_eq_sum |
| 92 | intro n hn |
| 93 | have hn' : ⌊X⌋₊ < n := by |
| 94 | simp only [Finset.mem_range] at hn |
| 95 | omega |
| 96 | have hXn : X < (n : ℝ) := Nat.lt_of_floor_lt hn' |
| 97 | rw [smoothedPerronWeight_eq_zero_of_le hX n hXn.le, Complex.ofReal_zero, mul_zero] |
| 98 | _ = _ := rfl |
| 99 | |
| 100 | end ConditionalGoldbach |
