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
feat(ConditionalGoldbach): 对角尾项的加权行和及实际余项配对
Browse filesChecks
build Program · lake build and Comparator
Details
challenge Program · challenge files and build config
Details
+41 −8 ConditionalGoldbach/Proofs/ArithmeticPerronRemainder.lean View file
| @@ -3,6 +3,8 @@ module | ||
| 3 | 3 | public import ConditionalGoldbach.Proofs.CharacterShortPolynomial |
| 4 | 4 | public import ConditionalGoldbach.Proofs.CharacterSeries |
| 5 | 5 | public import ConditionalGoldbach.Proofs.DensitySeries |
| 6 | +public import ConditionalGoldbach.Proofs.PerronDiagonalWeights | |
| 7 | +public import ConditionalGoldbach.Proofs.VariableStripOperators | |
| 6 | 8 | |
| 7 | 9 | /-! Exact short-sum cancellation in the arithmetic kernel on the Hardy strip. -/ |
| 8 | 10 | @[expose] public section |
| @@ -28,6 +30,20 @@ def coprimeDiagonalTerm (N : ℕ) (w : ℂ) (n : ℕ) : ℂ := | ||
| 28 | 30 | def perronDiagonalTail (N : ℕ) (w : ℂ) : ℂ := |
| 29 | 31 | ∑' n, coprimeDiagonalTerm N w n * (1 - (smoothedPerronWeight (perronCutoff N) n : ℂ) ^ 2) |
| 30 | 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 | + | |
| 31 | 47 | private lemma smoothedPolynomialCoeff_pair (N : ℕ) (X : ℝ) (s z : ℂ) (n : ℕ) : |
| 32 | 48 | (if Nat.Coprime n N then smoothedPolynomialCoeff X (1 / 2 + s) n * |
| 33 | 49 | conj (smoothedPolynomialCoeff X (1 / 2 + z) n) else 0) = |
| @@ -81,18 +97,21 @@ theorem perronShortSum_pairing_add_tail (N : ℕ) [NeZero N] (hN : Even N) (hN4 | ||
| 81 | 97 | rw [hp, ht, hf.tsum_sub hg] |
| 82 | 98 | ring |
| 83 | 99 | |
| 84 | -/-- On the strip the exact arithmetic-minus-diagonal kernel consists of two mixed terms, | |
| 85 | -the pure Perron-error Gram term, and the negative of the explicit diagonal tail. -/ | |
| 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. -/ | |
| 86 | 109 | theorem characterKernel_sub_diagonal_perron (N : ℕ) [NeZero N] (hN : Even N) (hN4 : 4 ≤ N) |
| 87 | 110 | (s z : ℂ) (hw : 0 < (s + conj z).re) : |
| 88 | 111 | characterKernel N s (conj z) - diagonalSeries N (s + conj z) = |
| 89 | - (2 / (N.totient : ℂ)) * (∑ χ ∈ oddCharacters N, | |
| 90 | - (perronShortSum χ s * conj (perronRemainder χ z) + | |
| 91 | - perronRemainder χ s * conj (perronShortSum χ z) + | |
| 92 | - perronRemainder χ s * conj (perronRemainder χ z))) - | |
| 93 | - perronDiagonalTail N (s + conj z) := by | |
| 112 | + perronErrorKernel N s z - perronDiagonalTail N (s + conj z) := by | |
| 94 | 113 | rw [← perronShortSum_pairing_add_tail N hN hN4 s z hw] |
| 95 | - simp only [characterKernel, Complex.conj_conj] | |
| 114 | + simp only [characterKernel, perronErrorKernel, Complex.conj_conj] | |
| 96 | 115 | rw [← sub_sub, ← mul_sub, ← Finset.sum_sub_distrib] |
| 97 | 116 | apply congrArg (fun k : ℂ => 2 / (N.totient : ℂ) * k - perronDiagonalTail N (s + conj z)) |
| 98 | 117 | apply Finset.sum_congr rfl |
| @@ -100,4 +119,18 @@ theorem characterKernel_sub_diagonal_perron (N : ℕ) [NeZero N] (hN : Even N) ( | ||
| 100 | 119 | simp only [perronRemainder, map_sub, map_neg] |
| 101 | 120 | ring |
| 102 | 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 | + | |
| 103 | 136 | end ConditionalGoldbach |
+146 −0 ConditionalGoldbach/Proofs/PerronDiagonalWeights.lean added View file
| @@ -0,0 +1,146 @@ | ||
| 1 | +module | |
| 2 | + | |
| 3 | +public import ConditionalGoldbach.Proofs.SpectralDiagonalBound | |
| 4 | + | |
| 5 | +/-! A uniform row-sum estimate for the diagonal Hardy Gram matrix. -/ | |
| 6 | +public section | |
| 7 | + | |
| 8 | +set_option autoImplicit false | |
| 9 | +noncomputable section | |
| 10 | +open scoped BigOperators | |
| 11 | +namespace ConditionalGoldbach | |
| 12 | + | |
| 13 | +private lemma mangoldt_prefix_le (M : ℕ) : | |
| 14 | + (∑ j ∈ Finset.range M, mangoldt (j + 1)) ≤ (M : ℝ) * (Real.log 4 + 4) := by | |
| 15 | + have he (k : ℕ) : (∑ j ∈ Finset.range k, mangoldt (j + 1)) = | |
| 16 | + ∑ j ∈ Finset.Icc 1 k, mangoldt j := by | |
| 17 | + induction k with | |
| 18 | + | zero => simp | |
| 19 | + | succ k ih => | |
| 20 | + have hs : Finset.Icc 1 (k + 1) = insert (k + 1) (Finset.Icc 1 k) := by | |
| 21 | + ext i | |
| 22 | + simp only [Finset.mem_Icc, Finset.mem_insert] | |
| 23 | + omega | |
| 24 | + rw [Finset.sum_range_succ, ih, hs, Finset.sum_insert (by simp)] | |
| 25 | + ring | |
| 26 | + rw [he, mangoldt_partialSum_eq_psi, mul_comm] | |
| 27 | + exact Chebyshev.psi_le_const_mul_self (Nat.cast_nonneg M) | |
| 28 | + | |
| 29 | +/-- Partial summation transfers the Chebyshev bound to any decreasing nonnegative weight. -/ | |
| 30 | +private lemma mangoldt_sum_antitone_le (u : ℕ → ℝ) (hu : Antitone u) (hu0 : ∀ j, 0 ≤ u j) | |
| 31 | + (M : ℕ) : (∑ j ∈ Finset.range M, mangoldt (j + 1) * u j) ≤ | |
| 32 | + (Real.log 4 + 4) * ∑ j ∈ Finset.range M, u j := by | |
| 33 | + let C : ℝ := Real.log 4 + 4 | |
| 34 | + let mass := fun k => ∑ j ∈ Finset.range k, mangoldt (j + 1) | |
| 35 | + have hmass (k : ℕ) : 0 ≤ (k : ℝ) * C - mass k := sub_nonneg.mpr (mangoldt_prefix_le k) | |
| 36 | + have hb (k : ℕ) : | |
| 37 | + (∑ j ∈ Finset.range k, mangoldt (j + 1) * u j) + ((k : ℝ) * C - mass k) * u k ≤ | |
| 38 | + C * ∑ j ∈ Finset.range k, u j := by | |
| 39 | + induction k with | |
| 40 | + | zero => simp [mass] | |
| 41 | + | succ k ih => | |
| 42 | + have hstep := mul_le_mul_of_nonneg_left (hu (Nat.le_succ k)) (hmass (k + 1)) | |
| 43 | + have hm : mass (k + 1) = mass k + mangoldt (k + 1) := Finset.sum_range_succ _ _ | |
| 44 | + rw [hm, Nat.cast_succ] at hstep | |
| 45 | + rw [Finset.sum_range_succ, Finset.sum_range_succ, hm, Nat.cast_succ] | |
| 46 | + linarith | |
| 47 | + exact (le_add_of_nonneg_right (mul_nonneg (hmass M) (hu0 M))).trans (hb M) | |
| 48 | + | |
| 49 | +private lemma overlap_div_le {x y : ℝ} (hx : 0 < x) (hy : 0 < y) : | |
| 50 | + min (y / x) (x / y) / y ≤ 4 * x / (x + y) ^ 2 := by | |
| 51 | + rcases le_total y x with h | h | |
| 52 | + · calc | |
| 53 | + _ ≤ (y / x) / y := div_le_div_of_nonneg_right (min_le_left _ _) hy.le | |
| 54 | + _ = 1 / x := by field_simp | |
| 55 | + _ ≤ _ := by | |
| 56 | + apply (div_le_div_iff₀ hx (by positivity)).mpr | |
| 57 | + have hsq : (x + y) ^ 2 ≤ (2 * x) ^ 2 := | |
| 58 | + (sq_le_sq₀ (by positivity) (by positivity)).mpr (by linarith) | |
| 59 | + linarith | |
| 60 | + · calc | |
| 61 | + _ ≤ (x / y) / y := div_le_div_of_nonneg_right (min_le_right _ _) hy.le | |
| 62 | + _ = x / y ^ 2 := by ring | |
| 63 | + _ ≤ _ := by | |
| 64 | + apply (div_le_div_iff₀ (by positivity) (by positivity)).mpr | |
| 65 | + have hsq : (x + y) ^ 2 ≤ (2 * y) ^ 2 := | |
| 66 | + (sq_le_sq₀ (by positivity) (by positivity)).mpr (by linarith) | |
| 67 | + nlinarith [mul_le_mul_of_nonneg_left hsq hx.le] | |
| 68 | + | |
| 69 | +/-- For every finite section, the row mass of the exponentially decaying overlap | |
| 70 | +`min(m/n,n/m)` against the tilted coprime diagonal is uniformly `O(1/a)`. -/ | |
| 71 | +theorem diagonalCoefficient_overlap_sum_le (N n M : ℕ) (hn : 1 ≤ n) (a : ℝ) (ha : 0 < a) : | |
| 72 | + (∑ j ∈ Finset.range M, diagonalCoefficient N j * (j + 1 : ℕ) ^ (-2 * a) * | |
| 73 | + min ((j + 1 : ℕ) / (n : ℝ)) ((n : ℝ) / (j + 1 : ℕ))) ≤ | |
| 74 | + 2 * (Real.log 4 + 4) / a := by | |
| 75 | + let x : ℝ := n | |
| 76 | + have hx : 0 < x := by dsimp [x]; exact_mod_cast (show 0 < n by omega) | |
| 77 | + let u := fun j : ℕ => x / ((x + j) * (x + j + 1)) | |
| 78 | + have hu0 (j : ℕ) : 0 ≤ u j := by dsimp [u]; positivity | |
| 79 | + have hu : Antitone u := by | |
| 80 | + intro j k hjk | |
| 81 | + have hjk' : (j : ℝ) ≤ k := by exact_mod_cast hjk | |
| 82 | + dsimp only [u] | |
| 83 | + apply div_le_div_of_nonneg_left hx.le (by positivity) | |
| 84 | + exact mul_le_mul (by linarith) (by linarith) (by positivity) (by positivity) | |
| 85 | + have hu_sum (k : ℕ) : (∑ j ∈ Finset.range k, u j) = 1 - x / (x + k) := by | |
| 86 | + induction k with | |
| 87 | + | zero => simp [hx.ne'] | |
| 88 | + | succ k ih => | |
| 89 | + rw [Finset.sum_range_succ, ih, Nat.cast_succ] | |
| 90 | + dsimp [u] | |
| 91 | + have hk : x + k ≠ 0 := ne_of_gt (by positivity) | |
| 92 | + have hks : x + k + 1 ≠ 0 := ne_of_gt (by positivity) | |
| 93 | + rw [show x + ((k : ℝ) + 1) = x + k + 1 by ring] | |
| 94 | + field_simp [hk, hks] | |
| 95 | + <;> ring | |
| 96 | + let C : ℝ := Real.log 4 + 4 | |
| 97 | + have hsum : (∑ j ∈ Finset.range M, mangoldt (j + 1) * u j) ≤ C := by | |
| 98 | + apply (mangoldt_sum_antitone_le u hu hu0 M).trans | |
| 99 | + rw [hu_sum] | |
| 100 | + have hC : 0 ≤ C := by dsimp [C]; positivity | |
| 101 | + change C * (1 - x / (x + M)) ≤ C | |
| 102 | + nlinarith [mul_nonneg hC (by positivity : 0 ≤ x / (x + M))] | |
| 103 | + have hterm (j : ℕ) : | |
| 104 | + diagonalCoefficient N j * (j + 1 : ℕ) ^ (-2 * a) * | |
| 105 | + min ((j + 1 : ℕ) / x) (x / (j + 1 : ℕ)) ≤ | |
| 106 | + (2 / a) * (mangoldt (j + 1) * u j) := by | |
| 107 | + let y : ℝ := (j + 1 : ℕ) | |
| 108 | + have hy : 0 < y := by dsimp [y]; positivity | |
| 109 | + have hΛ : 0 ≤ mangoldt (j + 1) := ArithmeticFunction.vonMangoldt_nonneg | |
| 110 | + have hcoeff : diagonalCoefficient N j ≤ mangoldt (j + 1) ^ 2 / y := by | |
| 111 | + unfold diagonalCoefficient | |
| 112 | + split_ifs | |
| 113 | + · rfl | |
| 114 | + · positivity | |
| 115 | + have hΛw : mangoldt (j + 1) * y ^ (-2 * a) ≤ 1 / (2 * a) := by | |
| 116 | + have hlog : mangoldt (j + 1) ≤ y ^ (2 * a) / (2 * a) := | |
| 117 | + ArithmeticFunction.vonMangoldt_le_log.trans (Real.log_le_rpow_div hy.le (by positivity)) | |
| 118 | + rw [show -2 * a = -(2 * a) by ring, Real.rpow_neg hy.le, ← div_eq_mul_inv] | |
| 119 | + apply (div_le_iff₀ (Real.rpow_pos_of_pos hy _)).mpr | |
| 120 | + linarith | |
| 121 | + have hweight : min (y / x) (x / y) / y ≤ 4 * u j := by | |
| 122 | + apply (overlap_div_le hx hy).trans | |
| 123 | + have hyj : y = (j : ℝ) + 1 := by simp [y] | |
| 124 | + rw [hyj, show x + ((j : ℝ) + 1) = x + j + 1 by ring] | |
| 125 | + dsimp [u] | |
| 126 | + rw [← mul_div_assoc] | |
| 127 | + apply div_le_div_of_nonneg_left (by positivity) (by positivity) | |
| 128 | + nlinarith [show 0 ≤ x + j + 1 by positivity] | |
| 129 | + calc | |
| 130 | + _ ≤ (mangoldt (j + 1) ^ 2 / y) * y ^ (-2 * a) * min (y / x) (x / y) := | |
| 131 | + mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hcoeff (Real.rpow_nonneg hy.le _)) | |
| 132 | + (le_min (by positivity) (by positivity)) | |
| 133 | + _ = mangoldt (j + 1) * (mangoldt (j + 1) * y ^ (-2 * a)) * | |
| 134 | + (min (y / x) (x / y) / y) := by ring | |
| 135 | + _ ≤ mangoldt (j + 1) * (1 / (2 * a)) * (4 * u j) := | |
| 136 | + mul_le_mul (mul_le_mul_of_nonneg_left hΛw hΛ) hweight | |
| 137 | + (div_nonneg (le_min (by positivity) (by positivity)) hy.le) (by positivity) | |
| 138 | + _ = _ := by ring | |
| 139 | + calc | |
| 140 | + _ ≤ ∑ j ∈ Finset.range M, (2 / a) * (mangoldt (j + 1) * u j) := | |
| 141 | + Finset.sum_le_sum (fun j _ => hterm j) | |
| 142 | + _ = (2 / a) * ∑ j ∈ Finset.range M, mangoldt (j + 1) * u j := (Finset.mul_sum ..).symm | |
| 143 | + _ ≤ (2 / a) * C := mul_le_mul_of_nonneg_left hsum (by positivity) | |
| 144 | + _ = _ := by dsimp [C]; ring | |
| 145 | + | |
| 146 | +end ConditionalGoldbach | |
+1 −1 ConditionalGoldbach/Proofs/ResidualTraceComparison.lean View file
| @@ -20,7 +20,7 @@ theorem SpectralData.hsNorm_sq_le_traces_add_error | ||
| 20 | 20 | hsNorm T ^ 2 ≤ 2 * ‖T‖ * (positiveTrace P + positiveTrace D) + hsNorm K ^ 2 := by |
| 21 | 21 | let p := fun j => (paperInner (P (d.basis j)) (d.basis j)).re |
| 22 | 22 | let q := fun j => (paperInner (D (d.basis j)) (d.basis j)).re |
| 23 | - have hT (x : H) : T x = P x - D x - K x := by simp only [he, ContinuousLinearMap.sub_apply] | |
| 23 | + have hT (x : H) : T x = P x - D x - K x := by simp only [he, sub_apply] | |
| 24 | 24 | have hpoint (j : ℕ) : d.values j ^ 2 ≤ |
| 25 | 25 | 2 * ‖T‖ * (p j + q j) + ‖K (d.basis j)‖ ^ 2 := by |
| 26 | 26 | have hp : 0 ≤ p j := hP.2.1 _ |
