Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 33085c9

Browse files
committed
chore(category_theory/monoidal/Mod): rename to Mod_ to avoid name clash in mathlib4 (#18911)
This matches the existing `Mon_`. Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
1 parent 362c226 commit 33085c9

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

src/category_theory/monoidal/Mod.lean renamed to src/category_theory/monoidal/Mod_.lean

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,26 @@ variables (C : Type u₁) [category.{v₁} C] [monoidal_category.{v₁} C]
1919
variables {C}
2020

2121
/-- A module object for a monoid object, all internal to some monoidal category. -/
22-
structure Mod (A : Mon_ C) :=
22+
structure Mod_ (A : Mon_ C) :=
2323
(X : C)
2424
(act : A.X ⊗ X ⟶ X)
2525
(one_act' : (A.one ⊗ 𝟙 X) ≫ act = (λ_ X).hom . obviously)
2626
(assoc' : (A.mul ⊗ 𝟙 X) ≫ act = (α_ A.X A.X X).hom ≫ (𝟙 A.X ⊗ act) ≫ act . obviously)
2727

28-
restate_axiom Mod.one_act'
29-
restate_axiom Mod.assoc'
30-
attribute [simp, reassoc] Mod.one_act Mod.assoc
28+
restate_axiom Mod_.one_act'
29+
restate_axiom Mod_.assoc'
30+
attribute [simp, reassoc] Mod_.one_act Mod_.assoc
3131

32-
namespace Mod
32+
namespace Mod_
3333

34-
variables {A : Mon_ C} (M : Mod A)
34+
variables {A : Mon_ C} (M : Mod_ A)
3535

3636
lemma assoc_flip : (𝟙 A.X ⊗ M.act) ≫ M.act = (α_ A.X A.X M.X).inv ≫ (A.mul ⊗ 𝟙 M.X) ≫ M.act :=
3737
by simp
3838

3939
/-- A morphism of module objects. -/
4040
@[ext]
41-
structure hom (M N : Mod A) :=
41+
structure hom (M N : Mod_ A) :=
4242
(hom : M.X ⟶ N.X)
4343
(act_hom' : M.act ≫ hom = (𝟙 A.X ⊗ hom) ≫ N.act . obviously)
4444

@@ -47,37 +47,37 @@ attribute [simp, reassoc] hom.act_hom
4747

4848
/-- The identity morphism on a module object. -/
4949
@[simps]
50-
def id (M : Mod A) : hom M M :=
50+
def id (M : Mod_ A) : hom M M :=
5151
{ hom := 𝟙 M.X, }
5252

53-
instance hom_inhabited (M : Mod A) : inhabited (hom M M) := ⟨id M⟩
53+
instance hom_inhabited (M : Mod_ A) : inhabited (hom M M) := ⟨id M⟩
5454

5555
/-- Composition of module object morphisms. -/
5656
@[simps]
57-
def comp {M N O : Mod A} (f : hom M N) (g : hom N O) : hom M O :=
57+
def comp {M N O : Mod_ A} (f : hom M N) (g : hom N O) : hom M O :=
5858
{ hom := f.hom ≫ g.hom, }
5959

60-
instance : category (Mod A) :=
60+
instance : category (Mod_ A) :=
6161
{ hom := λ M N, hom M N,
6262
id := id,
6363
comp := λ M N O f g, comp f g, }
6464

65-
@[simp] lemma id_hom' (M : Mod A) : (𝟙 M : hom M M).hom = 𝟙 M.X := rfl
66-
@[simp] lemma comp_hom' {M N K : Mod A} (f : M ⟶ N) (g : N ⟶ K) :
65+
@[simp] lemma id_hom' (M : Mod_ A) : (𝟙 M : hom M M).hom = 𝟙 M.X := rfl
66+
@[simp] lemma comp_hom' {M N K : Mod_ A} (f : M ⟶ N) (g : N ⟶ K) :
6767
(f ≫ g : hom M K).hom = f.hom ≫ g.hom := rfl
6868

6969
variables (A)
7070

7171
/-- A monoid object as a module over itself. -/
7272
@[simps]
73-
def regular : Mod A :=
73+
def regular : Mod_ A :=
7474
{ X := A.X,
7575
act := A.mul, }
7676

77-
instance : inhabited (Mod A) := ⟨regular A⟩
77+
instance : inhabited (Mod_ A) := ⟨regular A⟩
7878

7979
/-- The forgetful functor from module objects to the ambient category. -/
80-
def forget : Mod A ⥤ C :=
80+
def forget : Mod_ A ⥤ C :=
8181
{ obj := λ A, A.X,
8282
map := λ A B f, f.hom, }
8383

@@ -88,7 +88,7 @@ A morphism of monoid objects induces a "restriction" or "comap" functor
8888
between the categories of module objects.
8989
-/
9090
@[simps]
91-
def comap {A B : Mon_ C} (f : A ⟶ B) : Mod B ⥤ Mod A :=
91+
def comap {A B : Mon_ C} (f : A ⟶ B) : Mod_ B ⥤ Mod_ A :=
9292
{ obj := λ M,
9393
{ X := M.X,
9494
act := (f.hom ⊗ 𝟙 M.X) ≫ M.act,
@@ -102,7 +102,7 @@ def comap {A B : Mon_ C} (f : A ⟶ B) : Mod B ⥤ Mod A :=
102102
-- oh, for homotopy.io in a widget!
103103
slice_rhs 2 3 { rw [id_tensor_comp_tensor_id, ←tensor_id_comp_id_tensor], },
104104
rw id_tensor_comp,
105-
slice_rhs 4 5 { rw Mod.assoc_flip, },
105+
slice_rhs 4 5 { rw Mod_.assoc_flip, },
106106
slice_rhs 3 4 { rw associator_inv_naturality, },
107107
slice_rhs 2 3 { rw [←tensor_id, associator_inv_naturality], },
108108
slice_rhs 1 3 { rw [iso.hom_inv_id_assoc], },
@@ -123,4 +123,4 @@ def comap {A B : Mon_ C} (f : A ⟶ B) : Mod B ⥤ Mod A :=
123123
-- Lots more could be said about `comap`, e.g. how it interacts with
124124
-- identities, compositions, and equalities of monoid object morphisms.
125125

126-
end Mod
126+
end Mod_

0 commit comments

Comments
 (0)