@@ -36,18 +36,21 @@ universe v u
3636
3737namespace CoalgCat
3838
39- open CategoryTheory MonoidalCategory
39+ open CategoryTheory MonoidalCategory Comon_Class
4040
4141variable {R : Type u} [CommRing R]
4242
43- /-- An `R`-coalgebra is a comonoid object in the category of `R`-modules. -/
44- @[simps X counit comul] def toComonObj (X : CoalgCat R) : Comon_ (ModuleCat R) where
45- X := ModuleCat.of R X
43+ @[simps counit comul]
44+ noncomputable instance (X : CoalgCat R) : Comon_Class (ModuleCat.of R X) where
4645 counit := ModuleCat.ofHom Coalgebra.counit
4746 comul := ModuleCat.ofHom Coalgebra.comul
48- counit_comul := ModuleCat.hom_ext <| by simpa using Coalgebra.rTensor_counit_comp_comul
49- comul_counit := ModuleCat.hom_ext <| by simpa using Coalgebra.lTensor_counit_comp_comul
50- comul_assoc := ModuleCat.hom_ext <| by simp_rw [ModuleCat.of_coe]; exact Coalgebra.coassoc.symm
47+ counit_comul' := ModuleCat.hom_ext <| by simpa using Coalgebra.rTensor_counit_comp_comul
48+ comul_counit' := ModuleCat.hom_ext <| by simpa using Coalgebra.lTensor_counit_comp_comul
49+ comul_assoc' := ModuleCat.hom_ext <| by simp_rw [ModuleCat.of_coe]; exact Coalgebra.coassoc.symm
50+
51+ /-- An `R`-coalgebra is a comonoid object in the category of `R`-modules. -/
52+ @[simps X]
53+ noncomputable def toComonObj (X : CoalgCat R) : Comon_ (ModuleCat R) := ⟨ModuleCat.of R X⟩
5154
5255variable (R) in
5356/-- The natural functor from `R`-coalgebras to comonoid objects in the category of `R`-modules. -/
@@ -62,26 +65,26 @@ def toComon : CoalgCat R ⥤ Comon_ (ModuleCat R) where
6265/-- A comonoid object in the category of `R`-modules has a natural comultiplication
6366and counit. -/
6467@[simps]
65- noncomputable instance ofComonObjCoalgebraStruct (X : Comon_ ( ModuleCat R)) :
66- CoalgebraStruct R X.X where
67- comul := X.comul .hom
68- counit := X.counit .hom
68+ noncomputable instance ofComonObjCoalgebraStruct (X : ModuleCat R) [Comon_Class X] :
69+ CoalgebraStruct R X where
70+ comul := Δ[X] .hom
71+ counit := ε[X] .hom
6972
7073/-- A comonoid object in the category of `R`-modules has a natural `R`-coalgebra
7174structure. -/
72- def ofComonObj (X : Comon_ ( ModuleCat R)) : CoalgCat R :=
73- { ModuleCat.of R X.X with
75+ noncomputable def ofComonObj (X : ModuleCat R) [Comon_Class X] : CoalgCat R :=
76+ { ModuleCat.of R X with
7477 instCoalgebra :=
7578 { ofComonObjCoalgebraStruct X with
76- coassoc := ModuleCat.hom_ext_iff.mp X. comul_assoc.symm
77- rTensor_counit_comp_comul := ModuleCat.hom_ext_iff.mp X. counit_comul
78- lTensor_counit_comp_comul := ModuleCat.hom_ext_iff.mp X. comul_counit } }
79+ coassoc := ModuleCat.hom_ext_iff.mp ( comul_assoc X) .symm
80+ rTensor_counit_comp_comul := ModuleCat.hom_ext_iff.mp ( counit_comul X)
81+ lTensor_counit_comp_comul := ModuleCat.hom_ext_iff.mp ( comul_counit X) } }
7982
8083variable (R)
8184
8285/-- The natural functor from comonoid objects in the category of `R`-modules to `R`-coalgebras. -/
83- def ofComon : Comon_ (ModuleCat R) ⥤ CoalgCat R where
84- obj X := ofComonObj X
86+ noncomputable def ofComon : Comon_ (ModuleCat R) ⥤ CoalgCat R where
87+ obj X := ofComonObj X.X
8588 map f :=
8689 { toCoalgHom' :=
8790 { f.hom.hom with
@@ -122,8 +125,10 @@ theorem tensorObj_comul (K L : CoalgCat R) :
122125 ∘ₗ TensorProduct.map Coalgebra.comul Coalgebra.comul := by
123126 rw [ofComonObjCoalgebraStruct_comul]
124127 dsimp only [Equivalence.symm_inverse, comonEquivalence_functor, toComon_obj]
125- simp only [Comon_.monoidal_tensorObj_comul, toComonObj_X, ModuleCat.of_coe, toComonObj_comul,
126- tensorμ_eq_tensorTensorTensorComm]
128+ simp only [Comon_.monoidal_tensorObj_comon_comul, Equivalence.symm_inverse,
129+ comonEquivalence_functor, toComon_obj, toComonObj_X, ModuleCat.of_coe, comul_def,
130+ tensorμ_eq_tensorTensorTensorComm, ModuleCat.hom_comp, ModuleCat.hom_ofHom,
131+ LinearEquiv.comp_toLinearMap_eq_iff]
127132 rfl
128133
129134theorem tensorHom_toLinearMap (f : M →ₗc[R] N) (g : P →ₗc[R] Q) :
@@ -158,9 +163,7 @@ theorem comul_tensorObj_tensorObj_right :
158163 (CoalgCat.of R N ⊗ CoalgCat.of R P) : CoalgCat R))
159164 = Coalgebra.comul (A := M ⊗[R] N ⊗[R] P) := by
160165 rw [ofComonObjCoalgebraStruct_comul]
161- dsimp
162- simp only [Comon_.monoidal_tensorObj_comul, toComonObj_comul]
163- rw [ofComonObjCoalgebraStruct_comul]
166+ simp only [Comon_.monoidal_tensorObj_comon_comul, toComonObj]
164167 simp [tensorμ_eq_tensorTensorTensorComm, TensorProduct.comul_def,
165168 AlgebraTensorModule.tensorTensorTensorComm_eq]
166169 rfl
@@ -171,8 +174,7 @@ theorem comul_tensorObj_tensorObj_left :
171174 = Coalgebra.comul (A := (M ⊗[R] N) ⊗[R] P) := by
172175 rw [ofComonObjCoalgebraStruct_comul]
173176 dsimp
174- simp only [Comon_.monoidal_tensorObj_comul, toComonObj_comul]
175- rw [ofComonObjCoalgebraStruct_comul]
177+ simp only [Comon_.monoidal_tensorObj_comon_comul, toComonObj]
176178 simp [tensorμ_eq_tensorTensorTensorComm, TensorProduct.comul_def,
177179 AlgebraTensorModule.tensorTensorTensorComm_eq]
178180 rfl
0 commit comments