introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
5.01 kB
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