This project (Stafford38) · 1029fdb382eee06e7b59bcf32801f40931e2079a
1 module 2 public import AlgebraicAnalysis.Ore.Associativity 3 public import proofs.weyl_symplectic 4 5 @[expose] public section 6 7 /-! 8 # General-rank linear symplectic changes of Weyl generators 9 10 A matrix preserving the standard symplectic form defines an algebra 11 endomorphism of the presented Weyl algebra. Two form-preserving matrices that 12 are mutual inverses define a checked algebra equivalence. The inverse is part 13 of the input, which keeps this theorem independent of matrix inversion APIs 14 and makes the exact direction of generator substitution explicit. 15 -/ 16 17 namespace Stafford38.WeylSymplectic 18 19 open Stafford 20 open AlgebraicAnalysis 21 22 noncomputable section 23 24 universe u 25 26 variable (k : Type u) [Field k] 27 28 abbrev standardForm (n : ℕ) : Matrix (Fin n ⊕ Fin n) (Fin n ⊕ Fin n) k := 29 Stafford38Challenge.standardForm k n 30 31 def standardSymplecticHpres {n : ℕ} 32 (M : Matrix (Fin n ⊕ Fin n) (Fin n ⊕ Fin n) k) 33 (hM : M * standardForm k n * Matrix.transpose M = standardForm k n) : 34 ∀ i j, 35 Stafford.commutator 36 (freeWeylLinearCombination M 37 (freeWeylGenerator (standardForm k n)) i) 38 (freeWeylLinearCombination M 39 (freeWeylGenerator (standardForm k n)) j) = 40 algebraMap k (FreeWeyl k (Fin n ⊕ Fin n) (standardForm k n)) 41 (standardForm k n i j) := by 42 exact symplectic_linear_change_preserves_commutator M 43 (freeWeylGenerator (standardForm k n)) (standardForm k n) 44 (fun i j => freeWeylGenerator_commutator (standardForm k n) i j) hM 45 46 def standardSymplecticAlgHom {n : ℕ} 47 (M : Matrix (Fin n ⊕ Fin n) (Fin n ⊕ Fin n) k) 48 (hM : M * standardForm k n * Matrix.transpose M = standardForm k n) : 49 FreeWeyl k (Fin n ⊕ Fin n) (standardForm k n) →ₐ[k] 50 FreeWeyl k (Fin n ⊕ Fin n) (standardForm k n) := 51 freeWeylSymplecticAlgHom M (standardForm k n) 52 (standardSymplecticHpres k M hM) 53 54 @[simp] theorem standardSymplecticAlgHom_generator {n : ℕ} 55 (M : Matrix (Fin n ⊕ Fin n) (Fin n ⊕ Fin n) k) 56 (hM : M * standardForm k n * Matrix.transpose M = standardForm k n) 57 (i : Fin n ⊕ Fin n) : 58 standardSymplecticAlgHom k M hM 59 (freeWeylGenerator (standardForm k n) i) = 60 freeWeylLinearCombination M (freeWeylGenerator (standardForm k n)) i := 61 freeWeylSymplecticAlgHom_generator M (standardForm k n) 62 (standardSymplecticHpres k M hM) i 63 64 theorem standardSymplecticAlgHom_comp_eq_id {n : ℕ} 65 (M N : Matrix (Fin n ⊕ Fin n) (Fin n ⊕ Fin n) k) 66 (hM : M * standardForm k n * Matrix.transpose M = standardForm k n) 67 (hN : N * standardForm k n * Matrix.transpose N = standardForm k n) 68 (hNM : N * M = 1) : 69 (standardSymplecticAlgHom k M hM).comp 70 (standardSymplecticAlgHom k N hN) = 71 AlgHom.id k (FreeWeyl k (Fin n ⊕ Fin n) (standardForm k n)) := by 72 apply RingQuot.ringQuot_ext' k 73 apply FreeAlgebra.hom_ext 74 funext i 75 change standardSymplecticAlgHom k M hM 76 (standardSymplecticAlgHom k N hN 77 (freeWeylGenerator (standardForm k n) i)) = 78 freeWeylGenerator (standardForm k n) i 79 calc 80 _ = freeWeylLinearCombination (N * M) 81 (freeWeylGenerator (standardForm k n)) i := by 82 simpa [standardSymplecticAlgHom] using 83 freeWeylSymplecticAlgHom_comp_generator M N (standardForm k n) 84 (standardSymplecticHpres k M hM) 85 (standardSymplecticHpres k N hN) i 86 _ = _ := by 87 rw [hNM] 88 exact freeWeylLinearCombination_one (standardForm k n) i 89 90 /-- A general-rank symplectic change with an explicitly certified inverse. -/ 91 def standardSymplecticAlgEquivOfInverse {n : ℕ} 92 (M N : Matrix (Fin n ⊕ Fin n) (Fin n ⊕ Fin n) k) 93 (hM : M * standardForm k n * Matrix.transpose M = standardForm k n) 94 (hN : N * standardForm k n * Matrix.transpose N = standardForm k n) 95 (hMN : M * N = 1) (hNM : N * M = 1) : 96 FreeWeyl k (Fin n ⊕ Fin n) (standardForm k n) ≃ₐ[k] 97 FreeWeyl k (Fin n ⊕ Fin n) (standardForm k n) := 98 AlgEquiv.mk 99 { toFun := standardSymplecticAlgHom k M hM 100 invFun := standardSymplecticAlgHom k N hN 101 left_inv := fun x => DFunLike.congr_fun 102 (standardSymplecticAlgHom_comp_eq_id k N M hN hM hMN) x 103 right_inv := fun x => DFunLike.congr_fun 104 (standardSymplecticAlgHom_comp_eq_id k M N hM hN hNM) x } 105 (standardSymplecticAlgHom k M hM).map_mul 106 (standardSymplecticAlgHom k M hM).map_add 107 (standardSymplecticAlgHom k M hM).commutes 108 109 @[simp] theorem standardSymplecticAlgEquivOfInverse_generator {n : ℕ} 110 (M N : Matrix (Fin n ⊕ Fin n) (Fin n ⊕ Fin n) k) 111 (hM : M * standardForm k n * Matrix.transpose M = standardForm k n) 112 (hN : N * standardForm k n * Matrix.transpose N = standardForm k n) 113 (hMN : M * N = 1) (hNM : N * M = 1) (i : Fin n ⊕ Fin n) : 114 standardSymplecticAlgEquivOfInverse k M N hM hN hMN hNM 115 (freeWeylGenerator (standardForm k n) i) = 116 freeWeylLinearCombination M (freeWeylGenerator (standardForm k n)) i := 117 standardSymplecticAlgHom_generator k M hM i 118 119 @[simp] theorem standardSymplecticAlgEquivOfInverse_symm_generator {n : ℕ} 120 (M N : Matrix (Fin n ⊕ Fin n) (Fin n ⊕ Fin n) k) 121 (hM : M * standardForm k n * Matrix.transpose M = standardForm k n) 122 (hN : N * standardForm k n * Matrix.transpose N = standardForm k n) 123 (hMN : M * N = 1) (hNM : N * M = 1) (i : Fin n ⊕ Fin n) : 124 (standardSymplecticAlgEquivOfInverse k M N hM hN hMN hNM).symm 125 (freeWeylGenerator (standardForm k n) i) = 126 freeWeylLinearCombination N (freeWeylGenerator (standardForm k n)) i := 127 standardSymplecticAlgHom_generator k N hN i 128 129 /- Exact statement pins for composition order and both substitution maps. -/ 130 example {n : ℕ} 131 (M N : Matrix (Fin n ⊕ Fin n) (Fin n ⊕ Fin n) k) 132 (hM : M * standardForm k n * Matrix.transpose M = standardForm k n) 133 (hN : N * standardForm k n * Matrix.transpose N = standardForm k n) 134 (hNM : N * M = 1) : 135 (standardSymplecticAlgHom k M hM).comp 136 (standardSymplecticAlgHom k N hN) = 137 AlgHom.id k (FreeWeyl k (Fin n ⊕ Fin n) (standardForm k n)) := 138 standardSymplecticAlgHom_comp_eq_id k M N hM hN hNM 139 140 example {n : ℕ} 141 (M N : Matrix (Fin n ⊕ Fin n) (Fin n ⊕ Fin n) k) 142 (hM : M * standardForm k n * Matrix.transpose M = standardForm k n) 143 (hN : N * standardForm k n * Matrix.transpose N = standardForm k n) 144 (hMN : M * N = 1) (hNM : N * M = 1) (i : Fin n ⊕ Fin n) : 145 standardSymplecticAlgEquivOfInverse k M N hM hN hMN hNM 146 (freeWeylGenerator (standardForm k n) i) = 147 freeWeylLinearCombination M (freeWeylGenerator (standardForm k n)) i := 148 standardSymplecticAlgEquivOfInverse_generator k M N hM hN hMN hNM i 149 150 example {n : ℕ} 151 (M N : Matrix (Fin n ⊕ Fin n) (Fin n ⊕ Fin n) k) 152 (hM : M * standardForm k n * Matrix.transpose M = standardForm k n) 153 (hN : N * standardForm k n * Matrix.transpose N = standardForm k n) 154 (hMN : M * N = 1) (hNM : N * M = 1) (i : Fin n ⊕ Fin n) : 155 (standardSymplecticAlgEquivOfInverse k M N hM hN hMN hNM).symm 156 (freeWeylGenerator (standardForm k n) i) = 157 freeWeylLinearCombination N (freeWeylGenerator (standardForm k n)) i := 158 standardSymplecticAlgEquivOfInverse_symm_generator 159 k M N hM hN hMN hNM i 160 161 #print axioms standardSymplecticHpres 162 #print axioms standardSymplecticAlgHom 163 #print axioms standardSymplecticAlgHom_generator 164 #print axioms standardSymplecticAlgHom_comp_eq_id 165 #print axioms standardSymplecticAlgEquivOfInverse 166 #print axioms standardSymplecticAlgEquivOfInverse_generator 167 #print axioms standardSymplecticAlgEquivOfInverse_symm_generator 168 169 end 170 171 end Stafford38.WeylSymplectic 172