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.Main |
| 4 | |
| 5 | /-! Relative error consequences of the exact quadratic form and the spectral dictionary. -/ |
| 6 | public section |
| 7 | |
| 8 | set_option autoImplicit false |
| 9 | noncomputable section |
| 10 | open scoped BigOperators ComplexConjugate Topology ContDiff |
| 11 | open MeasureTheory Filter Set Complex |
| 12 | namespace ConditionalGoldbach |
| 13 | |
| 14 | /-- The relative scale in Lemma 7.5; its proof is entirely scalar algebra. -/ |
| 15 | theorem spectralScale_relative_bound (N : ℕ) (hN : 0 < (N : ℝ)) |
| 16 | (hS : 0 < singularSeries N) (hlog : 0 < Real.log N) |
| 17 | (η : ℝ) (hη : 0 < η) (hη' : η ≤ 1 / 4) : |
| 18 | spectralScale N / (2 * Real.sqrt (η * (1 - η)) * singularSeries N) ≤ |
| 19 | Real.sqrt (Real.log N ^ 3 / (N * η * singularSeries N)) := by |
| 20 | have hprod : 0 < η * (1 - η) := mul_pos hη (by linarith) |
| 21 | have hroot : 0 < Real.sqrt (η * (1 - η)) := Real.sqrt_pos.2 hprod |
| 22 | have hr : 0 ≤ Real.log N ^ 3 / (N * η * singularSeries N) := by positivity |
| 23 | have heq : (2 * Real.sqrt (η * (1 - η)) * singularSeries N * |
| 24 | Real.sqrt (Real.log N ^ 3 / (N * η * singularSeries N))) ^ 2 = |
| 25 | 4 * (1 - η) * spectralScale N ^ 2 := by |
| 26 | simp only [mul_pow] |
| 27 | rw [Real.sq_sqrt hprod.le, Real.sq_sqrt hr, spectralScale_sq N hN hS.le hlog.le] |
| 28 | field_simp |
| 29 | ring |
| 30 | apply (div_le_iff₀ (by positivity : |
| 31 | 0 < 2 * Real.sqrt (η * (1 - η)) * singularSeries N)).2 |
| 32 | have hδ := spectralScale_pos N hN hS hlog |
| 33 | have haux : 0 ≤ (3 - 4 * η) * spectralScale N ^ 2 := |
| 34 | mul_nonneg (by linarith) (sq_nonneg _) |
| 35 | have hn : 0 ≤ 2 * Real.sqrt (η * (1 - η)) * singularSeries N * |
| 36 | Real.sqrt (Real.log N ^ 3 / (N * η * singularSeries N)) := by positivity |
| 37 | nlinarith [sq_nonneg (spectralScale N - |
| 38 | 2 * Real.sqrt (η * (1 - η)) * singularSeries N * |
| 39 | Real.sqrt (Real.log N ^ 3 / (N * η * singularSeries N)))] |
| 40 | |
| 41 | theorem lemma_7_5 (φ : ℝ → ℝ) (hφ : IsWeight φ) : |
| 42 | ∃ C : ℝ, 0 < C ∧ ∀ N : ℕ, ∀ (_ : NeZero N), Even N → |
| 43 | Real.exp 10 < (N : ℝ) → GRH N → ∀ ha : alpha N < beta, |
| 44 | ∀ η : ℝ, 0 < η → η ≤ 1 / 4 → SpectralZeroFree N (alpha N) ha η → |
| 45 | |goldbach N φ - weightMass φ * singularSeries N| / (weightMass φ * singularSeries N) ≤ |
| 46 | C * Real.sqrt (Real.log N ^ 3 / (N * η * singularSeries N)) := by |
| 47 | let A := Real.exp 2 * weightEnergy φ |
| 48 | let m := weightMass φ |
| 49 | have hm : 0 < m := weightMass_pos hφ |
| 50 | have hA : 0 ≤ A := mul_nonneg (Real.exp_pos _).le (weightEnergy_nonneg _) |
| 51 | refine ⟨A / m + 1, by positivity, ?_⟩ |
| 52 | intro N hNZ hN hlarge hGRH ha η hη hη' hz |
| 53 | have hp := large_parameters hlarge |
| 54 | have hNr : 0 < (N : ℝ) := by exact_mod_cast (show 0 < N by omega) |
| 55 | have hS := singularSeries_pos N |
| 56 | have hroot : 0 < Real.sqrt (η * (1 - η)) := |
| 57 | Real.sqrt_pos.2 (mul_pos hη (by linarith)) |
| 58 | have hnorm := ((theorem_6_1 N hN hlarge hGRH ha).2.1 η hη (by linarith)).1 hz |
| 59 | have herr : |goldbach N φ - m * singularSeries N| ≤ |
| 60 | A * (spectralScale N / (2 * Real.sqrt (η * (1 - η)))) := by |
| 61 | apply le_trans _ (mul_le_mul_of_nonneg_left hnorm hA) |
| 62 | simpa only [A, m, abs_sub_comm] using |
| 63 | theorem_7_1_uniform N hN hlarge hGRH φ hφ ha |
| 64 | calc |
| 65 | |goldbach N φ - weightMass φ * singularSeries N| / |
| 66 | (weightMass φ * singularSeries N) |
| 67 | ≤ (A * (spectralScale N / (2 * Real.sqrt (η * (1 - η))))) / |
| 68 | (m * singularSeries N) := div_le_div_of_nonneg_right herr (mul_pos hm hS).le |
| 69 | _ = (A / m) * (spectralScale N / |
| 70 | (2 * Real.sqrt (η * (1 - η)) * singularSeries N)) := by ring |
| 71 | _ ≤ (A / m) * Real.sqrt (Real.log N ^ 3 / (N * η * singularSeries N)) := |
| 72 | mul_le_mul_of_nonneg_left (spectralScale_relative_bound N hNr hS hp.2.1 η hη hη') |
| 73 | (div_nonneg hA hm.le) |
| 74 | _ ≤ (A / m + 1) * Real.sqrt (Real.log N ^ 3 / (N * η * singularSeries N)) := |
| 75 | mul_le_mul_of_nonneg_right (by linarith) (Real.sqrt_nonneg _) |
| 76 | |
| 77 | |
| 78 | theorem lemma_7_5_asymptotic (φ : ℝ → ℝ) (hφ : IsWeight φ) : |
| 79 | ∀ ε : ℝ, 0 < ε → ∃ B : ℝ, 0 < B ∧ |
| 80 | ∀ N : ℕ, ∀ (_ : NeZero N), Even N → Real.exp 10 < (N : ℝ) → GRH N → |
| 81 | ∀ ha : alpha N < beta, ∀ η : ℝ, 0 < η → η ≤ 1 / 4 → |
| 82 | SpectralZeroFree N (alpha N) ha η → |
| 83 | B ≤ N * η * singularSeries N / Real.log N ^ 3 → |
| 84 | |goldbach N φ / (weightMass φ * singularSeries N) - 1| < ε := by |
| 85 | intro ε hε |
| 86 | obtain ⟨C, hC, herr⟩ := lemma_7_5 φ hφ |
| 87 | let B := (C / ε) ^ 2 + 1 |
| 88 | refine ⟨B, by positivity, ?_⟩ |
| 89 | intro N hNZ hN hlarge hGRH ha η hη hη' hz hB |
| 90 | have hp := large_parameters hlarge |
| 91 | have hNr : 0 < (N : ℝ) := by exact_mod_cast (show 0 < N by omega) |
| 92 | have hS := singularSeries_pos N |
| 93 | have hm := weightMass_pos hφ |
| 94 | have hlog : 0 < Real.log N ^ 3 := pow_pos hp.2.1 _ |
| 95 | have hden : 0 < (N : ℝ) * η * singularSeries N := by positivity |
| 96 | have hBmul : B * Real.log N ^ 3 ≤ (N : ℝ) * η * singularSeries N := |
| 97 | (le_div_iff₀ hlog).1 hB |
| 98 | have hCB : C ^ 2 < ε ^ 2 * B := by |
| 99 | dsimp [B] |
| 100 | have hcanc : ε ^ 2 * (C / ε) ^ 2 = C ^ 2 := by field_simp |
| 101 | nlinarith [sq_pos_of_pos hε] |
| 102 | have hsquared : C ^ 2 * Real.log N ^ 3 < ε ^ 2 * (N * η * singularSeries N) := |
| 103 | calc |
| 104 | _ < ε ^ 2 * B * Real.log N ^ 3 := mul_lt_mul_of_pos_right hCB hlog |
| 105 | _ = ε ^ 2 * (B * Real.log N ^ 3) := by ring |
| 106 | _ ≤ _ := mul_le_mul_of_nonneg_left hBmul (sq_nonneg _) |
| 107 | have hratio : C ^ 2 * (Real.log N ^ 3 / (N * η * singularSeries N)) < ε ^ 2 := by |
| 108 | rw [← mul_div_assoc] |
| 109 | exact (div_lt_iff₀ hden).2 hsquared |
| 110 | have hsqrt := Real.sq_sqrt (show 0 ≤ Real.log N ^ 3 / (N * η * singularSeries N) by positivity) |
| 111 | have hsmall : C * Real.sqrt (Real.log N ^ 3 / (N * η * singularSeries N)) < ε := by |
| 112 | nlinarith [Real.sqrt_nonneg (Real.log N ^ 3 / (N * η * singularSeries N))] |
| 113 | have heq : |goldbach N φ / (weightMass φ * singularSeries N) - 1| = |
| 114 | |goldbach N φ - weightMass φ * singularSeries N| / (weightMass φ * singularSeries N) := by |
| 115 | rw [div_sub_one (mul_pos hm hS).ne', abs_div, abs_of_pos (mul_pos hm hS)] |
| 116 | rw [heq] |
| 117 | exact (herr N hNZ hN hlarge hGRH ha η hη hη' hz).trans_lt hsmall |
| 118 | |
| 119 | end ConditionalGoldbach |
