Riemann hypothesis: the Lean proof, cleaned up together
The 2026 Lean proof of the Riemann hypothesis and GRH, machine-checked by others, not refereed, no word from Clay; cleaned up together: more readable, faster to build, the theorems unchanged

| 1 | module |
| 2 | |
| 3 | import Mathlib.Algebra.Order.Star.Real |
| 4 | import Mathlib.RingTheory.PiTensorProduct |
| 5 | import Mathlib.Topology.Separation.CompletelyRegular |
| 6 | public import Lib.General.LinearAlgebra.MatricesNearIdentity |
| 7 | import Lib.DiscreteSeries.FlenstedJensen.PsiKTypes |
| 8 | import Lib.DiscreteSeries.FlenstedJensen.SquareIntegrability |
| 9 | import Lib.DiscreteSeries.Holomorphic.HighestVectorExtension |
| 10 | import Lib.DiscreteSeries.Holomorphic.MaximalCompactMinors |
| 11 | import New.Appendix.DiscreteSeries.MinorExpansion |
| 12 | |
| 13 | /-! |
| 14 | # The Gaussian shape of the coefficient |
| 15 | |
| 16 | Near `1` the coefficient `l.dsCoeff g` of a discrete series with a large gap is nearly the phase |
| 17 | `exp (tr μ log g)` times a number in `[0, 1]`, where `μ` is the weight `l.lowestKType` |
| 18 | (`exists_norm_dsCoeff_div_cexp_sub_le`). The coefficient is a mean over `K` of a quotient of |
| 19 | products of minors, and the estimates for one minor are multiplied over the sets `{i | t ≤ w i}` of |
| 20 | a weight `w`. In the comments, `λ^ρ` is `paramAddRho l` and `Q_w` is `gapWeightedNormSq w`. |
| 21 | The Gaussian is `exp (-q)` with `q = Q_{-λ^ρ} (g - 1) / 4`; note `Q_{-w} = Q_w`. |
| 22 | Except in the first section, the norm of a matrix is the Frobenius norm. |
| 23 | |
| 24 | * `USign ε` is the unitary group of the form `diag ε`; `K = maxCompactU ε` is its subgroup of |
| 25 | unitary matrices, with the Haar measure `haarK ε` of mass one. |
| 26 | * `l : HCParam ε` is a doubled Harish-Chandra parameter `2λ`; `paramAddRho l` is `λ + ρ` and |
| 27 | `l.lowestKType` is `λ + ρ - 2ρ_c`. |
| 28 | * `weightMinors w g` is the product over `t : ℤ` of the principal minors of `g` on the sets |
| 29 | `{i | t ≤ w i}`, those with `t ≤ 0` divided by `det g`; `w.kTypeNormSq` is the mean of its |
| 30 | squared modulus over `K`. |
| 31 | * `l.flenstedJensen g z` is the mean over `k ∈ K` of |
| 32 | `weightMinors μ (g k) * conj (weightMinors μ k) / weightMinors (-paramAddRho l) (kᴴ z k)`, |
| 33 | divided by `μ.kTypeNormSq` (Flensted-Jensen's integral); the matrix coefficient `l.dsCoeff` is |
| 34 | defined through it. |
| 35 | |
| 36 | ## Relation to the literature |
| 37 | |
| 38 | See `New.Appendix.DiscreteSeries.Periods` for related work. |
| 39 | -/ |
| 40 | |
| 41 | @[expose] public section |
| 42 | |
| 43 | open Matrix MeasureTheory Finset Fintype Ring Complex ComplexConjugate |
| 44 | |
| 45 | namespace New.DiscreteSeries |
| 46 | |
| 47 | variable {n : Type} [Fintype n] [DecidableEq n] {ε : n → ℤˣ} {l : HCParam ε} {δ T q : ℝ} |
| 48 | {h L A : ℕ} {a b : ℤ} {w : n → ℤ} |
| 49 | |
| 50 | section Dimension |
| 51 | |
| 52 | open Norms.L2Operator |
| 53 | |
| 54 | /-- Let the parameter `l = 2λ` have gap `500 n ^ 3 + A` (the entries of `λ` are distinct, and those |
| 55 | with different signs `ε` are this far apart) and `|l i| ≤ L`. Then the mean `μ.kTypeNormSq` over |
| 56 | `K = maxCompactU ε` of the squared modulus of the highest weight coefficient `weightMinors μ`, for |
| 57 | `μ = l.lowestKType`, is at least `1 / (4 (2000 (n + L + 1) ^ 6) ^ (2 n ^ 2))`. -/ |
| 58 | lemma one_le_pow_mul_kTypeNormSq [Nonempty n] (hl : l.HasLargeGap A) (hL : ∀ i : n, |l i| ≤ L) : |
| 59 | 1 ≤ (2000 * (card n + L + 1) ^ 6) ^ (2 * card n ^ 2) * (4 * l.lowestKType.kTypeNormSq) := by |
| 60 | -- Compare volume and integral on `K`, which has mass one: all of `K` lies in the unit ball for |
| 61 | -- the operator norm (opened in this section), and `l.dsCoeff k = weightMinors μ k` there. |
| 62 | have h_univ : {k : maxCompactU ε | ‖(k : Matrix n n ℂ)‖ ≤ 1} = Set.univ := |
| 63 | Set.eq_univ_of_forall fun k ↦ |
| 64 | (CStarRing.norm_of_mem_unitary (U_one_mem_unitaryGroup ⟨_, k.property⟩)).le |
| 65 | have h_ball : haarK ε {k : maxCompactU ε | ‖(k : Matrix n n ℂ)‖ ≤ 1} ≤ |
| 66 | ENNReal.ofReal ((2000 * (card n + L + 1) ^ 6 * 1 ^ 2) ^ (2 * card n ^ 2)) * |
| 67 | ENNReal.ofReal (∫ k : maxCompactU ε, 4 * ‖l.dsCoeff k‖ ^ 2 ∂haarK ε) := |
| 68 | measure_ball_le_integral_dsCoeff (hg := hl) hL (haarK ε) (maxCompactU ε).subtype |
| 69 | integrable_of_compactSpace 1 le_rfl |
| 70 | rw [← ENNReal.one_le_ofReal, ENNReal.ofReal_mul (by positivity)] |
| 71 | simpa [h_univ, dsCoeff_of_mem_maxCompactU, integral_const_mul] using h_ball |
| 72 | |
| 73 | /-- Let the parameter `l = 2λ` have gap `500 n ^ 3 + A` and `|l i| ≤ L`, and let `T` be at least |
| 74 | `1`, `n ^ 2` and `n ^ 2 log (n + L + 1)`. Then the mean `μ.kTypeNormSq` over `K = maxCompactU ε` of |
| 75 | the squared modulus of the highest weight coefficient `weightMinors μ`, for `μ = l.lowestKType`, is |
| 76 | at least `exp (-5000 T)`. The inverse of `μ.kTypeNormSq` plays the part of the dimension of the |
| 77 | lowest `K`-type, so this takes the place of the bound from Weyl's dimension formula. -/ |
| 78 | lemma exp_neg_le_kTypeNormSq [Nonempty n] (hl : l.HasLargeGap A) (hL : ∀ i : n, |l i| ≤ L) |
| 79 | (hT : 1 ≤ T) (hT_card : card n ^ 2 ≤ T) |
| 80 | (hT_log : card n ^ 2 * Real.log (card n + L + 1) ≤ T) : |
| 81 | Real.exp (-(5000 * T)) ≤ l.lowestKType.kTypeNormSq := by |
| 82 | have h_pos : 0 < l.lowestKType.kTypeNormSq := kTypeNormSq_pos l.lowestKType |
| 83 | -- Take logarithms in the lower bound. |
| 84 | have h_log : 0 ≤ 2 * card n ^ 2 * (Real.log 2000 + 6 * Real.log (card n + L + 1)) + |
| 85 | (Real.log 4 + Real.log l.lowestKType.kTypeNormSq) := by |
| 86 | simpa (disch := positivity) [Real.log_mul, Real.log_pow] using |
| 87 | Real.log_nonneg (one_le_pow_mul_kTypeNormSq hl hL) |
| 88 | -- Here `log 2000 ≤ 2000` and `log 4 ≤ 4` suffice. |
| 89 | have h_mul : (card n : ℝ) ^ 2 * Real.log 2000 ≤ card n ^ 2 * 2000 := by |
| 90 | grw [Real.log_le_self (by norm_num)] |
| 91 | exact (Real.le_log_iff_exp_le h_pos).1 |
| 92 | (by linarith [Real.log_le_self (zero_le_four : (0 : ℝ) ≤ 4)]) |
| 93 | |
| 94 | end Dimension |
| 95 | |
| 96 | open Norms.Frobenius |
| 97 | |
| 98 | /-- The quadratic form `Q_w (X) = ∑_{i, j} |w i - w j| |X i j| ^ 2`. -/ |
| 99 | noncomputable abbrev gapWeightedNormSq (w : n → ℤ) (X : Matrix n n ℂ) : ℝ := |
| 100 | ∑ i : n, ∑ j : n, |w i - w j| * ‖X i j‖ ^ 2 |
| 101 | |
| 102 | omit [DecidableEq n] in |
| 103 | /-- The quadratic form `Q_w (X) = gapWeightedNormSq w X` is nonnegative. -/ |
| 104 | lemma gapWeightedNormSq_nonneg (w : n → ℤ) (X : Matrix n n ℂ) : 0 ≤ gapWeightedNormSq w X := by |
| 105 | positivity |
| 106 | |
| 107 | /-- Let the entries of `w` lie in `[a, b]`, and let `P_t = coordProj (t ≤ w ·)` be the projection |
| 108 | to the coordinates `{i | t ≤ w i}`. The squared Frobenius norms of the commutators `[P_t, X]`, |
| 109 | `a < t ≤ b`, add up to `Q_w (X) = ∑_{i, j} |w i - w j| |X i j| ^ 2`, because exactly |
| 110 | `|w i - w j|` of these sets separate `i` from `j`. -/ |
| 111 | lemma sum_norm_lie_coordProj_sq (hw : ∀ i : n, a ≤ w i ∧ w i ≤ b) (X : Matrix n n ℂ) : |
| 112 | ∑ t ∈ Ioc a b, ‖⁅coordProj (t ≤ w ·), X⁆‖ ^ 2 = gapWeightedNormSq w X := by |
| 113 | have h_card (i j : n) : (#{t ∈ Ioc a b | ¬(t ≤ w i ↔ t ≤ w j)} : ℤ) = |w i - w j| := by |
| 114 | rw [show {t ∈ Ioc a b | ¬(t ≤ w i ↔ t ≤ w j)} = Ioc (w i ⊓ w j) (w i ⊔ w j) by grind, |
| 115 | Int.card_Ioc, max_sub_min_eq_abs', Int.toNat_of_nonneg (abs_nonneg _)] |
| 116 | have h_entry (t : ℤ) (i j : n) : |
| 117 | ‖⁅coordProj (t ≤ w ·), X⁆ i j‖ ^ 2 = if t ≤ w i ↔ t ≤ w j then 0 else ‖X i j‖ ^ 2 := by |
| 118 | simp [norm_lie_coordProj_apply, ite_pow] |
| 119 | simp only [frobenius_norm_sq_eq_sum_norm_sq, h_entry, (Ioc a b).sum_comm] |
| 120 | exact sum_congr rfl fun i _ ↦ sum_congr rfl fun j _ ↦ by simp [sum_ite, ← h_card] |
| 121 | |
| 122 | /-- If the entries of `w` lie in `[a, b]`, the projections `coordProj (t ≤ w ·)` to the coordinates |
| 123 | `{i | t ≤ w i}`, `a < t ≤ b`, add up to `diag w - a`; this is the resulting identity for their |
| 124 | traces against `X`. -/ |
| 125 | lemma sum_trace_coordProj_mul (hw : ∀ i : n, a ≤ w i ∧ w i ≤ b) (X : Matrix n n ℂ) : |
| 126 | ∑ t ∈ Ioc a b, (coordProj (t ≤ w ·) * X).trace = (intDiagonal w * X).trace - a * X.trace := by |
| 127 | have h_card (i : n) : (#{t ∈ Ioc a b | t ≤ w i} : ℤ) = w i - a := by |
| 128 | rw [show {t ∈ Ioc a b | t ≤ w i} = Ioc a (w i) by grind, Int.card_Ioc, |
| 129 | Int.toNat_of_nonneg (sub_nonneg.2 (hw i).1)] |
| 130 | simp only [trace, diag_apply, coordProj, diagonal_mul, (Ioc a b).sum_comm, mul_sum, |
| 131 | ← sum_sub_distrib, ← sub_mul] |
| 132 | exact sum_congr rfl fun i _ ↦ by simp [sum_ite, ← Int.cast_sub, ← h_card] |
| 133 | |
| 134 | /-- An element of `K = maxCompactU ε` is a unitary matrix. -/ |
| 135 | lemma maxCompactU_conjTranspose_mul_self (k : maxCompactU ε) : |
| 136 | (k : Matrix n n ℂ)ᴴ * (k : Matrix n n ℂ) = 1 := |
| 137 | Matrix.mem_unitaryGroup_iff'.1 (U_one_mem_unitaryGroup ⟨_, k.property⟩) |
| 138 | |
| 139 | /-- On `K = maxCompactU ε`, the product of principal minors `weightMinors w` decays like a Gaussian: |
| 140 | its squared modulus at `k` is at most `exp (-Q_w (k) / 2)`. -/ |
| 141 | lemma norm_weightMinors_sq_le_exp (w : n → ℤ) (k : maxCompactU ε) : |
| 142 | ‖weightMinors w k‖ ^ 2 ≤ Real.exp (-(gapWeightedNormSq w k / 2)) := by |
| 143 | -- Multiply the bounds for one minor, and use that `det k` has modulus one. |
| 144 | let M : ℤ := ∑ j : n, |w j| |
| 145 | have hw : ∀ i : n, -M ≤ w i ∧ w i ≤ M := neg_sum_abs_le_and_le_sum_abs w |
| 146 | calc ‖weightMinors w k‖ ^ 2 |
| 147 | = ∏ t ∈ Ioc (-M) M, ‖principalMinor (k : Matrix n n ℂ) (t ≤ w ·)‖ ^ 2 := by |
| 148 | rw [weightMinors_eq_det_zpow_mul_prod (GeneralLinearGroup.det_ne_zero _) _ _ hw, norm_mul, |
| 149 | norm_zpow, U.norm_det, _root_.one_zpow, one_mul, norm_prod, prod_pow] |
| 150 | _ ≤ ∏ t ∈ Ioc (-M) M, Real.exp (-(‖⁅coordProj (t ≤ w ·), (k : Matrix n n ℂ)⁆‖ ^ 2 / 2)) := |
| 151 | prod_le_prod₀ (fun t _ ↦ sq_nonneg _) fun t _ ↦ |
| 152 | norm_principalMinor_sq_le_exp _ (maxCompactU_conjTranspose_mul_self k) |
| 153 | _ = Real.exp (-(gapWeightedNormSq w k / 2)) := by |
| 154 | rw [← Real.exp_sum, sum_neg_distrib, ← sum_div, sum_norm_lie_coordProj_sq hw] |
| 155 | |
| 156 | /-- The entries of `paramAddRho l - l.lowestKType = 2 ρ_c` (written `twoRho l (ε · = ε ·)`) are at |
| 157 | most `n` in modulus, so the traces of `Z` against the diagonal matrices of the two weights differ |
| 158 | by at most `n ^ 2 ‖Z‖` (Frobenius norm). -/ |
| 159 | lemma norm_trace_paramAddRho_sub_trace_lowestKType_le (l : HCParam ε) (Z : Matrix n n ℂ) : |
| 160 | ‖(intDiagonal (paramAddRho l) * Z).trace - (intDiagonal l.lowestKType * Z).trace‖ ≤ |
| 161 | card n ^ 2 * ‖Z‖ := by |
| 162 | have h_rho (i : n) : ‖(twoRho l (ε · = ε ·) i : ℂ)‖ ≤ card n := |
| 163 | (norm_intCast _).trans_le (mod_cast abs_twoRho_le (ε · = ε ·) i l) |
| 164 | calc _ = ‖∑ i : n, twoRho l (ε · = ε ·) i * Z i i‖ := by simp [trace, lowestKType, sub_mul] |
| 165 | _ ≤ ∑ _i : n, card n * ‖Z‖ := |
| 166 | norm_sum_le_of_le _ fun i _ ↦ norm_mul_le_of_le (h_rho i) (norm_apply_le_frobenius_norm ..) |
| 167 | _ = card n ^ 2 * ‖Z‖ := by simp [sq, mul_assoc] |
| 168 | |
| 169 | /-- For `k ∈ K = maxCompactU ε` we have `Q_{-λ^ρ} (k) ≤ Q_μ (k) + 2 n ^ 2`. This holds because |
| 170 | `λ^ρ - μ = 2ρ_c` has entries at most `n` in modulus and `‖k‖ ^ 2 = n` (Frobenius norm). Here `2ρ_c` |
| 171 | is the sum of the compact roots (`ε i = ε j`) positive for `l`. -/ |
| 172 | lemma gapWeightedNormSq_neg_paramAddRho_le (l : HCParam ε) (k : maxCompactU ε) : |
| 173 | gapWeightedNormSq (-paramAddRho l) k ≤ gapWeightedNormSq l.lowestKType k + 2 * card n ^ 2 := by |
| 174 | have h_diff (i j : n) : |(-paramAddRho l) i - (-paramAddRho l) j| ≤ |
| 175 | |l.lowestKType i - l.lowestKType j| + 2 * card n := by |
| 176 | simp only [Pi.neg_apply, lowestKType] |
| 177 | grind [abs_eq_max_neg, abs_twoRho_le (ε · = ε ·) i l, abs_twoRho_le (ε · = ε ·) j l] |
| 178 | calc gapWeightedNormSq (-paramAddRho l) k |
| 179 | ≤ ∑ i : n, ∑ j : n, (|l.lowestKType i - l.lowestKType j| + 2 * card n : ℤ) * |
| 180 | ‖(k : Matrix n n ℂ) i j‖ ^ 2 := |
| 181 | sum_le_sum fun i _ ↦ sum_le_sum fun j _ ↦ |
| 182 | mul_le_mul_of_nonneg_right (mod_cast h_diff i j) (sq_nonneg _) |
| 183 | _ = gapWeightedNormSq l.lowestKType k + 2 * card n * ‖(k : Matrix n n ℂ)‖ ^ 2 := by |
| 184 | simp [gapWeightedNormSq, frobenius_norm_sq_eq_sum_norm_sq, add_mul, mul_sum, |
| 185 | sum_add_distrib] |
| 186 | _ = gapWeightedNormSq l.lowestKType k + 2 * card n ^ 2 := by |
| 187 | rw [frobenius_norm_sq_of_mem_unitaryGroup (k : Matrix n n ℂ) |
| 188 | (U_one_mem_unitaryGroup ⟨_, k.property⟩), mul_assoc, ← sq] |
| 189 | |
| 190 | /-- Multiplying exponential formulas for the principal minors of `(k : Matrix n n ℂ)ᴴ * y * k` over |
| 191 | the level sets `{i | t ≤ -paramAddRho l i}` for `t ∈ Ioc (-M) M` expresses |
| 192 | `weightMinors (-paramAddRho l) ((k : Matrix n n ℂ)ᴴ * y * k)` as the exponential of |
| 193 | `gapWeightedNormSq (-paramAddRho l) X / 4 - tr (l.lowestKType * Z)` minus the combined remainder. -/ |
| 194 | private lemma weightMinors_neg_paramAddRho_eq_cexp {y X Z : Matrix n n ℂ} {k : maxCompactU ε} |
| 195 | {M : ℤ} (h_range : ∀ i : n, -M ≤ (-paramAddRho l) i ∧ (-paramAddRho l) i ≤ M) |
| 196 | {r : ℤ → ℂ} (h_det : ((k : Matrix n n ℂ)ᴴ * y * (k : Matrix n n ℂ)).det = cexp Z.trace) |
| 197 | (hr_eq : ∀ t : ℤ, principalMinor ((k : Matrix n n ℂ)ᴴ * y * (k : Matrix n n ℂ)) |
| 198 | (t ≤ (-paramAddRho l) ·) = cexp ((coordProj (t ≤ (-paramAddRho l) ·) * Z).trace + |
| 199 | ‖⁅coordProj (t ≤ (-paramAddRho l) ·), X⁆‖ ^ 2 / 4 + r t)) : |
| 200 | weightMinors (-paramAddRho l) ((k : Matrix n n ℂ)ᴴ * y * k) = |
| 201 | cexp ((gapWeightedNormSq (-paramAddRho l) X / 4 : ℝ) - |
| 202 | (intDiagonal l.lowestKType * Z).trace - |
| 203 | ((intDiagonal (paramAddRho l) * Z).trace - (intDiagonal l.lowestKType * Z).trace - |
| 204 | ∑ t ∈ Ioc (-M) M, r t)) := by |
| 205 | set w : n → ℤ := -paramAddRho l |
| 206 | have h_sq : (∑ t ∈ Ioc (-M) M, (‖⁅coordProj (t ≤ w ·), X⁆‖ : ℂ) ^ 2 / 4 : ℂ) = |
| 207 | ((gapWeightedNormSq w X / 4 : ℝ) : ℂ) := by |
| 208 | rw [← sum_norm_lie_coordProj_sq h_range X] |
| 209 | push_cast |
| 210 | rw [sum_div] |
| 211 | have h_prod : ∏ t ∈ Ioc (-M) M, |
| 212 | principalMinor ((k : Matrix n n ℂ)ᴴ * y * (k : Matrix n n ℂ)) (t ≤ w ·) = |
| 213 | cexp ((intDiagonal w * Z).trace + M * Z.trace + (gapWeightedNormSq w X / 4 : ℝ) + |
| 214 | ∑ t ∈ Ioc (-M) M, r t) := by |
| 215 | rw [prod_congr rfl fun t _ ↦ hr_eq t, ← exp_sum, sum_add_distrib, sum_add_distrib, h_sq, |
| 216 | sum_trace_coordProj_mul h_range, Int.cast_neg, neg_mul, sub_neg_eq_add] |
| 217 | have h_neg : (intDiagonal w * Z).trace = -(intDiagonal (paramAddRho l) * Z).trace := by |
| 218 | simp [w, trace] |
| 219 | rw [weightMinors_eq_det_zpow_mul_prod (h_det.trans_ne (exp_ne_zero _)) _ _ h_range, h_det, |
| 220 | h_prod, ← exp_intCast_mul, ← exp_add, Int.cast_neg, h_neg] |
| 221 | exact congrArg cexp (by ring) |
| 222 | |
| 223 | /-- Let `λ^ρ = paramAddRho l`, `μ = l.lowestKType`, and `Q_w = gapWeightedNormSq w`. If the entries |
| 224 | of `-λ^ρ` lie in `[-M, M]`, `‖X‖ ≤ δ`, `‖Z‖ ≤ 2 * δ`, and each `r t` satisfies `hr_le`, then the |
| 225 | remainder `(intDiagonal λ^ρ * Z).trace - (intDiagonal μ * Z).trace - ∑ t ∈ Ioc (-M) M, r t` has |
| 226 | norm at most `10 ^ 6 * δ * (Q_{-λ^ρ} X / 4 + Q_μ k + card n ^ 2)`. -/ |
| 227 | private lemma norm_weightMinors_remainder_le {X Z : Matrix n n ℂ} {k : maxCompactU ε} |
| 228 | {M : ℤ} (h_range : ∀ i : n, -M ≤ (-paramAddRho l) i ∧ (-paramAddRho l) i ≤ M) |
| 229 | {r : ℤ → ℂ} (hX : ‖X‖ ≤ δ) (hZ : ‖Z‖ ≤ 2 * δ) |
| 230 | (hr_le : ∀ t : ℤ, ‖r t‖ ≤ 200000 * ‖X‖ * (‖⁅coordProj (t ≤ (-paramAddRho l) ·), X⁆‖ ^ 2 + |
| 231 | ‖⁅coordProj (t ≤ (-paramAddRho l) ·), (k : Matrix n n ℂ)⁆‖ ^ 2)) : |
| 232 | ‖(intDiagonal (paramAddRho l) * Z).trace - (intDiagonal l.lowestKType * Z).trace - |
| 233 | ∑ t ∈ Ioc (-M) M, r t‖ ≤ |
| 234 | 10 ^ 6 * δ * (gapWeightedNormSq (-paramAddRho l) X / 4 + |
| 235 | gapWeightedNormSq l.lowestKType k + card n ^ 2) := by |
| 236 | set w : n → ℤ := -paramAddRho l |
| 237 | have hδ_nonneg : 0 ≤ δ := (norm_nonneg _).trans hX |
| 238 | have h_sum : ‖∑ t ∈ Ioc (-M) M, r t‖ ≤ |
| 239 | 200000 * ‖X‖ * (gapWeightedNormSq w X + gapWeightedNormSq w k) := by |
| 240 | refine (norm_sum_le_of_le _ fun t _ ↦ hr_le t).trans_eq ?_ |
| 241 | simp only [← mul_sum, sum_add_distrib, sum_norm_lie_coordProj_sq h_range] |
| 242 | have h_k : gapWeightedNormSq w k ≤ gapWeightedNormSq l.lowestKType k + 2 * card n ^ 2 := |
| 243 | gapWeightedNormSq_neg_paramAddRho_le l k |
| 244 | calc ‖(intDiagonal (paramAddRho l) * Z).trace - (intDiagonal l.lowestKType * Z).trace - |
| 245 | ∑ t ∈ Ioc (-M) M, r t‖ |
| 246 | ≤ ‖(intDiagonal (paramAddRho l) * Z).trace - (intDiagonal l.lowestKType * Z).trace‖ + |
| 247 | ‖∑ t ∈ Ioc (-M) M, r t‖ := norm_sub_le _ _ |
| 248 | _ ≤ card n ^ 2 * (2 * δ) + 200000 * δ * |
| 249 | (gapWeightedNormSq w X + (gapWeightedNormSq l.lowestKType k + 2 * card n ^ 2)) := by |
| 250 | grw [norm_trace_paramAddRho_sub_trace_lowestKType_le, hZ, h_sum, hX, h_k] |
| 251 | _ ≤ 10 ^ 6 * δ * |
| 252 | (gapWeightedNormSq w X / 4 + gapWeightedNormSq l.lowestKType k + card n ^ 2) := by |
| 253 | nlinarith [gapWeightedNormSq_nonneg l.lowestKType k, sq_nonneg (card n : ℝ), |
| 254 | gapWeightedNormSq_nonneg w X] |
| 255 | |
| 256 | /-- Let `l = 2λ` be a parameter of gap `h` and let `g` in `USign ε` satisfy |
| 257 | `‖g - 1‖ ≤ δ ≤ 10 ^ (-12)` (Frobenius norm). Put `λ^ρ = paramAddRho l`, `μ = l.lowestKType`, |
| 258 | `Q_w (X) = ∑_{i, j} |w i - w j| |X i j| ^ 2` and `q = Q_{-λ^ρ} (g - 1) / 4`. Then |
| 259 | `l.dsCoeff g = l.flenstedJensen 1 y` for an invertible matrix `y` such that, for all |
| 260 | `k ∈ K = maxCompactU ε`, the product of principal minors `weightMinors (-λ^ρ) (kᴴ y k)` is |
| 261 | `exp (q - tr (μ logOneAdd (g - 1)) - r)` with `|r| ≤ 10 ^ 6 δ (q + Q_μ (k) + n ^ 2)`. -/ |
| 262 | lemma exists_weightMinors_neg_paramAddRho_eq_cexp (hl : l.HasGap h) (g : USign ε) |
| 263 | (hg : ‖(g : Matrix n n ℂ) - 1‖ ≤ δ) (hδ : δ ≤ 1e-12) : |
| 264 | ∃ y : Matrix n n ℂ, l.dsCoeff g = l.flenstedJensen 1 y ∧ y.det ≠ 0 ∧ |
| 265 | ∀ k : maxCompactU ε, ∃ r : ℂ, |
| 266 | weightMinors (-paramAddRho l) ((k : Matrix n n ℂ)ᴴ * y * k) = |
| 267 | cexp ((gapWeightedNormSq (-paramAddRho l) ((g : Matrix n n ℂ) - 1) / 4 : ℝ) - |
| 268 | (intDiagonal l.lowestKType * logOneAdd ((g : Matrix n n ℂ) - 1)).trace - r) ∧ |
| 269 | ‖r‖ ≤ 10 ^ 6 * δ * (gapWeightedNormSq (-paramAddRho l) ((g : Matrix n n ℂ) - 1) / 4 + |
| 270 | gapWeightedNormSq l.lowestKType k + card n ^ 2) := by |
| 271 | have hg_half : ‖(g : Matrix n n ℂ) - 1‖ ≤ 2⁻¹ := by linarith |
| 272 | obtain ⟨y, h_coeff, h_minor⟩ := exists_principalMinor_eq_exp hl g (by linarith) |
| 273 | set X : Matrix n n ℂ := (g : Matrix n n ℂ) - 1 |
| 274 | set Z : Matrix n n ℂ := logOneAdd X |
| 275 | set w : n → ℤ := -paramAddRho l |
| 276 | have hZ_le : ‖Z‖ ≤ 2 * δ := (norm_logOneAdd_le hg_half).trans (by linarith) |
| 277 | -- The sets `{i | t ≤ w i}` consist of lowest entries of `l`. |
| 278 | have h_order (t : ℤ) (i j : n) (hi : t ≤ w i) (hj : ¬t ≤ w j) : l i < l j := |
| 279 | hl.paramAddRho_lt_iff.1 (neg_lt_neg_iff.1 ((not_le.1 hj).trans_le hi)) |
| 280 | -- For the set of all indices the formula for one minor gives the determinant. |
| 281 | have h_det (k : maxCompactU ε) : |
| 282 | ((k : Matrix n n ℂ)ᴴ * y * (k : Matrix n n ℂ)).det = cexp Z.trace := by |
| 283 | simpa [principalMinor_of_forall, coordProj, lie_def, -det_mul] using (h_minor ⊤ · k) |
| 284 | have hy : y.det ≠ 0 := fun h_zero ↦ |
| 285 | (h_det 1).trans_ne (exp_ne_zero _) (by simp [h_zero]) |
| 286 | let M : ℤ := ∑ j : n, |w j| |
| 287 | have h_range : ∀ i : n, -M ≤ w i ∧ w i ≤ M := neg_sum_abs_le_and_le_sum_abs w |
| 288 | refine ⟨y, h_coeff, hy, fun k ↦ ?_⟩ |
| 289 | -- Multiply the formulas for one minor over the sets `{i | t ≤ w i}`. |
| 290 | choose r hr_eq hr_le using fun t : ℤ ↦ h_minor (t ≤ w ·) (h_order t) k |
| 291 | exact ⟨(intDiagonal (paramAddRho l) * Z).trace - (intDiagonal l.lowestKType * Z).trace - |
| 292 | ∑ t ∈ Ioc (-M) M, r t, |
| 293 | weightMinors_neg_paramAddRho_eq_cexp h_range (h_det k) hr_eq, |
| 294 | norm_weightMinors_remainder_le h_range hg hZ_le hr_le⟩ |
| 295 | |
| 296 | /-- Let `y` be invertible. Flensted-Jensen's integral `l.flenstedJensen g y` at the identity matrix |
| 297 | `g = 1` is the mean over `k ∈ K = maxCompactU ε` of `|weightMinors μ k| ^ 2 / weightMinors |
| 298 | (-paramAddRho l) (kᴴ y k)`, divided by the mean `μ.kTypeNormSq` of `|weightMinors μ k| ^ 2`. Suppose |
| 299 | that the denominator of the integrand is `exp (q - θ - r k)` for all `k ∈ K`, with `q` real and `θ`, |
| 300 | `r k` complex. Then `l.flenstedJensen 1 y / exp θ` differs from `exp (-q)` by the mean over `K` of |
| 301 | `|weightMinors μ k| ^ 2 exp (-q) (exp (r k) - 1)`, divided by `μ.kTypeNormSq`. -/ |
| 302 | lemma flenstedJensen_div_exp_sub {y : Matrix n n ℂ} {θ : ℂ} {r : maxCompactU ε → ℂ} (hy : y.det ≠ 0) |
| 303 | (h_denom : ∀ k : maxCompactU ε, |
| 304 | weightMinors (-paramAddRho l) ((k : Matrix n n ℂ)ᴴ * y * k) = cexp (q - θ - r k)) : |
| 305 | l.flenstedJensen 1 y / cexp θ - Real.exp (-q) = |
| 306 | (∫ k : maxCompactU ε, |
| 307 | (‖weightMinors l.lowestKType k‖ ^ 2 * Real.exp (-q) : ℝ) * (cexp (r k) - 1) ∂haarK ε) / |
| 308 | l.lowestKType.kTypeNormSq := by |
| 309 | let F (k : maxCompactU ε) : ℂ := |
| 310 | weightMinors l.lowestKType (1 * k) * conj (weightMinors l.lowestKType k) / |
| 311 | weightMinors (-paramAddRho l) ((k : Matrix n n ℂ)ᴴ * y * k) |
| 312 | have h_def : l.flenstedJensen 1 y = |
| 313 | (∫ k : maxCompactU ε, F k ∂haarK ε) / l.lowestKType.kTypeNormSq := rfl |
| 314 | have hF : Integrable F (haarK ε) := integrable_of_compactSpace <| by |
| 315 | fun_prop (disch := simp [h_denom, hy, GeneralLinearGroup.det_ne_zero]) |
| 316 | have h_point (k : maxCompactU ε) : |
| 317 | (‖weightMinors l.lowestKType k‖ ^ 2 * Real.exp (-q) : ℝ) * (cexp (r k) - 1) = |
| 318 | F k / cexp θ - (‖weightMinors l.lowestKType k‖ ^ 2 : ℝ) * Real.exp (-q) := by |
| 319 | simp only [F, h_denom, one_mul, mul_conj', exp_sub, ofReal_mul, ofReal_pow, ofReal_exp, |
| 320 | ofReal_neg, Complex.exp_neg] |
| 321 | field_simp |
| 322 | have h_sq : Integrable (fun k : maxCompactU ε ↦ |
| 323 | ((‖weightMinors l.lowestKType k‖ ^ 2 : ℝ) * Real.exp (-q) : ℂ)) (haarK ε) := |
| 324 | integrable_of_compactSpace (by fun_prop (disch := simp [GeneralLinearGroup.det_ne_zero])) |
| 325 | have h_int : ∫ k : maxCompactU ε, |
| 326 | (‖weightMinors l.lowestKType k‖ ^ 2 * Real.exp (-q) : ℝ) * (cexp (r k) - 1) ∂haarK ε = |
| 327 | (∫ k : maxCompactU ε, F k ∂haarK ε) / cexp θ - |
| 328 | l.lowestKType.kTypeNormSq * Real.exp (-q) := by |
| 329 | simp only [h_point] |
| 330 | rw [integral_sub (hF.div_const _) h_sq, integral_div, integral_mul_const, |
| 331 | integral_complex_ofReal] |
| 332 | rw [h_int, h_def, sub_div, |
| 333 | mul_div_cancel_left₀ _ (ofReal_ne_zero.2 (kTypeNormSq_pos l.lowestKType).ne'), div_right_comm] |
| 334 | |
| 335 | /-- Let `δ T ≤ 10 ^ (-12)`, `T ≥ 1`, `N ≤ T`, `0 ≤ m ≤ exp (-Q / 2)` and |
| 336 | `|r| ≤ 10 ^ 6 δ (q + Q + N)`, with `δ` and `q` nonnegative. Then `m exp (-q) |exp r - 1|` is at |
| 337 | most `exp (-q) m / 10 + exp (-5100 T)`: either `r` is small, or `m exp (-q)` is. -/ |
| 338 | lemma mul_norm_exp_sub_one_le {m Q N : ℝ} {r : ℂ} (hT : 1 ≤ T) (hδ_nonneg : 0 ≤ δ) |
| 339 | (hδT : δ * T ≤ 1e-12) (hq : 0 ≤ q) (hN : N ≤ T) |
| 340 | (hm_nonneg : 0 ≤ m) (hm : m ≤ Real.exp (-(Q / 2))) (hr : ‖r‖ ≤ 10 ^ 6 * δ * (q + Q + N)) : |
| 341 | m * Real.exp (-q) * ‖cexp r - 1‖ ≤ Real.exp (-q) / 10 * m + Real.exp (-(5100 * T)) := by |
| 342 | set s : ℝ := q + Q + N with hs |
| 343 | rcases le_total s (50000 * T) with h_small | h_large |
| 344 | · have hr_small : ‖r‖ ≤ 1 / 20 := by linarith [mul_le_mul_of_nonneg_left h_small hδ_nonneg] |
| 345 | calc m * Real.exp (-q) * ‖cexp r - 1‖ ≤ m * Real.exp (-q) * (2 * (1 / 20)) := by |
| 346 | grw [Complex.norm_exp_sub_one_le (hr_small.trans (by norm_num)), hr_small] |
| 347 | _ ≤ _ := by linarith [Real.exp_nonneg (-(5100 * T))] |
| 348 | · have hδ_le : δ ≤ 1e-12 := (le_mul_of_one_le_right hδ_nonneg hT).trans hδT |
| 349 | have hr_quarter : ‖r‖ ≤ s / 4 := by |
| 350 | linarith [mul_le_mul_of_nonneg_right hδ_le (show 0 ≤ s by linarith)] |
| 351 | have h_exp : ‖cexp r - 1‖ ≤ Real.exp ‖r‖ - 1 := by |
| 352 | simpa using r.norm_exp_sub_sum_le_exp_norm_sub_sum 1 |
| 353 | calc m * Real.exp (-q) * ‖cexp r - 1‖ |
| 354 | ≤ Real.exp (-(Q / 2)) * Real.exp (-q) * Real.exp (s / 4) := by |
| 355 | grw [hm, h_exp, hr_quarter, sub_one_lt] |
| 356 | _ ≤ Real.exp (-(5100 * T)) := by |
| 357 | rw [← Real.exp_add, ← Real.exp_add, Real.exp_le_exp] |
| 358 | linarith |
| 359 | _ ≤ Real.exp (-q) / 10 * m + Real.exp (-(5100 * T)) := le_add_of_nonneg_left (by positivity) |
| 360 | |
| 361 | /-- **Gaussian shape.** Let the parameter `l = 2λ` have gap `500 n ^ 3 + A` and `|l i| ≤ L`, let `T` |
| 362 | be at least `1`, `n ^ 2` and `n ^ 2 log (n + L + 1)`, and let `δ T ≤ 10 ^ (-12)`. For `g` in the |
| 363 | unitary group `USign ε` of the form `diag ε` with `‖g - 1‖ ≤ δ` (Frobenius norm), the discrete |
| 364 | series coefficient `l.dsCoeff g`, divided by the phase `exp (tr μ log g)`, is within |
| 365 | `ϱ / 10 + exp (-100 T)` of a number `ϱ ∈ [0, 1]`; the proof takes a Gaussian in `g - 1` for `ϱ`. -/ |
| 366 | lemma exists_norm_dsCoeff_div_cexp_sub_le [Nonempty n] (hl : l.HasLargeGap A) |
| 367 | (hL : ∀ i : n, |l i| ≤ L) |
| 368 | {g : USign ε} (hg : ‖(g : Matrix n n ℂ) - 1‖ ≤ δ) (hT : 1 ≤ T) (hT_card : card n ^ 2 ≤ T) |
| 369 | (hT_log : card n ^ 2 * Real.log (card n + L + 1) ≤ T) (hδT : δ * T ≤ 1e-12) : |
| 370 | ∃ ϱ ∈ Set.Icc (0 : ℝ) 1, |
| 371 | ‖l.dsCoeff g / cexp (intDiagonal l.lowestKType * logOneAdd ((g : Matrix n n ℂ) - 1)).trace - |
| 372 | ϱ‖ ≤ ϱ / 10 + Real.exp (-100 * T) := by |
| 373 | -- Take `ϱ = exp (-q)` with `q = gapWeightedNormSq (-λ^ρ) (g - 1) / 4`, where |
| 374 | -- `λ^ρ = paramAddRho l`. |
| 375 | have hδ_nonneg : 0 ≤ δ := (norm_nonneg _).trans hg |
| 376 | have hδ_le : δ ≤ 1e-12 := (le_mul_of_one_le_right hδ_nonneg hT).trans hδT |
| 377 | set Z : Matrix n n ℂ := logOneAdd ((g : Matrix n n ℂ) - 1) |
| 378 | set q : ℝ := gapWeightedNormSq (-paramAddRho l) ((g : Matrix n n ℂ) - 1) / 4 with hq |
| 379 | have hq_nonneg : 0 ≤ q := by positivity |
| 380 | refine ⟨Real.exp (-q), ⟨Real.exp_nonneg _, Real.exp_le_one_iff.2 (by linarith)⟩, ?_⟩ |
| 381 | -- Step 1: a mean over `K`, at a matrix `y` whose products of minors are known. |
| 382 | obtain ⟨y, h_dsCoeff_eq, hy, h_denom⟩ := exists_weightMinors_neg_paramAddRho_eq_cexp hl g hg hδ_le |
| 383 | choose r hr_eq hr_le using h_denom |
| 384 | have h_mean : l.dsCoeff g / cexp (intDiagonal l.lowestKType * Z).trace - Real.exp (-q) = |
| 385 | (∫ k : maxCompactU ε, |
| 386 | (‖weightMinors l.lowestKType k‖ ^ 2 * Real.exp (-q) : ℝ) * (cexp (r k) - 1) ∂haarK ε) / |
| 387 | l.lowestKType.kTypeNormSq := by |
| 388 | rw [h_dsCoeff_eq, flenstedJensen_div_exp_sub hy hr_eq] |
| 389 | -- Step 2: the integrand is small where `r k` is not. |
| 390 | have h_point (k : maxCompactU ε) : |
| 391 | ‖(‖weightMinors l.lowestKType k‖ ^ 2 * Real.exp (-q) : ℝ) * (cexp (r k) - 1)‖ ≤ |
| 392 | Real.exp (-q) / 10 * ‖weightMinors l.lowestKType k‖ ^ 2 + Real.exp (-(5100 * T)) := by |
| 393 | rw [norm_mul, Complex.norm_of_nonneg (by positivity)] |
| 394 | exact mul_norm_exp_sub_one_le hT hδ_nonneg hδT hq_nonneg hT_card (sq_nonneg _) |
| 395 | (norm_weightMinors_sq_le_exp l.lowestKType k) (hr_le k) |
| 396 | -- Integrate this bound, and use the lower bound for `l.lowestKType.kTypeNormSq`. |
| 397 | have h_sq : Integrable (fun k : maxCompactU ε ↦ |
| 398 | Real.exp (-q) / 10 * ‖weightMinors l.lowestKType k‖ ^ 2) (haarK ε) := |
| 399 | integrable_of_compactSpace (by fun_prop (disch := simp [GeneralLinearGroup.det_ne_zero])) |
| 400 | have h_pos : 0 < l.lowestKType.kTypeNormSq := kTypeNormSq_pos l.lowestKType |
| 401 | rw [h_mean, norm_div, Complex.norm_of_nonneg h_pos.le, div_le_iff₀ h_pos] |
| 402 | calc _ ≤ ∫ k : maxCompactU ε, Real.exp (-q) / 10 * ‖weightMinors l.lowestKType k‖ ^ 2 + |
| 403 | Real.exp (-(5100 * T)) ∂haarK ε := |
| 404 | norm_integral_le_of_norm_le (h_sq.fun_add (integrable_const _)) (.of_forall h_point) |
| 405 | _ = Real.exp (-q) / 10 * l.lowestKType.kTypeNormSq + |
| 406 | Real.exp (-100 * T) * Real.exp (-(5000 * T)) := by |
| 407 | rw [← Real.exp_add, show -100 * T + -(5000 * T) = -(5100 * T) by ring] |
| 408 | simp [integral_add h_sq (integrable_const _), integral_const_mul] |
| 409 | _ ≤ (Real.exp (-q) / 10 + Real.exp (-100 * T)) * l.lowestKType.kTypeNormSq := by |
| 410 | grw [exp_neg_le_kTypeNormSq hl hL hT hT_card hT_log, add_mul] |
| 411 | |
| 412 | end New.DiscreteSeries |