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.NumberTheory.ArithmeticFunction.VonMangoldt |
| 4 | public import MathlibNt.SieveTheory.Arithmetic.LiuSingularSeries |
| 5 | |
| 6 | /-! Arithmetic definitions used by the conditional Goldbach formalization. -/ |
| 7 | @[expose] 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 | abbrev mangoldt := ArithmeticFunction.vonMangoldt |
| 17 | |
| 18 | abbrev prime (n : ℕ) := Nat.Prime n |
| 19 | |
| 20 | def C2 : ℝ := MathlibNt.SieveTheory.SingularSeries.liuUniversalProduct |
| 21 | |
| 22 | def singularSeries (N : ℕ) : ℝ := |
| 23 | 2 * MathlibNt.SieveTheory.SingularSeries.liuSingularSeries N |
| 24 | |
| 25 | def goldbach (N : ℕ) (φ : ℝ → ℝ) : ℝ := |
| 26 | (N : ℝ)⁻¹ * ∑ n ∈ Finset.range (N + 1), |
| 27 | if 0 < n ∧ n < N ∧ Nat.Coprime (n * (N - n)) N then |
| 28 | mangoldt n * mangoldt (N - n) * φ (n / N) * φ ((N - n : ℕ) / N) |
| 29 | else 0 |
| 30 | |
| 31 | def diagonalMoment (N : ℕ) (φ : ℝ → ℝ) : ℝ := |
| 32 | (N : ℝ)⁻¹ * ∑ n ∈ Finset.range (N + 1), |
| 33 | if Nat.Coprime n N then (mangoldt n) ^ 2 * φ (n / N) ^ 2 else 0 |
| 34 | |
| 35 | def PrimePairCount (N : ℕ) : ℕ := |
| 36 | ((Finset.range (N + 1)).filter (fun p => p.Prime ∧ (N - p).Prime ∧ |
| 37 | (N : ℝ) / 3 ≤ p ∧ (p : ℝ) ≤ 2 * N / 3)).card |
| 38 | |
| 39 | def positiveDifferenceFamily (N n m k : ℕ) : Prop := |
| 40 | 0 < k ∧ m = n + k * N |
| 41 | |
| 42 | def negativeDifferenceFamily (N n m k : ℕ) : Prop := |
| 43 | 0 < k ∧ n = m + k * N |
| 44 | |
| 45 | def sumFamily (N n m k : ℕ) : Prop := |
| 46 | 0 < k ∧ n + m = k * N |
| 47 | |
| 48 | def localDensityFactor (p h : ℕ) : ℝ := |
| 49 | (1 - (if p ∣ h then 1 else 2) / (p : ℝ)) / (1 - (p : ℝ)⁻¹) ^ 2 |
| 50 | |
| 51 | end ConditionalGoldbach |
