Skip to content

Commit 533e6e4

Browse files
committed
feat: port Algebra.Lie.Matrix (#4621)
1 parent 3a5743e commit 533e6e4

File tree

2 files changed

+111
-0
lines changed

2 files changed

+111
-0
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ import Mathlib.Algebra.IndicatorFunction
202202
import Mathlib.Algebra.Invertible
203203
import Mathlib.Algebra.IsPrimePow
204204
import Mathlib.Algebra.Lie.Basic
205+
import Mathlib.Algebra.Lie.Matrix
205206
import Mathlib.Algebra.Lie.NonUnitalNonAssocAlgebra
206207
import Mathlib.Algebra.Lie.OfAssociative
207208
import Mathlib.Algebra.Lie.Subalgebra

Mathlib/Algebra/Lie/Matrix.lean

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
/-
2+
Copyright (c) 2021 Oliver Nash. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Oliver Nash
5+
6+
! This file was ported from Lean 3 source module algebra.lie.matrix
7+
! leanprover-community/mathlib commit 55e2dfde0cff928ce5c70926a3f2c7dee3e2dd99
8+
! Please do not edit these lines, except to modify the commit id
9+
! if you have ported upstream changes.
10+
-/
11+
import Mathlib.Algebra.Lie.OfAssociative
12+
import Mathlib.LinearAlgebra.Matrix.Reindex
13+
import Mathlib.LinearAlgebra.Matrix.ToLinearEquiv
14+
15+
/-!
16+
# Lie algebras of matrices
17+
18+
An important class of Lie algebras are those arising from the associative algebra structure on
19+
square matrices over a commutative ring. This file provides some very basic definitions whose
20+
primary value stems from their utility when constructing the classical Lie algebras using matrices.
21+
22+
## Main definitions
23+
24+
* `lieEquivMatrix'`
25+
* `Matrix.lieConj`
26+
* `Matrix.reindexLieEquiv`
27+
28+
## Tags
29+
30+
lie algebra, matrix
31+
-/
32+
33+
34+
universe u v w w₁ w₂
35+
36+
section Matrices
37+
38+
open scoped Matrix
39+
40+
variable {R : Type u} [CommRing R]
41+
42+
variable {n : Type w} [DecidableEq n] [Fintype n]
43+
44+
/-- The natural equivalence between linear endomorphisms of finite free modules and square matrices
45+
is compatible with the Lie algebra structures. -/
46+
def lieEquivMatrix' : Module.End R (n → R) ≃ₗ⁅R⁆ Matrix n n R :=
47+
{ LinearMap.toMatrix' with
48+
map_lie' := fun {T S} => by
49+
let f := @LinearMap.toMatrix' R _ n n _ _
50+
change f (T.comp S - S.comp T) = f T * f S - f S * f T
51+
have h : ∀ T S : Module.End R _, f (T.comp S) = f T ⬝ f S := LinearMap.toMatrix'_comp
52+
rw [LinearEquiv.map_sub, h, h, Matrix.mul_eq_mul, Matrix.mul_eq_mul] }
53+
#align lie_equiv_matrix' lieEquivMatrix'
54+
55+
@[simp]
56+
theorem lieEquivMatrix'_apply (f : Module.End R (n → R)) :
57+
lieEquivMatrix' f = LinearMap.toMatrix' f :=
58+
rfl
59+
#align lie_equiv_matrix'_apply lieEquivMatrix'_apply
60+
61+
@[simp]
62+
theorem lieEquivMatrix'_symm_apply (A : Matrix n n R) :
63+
(@lieEquivMatrix' R _ n _ _).symm A = Matrix.toLin' A :=
64+
rfl
65+
#align lie_equiv_matrix'_symm_apply lieEquivMatrix'_symm_apply
66+
67+
/-- An invertible matrix induces a Lie algebra equivalence from the space of matrices to itself. -/
68+
def Matrix.lieConj (P : Matrix n n R) (h : Invertible P) : Matrix n n R ≃ₗ⁅R⁆ Matrix n n R :=
69+
((@lieEquivMatrix' R _ n _ _).symm.trans (P.toLinearEquiv' h).lieConj).trans lieEquivMatrix'
70+
#align matrix.lie_conj Matrix.lieConj
71+
72+
@[simp]
73+
theorem Matrix.lieConj_apply (P A : Matrix n n R) (h : Invertible P) :
74+
P.lieConj h A = P ⬝ A ⬝ P⁻¹ := by
75+
simp [LinearEquiv.conj_apply, Matrix.lieConj, LinearMap.toMatrix'_comp,
76+
LinearMap.toMatrix'_toLin']
77+
#align matrix.lie_conj_apply Matrix.lieConj_apply
78+
79+
@[simp]
80+
theorem Matrix.lieConj_symm_apply (P A : Matrix n n R) (h : Invertible P) :
81+
(P.lieConj h).symm A = P⁻¹ ⬝ A ⬝ P := by
82+
simp [LinearEquiv.symm_conj_apply, Matrix.lieConj, LinearMap.toMatrix'_comp,
83+
LinearMap.toMatrix'_toLin']
84+
#align matrix.lie_conj_symm_apply Matrix.lieConj_symm_apply
85+
86+
variable {m : Type w₁} [DecidableEq m] [Fintype m] (e : n ≃ m)
87+
88+
/-- For square matrices, the natural map that reindexes a matrix's rows and columns with equivalent
89+
types, `Matrix.reindex`, is an equivalence of Lie algebras. -/
90+
def Matrix.reindexLieEquiv : Matrix n n R ≃ₗ⁅R⁆ Matrix m m R :=
91+
{ Matrix.reindexLinearEquiv R R e e with
92+
toFun := Matrix.reindex e e
93+
map_lie' := fun {_ _} => by
94+
simp only [LieRing.of_associative_ring_bracket, Matrix.reindex_apply,
95+
Matrix.submatrix_mul_equiv, Matrix.mul_eq_mul, Matrix.submatrix_sub, Pi.sub_apply] }
96+
#align matrix.reindex_lie_equiv Matrix.reindexLieEquiv
97+
98+
@[simp]
99+
theorem Matrix.reindexLieEquiv_apply (M : Matrix n n R) :
100+
Matrix.reindexLieEquiv e M = Matrix.reindex e e M :=
101+
rfl
102+
#align matrix.reindex_lie_equiv_apply Matrix.reindexLieEquiv_apply
103+
104+
@[simp]
105+
theorem Matrix.reindexLieEquiv_symm :
106+
(Matrix.reindexLieEquiv e : _ ≃ₗ⁅R⁆ _).symm = Matrix.reindexLieEquiv e.symm :=
107+
rfl
108+
#align matrix.reindex_lie_equiv_symm Matrix.reindexLieEquiv_symm
109+
110+
end Matrices

0 commit comments

Comments
 (0)