File size: 5,014 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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