Skip to content

Commit 8352e7b

Browse files
committed
feat: yoneda embedding of CommGrp C into presheaves of groups (#31390)
From Toric
1 parent a1c73e9 commit 8352e7b

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed

Mathlib/CategoryTheory/Monoidal/Cartesian/CommGrp_.lean

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Authors: Yaël Dillies
55
-/
66
import Mathlib.CategoryTheory.Monoidal.Cartesian.CommMon_
77
import Mathlib.CategoryTheory.Monoidal.Cartesian.Grp_
8+
import Mathlib.CategoryTheory.Monoidal.CommGrp_
89

910
/-!
1011
# Yoneda embedding of `CommGrp C`
@@ -25,8 +26,6 @@ class abbrev CommGrpObj := GrpObj X, IsCommMonObj X
2526

2627
@[deprecated (since := "2025-09-13")] alias CommGrp_Class := CommGrpObj
2728

28-
section CommGrp
29-
3029
variable (X) in
3130
/-- If `X` represents a presheaf of commutative groups, then `X` is a commutative group object. -/
3231
def CommGrpObj.ofRepresentableBy (F : Cᵒᵖ ⥤ CommGrpCat.{w})
@@ -37,5 +36,27 @@ def CommGrpObj.ofRepresentableBy (F : Cᵒᵖ ⥤ CommGrpCat.{w})
3736
@[deprecated (since := "2025-09-13")]
3837
alias CommGrp_Class.ofRepresentableBy := CommGrpObj.ofRepresentableBy
3938

40-
end CommGrp
39+
/-- The yoneda embedding of `CommGrp C` into presheaves of groups. -/
40+
@[simps]
41+
def yonedaCommGrpGrpObj (G : CommGrp C) : (Grp C)ᵒᵖ ⥤ CommGrpCat where
42+
obj H := .of (unop H ⟶ G.toGrp)
43+
map {H I} f := CommGrpCat.ofHom {
44+
toFun := (f.unop ≫ ·)
45+
map_one' := by ext; simp [Mon.Hom.hom_one]
46+
map_mul' g h := by ext; simpa using ((yonedaGrpObj G.X).map f.unop.1.op).hom.map_mul g.hom h.hom
47+
}
48+
49+
/-- The yoneda embedding of `CommGrp C` into presheaves of groups. -/
50+
@[simps]
51+
def yonedaCommGrpGrp : CommGrp C ⥤ (Grp C)ᵒᵖ ⥤ CommGrpCat where
52+
obj := yonedaCommGrpGrpObj
53+
map {X₁ X₂} ψ := {
54+
app Y := CommGrpCat.ofHom {
55+
toFun := (· ≫ ψ)
56+
map_one' := by ext; simp
57+
map_mul' f g := by
58+
ext; simpa using ((yonedaGrp.map ψ).app (op (unop Y).X)).hom.map_mul f.hom g.hom
59+
}
60+
}
61+
4162
end CategoryTheory

Mathlib/CategoryTheory/Monoidal/CommGrp_.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ namespace CommGrp
3434
variable {C}
3535

3636
/-- A commutative group object is a group object. -/
37-
@[simps X]
38-
def toGrp (A : CommGrp C) : Grp C := ⟨A.X⟩
37+
@[simps -isSimp X]
38+
abbrev toGrp (A : CommGrp C) : Grp C := ⟨A.X⟩
3939

4040
@[deprecated (since := "2025-10-13")] alias toGrp_ := toGrp
4141

0 commit comments

Comments
 (0)