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.SpectralProducts |
| 4 | |
| 5 | /-! The zero--operator-norm dictionary is proved from explicit spectral data. |
| 6 | No Hardy realization or GRH theorem is used in this module. -/ |
| 7 | public section |
| 8 | |
| 9 | set_option autoImplicit false |
| 10 | open scoped BigOperators ComplexConjugate Topology Quaternion |
| 11 | open MeasureTheory Filter Set Complex |
| 12 | noncomputable section |
| 13 | namespace ConditionalGoldbach |
| 14 | attribute [local instance] Classical.propDecidable |
| 15 | |
| 16 | theorem quaternion_quadratic_real_of_off_critical (q : Quaternion ℝ) (c : ℝ) |
| 17 | (hroot : q * (1 - q) = (c : Quaternion ℝ)) (hcrit : q.re ≠ 1 / 2) : |
| 18 | q = (q.re : Quaternion ℝ) := by |
| 19 | have hI := congrArg (fun q : Quaternion ℝ => q.imI) hroot |
| 20 | have hJ := congrArg (fun q : Quaternion ℝ => q.imJ) hroot |
| 21 | have hK := congrArg (fun q : Quaternion ℝ => q.imK) hroot |
| 22 | simp at hI hJ hK |
| 23 | have hc : 1 - 2 * q.re ≠ 0 := by intro h; apply hcrit; linarith |
| 24 | have hi : q.imI = 0 := by |
| 25 | apply (mul_eq_zero.mp (show (1 - 2 * q.re) * q.imI = 0 by nlinarith [hI])).resolve_left hc |
| 26 | have hj : q.imJ = 0 := by |
| 27 | apply (mul_eq_zero.mp (show (1 - 2 * q.re) * q.imJ = 0 by nlinarith [hJ])).resolve_left hc |
| 28 | have hk : q.imK = 0 := by |
| 29 | apply (mul_eq_zero.mp (show (1 - 2 * q.re) * q.imK = 0 by nlinarith [hK])).resolve_left hc |
| 30 | ext <;> simp [hi, hj, hk] |
| 31 | |
| 32 | theorem quaternion_quadratic_critical_of_bound (q : Quaternion ℝ) (c : ℝ) |
| 33 | (hroot : q * (1 - q) = (c : Quaternion ℝ)) (hc : 1 / 4 ≤ c) : q.re = 1 / 2 := by |
| 34 | by_contra hn |
| 35 | have hreal := quaternion_quadratic_real_of_off_critical q c hroot hn |
| 36 | rw [hreal] at hroot |
| 37 | have heq := congrArg (fun q : Quaternion ℝ => q.re) hroot |
| 38 | simp at heq |
| 39 | have hs : (q.re - 1 / 2) ^ 2 = 0 := by nlinarith [sq_nonneg (q.re - 1 / 2)] |
| 40 | have hz := sq_eq_zero_iff.mp hs |
| 41 | exact hn (by linarith) |
| 42 | |
| 43 | theorem quadratic_right_root (c : ℝ) (hc : c < 1 / 4) : |
| 44 | ((1 + Real.sqrt (1 - 4 * c)) / 2) * (1 - (1 + Real.sqrt (1 - 4 * c)) / 2) = c ∧ |
| 45 | 1 / 2 < (1 + Real.sqrt (1 - 4 * c)) / 2 := by |
| 46 | have harg : 0 < 1 - 4 * c := by linarith |
| 47 | have hs := Real.sq_sqrt harg.le |
| 48 | have hp := Real.sqrt_pos.2 harg |
| 49 | constructor <;> nlinarith |
| 50 | |
| 51 | theorem norm_le_iff_eigenvalues {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] |
| 52 | (T : H →L[ℂ] H) (hT : Nonempty (SpectralData T)) (M : ℝ) (hM : 0 ≤ M) : |
| 53 | ‖T‖ ≤ M ↔ ∀ j, |eigenvalues T j| ≤ M := by |
| 54 | simpa only [eigenvalues, dite_eq_left hT] using (Classical.choice hT).norm_le_iff M hM |
| 55 | |
| 56 | theorem spectral_R_iff_norm {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] |
| 57 | (N : ℕ) (T : H →L[ℂ] H) (hT : Nonempty (SpectralData T)) (hδ : 0 < spectralScale N) : |
| 58 | (∀ q : Quaternion ℝ, spectralQuaternion N T q = 0 → q.re = 1 / 2) ↔ |
| 59 | ‖T‖ ≤ spectralScale N := by |
| 60 | constructor |
| 61 | · intro hR |
| 62 | apply (norm_le_iff_eigenvalues T hT _ hδ.le).2 |
| 63 | intro j |
| 64 | by_contra hn |
| 65 | have hgt : spectralScale N < |eigenvalues T j| := lt_of_not_ge hn |
| 66 | have hμ : eigenvalues T j ≠ 0 := by |
| 67 | intro hz |
| 68 | simp only [hz, abs_zero] at hgt |
| 69 | linarith |
| 70 | have hμ2 : 0 < eigenvalues T j ^ 2 := sq_pos_of_ne_zero hμ |
| 71 | let c := spectralScale N ^ 2 / (4 * eigenvalues T j ^ 2) |
| 72 | have hc : c < 1 / 4 := by |
| 73 | apply (div_lt_iff₀ (mul_pos (by norm_num : (0 : ℝ) < 4) hμ2)).2 |
| 74 | have hs := (sq_lt_sq₀ hδ.le (abs_nonneg (eigenvalues T j))).2 hgt |
| 75 | rw [sq_abs] at hs |
| 76 | nlinarith |
| 77 | obtain ⟨hroot, hhalf⟩ := quadratic_right_root c hc |
| 78 | let x := (1 + Real.sqrt (1 - 4 * c)) / 2 |
| 79 | have hzero : spectralQuaternion N T (x : Quaternion ℝ) = 0 := by |
| 80 | apply (spectralQuaternion_eq_zero_iff N T hT hδ.ne' _).2 |
| 81 | refine ⟨j, hμ, ?_⟩ |
| 82 | change (x : Quaternion ℝ) * (1 - (x : Quaternion ℝ)) = (c : Quaternion ℝ) |
| 83 | simpa only [Quaternion.coe_mul, Quaternion.coe_sub, Quaternion.coe_one] using |
| 84 | congrArg (fun y : ℝ => (y : Quaternion ℝ)) (show x * (1 - x) = c from hroot) |
| 85 | have hr := hR (x : Quaternion ℝ) hzero |
| 86 | change x = 1 / 2 at hr |
| 87 | change 1 / 2 < x at hhalf |
| 88 | linarith |
| 89 | · intro hnorm q hzero |
| 90 | obtain ⟨j, hμ, hroot⟩ := (spectralQuaternion_eq_zero_iff N T hT hδ.ne' q).1 hzero |
| 91 | have hμ2 : 0 < eigenvalues T j ^ 2 := sq_pos_of_ne_zero hμ |
| 92 | have hb := (abs_eigenvalues_le_norm T hT j).trans hnorm |
| 93 | apply quaternion_quadratic_critical_of_bound q _ hroot |
| 94 | apply (le_div_iff₀ (mul_pos (by norm_num : (0 : ℝ) < 4) hμ2)).2 |
| 95 | have hs := (sq_le_sq₀ (abs_nonneg (eigenvalues T j)) hδ.le).2 hb |
| 96 | rw [sq_abs] at hs |
| 97 | nlinarith |
| 98 | |
| 99 | theorem eigenvalue_bound_iff_parameter (δ μ a : ℝ) (hδ : 0 < δ) (hμ : μ ≠ 0) |
| 100 | (ha : 0 < a) : |μ| ≤ δ / (2 * Real.sqrt a) ↔ a ≤ δ ^ 2 / (4 * μ ^ 2) := by |
| 101 | have hr := Real.sqrt_pos.2 ha |
| 102 | have hd : 0 < 2 * Real.sqrt a := mul_pos (by norm_num) hr |
| 103 | have hden : 0 < 4 * μ ^ 2 := mul_pos (by norm_num) (sq_pos_of_ne_zero hμ) |
| 104 | constructor |
| 105 | · intro hb |
| 106 | have hmul := (le_div_iff₀ hd).mp hb |
| 107 | have hs := (sq_le_sq₀ (mul_nonneg (abs_nonneg μ) hd.le) hδ.le).2 hmul |
| 108 | simp only [mul_pow, sq_abs, Real.sq_sqrt ha.le] at hs |
| 109 | apply (le_div_iff₀ hden).2 |
| 110 | nlinarith |
| 111 | · intro hp |
| 112 | have hmul := (le_div_iff₀ hden).mp hp |
| 113 | apply (le_div_iff₀ hd).2 |
| 114 | apply (sq_le_sq₀ (mul_nonneg (abs_nonneg μ) hd.le) hδ.le).mp |
| 115 | simp only [mul_pow, sq_abs, Real.sq_sqrt ha.le] |
| 116 | nlinarith |
| 117 | theorem spectral_zeroFree_iff_norm {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] |
| 118 | (N : ℕ) (T : H →L[ℂ] H) (hT : Nonempty (SpectralData T)) (hδ : 0 < spectralScale N) |
| 119 | (η : ℝ) (hη : 0 < η) (hηhalf : η < 1 / 2) : |
| 120 | (∀ q : Quaternion ℝ, 1 - η < q.re → spectralQuaternion N T q ≠ 0) ↔ |
| 121 | ‖T‖ ≤ spectralScale N / (2 * Real.sqrt (η * (1 - η))) := by |
| 122 | have ha : 0 < η * (1 - η) := mul_pos hη (by linarith) |
| 123 | have hM : 0 < spectralScale N / (2 * Real.sqrt (η * (1 - η))) := |
| 124 | div_pos hδ (mul_pos (by norm_num) (Real.sqrt_pos.2 ha)) |
| 125 | constructor |
| 126 | · intro hzeroFree |
| 127 | apply (norm_le_iff_eigenvalues T hT _ hM.le).2 |
| 128 | intro j |
| 129 | by_cases hμ : eigenvalues T j = 0 |
| 130 | · simp only [hμ, abs_zero] |
| 131 | exact hM.le |
| 132 | · apply (eigenvalue_bound_iff_parameter _ _ _ hδ hμ ha).2 |
| 133 | by_contra hn |
| 134 | let c := spectralScale N ^ 2 / (4 * eigenvalues T j ^ 2) |
| 135 | have hclt : c < η * (1 - η) := lt_of_not_ge hn |
| 136 | have hc : c < 1 / 4 := by nlinarith [sq_nonneg (η - 1 / 2)] |
| 137 | obtain ⟨hroot, _⟩ := quadratic_right_root c hc |
| 138 | have harg : 0 < 1 - 4 * c := by linarith |
| 139 | have hs := Real.sq_sqrt harg.le |
| 140 | have hsqrt : 1 - 2 * η < Real.sqrt (1 - 4 * c) := by |
| 141 | by_contra hnot |
| 142 | have hle : Real.sqrt (1 - 4 * c) ≤ 1 - 2 * η := le_of_not_gt hnot |
| 143 | have hsq := mul_self_le_mul_self (Real.sqrt_nonneg _) hle |
| 144 | nlinarith |
| 145 | let x := (1 + Real.sqrt (1 - 4 * c)) / 2 |
| 146 | have hxlarge : 1 - η < x := by dsimp [x]; linarith |
| 147 | have hzero : spectralQuaternion N T (x : Quaternion ℝ) = 0 := by |
| 148 | apply (spectralQuaternion_eq_zero_iff N T hT hδ.ne' _).2 |
| 149 | refine ⟨j, hμ, ?_⟩ |
| 150 | change (x : Quaternion ℝ) * (1 - (x : Quaternion ℝ)) = (c : Quaternion ℝ) |
| 151 | simpa only [Quaternion.coe_mul, Quaternion.coe_sub, Quaternion.coe_one] using |
| 152 | congrArg (fun y : ℝ => (y : Quaternion ℝ)) (show x * (1 - x) = c from hroot) |
| 153 | exact hzeroFree (x : Quaternion ℝ) hxlarge hzero |
| 154 | · intro hnorm q hlarge hzero |
| 155 | obtain ⟨j, hμ, hroot⟩ := (spectralQuaternion_eq_zero_iff N T hT hδ.ne' q).1 hzero |
| 156 | have hcrit : q.re ≠ 1 / 2 := by intro heq; rw [heq] at hlarge; linarith |
| 157 | have hreal := quaternion_quadratic_real_of_off_critical q _ hroot hcrit |
| 158 | have hb := (abs_eigenvalues_le_norm T hT j).trans hnorm |
| 159 | have hc := (eigenvalue_bound_iff_parameter _ _ _ hδ hμ ha).1 hb |
| 160 | rw [hreal] at hroot |
| 161 | have heq := congrArg (fun q : Quaternion ℝ => q.re) hroot |
| 162 | simp only [Quaternion.re_mul, Quaternion.re_coe, Quaternion.imI_coe, Quaternion.imJ_coe, |
| 163 | Quaternion.imK_coe, Quaternion.re_sub, Quaternion.re_one, Quaternion.imI_sub, |
| 164 | Quaternion.imI_one, Quaternion.imJ_sub, Quaternion.imJ_one, Quaternion.imK_sub, |
| 165 | Quaternion.imK_one, zero_mul, sub_zero] at heq |
| 166 | have hp : 0 < (q.re - η) * (q.re - (1 - η)) := |
| 167 | mul_pos (by linarith) (by linarith) |
| 168 | nlinarith |
| 169 | |
| 170 | theorem theorem_6_1_abstract_dictionary {H : Type*} [NormedAddCommGroup H] |
| 171 | [InnerProductSpace ℂ H] [CompleteSpace H] (N : ℕ) (T : H →L[ℂ] H) |
| 172 | (hT : Nonempty (SpectralData T)) (hδ : 0 < spectralScale N) : |
| 173 | ((∀ q : Quaternion ℝ, spectralQuaternion N T q = 0 → q.re = 1 / 2) ↔ |
| 174 | ‖T‖ ≤ spectralScale N) ∧ |
| 175 | ∀ η : ℝ, 0 < η → η < 1 / 2 → |
| 176 | ((∀ q : Quaternion ℝ, 1 - η < q.re → spectralQuaternion N T q ≠ 0) ↔ |
| 177 | ‖T‖ ≤ spectralScale N / (2 * Real.sqrt (η * (1 - η)))) := by |
| 178 | exact ⟨spectral_R_iff_norm N T hT hδ, spectral_zeroFree_iff_norm N T hT hδ⟩ |
| 179 | end ConditionalGoldbach |
