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.Definitions.Asymptotics |
| 4 | public import ConditionalGoldbach.Definitions.Characters |
| 5 | import Mathlib.Tactic.NormNum.RealSqrt |
| 6 | |
| 7 | public section |
| 8 | |
| 9 | set_option autoImplicit false |
| 10 | noncomputable section |
| 11 | open scoped BigOperators ComplexConjugate Topology ContDiff |
| 12 | open MeasureTheory Filter Set Complex |
| 13 | namespace ConditionalGoldbach |
| 14 | attribute [local instance] Classical.propDecidable conductorNeZero |
| 15 | |
| 16 | theorem singularSeries_eq_existing (N : ℕ) : |
| 17 | singularSeries N = 2 * MathlibNt.SieveTheory.SingularSeries.liuSingularSeries N := rfl |
| 18 | |
| 19 | theorem singularSeries_pos (N : ℕ) : 0 < singularSeries N := by |
| 20 | exact mul_pos (by norm_num) (MathlibNt.SieveTheory.SingularSeries.liuSingularSeries_pos N) |
| 21 | |
| 22 | theorem singularSeries_uniform_lower (N : ℕ) : 2 * C2 ≤ singularSeries N := by |
| 23 | exact mul_le_mul_of_nonneg_left |
| 24 | (MathlibNt.SieveTheory.SingularSeries.liuUniversalProduct_le_liuSingularSeries N) (by norm_num) |
| 25 | |
| 26 | theorem C2_pos : 0 < C2 := MathlibNt.SieveTheory.SingularSeries.liuUniversalProduct_pos |
| 27 | |
| 28 | theorem EvenEventually.mono {P Q : ℕ → Prop} (hP : EvenEventually P) |
| 29 | (hPQ : ∀ N, P N → Q N) : EvenEventually Q := by |
| 30 | obtain ⟨n, hn⟩ := hP |
| 31 | exact ⟨n, fun N hN he => hPQ N (hn N hN he)⟩ |
| 32 | |
| 33 | theorem EvenEventually.and {P Q : ℕ → Prop} (hP : EvenEventually P) |
| 34 | (hQ : EvenEventually Q) : EvenEventually (fun N => P N ∧ Q N) := by |
| 35 | obtain ⟨p, hp⟩ := hP |
| 36 | obtain ⟨q, hq⟩ := hQ |
| 37 | exact ⟨max p q, fun N hN he => |
| 38 | ⟨hp N (le_trans (le_max_left _ _) hN) he, |
| 39 | hq N (le_trans (le_max_right _ _) hN) he⟩⟩ |
| 40 | |
| 41 | theorem EvenEventually.of_forall {P : ℕ → Prop} (h : ∀ N, P N) : EvenEventually P := |
| 42 | ⟨0, fun N _ _ => h N⟩ |
| 43 | |
| 44 | theorem evenEventually_large : EvenEventually (fun N => Real.exp 10 < (N : ℝ)) := by |
| 45 | obtain ⟨n, hn⟩ := exists_nat_gt (Real.exp 10) |
| 46 | exact ⟨n, fun N hN _ => lt_of_lt_of_le hn (by exact_mod_cast hN)⟩ |
| 47 | |
| 48 | theorem large_parameters {N : ℕ} (hlarge : Real.exp 10 < (N : ℝ)) : |
| 49 | 4 ≤ N ∧ 0 < Real.log (N : ℝ) ∧ alpha N < beta := by |
| 50 | have hten : (10 : ℝ) < Real.log (N : ℝ) := by |
| 51 | have h := Real.log_lt_log (Real.exp_pos 10) hlarge |
| 52 | simpa using h |
| 53 | have hexp : (11 : ℝ) ≤ Real.exp 10 := by simpa only [show (10 : ℝ) + 1 = 11 by norm_num] using Real.add_one_le_exp (10 : ℝ) |
| 54 | have hN4 : 4 ≤ N := by exact_mod_cast (show (4 : ℝ) ≤ N by linarith) |
| 55 | refine ⟨hN4, by linarith, ?_⟩ |
| 56 | dsimp [alpha, beta] |
| 57 | exact (div_lt_div_iff₀ (by linarith : (0 : ℝ) < Real.log N) (by norm_num : (0 : ℝ) < 8)).2 (by linarith) |
| 58 | |
| 59 | end ConditionalGoldbach |
