Skip to content

Commit 20b1e82

Browse files
committed
feat(CategoryTheory/Monoidal/Bimon): definition of bimonoid object in a braided category (#12970)
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
1 parent daa801e commit 20b1e82

File tree

6 files changed

+152
-14
lines changed

6 files changed

+152
-14
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,7 @@ import Mathlib.CategoryTheory.Monad.Monadicity
14751475
import Mathlib.CategoryTheory.Monad.Products
14761476
import Mathlib.CategoryTheory.Monad.Types
14771477
import Mathlib.CategoryTheory.Monoidal.Bimod
1478+
import Mathlib.CategoryTheory.Monoidal.Bimon_
14781479
import Mathlib.CategoryTheory.Monoidal.Braided.Basic
14791480
import Mathlib.CategoryTheory.Monoidal.Braided.Opposite
14801481
import Mathlib.CategoryTheory.Monoidal.Cartesian.Comon_
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
/-
2+
Copyright (c) 2024 Lean FRO LLC. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Kim Morrison
5+
-/
6+
import Mathlib.CategoryTheory.Monoidal.Comon_
7+
8+
/-!
9+
# The category of bimonoids in a braided monoidal category.
10+
11+
We define bimonoids in a braided monoidal category `C`
12+
as comonoid objects in the category of monoid objects in `C`.
13+
14+
We verify that this is equivalent to the monoid objects in the category of comonoid objects.
15+
16+
## TODO
17+
* Define Hopf monoids, which in a cartesian monoidal category are exactly group objects,
18+
and use this to define group schemes.
19+
* Construct the category of modules, and show that it is monoidal with a monoidal forgetful functor
20+
to `C`.
21+
* Some form of Tannaka reconstruction:
22+
given a monoidal functor `F : C ⥤ D` into a braided category `D`,
23+
the internal endomorphisms of `F` form a bimonoid in presheaves on `D`,
24+
in good circumstances this is representable by a bimonoid in `D`, and then
25+
`C` is monoidally equivalent to the modules over that bimonoid.
26+
-/
27+
28+
noncomputable section
29+
30+
universe v₁ v₂ u₁ u₂ u
31+
32+
open CategoryTheory MonoidalCategory
33+
34+
variable (C : Type u₁) [Category.{v₁} C] [MonoidalCategory.{v₁} C] [BraidedCategory C]
35+
36+
/--
37+
A bimonoid object in a braided category `C` is a comonoid object in the (monoidal)
38+
category of monoid objects in `C`.
39+
-/
40+
def Bimon_ := Comon_ (Mon_ C)
41+
42+
namespace Bimon_
43+
44+
instance : Category (Bimon_ C) := inferInstanceAs (Category (Comon_ (Mon_ C)))
45+
46+
@[ext] lemma ext {X Y : Bimon_ C} {f g : X ⟶ Y} (w : f.hom.hom = g.hom.hom) : f = g :=
47+
Comon_.Hom.ext _ _ (Mon_.Hom.ext _ _ w)
48+
49+
@[simp] theorem id_hom' (M : Bimon_ C) : Comon_.Hom.hom (𝟙 M) = 𝟙 M.X := rfl
50+
51+
@[simp]
52+
theorem comp_hom' {M N K : Bimon_ C} (f : M ⟶ N) (g : N ⟶ K) : (f ≫ g).hom = f.hom ≫ g.hom :=
53+
rfl
54+
55+
/-- The forgetful functor from bimonoid objects to monoid objects. -/
56+
abbrev toMon_ : Bimon_ C ⥤ Mon_ C := Comon_.forget (Mon_ C)
57+
58+
/-- The forgetful functor from bimonoid objects to the underlying category. -/
59+
def forget : Bimon_ C ⥤ C := toMon_ C ⋙ Mon_.forget C
60+
61+
@[simp]
62+
theorem toMon_forget : toMon_ C ⋙ Mon_.forget C = forget C := rfl
63+
64+
/-- The forgetful functor from bimonoid objects to comonoid objects. -/
65+
@[simps!]
66+
def toComon_ : Bimon_ C ⥤ Comon_ C := (Mon_.forgetMonoidal C).toOplaxMonoidalFunctor.mapComon
67+
68+
@[simp]
69+
theorem toComon_forget : toComon_ C ⋙ Comon_.forget C = forget C := rfl
70+
71+
/-- The object level part of the forward direction of `Comon_ (Mon_ C) ≌ Mon_ (Comon_ C)` -/
72+
def toMon_Comon_obj (M : Bimon_ C) : Mon_ (Comon_ C) where
73+
X := (toComon_ C).obj M
74+
one := { hom := M.X.one }
75+
mul :=
76+
{ hom := M.X.mul,
77+
hom_comul := by dsimp; simp [tensor_μ] }
78+
79+
attribute [simps] toMon_Comon_obj -- We add this after the fact to avoid a timeout.
80+
81+
/-- The forward direction of `Comon_ (Mon_ C) ≌ Mon_ (Comon_ C)` -/
82+
@[simps]
83+
def toMon_Comon_ : Bimon_ C ⥤ Mon_ (Comon_ C) where
84+
obj := toMon_Comon_obj C
85+
map f :=
86+
{ hom := (toComon_ C).map f }
87+
88+
/-- The object level part of the backward direction of `Comon_ (Mon_ C) ≌ Mon_ (Comon_ C)` -/
89+
@[simps]
90+
def ofMon_Comon_obj (M : Mon_ (Comon_ C)) : Bimon_ C where
91+
X := (Comon_.forgetMonoidal C).toLaxMonoidalFunctor.mapMon.obj M
92+
counit := { hom := M.X.counit }
93+
comul :=
94+
{ hom := M.X.comul,
95+
mul_hom := by dsimp; simp [tensor_μ] }
96+
97+
/-- The backward direction of `Comon_ (Mon_ C) ≌ Mon_ (Comon_ C)` -/
98+
@[simps]
99+
def ofMon_Comon_ : Mon_ (Comon_ C) ⥤ Bimon_ C where
100+
obj := ofMon_Comon_obj C
101+
map f :=
102+
{ hom := (Comon_.forgetMonoidal C).toLaxMonoidalFunctor.mapMon.map f }
103+
104+
/-- The equivalence `Comon_ (Mon_ C) ≌ Mon_ (Comon_ C)` -/
105+
def equivMon_Comon_ : Bimon_ C ≌ Mon_ (Comon_ C) where
106+
functor := toMon_Comon_ C
107+
inverse := ofMon_Comon_ C
108+
unitIso := NatIso.ofComponents (fun _ => Comon_.mkIso (Mon_.mkIso (Iso.refl _)))
109+
counitIso := NatIso.ofComponents (fun _ => Mon_.mkIso (Comon_.mkIso (Iso.refl _)))
110+
111+
end Bimon_

Mathlib/CategoryTheory/Monoidal/Comon_.lean

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ structure Comon_ where
4646
comul_counit : comul ≫ (X ◁ counit) = (ρ_ X).inv := by aesop_cat
4747
comul_assoc : comul ≫ (X ◁ comul) ≫ (α_ X X X).inv = comul ≫ (comul ▷ X) := by aesop_cat
4848

49-
attribute [reassoc] Comon_.counit_comul Comon_.comul_counit
49+
attribute [reassoc (attr := simp)] Comon_.counit_comul Comon_.comul_counit
5050

5151
attribute [reassoc (attr := simp)] Comon_.comul_assoc
5252

@@ -138,12 +138,12 @@ instance : (forget C).ReflectsIsomorphisms where
138138
reflects f e :=
139139
⟨⟨{ hom := inv f.hom }, by aesop_cat⟩⟩
140140

141-
/-- Construct an isomorphism of monoids by giving an isomorphism between the underlying objects
142-
and checking compatibility with unit and multiplication only in the forward direction.
141+
/-- Construct an isomorphism of comonoids by giving an isomorphism between the underlying objects
142+
and checking compatibility with counit and comultiplication only in the forward direction.
143143
-/
144144
@[simps]
145-
def mkIso {M N : Comon_ C} (f : M.X ≅ N.X) (f_counit : f.hom ≫ N.counit = M.counit)
146-
(f_comul : f.hom ≫ N.comul = M.comul ≫ (f.hom ⊗ f.hom)) : M ≅ N where
145+
def mkIso {M N : Comon_ C} (f : M.X ≅ N.X) (f_counit : f.hom ≫ N.counit = M.counit := by aesop_cat)
146+
(f_comul : f.hom ≫ N.comul = M.comul ≫ (f.hom ⊗ f.hom) := by aesop_cat) : M ≅ N where
147147
hom :=
148148
{ hom := f.hom
149149
hom_counit := f_counit
@@ -275,7 +275,16 @@ theorem tensorObj_comul (A B : Comon_ C) :
275275
apply Quiver.Hom.unop_inj
276276
dsimp [op_tensorObj, op_associator]
277277
rw [Category.assoc, Category.assoc, Category.assoc]
278-
rfl
278+
279+
/-- The forgetful functor from `Comon_ C` to `C` is monoidal when `C` is braided monoidal. -/
280+
def forgetMonoidal : MonoidalFunctor (Comon_ C) C :=
281+
{ forget C with
282+
ε := 𝟙 _
283+
μ := fun X Y => 𝟙 _ }
284+
285+
@[simp] theorem forgetMonoidal_toFunctor : (forgetMonoidal C).toFunctor = forget C := rfl
286+
@[simp] theorem forgetMonoidal_ε : (forgetMonoidal C).ε = 𝟙 (𝟙_ C) := rfl
287+
@[simp] theorem forgetMonoidal_μ (X Y : Comon_ C) : (forgetMonoidal C).μ X Y = 𝟙 (X.X ⊗ Y.X) := rfl
279288

280289
end Comon_
281290

@@ -318,5 +327,4 @@ def mapComon (F : OplaxMonoidalFunctor C D) : Comon_ C ⥤ Comon_ D where
318327
-- TODO We haven't yet set up the category structure on `OplaxMonoidalFunctor C D`
319328
-- and so can't state `mapComonFunctor : OplaxMonoidalFunctor C D ⥤ Comon_ C ⥤ Comon_ D`.
320329

321-
322330
end CategoryTheory.OplaxMonoidalFunctor

Mathlib/CategoryTheory/Monoidal/Functor.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ noncomputable def MonoidalFunctor.μIso (F : MonoidalFunctor.{v₁, v₂} C D) (
286286
#align category_theory.monoidal_functor.μ_iso CategoryTheory.MonoidalFunctor.μIso
287287

288288
/-- The underlying oplax monoidal functor of a (strong) monoidal functor. -/
289+
@[simps]
289290
noncomputable def MonoidalFunctor.toOplaxMonoidalFunctor (F : MonoidalFunctor C D) :
290291
OplaxMonoidalFunctor C D :=
291292
{ F with

Mathlib/CategoryTheory/Monoidal/Mon_.lean

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ instance : (forget C).ReflectsIsomorphisms where
164164
and checking compatibility with unit and multiplication only in the forward direction.
165165
-/
166166
@[simps]
167-
def isoOfIso {M N : Mon_ C} (f : M.X ≅ N.X) (one_f : M.one ≫ f.hom = N.one)
168-
(mul_f : M.mul ≫ f.hom = (f.hom ⊗ f.hom) ≫ N.mul) : M ≅ N where
167+
def mkIso {M N : Mon_ C} (f : M.X ≅ N.X) (one_f : M.one ≫ f.hom = N.one := by aesop_cat)
168+
(mul_f : M.mul ≫ f.hom = (f.hom ⊗ f.hom) ≫ N.mul := by aesop_cat) : M ≅ N where
169169
hom :=
170170
{ hom := f.hom
171171
one_hom := one_f
@@ -177,7 +177,7 @@ def isoOfIso {M N : Mon_ C} (f : M.X ≅ N.X) (one_f : M.one ≫ f.hom = N.one)
177177
rw [← cancel_mono f.hom]
178178
slice_rhs 2 3 => rw [mul_f]
179179
simp }
180-
#align Mon_.iso_of_iso Mon_.isoOfIso
180+
#align Mon_.iso_of_iso Mon_.mkIso
181181

182182
instance uniqueHomFromTrivial (A : Mon_ C) : Unique (trivial C ⟶ A) where
183183
default :=
@@ -493,13 +493,26 @@ instance monMonoidalStruct : MonoidalCategoryStruct (Mon_ C) :=
493493
whiskerRight := fun f Y => tensorHom f (𝟙 Y)
494494
whiskerLeft := fun X _ _ g => tensorHom (𝟙 X) g
495495
tensorUnit := trivial C
496-
associator := fun M N P ↦ isoOfIso (α_ M.X N.X P.X) one_associator mul_associator
497-
leftUnitor := fun M ↦ isoOfIso (λ_ M.X) one_leftUnitor mul_leftUnitor
498-
rightUnitor := fun M ↦ isoOfIso (ρ_ M.X) one_rightUnitor mul_rightUnitor }
496+
associator := fun M N P ↦ mkIso (α_ M.X N.X P.X) one_associator mul_associator
497+
leftUnitor := fun M ↦ mkIso (λ_ M.X) one_leftUnitor mul_leftUnitor
498+
rightUnitor := fun M ↦ mkIso (ρ_ M.X) one_rightUnitor mul_rightUnitor }
499499

500500
@[simp]
501501
theorem tensorUnit_X : (𝟙_ (Mon_ C)).X = 𝟙_ C := rfl
502502

503+
@[simp]
504+
theorem tensorUnit_one : (𝟙_ (Mon_ C)).one = 𝟙 (𝟙_ C) := rfl
505+
506+
@[simp]
507+
theorem tensorUnit_mul : (𝟙_ (Mon_ C)).mul = (λ_ (𝟙_ C)).hom := rfl
508+
509+
@[simp]
510+
theorem tensorObj_one (X Y : Mon_ C) : (X ⊗ Y).one = (λ_ (𝟙_ C)).inv ≫ (X.one ⊗ Y.one) := rfl
511+
512+
@[simp]
513+
theorem tensorObj_mul (X Y : Mon_ C) :
514+
(X ⊗ Y).mul = tensor_μ C (X.X, Y.X) (X.X, Y.X) ≫ (X.mul ⊗ Y.mul) := rfl
515+
503516
@[simp]
504517
theorem whiskerLeft_hom {X Y : Mon_ C} (f : X ⟶ Y) (Z : Mon_ C) :
505518
(f ▷ Z).hom = f.hom ▷ Z.X := by
@@ -598,7 +611,7 @@ theorem mul_braiding {X Y : Mon_ C} :
598611
simp only [Category.assoc]
599612

600613
instance : SymmetricCategory (Mon_ C) where
601-
braiding := fun X Y => isoOfIso (β_ X.X Y.X) one_braiding mul_braiding
614+
braiding := fun X Y => mkIso (β_ X.X Y.X) one_braiding mul_braiding
602615
symmetry := fun X Y => by
603616
ext
604617
simp [← SymmetricCategory.braiding_swap_eq_inv_braiding]

Mathlib/CategoryTheory/Opposites.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ theorem Quiver.Hom.unop_op {X Y : C} (f : X ⟶ Y) : f.op.unop = f :=
4949
rfl
5050
#align quiver.hom.unop_op Quiver.Hom.unop_op
5151

52+
@[simp]
53+
theorem Quiver.Hom.unop_op' {X Y : Cᵒᵖ} {x} :
54+
@Quiver.Hom.unop C _ X Y no_index (Opposite.op (unop := x)) = x := rfl
55+
5256
@[simp]
5357
theorem Quiver.Hom.op_unop {X Y : Cᵒᵖ} (f : X ⟶ Y) : f.unop.op = f :=
5458
rfl

0 commit comments

Comments
 (0)