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.CharacterShortPolynomial |
| 4 | public import ConditionalGoldbach.Proofs.CharacterSeries |
| 5 | public import ConditionalGoldbach.Proofs.DensitySeries |
| 6 | public import ConditionalGoldbach.Proofs.PerronDiagonalWeights |
| 7 | public import ConditionalGoldbach.Proofs.VariableStripOperators |
| 8 | |
| 9 | /-! Exact short-sum cancellation in the arithmetic kernel on the Hardy strip. -/ |
| 10 | @[expose] public section |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | noncomputable section |
| 14 | open scoped BigOperators ComplexConjugate |
| 15 | namespace ConditionalGoldbach |
| 16 | |
| 17 | /-- The Perron polynomial for the shifted logarithmic derivative at cutoff `N / 2`. -/ |
| 18 | def perronShortSum {N : ℕ} (χ : Character N) (s : ℂ) : ℂ := |
| 19 | smoothedDirichletPolynomial χ (perronCutoff N) (1 / 2 + s) |
| 20 | |
| 21 | /-- The signed error used in the Perron truncation of the logarithmic derivative. -/ |
| 22 | def perronRemainder {N : ℕ} [NeZero N] (χ : Character N) (s : ℂ) : ℂ := |
| 23 | -logDerivative χ s - perronShortSum χ s |
| 24 | |
| 25 | /-- A summand of the full coprime diagonal Dirichlet series. -/ |
| 26 | def coprimeDiagonalTerm (N : ℕ) (w : ℂ) (n : ℕ) : ℂ := |
| 27 | if 0 < n ∧ Nat.Coprime n N then (mangoldt n : ℂ) ^ 2 / (n : ℂ) ^ (1 + w) else 0 |
| 28 | |
| 29 | /-- The diagonal left over after removing the square of the Perron cutoff weight. -/ |
| 30 | def perronDiagonalTail (N : ℕ) (w : ℂ) : ℂ := |
| 31 | ∑' n, coprimeDiagonalTerm N w n * (1 - (smoothedPerronWeight (perronCutoff N) n : ℂ) ^ 2) |
| 32 | |
| 33 | /-- The positive diagonal tail obeys the same row-sum bound as the full diagonal. -/ |
| 34 | theorem perronDiagonalTail_overlap_sum_le (N n M : ℕ) (hn : 1 ≤ n) (a : ℝ) (ha : 0 < a) : |
| 35 | (∑ j ∈ Finset.range M, (1 - smoothedPerronWeight (perronCutoff N) (j + 1) ^ 2) * |
| 36 | (diagonalCoefficient N j * (j + 1 : ℕ) ^ (-2 * a) * |
| 37 | min ((j + 1 : ℕ) / (n : ℝ)) ((n : ℝ) / (j + 1 : ℕ)))) ≤ |
| 38 | 2 * (Real.log 4 + 4) / a := by |
| 39 | apply le_trans _ (diagonalCoefficient_overlap_sum_le N n M hn a ha) |
| 40 | apply Finset.sum_le_sum |
| 41 | intro j _ |
| 42 | apply mul_le_of_le_one_left |
| 43 | · exact mul_nonneg (mul_nonneg (diagonalCoefficient_nonneg N j) (Real.rpow_nonneg (by positivity) _)) |
| 44 | (le_min (by positivity) (by positivity)) |
| 45 | · linarith [sq_nonneg (smoothedPerronWeight (perronCutoff N) (j + 1))] |
| 46 | |
| 47 | private lemma smoothedPolynomialCoeff_pair (N : ℕ) (X : ℝ) (s z : ℂ) (n : ℕ) : |
| 48 | (if Nat.Coprime n N then smoothedPolynomialCoeff X (1 / 2 + s) n * |
| 49 | conj (smoothedPolynomialCoeff X (1 / 2 + z) n) else 0) = |
| 50 | coprimeDiagonalTerm N (s + conj z) n * (smoothedPerronWeight X n : ℂ) ^ 2 := by |
| 51 | by_cases hn : 0 < n |
| 52 | · by_cases hc : Nat.Coprime n N |
| 53 | · have hn' : (n : ℂ) ≠ 0 := by exact_mod_cast hn.ne' |
| 54 | simp only [coprimeDiagonalTerm, hn, hc, and_self, ite_true, smoothedPolynomialCoeff, |
| 55 | map_mul, Complex.conj_ofReal, conj_natCast_cpow, map_neg, map_add, map_div₀, map_one, |
| 56 | map_ofNat] |
| 57 | rw [div_eq_mul_inv ((mangoldt n : ℂ) ^ 2) _, ← Complex.cpow_neg] |
| 58 | have he : -(1 + (s + conj z)) = -(1 / 2 + s) + -(1 / 2 + conj z) := by ring |
| 59 | rw [he, Complex.cpow_add _ _ hn'] |
| 60 | ring |
| 61 | · simp [coprimeDiagonalTerm, hc] |
| 62 | · have hz : n = 0 := by omega |
| 63 | subst n |
| 64 | simp [smoothedPolynomialCoeff, coprimeDiagonalTerm, mangoldt] |
| 65 | |
| 66 | /-- The short Gram kernel plus its explicit diagonal tail equals the full diagonal. |
| 67 | Only the diagonal series needs a convergence hypothesis. -/ |
| 68 | theorem perronShortSum_pairing_add_tail (N : ℕ) [NeZero N] (hN : Even N) (hN4 : 4 ≤ N) |
| 69 | (s z : ℂ) (hw : 0 < (s + conj z).re) : |
| 70 | (2 / (N.totient : ℂ)) * (∑ χ ∈ oddCharacters N, |
| 71 | perronShortSum χ s * conj (perronShortSum χ z)) + |
| 72 | perronDiagonalTail N (s + conj z) = diagonalSeries N (s + conj z) := by |
| 73 | let w := s + conj z |
| 74 | let X := perronCutoff N |
| 75 | let f := coprimeDiagonalTerm N w |
| 76 | let g := fun n => f n * (smoothedPerronWeight X n : ℂ) ^ 2 |
| 77 | have hf : Summable f := by |
| 78 | apply Summable.of_norm |
| 79 | simpa only [f, coprimeDiagonalTerm, apply_ite norm, norm_zero] using diagonalSeries_summable N hw |
| 80 | have hg0 (n : ℕ) (hn : n ∉ Finset.range (⌊X⌋₊ + 1)) : g n = 0 := by |
| 81 | have hfloor : ⌊X⌋₊ < n := by simp only [Finset.mem_range] at hn; omega |
| 82 | have hNreal : (4 : ℝ) ≤ N := by exact_mod_cast hN4 |
| 83 | have hX : 1 < X := by dsimp [X, perronCutoff]; linarith |
| 84 | simp [g, smoothedPerronWeight_eq_zero_of_le hX n (Nat.lt_of_floor_lt hfloor).le] |
| 85 | have hg : Summable g := summable_of_ne_finset_zero hg0 |
| 86 | have hp : (2 / (N.totient : ℂ)) * (∑ χ ∈ oddCharacters N, |
| 87 | perronShortSum χ s * conj (perronShortSum χ z)) = ∑' n, g n := by |
| 88 | unfold perronShortSum perronCutoff |
| 89 | rw [smoothed_polynomial_odd_pairing N hN hN4, tsum_eq_sum hg0] |
| 90 | exact Finset.sum_congr rfl (fun n _ => smoothedPolynomialCoeff_pair N X s z n) |
| 91 | have ht : perronDiagonalTail N w = ∑' n, (f n - g n) := by |
| 92 | apply tsum_congr |
| 93 | intro n |
| 94 | dsimp only [g, f, X] |
| 95 | ring |
| 96 | change _ + perronDiagonalTail N w = ∑' n, f n |
| 97 | rw [hp, ht, hf.tsum_sub hg] |
| 98 | ring |
| 99 | |
| 100 | /-- The two mixed Perron terms and the pure error Gram term, before Hardy weighting. -/ |
| 101 | def perronErrorKernel (N : ℕ) [NeZero N] (s z : ℂ) : ℂ := |
| 102 | (2 / (N.totient : ℂ)) * ∑ χ ∈ oddCharacters N, |
| 103 | (perronShortSum χ s * conj (perronRemainder χ z) + |
| 104 | perronRemainder χ s * conj (perronShortSum χ z) + |
| 105 | perronRemainder χ s * conj (perronRemainder χ z)) |
| 106 | |
| 107 | /-- On the strip subtracting the full diagonal leaves the three error products |
| 108 | minus the explicit diagonal tail. -/ |
| 109 | theorem characterKernel_sub_diagonal_perron (N : ℕ) [NeZero N] (hN : Even N) (hN4 : 4 ≤ N) |
| 110 | (s z : ℂ) (hw : 0 < (s + conj z).re) : |
| 111 | characterKernel N s (conj z) - diagonalSeries N (s + conj z) = |
| 112 | perronErrorKernel N s z - perronDiagonalTail N (s + conj z) := by |
| 113 | rw [← perronShortSum_pairing_add_tail N hN hN4 s z hw] |
| 114 | simp only [characterKernel, perronErrorKernel, Complex.conj_conj] |
| 115 | rw [← sub_sub, ← mul_sub, ← Finset.sum_sub_distrib] |
| 116 | apply congrArg (fun k : ℂ => 2 / (N.totient : ℂ) * k - perronDiagonalTail N (s + conj z)) |
| 117 | apply Finset.sum_congr rfl |
| 118 | intro χ _ |
| 119 | simp only [perronRemainder, map_sub, map_neg] |
| 120 | ring |
| 121 | |
| 122 | /-- Matrix coefficients of the actual residual operator between evaluation vectors, |
| 123 | with both mixed terms, the diagonal tail and the model retained. -/ |
| 124 | theorem residualOperator_pairing_perron (N : ℕ) [NeZero N] (hN : Even N) (hN4 : 4 ≤ N) |
| 125 | (hGRH : GRH N) {a : ℝ} (ha0 : 0 < a) (ha : a < beta) (s z : ℂ) |
| 126 | (hs : s ∈ strip a beta) (hz : z ∈ strip a beta) : |
| 127 | paperInner (residualOperator ha N (evaluationVector z)) (evaluationVector s) = |
| 128 | (perronErrorKernel N s z - perronDiagonalTail N (s + conj z) - continuedModel N s (conj z)) / |
| 129 | ((1 + s) * (1 + conj z)) := by |
| 130 | have hw : 0 < (s + conj z).re := by |
| 131 | rw [Complex.add_re, Complex.conj_re] |
| 132 | linarith [hs.1, hz.1] |
| 133 | rw [← residualOperator_pairing_at a N ha0 hN4 hGRH ha s z hs hz, weightedKernel, residual, |
| 134 | characterKernel_sub_diagonal_perron N hN hN4 s z hw] |
| 135 | |
| 136 | end ConditionalGoldbach |
