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.Meromorphic.Basic |
| 4 | public import ConditionalGoldbach.Proofs.DensityArithmetic |
| 5 | |
| 6 | /-! The exact Euler product identity and the complete density lemma. -/ |
| 7 | public section |
| 8 | |
| 9 | set_option autoImplicit false |
| 10 | noncomputable section |
| 11 | open scoped BigOperators ComplexConjugate Topology ContDiff LSeries.notation |
| 12 | open MeasureTheory Filter Set Complex |
| 13 | namespace ConditionalGoldbach |
| 14 | open MathlibNt.SieveTheory.SingularSeries hiding singularSeries |
| 15 | attribute [local instance] Classical.propDecidable |
| 16 | |
| 17 | lemma density_prime_power_term (N p e : ℕ) (hp : p.Prime) (w : ℂ) (hw : w ≠ 0) : |
| 18 | densityMultiplicativeTerm N w (p^(e+1)) = |
| 19 | ((if 2 < p ∧ ¬p ∣ N then liuCorrectionFactor p else 1 : ℝ) : ℂ) * |
| 20 | ((p : ℂ)^(-w))^(e+1) := by |
| 21 | have hp0 : p^(e+1) ≠ 0 := pow_ne_zero _ hp.ne_zero |
| 22 | rw [densityMultiplicativeTerm, ite_eq_right hp0, |
| 23 | densityMultiplier_prime_pow N p (e+1) hp (by omega), div_eq_mul_inv, ← Complex.cpow_neg] |
| 24 | congr 1 |
| 25 | exact (riemannZetaSummandHom hw).map_pow p (e+1) |
| 26 | |
| 27 | lemma density_prime_power_sum (N p : ℕ) (hp : p.Prime) {w : ℂ} (hw : 1 < w.re) : |
| 28 | (∑' e : ℕ, densityMultiplicativeTerm N w (p^e)) = |
| 29 | (1-(p : ℂ)^(-w))⁻¹ * (1+densityEulerTerm N p w) := by |
| 30 | let q := (p : ℂ)^(-w) |
| 31 | let c : ℂ := ((if 2 < p ∧ ¬p ∣ N then liuCorrectionFactor p else 1 : ℝ) : ℂ) |
| 32 | have hw0 : w ≠ 0 := by intro he; norm_num [he] at hw |
| 33 | have hq : ‖q‖ < 1 := by |
| 34 | dsimp [q] |
| 35 | rw [Complex.norm_natCast_cpow_of_pos hp.pos, Complex.neg_re] |
| 36 | exact Real.rpow_lt_one_of_one_lt_of_neg (by exact_mod_cast hp.one_lt) (by linarith) |
| 37 | have hshift : HasSum (fun e : ℕ => densityMultiplicativeTerm N w (p^(e+1))) |
| 38 | (c*q*(1-q)⁻¹) := by |
| 39 | convert (hasSum_geometric_of_norm_lt_one hq).mul_left (c*q) using 1 |
| 40 | ext e |
| 41 | rw [density_prime_power_term N p e hp w hw0, pow_succ] |
| 42 | dsimp [c, q] |
| 43 | ring |
| 44 | have hf : Summable (fun e : ℕ => densityMultiplicativeTerm N w (p^e)) := |
| 45 | (summable_nat_add_iff 1).mp hshift.summable |
| 46 | rw [hf.tsum_eq_zero_add, pow_zero, densityMultiplicativeTerm_one, hshift.tsum_eq] |
| 47 | have hqn : 1-q ≠ 0 := by |
| 48 | intro he |
| 49 | have : q = 1 := by linear_combination -he |
| 50 | simp [this] at hq |
| 51 | by_cases hactive : 2 < p ∧ ¬p ∣ N |
| 52 | · have hp2 : (2 : ℝ) < p := by exact_mod_cast hactive.1 |
| 53 | have hden : (p : ℂ)-2 ≠ 0 := by |
| 54 | intro he |
| 55 | have hr := congrArg Complex.re he |
| 56 | simp at hr |
| 57 | linarith |
| 58 | change 1+c*q*(1-q)⁻¹ = (1-q)⁻¹*(1+densityEulerTerm N p w) |
| 59 | simp only [densityEulerTerm, hp, hactive.1, hactive.2, not_false_eq_true, and_self, ite_true, |
| 60 | c, liuCorrectionFactor, Complex.ofReal_div, Complex.ofReal_sub, Complex.ofReal_natCast, |
| 61 | Complex.ofReal_one, Complex.ofReal_ofNat] |
| 62 | change 1+((p : ℂ)-1)/((p : ℂ)-2)*q*(1-q)⁻¹ = (1-q)⁻¹*(1+q/((p : ℂ)-2)) |
| 63 | field_simp |
| 64 | ring |
| 65 | · have he : densityEulerTerm N p w = 0 := by simp [densityEulerTerm, hp, hactive] |
| 66 | rw [he] |
| 67 | change 1+c*q*(1-q)⁻¹ = (1-q)⁻¹*(1+0) |
| 68 | simp only [c, ite_eq_right hactive, Complex.ofReal_one, one_mul, add_zero] |
| 69 | field_simp |
| 70 | ring |
| 71 | |
| 72 | lemma densityMultiplier_eulerProduct (N : ℕ) (hN : Even N) (hpos : 0 < N) |
| 73 | {w : ℂ} (hw : 1 < w.re) : |
| 74 | (∑' k, densityMultiplicativeTerm N w k) = riemannZeta w * densityEulerProduct N w := by |
| 75 | have hf := EulerProduct.eulerProduct_hasProd_mulIndicator |
| 76 | (densityMultiplicativeTerm_one N w) (fun {k l} hkl => densityMultiplicativeTerm_mul N w hkl) |
| 77 | (densityMultiplicativeTerm_summable_norm N hN hpos hw) (densityMultiplicativeTerm_zero N w) |
| 78 | have hz : HasProd (fun p : ℕ => if p.Prime then (1-(p : ℂ)^(-w))⁻¹ else 1) (riemannZeta w) := by |
| 79 | convert |
| 80 | ((hasProd_subtype_iff_mulIndicator |
| 81 | (f := fun p : ℕ => (1-(p : ℂ)^(-w))⁻¹) (s := {p : ℕ | p.Prime})).mp |
| 82 | (riemannZeta_eulerProduct_hasProd hw)) using 1 |
| 83 | ext p |
| 84 | by_cases hp : p.Prime <;> simp [Set.mulIndicator, hp] |
| 85 | have he : HasProd (fun p => 1+densityEulerTerm N p w) (densityEulerProduct N w) := by |
| 86 | rw [densityEulerProduct_eq_tprod] |
| 87 | exact (multipliable_one_add_of_summable (densityEulerTerm_summable_norm N (by linarith))).hasProd |
| 88 | apply hf.unique |
| 89 | convert hz.mul he using 1 |
| 90 | ext p |
| 91 | by_cases hp : p.Prime |
| 92 | · simp only [Set.mulIndicator, Set.mem_ofPred_eq, hp, ite_true, |
| 93 | density_prime_power_sum N p hp hw] |
| 94 | · simp [Set.mulIndicator, hp, densityEulerTerm] |
| 95 | |
| 96 | lemma densitySeries_eq_continuedDensity (N : ℕ) (hN : Even N) (hpos : 0 < N) |
| 97 | {w : ℂ} (hw : 1 < w.re) : densitySeries N w = continuedDensity N w := by |
| 98 | rw [densitySeries_eq_multiplier_tsum N hpos w, |
| 99 | densityMultiplier_eulerProduct N hN hpos hw] |
| 100 | unfold continuedDensity |
| 101 | ring |
| 102 | |
| 103 | theorem lemma_4_3 (N : ℕ) (hN : Even N) (hN4 : 4 ≤ N) : |
| 104 | (∀ w : ℂ, 0 < w.re → Summable (fun n : ℕ => |
| 105 | if 0 < n ∧ Nat.Coprime n N then ‖(mangoldt n : ℂ) ^ 2 / (n : ℂ) ^ (1 + w)‖ else 0)) ∧ |
| 106 | (∀ w : ℂ, 1 < w.re → densitySeries N w = continuedDensity N w) ∧ |
| 107 | MeromorphicOn (continuedDensity N) {w | 0 < w.re} ∧ |
| 108 | Tendsto (fun w : ℂ => (w - 1) * continuedDensity N w) (𝓝[≠] 1) (𝓝 ((N : ℂ) / N.totient)) ∧ |
| 109 | 1 < singularSeries N ∧ C2 * N / N.totient ≤ singularSeries N ∧ |
| 110 | singularSeries N ≤ (N : ℝ) / N.totient := by |
| 111 | exact ⟨fun w hw => diagonalSeries_summable N hw, |
| 112 | fun w hw => densitySeries_eq_continuedDensity N hN (by omega) hw, |
| 113 | continuedDensity_meromorphicOn N, continuedDensity_residue_one N hN (by omega), |
| 114 | singularSeries_gt_one N, singularSeries_lower_totient N hN (by omega), |
| 115 | singularSeries_upper_totient N hN (by omega)⟩ |
| 116 | |
| 117 | end ConditionalGoldbach |
