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.Algebra.Order.Star.Real |
| 4 | public import Mathlib.Analysis.CStarAlgebra.Classes |
| 5 | public import Mathlib.Analysis.Complex.BorelCaratheodory |
| 6 | public import Mathlib.Analysis.Complex.HasPrimitives |
| 7 | public import Mathlib.Analysis.Complex.Liouville |
| 8 | import Mathlib.Tactic.NormNum.RealSqrt |
| 9 | |
| 10 | /-! Quantitative logarithmic derivatives on a zero-free disk, via a genuine analytic logarithm. -/ |
| 11 | public section |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | noncomputable section |
| 15 | open scoped BigOperators ComplexConjugate Topology ContDiff |
| 16 | open MeasureTheory Filter Set Complex Metric |
| 17 | namespace ConditionalGoldbach |
| 18 | |
| 19 | lemma zero_free_disk_log (f : ℂ → ℂ) (R : ℝ) (hR : 0 < R) |
| 20 | (hf : AnalyticOnNhd ℂ f (ball 0 R)) (hn : ∀ z ∈ ball 0 R, f z ≠ 0) : |
| 21 | ∃ g : ℂ → ℂ, g 0 = 0 ∧ |
| 22 | (∀ z ∈ ball 0 R, HasDerivAt g (deriv f z / f z) z) ∧ |
| 23 | (∀ z ∈ ball 0 R, Complex.exp (g z) = f z / f 0) := by |
| 24 | have hld : DifferentiableOn ℂ (fun z => deriv f z / f z) (ball 0 R) := |
| 25 | hf.deriv.differentiableOn.div hf.differentiableOn hn |
| 26 | obtain ⟨g,hg0,hg⟩ := hld.isExactOn_ball.with_val_at 0 0 |
| 27 | have hzero (z : ℂ) (hz : z ∈ ball (0 : ℂ) R) : |
| 28 | HasDerivAt (fun z => Complex.exp (-g z) * f z) 0 z := by |
| 29 | convert ((hg z hz).neg.cexp).mul ((hf z hz).differentiableAt.hasDerivAt) using 1 |
| 30 | field_simp [hn z hz] |
| 31 | ring |
| 32 | have heq (z : ℂ) (hz : z ∈ ball (0 : ℂ) R) : |
| 33 | Complex.exp (-g z) * f z = f 0 := by |
| 34 | have h := isOpen_ball.is_const_of_deriv_eq_zero (convex_ball (0 : ℂ) R).isPreconnected |
| 35 | (fun z hz => (hzero z hz).differentiableAt.differentiableWithinAt) |
| 36 | (fun z hz => (hzero z hz).deriv) hz (mem_ball_self hR) |
| 37 | simpa only [hg0, neg_zero, Complex.exp_zero, one_mul] using h |
| 38 | refine ⟨g,hg0,hg,fun z hz => ?_⟩ |
| 39 | have hc := hn 0 (mem_ball_self hR) |
| 40 | have hh := heq z hz |
| 41 | rw [Complex.exp_neg] at hh |
| 42 | apply (eq_div_iff hc).mpr |
| 43 | field_simp [Complex.exp_ne_zero] at hh |
| 44 | linear_combination -hh |
| 45 | |
| 46 | lemma logarithm_re_le_of_bounds (f g : ℂ → ℂ) (U l : ℝ) (hl : 0 < l) |
| 47 | (hlf : l ≤ ‖f 0‖) (z : ℂ) (hn : f z ≠ 0) (hb : ‖f z‖ ≤ U) |
| 48 | (hg : Complex.exp (g z) = f z / f 0) : (g z).re ≤ Real.log (U/l) := by |
| 49 | have hf0 : 0 < ‖f 0‖ := hl.trans_le hlf |
| 50 | have hp : 0 < ‖f z‖ / ‖f 0‖ := div_pos (norm_pos_iff.mpr hn) hf0 |
| 51 | have he := congrArg (fun w : ℂ => Real.log ‖w‖) hg |
| 52 | rw [Complex.norm_exp, Real.log_exp, norm_div] at he |
| 53 | rw [he] |
| 54 | apply Real.log_le_log hp |
| 55 | calc |
| 56 | _ ≤ U / ‖f 0‖ := div_le_div_of_nonneg_right hb hf0.le |
| 57 | _ ≤ U / l := div_le_div_of_nonneg_left ((norm_nonneg _).trans hb) hl hlf |
| 58 | |
| 59 | lemma logDerivative_disk_bound (f : ℂ → ℂ) (R r U l : ℝ) |
| 60 | (hR : 0 < R) (_hr : 0 ≤ r) (hrR : r < R) (hl : 0 < l) (hlU : l < U) |
| 61 | (hf : AnalyticOnNhd ℂ f (ball 0 R)) (hn : ∀ z ∈ ball 0 R, f z ≠ 0) |
| 62 | (hlf : l ≤ ‖f 0‖) (hbound : ∀ z ∈ ball 0 R, ‖f z‖ ≤ U) |
| 63 | (z : ℂ) (hz : ‖z‖ ≤ r) : |
| 64 | ‖deriv f z / f z‖ ≤ 8 * R / (R-r)^2 * Real.log (U/l) := by |
| 65 | obtain ⟨g,hg0,hg,hge⟩ := zero_free_disk_log f R hR hf hn |
| 66 | let M : ℝ := Real.log (U/l) |
| 67 | let ρ : ℝ := (R-r)/2 |
| 68 | have hρ : 0 < ρ := by dsimp [ρ]; linarith |
| 69 | have hM : 0 < M := Real.log_pos ((one_lt_div hl).mpr hlU) |
| 70 | have hgd : DifferentiableOn ℂ g (ball 0 R) := |
| 71 | fun v hv => (hg v hv).differentiableAt.differentiableWithinAt |
| 72 | have hgB (v : ℂ) (hv : v ∈ ball (0 : ℂ) R) : |
| 73 | ‖g v‖ ≤ 2*M*‖v‖/(R-‖v‖) := |
| 74 | Complex.borelCaratheodory_zero hM hgd |
| 75 | (fun v hv => logarithm_re_le_of_bounds f g U l hl hlf v (hn v hv) (hbound v hv) (hge v hv)) hR hv hg0 |
| 76 | have hsub : closedBall z ρ ⊆ ball (0 : ℂ) R := by |
| 77 | intro v hv |
| 78 | have hdist : ‖v-z‖ ≤ ρ := by simpa only [mem_closedBall, dist_eq_norm] using hv |
| 79 | have hvn := norm_add_le (v-z) z |
| 80 | rw [sub_add_cancel] at hvn |
| 81 | apply mem_ball_zero_iff.mpr |
| 82 | dsimp [ρ] at hdist |
| 83 | linarith |
| 84 | have hnorm : ∀ v ∈ sphere z ρ, ‖g v‖ ≤ 4*M*R/(R-r) := by |
| 85 | intro v hv |
| 86 | have hclose : v ∈ closedBall z ρ := sphere_subset_closedBall hv |
| 87 | have hvball := hsub hclose |
| 88 | have hdist : ‖v-z‖ ≤ ρ := by simpa only [mem_closedBall, dist_eq_norm] using hclose |
| 89 | have hvn := norm_add_le (v-z) z |
| 90 | rw [sub_add_cancel] at hvn |
| 91 | have hvmax : ‖v‖ ≤ (R+r)/2 := by dsimp [ρ] at hdist; linarith |
| 92 | have hden : 0 < R-‖v‖ := by have := mem_ball_zero_iff.mp hvball; linarith |
| 93 | apply (hgB v hvball).trans |
| 94 | apply (div_le_div_iff₀ hden (sub_pos.mpr hrR)).mpr |
| 95 | nlinarith [norm_nonneg v, mul_nonneg hM.le (sub_nonneg.mpr hrR.le), |
| 96 | mul_nonneg hM.le (sub_nonneg.mpr hvmax)] |
| 97 | have hc : DiffContOnCl ℂ g (ball z ρ) := by |
| 98 | apply DifferentiableOn.diffContOnCl |
| 99 | rw [closure_ball z hρ.ne'] |
| 100 | exact hgd.mono hsub |
| 101 | have hd := Complex.norm_deriv_le_of_forall_mem_sphere_norm_le hρ hc hnorm |
| 102 | rw [(hg z (mem_ball_zero_iff.mpr (hz.trans_lt hrR))).deriv] at hd |
| 103 | convert hd using 1 |
| 104 | dsimp [ρ,M] |
| 105 | field_simp |
| 106 | ring |
| 107 | |
| 108 | end ConditionalGoldbach |
