File size: 5,014 Bytes
c8720e4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | import Mathlib
namespace OAI
section
open scoped Classical
open scoped BigOperators ComplexConjugate MonoidAlgebra
open scoped BigOperators ComplexConjugate
open scoped MonoidAlgebra BigOperators
open scoped BigOperators MonoidAlgebra Classical
attribute [local instance] Classical.propDecidable
open scoped BigOperators
namespace PartialPermutation
section MatrixTraces
variable {V : Type*} [AddCommGroup V] [Module ℂ V]
lemma matrixUnit_trace_eq {d : ℕ}
(A : Matrix (Fin d) (Fin d) ℂ →ₐ[ℂ] Module.End ℂ V)
(B : Module.End ℂ V) (hB : ∀ X, Commute (A X) B) (i j : Fin d) :
LinearMap.trace ℂ V (A (Matrix.single i i 1) * B) =
LinearMap.trace ℂ V (A (Matrix.single j j 1) * B) := by
have hu (i j k : Fin d) : A (Matrix.single i j 1) * A (Matrix.single j k 1) =
A (Matrix.single i k 1) := by
rw [← map_mul, Matrix.single_mul_single_same, one_mul]
calc
_ = LinearMap.trace ℂ V
(A (Matrix.single i j 1) * (A (Matrix.single j i 1) * B)) := by
rw [← mul_assoc, hu]
_ = LinearMap.trace ℂ V
((A (Matrix.single j i 1) * B) * A (Matrix.single i j 1)) :=
LinearMap.trace_mul_comm ℂ _ _
_ = LinearMap.trace ℂ V
(A (Matrix.single j i 1) * A (Matrix.single i j 1) * B) := by
rw [mul_assoc, ← (hB _).eq, ← mul_assoc]
_ = _ := by rw [hu]
lemma degree_mul_matrixUnit_trace {d : ℕ}
(A : Matrix (Fin d) (Fin d) ℂ →ₐ[ℂ] Module.End ℂ V)
(B : Module.End ℂ V) (hB : ∀ X, Commute (A X) B) (t : Fin d) :
(d : ℂ) * LinearMap.trace ℂ V (A (Matrix.single t t 1) * B) =
LinearMap.trace ℂ V B := by
classical
calc
_ = ∑ j : Fin d, LinearMap.trace ℂ V (A (Matrix.single t t 1) * B) := by simp
_ = ∑ j : Fin d, LinearMap.trace ℂ V (A (Matrix.single j j 1) * B) := by
apply Finset.sum_congr rfl
intro j hj
exact matrixUnit_trace_eq A B hB t j
_ = LinearMap.trace ℂ V ((∑ j : Fin d, A (Matrix.single j j 1)) * B) := by
simp [Finset.sum_mul]
_ = _ := by rw [← map_sum, Matrix.sum_single_one, map_one, one_mul]
end MatrixTraces
section CommutingDegrees
variable {V : Type*} [AddCommGroup V] [Module ℂ V] [FiniteDimensional ℂ V]
{ι : Type*} [DecidableEq ι] (d : ι → ℕ) (hd : ∀ i, 0 < d i)
(A : ∀ i, Matrix (Fin (d i)) (Fin (d i)) ℂ →ₐ[ℂ] Module.End ℂ V)
(hcomm : ∀ i j, i ≠ j → ∀ X Y, Commute (A i X) (A j Y))
include hd A hcomm
lemma commuting_degrees_dvd_finrank (s : Finset ι) :
(∏ i ∈ s, d i) ∣ Module.finrank ℂ V := by
classical
let p (i : ι) : Module.End ℂ V :=
A i (Matrix.single (⟨0, hd i⟩ : Fin (d i)) ⟨0, hd i⟩ 1)
have hp (i : ι) : IsIdempotentElem (p i) := by
dsimp [IsIdempotentElem, p]
rw [← map_mul, Matrix.single_mul_single_same, one_mul]
have hc (i j : ι) (hij : i ≠ j) : Commute (p i) (p j) := hcomm i j hij _ _
have hcc (s : Finset ι) : (↑s : Set ι).Pairwise (Function.onFun Commute p) := by
intro i hi j hj hij
exact hc i j hij
let P (s : Finset ι) : Module.End ℂ V :=
s.noncommProd p (hcc s)
have hP (s : Finset ι) (i : ι) (hi : i ∉ s) (X) : Commute (A i X) (P s) := by
apply Finset.noncommProd_commute
intro j hj
exact hcomm i j (fun he => hi (he ▸ hj)) _ _
have hid (s : Finset ι) : IsIdempotentElem (P s) := by
induction s using Finset.induction_on with
| empty => simp [P, Finset.noncommProd_empty, IsIdempotentElem]
| @insert i s hi ih =>
dsimp only [P]
rw [Finset.noncommProd_insert_of_notMem _ _ _ _ hi]
change IsIdempotentElem (p i * P s)
change (p i * P s) * (p i * P s) = p i * P s
rw [(hP s i hi _).symm.mul_mul_mul_comm, hp i, ih]
have ht (s : Finset ι) :
((∏ i ∈ s, d i : ℕ) : ℂ) * LinearMap.trace ℂ V (P s) = Module.finrank ℂ V := by
induction s using Finset.induction_on with
| empty => simp [P, Finset.noncommProd_empty, Module.End.one_eq_id, LinearMap.trace_id]
| @insert i s hi ih =>
dsimp only [P]
rw [Finset.prod_insert hi, Nat.cast_mul,
Finset.noncommProd_insert_of_notMem _ _ _ _ hi]
change ((d i : ℂ) * ↑(∏ j ∈ s, d j)) *
LinearMap.trace ℂ V (p i * P s) = _
calc
_ = (↑(∏ j ∈ s, d j) : ℂ) *
((d i : ℂ) * LinearMap.trace ℂ V (p i * P s)) := by ring
_ = (↑(∏ j ∈ s, d j) : ℂ) * LinearMap.trace ℂ V (P s) := by
rw [degree_mul_matrixUnit_trace (A i) (P s) (hP s i hi)]
_ = _ := ih
refine ⟨Module.finrank ℂ (LinearMap.range (P s)), ?_⟩
have he := ht s
rw [(LinearMap.IsIdempotentElem.isProj_range (P s) (hid s)).trace] at he
exact_mod_cast he.symm
lemma commuting_degrees_le_finrank [Nontrivial V] (s : Finset ι) :
(∏ i ∈ s, d i) ≤ Module.finrank ℂ V :=
Nat.le_of_dvd (Module.finrank_pos (R := ℂ))
(commuting_degrees_dvd_finrank d hd A hcomm s)
end CommutingDegrees
end PartialPermutation
end
end OAI
|