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.FiniteCharacterShift |
| 4 | public import ConditionalGoldbach.Proofs.FiniteMellinDouble |
| 5 | public import ConditionalGoldbach.Proofs.MellinDiagonal |
| 6 | public import ConditionalGoldbach.Proofs.WideMoments |
| 7 | public import ConditionalGoldbach.Proofs.WideModelData |
| 8 | |
| 9 | /-! The finite-smooth arithmetic double Mellin projections for Appendix B. -/ |
| 10 | public section |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | noncomputable section |
| 14 | open scoped BigOperators ComplexConjugate Topology ContDiff |
| 15 | open MeasureTheory Filter Set Complex |
| 16 | namespace ConditionalGoldbach |
| 17 | attribute [local instance] Classical.propDecidable |
| 18 | |
| 19 | lemma countingIntegral_star (χ : Character experimentN) : |
| 20 | countingIntegral (star χ)=conj (countingIntegral χ) := by |
| 21 | simp only [countingIntegral_exact,map_neg,map_sum,map_mul, |
| 22 | Complex.conj_ofReal,MulChar.star_apply,RCLike.star_def] |
| 23 | |
| 24 | lemma counting_odd_energy : |
| 25 | (2/(experimentN.totient:ℝ))*∑ χ∈oddCharacters experimentN, ‖countingIntegral χ‖^2 = |
| 26 | diagonalCountingMoment-wideCorrelation := by |
| 27 | have ho := finite_odd_projection experimentN (by decide) (by norm_num [experimentN]) |
| 28 | countingCoefficient countingCoefficient_zero (countingCoefficient_of_large (le_refl _)) |
| 29 | rw [← wideCorrelation_counting] at ho |
| 30 | simp only [Finset.sum_range_succ (n := experimentN),countingCoefficient_of_large (le_refl experimentN),Complex.ofReal_zero, |
| 31 | zero_mul,add_zero,zero_pow (by norm_num : (2:ℕ)≠0),ite_self] at ho |
| 32 | simpa only [diagonalCountingMoment,countingIntegral_exact,norm_neg] using ho |
| 33 | |
| 34 | lemma countingIntegral_shift (hGRH : GRH experimentN) (χ : Character experimentN) |
| 35 | (hχ : χ∈oddCharacters experimentN) (σ : ℝ) (hσ : 0<σ) (hσ1 : σ≤1) : |
| 36 | Integrable (fun t : ℝ => (experimentN:ℂ)^(line σ t)* |
| 37 | mellin (fun u => (wideCompanion u:ℂ)) (line σ t)*logDerivative χ (line σ t)) ∧ |
| 38 | verticalMellin σ (fun s => (experimentN:ℂ)^s* |
| 39 | mellin (fun u => (wideCompanion u:ℂ)) s*logDerivative χ s)=countingIntegral χ := by |
| 40 | exact finite_character_mellin_shift (by norm_num [experimentN]) hGRH χ hχ wideCompanion |
| 41 | (wideCompanion_contDiff.of_le (by norm_num)) _ _ |
| 42 | (wideCompanion_support.trans Ioo_subset_Icc_self) σ hσ hσ1 |
| 43 | |
| 44 | lemma wide_character_mellin (hGRH : GRH experimentN) (σ : ℝ) (hσ : 0<σ) (hσ1 : σ≤1) : |
| 45 | Integrable (fun p : ℝ×ℝ => (experimentN:ℂ)^(line σ p.1+line σ p.2)* |
| 46 | mellin (fun u => (wideCompanion u:ℂ)) (line σ p.1)* |
| 47 | mellin (fun u => (wideCompanion u:ℂ)) (line σ p.2)*characterKernel experimentN (line σ p.1) (line σ p.2)) ∧ |
| 48 | verticalMellin σ (fun s => verticalMellin σ (fun z => (experimentN:ℂ)^(s+z)* |
| 49 | mellin (fun u => (wideCompanion u:ℂ)) s*mellin (fun u => (wideCompanion u:ℂ)) z* |
| 50 | characterKernel experimentN s z))=(diagonalCountingMoment-wideCorrelation:ℝ) := by |
| 51 | have hfac (s z : ℂ) := weighted_characterKernel_factor experimentN wideWeight s z |
| 52 | simp only [mellinWeight_wideWeight] at hfac |
| 53 | have hi (χ : Character experimentN) (hχ : χ∈oddCharacters experimentN) := |
| 54 | countingIntegral_shift hGRH χ hχ σ hσ hσ1 |
| 55 | have hs (χ : Character experimentN) (hχ : χ∈oddCharacters experimentN) := |
| 56 | countingIntegral_shift hGRH (star χ) ((star_mem_oddCharacters χ).mpr hχ) σ hσ hσ1 |
| 57 | constructor |
| 58 | · simp_rw [hfac] |
| 59 | exact (integrable_finsetSum _ (fun χ hχ => (hi χ hχ).1.mul_prod (hs χ hχ).1)).const_mul _ |
| 60 | · simp_rw [hfac] |
| 61 | rw [double_verticalMellin_finset_prod (oddCharacters experimentN) σ _ _ _ |
| 62 | (fun χ hχ => (hi χ hχ).1) (fun χ hχ => (hs χ hχ).1)] |
| 63 | have he (χ : Character experimentN) (hχ : χ∈oddCharacters experimentN) : |
| 64 | verticalMellin σ (fun s => (experimentN:ℂ)^s*mellin (fun u => (wideCompanion u:ℂ)) s*logDerivative χ s)* |
| 65 | verticalMellin σ (fun z => (experimentN:ℂ)^z*mellin (fun u => (wideCompanion u:ℂ)) z*logDerivative (star χ) z)= |
| 66 | (‖countingIntegral χ‖^2:ℝ) := by |
| 67 | rw [(hi χ hχ).2,(hs χ hχ).2,countingIntegral_star,Complex.mul_conj,Complex.normSq_eq_norm_sq] |
| 68 | rw [Finset.sum_congr rfl he] |
| 69 | simpa only [Complex.ofReal_mul,Complex.ofReal_div,Complex.ofReal_ofNat,Complex.ofReal_natCast,Complex.ofReal_sum,Complex.ofReal_pow] using congrArg Complex.ofReal counting_odd_energy |
| 70 | |
| 71 | lemma wide_diagonal_term (n : ℕ) : |
| 72 | ((mangoldt n:ℂ)^2/(n:ℂ))*(wideCompanion (n/experimentN):ℂ)^2=(countingCoefficient n:ℂ)^2 := by |
| 73 | by_cases hn : n=0 |
| 74 | · subst n |
| 75 | simp [mangoldt,countingCoefficient] |
| 76 | have hp : 0<(n:ℝ) := by exact_mod_cast Nat.pos_of_ne_zero hn |
| 77 | have hz : (Real.sqrt (n:ℝ):ℂ)≠0 := by exact_mod_cast (Real.sqrt_pos.mpr hp).ne' |
| 78 | have he : (Real.sqrt (n:ℝ):ℂ)^2=(n:ℂ) := by exact_mod_cast Real.sq_sqrt hp.le |
| 79 | simp only [countingCoefficient,Complex.ofReal_mul,Complex.ofReal_div,mul_pow,div_pow] |
| 80 | rw [he] |
| 81 | |
| 82 | lemma wide_diagonal_tsum : |
| 83 | (∑' k : ℕ, (if Nat.Coprime (k+1) experimentN then |
| 84 | (mangoldt (k+1):ℂ)^2/(k+1:ℕ) else 0)*(wideCompanion ((k+1:ℕ)/experimentN):ℂ)^2)= |
| 85 | (diagonalCountingMoment:ℂ) := by |
| 86 | let f : ℕ→ℂ := fun n => if Nat.Coprime n experimentN then (countingCoefficient n:ℂ)^2 else 0 |
| 87 | have hz : ∀n∉Finset.range experimentN, f n=0 := by |
| 88 | intro n hn |
| 89 | have hh : experimentN≤n := by simpa only [Finset.mem_range,not_lt] using hn |
| 90 | simp [f,countingCoefficient_of_large hh] |
| 91 | have hf : Summable f := summable_of_ne_finset_zero hz |
| 92 | have ht (k : ℕ) : (if Nat.Coprime (k+1) experimentN then (mangoldt (k+1):ℂ)^2/(k+1:ℕ) else 0)* |
| 93 | (wideCompanion ((k+1:ℕ)/experimentN):ℂ)^2=f (k+1) := by |
| 94 | dsimp [f] |
| 95 | split_ifs |
| 96 | · exact wide_diagonal_term _ |
| 97 | · simp |
| 98 | simp_rw [ht] |
| 99 | have h0 : f 0=0 := by simp [f] |
| 100 | rw [← zero_add (∑' k, f (k+1)),← h0,← hf.tsum_eq_zero_add,tsum_eq_sum hz] |
| 101 | simp only [diagonalCountingMoment,Complex.ofReal_sum,apply_ite Complex.ofReal,Complex.ofReal_pow,Complex.ofReal_zero,f] |
| 102 | |
| 103 | lemma wide_diagonal_mellin (σ : ℝ) (hσ : 0<σ) : |
| 104 | Integrable (fun p : ℝ×ℝ => (experimentN:ℂ)^(line σ p.1+line σ p.2)* |
| 105 | mellin (fun u => (wideCompanion u:ℂ)) (line σ p.1)* |
| 106 | mellin (fun u => (wideCompanion u:ℂ)) (line σ p.2)*diagonalSeries experimentN (line σ p.1+line σ p.2)) ∧ |
| 107 | verticalMellin σ (fun s => verticalMellin σ (fun z => (experimentN:ℂ)^(s+z)* |
| 108 | mellin (fun u => (wideCompanion u:ℂ)) s*mellin (fun u => (wideCompanion u:ℂ)) z* |
| 109 | diagonalSeries experimentN (s+z)))=(diagonalCountingMoment:ℂ) := by |
| 110 | have hN : 0<experimentN := by norm_num [experimentN] |
| 111 | obtain ⟨hi,hs⟩ := finite_double_mellin_inversion_series wideCompanion |
| 112 | (wideCompanion_contDiff.of_le (by norm_num)) _ _ (wideCompanion_support.trans Ioo_subset_Icc_self) σ hσ |
| 113 | (fun k : ℕ => (k+1:ℕ)/(experimentN:ℝ)) |
| 114 | (fun k : ℕ => if Nat.Coprime (k+1) experimentN then (mangoldt (k+1):ℂ)^2/(k+1:ℕ) else 0) |
| 115 | (fun k => by positivity) (diagonal_mellin_coeff_summable experimentN hN σ hσ) |
| 116 | have he (x y : ℝ) := diagonal_mellin_series experimentN hN wideWeight (line σ x) (line σ y) |
| 117 | (by simp [line]; linarith) |
| 118 | simp only [mellinWeight_wideWeight] at he |
| 119 | constructor |
| 120 | · exact hi.congr (Eventually.of_forall (fun p => he p.1 p.2)) |
| 121 | · rw [← wide_diagonal_tsum,hs.tsum_eq] |
| 122 | unfold verticalMellin |
| 123 | congr 1 |
| 124 | apply integral_congr_ae |
| 125 | filter_upwards [] with x |
| 126 | congr 1 |
| 127 | apply integral_congr_ae |
| 128 | filter_upwards [] with y |
| 129 | exact (he x y).symm |
| 130 | |
| 131 | end ConditionalGoldbach |
