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.CharacterZeroCounting |
| 4 | public import ConditionalGoldbach.Proofs.CharacterZeroReflection |
| 5 | |
| 6 | /-! Uniform, unconditional local zero counting, including multiplicities and both half-strips. -/ |
| 7 | public section |
| 8 | |
| 9 | set_option autoImplicit false |
| 10 | noncomputable section |
| 11 | open scoped BigOperators ComplexConjugate Topology |
| 12 | open Set Complex Metric Filter |
| 13 | namespace ConditionalGoldbach |
| 14 | |
| 15 | lemma zeroClosedWindow_finite {d : ℕ} [NeZero d] (χ : Character d) (hχ : χ ≠ 1) (t : ℝ) : |
| 16 | ({p : ZeroIndex χ | t ≤ p.val.1.im ∧ p.val.1.im ≤ t+1} : Set _).Finite := by |
| 17 | apply ((zeroWindow_finite χ hχ t).union (zeroWindow_finite χ hχ (t+1))).subset |
| 18 | intro p hp |
| 19 | by_cases hh : p.val.1.im < t+1 |
| 20 | · exact Or.inl ⟨hp.1,hh⟩ |
| 21 | · exact Or.inr ⟨le_of_not_gt hh,by linarith [hp.2]⟩ |
| 22 | |
| 23 | lemma zeroWindow_count_le_right_counts {d : ℕ} [NeZero d] (χ : Character d) |
| 24 | (hχ : χ ≠ 1) (hprim : χ.IsPrimitive) (t : ℝ) : |
| 25 | (zeroWindow χ t).ncard ≤ |
| 26 | ({p : ZeroIndex χ | 1/2 ≤ p.val.1.re ∧ t ≤ p.val.1.im ∧ p.val.1.im ≤ t+1} : Set _).ncard + |
| 27 | ({p : ZeroIndex χ⁻¹ | 1/2 ≤ p.val.1.re ∧ -t-1 ≤ p.val.1.im ∧ p.val.1.im ≤ -t} : Set _).ncard := by |
| 28 | let R : Set (ZeroIndex χ) := {p | 1/2 ≤ p.val.1.re ∧ t ≤ p.val.1.im ∧ p.val.1.im ≤ t+1} |
| 29 | let L : Set (ZeroIndex χ) := {p | p ∈ zeroWindow χ t ∧ p.val.1.re < 1/2} |
| 30 | let R' : Set (ZeroIndex χ⁻¹) := {p | 1/2 ≤ p.val.1.re ∧ -t-1 ≤ p.val.1.im ∧ p.val.1.im ≤ -t} |
| 31 | have hR : R.Finite := (zeroClosedWindow_finite χ hχ t).subset (fun _ h => h.2) |
| 32 | have hL : L.Finite := (zeroWindow_finite χ hχ t).subset (fun _ h => h.1) |
| 33 | have hR' : R'.Finite := (zeroClosedWindow_finite χ⁻¹ (inv_ne_one.mpr hχ) (-t-1)).subset (by |
| 34 | intro p hp |
| 35 | exact ⟨hp.2.1,by linarith [hp.2.2]⟩) |
| 36 | have hcover : zeroWindow χ t ⊆ R ∪ L := by |
| 37 | intro p hp |
| 38 | by_cases hr : 1/2 ≤ p.val.1.re |
| 39 | · exact Or.inl ⟨hr,hp.1,hp.2.le⟩ |
| 40 | · exact Or.inr ⟨hp,lt_of_not_ge hr⟩ |
| 41 | have hcardL : L.ncard ≤ R'.ncard := by |
| 42 | apply Set.ncard_le_ncard_of_injOn (reflectedZero χ hχ hprim) _ |
| 43 | (reflectedZero_injective χ hχ hprim).injOn hR' |
| 44 | intro p hp |
| 45 | change 1/2 ≤ (1-p.val.1).re ∧ -t-1 ≤ (1-p.val.1).im ∧ (1-p.val.1).im ≤ -t |
| 46 | simp only [sub_re,sub_im,one_re,one_im,zero_sub] |
| 47 | exact ⟨by linarith [hp.2],by linarith [hp.1.2],by linarith [hp.1.1]⟩ |
| 48 | exact (Set.ncard_le_ncard hcover (hR.union hL)).trans |
| 49 | ((Set.ncard_union_le R L).trans (Nat.add_le_add_left hcardL _)) |
| 50 | |
| 51 | lemma logarithm_zero_count_bound (d : ℕ) (hd : 1 ≤ d) (t : ℝ) : |
| 52 | Real.log (39*(d : ℝ)*(|t|+2)) ≤ 79*Real.log ((d : ℝ)*(|t|+2)) := by |
| 53 | have hdR : (1 : ℝ) ≤ d := by exact_mod_cast hd |
| 54 | let X : ℝ := (d : ℝ)*(|t|+2) |
| 55 | have hX : 2 ≤ X := by dsimp [X]; nlinarith [abs_nonneg t] |
| 56 | have hXp : 0 < X := by linarith |
| 57 | have hlog : (1/2 : ℝ) ≤ Real.log X := by |
| 58 | have hh := Real.one_sub_inv_le_log_of_pos (by norm_num : (0 : ℝ)<2) |
| 59 | have hxlog := Real.log_le_log (by norm_num : (0 : ℝ)<2) hX |
| 60 | norm_num at hh |
| 61 | linarith |
| 62 | have he : 39*(d : ℝ)*(|t|+2) = 39*X := by dsimp [X]; ring |
| 63 | rw [he,Real.log_mul (by norm_num : (39 : ℝ)≠0) hXp.ne'] |
| 64 | have hh := Real.log_le_sub_one_of_pos (by norm_num : (0 : ℝ)<39) |
| 65 | change Real.log 39+Real.log X ≤ 79*Real.log X |
| 66 | linarith |
| 67 | |
| 68 | theorem primitive_local_zero_count : ∃ C : ℝ, 0 < C ∧ |
| 69 | ∀ d : ℕ, ∀ (_ : NeZero d), ∀ χ : Character d, |
| 70 | χ ≠ 1 → χ.IsPrimitive → ∀ t : ℝ, |
| 71 | (zeroWindow χ t).Finite ∧ |
| 72 | ((zeroWindow χ t).ncard : ℝ) ≤ C*Real.log (d*(|t|+2)) := by |
| 73 | let D : ℝ := Real.log ((11/4 : ℝ)/(8/3)) |
| 74 | have hD : 0 < D := Real.log_pos (by norm_num) |
| 75 | refine ⟨158/D, by positivity, fun d _ χ hχ hprim t => ⟨zeroWindow_finite χ hχ t,?_⟩⟩ |
| 76 | have hd : 1 ≤ d := Nat.one_le_iff_ne_zero.mpr (NeZero.ne d) |
| 77 | have hdR : (1 : ℝ) ≤ d := by exact_mod_cast hd |
| 78 | have hright := LFunction_zero_count_right_half_closed χ hχ t |
| 79 | have hleft := LFunction_zero_count_right_half_closed χ⁻¹ (inv_ne_one.mpr hχ) (-t-1) |
| 80 | have hsum := zeroWindow_count_le_right_counts χ hχ hprim t |
| 81 | have hleft' : (({p : ZeroIndex χ⁻¹ | 1/2 ≤ p.val.1.re ∧ -t-1 ≤ p.val.1.im ∧ p.val.1.im ≤ -t} : Set _).ncard : ℝ) ≤ |
| 82 | Real.log (26*(d : ℝ)*(|-t-1|+2))/D := by |
| 83 | convert hleft using 2; congr 3; ring_nf |
| 84 | have hlog := logarithm_zero_count_bound d hd t |
| 85 | have hr : Real.log (26*(d : ℝ)*(|t|+2)) ≤ 79*Real.log ((d : ℝ)*(|t|+2)) := by |
| 86 | apply (Real.log_le_log (by positivity) _).trans hlog |
| 87 | nlinarith [abs_nonneg t] |
| 88 | have hl : Real.log (26*(d : ℝ)*(|-t-1|+2)) ≤ 79*Real.log ((d : ℝ)*(|t|+2)) := by |
| 89 | apply (Real.log_le_log (by positivity) _).trans hlog |
| 90 | have hh : |-t-1| ≤ |t|+1 := by |
| 91 | simpa only [sub_eq_add_neg,abs_neg,abs_one] using abs_add_le (-t) (-1 : ℝ) |
| 92 | nlinarith [mul_le_mul_of_nonneg_left hh (by linarith : (0 : ℝ)≤d),abs_nonneg t] |
| 93 | have hright' := hright.trans (div_le_div_of_nonneg_right hr hD.le) |
| 94 | have hleft'' := hleft'.trans (div_le_div_of_nonneg_right hl hD.le) |
| 95 | have hsumR : ((zeroWindow χ t).ncard : ℝ) ≤ |
| 96 | (({p : ZeroIndex χ | 1/2 ≤ p.val.1.re ∧ t ≤ p.val.1.im ∧ p.val.1.im ≤ t+1} : Set _).ncard : ℝ) + |
| 97 | (({p : ZeroIndex χ⁻¹ | 1/2 ≤ p.val.1.re ∧ -t-1 ≤ p.val.1.im ∧ p.val.1.im ≤ -t} : Set _).ncard : ℝ) := by |
| 98 | exact_mod_cast hsum |
| 99 | calc |
| 100 | _ ≤ 79*Real.log ((d : ℝ)*(|t|+2))/D + 79*Real.log ((d : ℝ)*(|t|+2))/D := |
| 101 | hsumR.trans (add_le_add hright' hleft'') |
| 102 | _ = _ := by ring |
| 103 | |
| 104 | end ConditionalGoldbach |
