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.Arithmetic |
| 4 | public import ConditionalGoldbach.Definitions.GeometryCore |
| 5 | public import Mathlib.Analysis.Analytic.Order |
| 6 | public import Mathlib.NumberTheory.DirichletCharacter.Orthogonality |
| 7 | public import Mathlib.NumberTheory.LSeries.DirichletContinuation |
| 8 | |
| 9 | /-! Characters definitions used by the conditional Goldbach formalization. -/ |
| 10 | @[expose] public section |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | noncomputable section |
| 14 | open scoped BigOperators ComplexConjugate Topology |
| 15 | open MeasureTheory Filter Set Complex |
| 16 | namespace ConditionalGoldbach |
| 17 | attribute [local instance] Classical.propDecidable |
| 18 | |
| 19 | abbrev Character (N : ℕ) := DirichletCharacter ℂ N |
| 20 | |
| 21 | local instance conductorNeZero {N : ℕ} [NeZero N] (χ : Character N) : |
| 22 | NeZero χ.conductor := ⟨χ.conductor_ne_zero⟩ |
| 23 | |
| 24 | def oddCharacters (N : ℕ) [NeZero N] : Finset (Character N) := |
| 25 | Finset.univ.filter (fun χ => χ (-1) = -1) |
| 26 | |
| 27 | def characterPolynomial {N : ℕ} (χ : Character N) (φ : ℝ → ℝ) : ℂ := |
| 28 | (Real.sqrt N : ℂ)⁻¹ * ∑ n ∈ Finset.range (N + 1), |
| 29 | (mangoldt n : ℂ) * χ n * (φ (n / N) : ℂ) |
| 30 | |
| 31 | def characterMoment (N : ℕ) [NeZero N] (φ : ℝ → ℝ) : ℝ := |
| 32 | 2 / N.totient * ∑ χ ∈ oddCharacters N, ‖characterPolynomial χ φ‖ ^ 2 |
| 33 | |
| 34 | def GRH (N : ℕ) : Prop := |
| 35 | ∀ d : ℕ, ∀ (_ : NeZero d), d ∣ N → ∀ χ : Character d, χ.IsPrimitive → |
| 36 | ∀ ρ : ℂ, 0 < ρ.re → ρ.re < 1 → χ.LFunction ρ = 0 → ρ.re = 1 / 2 |
| 37 | |
| 38 | def logDerivative {N : ℕ} [NeZero N] (χ : Character N) (s : ℂ) : ℂ := |
| 39 | deriv χ.LFunction (1 / 2 + s) / χ.LFunction (1 / 2 + s) |
| 40 | |
| 41 | def characterKernel (N : ℕ) [NeZero N] (s z : ℂ) : ℂ := |
| 42 | 2 / N.totient * ∑ χ ∈ oddCharacters N, |
| 43 | logDerivative χ s * conj (logDerivative χ (conj z)) |
| 44 | |
| 45 | def ZeroIndex {d : ℕ} [NeZero d] (χ : Character d) := |
| 46 | {p : ℂ × ℕ // 0 < p.1.re ∧ p.1.re < 1 ∧ χ.LFunction p.1 = 0 ∧ |
| 47 | p.2 < analyticOrderNatAt χ.LFunction p.1} |
| 48 | |
| 49 | def completedL {d : ℕ} [NeZero d] (χ : Character d) (u : ℂ) : ℂ := |
| 50 | (d : ℂ) ^ ((u + 1) / 2) * χ.completedLFunction u |
| 51 | |
| 52 | def zeroDifference {d : ℕ} [NeZero d] (χ : Character d) (u u₀ : ℂ) : ℂ := |
| 53 | ∑' p : ZeroIndex χ, (1 / (u - p.val.1) - 1 / (u₀ - p.val.1)) |
| 54 | |
| 55 | def eulerCorrection {N : ℕ} [NeZero N] (χ : Character N) (u : ℂ) : ℂ := |
| 56 | ∑ p ∈ N.primeFactors, if ¬p ∣ χ.conductor then |
| 57 | χ.primitiveCharacter p * (Real.log p : ℂ) / |
| 58 | ((p : ℂ) ^ u - χ.primitiveCharacter p) else 0 |
| 59 | |
| 60 | def zeroPoisson {N : ℕ} [NeZero N] (χ : Character N) (x t : ℝ) : ℝ := |
| 61 | ∑' p : ZeroIndex χ.primitiveCharacter, x / (x ^ 2 + (t - p.val.1.im) ^ 2) |
| 62 | |
| 63 | def averagedLogDerivative (N : ℕ) [NeZero N] (σ : ℝ) : ℝ := |
| 64 | 2 / N.totient * ∑ χ ∈ oddCharacters N, |
| 65 | ∫ t : ℝ, ‖logDerivative χ (line σ t)‖ ^ 2 / (1 + t ^ 2) |
| 66 | |
| 67 | def arithmeticExpansionTerm (N n m : ℕ) (s z : ℂ) : ℂ := |
| 68 | if 0 < n ∧ 0 < m ∧ Nat.Coprime (n * m) N then |
| 69 | (mangoldt n : ℂ) * mangoldt m / ((n : ℂ) ^ (1 / 2 + s) * (m : ℂ) ^ (1 / 2 + z)) * |
| 70 | ((if (n : ZMod N) = m then 1 else 0) - |
| 71 | (if (n : ZMod N) = -(m : ZMod N) then 1 else 0)) else 0 |
| 72 | |
| 73 | def zeroWindow {d : ℕ} [NeZero d] (χ : Character d) (t : ℝ) : Set (ZeroIndex χ) := |
| 74 | {p | t ≤ p.val.1.im ∧ p.val.1.im < t + 1} |
| 75 | |
| 76 | def poleCoefficient (N : ℕ) [NeZero N] (γ : ℝ) : ℝ := |
| 77 | 2 / N.totient * ∑ χ ∈ oddCharacters N, |
| 78 | (analyticOrderNatAt χ.LFunction (line (1 / 2) γ) : ℝ) ^ 2 |
| 79 | |
| 80 | def pairedZeroSum {N : ℕ} [NeZero N] (χ : Character N) (s : ℂ) : ℂ := |
| 81 | ∑' p : ZeroIndex χ.primitiveCharacter, |
| 82 | (1 / (s - p.val.1.im * I) - 1 / (3 / 2 - p.val.1.im * I)) |
| 83 | |
| 84 | def zeroMultiplicity {N : ℕ} [NeZero N] (χ : Character N) (ρ : ℂ) : ℕ := |
| 85 | analyticOrderNatAt χ.LFunction ρ |
| 86 | |
| 87 | def perronCutoff (N : ℕ) : ℝ := (N : ℝ) / 2 |
| 88 | |
| 89 | def smoothedPerronWeight (X : ℝ) (n : ℕ) : ℝ := |
| 90 | if (n : ℝ) ≤ Real.sqrt X then 1 |
| 91 | else if (n : ℝ) ≤ X then Real.log (X / n) / Real.log (Real.sqrt X) |
| 92 | else 0 |
| 93 | |
| 94 | def smoothedDirichletPolynomial {N : ℕ} (χ : Character N) (X : ℝ) (u : ℂ) : ℂ := |
| 95 | ∑ n ∈ Finset.range (⌊X⌋₊ + 1), |
| 96 | (mangoldt n : ℂ) * χ n * (n : ℂ) ^ (-u) * smoothedPerronWeight X n |
| 97 | |
| 98 | def smoothedPerronKernel (X : ℝ) (v : ℂ) : ℂ := |
| 99 | ((X : ℂ) ^ v - (Real.sqrt X : ℂ) ^ v) / (v ^ 2 * Real.log (Real.sqrt X)) |
| 100 | |
| 101 | def logDerivativeEnergy {N : ℕ} [NeZero N] (χ : Character N) (σ : ℝ) : ℝ := |
| 102 | ∫ t : ℝ, ‖logDerivative χ (line σ t)‖ ^ 2 / (1 + t ^ 2) |
| 103 | |
| 104 | end ConditionalGoldbach |
