import OAI.Algebra.Drinfeld.Coefficients namespace OAI noncomputable section namespace RealDeligneDrinfeld.BraidSix variable {M : Type*} [LieRing M] def total (a b c d e f : M) : M := a+b+c+d+e+f def matrix (a b c d e f : M) : Fin 4 → Fin 4 → M := ![![0,a,d,f],![a,0,b,e],![d,b,0,c],![f,e,c,0]] structure Relations (a b c d e f : M) : Prop where central : ∀ u∈({a,b,c,d,e,f}:Set M),⁅u,total a b c d e f⁆=0 ac : ⁅a,c⁆=0 de : ⁅d,e⁆=0 aK : ⁅a,a+b+d⁆=0 bK : ⁅b,a+b+d⁆=0 bL : ⁅b,b+c+e⁆=0 cL : ⁅c,b+c+e⁆=0 variable {a b c d e f : M} theorem bf (h : Relations a b c d e f) : ⁅b,f⁆=0 := by calc _=⁅b,total a b c d e f⁆-⁅b,a+b+d⁆-⁅b,b+c+e⁆ := by simp only [total,lie_add,lie_self] abel _=0 := by rw [h.central b (by simp),h.bK,h.bL]; abel theorem dK (h : Relations a b c d e f) : ⁅d,a+b+d⁆=0 := by have hh := lie_self (a+b+d) rw [add_lie,add_lie,h.aK,h.bK] at hh simpa only [zero_add] using hh theorem eL (h : Relations a b c d e f) : ⁅e,b+c+e⁆=0 := by have hh := lie_self (b+c+e) rw [add_lie,add_lie,h.bL,h.cL] at hh simpa only [zero_add] using hh theorem aM (h : Relations a b c d e f) : ⁅a,a+e+f⁆=0 := by calc _=⁅a,total a b c d e f⁆-⁅a,a+b+d⁆-⁅a,c⁆ := by simp only [total,lie_add,lie_self]; abel _=0 := by rw [h.central a (by simp),h.aK,h.ac]; abel theorem eM (h : Relations a b c d e f) : ⁅e,a+e+f⁆=0 := by calc _=⁅e,total a b c d e f⁆-⁅e,b+c+e⁆+⁅d,e⁆ := by simp only [total,lie_add,lie_self] rw [←lie_skew d e] abel _=0 := by rw [h.central e (by simp),eL h,h.de]; abel theorem fM (h : Relations a b c d e f) : ⁅f,a+e+f⁆=0 := by have hh := lie_self (a+e+f) rw [add_lie,add_lie,aM h,eM h] at hh simpa only [zero_add] using hh theorem dP (h : Relations a b c d e f) : ⁅d,d+c+f⁆=0 := by calc _=⁅d,total a b c d e f⁆-⁅d,a+b+d⁆-⁅d,e⁆ := by simp only [total,lie_add,lie_self]; abel _=0 := by rw [h.central d (by simp),dK h,h.de]; abel theorem cP (h : Relations a b c d e f) : ⁅c,d+c+f⁆=0 := by calc _=⁅c,total a b c d e f⁆-⁅c,b+c+e⁆+⁅a,c⁆ := by simp only [total,lie_add,lie_self] rw [←lie_skew a c] abel _=0 := by rw [h.central c (by simp),h.cL,h.ac]; abel theorem fP (h : Relations a b c d e f) : ⁅f,d+c+f⁆=0 := by have hh := lie_self (d+c+f) rw [add_lie,add_lie,dP h,cP h] at hh simpa only [zero_add] using hh theorem matrix_self (i : Fin 4) : matrix a b c d e f i i=0 := by fin_cases i <;> rfl theorem matrix_symm (i j : Fin 4) : matrix a b c d e f i j=matrix a b c d e f j i := by fin_cases i <;> fin_cases j <;> rfl theorem matrix_disjoint_0 (h : Relations a b c d e f) (j k l : Fin 4) (hik : (0:Fin 4)≠k) (hil : (0:Fin 4)≠l) (hjk : j≠k) (hjl : j≠l) : ⁅matrix a b c d e f 0 j,matrix a b c d e f k l⁆=0 := by have hac := h.ac have hde := h.de have hbf := bf h have hca := commute_symm h.ac have hed := commute_symm h.de have hfb := commute_symm (bf h) fin_cases j <;> fin_cases k <;> fin_cases l <;> simp_all [matrix] theorem matrix_disjoint_1 (h : Relations a b c d e f) (j k l : Fin 4) (hik : (1:Fin 4)≠k) (hil : (1:Fin 4)≠l) (hjk : j≠k) (hjl : j≠l) : ⁅matrix a b c d e f 1 j,matrix a b c d e f k l⁆=0 := by have hac := h.ac have hde := h.de have hbf := bf h have hca := commute_symm h.ac have hed := commute_symm h.de have hfb := commute_symm (bf h) fin_cases j <;> fin_cases k <;> fin_cases l <;> simp_all [matrix] theorem matrix_disjoint_2 (h : Relations a b c d e f) (j k l : Fin 4) (hik : (2:Fin 4)≠k) (hil : (2:Fin 4)≠l) (hjk : j≠k) (hjl : j≠l) : ⁅matrix a b c d e f 2 j,matrix a b c d e f k l⁆=0 := by have hac := h.ac have hde := h.de have hbf := bf h have hca := commute_symm h.ac have hed := commute_symm h.de have hfb := commute_symm (bf h) fin_cases j <;> fin_cases k <;> fin_cases l <;> simp_all [matrix] theorem matrix_disjoint_3 (h : Relations a b c d e f) (j k l : Fin 4) (hik : (3:Fin 4)≠k) (hil : (3:Fin 4)≠l) (hjk : j≠k) (hjl : j≠l) : ⁅matrix a b c d e f 3 j,matrix a b c d e f k l⁆=0 := by have hac := h.ac have hde := h.de have hbf := bf h have hca := commute_symm h.ac have hed := commute_symm h.de have hfb := commute_symm (bf h) fin_cases j <;> fin_cases k <;> fin_cases l <;> simp_all [matrix] theorem matrix_disjoint (h : Relations a b c d e f) (i j k l : Fin 4) (hik : i≠k) (hil : i≠l) (hjk : j≠k) (hjl : j≠l) : ⁅matrix a b c d e f i j,matrix a b c d e f k l⁆=0 := by fin_cases i · exact matrix_disjoint_0 h j k l hik hil hjk hjl · exact matrix_disjoint_1 h j k l hik hil hjk hjl · exact matrix_disjoint_2 h j k l hik hil hjk hjl · exact matrix_disjoint_3 h j k l hik hil hjk hjl theorem matrix_three_0 (h : Relations a b c d e f) (j k : Fin 4) (hij : (0:Fin 4)≠j) (hik : (0:Fin 4)≠k) (hjk : j≠k) : ⁅matrix a b c d e f 0 j,matrix a b c d e f 0 k+matrix a b c d e f j k⁆=0 := by have ha : ⁅a,b+d⁆=0 := by simpa only [lie_add,lie_self,zero_add] using h.aK have hb : ⁅b,a+d⁆=0 := by simpa only [lie_add,lie_self,add_zero] using h.bK have hd : ⁅d,a+b⁆=0 := by simpa only [lie_add,lie_self,add_zero] using dK h have hb' : ⁅b,c+e⁆=0 := by simpa only [lie_add,lie_self,zero_add] using h.bL have hc : ⁅c,b+e⁆=0 := by simpa only [lie_add,lie_self,add_zero] using h.cL have he : ⁅e,b+c⁆=0 := by simpa only [lie_add,lie_self,add_zero] using eL h have ha' : ⁅a,e+f⁆=0 := by simpa only [lie_add,lie_self,zero_add] using aM h have he' : ⁅e,a+f⁆=0 := by simpa only [lie_add,lie_self,add_zero] using eM h have hf : ⁅f,a+e⁆=0 := by simpa only [lie_add,lie_self,add_zero] using fM h have hd' : ⁅d,c+f⁆=0 := by simpa only [lie_add,lie_self,zero_add] using dP h have hc' : ⁅c,d+f⁆=0 := by simpa only [lie_add,lie_self,add_zero] using cP h have hf' : ⁅f,d+c⁆=0 := by simpa only [lie_add,lie_self,add_zero] using fP h fin_cases j <;> fin_cases k <;> simp_all [matrix,add_comm] theorem matrix_three_1 (h : Relations a b c d e f) (j k : Fin 4) (hij : (1:Fin 4)≠j) (hik : (1:Fin 4)≠k) (hjk : j≠k) : ⁅matrix a b c d e f 1 j,matrix a b c d e f 1 k+matrix a b c d e f j k⁆=0 := by have ha : ⁅a,b+d⁆=0 := by simpa only [lie_add,lie_self,zero_add] using h.aK have hb : ⁅b,a+d⁆=0 := by simpa only [lie_add,lie_self,add_zero] using h.bK have hd : ⁅d,a+b⁆=0 := by simpa only [lie_add,lie_self,add_zero] using dK h have hb' : ⁅b,c+e⁆=0 := by simpa only [lie_add,lie_self,zero_add] using h.bL have hc : ⁅c,b+e⁆=0 := by simpa only [lie_add,lie_self,add_zero] using h.cL have he : ⁅e,b+c⁆=0 := by simpa only [lie_add,lie_self,add_zero] using eL h have ha' : ⁅a,e+f⁆=0 := by simpa only [lie_add,lie_self,zero_add] using aM h have he' : ⁅e,a+f⁆=0 := by simpa only [lie_add,lie_self,add_zero] using eM h have hf : ⁅f,a+e⁆=0 := by simpa only [lie_add,lie_self,add_zero] using fM h have hd' : ⁅d,c+f⁆=0 := by simpa only [lie_add,lie_self,zero_add] using dP h have hc' : ⁅c,d+f⁆=0 := by simpa only [lie_add,lie_self,add_zero] using cP h have hf' : ⁅f,d+c⁆=0 := by simpa only [lie_add,lie_self,add_zero] using fP h fin_cases j <;> fin_cases k <;> simp_all [matrix,add_comm] theorem matrix_three_2 (h : Relations a b c d e f) (j k : Fin 4) (hij : (2:Fin 4)≠j) (hik : (2:Fin 4)≠k) (hjk : j≠k) : ⁅matrix a b c d e f 2 j,matrix a b c d e f 2 k+matrix a b c d e f j k⁆=0 := by have ha : ⁅a,b+d⁆=0 := by simpa only [lie_add,lie_self,zero_add] using h.aK have hb : ⁅b,a+d⁆=0 := by simpa only [lie_add,lie_self,add_zero] using h.bK have hd : ⁅d,a+b⁆=0 := by simpa only [lie_add,lie_self,add_zero] using dK h have hb' : ⁅b,c+e⁆=0 := by simpa only [lie_add,lie_self,zero_add] using h.bL have hc : ⁅c,b+e⁆=0 := by simpa only [lie_add,lie_self,add_zero] using h.cL have he : ⁅e,b+c⁆=0 := by simpa only [lie_add,lie_self,add_zero] using eL h have ha' : ⁅a,e+f⁆=0 := by simpa only [lie_add,lie_self,zero_add] using aM h have he' : ⁅e,a+f⁆=0 := by simpa only [lie_add,lie_self,add_zero] using eM h have hf : ⁅f,a+e⁆=0 := by simpa only [lie_add,lie_self,add_zero] using fM h have hd' : ⁅d,c+f⁆=0 := by simpa only [lie_add,lie_self,zero_add] using dP h have hc' : ⁅c,d+f⁆=0 := by simpa only [lie_add,lie_self,add_zero] using cP h have hf' : ⁅f,d+c⁆=0 := by simpa only [lie_add,lie_self,add_zero] using fP h fin_cases j <;> fin_cases k <;> simp_all [matrix,add_comm] theorem matrix_three_3 (h : Relations a b c d e f) (j k : Fin 4) (hij : (3:Fin 4)≠j) (hik : (3:Fin 4)≠k) (hjk : j≠k) : ⁅matrix a b c d e f 3 j,matrix a b c d e f 3 k+matrix a b c d e f j k⁆=0 := by have ha : ⁅a,b+d⁆=0 := by simpa only [lie_add,lie_self,zero_add] using h.aK have hb : ⁅b,a+d⁆=0 := by simpa only [lie_add,lie_self,add_zero] using h.bK have hd : ⁅d,a+b⁆=0 := by simpa only [lie_add,lie_self,add_zero] using dK h have hb' : ⁅b,c+e⁆=0 := by simpa only [lie_add,lie_self,zero_add] using h.bL have hc : ⁅c,b+e⁆=0 := by simpa only [lie_add,lie_self,add_zero] using h.cL have he : ⁅e,b+c⁆=0 := by simpa only [lie_add,lie_self,add_zero] using eL h have ha' : ⁅a,e+f⁆=0 := by simpa only [lie_add,lie_self,zero_add] using aM h have he' : ⁅e,a+f⁆=0 := by simpa only [lie_add,lie_self,add_zero] using eM h have hf : ⁅f,a+e⁆=0 := by simpa only [lie_add,lie_self,add_zero] using fM h have hd' : ⁅d,c+f⁆=0 := by simpa only [lie_add,lie_self,zero_add] using dP h have hc' : ⁅c,d+f⁆=0 := by simpa only [lie_add,lie_self,add_zero] using cP h have hf' : ⁅f,d+c⁆=0 := by simpa only [lie_add,lie_self,add_zero] using fP h fin_cases j <;> fin_cases k <;> simp_all [matrix,add_comm] theorem matrix_three (h : Relations a b c d e f) (i j k : Fin 4) (hij : i≠j) (hik : i≠k) (hjk : j≠k) : ⁅matrix a b c d e f i j,matrix a b c d e f i k+matrix a b c d e f j k⁆=0 := by fin_cases i · exact matrix_three_0 h j k hij hik hjk · exact matrix_three_1 h j k hij hik hjk · exact matrix_three_2 h j k hij hik hjk · exact matrix_three_3 h j k hij hik hjk end RealDeligneDrinfeld.BraidSix namespace RealDeligneDrinfeld.T4Basic open BraidSix def a : T4 := t 0 1 def b : T4 := t 1 2 def c : T4 := t 2 3 def d : T4 := t 0 2 def e : T4 := t 1 3 def f : T4 := t 0 3 theorem induction {P : T4 → Prop} (hz : P 0) (ht : ∀ i j,P (t i j)) (ha : ∀ p q,P p → P q → P (p+q)) (hs : ∀ (r : ℝ) p,P p → P (r • p)) (hl : ∀ p q,P p → P q → P ⁅p,q⁆) (p : T4) : P p := by induction p using Submodule.Quotient.induction_on with | _ p => induction p using freeLie_induction with | h0 => exact hz | hg ij => have hh : (FreeLieAlgebra.of ℝ ij : BraidFree)=chord ij.val.1 ij.val.2 := by simp only [chord,dite_eq_left ij.property] rw [hh] exact ht _ _ | ha p q hp hq => exact ha _ _ hp hq | hs r p hp => exact hs r _ hp | hl p q hp hq => exact hl _ _ hp hq theorem hom_ext {M : Type*} [LieRing M] [LieAlgebra ℝ M] {F G : T4 →ₗ⁅ℝ⁆ M} (h : ∀ i j,F (t i j)=G (t i j)) : F=G := by apply LieHom.ext intro p induction p using induction with | hz => simp | ht i j => exact h i j | ha p q hp hq => simp only [map_add,hp,hq] | hs r p hp => simp only [map_smul,hp] | hl p q hp hq => simp only [LieHom.map_lie,hp,hq] theorem matrix_t (i j : Fin 4) : matrix a b c d e f i j=t i j := by fin_cases i <;> fin_cases j <;> rfl theorem central_a : ⁅a,total a b c d e f⁆=0 := by have h₁ := t_three 0 1 2 (by decide) (by decide) (by decide) have h₂ := t_three 0 1 3 (by decide) (by decide) (by decide) have h₃ := t_disjoint 0 1 2 3 (by decide) (by decide) (by decide) (by decide) (by decide) (by decide) calc _=⁅t 0 1,t 0 2+t 1 2⁆+⁅t 0 1,t 0 3+t 1 3⁆+⁅t 0 1,t 2 3⁆ := by simp only [a,b,c,d,e,f,total,lie_add,lie_self] abel _=0 := by rw [h₁,h₂,h₃]; simp theorem central_b : ⁅b,total a b c d e f⁆=0 := by have h₁ := t_three 1 2 0 (by decide) (by decide) (by decide) have h₂ := t_three 1 2 3 (by decide) (by decide) (by decide) have h₃ := t_disjoint 1 2 0 3 (by decide) (by decide) (by decide) (by decide) (by decide) (by decide) calc _=⁅t 1 2,t 1 0+t 2 0⁆+⁅t 1 2,t 1 3+t 2 3⁆+⁅t 1 2,t 0 3⁆ := by simp only [a,b,c,d,e,f,total,lie_add,lie_self,t_comm 1 0,t_comm 2 0] abel _=0 := by rw [h₁,h₂,h₃]; simp theorem central_c : ⁅c,total a b c d e f⁆=0 := by have h₁ := t_three 2 3 0 (by decide) (by decide) (by decide) have h₂ := t_three 2 3 1 (by decide) (by decide) (by decide) have h₃ := t_disjoint 2 3 0 1 (by decide) (by decide) (by decide) (by decide) (by decide) (by decide) calc _=⁅t 2 3,t 2 0+t 3 0⁆+⁅t 2 3,t 2 1+t 3 1⁆+⁅t 2 3,t 0 1⁆ := by simp only [a,b,c,d,e,f,total,lie_add,lie_self,t_comm 2 0,t_comm 2 1,t_comm 3 0,t_comm 3 1] abel _=0 := by rw [h₁,h₂,h₃]; simp theorem central_d : ⁅d,total a b c d e f⁆=0 := by have h₁ := t_three 0 2 1 (by decide) (by decide) (by decide) have h₂ := t_three 0 2 3 (by decide) (by decide) (by decide) have h₃ := t_disjoint 0 2 1 3 (by decide) (by decide) (by decide) (by decide) (by decide) (by decide) calc _=⁅t 0 2,t 0 1+t 2 1⁆+⁅t 0 2,t 0 3+t 2 3⁆+⁅t 0 2,t 1 3⁆ := by simp only [a,b,c,d,e,f,total,lie_add,lie_self,t_comm 2 1] abel _=0 := by rw [h₁,h₂,h₃]; simp theorem central_e : ⁅e,total a b c d e f⁆=0 := by have h₁ := t_three 1 3 0 (by decide) (by decide) (by decide) have h₂ := t_three 1 3 2 (by decide) (by decide) (by decide) have h₃ := t_disjoint 1 3 0 2 (by decide) (by decide) (by decide) (by decide) (by decide) (by decide) calc _=⁅t 1 3,t 1 0+t 3 0⁆+⁅t 1 3,t 1 2+t 3 2⁆+⁅t 1 3,t 0 2⁆ := by simp only [a,b,c,d,e,f,total,lie_add,lie_self,t_comm 1 0,t_comm 3 0,t_comm 3 2] abel _=0 := by rw [h₁,h₂,h₃]; simp theorem central_f : ⁅f,total a b c d e f⁆=0 := by have h₁ := t_three 0 3 1 (by decide) (by decide) (by decide) have h₂ := t_three 0 3 2 (by decide) (by decide) (by decide) have h₃ := t_disjoint 0 3 1 2 (by decide) (by decide) (by decide) (by decide) (by decide) (by decide) calc _=⁅t 0 3,t 0 1+t 3 1⁆+⁅t 0 3,t 0 2+t 3 2⁆+⁅t 0 3,t 1 2⁆ := by simp only [a,b,c,d,e,f,total,lie_add,lie_self,t_comm 3 1,t_comm 3 2] abel _=0 := by rw [h₁,h₂,h₃]; simp theorem central (p : T4) : ⁅total a b c d e f,p⁆=0 := by induction p using induction with | hz => exact lie_zero _ | ht i j => rw [←matrix_t i j] have ha := commute_symm central_a have hb := commute_symm central_b have hc := commute_symm central_c have hd := commute_symm central_d have he := commute_symm central_e have hf := commute_symm central_f fin_cases i <;> fin_cases j <;> simp_all [matrix] | ha p q hp hq => rw [lie_add,hp,hq,add_zero] | hs r p hp => rw [lie_smul,hp,smul_zero] | hl p q hp hq => rw [leibniz_lie,hp,hq,zero_lie,lie_zero,add_zero] theorem relations : Relations a b c d e f := by constructor · intro u _; exact commute_symm (central u) · exact t_disjoint 0 1 2 3 (by decide) (by decide) (by decide) (by decide) (by decide) (by decide) · exact t_disjoint 0 2 1 3 (by decide) (by decide) (by decide) (by decide) (by decide) (by decide) · have h := t_three 0 1 2 (by decide) (by decide) (by decide) change ⁅t 0 1,t 0 1+t 1 2+t 0 2⁆=0 simp only [lie_add,lie_self] at h ⊢ rw [add_comm] at h simpa only [zero_add] using h · have h := t_three 1 2 0 (by decide) (by decide) (by decide) simpa only [a,b,d,lie_add,lie_self,add_zero,t_comm 1 0,t_comm 2 0] using h · have h := t_three 1 2 3 (by decide) (by decide) (by decide) change ⁅t 1 2,t 1 2+t 2 3+t 1 3⁆=0 simp only [lie_add,lie_self] at h ⊢ rw [add_comm] at h simpa only [zero_add] using h · have h := t_three 2 3 1 (by decide) (by decide) (by decide) simpa only [b,c,e,lie_add,lie_self,add_zero,t_comm 2 1,t_comm 3 1] using h end RealDeligneDrinfeld.T4Basic namespace RealDeligneDrinfeld.TangentBraid open FreeDerivations BraidSix variable {R M : Type*} [CommRing R] [LieRing M] [LieAlgebra R M] structure Data (a b c d e f A B C D E H I J P Q : M) : Prop where base : BraidSix.Relations a b c d e f central : ∀ u : M,⁅total a b c d e f,u⁆=0 aD : ⁅a,D⁆=0 bB : ⁅b,B⁆=0 cE : ⁅c,E⁆=0 KA : ⁅a+b+d,A⁆=0 LC : ⁅b+c+e,C⁆=0 special_d : ⁅b,A⁆+⁅d,A+H⁆=0 special_e : ⁅c,C⁆+⁅e,C+I⁆=0 cyclic : C+I=J pentagon : D+E=A+B+C permuted : P+Q= -H+B+J dP : ⁅d,P⁆=0 eQ : ⁅e,Q⁆=0 variable {a b c d e f A B C D E H I J P Q : M} theorem crossing {a b h k p q : M} (hab : ⁅a,b⁆=0) (hk : k-h=p+q) (hap : ⁅a,p⁆=0) (hbq : ⁅b,q⁆=0) : ⁅⁅a,h⁆,b⁆+⁅a,⁅b,k⁆⁆=0 := by calc _=⁅a,⁅b,k-h⁆⁆ := by rw [lie_sub,lie_sub,leibniz_lie a b h,hab,zero_lie,zero_add,←lie_skew b ⁅a,h⁆] abel _=0 := by rw [hk,lie_add,lie_add,hbq,lie_zero,add_zero,leibniz_lie,hab,hap,zero_lie,lie_zero,add_zero] theorem inner_pair {a b h : M} (hab : ⁅a,b⁆=0) : ⁅⁅a,h⁆,b⁆+⁅a,⁅b,h⁆⁆=0 := by rw [leibniz_lie a b h,hab,zero_lie,zero_add,←lie_skew b ⁅a,h⁆] abel theorem commute_lie {a b h : M} (ha : ⁅a,h⁆=0) (hb : ⁅b,h⁆=0) : ⁅⁅a,b⁆,h⁆=0 := by rw [lie_lie,ha,hb,lie_zero,lie_zero,sub_self] def va : M := 0 def vb (b A : M) : M := ⁅b,A⁆ def vc (c D : M) : M := ⁅c,D⁆ def vd (b A : M) : M := -⁅b,A⁆ def ve (b e A D E : M) : M := ⁅b+e,D+E⁆-⁅b,A⁆ def vf (b c e A D E : M) : M := -vc c D-ve b e A D E theorem vd_tangent (h : Data a b c d e f A B C D E H I J P Q) : vd b A=⁅d,A+H⁆ := by exact neg_eq_of_add_eq_zero_right h.special_d theorem bC (h : Data a b c d e f A B C D E H I J P Q) : ⁅b,C⁆=⁅e,I⁆ := by apply sub_eq_zero.mp calc _=⁅b+c+e,C⁆-(⁅c,C⁆+⁅e,C+I⁆) := by simp only [add_lie,lie_add]; abel _=0 := by rw [h.LC,h.special_e,sub_self] theorem ve_tangent (h : Data a b c d e f A B C D E H I J P Q) : ve b e A D E=⁅e,A+B+C+I⁆ := by rw [ve,h.pentagon] simp only [add_lie,lie_add] rw [h.bB,bC h] abel theorem gauge_difference (h : Data a b c d e f A B C D E H I J P Q) : (A+B+C+I)-(A+H)=P+Q := by rw [h.permuted,←h.cyclic] abel theorem crossing_de (h : Data a b c d e f A B C D E H I J P Q) : ⁅vd b A,e⁆+⁅d,ve b e A D E⁆=0 := by rw [vd_tangent h,ve_tangent h] exact crossing h.base.de (gauge_difference h) h.dP h.eQ theorem velocity_K : (0:M)+vb b A+vd b A=0 := by simp only [vb,vd,zero_add,add_neg_cancel] theorem velocity_L (h : Data a b c d e f A B C D E H I J P Q) : vb b A+vc c D+ve b e A D E=⁅b+c+e,A+B⁆ := by calc _=⁅b+c+e,D+E⁆ := by simp only [vb,vc,ve,add_lie,lie_add,h.cE]; abel _=⁅b+c+e,A+B⁆ := by rw [h.pentagon,lie_add,h.LC,add_zero] theorem velocity_b (h : Data a b c d e f A B C D E H I J P Q) : vb b A=⁅b,A+B⁆ := by simp only [vb,lie_add,h.bB,add_zero] theorem velocity_c (h : Data a b c d e f A B C D E H I J P Q) : vc c D=⁅c,A+B⁆+⁅c,C⁆ := by have hh := congrArg (fun u => ⁅c,u⁆) h.pentagon simpa only [vc,lie_add,h.cE,add_zero] using hh theorem velocity_total : total (0:M) (vb b A) (vc c D) (vd b A) (ve b e A D E) (vf b c e A D E)=0 := by simp only [total,vb,vc,vd,vf] abel def ja (a : M) : Jet R M := ⟨a,0⟩ def jb (b A : M) : Jet R M := ⟨b,vb b A⟩ def jc (c D : M) : Jet R M := ⟨c,vc c D⟩ def jd (d b A : M) : Jet R M := ⟨d,vd b A⟩ def je (e b A D E : M) : Jet R M := ⟨e,ve b e A D E⟩ def jf (f b c e A D E : M) : Jet R M := ⟨f,vf b c e A D E⟩ theorem relations (h : Data a b c d e f A B C D E H I J P Q) : BraidSix.Relations (ja (R:=R) a) (jb b A) (jc c D) (jd d b A) (je e b A D E) (jf f b c e A D E) := by constructor · intro u _ apply Jet.ext · change ⁅u.base,total a b c d e f⁆=0 exact commute_symm (h.central u.base) · change ⁅u.velocity,total a b c d e f⁆+⁅u.base, total 0 (vb b A) (vc c D) (vd b A) (ve b e A D E) (vf b c e A D E)⁆=0 rw [velocity_total,lie_zero,add_zero] exact commute_symm (h.central u.velocity) · apply Jet.ext · exact h.base.ac · change ⁅(0:M),c⁆+⁅a,⁅c,D⁆⁆=0 rw [zero_lie,zero_add,leibniz_lie,h.base.ac,h.aD,zero_lie,lie_zero,add_zero] · apply Jet.ext · exact h.base.de · exact crossing_de h · apply Jet.ext · exact h.base.aK · change ⁅(0:M),a+b+d⁆+⁅a,(0:M)+vb b A+vd b A⁆=0 rw [velocity_K,zero_lie,lie_zero,add_zero] · apply Jet.ext · exact h.base.bK · change ⁅⁅b,A⁆,a+b+d⁆+⁅b,(0:M)+vb b A+vd b A⁆=0 rw [velocity_K,lie_zero,add_zero] exact commute_lie h.base.bK (commute_symm h.KA) · apply Jet.ext · exact h.base.bL · change ⁅vb b A,b+c+e⁆+⁅b,vb b A+vc c D+ve b e A D E⁆=0 rw [velocity_L h,velocity_b h] exact inner_pair h.base.bL · apply Jet.ext · exact h.base.cL · change ⁅vc c D,b+c+e⁆+⁅c,vb b A+vc c D+ve b e A D E⁆=0 rw [velocity_L h,velocity_c h,add_lie] have hz := commute_lie h.base.cL (commute_symm h.LC) rw [hz,add_zero] exact inner_pair h.base.cL end RealDeligneDrinfeld.TangentBraid namespace RealDeligneDrinfeld.TriangleSolutions variable {M : Type} [LieRing M] [LieAlgebra ℝ M] variable {n : ℕ} {q : L} (hq : q∈W) (hqn : q∈Ln n) (hn : 2 rw [hsum] exact eval_central_shift u (-u-v) (u+v+w) hu hneg hqn (by omega) include hqn hn hu hv in theorem shift_v : eval v w q=eval v (-u-v) q := by have hsum : w=(-u-v)+(u+v+w) := by abel have hneg : ⁅-u-v,u+v+w⁆=0 := by rw [sub_lie,neg_lie,hu,hv,neg_zero,sub_zero] conv_lhs => rw [hsum] exact eval_central_shift v (-u-v) (u+v+w) hv hneg hqn (by omega) include hq hqn hn hu hv in theorem cyclic : eval u v q+eval v w q=eval u w q := by have h := solution_three hq u v rw [solution_swap hq (-u-v) u,←shift_u hqn hn u v w hu hv, ←shift_v hqn hn u v w hu hv] at h exact eq_of_sub_eq_zero (by simpa only [sub_eq_add_neg] using h) include hq hqn hn hu hv in theorem special : ⁅v,eval u v q⁆+⁅w,eval u v q+eval v w q⁆=0 := by have h := Differentiation.special_identity hq hqn hn v u have hc : -v-u= -u-v := by abel rw [hc,←shift_u hqn hn u v w hu hv] at h have hk : ⁅u+v+w,eval u w q⁆=0 := eval_commutes u w (u+v+w) (commute_symm hu) (commute_symm (third u v w hu hv)) q have he : ⁅-u-v,eval u w q⁆=⁅w,eval u w q⁆ := by have hh : -u-v=w-(u+v+w) := by abel rw [hh,sub_lie,hk,sub_zero] rw [he] at h rw [cyclic hq hqn hn u v w hu hv] exact h end RealDeligneDrinfeld.TriangleSolutions namespace RealDeligneDrinfeld.T4SolutionData open T4Basic def A (q : L) : T4 := eval a b q def B (q : L) : T4 := eval (a+d) (e+c) q def C (q : L) : T4 := eval b c q def D (q : L) : T4 := eval (d+b) c q def E (q : L) : T4 := eval a (b+e) q def H (q : L) : T4 := eval b d q def I (q : L) : T4 := eval c e q def J (q : L) : T4 := eval b e q def P (q : L) : T4 := eval (a+b) e q def Q (q : L) : T4 := eval d (b+c) q theorem pentagon {q : L} (hq : q∈W) : D q+E q=A q+B q+C q := by calc _=E q+D q := add_comm _ _ _=C q+B q+A q := hq.2.2 _=_ := by abel theorem permuted {q : L} (hq : q∈W) : P q+Q q= -H q+B q+J q := by have hh := congrArg (t4Rename (Equiv.swap (1:Fin 4) 2)) hq.2.2 simp only [map_add,map_eval,t4Rename_t] at hh change eval d (b+c) q+eval (a+b) e q=eval b e q+eval (d+a) (c+e) q+eval d b q at hh rw [add_comm d a,add_comm c e,solution_swap hq d b] at hh calc _=Q q+P q := add_comm _ _ _=J q+B q+(-H q) := hh _=_ := by abel theorem data {n : ℕ} {q : L} (hq : q∈W) (hqn : q∈Ln n) (hn : 2 fin_cases j <;> rfl def lift (hq : q∈W) (hqn : q∈Ln n) (hn : 2 BraidSix.matrix_disjoint (TangentBraid.relations (data hq hqn hn)) i j k l hik hil hjk hjl) (BraidSix.matrix_three (TangentBraid.relations (data hq hqn hn))) @[simp] theorem lift_t (hq : q∈W) (hqn : q∈Ln n) (hn : 2 simp only [map_zero] | hg i => cases i · change D (eval a b x)=eval a b (derivation q x) simp only [eval_x,derivation_apply,D_x,map_zero,hx] · change D (eval a b y)=eval a b (derivation q y) simp only [eval_y,derivation_apply,D_y,LieHom.map_lie,hy] | ha p r hp hr => simp only [map_add,hp,hr] | hs s p hp => simp only [map_smul,hp] | hl p r hp hr => simp only [LieHom.map_lie,LieDerivation.apply_lie_eq_add,map_add,hp,hr] theorem compatible {M N O P : Type*} [LieRing M] [LieAlgebra ℝ M] [LieRing N] [LieAlgebra ℝ N] (g : Data ℝ M O) (k : Data ℝ N P) (F : M →ₗ⁅ℝ⁆ N) (f : O → P) (K : N) (hh : ∀ p,k.h (f p)=F (g.h p)+K) (hd : ∀ z,k.d (F z)+⁅K,F z⁆=F (g.d z)) : Compatible F f g k := by constructor · intro p q simp only [unit,hh,map_sub] abel · intro p z simp only [loop_apply,hh,add_lie,map_add,LieHom.map_lie] rw [←hd z] abel end RealDeligneDrinfeld.GaugeCompatibility namespace RealDeligneDrinfeld.ThreeSolutionCategory open CategoricalValues DeligneDrinfeld.CategoryGauge def data (q : L) : Data ℝ L (Fin 3) := ⟨derivation q,![0,q,q+rotateLie q]⟩ @[simp] theorem loop_zero (q : L) : loop (data q) 0=derivation q := by ext p simp [loop_apply,data] @[simp] theorem value (q : L) : unit (data q) 0 1=q := by simp [unit,data] theorem anti {q : L} (hq : q∈W) : swapLie q= -q := by exact eq_neg_of_add_eq_zero_right hq.1 theorem rotating_anti {q : L} (hq : q∈W) : swapLie (rotateLie q)=q+rotateLie q := by change eval y x (eval y (-x-y) q)=q+eval y (-x-y) q rw [map_eval,eval_y,map_sub,map_neg,eval_x,eval_y] have h := solution_three hq x y rw [eval_self,LieHom.id_apply,solution_swap hq (-x-y) x] at h have hs : -y-x= -x-y := by abel rw [hs] exact (eq_of_sub_eq_zero (by simpa only [sub_eq_add_neg] using h)).symm theorem rotating_twice {q : L} (hq : q∈W) : rotateLie (q+rotateLie q)= -q := by rw [map_add] have hsq := LieHom.congr_fun rotate_squared q change rotateLie (rotateLie q)=eval (-x-y) x q at hsq rw [hsq] exact eq_neg_of_add_eq_zero_right (by simpa only [rotateLie,add_assoc] using hq.2.1) theorem swap {q : L} (hq : q∈W) : Compatible swapLie swapObjects (data q) (data q) := by apply GaugeCompatibility.compatible (data q) (data q) swapLie swapObjects q · intro i fin_cases i · simp [data,swapObjects] · change 0=swapLie q+q rw [anti hq,neg_add_cancel] · change q+rotateLie q=swapLie (q+rotateLie q)+q rw [map_add,anti hq,rotating_anti hq] abel · intro p have hh := GaugeCompatibility.intertwine (loop (data q) 1) q y x (by simp only [loop_apply,data,D_y,derivation_apply,Matrix.cons_val_one,Matrix.cons_val_zero]; rw [←lie_skew y q]; abel) (by simp only [loop_apply,data,derivation_apply,D_x,zero_add,Matrix.cons_val_one,Matrix.cons_val_zero] change ⁅q,x⁆=⁅x,swapLie q⁆ rw [anti hq,lie_neg,←lie_skew x q,neg_neg]) p simpa only [loop_apply,data,Matrix.cons_val_one,Matrix.cons_val_zero,swapLie,rotateLie] using hh theorem rotate {n : ℕ} {q : L} (hq : q∈W) (hqn : q∈Ln n) (hn : 2