proofs/weyl_symplectic.lean

This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a

1 module
2 public import Mathlib.Tactic.NoncommRing
3 public import Mathlib.Tactic.Ring
4 public import Stafford38.ChallengeDefinitions
5 public import AlgebraicAnalysis.Commutator
6 
7 @[expose] public section
8 
9 /-!
10 # The linear symplectic layer of the A₂ reduction
11 
12 This file isolates the part of the generic-monic reduction which is purely
13 linear algebra.  A Weyl presentation is encoded by a finite family `z` whose
14 pairwise commutators are the entries of a fixed skew matrix.  A matrix `M`
15 preserving that form gives a new family by linear combination, and the new
16 family has exactly the same Weyl commutators.
17 
18 The result is deliberately stated for an arbitrary finite index type and an
19 arbitrary symplectic form.  The A₂ instance is obtained with
20 `ι = Fin 2 ⊕ Fin 2` and `Matrix.J (Fin 2) k`, so this is not a list of
21 hand-picked coordinate changes.
22 
23 This is the algebraic prerequisite for applying Stafford's
24 ring-equivalence transport to a Weyl change of generators.  The final section
25 also descends a form-preserving change to a homomorphism of the presented
26 quotient and proves the A₂ symplectic change is invertible using the inverse
27 matrix and generator-extensionality. The PBW identification and generic monic
28 normalization belong to the downstream Weyl modules, outside this module's
29 linear-algebra scope. Reusable commutator identities are imported from
30 AlgebraicAnalysis.
31 -/
32 
33 namespace Stafford
34 
35 variable {k A ι : Type*} [Field k] [Ring A] [Algebra k A]
36   [Fintype ι] [DecidableEq ι]
37 
38 /-- Historical namespace for the shared ring commutator. -/
39 abbrev commutator (u v : A) : A := AlgebraicAnalysis.ringCommutator u v
40 
41 @[simp] theorem commutator_eq_shared (u v : A) :
42     commutator u v = AlgebraicAnalysis.ringCommutator u v := rfl
43 
44 lemma commutator_sum_left (u : ι → A) (v : A) :
45     commutator (∑ i, u i) v = ∑ i, commutator (u i) v := by
46   simp [commutator, Finset.sum_mul, Finset.mul_sum]
47 
48 lemma commutator_sum_right (u : A) (v : ι → A) :
49     commutator u (∑ i, v i) = ∑ i, commutator u (v i) := by
50   simp [commutator, Finset.sum_mul, Finset.mul_sum]
51 
52 lemma commutator_smul_smul (a b : k) (u v : A) :
53     commutator (algebraMap k A a * u) (algebraMap k A b * v) =
54       algebraMap k A (a * b) * commutator u v := by
55   have hub : u * algebraMap k A b = algebraMap k A b * u :=
56     (Algebra.commutes b u).symm
57   have hva : v * algebraMap k A a = algebraMap k A a * v :=
58     (Algebra.commutes a v).symm
59   simp only [commutator]
60   calc
61     algebraMap k A a * u * (algebraMap k A b * v) -
62         algebraMap k A b * v * (algebraMap k A a * u) =
63       (algebraMap k A a * algebraMap k A b) * (u * v) -
64         (algebraMap k A b * algebraMap k A a) * (v * u) := by
65           rw [show algebraMap k A a * u * (algebraMap k A b * v) =
66               (algebraMap k A a * algebraMap k A b) * (u * v) by
67                 calc
68                   algebraMap k A a * u * (algebraMap k A b * v) =
69                       algebraMap k A a * (u * algebraMap k A b) * v := by
70                         noncomm_ring
71                   _ = algebraMap k A a * (algebraMap k A b * u) * v := by
72                         rw [hub]
73                   _ = (algebraMap k A a * algebraMap k A b) * (u * v) := by
74                         noncomm_ring,
75             show algebraMap k A b * v * (algebraMap k A a * u) =
76               (algebraMap k A b * algebraMap k A a) * (v * u) by
77                 calc
78                   algebraMap k A b * v * (algebraMap k A a * u) =
79                       algebraMap k A b * (v * algebraMap k A a) * u := by
80                         noncomm_ring
81                   _ = algebraMap k A b * (algebraMap k A a * v) * u := by
82                         rw [hva]
83                   _ = (algebraMap k A b * algebraMap k A a) * (v * u) := by
84                         noncomm_ring]
85     _ = algebraMap k A (a * b) * (u * v) -
86         algebraMap k A (b * a) * (v * u) := by
87           rw [_root_.map_mul, _root_.map_mul]
88     _ = algebraMap k A (a * b) * (u * v - v * u) := by
89           rw [mul_comm b a, mul_sub]
90 
91 lemma commutator_linearCombination
92     (M : Matrix ι ι k) (z : ι → A) (omega : Matrix ι ι k) (i l : ι)
93     (hcomm : ∀ j n, commutator (z j) (z n) =
94       algebraMap k A (omega j n)) :
95     commutator (linearCombination M z i) (linearCombination M z l) =
96       algebraMap k A (∑ j, ∑ n, M i j * omega j n * M l n) := by
97   rw [linearCombination, linearCombination, commutator_sum_left]
98   simp_rw [commutator_sum_right, commutator_smul_smul, hcomm]
99   simp only [map_sum, map_mul, Finset.sum_mul, Finset.mul_sum]
100   congr 2
101   funext j
102   congr 1
103   funext n
104   calc
105     algebraMap k A (M i j) * algebraMap k A (M l n) *
106           algebraMap k A (omega j n) =
107         algebraMap k A (M i j) *
108           (algebraMap k A (M l n) * algebraMap k A (omega j n)) := by
109             rw [mul_assoc]
110     _ = algebraMap k A (M i j) *
111           (algebraMap k A (omega j n) * algebraMap k A (M l n)) := by
112             congr 1
113             rw [← _root_.map_mul, ← _root_.map_mul]
114             congr 1
115             ring
116     _ = algebraMap k A (M i j) * algebraMap k A (omega j n) *
117           algebraMap k A (M l n) := by
118             rw [← mul_assoc]
119 
120 /-- A matrix preserving `omega` preserves all Weyl commutators. -/
121 theorem symplectic_linear_change_preserves_commutator
122     (M : Matrix ι ι k) (z : ι → A) (omega : Matrix ι ι k)
123     (hcomm : ∀ j n, commutator (z j) (z n) =
124       algebraMap k A (omega j n))
125     (hM : M * omega * Matrix.transpose M = omega) :
126     ∀ i l, commutator (linearCombination M z i) (linearCombination M z l) =
127       algebraMap k A (omega i l) := by
128   intro i l
129   rw [commutator_linearCombination M z omega i l hcomm]
130   have hentry : (∑ j, ∑ n, M i j * omega j n * M l n) = omega i l := by
131     calc
132       (∑ j, ∑ n, M i j * omega j n * M l n) =
133           (M * omega * Matrix.transpose M) i l := by
134             simp only [Matrix.mul_apply, Matrix.transpose_apply, Finset.sum_mul]
135             rw [Finset.sum_comm]
136       _ = omega i l := by rw [hM]
137   rw [hentry]
138 
139 /-! ### The standard A₂ specialization -/
140 
141 abbrev A2Index := Fin 2 ⊕ Fin 2
142 
143 abbrev A2SymplecticForm (k : Type*) [CommRing k] :
144     Matrix A2Index A2Index k := Matrix.J (Fin 2) k
145 
146 theorem a2_symplectic_linear_change_preserves_weyl
147     (M : Matrix A2Index A2Index k) (z : A2Index → A)
148     (hcomm : ∀ j n, commutator (z j) (z n) =
149       algebraMap k A (A2SymplecticForm k j n))
150     (hM : M * A2SymplecticForm k * Matrix.transpose M = A2SymplecticForm k) :
151     ∀ i l, commutator (linearCombination M z i) (linearCombination M z l) =
152       algebraMap k A (A2SymplecticForm k i l) := by
153   exact symplectic_linear_change_preserves_commutator M z (A2SymplecticForm k)
154     hcomm hM
155 
156 theorem a2_symplectic_group_change_preserves_weyl
157     (M : Matrix.symplecticGroup (Fin 2) k) (z : A2Index → A)
158     (hcomm : ∀ j n, commutator (z j) (z n) =
159       algebraMap k A (A2SymplecticForm k j n)) :
160     ∀ i l, commutator (linearCombination (M : Matrix A2Index A2Index k) z i)
161         (linearCombination (M : Matrix A2Index A2Index k) z l) =
162       algebraMap k A (A2SymplecticForm k i l) := by
163   exact a2_symplectic_linear_change_preserves_weyl (M : Matrix A2Index A2Index k)
164     z hcomm (SymplecticGroup.mem_iff.mp M.property)
165 
166 /-! ### Descent to the presented Weyl algebra
167 
168 `RingQuot` is Mathlib's universal quotient for a possibly noncommutative ring.
169 The following definitions use it to make the universal-property step
170 explicit.  This is still presentation-level algebra: identifying the
171 quotient with a PBW Weyl algebra remains separate, while the inverse-matrix
172 argument below proves the form-preserving A₂ map is an automorphism. -/
173 
174 theorem freeWeylGenerator_commutator
175     (omega : Matrix ι ι k) (i j : ι) :
176     commutator (freeWeylGenerator omega i) (freeWeylGenerator omega j) =
177       algebraMap k (FreeWeyl k ι omega) (omega i j) := by
178   have h := RingQuot.mkAlgHom_rel k
179     (show freeWeylRelation omega
180       (FreeAlgebra.ι k i * FreeAlgebra.ι k j -
181         FreeAlgebra.ι k j * FreeAlgebra.ι k i)
182       (algebraMap k (FreeAlgebra k ι) (omega i j)) from ⟨i, j, rfl, rfl⟩)
183   simp only [freeWeylGenerator, commutator, RingQuot.mkAlgHom_coe]
184   calc
185     RingQuot.mkAlgHom k (freeWeylRelation omega) (FreeAlgebra.ι k i) *
186           RingQuot.mkAlgHom k (freeWeylRelation omega) (FreeAlgebra.ι k j) -
187         RingQuot.mkAlgHom k (freeWeylRelation omega) (FreeAlgebra.ι k j) *
188           RingQuot.mkAlgHom k (freeWeylRelation omega) (FreeAlgebra.ι k i) =
189       RingQuot.mkAlgHom k (freeWeylRelation omega)
190         (FreeAlgebra.ι k i * FreeAlgebra.ι k j -
191           FreeAlgebra.ι k j * FreeAlgebra.ι k i) := by
192             rw [← map_mul, ← map_mul, ← map_sub]
193     _ = RingQuot.mkAlgHom k (freeWeylRelation omega)
194         ((algebraMap k (FreeAlgebra k ι)) (omega i j)) := h
195     _ = algebraMap k (FreeWeyl k ι omega) (omega i j) := by
196       have hmap : algebraMap k (FreeWeyl k ι omega) =
197           (RingQuot.mkAlgHom k (freeWeylRelation omega)).toRingHom.comp
198             (algebraMap k (FreeAlgebra k ι)) := by
199         apply RingHom.ext
200         intro c
201         change algebraMap k (FreeWeyl k ι omega) c =
202           RingQuot.mkAlgHom k (freeWeylRelation omega)
203             (algebraMap k (FreeAlgebra k ι) c)
204         exact (RingQuot.mkAlgHom k (freeWeylRelation omega)).commutes c |>.symm
205       rw [hmap]
206       rfl
207 
208 abbrev freeWeylLinearCombination
209     (M : Matrix ι ι k) (z : ι → FreeWeyl k ι omega) (i : ι) :
210     FreeWeyl k ι omega :=
211   linearCombination M z i
212 
213 def freeWeylMap (M : Matrix ι ι k) (omega : Matrix ι ι k) :
214     FreeAlgebra k ι →ₐ[k] FreeWeyl k ι omega :=
215   FreeAlgebra.lift k (fun i => freeWeylLinearCombination M
216     (freeWeylGenerator omega) i)
217 
218 def freeWeylMapRespects (M : Matrix ι ι k) (omega : Matrix ι ι k)
219     (hpres : ∀ i j,
220       commutator (freeWeylLinearCombination M (freeWeylGenerator omega) i)
221           (freeWeylLinearCombination M (freeWeylGenerator omega) j) =
222         algebraMap k (FreeWeyl k ι omega) (omega i j)) :
223     ∀ ⦃a b : FreeAlgebra k ι⦄,
224       freeWeylRelation omega a b → freeWeylMap M omega a = freeWeylMap M omega b
225   | _, _, ⟨i, j, rfl, rfl⟩ => by
226       simp only [freeWeylMap, FreeAlgebra.lift_ι_apply, map_sub, map_mul,
227         freeWeylLinearCombination, AlgHom.commutes]
228       exact hpres i j
229 
230 def freeWeylSymplecticAlgHom (M : Matrix ι ι k) (omega : Matrix ι ι k)
231     (hpres : ∀ i j,
232       commutator (freeWeylLinearCombination M (freeWeylGenerator omega) i)
233           (freeWeylLinearCombination M (freeWeylGenerator omega) j) =
234         algebraMap k (FreeWeyl k ι omega) (omega i j)) :
235     FreeWeyl k ι omega →ₐ[k] FreeWeyl k ι omega :=
236   RingQuot.liftAlgHom k
237     ⟨freeWeylMap M omega, freeWeylMapRespects M omega hpres⟩
238 
239 theorem freeWeylSymplecticAlgHom_generator
240     (M : Matrix ι ι k) (omega : Matrix ι ι k)
241     (hpres : ∀ i j,
242       commutator (freeWeylLinearCombination M (freeWeylGenerator omega) i)
243           (freeWeylLinearCombination M (freeWeylGenerator omega) j) =
244         algebraMap k (FreeWeyl k ι omega) (omega i j)) (i : ι) :
245     freeWeylSymplecticAlgHom M omega hpres (freeWeylGenerator omega i) =
246       freeWeylLinearCombination M (freeWeylGenerator omega) i := by
247   simpa [freeWeylSymplecticAlgHom, freeWeylGenerator, freeWeylMap,
248     FreeAlgebra.lift_ι_apply] using
249     (RingQuot.liftAlgHom_mkAlgHom_apply k (freeWeylMap M omega)
250       (freeWeylMapRespects M omega hpres) (FreeAlgebra.ι k i))
251 
252 theorem freeWeylSymplecticAlgHom_map_linearCombination
253     (M N : Matrix ι ι k) (omega : Matrix ι ι k)
254     (hpres : ∀ i j,
255       commutator (freeWeylLinearCombination M (freeWeylGenerator omega) i)
256           (freeWeylLinearCombination M (freeWeylGenerator omega) j) =
257         algebraMap k (FreeWeyl k ι omega) (omega i j)) (i : ι) :
258     freeWeylSymplecticAlgHom M omega hpres
259         (freeWeylLinearCombination N (freeWeylGenerator omega) i) =
260       freeWeylLinearCombination (N * M) (freeWeylGenerator omega) i := by
261   change freeWeylSymplecticAlgHom M omega hpres
262       (∑ j, algebraMap k (FreeWeyl k ι omega) (N i j) *
263         freeWeylGenerator omega j) =
264     ∑ j, algebraMap k (FreeWeyl k ι omega) ((N * M) i j) *
265       freeWeylGenerator omega j
266   rw [map_sum]
267   simp_rw [map_mul, AlgHom.commutes,
268     freeWeylSymplecticAlgHom_generator M omega hpres]
269   simp_rw [freeWeylLinearCombination]
270   simp only [Matrix.mul_apply, map_sum, map_mul, Finset.sum_mul, Finset.mul_sum]
271   rw [Finset.sum_comm]
272   apply Finset.sum_congr rfl
273   intro j hj
274   simp [linearCombination, Finset.mul_sum, mul_assoc]
275 
276 lemma freeWeylLinearCombination_one
277     (omega : Matrix ι ι k) (i : ι) :
278     freeWeylLinearCombination (1 : Matrix ι ι k)
279         (freeWeylGenerator omega) i = freeWeylGenerator omega i := by
280   simp [freeWeylLinearCombination, linearCombination, Matrix.one_apply]
281 
282 theorem freeWeylSymplecticAlgHom_comp_generator
283     (M N : Matrix ι ι k) (omega : Matrix ι ι k)
284     (hM : ∀ i j,
285       commutator (freeWeylLinearCombination M (freeWeylGenerator omega) i)
286           (freeWeylLinearCombination M (freeWeylGenerator omega) j) =
287         algebraMap k (FreeWeyl k ι omega) (omega i j))
288     (hN : ∀ i j,
289       commutator (freeWeylLinearCombination N (freeWeylGenerator omega) i)
290           (freeWeylLinearCombination N (freeWeylGenerator omega) j) =
291         algebraMap k (FreeWeyl k ι omega) (omega i j)) (i : ι) :
292     freeWeylSymplecticAlgHom M omega hM
293       (freeWeylSymplecticAlgHom N omega hN (freeWeylGenerator omega i)) =
294       freeWeylLinearCombination (N * M) (freeWeylGenerator omega) i := by
295   rw [freeWeylSymplecticAlgHom_generator N omega hN]
296   exact freeWeylSymplecticAlgHom_map_linearCombination M N omega hM i
297 
298 def a2_freeWeyl_symplectic_hpres
299     (M : Matrix A2Index A2Index k)
300     (hM : M * A2SymplecticForm k * Matrix.transpose M = A2SymplecticForm k) :
301     ∀ i l,
302       commutator
303           (freeWeylLinearCombination M
304             (freeWeylGenerator (A2SymplecticForm k)) i)
305           (freeWeylLinearCombination M
306             (freeWeylGenerator (A2SymplecticForm k)) l) =
307         algebraMap k (FreeWeyl k A2Index (A2SymplecticForm k))
308           (A2SymplecticForm k i l) := by
309   let z : A2Index → FreeWeyl k A2Index (A2SymplecticForm k) :=
310     freeWeylGenerator (A2SymplecticForm k)
311   intro i l
312   change commutator (freeWeylLinearCombination M z i)
313       (freeWeylLinearCombination M z l) = _
314   exact symplectic_linear_change_preserves_commutator M z
315     (A2SymplecticForm k)
316     (fun j n => freeWeylGenerator_commutator (A2SymplecticForm k) j n)
317     hM i l
318 
319 def a2_freeWeyl_symplectic_hom
320     (M : Matrix A2Index A2Index k)
321     (hM : M * A2SymplecticForm k * Matrix.transpose M = A2SymplecticForm k) :
322     FreeWeyl k A2Index (A2SymplecticForm k) →ₐ[k]
323       FreeWeyl k A2Index (A2SymplecticForm k) :=
324   freeWeylSymplecticAlgHom M (A2SymplecticForm k)
325     (a2_freeWeyl_symplectic_hpres M hM)
326 
327 theorem a2_freeWeyl_symplectic_hom_generator
328     (M : Matrix A2Index A2Index k)
329     (hM : M * A2SymplecticForm k * Matrix.transpose M = A2SymplecticForm k)
330     (i : A2Index) :
331     a2_freeWeyl_symplectic_hom M hM
332         (freeWeylGenerator (A2SymplecticForm k) i) =
333       freeWeylLinearCombination M
334         (freeWeylGenerator (A2SymplecticForm k)) i := by
335   exact freeWeylSymplecticAlgHom_generator M (A2SymplecticForm k)
336     (a2_freeWeyl_symplectic_hpres M hM) i
337 
338 theorem a2_freeWeyl_symplectic_hom_comp_generator
339     (M N : Matrix A2Index A2Index k)
340     (hM : M * A2SymplecticForm k * Matrix.transpose M = A2SymplecticForm k)
341     (hN : N * A2SymplecticForm k * Matrix.transpose N = A2SymplecticForm k)
342     (i : A2Index) :
343     a2_freeWeyl_symplectic_hom M hM
344         (a2_freeWeyl_symplectic_hom N hN
345           (freeWeylGenerator (A2SymplecticForm k) i)) =
346       freeWeylLinearCombination (N * M)
347         (freeWeylGenerator (A2SymplecticForm k)) i := by
348   exact freeWeylSymplecticAlgHom_comp_generator M N
349     (A2SymplecticForm k)
350     (a2_freeWeyl_symplectic_hpres M hM)
351     (a2_freeWeyl_symplectic_hpres N hN) i
352 
353 theorem a2_freeWeyl_symplectic_hom_comp_eq_id
354     (M N : Matrix A2Index A2Index k)
355     (hM : M * A2SymplecticForm k * Matrix.transpose M = A2SymplecticForm k)
356     (hN : N * A2SymplecticForm k * Matrix.transpose N = A2SymplecticForm k)
357     (hNM : N * M = 1) :
358     (a2_freeWeyl_symplectic_hom M hM).comp
359         (a2_freeWeyl_symplectic_hom N hN) =
360       AlgHom.id k (FreeWeyl k A2Index (A2SymplecticForm k)) := by
361   apply RingQuot.ringQuot_ext' k
362   apply FreeAlgebra.hom_ext
363   funext i
364   change a2_freeWeyl_symplectic_hom M hM
365       (a2_freeWeyl_symplectic_hom N hN
366         (freeWeylGenerator (A2SymplecticForm k) i)) =
367     freeWeylGenerator (A2SymplecticForm k) i
368   rw [a2_freeWeyl_symplectic_hom_comp_generator M N hM hN i, hNM]
369   exact freeWeylLinearCombination_one (A2SymplecticForm k) i
370 
371 def a2_freeWeyl_symplectic_equiv
372     (M : Matrix.symplecticGroup (Fin 2) k) :
373     FreeWeyl k A2Index (A2SymplecticForm k) ≃+*
374       FreeWeyl k A2Index (A2SymplecticForm k) := by
375   let hM : (M : Matrix A2Index A2Index k) * A2SymplecticForm k *
376       Matrix.transpose (M : Matrix A2Index A2Index k) = A2SymplecticForm k :=
377     SymplecticGroup.mem_iff.mp M.property
378   let hMi : ((M⁻¹ : Matrix.symplecticGroup (Fin 2) k) :
379       Matrix A2Index A2Index k) * A2SymplecticForm k *
380       Matrix.transpose ((M⁻¹ : Matrix.symplecticGroup (Fin 2) k) :
381         Matrix A2Index A2Index k) = A2SymplecticForm k :=
382     SymplecticGroup.mem_iff.mp (M⁻¹).property
383   let f := a2_freeWeyl_symplectic_hom
384     (M : Matrix A2Index A2Index k) hM
385   let g := a2_freeWeyl_symplectic_hom
386     ((M⁻¹ : Matrix.symplecticGroup (Fin 2) k) : Matrix A2Index A2Index k) hMi
387   have hfg : f.comp g =
388       AlgHom.id k (FreeWeyl k A2Index (A2SymplecticForm k)) := by
389     exact a2_freeWeyl_symplectic_hom_comp_eq_id
390       (M : Matrix A2Index A2Index k)
391       ((M⁻¹ : Matrix.symplecticGroup (Fin 2) k) : Matrix A2Index A2Index k)
392       hM hMi (by
393         exact congrArg (fun X : Matrix.symplecticGroup (Fin 2) k =>
394           (X : Matrix A2Index A2Index k)) (inv_mul_cancel M))
395   have hgf : g.comp f =
396       AlgHom.id k (FreeWeyl k A2Index (A2SymplecticForm k)) := by
397     exact a2_freeWeyl_symplectic_hom_comp_eq_id
398       ((M⁻¹ : Matrix.symplecticGroup (Fin 2) k) : Matrix A2Index A2Index k)
399       (M : Matrix A2Index A2Index k) hMi hM (by
400         exact congrArg (fun X : Matrix.symplecticGroup (Fin 2) k =>
401           (X : Matrix A2Index A2Index k)) (mul_inv_cancel M))
402   exact
403     { toFun := f
404       invFun := g
405       left_inv := fun a => congrArg (fun h => h a) hgf
406       right_inv := fun a => congrArg (fun h => h a) hfg
407       map_mul' := f.map_mul
408       map_add' := f.map_add }
409 
410 end Stafford
411