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 TauCeti.LinearAlgebra.Charpoly.Trace |
| 4 | public import Mathlib.Analysis.CStarAlgebra.Module.Constructions |
| 5 | import Mathlib.Algebra.DirectSum.LinearMap |
| 6 | import Mathlib.LinearAlgebra.Charpoly.BaseChange |
| 7 | import Mathlib.LinearAlgebra.Eigenspace.Triangularizable |
| 8 | import Mathlib.LinearAlgebra.Eigenspace.Zero |
| 9 | import Mathlib.Analysis.InnerProductSpace.NormDet |
| 10 | public import Lib.Speed |
| 11 | |
| 12 | /-! |
| 13 | # Traces on the range of an idempotent from traces of a raising operator |
| 14 | |
| 15 | Let `T⁺`, `T⁻` be adjoint operators on a finite-dimensional inner product space with |
| 16 | `T⁺ * T⁻ = d • (1 + c • e)`, where `d, c > 0`, `e` is idempotent and `A` commutes with `T⁺` and |
| 17 | `T⁻`. The traces of the `A ^ l * T⁺ ^ i`, `l, i ≥ 1`, determine the trace of `A` on the range of `e` |
| 18 | (`LineRelation.trace_mul_mean_eq`): on the generalised eigenspace of `A` for each non-zero |
| 19 | eigenvalue they give the eigenvalues of `T⁺`, hence the dimension and |
| 20 | `|det T⁺| ^ 2 = d ^ dim * (1 + c) ^ rank e`. |
| 21 | |
| 22 | The first section collects what traces determine on generalised eigenspaces; in particular the |
| 23 | traces of all positive powers of an invertible operator determine its characteristic polynomial |
| 24 | (`charpoly_eq_of_trace_pow_succ_eq`). |
| 25 | -/ |
| 26 | |
| 27 | @[expose] public section |
| 28 | |
| 29 | open Module LinearMap Polynomial InnerProductSpace |
| 30 | |
| 31 | noncomputable section |
| 32 | |
| 33 | namespace New |
| 34 | |
| 35 | section GenEigenspace |
| 36 | |
| 37 | variable {K B B' : Type*} [Field K] [AddCommGroup B] [Module K B] [AddCommGroup B'] [Module K B'] |
| 38 | {A T : End K B} {A' T' : End K B'} |
| 39 | |
| 40 | /-- For an operator `T` that commutes with `A`, the restriction of `T` to the generalised |
| 41 | eigenspace of `A` for `μ`. -/ |
| 42 | abbrev restrictGenEigenspace (h : Commute A T) (μ : K) : End K (A.maxGenEigenspace μ) := |
| 43 | T.restrict fun _ hx ↦ End.mapsTo_maxGenEigenspace_of_comm h μ hx |
| 44 | |
| 45 | /-- Restriction to a generalised eigenspace of `A` commutes with taking powers. -/ |
| 46 | lemma restrictGenEigenspace_pow (h : Commute A T) (μ : K) (i : ℕ) : |
| 47 | restrictGenEigenspace h μ ^ i = restrictGenEigenspace (h.pow_right i) μ := |
| 48 | End.pow_restrict i _ |
| 49 | |
| 50 | variable [Module.Finite K B] [Module.Finite K B'] |
| 51 | |
| 52 | /-- If `T` commutes with `A`, then on the generalised eigenspace of `A` for `μ` the trace of |
| 53 | `A * T` is `μ` times the trace of `T`, because `A - μ` is nilpotent there and commutes with `T`. -/ |
| 54 | lemma trace_restrictGenEigenspace_mul (h : Commute A T) (μ : K) : |
| 55 | trace K (A.maxGenEigenspace μ) |
| 56 | (restrictGenEigenspace (T := A * T) ((Commute.refl A).mul_right h) μ) = |
| 57 | μ * trace K (A.maxGenEigenspace μ) (restrictGenEigenspace h μ) := by |
| 58 | have h_comm : Commute (restrictGenEigenspace h μ) (restrictGenEigenspace (.refl A) μ) := |
| 59 | restrict_commute h.symm _ _ |
| 60 | rw [show restrictGenEigenspace ((Commute.refl A).mul_right h) μ = |
| 61 | restrictGenEigenspace (.refl A) μ * restrictGenEigenspace h μ from rfl, ← h_comm.eq] |
| 62 | exact trace_comp_eq_mul_of_commute_of_isNilpotent μ h_comm |
| 63 | (A.isNilpotent_restrict_maxGenEigenspace_sub_algebraMap μ) |
| 64 | |
| 65 | /-- If `T` commutes with `A`, then on the generalised eigenspace of `A` for `μ` the trace of |
| 66 | `A ^ l * T` is `μ ^ l` times the trace of `T`. -/ |
| 67 | lemma trace_restrictGenEigenspace_pow_mul (h : Commute A T) (μ : K) (l : ℕ) : |
| 68 | trace K (A.maxGenEigenspace μ) |
| 69 | (restrictGenEigenspace (T := A ^ l * T) ((Commute.self_pow A l).mul_right h) μ) = |
| 70 | μ ^ l * trace K (A.maxGenEigenspace μ) (restrictGenEigenspace h μ) := by |
| 71 | induction l with |
| 72 | | zero => simp only [restrictGenEigenspace, pow_zero, one_mul] |
| 73 | | succ l ih => |
| 74 | have h_comm : Commute A (A ^ l * T) := (Commute.self_pow A l).mul_right h |
| 75 | rw [pow_succ' μ, mul_assoc, ← ih, ← trace_restrictGenEigenspace_mul h_comm] |
| 76 | simp only [restrictGenEigenspace, pow_succ', mul_assoc] |
| 77 | |
| 78 | /-- Let `T` commute with `A` and let the finite set `S` contain all eigenvalues of `A`. Then the |
| 79 | trace of `A ^ l * T` is the sum over `μ ∈ S` of `μ ^ l` times the trace of `T` on the generalised |
| 80 | eigenspace of `A` for `μ`. -/ |
| 81 | lemma trace_pow_mul_eq_sum [IsAlgClosed K] (h : Commute A T) {S : Finset K} |
| 82 | (hS : ∀ μ : K, μ ∉ S → A.maxGenEigenspace μ = ⊥) (l : ℕ) : |
| 83 | trace K B (A ^ l * T) = |
| 84 | ∑ μ ∈ S, μ ^ l * trace K (A.maxGenEigenspace μ) (restrictGenEigenspace h μ) := by |
| 85 | classical |
| 86 | have h_subset : {μ : K | A.maxGenEigenspace μ ≠ ⊥} ⊆ (S : Set K) := |
| 87 | fun μ hμ ↦ by_contra fun hμS ↦ hμ (hS μ hμS) |
| 88 | have h_finite : {μ : K | A.maxGenEigenspace μ ≠ ⊥}.Finite := S.finite_toSet.subset h_subset |
| 89 | have h_internal := DirectSum.isInternal_submodule_of_iSupIndep_of_iSup_eq_top |
| 90 | A.independent_maxGenEigenspace A.iSup_maxGenEigenspace_eq_top |
| 91 | have h_comm : Commute A (A ^ l * T) := (Commute.self_pow A l).mul_right h |
| 92 | calc _ = ∑ μ ∈ h_finite.toFinset, |
| 93 | trace K (A.maxGenEigenspace μ) (restrictGenEigenspace h_comm μ) := |
| 94 | trace_eq_sum_trace_restrict' h_internal h_finite (End.mapsTo_maxGenEigenspace_of_comm h_comm) |
| 95 | _ = ∑ μ ∈ S, trace K (A.maxGenEigenspace μ) (restrictGenEigenspace h_comm μ) := by |
| 96 | refine Finset.sum_subset (h_finite.toFinset_subset.2 h_subset) fun μ _ hμ ↦ ?_ |
| 97 | have : Subsingleton (A.maxGenEigenspace μ) := |
| 98 | Submodule.subsingleton_iff_eq_bot.2 (by simpa using hμ) |
| 99 | rw [Subsingleton.eq_zero (restrictGenEigenspace h_comm μ), map_zero] |
| 100 | _ = ∑ μ ∈ S, μ ^ l * trace K (A.maxGenEigenspace μ) (restrictGenEigenspace h μ) := |
| 101 | Finset.sum_congr rfl fun μ _ ↦ trace_restrictGenEigenspace_pow_mul h μ l |
| 102 | |
| 103 | /-- The sequences `l ↦ μ ^ l`, `μ : K`, are linearly independent: two combinations of them that |
| 104 | agree for all `l` have the same coefficients. -/ |
| 105 | lemma eq_of_sum_pow_mul_eq {S : Finset K} {a a' : K → K} |
| 106 | (h_sum : ∀ l : ℕ, ∑ μ ∈ S, μ ^ l * a μ = ∑ μ ∈ S, μ ^ l * a' μ) {μ : K} (hμ : μ ∈ S) : |
| 107 | a μ = a' μ := by |
| 108 | have h_indep : LinearIndependent K fun μ : K ↦ ⇑(powersHom K μ) := |
| 109 | (linearIndependent_monoidHom (Multiplicative ℕ) K).comp _ (powersHom K).injective |
| 110 | have h_fun : ∑ ν ∈ S, a ν • ⇑(powersHom K ν) = ∑ ν ∈ S, a' ν • ⇑(powersHom K ν) := by |
| 111 | funext l |
| 112 | simpa [mul_comm] using h_sum l.toAdd |
| 113 | exact linearIndependent_iff'ₛ.1 h_indep S a a' h_fun μ hμ |
| 114 | |
| 115 | /-- Given operators `A` and `A'` and a scalar `μ`, there is a finite set that contains `μ` and all |
| 116 | eigenvalues of `A` and of `A'`. -/ |
| 117 | lemma exists_finset_maxGenEigenspace_eq_bot (A : End K B) (A' : End K B') (μ : K) : |
| 118 | ∃ S : Finset K, μ ∈ S ∧ |
| 119 | (∀ ν : K, ν ∉ S → A.maxGenEigenspace ν = ⊥) ∧ |
| 120 | ∀ ν : K, ν ∉ S → A'.maxGenEigenspace ν = ⊥ := by |
| 121 | classical |
| 122 | have h_finite : {ν : K | A.maxGenEigenspace ν ≠ ⊥}.Finite := |
| 123 | Submodule.finite_ne_bot_of_iSupIndep A.independent_maxGenEigenspace |
| 124 | have h_finite' : {ν : K | A'.maxGenEigenspace ν ≠ ⊥}.Finite := |
| 125 | Submodule.finite_ne_bot_of_iSupIndep A'.independent_maxGenEigenspace |
| 126 | exact ⟨insert μ (h_finite.toFinset ∪ h_finite'.toFinset), Finset.mem_insert_self _ _, |
| 127 | by simp +contextual, by simp +contextual⟩ |
| 128 | |
| 129 | /-- Let `T` commute with `A` and `T'` with `A'`. If the traces of `A ^ l * T` and `A' ^ l * T'` |
| 130 | agree for all `l`, then so do the traces of `T` and `T'` on the generalised eigenspaces of `A` |
| 131 | and `A'` for each `μ`. -/ |
| 132 | lemma trace_restrictGenEigenspace_eq [IsAlgClosed K] (h : Commute A T) (h' : Commute A' T') |
| 133 | (h_trace : ∀ l : ℕ, trace K B (A ^ l * T) = trace K B' (A' ^ l * T')) (μ : K) : |
| 134 | trace K (A.maxGenEigenspace μ) (restrictGenEigenspace h μ) = |
| 135 | trace K (A'.maxGenEigenspace μ) (restrictGenEigenspace h' μ) := by |
| 136 | obtain ⟨S, hμ, hS, hS'⟩ := exists_finset_maxGenEigenspace_eq_bot A A' μ |
| 137 | refine eq_of_sum_pow_mul_eq |
| 138 | (a := fun ν ↦ trace K (A.maxGenEigenspace ν) (restrictGenEigenspace h ν)) |
| 139 | (a' := fun ν ↦ trace K (A'.maxGenEigenspace ν) (restrictGenEigenspace h' ν)) (fun l ↦ ?_) hμ |
| 140 | rw [← trace_pow_mul_eq_sum h hS, ← trace_pow_mul_eq_sum h' hS', h_trace] |
| 141 | |
| 142 | /-- Let `T` commute with `A` and `T'` with `A'`. If the traces of `A ^ (l + 1) * T` and |
| 143 | `A' ^ (l + 1) * T'` agree for all `l`, then so do the traces of `T` and `T'` on the generalised |
| 144 | eigenspaces of `A` and `A'` for each non-zero `μ`. -/ |
| 145 | lemma trace_restrictGenEigenspace_eq_of_ne_zero [IsAlgClosed K] (h : Commute A T) |
| 146 | (h' : Commute A' T') |
| 147 | (h_trace : ∀ l : ℕ, trace K B (A ^ (l + 1) * T) = trace K B' (A' ^ (l + 1) * T')) |
| 148 | {μ : K} (hμ : μ ≠ 0) : |
| 149 | trace K (A.maxGenEigenspace μ) (restrictGenEigenspace h μ) = |
| 150 | trace K (A'.maxGenEigenspace μ) (restrictGenEigenspace h' μ) := by |
| 151 | apply mul_left_cancel₀ hμ |
| 152 | rw [← trace_restrictGenEigenspace_mul, ← trace_restrictGenEigenspace_mul] |
| 153 | refine trace_restrictGenEigenspace_eq _ _ (fun l ↦ ?_) μ |
| 154 | rw [← mul_assoc, ← mul_assoc, ← pow_succ, ← pow_succ, h_trace] |
| 155 | |
| 156 | /-- The trace of the identity on a generalised eigenspace is the dimension of that space. -/ |
| 157 | lemma trace_restrictGenEigenspace_one (A : End K B) (μ : K) : |
| 158 | trace K (A.maxGenEigenspace μ) (restrictGenEigenspace (Commute.one_right A) μ) = |
| 159 | finrank K (A.maxGenEigenspace μ) := |
| 160 | trace_one K (A.maxGenEigenspace μ) |
| 161 | |
| 162 | /-- Operators whose generalised eigenspaces have the same dimensions for every `μ` have the same |
| 163 | characteristic polynomial, as these dimensions are the multiplicities of its roots. -/ |
| 164 | lemma charpoly_eq_of_finrank_maxGenEigenspace_eq [IsAlgClosed K] |
| 165 | (h_finrank : ∀ μ : K, finrank K (A.maxGenEigenspace μ) = finrank K (A'.maxGenEigenspace μ)) : |
| 166 | A.charpoly = A'.charpoly := by |
| 167 | classical |
| 168 | have h_roots : A.charpoly.roots = A'.charpoly.roots := by |
| 169 | ext μ |
| 170 | simp_rw [count_roots, ← finrank_maxGenEigenspace_eq, h_finrank] |
| 171 | rw [(IsAlgClosed.splits A.charpoly).eq_prod_roots_of_monic A.charpoly_monic, |
| 172 | (IsAlgClosed.splits A'.charpoly).eq_prod_roots_of_monic A'.charpoly_monic, h_roots] |
| 173 | |
| 174 | lemma finrank_maxGenEigenspace_zero_of_det_ne_zero (h_det : T.det ≠ 0) : |
| 175 | finrank K (T.maxGenEigenspace 0) = 0 := by |
| 176 | have h_unit : IsUnit T := (isUnit_iff_isUnit_det T).2 h_det.isUnit |
| 177 | rw [T.maxGenEigenspace_eq_genEigenspace_finrank, End.genEigenspace_zero_nat, |
| 178 | (isUnit_iff_ker_eq_bot _).1 (h_unit.pow _), finrank_bot] |
| 179 | |
| 180 | /-- Two invertible operators with the same traces of all positive powers have the same |
| 181 | characteristic polynomial. -/ |
| 182 | lemma charpoly_eq_of_trace_pow_succ_eq [IsAlgClosed K] [CharZero K] (h_det : T.det ≠ 0) |
| 183 | (h_det' : T'.det ≠ 0) |
| 184 | (h_trace : ∀ i : ℕ, trace K B (T ^ (i + 1)) = trace K B' (T' ^ (i + 1))) : |
| 185 | T.charpoly = T'.charpoly := by |
| 186 | refine charpoly_eq_of_finrank_maxGenEigenspace_eq fun μ ↦ Nat.cast_injective (R := K) ?_ |
| 187 | obtain rfl | hμ := eq_or_ne μ 0 |
| 188 | · simp [finrank_maxGenEigenspace_zero_of_det_ne_zero, h_det, h_det'] |
| 189 | rw [← trace_restrictGenEigenspace_one, ← trace_restrictGenEigenspace_one] |
| 190 | exact trace_restrictGenEigenspace_eq_of_ne_zero _ _ (fun l ↦ by simp only [mul_one, h_trace]) hμ |
| 191 | |
| 192 | /-- For an idempotent `e`, the determinant of `1 + c e` is `(1 + c) ^ rank e`. -/ |
| 193 | lemma det_one_add_smul_of_isIdempotentElem {e : End K B} (he : IsIdempotentElem e) (c : K) : |
| 194 | (1 + c • e).det = (1 + c) ^ finrank K (range e) := by |
| 195 | -- The operator is `1 + c` on the range of `e` and induces the identity on the quotient. |
| 196 | have h_range (x : B) (hx : x ∈ range e) : (1 + c • e) x = (1 + c) • x := by |
| 197 | simp [he.mem_range_iff.1 hx, add_smul] |
| 198 | have h_stable (x : B) (hx : x ∈ range e) : (1 + c • e) x ∈ range e := by |
| 199 | simpa only [h_range x hx] using Submodule.smul_mem _ (1 + c) hx |
| 200 | have h_restrict : (1 + c • e).restrict h_stable = (1 + c) • 1 := by |
| 201 | ext x |
| 202 | simpa using h_range x x.property |
| 203 | have h_quotient : (range e).mapQ (range e) (1 + c • e) h_stable = 1 := by |
| 204 | ext x |
| 205 | simp |
| 206 | simp [det_eq_det_mul_det (range e) _ h_stable, h_restrict, h_quotient, det_smul] |
| 207 | |
| 208 | end GenEigenspace |
| 209 | |
| 210 | variable {B B' : Type*} [NormedAddCommGroup B] [InnerProductSpace ℂ B] |
| 211 | [NormedAddCommGroup B'] [InnerProductSpace ℂ B'] |
| 212 | variable {d c : ℝ} |
| 213 | |
| 214 | /-- The line relations among operators `T⁺ = Tp`, `T⁻ = Tm`, `e` and `A`: `T⁻` is the adjoint of |
| 215 | `T⁺`, `e` is idempotent, `T⁺ T⁻ = d (1 + c e)` with `c, d > 0`, and `A` commutes with `T⁺` and |
| 216 | `T⁻`. They are meant for the stabiliser of a line in `GL_n(𝒪)`, `𝒪` a local ring with residue |
| 217 | field of order `q`: there `e` is the mean over `GL_n(𝒪)` (whence `mean` in the names of the |
| 218 | lemmas), `d = q ^ (n - 2)` and `c = q ^ n - 1`. -/ |
| 219 | structure LineRelation (d c : ℝ) (A Tp Tm e : End ℂ B) : Prop where |
| 220 | /-- The constant `d` is positive. -/ |
| 221 | d_pos : 0 < d |
| 222 | /-- The constant `c` is positive. -/ |
| 223 | c_pos : 0 < c |
| 224 | /-- `e` is idempotent. -/ |
| 225 | idem : IsIdempotentElem e |
| 226 | /-- `T⁻` is the adjoint of `T⁺`. -/ |
| 227 | adjoint : ∀ x y : B, ⟪Tp x, y⟫_ℂ = ⟪x, Tm y⟫_ℂ |
| 228 | /-- `T⁺ T⁻ = d (1 + c e)`. -/ |
| 229 | mul_eq : Tp * Tm = (d : ℂ) • (1 + (c : ℂ) • e) |
| 230 | /-- `A` commutes with `T⁺`. -/ |
| 231 | commute_plus : Commute A Tp |
| 232 | /-- `A` commutes with `T⁻`. -/ |
| 233 | commute_minus : Commute A Tm |
| 234 | |
| 235 | namespace LineRelation |
| 236 | |
| 237 | variable {A Tp Tm e : End ℂ B} {A' Tp' Tm' e' : End ℂ B'} |
| 238 | |
| 239 | lemma mean_eq (h : LineRelation d c A Tp Tm e) : |
| 240 | e = (c : ℂ)⁻¹ • ((d : ℂ)⁻¹ • (Tp * Tm) - 1) := by |
| 241 | rw [h.mul_eq, inv_smul_smul₀ (Complex.ofReal_ne_zero.2 h.d_pos.ne'), add_sub_cancel_left, |
| 242 | inv_smul_smul₀ (Complex.ofReal_ne_zero.2 h.c_pos.ne')] |
| 243 | |
| 244 | /-- Under the line relations, `A` commutes with `e`, which is a polynomial in `T⁺ T⁻`. -/ |
| 245 | lemma commute_mean (h : LineRelation d c A Tp Tm e) : Commute A e := by |
| 246 | rw [h.mean_eq] |
| 247 | exact (((h.commute_plus.mul_right h.commute_minus).smul_right _).sub_right |
| 248 | (.one_right A)).smul_right _ |
| 249 | |
| 250 | /-- Under the line relations, a subspace that is stable under `T⁺` and `T⁻` is stable under `e`, |
| 251 | as `e` is a linear combination of `T⁺ T⁻` and the identity. -/ |
| 252 | lemma mapsTo_mean (h : LineRelation d c A Tp Tm e) {H : Submodule ℂ B} |
| 253 | (h_plus : ∀ x ∈ H, Tp x ∈ H) (h_minus : ∀ x ∈ H, Tm x ∈ H) : ∀ x ∈ H, e x ∈ H := by |
| 254 | intro x hx |
| 255 | simpa [h.mean_eq] using H.smul_mem _ (H.sub_mem (H.smul_mem _ (h_plus _ (h_minus x hx))) hx) |
| 256 | |
| 257 | /-- The line relations (`T⁺`, `T⁻` adjoint, `T⁺ T⁻ = d (1 + c e)`, `A` commuting with both) pass |
| 258 | to a subspace that is stable under `A`, `T⁺` and `T⁻`. -/ |
| 259 | lemma restrict (h : LineRelation d c A Tp Tm e) {H : Submodule ℂ B} (hA : ∀ x ∈ H, A x ∈ H) |
| 260 | (h_plus : ∀ x ∈ H, Tp x ∈ H) (h_minus : ∀ x ∈ H, Tm x ∈ H) : |
| 261 | LineRelation d c (A.restrict hA) (Tp.restrict h_plus) (Tm.restrict h_minus) |
| 262 | (e.restrict (h.mapsTo_mean h_plus h_minus)) where |
| 263 | d_pos := h.d_pos |
| 264 | c_pos := h.c_pos |
| 265 | idem := by |
| 266 | ext x |
| 267 | simpa using LinearMap.congr_fun h.idem.eq x |
| 268 | adjoint x y := by simpa only [Submodule.coe_inner, restrict_apply] using h.adjoint x y |
| 269 | mul_eq := by |
| 270 | ext x |
| 271 | simpa using LinearMap.congr_fun h.mul_eq x |
| 272 | commute_plus := restrict_commute h.commute_plus hA h_plus |
| 273 | commute_minus := restrict_commute h.commute_minus hA h_minus |
| 274 | |
| 275 | /-- The line relations (`T⁺`, `T⁻` adjoint, `T⁺ T⁻ = d (1 + c e)`, `A` commuting with both) hold |
| 276 | for the restrictions of `A`, `T⁺`, `T⁻` and `e` to the generalised eigenspace of `A` for `α`. -/ |
| 277 | lemma restrict_maxGenEigenspace (h : LineRelation d c A Tp Tm e) (α : ℂ) : |
| 278 | LineRelation d c (restrictGenEigenspace (T := A) (.refl A) α) |
| 279 | (restrictGenEigenspace (T := Tp) h.commute_plus α) |
| 280 | (restrictGenEigenspace (T := Tm) h.commute_minus α) |
| 281 | (restrictGenEigenspace (T := e) h.commute_mean α) := |
| 282 | h.restrict (fun _ hx ↦ End.mapsTo_maxGenEigenspace_of_comm (.refl A) α hx) |
| 283 | (fun _ hx ↦ End.mapsTo_maxGenEigenspace_of_comm h.commute_plus α hx) |
| 284 | (fun _ hx ↦ End.mapsTo_maxGenEigenspace_of_comm h.commute_minus α hx) |
| 285 | |
| 286 | variable [Module.Finite ℂ B] [Module.Finite ℂ B'] |
| 287 | |
| 288 | /-- For operators with `T⁻` adjoint to `T⁺` and `T⁺ T⁻ = d (1 + c e)`, `e` idempotent, one has |
| 289 | `|det T⁺| ^ 2 = det (T⁺ T⁻) = d ^ dim B * (1 + c) ^ rank e`. -/ |
| 290 | lemma norm_det_sq (h : LineRelation d c A Tp Tm e) : |
| 291 | ‖Tp.det‖ ^ 2 = d ^ finrank ℂ B * (1 + c) ^ finrank ℂ (range e) := by |
| 292 | have h_adjoint : Tp.adjoint = Tm := by |
| 293 | rw [(eq_adjoint_iff Tp Tm).2 h.adjoint, adjoint_adjoint] |
| 294 | apply Complex.ofReal_injective |
| 295 | calc _ = (Tm * Tp).det := by |
| 296 | rw [← normDet_eq_norm_det, ← h_adjoint] |
| 297 | exact normDet_sq Tp |
| 298 | _ = (Tp * Tm).det := by rw [map_mul, map_mul, mul_comm] |
| 299 | _ = (d : ℂ) ^ finrank ℂ B * (1 + c) ^ finrank ℂ (range e) := by |
| 300 | rw [h.mul_eq, det_smul, det_one_add_smul_of_isIdempotentElem h.idem] |
| 301 | _ = (d ^ finrank ℂ B * (1 + c) ^ finrank ℂ (range e) : ℝ) := by norm_cast |
| 302 | |
| 303 | lemma det_ne_zero (h : LineRelation d c A Tp Tm e) : Tp.det ≠ 0 := by |
| 304 | refine norm_ne_zero_iff.1 (ne_zero_pow two_ne_zero ?_) |
| 305 | rw [h.norm_det_sq] |
| 306 | have := h.d_pos |
| 307 | have := h.c_pos |
| 308 | positivity |
| 309 | |
| 310 | /-- Let `A, T⁺, T⁻, e` and `A', T⁺', T⁻', e'` satisfy the line relations (`T⁺`, `T⁻` adjoint, |
| 311 | `T⁺ T⁻ = d (1 + c e)`) for the same `c, d > 0`. If `T⁺` and `T⁺'` have the same characteristic |
| 312 | polynomial, then `e` and `e'` have the same rank: the polynomial gives the dimension and |
| 313 | `det T⁺`, hence the rank. -/ |
| 314 | lemma finrank_range_eq_of_charpoly_eq (h : LineRelation d c A Tp Tm e) |
| 315 | (h' : LineRelation d c A' Tp' Tm' e') (h_charpoly : Tp.charpoly = Tp'.charpoly) : |
| 316 | finrank ℂ (range e) = finrank ℂ (range e') := by |
| 317 | have h_dim : finrank ℂ B = finrank ℂ B' := by |
| 318 | rw [← Tp.charpoly_natDegree, h_charpoly, Tp'.charpoly_natDegree] |
| 319 | have h_pow : (1 + c) ^ finrank ℂ (range e) = (1 + c) ^ finrank ℂ (range e') := |
| 320 | mul_left_cancel₀ (pow_pos h.d_pos (finrank ℂ B')).ne' |
| 321 | (by rw [← h'.norm_det_sq, ← LinearMap.det_eq_of_charpoly_eq h_charpoly, h.norm_det_sq, h_dim]) |
| 322 | exact pow_right_injective₀ (add_pos one_pos h.c_pos) (lt_add_of_pos_right 1 h.c_pos).ne' h_pow |
| 323 | |
| 324 | /-- Let `A, T⁺, T⁻, e` and `A', T⁺', T⁻', e'` satisfy the line relations (`T⁺`, `T⁻` adjoint, |
| 325 | `T⁺ T⁻ = d (1 + c e)`, `A` commuting with both) for the same `c, d > 0`. If the traces of |
| 326 | `A ^ (l + 1) * T⁺ ^ (i + 1)` and `A' ^ (l + 1) * T⁺' ^ (i + 1)` agree for all `l, i`, then for |
| 327 | each non-zero `α` the idempotents `e` and `e'` have the same rank on the generalised eigenspaces |
| 328 | of `A` and `A'` for `α`. -/ |
| 329 | lemma finrank_range_restrictGenEigenspace_eq (h : LineRelation d c A Tp Tm e) |
| 330 | (h' : LineRelation d c A' Tp' Tm' e') |
| 331 | (h_trace : ∀ l i : ℕ, |
| 332 | trace ℂ B (A ^ (l + 1) * Tp ^ (i + 1)) = trace ℂ B' (A' ^ (l + 1) * Tp' ^ (i + 1))) |
| 333 | {α : ℂ} (hα : α ≠ 0) : |
| 334 | finrank ℂ (range (restrictGenEigenspace (T := e) h.commute_mean α)) = |
| 335 | finrank ℂ (range (restrictGenEigenspace (T := e') h'.commute_mean α)) := by |
| 336 | -- On the generalised eigenspaces for `α` the operators `T⁺` are invertible, so the traces of |
| 337 | -- their positive powers determine their characteristic polynomials. |
| 338 | have h_charpoly : (restrictGenEigenspace h.commute_plus α).charpoly = |
| 339 | (restrictGenEigenspace h'.commute_plus α).charpoly := by |
| 340 | refine charpoly_eq_of_trace_pow_succ_eq (h.restrict_maxGenEigenspace α).det_ne_zero |
| 341 | (h'.restrict_maxGenEigenspace α).det_ne_zero fun i ↦ ?_ |
| 342 | rw [restrictGenEigenspace_pow, restrictGenEigenspace_pow] |
| 343 | exact trace_restrictGenEigenspace_eq_of_ne_zero _ _ (fun l ↦ h_trace l i) hα |
| 344 | exact (h.restrict_maxGenEigenspace α).finrank_range_eq_of_charpoly_eq |
| 345 | (h'.restrict_maxGenEigenspace α) h_charpoly |
| 346 | |
| 347 | /-- Let `A, T⁺, T⁻, e` and `A', T⁺', T⁻', e'` satisfy the line relations (`T⁺`, `T⁻` adjoint, |
| 348 | `T⁺ T⁻ = d (1 + c e)`, `A` commuting with both) for the same `c, d > 0`. If the traces of |
| 349 | `A ^ (l + 1) * T⁺ ^ (i + 1)` and `A' ^ (l + 1) * T⁺' ^ (i + 1)` agree for all `l, i`, then so do |
| 350 | the traces of `A * e` and `A' * e'`, which are those of `A` and `A'` on the ranges of `e` and |
| 351 | `e'`. -/ |
| 352 | theorem trace_mul_mean_eq (h : LineRelation d c A Tp Tm e) (h' : LineRelation d c A' Tp' Tm' e') |
| 353 | (h_trace : ∀ l i : ℕ, |
| 354 | trace ℂ B (A ^ (l + 1) * Tp ^ (i + 1)) = trace ℂ B' (A' ^ (l + 1) * Tp' ^ (i + 1))) : |
| 355 | trace ℂ B (A * e) = trace ℂ B' (A' * e') := by |
| 356 | -- Both traces are sums over a finite set containing the eigenvalues of `A` and `A'`: the term of |
| 357 | -- `α` is `α` times the rank of the idempotent on the generalised eigenspace for `α`. |
| 358 | obtain ⟨S, -, hS, hS'⟩ := exists_finset_maxGenEigenspace_eq_bot A A' 0 |
| 359 | rw [← pow_one A, ← pow_one A', trace_pow_mul_eq_sum h.commute_mean hS, |
| 360 | trace_pow_mul_eq_sum h'.commute_mean hS'] |
| 361 | refine Finset.sum_congr rfl fun α _ ↦ ?_ |
| 362 | obtain rfl | hα := eq_or_ne α 0 |
| 363 | · rw [pow_one, zero_mul, zero_mul] |
| 364 | -- The trace of an idempotent is its rank. |
| 365 | simp only [(h.restrict_maxGenEigenspace α).idem.isProj_range.trace, |
| 366 | (h'.restrict_maxGenEigenspace α).idem.isProj_range.trace, |
| 367 | h.finrank_range_restrictGenEigenspace_eq h' h_trace hα] |
| 368 | |
| 369 | end LineRelation |
| 370 | |
| 371 | end New |
| 372 | |
| 373 | end |