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.CharacterGammaFactor |
| 4 | public import Mathlib.Analysis.SpecialFunctions.Gamma.BohrMollerup |
| 5 | public import Mathlib.Analysis.SpecialFunctions.Gamma.Beta |
| 6 | |
| 7 | /-! Uniform majorants for Euler's finite Gamma products. -/ |
| 8 | public section |
| 9 | |
| 10 | set_option autoImplicit false |
| 11 | noncomputable section |
| 12 | open scoped BigOperators Topology |
| 13 | open Set Complex Filter |
| 14 | namespace ConditionalGoldbach |
| 15 | |
| 16 | lemma real_GammaSeq_le_Gamma {x : ℝ} (hx : 0 < x) {n : ℕ} (hn : n ≠ 0) : |
| 17 | Real.GammaSeq x n ≤ Real.Gamma x := by |
| 18 | have hnp : (0 : ℝ) < n := by exact_mod_cast Nat.pos_of_ne_zero hn |
| 19 | have hf : ∀ {y : ℝ}, 0 < y → (Real.log ∘ Real.Gamma) (y+1) = |
| 20 | (Real.log ∘ Real.Gamma) y + Real.log y := by |
| 21 | intro y hy |
| 22 | simp only [Function.comp_apply, Real.Gamma_add_one hy.ne', |
| 23 | Real.log_mul hy.ne' (Real.Gamma_pos_of_pos hy).ne'] |
| 24 | ring |
| 25 | have hb := Real.BohrMollerup.ge_logGammaSeq Real.convexOn_log_Gamma hf hx hn |
| 26 | have hp : 0 < ∏ j ∈ Finset.range (n+1), (x+(j:ℝ)) := |
| 27 | Finset.prod_pos (fun j _ => by positivity) |
| 28 | have hs : 0 < Real.GammaSeq x n := by |
| 29 | unfold Real.GammaSeq |
| 30 | exact div_pos (mul_pos (Real.rpow_pos_of_pos hnp _) (by positivity)) hp |
| 31 | have he : Real.log (Real.GammaSeq x n) = Real.BohrMollerup.logGammaSeq x n := by |
| 32 | unfold Real.GammaSeq Real.BohrMollerup.logGammaSeq |
| 33 | rw [Real.log_div (mul_ne_zero (Real.rpow_pos_of_pos hnp _).ne' (by positivity)) hp.ne', |
| 34 | Real.log_mul (Real.rpow_pos_of_pos hnp _).ne' (by positivity), Real.log_rpow hnp] |
| 35 | rw [Real.log_prod (fun j _ => by positivity)] |
| 36 | apply (Real.log_le_log_iff hs (Real.Gamma_pos_of_pos hx)).mp |
| 37 | simpa [Function.comp_apply, Real.Gamma_one, he] using hb |
| 38 | |
| 39 | lemma GammaSeq_norm_le_Gamma_re {s : ℂ} (hs : 0 < s.re) {n : ℕ} (hn : n ≠ 0) : |
| 40 | ‖Complex.GammaSeq s n‖ ≤ Real.Gamma s.re := by |
| 41 | have hnp : (0 : ℝ) < n := by exact_mod_cast Nat.pos_of_ne_zero hn |
| 42 | have hp : 0 < ∏ j ∈ Finset.range (n+1), (s.re+(j:ℝ)) := |
| 43 | Finset.prod_pos (fun j _ => by positivity) |
| 44 | have hb : (∏ j ∈ Finset.range (n+1), (s.re+(j:ℝ))) ≤ |
| 45 | ∏ j ∈ Finset.range (n+1), ‖s+(j:ℂ)‖ := by |
| 46 | apply Finset.prod_le_prod₀ |
| 47 | · intro j hj; positivity |
| 48 | · intro j hj |
| 49 | simpa using (Complex.re_le_norm (s+(j:ℂ))) |
| 50 | apply le_trans (b := Real.GammaSeq s.re n) ?_ (real_GammaSeq_le_Gamma hs hn) |
| 51 | unfold Complex.GammaSeq Real.GammaSeq |
| 52 | rw [norm_div, norm_mul, norm_prod, ← Complex.ofReal_natCast n, Complex.norm_cpow_eq_rpow_re_of_pos hnp] |
| 53 | simp only [Complex.norm_natCast] |
| 54 | exact div_le_div_of_nonneg_left (by positivity) hp hb |
| 55 | |
| 56 | lemma GammaSeq_differentiableAt {s : ℂ} (hs : 0 < s.re) {n : ℕ} (hn : n ≠ 0) : |
| 57 | DifferentiableAt ℂ (fun z => Complex.GammaSeq z n) s := by |
| 58 | have hd : DifferentiableAt ℂ (fun z : ℂ => (n:ℂ)^z * (n.factorial:ℂ)) s := |
| 59 | (differentiableAt_id.const_cpow (Or.inl (by exact_mod_cast hn))).mul_const _ |
| 60 | have hp : DifferentiableAt ℂ (fun z : ℂ => ∏ j ∈ Finset.range (n+1), (z+(j:ℂ))) s := |
| 61 | DifferentiableAt.fun_finsetProd (fun j _ => differentiableAt_id.add_const _) |
| 62 | apply hd.div hp |
| 63 | apply Finset.prod_ne_zero_iff.mpr |
| 64 | intro j hj he |
| 65 | have := congrArg Complex.re he |
| 66 | simp only [add_re,natCast_re,zero_re] at this |
| 67 | have hj0 : (0 : ℝ) ≤ j := Nat.cast_nonneg j |
| 68 | linarith |
| 69 | |
| 70 | end ConditionalGoldbach |
