Download data/lean/OAI/RepresentationTheory/PartialPermutation/MatrixDegrees.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.01 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/RepresentationTheory/PartialPermutation/MatrixDegrees.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/RepresentationTheory/PartialPermutation/MatrixDegrees.lean
-
curl -L -o MatrixDegrees.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/RepresentationTheory/PartialPermutation/MatrixDegrees.lean
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 β V) | |
| (B : Module β 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 β V) | |
| (B : Module β 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 β 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 β 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 β 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 | |