import Mathlib import Definitions.Def_Deformations_LiftFunctor set_option autoImplicit false universe u open CategoryTheory IsLocalRing namespace Deformation variable {n : Type} [Fintype n] [DecidableEq n] variable {G : Type u} [Group G] [TopologicalSpace G] variable {๐“ž : Type u} [CommRing ๐“ž] [IsLocalRing ๐“ž] noncomputable abbrev conjKer (R : ProartinianCat ๐“ž) : Subgroup (ConjAct (GL n R)) := ((Matrix.GeneralLinearGroup.map (n := n) (ProartinianCat.toResidueField R).hom.toRingHom).ker.comap (ConjAct.ofConjAct.toMonoidHom)) variable (n) in lemma mem_conjKer_iff {R : ProartinianCat ๐“ž} (ฮณ : ConjAct (GL n R)) : ฮณ โˆˆ conjKer (n := n) R โ†” Matrix.GeneralLinearGroup.map (ProartinianCat.toResidueField R).hom.toRingHom (ConjAct.ofConjAct ฮณ) = 1 := Iff.rfl variable (n G ๐“ž) in abbrev mapRepn {A B : ProartinianCat ๐“ž} (f : A โŸถ B) (ฯ : G โ†’โ‚œ* GL n A) : G โ†’โ‚œ* GL n B := (repnFunctor n G ๐“ž).map f ฯ omit [IsLocalRing ๐“ž] in @[simp] lemma mapRepn_apply {A B : ProartinianCat ๐“ž} (f : A โŸถ B) (ฯ : G โ†’โ‚œ* GL n A) (g : G) : mapRepn n G ๐“ž f ฯ g = Matrix.GeneralLinearGroup.map f.hom.toRingHom (ฯ g) := rfl omit [IsLocalRing ๐“ž] in lemma conjAct_smul_apply {R : ProartinianCat ๐“ž} (ฮณ : ConjAct (GL n R)) (ฯ : G โ†’โ‚œ* GL n R) (g : G) : (ฮณ โ€ข ฯ) g = ConjAct.ofConjAct ฮณ * ฯ g * (ConjAct.ofConjAct ฮณ)โปยน := rfl section TraceAlgebra open ProartinianCat variable (๐“ž) in def traceSet {A : ProartinianCat ๐“ž} (ฯ : G โ†’โ‚œ* GL n A) : Set A.carrier := Set.range fun g => Matrix.trace ((ฯ g : GL n A.carrier) : Matrix n n A.carrier) variable (๐“ž) in def traceSubalgebra {A : ProartinianCat ๐“ž} (ฯ : G โ†’โ‚œ* GL n A) : Subalgebra ๐“ž A.carrier := (Algebra.adjoin ๐“ž (traceSet ๐“ž ฯ)).topologicalClosure omit [IsLocalRing ๐“ž] in lemma isClosed_traceSubalgebra {A : ProartinianCat ๐“ž} (ฯ : G โ†’โ‚œ* GL n A) : IsClosed ((traceSubalgebra ๐“ž ฯ : Subalgebra ๐“ž A.carrier) : Set A.carrier) := Subalgebra.isClosed_topologicalClosure _ omit [IsLocalRing ๐“ž] in lemma trace_mem_traceSubalgebra {A : ProartinianCat ๐“ž} (ฯ : G โ†’โ‚œ* GL n A) (g : G) : Matrix.trace ((ฯ g : GL n A.carrier) : Matrix n n A.carrier) โˆˆ traceSubalgebra ๐“ž ฯ := (Algebra.adjoin ๐“ž (traceSet ๐“ž ฯ)).le_topologicalClosure (Algebra.subset_adjoin โŸจg, rflโŸฉ) omit [IsLocalRing ๐“ž] in lemma traceSubalgebra_le {A : ProartinianCat ๐“ž} (ฯ : G โ†’โ‚œ* GL n A) {T : Subalgebra ๐“ž A.carrier} (hT : IsClosed (T : Set A.carrier)) (h : โˆ€ g, Matrix.trace ((ฯ g : GL n A.carrier) : Matrix n n A.carrier) โˆˆ T) : traceSubalgebra ๐“ž ฯ โ‰ค T := Subalgebra.topologicalClosure_minimal (Algebra.adjoin_le (by rintro _ โŸจg, rflโŸฉ; exact h g)) hT end TraceAlgebra section TraceConj omit [IsLocalRing ๐“ž] in lemma trace_smul_eq {A : ProartinianCat ๐“ž} (ฮณ : ConjAct (GL n A.carrier)) (ฯ : G โ†’โ‚œ* GL n A) (g : G) : Matrix.trace (((ฮณ โ€ข ฯ) g : GL n A.carrier) : Matrix n n A.carrier) = Matrix.trace ((ฯ g : GL n A.carrier) : Matrix n n A.carrier) := by have h1 : ((ฮณ โ€ข ฯ) g : GL n A.carrier) = ConjAct.ofConjAct ฮณ * ฯ g * (ConjAct.ofConjAct ฮณ)โปยน := conjAct_smul_apply ฮณ ฯ g rw [h1] have h2 : ((ConjAct.ofConjAct ฮณ * ฯ g * (ConjAct.ofConjAct ฮณ)โปยน : GL n A.carrier) : Matrix n n A.carrier) = ((ConjAct.ofConjAct ฮณ : GL n A.carrier) : Matrix n n A.carrier) * ((ฯ g : GL n A.carrier) : Matrix n n A.carrier) * ((โ†‘(ConjAct.ofConjAct ฮณ)โปยน : GL n A.carrier) : Matrix n n A.carrier) := by rw [Units.val_mul, Units.val_mul] rw [h2] exact Matrix.trace_units_conj (ConjAct.ofConjAct ฮณ) _ omit [IsLocalRing ๐“ž] in lemma trace_mapRepn {A B : ProartinianCat ๐“ž} (f : A โŸถ B) (ฯ : G โ†’โ‚œ* GL n A) (g : G) : Matrix.trace ((mapRepn n G ๐“ž f ฯ g : GL n B.carrier) : Matrix n n B.carrier) = f.hom (Matrix.trace ((ฯ g : GL n A.carrier) : Matrix n n A.carrier)) := by have h1 : ((mapRepn n G ๐“ž f ฯ g : GL n B.carrier) : Matrix n n B.carrier) = ((ฯ g : GL n A.carrier) : Matrix n n A.carrier).map f.hom.toRingHom := by rw [mapRepn_apply] rfl rw [h1] exact (AddMonoidHom.map_trace f.hom.toRingHom _).symm end TraceConj section Universal open ProartinianCat def TraceAlgebra.Descends {A : ProartinianCat ๐“ž} (ฯ : G โ†’โ‚œ* GL n A) : Prop := โˆƒ ฮณ โˆˆ conjKer (n := n) A, โˆ€ (g : G) (i j : n), (((ฮณ โ€ข ฯ) g : GL n A.carrier) : Matrix n n A.carrier) i j โˆˆ traceSubalgebra ๐“ž ฯ end Universal end Deformation