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.RingTheory.PiTensorProduct |
| 4 | import Mathlib.RingTheory.SimpleRing.Principal |
| 5 | import TauCeti.LinearAlgebra.Matrix.Charpoly.Inverse |
| 6 | import TauCeti.LinearAlgebra.Matrix.Triangular |
| 7 | import TauCeti.Topology.Algebra.Group.Units |
| 8 | import TauCeti.Topology.Instances.Matrix |
| 9 | public import Lib.General.LinearAlgebra.MinorProducts |
| 10 | public import Lib.Adelic.QuotientMeasure.Basic -- shake: keep (needed public by an exposed definition) |
| 11 | import Lib.DiscreteSeries.FlenstedJensen.RightDerivatives |
| 12 | import Lib.DiscreteSeries.Haar.TotalMass |
| 13 | |
| 14 | /-! |
| 15 | # Maximal compact subgroup, block diagonal matrices and equivariance of minors |
| 16 | |
| 17 | For signs `ε`, let `J = New.signMatrix ε`. `New.USign ε` is the unitary group of `J`, |
| 18 | `New.maxCompactU ε` is its subgroup of unitary matrices, `New.blockDiagAlg ε` is the algebra of |
| 19 | matrices that commute with `J`, and `New.blockDiagPart ε x` is the block diagonal part of `x`. |
| 20 | |
| 21 | ## Main definitions and results |
| 22 | |
| 23 | * `New.mem_blockDiagAlg`, `New.blockDiagPart_eq`: `New.blockDiagAlg ε` consists of the block |
| 24 | diagonal matrices, and `New.blockDiagPart ε x` is `(x + J * x * J) / 2`. |
| 25 | * `New.mem_maxCompactU`: an element of the group is unitary exactly when it is block diagonal. |
| 26 | * `New.fderiv_eq_on_blockDiagAlg`: a complex derivative at `1` is determined on `New.blockDiagAlg ε` |
| 27 | by the derivatives along one-parameter subgroups of `New.maxCompactU ε`. |
| 28 | * `New.IsKDominant.weightMinors_mul_borel`, `New.IsKDominant.weightMinors_oppBorel_mul`: let `o` be |
| 29 | an injective order, `w` dominant within each block of `ε` (`New.IsKDominant`), `x` invertible and |
| 30 | `b` invertible and block diagonal (`New.blockDiagAlg ε`). Multiplying `x` on the right by an upper |
| 31 | triangular `b`, or on the left by a lower triangular `b`, multiplies `weightMinors w x` by |
| 32 | `diagChar w b`. |
| 33 | |
| 34 | Notions from other files: |
| 35 | * `New.weightMinors w g`: the coefficient of a highest vector of weight `w`, that is the product |
| 36 | over all integers `t` of the principal minor of `g` on `{i | t ≤ w i}`, each factor with `t ≤ 0` |
| 37 | divided by `det g`. |
| 38 | |
| 39 | ## Relation to the literature |
| 40 | |
| 41 | Known; see `Lib.DiscreteSeries.Holomorphic.HighestVectorExtension` for sources. |
| 42 | -/ |
| 43 | |
| 44 | @[expose] public section |
| 45 | |
| 46 | namespace New |
| 47 | |
| 48 | section MaximalCompact |
| 49 | |
| 50 | open Matrix MeasureTheory Measure DiscreteSeries NormedSpace Norms.L2Operator |
| 51 | |
| 52 | variable {n : Type} [Fintype n] [DecidableEq n] {ε : n → ℤˣ} |
| 53 | |
| 54 | /-- A matrix lies in `blockDiagAlg ε` iff it commutes with the signature matrix. -/ |
| 55 | theorem DiscreteSeries.mem_blockDiagAlg_iff_commute {x : Matrix n n ℂ} : |
| 56 | x ∈ blockDiagAlg ε ↔ Commute (signMatrix ε) x := by |
| 57 | simp [blockDiagAlg, Subalgebra.mem_centralizer_iff, commute_iff_eq] |
| 58 | |
| 59 | /-- Every diagonal matrix with entries in `ℂ` belongs to the block diagonal algebra. -/ |
| 60 | theorem DiscreteSeries.diagonal_mem_blockDiagAlg (d : n → ℂ) : diagonal d ∈ blockDiagAlg ε := |
| 61 | mem_blockDiagAlg_iff_commute.mpr (commute_diagonal _ d) |
| 62 | |
| 63 | /-- With `J = signMatrix ε`, the diagonal matrix with entries `ε i`, the block diagonal part of `x`, |
| 64 | that is the matrix of the entries `x i j` with `ε i = ε j`, is `(x + J * x * J) / 2`. -/ |
| 65 | theorem blockDiagPart_eq (x : Matrix n n ℂ) : |
| 66 | blockDiagPart ε x = (2⁻¹ : ℂ) • (x + signMatrix ε * x * signMatrix ε) := by |
| 67 | -- entrywise: `(1 + ε i * ε j) / 2` is `1` if `ε i = ε j` and `0` otherwise |
| 68 | ext i j |
| 69 | have h_entry : (signMatrix ε * x * signMatrix ε) i j = (ε i : ℤ) * (ε j : ℤ) * x i j := by |
| 70 | simp [signMatrix, mul_right_comm] |
| 71 | rw [Matrix.smul_apply, Matrix.add_apply, h_entry] |
| 72 | obtain hi | hi := Int.units_eq_one_or (ε i) <;> obtain hj | hj := Int.units_eq_one_or (ε j) <;> |
| 73 | simp [blockDiagPart, hi, hj, ← two_mul] |
| 74 | |
| 75 | /-- A matrix lies in `New.blockDiagAlg ε` exactly when its entry at `(i, j)` vanishes whenever |
| 76 | `ε i ≠ ε j`. -/ |
| 77 | @[local simp] |
| 78 | theorem mem_blockDiagAlg {x : Matrix n n ℂ} : |
| 79 | x ∈ blockDiagAlg ε ↔ ∀ i j : n, ε i ≠ ε j → x i j = 0 := by |
| 80 | rw [mem_blockDiagAlg_iff_commute, commute_iff_eq] |
| 81 | simp [← ext_iff, signMatrix, mul_comm, imp_iff_not_or, Units.ext_iff] |
| 82 | |
| 83 | /-- For the constant signs `1` there is one block, so every matrix is block diagonal. -/ |
| 84 | @[simp] |
| 85 | theorem mem_blockDiagAlg_one {x : Matrix n n ℂ} : x ∈ blockDiagAlg 1 := by simp |
| 86 | |
| 87 | /-- The block diagonal projection `blockDiagPart ε x` lies in `blockDiagAlg ε`. -/ |
| 88 | theorem blockDiagPart_mem (x : Matrix n n ℂ) : blockDiagPart ε x ∈ blockDiagAlg ε := |
| 89 | mem_blockDiagAlg.mpr fun i j h_sign ↦ by simp [blockDiagPart, h_sign] |
| 90 | |
| 91 | /-- The matrix inverse of an element `g` of `U(diag ε)` is `J * gᴴ * J`, where |
| 92 | `J = signMatrix ε`. -/ |
| 93 | theorem U.inv_coe_eq_mul_conjTranspose_mul (g : USign ε) : |
| 94 | (g : Matrix n n ℂ)⁻¹ = signMatrix ε * (g : Matrix n n ℂ)ᴴ * signMatrix ε := by |
| 95 | simp [← coe_inv IsHermitianInvolution.mul_self] |
| 96 | |
| 97 | /-- The matrix inverse of an element `k` of `New.maxCompactU ε`, the group of unitary matrices in |
| 98 | `U(diag ε)`, is its conjugate transpose. -/ |
| 99 | theorem maxCompactU.coe_inv (k : maxCompactU ε) : |
| 100 | (k : Matrix n n ℂ)⁻¹ = (k : Matrix n n ℂ)ᴴ := by |
| 101 | let k' : U (1 : Matrix n n ℂ) := ⟨k, Subgroup.mem_subgroupOf.mp k.prop⟩ |
| 102 | exact inv_eq_left_inv (mem_unitaryGroup_iff'.mp (U_one_mem_unitaryGroup k')) |
| 103 | |
| 104 | /-- If `J` is an involution and `A` preserves the form of `J`, that is `Aᴴ * J * A = J`, then `A` is |
| 105 | unitary exactly when it commutes with `J`. -/ |
| 106 | theorem conjTranspose_mul_self_eq_one_iff_commute {J A : Matrix n n ℂ} (h_invol : J * J = 1) |
| 107 | (h_form : Aᴴ * J * A = J) : Aᴴ * A = 1 ↔ Commute J A := by |
| 108 | constructor |
| 109 | · intro h_left |
| 110 | calc J * A = A * Aᴴ * (J * A) := by rw [mul_eq_one_comm.mp h_left, Matrix.one_mul] |
| 111 | _ = A * (Aᴴ * J * A) := by simp only [Matrix.mul_assoc] |
| 112 | _ = A * J := by rw [h_form] |
| 113 | · intro h_comm |
| 114 | calc Aᴴ * A = Aᴴ * (A * J) * J := by simp only [Matrix.mul_assoc, h_invol, Matrix.mul_one] |
| 115 | _ = Aᴴ * J * A * J := by rw [← h_comm.eq, ← Matrix.mul_assoc] |
| 116 | _ = 1 := by rw [h_form, h_invol] |
| 117 | |
| 118 | /-- An element `g` of `U(diag ε)` lies in the subgroup `New.maxCompactU ε` of unitary matrices |
| 119 | exactly when it is block diagonal, that is, commutes with `signMatrix ε`. -/ |
| 120 | theorem mem_maxCompactU {g : U (signMatrix ε)} : |
| 121 | g ∈ maxCompactU ε ↔ (g : Matrix n n ℂ) ∈ blockDiagAlg ε := by |
| 122 | rw [maxCompactU, Subgroup.mem_subgroupOf, mem_unitaryGroupOf_iff, Matrix.mul_one, |
| 123 | mem_blockDiagAlg_iff_commute] |
| 124 | exact conjTranspose_mul_self_eq_one_iff_commute (signMatrix_mul_self ε) |
| 125 | (mem_unitaryGroupOf_iff.mp g.property) |
| 126 | |
| 127 | /-- Given unitary matrices `g τ` on the blocks `{i | ε i = τ}`, there is an element `y` of `K` whose |
| 128 | matrix is the block diagonal matrix of the `g τ`, reindexed by `n`. Its diagonal blocks are the |
| 129 | `g τ`. -/ |
| 130 | lemma Orbital.exists_maxCompactU_of_blocks |
| 131 | (g : ∀ τ : ℤˣ, Matrix {i : n // ε i = τ} {i : n // ε i = τ} ℂ) |
| 132 | (h : ∀ τ : ℤˣ, (g τ)ᴴ * g τ = 1) : |
| 133 | ∃ y : maxCompactU ε, |
| 134 | (y : Matrix n n ℂ) = reindex (Equiv.sigmaFiberEquiv ε) |
| 135 | (Equiv.sigmaFiberEquiv ε) (blockDiagonal' g) ∧ |
| 136 | (y : Matrix n n ℂ).toSquareBlock ε = g := by |
| 137 | let e : (Σ τ : ℤˣ, {i : n // ε i = τ}) ≃ n := Equiv.sigmaFiberEquiv ε |
| 138 | let y : Matrix n n ℂ := reindex e e (blockDiagonal' g) |
| 139 | have h_block : y ∈ blockDiagAlg ε := |
| 140 | mem_blockDiagAlg.2 (by simp +contextual [y, e, Equiv.sigmaFiberEquiv, blockDiagonal'_apply_ne]) |
| 141 | -- `y` is unitary and commutes with `signMatrix ε`, so it preserves the form |
| 142 | have h_unitary : yᴴ * y = 1 := by simp [y, ← blockDiagonal'_mul, h, ← Pi.one_def] |
| 143 | have h_form : yᴴ * signMatrix ε * y = signMatrix ε := by |
| 144 | rw [Commute.right_comm (h_block _ rfl), h_unitary, one_mul] |
| 145 | refine ⟨⟨U.of IsHermitianInvolution.isUnit y h_form, mem_maxCompactU.2 h_block⟩, rfl, ?_⟩ |
| 146 | change (y.submatrix e e).blockDiag' = g |
| 147 | simp [y] |
| 148 | |
| 149 | /-- Let `Φ` have the complex derivative `D` at `1`, and let `φ` be a complex linear form. If for |
| 150 | every `Y` in the Lie algebra `unitaryLie (signMatrix ε)` of `U(diag ε)` whose one-parameter group |
| 151 | `expU (t • Y)` lies in `New.maxCompactU ε` the derivative of `t ↦ Φ (exp (t • Y))` at `0` is `φ Y`, |
| 152 | then `D` and `φ` agree on the block diagonal matrices `New.blockDiagAlg ε`. -/ |
| 153 | theorem fderiv_eq_on_blockDiagAlg {Φ : Matrix n n ℂ → ℂ} {D : Matrix n n ℂ →L[ℂ] ℂ} |
| 154 | (hΦ : HasFDerivAt Φ D 1) (φ : Matrix n n ℂ →ₗ[ℂ] ℂ) |
| 155 | (h_deriv : ∀ Y : unitaryLie (signMatrix ε), |
| 156 | (∀ t : ℝ, expU (t • Y) ∈ maxCompactU ε) → |
| 157 | deriv (fun t : ℝ ↦ Φ (exp (t • Y.val))) (0 : ℝ) = φ Y.val) |
| 158 | {x : Matrix n n ℂ} (hx_mem : x ∈ blockDiagAlg ε) : |
| 159 | D x = φ x := by |
| 160 | -- Every `x` is `Y₁ + i Y₂` with `Y₁, Y₂` in the Lie algebra of `U(diag ε)`, block diagonal if |
| 161 | -- `x` is; both sides are `ℂ`-linear, so it is enough to compare them on such `Y`. |
| 162 | have h_lie (Y : unitaryLie (signMatrix ε)) (hY : Y.val ∈ blockDiagAlg ε) : |
| 163 | D Y.val = φ Y.val := by |
| 164 | have h_mem (t : ℝ) : expU (t • Y) ∈ maxCompactU ε := by |
| 165 | rw [mem_maxCompactU, mem_blockDiagAlg_iff_commute] |
| 166 | exact ((mem_blockDiagAlg_iff_commute.mp hY).smul_right t).exp_right |
| 167 | -- chain rule along the curve `t ↦ exp (t • Y)`, which starts at `1` with velocity `Y` |
| 168 | rw [← h_deriv Y h_mem] |
| 169 | exact ((hΦ.restrictScalars ℝ).comp_hasDerivAt_of_eq (0 : ℝ) |
| 170 | (by simpa using hasDerivAt_exp_smul_const Y.val (0 : ℝ)) (by simp)).deriv.symm |
| 171 | have h_part (y : Matrix n n ℂ) (hy : y ∈ blockDiagAlg ε) : |
| 172 | D (unitaryLiePart ε y).val = φ (unitaryLiePart ε y).val := by |
| 173 | refine h_lie _ (mem_blockDiagAlg.mpr fun i j h_sign ↦ ?_) |
| 174 | simp [unitaryLiePart, signMatrix, inv_diagonal, mem_blockDiagAlg.mp hy i j h_sign, |
| 175 | mem_blockDiagAlg.mp hy j i h_sign.symm] |
| 176 | rw [eq_unitaryLiePart_add_I_smul ε x, map_add, map_add, map_smul, map_smul, h_part x hx_mem, |
| 177 | h_part _ (Subalgebra.smul_mem _ hx_mem _)] |
| 178 | |
| 179 | /-- For a tuple `t` of complex numbers of modulus one, the diagonal matrix `diag(t)` as an element |
| 180 | of the compact group `U(diag ε) ∩ U(n)`. -/ |
| 181 | noncomputable abbrev diagTorusK (t : n → Circle) : maxCompactU ε := |
| 182 | (⟨diagTorus ε t, mem_maxCompactU.mpr (diagonal_mem_blockDiagAlg _)⟩ : maxCompactU ε) |
| 183 | |
| 184 | /-- The map sending a tuple of complex numbers of modulus one to its diagonal matrix in |
| 185 | `U(diag ε)` is continuous. -/ |
| 186 | @[fun_prop] |
| 187 | theorem continuous_diagTorus : Continuous (diagTorus ε) := |
| 188 | continuous_U_iff_matrix.mpr (show Continuous fun t : n → Circle ↦ diagonal fun i ↦ (t i : ℂ) by |
| 189 | fun_prop) |
| 190 | |
| 191 | /-- The Haar measure `New.haarK ε` on `New.maxCompactU ε` has total mass one. -/ |
| 192 | instance : IsProbabilityMeasure (haarK ε) := ⟨haarMeasure_self⟩ |
| 193 | |
| 194 | deriving instance IsHaarMeasure, IsMulRightInvariant for haarK |
| 195 | |
| 196 | |
| 197 | /-! ### Products with a block diagonal matrix -/ |
| 198 | |
| 199 | /-- A block diagonal matrix `x`, an element of `blockDiagAlg ε`, is its own block diagonal part. -/ |
| 200 | @[simp] |
| 201 | theorem blockDiagPart_of_mem {x : Matrix n n ℂ} (hx : x ∈ blockDiagAlg ε) : |
| 202 | blockDiagPart ε x = x := by |
| 203 | ext i j |
| 204 | by_cases h_sign : ε i = ε j <;> simp [blockDiagPart, h_sign, mem_blockDiagAlg.mp hx i j] |
| 205 | |
| 206 | /-- Taking the block diagonal part commutes with left multiplication by a block diagonal matrix |
| 207 | `x`. -/ |
| 208 | @[simp] |
| 209 | theorem blockDiagPart_mul_left {x : Matrix n n ℂ} (hx : x ∈ blockDiagAlg ε) (y : Matrix n n ℂ) : |
| 210 | blockDiagPart ε (x * y) = x * blockDiagPart ε y := by |
| 211 | -- `x` commutes with `signMatrix ε`, so it comes out of the formula `blockDiagPart_eq` |
| 212 | have hx_comm : signMatrix ε * x = x * signMatrix ε := mem_blockDiagAlg_iff_commute.mp hx |
| 213 | rw [blockDiagPart_eq, blockDiagPart_eq, ← Matrix.mul_assoc (signMatrix ε) x y, hx_comm] |
| 214 | simp only [Matrix.mul_assoc, mul_smul_comm, mul_add] |
| 215 | |
| 216 | /-- Taking the block diagonal part commutes with right multiplication by a block diagonal matrix |
| 217 | `x`. -/ |
| 218 | @[simp] |
| 219 | theorem blockDiagPart_mul_right {x : Matrix n n ℂ} (hx : x ∈ blockDiagAlg ε) (y : Matrix n n ℂ) : |
| 220 | blockDiagPart ε (y * x) = blockDiagPart ε y * x := by |
| 221 | -- `x` commutes with `signMatrix ε`, so it comes out of the formula `blockDiagPart_eq` |
| 222 | simp only [blockDiagPart_eq, Matrix.mul_assoc, (mem_blockDiagAlg_iff_commute.mp hx).eq, |
| 223 | smul_mul_assoc, add_mul] |
| 224 | |
| 225 | /-- The inverse `x⁻¹` (`Matrix.inv`) of an element `x` of `blockDiagAlg ε` lies in |
| 226 | `blockDiagAlg ε`. -/ |
| 227 | @[simp] |
| 228 | theorem blockDiagAlg.inv_mem {x : Matrix n n ℂ} (hx : x ∈ blockDiagAlg ε) : |
| 229 | x⁻¹ ∈ blockDiagAlg ε := Matrix.nonsing_inv_mem hx |
| 230 | |
| 231 | end MaximalCompact |
| 232 | |
| 233 | /-! |
| 234 | ## Holomorphic functions of a weight and products of minors |
| 235 | |
| 236 | `New.IsHolOfWeight ε o u F` says that `F`, a function of a family of elements of `U(diag ε)` indexed |
| 237 | by `Φ`, extends analytically to the products `h * b` with `b` invertible and triangular for the |
| 238 | order `o` (`New.IsBorelMatrix`) and block diagonal for optional signs `ε'` (by default `1`, which |
| 239 | imposes no condition). The extension is `F h` times `∏ τ, New.diagChar (u τ) (b τ)`, where |
| 240 | `New.diagChar w b = ∏ i, b i i ^ w i`. |
| 241 | -/ |
| 242 | |
| 243 | section MinorEquivariance |
| 244 | |
| 245 | open Matrix Finset DiscreteSeries Norms.L2Operator |
| 246 | |
| 247 | variable {n : Type} [Fintype n] [DecidableEq n] {ε : n → ℤˣ} {o w : n → ℤ} |
| 248 | |
| 249 | attribute [fun_prop] analyticAt_fst analyticAt_snd analyticAt_weightMinors |
| 250 | ContinuousLinearMap.analyticAt |
| 251 | |
| 252 | /-- A finite linear combination with complex coefficients of functions holomorphic of weight `u` for |
| 253 | the order `o` is holomorphic of weight `u`. Here `New.IsHolOfWeight ε o u F` says that some `F'` is |
| 254 | analytic at every product `g * b`, with each `b τ` invertible and upper triangular for `o`, block |
| 255 | diagonal for optional signs `ε'` (by default `1`, no condition), and equals |
| 256 | `(∏ τ, diagChar (u τ) (b τ)) * F g` there, where `diagChar w b = ∏ i, b i i ^ w i`. -/ |
| 257 | theorem IsHolOfWeight.sum {Φ : Type} [Fintype Φ] {u : Φ → n → ℤ} {ι : Type*} {T : Finset ι} |
| 258 | {f : ι → (Φ → USign ε) → ℂ} (c : ι → ℂ) |
| 259 | (hf : ∀ i : ι, IsHolOfWeight ε o u (f i)) : |
| 260 | IsHolOfWeight ε o u fun g : Φ → USign ε ↦ ∑ i ∈ T, c i * f i g := by |
| 261 | -- the same linear combination of the extensions `f' i` of the `f i` is an extension |
| 262 | choose f' hf' using hf |
| 263 | refine ⟨∑ i ∈ T, c i • f' i, fun g b hb_borel hb_mem ↦ ⟨?_, ?_⟩⟩ |
| 264 | · exact analyticAt_sum T fun i _ ↦ (hf' i g b hb_borel hb_mem).left.const_smul |
| 265 | · simp [Finset.sum_apply, (hf' _ g b hb_borel hb_mem).right, mul_sum, mul_left_comm] |
| 266 | |
| 267 | /-- For an injective order `o`, the product of holomorphic functions of weights `u` and `v` is |
| 268 | holomorphic of weight `u + v`. Here `New.IsHolOfWeight ε o u F` says that some `F'` is analytic at |
| 269 | every product `h * b`, with each `b τ` invertible and upper triangular for `o`, block diagonal for |
| 270 | optional signs `ε'` (by default `1`, no condition), and equals `(∏ τ, diagChar (u τ) (b τ)) * F h` |
| 271 | there, where `diagChar w b = ∏ i, b i i ^ w i`. -/ |
| 272 | theorem IsHolOfWeight.mul {Φ : Type} [Fintype Φ] {u v : Φ → n → ℤ} {F G : (Φ → USign ε) → ℂ} |
| 273 | (ho : o.Injective) (hF : IsHolOfWeight ε o u F) (hG : IsHolOfWeight ε o v G) : |
| 274 | IsHolOfWeight ε o (u + v) (F * G) := by |
| 275 | -- multiply the extensions; `diagChar · b` is multiplicative, as `b` has nonzero diagonal |
| 276 | obtain ⟨F', hF'⟩ := hF |
| 277 | obtain ⟨G', hG'⟩ := hG |
| 278 | refine ⟨F' * G', fun h b hb_borel hb_mem ↦ ?_⟩ |
| 279 | obtain ⟨hF_an, hF_eq⟩ := hF' h b hb_borel hb_mem |
| 280 | obtain ⟨hG_an, hG_eq⟩ := hG' h b hb_borel hb_mem |
| 281 | refine ⟨hF_an.mul hG_an, ?_⟩ |
| 282 | have h_char (τ : Φ) : |
| 283 | diagChar ((u + v) τ) (b τ) = diagChar (u τ) (b τ) * diagChar (v τ) (b τ) := |
| 284 | diagChar_add _ _ ((hb_borel τ).diag_ne_zero ho) |
| 285 | simp_rw [Pi.mul_apply, hF_eq, hG_eq, h_char, prod_mul_distrib] |
| 286 | ring |
| 287 | |
| 288 | |
| 289 | /-- Let `o : n → ℤ` be injective and let `b : Matrix n n ℂ` be block upper triangular for `o` and |
| 290 | satisfy `b i j = 0` whenever `w i < w j` for a weight `w : n → ℤ`. Then for every matrix `x`, |
| 291 | `weightMinors w (x * b)` equals `weightMinors w (d * x)`, where `d` is the diagonal part of `b`. -/ |
| 292 | private lemma weightMinors_mul_eq_diagonal_mul (ho : o.Injective) {x b : Matrix n n ℂ} |
| 293 | (hb_tri : b.BlockTriangular o) (h_block : ∀ i j : n, w i < w j → b i j = 0) : |
| 294 | weightMinors w (x * b) = weightMinors w (diagonal (fun i : n ↦ b i i) * x) := by |
| 295 | -- The minors in `weightMinors w` are multiplicative, and those of the triangular matrix `b` are |
| 296 | -- those of its diagonal part `d`. |
| 297 | let d : Matrix n n ℂ := diagonal fun i : n ↦ b i i |
| 298 | have h_minor (t : ℤ) : |
| 299 | principalMinor (x * b) (t ≤ w ·) = principalMinor (d * x) (t ≤ w ·) := by |
| 300 | have h_zero (i j k : n) (_ : t ≤ w i) (hj : ¬t ≤ w j) (hk : t ≤ w k) : |
| 301 | x i j = 0 ∨ b j k = 0 := Or.inr (h_block j k (by omega)) |
| 302 | have h_zero_diag (i j k : n) (hi : t ≤ w i) (hj : ¬t ≤ w j) (_ : t ≤ w k) : |
| 303 | d i j = 0 ∨ x j k = 0 := Or.inl (diagonal_apply_ne _ (by grind)) |
| 304 | have h_det : principalMinor b (t ≤ w ·) = principalMinor d (t ≤ w ·) := by |
| 305 | simp [d, principalMinor, toSquareBlockProp, toBlock, submatrix_diagonal, |
| 306 | hb_tri.submatrix.det_eq_prod_diag _, ho] |
| 307 | rw [principalMinor_mul h_zero, principalMinor_mul h_zero_diag, h_det, mul_comm] |
| 308 | simp [weightMinors, h_minor, d, hb_tri.det_eq_prod_diag ho, mul_comm] |
| 309 | |
| 310 | /-- Let `o` be injective and `w` dominant within each block of `ε` (`New.IsKDominant ε o w`: |
| 311 | `w j ≤ w i` whenever `ε i = ε j` and `o i < o j`). Here `weightMinors w g` is the product over |
| 312 | integers `t` of the principal minor of `g` on `{i | t ≤ w i}`, divided by `det g` when `t ≤ 0`. |
| 313 | Right multiplication of an invertible `x` by an invertible block diagonal `b`, upper triangular for |
| 314 | `o` (`New.IsBorelMatrix o b`), multiplies `weightMinors w x` by |
| 315 | `diagChar w b = ∏ i, b i i ^ w i`. -/ |
| 316 | theorem IsKDominant.weightMinors_mul_borel (ho : o.Injective) (hw : IsKDominant ε o w) |
| 317 | {x b : Matrix n n ℂ} (hx : x.det ≠ 0) (hb : b ∈ blockDiagAlg ε) |
| 318 | (hb_borel : IsBorelMatrix o b) : |
| 319 | weightMinors w (x * b) = weightMinors w x * diagChar w b := by |
| 320 | -- `b` lies in `blockDiagAlg ε` and is triangular for `o`, so `b i j = 0` whenever `w i < w j`. |
| 321 | have h_block (i j : n) (hij : w i < w j) : b i j = 0 := by |
| 322 | by_cases h_sign : ε i = ε j |
| 323 | · rcases lt_trichotomy (o i) (o j) with h_lt | h_eq | h_gt |
| 324 | · exact absurd hij (hw i j h_sign h_lt).not_gt |
| 325 | · simp [ho h_eq] at hij |
| 326 | · exact hb_borel.left h_gt |
| 327 | · exact mem_blockDiagAlg.mp hb i j h_sign |
| 328 | -- So `x * b` has the same minors as `d * x`, with `d` the diagonal part of `b`, for which |
| 329 | -- `weightMinors_diagonal_mul` gives the character. |
| 330 | rw [weightMinors_mul_eq_diagonal_mul ho hb_borel.left h_block, |
| 331 | weightMinors_diagonal_mul hx (hb_borel.diag_ne_zero ho), mul_comm, diagChar] |
| 332 | |
| 333 | /-- Let `o` be injective and `w` dominant within each block of `ε` for `o`, not `-o` |
| 334 | (`New.IsKDominant ε o w`: `w j ≤ w i` whenever `ε i = ε j` and `o i < o j`). Left multiplication of |
| 335 | an invertible `x` by an invertible block diagonal `b`, lower triangular for `o` |
| 336 | (`New.IsBorelMatrix (-o) b`), multiplies the product of principal minors `weightMinors w` by |
| 337 | `diagChar w b = ∏ i, b i i ^ w i`. -/ |
| 338 | lemma IsKDominant.weightMinors_oppBorel_mul (ho : o.Injective) (hw : IsKDominant ε o w) |
| 339 | {x b : Matrix n n ℂ} (hx : x.det ≠ 0) (hb : b ∈ blockDiagAlg ε) |
| 340 | (hb_borel : IsBorelMatrix (-o) b) : |
| 341 | weightMinors w (b * x) = diagChar w b * weightMinors w x := by |
| 342 | -- Transpose: `bᵀ` lies in `blockDiagAlg ε` and is triangular for `o`, so |
| 343 | -- `IsKDominant.weightMinors_mul_borel` applies. |
| 344 | have hb_mem : bᵀ ∈ blockDiagAlg ε := |
| 345 | mem_blockDiagAlg.mpr fun i j h_sign ↦ mem_blockDiagAlg.mp hb j i h_sign.symm |
| 346 | have hb_tri : IsBorelMatrix o bᵀ := |
| 347 | ⟨fun i j hij ↦ hb_borel.left (neg_lt_neg hij), (det_transpose b).trans_ne hb_borel.right⟩ |
| 348 | have h_mul : weightMinors w (xᵀ * bᵀ) = weightMinors w xᵀ * diagChar w bᵀ := |
| 349 | hw.weightMinors_mul_borel ho ((det_transpose x).trans_ne hx) hb_mem hb_tri |
| 350 | simpa [← transpose_mul, weightMinors_transpose, diagChar, mul_comm] using h_mul |
| 351 | |
| 352 | end MinorEquivariance |
| 353 | |
| 354 | end New |