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.CharacterGrowth |
| 4 | public import ConditionalGoldbach.Proofs.MellinContourShift |
| 5 | public import ConditionalGoldbach.Proofs.MellinDifferentiation |
| 6 | public import ConditionalGoldbach.Proofs.MellinMoment |
| 7 | |
| 8 | /-! Character projection shifted to the GRH half-plane. -/ |
| 9 | public section |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | noncomputable section |
| 13 | open scoped BigOperators ComplexConjugate Topology ContDiff |
| 14 | open MeasureTheory Filter Set Complex |
| 15 | namespace ConditionalGoldbach |
| 16 | |
| 17 | lemma log_square_polynomial_bound (N : ℕ) (hN : 4 ≤ N) (t : ℝ) : |
| 18 | Real.log (N * (|t| + 2)) ^ 2 ≤ 4 * (N : ℝ) ^ 2 * (1 + |t|) ^ 2 := by |
| 19 | have hNr : (4 : ℝ) ≤ N := by exact_mod_cast hN |
| 20 | have hpos : 0 < (N : ℝ) * (|t| + 2) := by positivity |
| 21 | have hone : 1 ≤ (N : ℝ) * (|t| + 2) := by nlinarith [abs_nonneg t] |
| 22 | have hl0 := Real.log_nonneg hone |
| 23 | have hl := Real.log_le_sub_one_of_pos hpos |
| 24 | have hbound : Real.log (N * (|t| + 2)) ≤ 2 * (N : ℝ) * (1 + |t|) := by |
| 25 | nlinarith [abs_nonneg t] |
| 26 | have hsq := sq_le_sq₀ hl0 (by positivity : 0 ≤ 2 * (N : ℝ) * (1 + |t|)) |>.mpr hbound |
| 27 | nlinarith |
| 28 | |
| 29 | lemma mellin_coefficient_differentiable (N : ℕ) (hN : 0 < N) (φ : ℝ → ℝ) |
| 30 | (hφ : IsWeight φ) : Differentiable ℂ (fun s : ℂ => (N : ℂ) ^ s * mellinWeight φ s) := by |
| 31 | have hNz : (N : ℂ) ≠ 0 := by exact_mod_cast hN.ne' |
| 32 | exact (differentiable_id.const_cpow (Or.inl hNz)).mul (mellinWeight_differentiable hφ) |
| 33 | |
| 34 | lemma mellin_character_uniform_bound (N : ℕ) (hN : 4 ≤ N) (φ : ℝ → ℝ) |
| 35 | (hφ : IsWeight φ) (lo A : ℝ) (hA : 0 ≤ A) (g : ℂ → ℂ) |
| 36 | (hg : ∀ x ∈ Icc lo 1, ∀ t : ℝ, |
| 37 | ‖g (line x t)‖ ≤ A * Real.log (N * (|t| + 2)) ^ 2) : |
| 38 | ∃ C : ℝ, 0 ≤ C ∧ ∀ x ∈ Icc lo 1, ∀ t : ℝ, |
| 39 | ‖(N : ℂ) ^ (line x t) * mellinWeight φ (line x t) * g (line x t)‖ ≤ |
| 40 | C * (1 + |t|)⁻¹ ^ 2 := by |
| 41 | obtain ⟨B, hB, hb⟩ := mellin_test_rapid_decay (companion φ) (companion_contDiff hφ) |
| 42 | (companion_support_subset hφ) lo 4 |
| 43 | refine ⟨(N : ℝ) * B * (4 * A * (N : ℝ) ^ 2), by positivity, ?_⟩ |
| 44 | intro x hx t |
| 45 | have hN1 : (1 : ℝ) ≤ N := by exact_mod_cast (by omega : 1 ≤ N) |
| 46 | have hNpos : 0 < (N : ℝ) := by exact_mod_cast (by omega : 0 < N) |
| 47 | have hNpow : ‖(N : ℂ) ^ (line x t)‖ ≤ N := by |
| 48 | rw [← Complex.ofReal_natCast, Complex.norm_cpow_eq_rpow_re_of_pos hNpos] |
| 49 | have hline : (line x t).re = x := by simp [line] |
| 50 | rw [hline] |
| 51 | simpa using Real.rpow_le_rpow_of_exponent_le hN1 hx.2 |
| 52 | have hm : ‖mellinWeight φ (line x t)‖ ≤ B * (1 + |t|)⁻¹ ^ 4 := by |
| 53 | simpa only [mellinWeight, line, add_re, ofReal_re, mul_re, ofReal_im, I_re, |
| 54 | I_im, mul_zero, zero_mul, sub_self, add_zero, add_im, mul_im, mul_one, |
| 55 | zero_add] using hb (line x t) (by simpa [line] using hx.1) |
| 56 | have hg' : ‖g (line x t)‖ ≤ (4 * A * (N : ℝ) ^ 2) * (1 + |t|) ^ 2 := by |
| 57 | have h := (hg x hx t).trans (mul_le_mul_of_nonneg_left (log_square_polynomial_bound N hN t) hA) |
| 58 | convert h using 1; ring |
| 59 | rw [norm_mul, norm_mul] |
| 60 | calc |
| 61 | _ ≤ ((N : ℝ) * (B * (1 + |t|)⁻¹ ^ 4)) * |
| 62 | ((4 * A * (N : ℝ) ^ 2) * (1 + |t|) ^ 2) := |
| 63 | mul_le_mul (mul_le_mul hNpow hm (norm_nonneg _) hNpos.le) hg' |
| 64 | (norm_nonneg _) (by positivity) |
| 65 | _ = _ := by |
| 66 | have ht : (1 + |t|) ≠ 0 := by positivity |
| 67 | field_simp |
| 68 | |
| 69 | lemma character_mellin_shift_of_log_bound {N : ℕ} [NeZero N] (hN : 4 ≤ N) |
| 70 | (hGRH : GRH N) (χ : Character N) (hχ : χ ∈ oddCharacters N) |
| 71 | (φ : ℝ → ℝ) (hφ : IsWeight φ) (σ A : ℝ) (hσ : 0 < σ) (hσ1 : σ ≤ 1) |
| 72 | (hA : 0 ≤ A) (hg : ∀ x ∈ Icc σ 1, ∀ t : ℝ, |
| 73 | ‖logDerivative χ (line x t)‖ ≤ A * Real.log (N * (|t| + 2)) ^ 2) : |
| 74 | Integrable (fun t : ℝ => (N : ℂ) ^ (line σ t) * mellinWeight φ (line σ t) * |
| 75 | logDerivative χ (line σ t)) ∧ |
| 76 | characterPolynomial χ φ = -verticalMellin σ (fun s => |
| 77 | (N : ℂ) ^ s * mellinWeight φ s * logDerivative χ s) := by |
| 78 | let f : ℂ → ℂ := fun s => (N : ℂ) ^ s * mellinWeight φ s * logDerivative χ s |
| 79 | have hNpos : 0 < N := by omega |
| 80 | have hd : ∀ z : ℂ, z.re ∈ Icc σ 1 → DifferentiableAt ℂ f z := by |
| 81 | intro z hz |
| 82 | exact ((mellin_coefficient_differentiable N hNpos φ hφ) z).mul |
| 83 | (odd_logDerivative_analyticAt_of_GRH hGRH χ hχ (hσ.trans_le hz.1)).differentiableAt |
| 84 | obtain ⟨C, _, hc⟩ := mellin_character_uniform_bound N hN φ hφ σ A hA (logDerivative χ) hg |
| 85 | have hcont : Continuous (fun t : ℝ => f (line σ t)) := by |
| 86 | apply continuous_iff_continuousAt.mpr |
| 87 | intro t |
| 88 | apply (hd (line σ t) (by simpa [line] using (show σ ∈ Icc σ 1 from ⟨le_rfl, hσ1⟩))).continuousAt.comp |
| 89 | unfold line |
| 90 | fun_prop |
| 91 | have hi : Integrable (fun t : ℝ => f (line σ t)) := |
| 92 | integrable_of_uniform_vertical_decay f σ C hcont (hc σ ⟨le_rfl, hσ1⟩) |
| 93 | refine ⟨hi, ?_⟩ |
| 94 | have hs := verticalMellin_eq_of_uniform_decay f σ 1 C hσ1 hd hi |
| 95 | (character_mellin_initial_integrable χ φ hφ 1 (by norm_num)) hc |
| 96 | rw [characterPolynomial_mellin_initial χ φ hφ 1 (by norm_num), ← hs] |
| 97 | |
| 98 | lemma character_mellin_shift {N : ℕ} [NeZero N] (_hN : Even N) (hN4 : 4 ≤ N) |
| 99 | (hGRH : GRH N) (χ : Character N) (hχ : χ ∈ oddCharacters N) |
| 100 | (φ : ℝ → ℝ) (hφ : IsWeight φ) (σ : ℝ) (hσ : 0 < σ) (hσ1 : σ ≤ 1) : |
| 101 | Integrable (fun t : ℝ => (N : ℂ) ^ (line σ t) * mellinWeight φ (line σ t) * |
| 102 | logDerivative χ (line σ t)) ∧ |
| 103 | characterPolynomial χ φ = -verticalMellin σ (fun s => |
| 104 | (N : ℂ) ^ s * mellinWeight φ s * logDerivative χ s) := by |
| 105 | obtain ⟨A, hA, hg⟩ := logDerivative_uniform_bound σ 1 hσ hσ1 |
| 106 | exact character_mellin_shift_of_log_bound hN4 hGRH χ hχ φ hφ σ A hσ hσ1 hA.le |
| 107 | (hg N inferInstance hN4 hGRH χ (odd_character_ne_one χ (Finset.mem_filter.mp hχ).2)) |
| 108 | |
| 109 | theorem lemma_7_1 (φ : ℝ → ℝ) (hφ : IsWeight φ) : |
| 110 | (∀ σ u : ℝ, 0 < u → (companion φ u : ℂ) = |
| 111 | verticalMellin σ (fun s => mellinWeight φ s * (u : ℂ) ^ (-s))) ∧ |
| 112 | (∀ lo hi : ℝ, lo ≤ hi → ∃ C : ℝ, 0 < C ∧ |
| 113 | ∀ σ ∈ Icc lo hi, ∀ t : ℝ, ‖mellinWeight φ (line σ t)‖ ≤ C * (1 + |t|)⁻¹ ^ 6) ∧ |
| 114 | (∀ N : ℕ, ∀ (_ : NeZero N), Even N → 4 ≤ N → GRH N → |
| 115 | ∀ χ ∈ oddCharacters N, ∀ σ : ℝ, 0 < σ → σ ≤ 1 / 9 → |
| 116 | characterPolynomial χ φ = -verticalMellin σ (fun s => |
| 117 | (N : ℂ) ^ s * mellinWeight φ s * logDerivative χ s)) := by |
| 118 | refine ⟨mellinWeight_inversion hφ, mellinWeight_uniform_decay φ hφ, ?_⟩ |
| 119 | intro N _ hN hN4 hGRH χ hχ σ hσ hσ1 |
| 120 | exact (character_mellin_shift hN hN4 hGRH χ hχ φ hφ σ hσ (by linarith)).2 |
| 121 | |
| 122 | lemma characterMoment_mellin_shifted (N : ℕ) [NeZero N] (hN : Even N) (hN4 : 4 ≤ N) |
| 123 | (hGRH : GRH N) (φ : ℝ → ℝ) (hφ : IsWeight φ) (σ : ℝ) |
| 124 | (hσ : 0 < σ) (hσ1 : σ ≤ 1) : |
| 125 | Integrable (fun p : ℝ × ℝ => |
| 126 | (N : ℂ) ^ (line σ p.1 + line σ p.2) * mellinWeight φ (line σ p.1) * |
| 127 | mellinWeight φ (line σ p.2) * characterKernel N (line σ p.1) (line σ p.2)) ∧ |
| 128 | (characterMoment N φ : ℂ) = verticalMellin σ (fun s => verticalMellin σ (fun z => |
| 129 | (N : ℂ) ^ (s + z) * mellinWeight φ s * mellinWeight φ z * characterKernel N s z)) := by |
| 130 | have hi (χ : Character N) (hχ : χ ∈ oddCharacters N) := |
| 131 | character_mellin_shift hN hN4 hGRH χ hχ φ hφ σ hσ hσ1 |
| 132 | have hibar (χ : Character N) (hχ : χ ∈ oddCharacters N) := |
| 133 | character_mellin_shift hN hN4 hGRH (star χ) ((star_mem_oddCharacters χ).2 hχ) φ hφ σ hσ hσ1 |
| 134 | constructor |
| 135 | · simp_rw [weighted_characterKernel_factor] |
| 136 | apply Integrable.const_mul |
| 137 | apply integrable_finsetSum |
| 138 | intro χ hχ |
| 139 | exact (hi χ hχ).1.mul_prod (hibar χ hχ).1 |
| 140 | · simp_rw [weighted_characterKernel_factor] |
| 141 | rw [double_verticalMellin_finset_prod (oddCharacters N) σ _ _ _ |
| 142 | (fun χ hχ => (hi χ hχ).1) (fun χ hχ => (hibar χ hχ).1)] |
| 143 | unfold characterMoment |
| 144 | push_cast |
| 145 | congr 1 |
| 146 | apply Finset.sum_congr rfl |
| 147 | intro χ hχ |
| 148 | calc |
| 149 | _ = characterPolynomial χ φ * characterPolynomial (star χ) φ := by |
| 150 | rw [characterPolynomial_star, Complex.mul_conj, Complex.normSq_eq_norm_sq] |
| 151 | push_cast |
| 152 | rfl |
| 153 | _ = _ := by rw [(hi χ hχ).2, (hibar χ hχ).2]; ring |
| 154 | |
| 155 | theorem lemma_7_1_absolute_convergence (φ : ℝ → ℝ) (hφ : IsWeight φ) : |
| 156 | (∀ σ u : ℝ, 0 < u → Integrable (fun t : ℝ => |
| 157 | mellinWeight φ (line σ t) * (u : ℂ) ^ (-line σ t))) ∧ |
| 158 | (∀ N : ℕ, ∀ (_ : NeZero N), Even N → 4 ≤ N → GRH N → |
| 159 | ∀ σ : ℝ, 0 < σ → σ ≤ 1 / 9 → |
| 160 | (∀ χ ∈ oddCharacters N, Integrable (fun t : ℝ => |
| 161 | (N : ℂ) ^ (line σ t) * mellinWeight φ (line σ t) * logDerivative χ (line σ t))) ∧ |
| 162 | Integrable (fun p : ℝ × ℝ => |
| 163 | (N : ℂ) ^ (line σ p.1 + line σ p.2) * mellinWeight φ (line σ p.1) * |
| 164 | mellinWeight φ (line σ p.2) * characterKernel N (line σ p.1) (line σ p.2)) ∧ |
| 165 | (characterMoment N φ : ℂ) = verticalMellin σ (fun s => verticalMellin σ (fun z => |
| 166 | (N : ℂ) ^ (s + z) * mellinWeight φ s * mellinWeight φ z * characterKernel N s z))) := by |
| 167 | refine ⟨mellinWeight_inversion_integrable hφ, ?_⟩ |
| 168 | intro N _ hN hN4 hGRH σ hσ hσ1 |
| 169 | refine ⟨?_, characterMoment_mellin_shifted N hN hN4 hGRH φ hφ σ hσ (by linarith)⟩ |
| 170 | intro χ hχ |
| 171 | exact (character_mellin_shift hN hN4 hGRH χ hχ φ hφ σ hσ (by linarith)).1 |
| 172 | |
| 173 | end ConditionalGoldbach |
