# mathlibdocumentation

algebra.category.Mon.filtered_colimits

# The forgetful functor from (commutative) (additive) monoids preserves filtered colimits. #

Forgetful functors from algebraic categories usually don't preserve colimits. However, they tend to preserve filtered colimits.

In this file, we start with a small filtered category J and a functor F : J ⥤ Mon. We then construct a monoid structure on the colimit of F ⋙ forget Mon (in Type), thereby showing that the forgetful functor forget Mon preserves filtered colimits. Similarly for AddMon, CommMon and AddCommMon.

@[reducible]
Type (max v u)

The colimit of F ⋙ forget AddMon in the category of types. In the following, we will construct an additive monoid structure on M.

@[reducible]
def Mon.filtered_colimits.M {J : Type v} (F : J Mon) :
Type (max v u)

The colimit of F ⋙ forget Mon in the category of types. In the following, we will construct a monoid structure on M.

@[reducible]
(Σ (j : J), (F.obj j))

The canonical projection into the colimit, as a quotient type.

@[reducible]
def Mon.filtered_colimits.M.mk {J : Type v} (F : J Mon) :
(Σ (j : J), (F.obj j))

The canonical projection into the colimit, as a quotient type.

theorem AddMon.filtered_colimits.M.mk_eq {J : Type v} (F : J AddMon) (x y : Σ (j : J), (F.obj j)) (h : ∃ (k : J) (f : x.fst k) (g : y.fst k), (F.map f) x.snd = (F.map g) y.snd) :
theorem Mon.filtered_colimits.M.mk_eq {J : Type v} (F : J Mon) (x y : Σ (j : J), (F.obj j)) (h : ∃ (k : J) (f : x.fst k) (g : y.fst k), (F.map f) x.snd = (F.map g) y.snd) :
@[protected, instance]
noncomputable def Mon.filtered_colimits.colimit_has_one {J : Type v} (F : J Mon)  :

As J is nonempty, we can pick an arbitrary object j₀ : J. We use this object to define the "one" in the colimit as the equivalence class of ⟨j₀, 1 : F.obj j₀⟩.

Equations
@[protected, instance]
noncomputable def AddMon.filtered_colimits.colimit_has_zero {J : Type v} (F : J AddMon)  :

As J is nonempty, we can pick an arbitrary object j₀ : J. We use this object to define the "zero" in the colimit as the equivalence class of ⟨j₀, 0 : F.obj j₀⟩.

Equations
theorem AddMon.filtered_colimits.colimit_zero_eq {J : Type v} (F : J AddMon) (j : J) :
0 =

The definition of the "zero" in the colimit is independent of the chosen object of J. In particular, this lemma allows us to "unfold" the definition of colimit_zero at a custom chosen object j.

theorem Mon.filtered_colimits.colimit_one_eq {J : Type v} (F : J Mon) (j : J) :
1 = j, 1⟩

The definition of the "one" in the colimit is independent of the chosen object of J. In particular, this lemma allows us to "unfold" the definition of colimit_one at a custom chosen object j.

noncomputable def AddMon.filtered_colimits.colimit_add_aux {J : Type v} (F : J AddMon) (x y : Σ (j : J), (F.obj j)) :

The "unlifted" version of addition in the colimit. To add two dependent pairs ⟨j₁, x⟩ and ⟨j₂, y⟩, we pass to a common successor of j₁ and j₂ (given by is_filtered.max) and add them there.

Equations
noncomputable def Mon.filtered_colimits.colimit_mul_aux {J : Type v} (F : J Mon) (x y : Σ (j : J), (F.obj j)) :

The "unlifted" version of multiplication in the colimit. To multiply two dependent pairs ⟨j₁, x⟩ and ⟨j₂, y⟩, we pass to a common successor of j₁ and j₂ (given by is_filtered.max) and multiply them there.

Equations
theorem AddMon.filtered_colimits.colimit_add_aux_eq_of_rel_left {J : Type v} (F : J AddMon) {x x' y : Σ (j : J), (F.obj j)}  :

Addition in the colimit is well-defined in the left argument.

theorem Mon.filtered_colimits.colimit_mul_aux_eq_of_rel_left {J : Type v} (F : J Mon) {x x' y : Σ (j : J), (F.obj j)} (hxx' : x') :

Multiplication in the colimit is well-defined in the left argument.

theorem Mon.filtered_colimits.colimit_mul_aux_eq_of_rel_right {J : Type v} (F : J Mon) {x y y' : Σ (j : J), (F.obj j)} (hyy' : y') :

Multiplication in the colimit is well-defined in the right argument.

theorem AddMon.filtered_colimits.colimit_add_aux_eq_of_rel_right {J : Type v} (F : J AddMon) {x y y' : Σ (j : J), (F.obj j)}  :

Addition in the colimit is well-defined in the right argument.

@[protected, instance]

Equations
• = {add := λ (x y : , y}
@[protected, instance]
noncomputable def Mon.filtered_colimits.colimit_has_mul {J : Type v} (F : J Mon)  :

Equations
• = {mul := λ (x y : , y}
theorem AddMon.filtered_colimits.colimit_add_mk_eq {J : Type v} (F : J AddMon) (x y : Σ (j : J), (F.obj j)) (k : J) (f : x.fst k) (g : y.fst k) :
= k, (F.map f) x.snd + (F.map g) y.snd

Addition in the colimit is independent of the chosen "maximum" in the filtered category. In particular, this lemma allows us to "unfold" the definition of the addition of x and y, using a custom object k and morphisms f : x.1 ⟶ k and g : y.1 ⟶ k.

theorem Mon.filtered_colimits.colimit_mul_mk_eq {J : Type v} (F : J Mon) (x y : Σ (j : J), (F.obj j)) (k : J) (f : x.fst k) (g : y.fst k) :
= k, (F.map f) x.snd * (F.map g) y.snd

Multiplication in the colimit is independent of the chosen "maximum" in the filtered category. In particular, this lemma allows us to "unfold" the definition of the multiplication of x and y, using a custom object k and morphisms f : x.1 ⟶ k and g : y.1 ⟶ k.

@[protected, instance]
noncomputable def Mon.filtered_colimits.colimit_monoid {J : Type v} (F : J Mon)  :
Equations
@[protected, instance]
Equations
noncomputable def Mon.filtered_colimits.colimit {J : Type v} (F : J Mon)  :

The bundled monoid giving the filtered colimit of a diagram.

Equations
Instances for Mon.filtered_colimits.colimit
noncomputable def AddMon.filtered_colimits.colimit {J : Type v} (F : J AddMon)  :

The bundled additive monoid giving the filtered colimit of a diagram.

Equations
def AddMon.filtered_colimits.cocone_morphism {J : Type v} (F : J AddMon) (j : J) :

The additive monoid homomorphism from a given additive monoid in the diagram to the colimit additive monoid.

Equations
def Mon.filtered_colimits.cocone_morphism {J : Type v} (F : J Mon) (j : J) :

The monoid homomorphism from a given monoid in the diagram to the colimit monoid.

Equations
@[simp]
theorem Mon.filtered_colimits.cocone_naturality {J : Type v} (F : J Mon) {j j' : J} (f : j j') :
@[simp]
theorem AddMon.filtered_colimits.cocone_naturality {J : Type v} (F : J AddMon) {j j' : J} (f : j j') :
noncomputable def Mon.filtered_colimits.colimit_cocone {J : Type v} (F : J Mon)  :

The cocone over the proposed colimit monoid.

Equations
noncomputable def AddMon.filtered_colimits.colimit_cocone {J : Type v} (F : J AddMon)  :

The cocone over the proposed colimit additive monoid.

Equations
def Mon.filtered_colimits.colimit_desc {J : Type v} (F : J Mon)  :

Given a cocone t of F, the induced monoid homomorphism from the colimit to the cocone point. As a function, this is simply given by the induced map of the corresponding cocone in Type. The only thing left to see is that it is a monoid homomorphism.

Equations

Given a cocone t of F, the induced additive monoid homomorphism from the colimit to the cocone point. As a function, this is simply given by the induced map of the corresponding cocone in Type. The only thing left to see is that it is an additive monoid homomorphism.

Equations

The proposed colimit cocone is a colimit in AddMon.

Equations

The proposed colimit cocone is a colimit in Mon.

Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[reducible]
noncomputable def AddCommMon.filtered_colimits.M {J : Type v} (F : J AddCommMon) :

The colimit of F ⋙ forget₂ AddCommMon AddMon in the category AddMon. In the following, we will show that this has the structure of a commutative additive monoid.

@[reducible]
noncomputable def CommMon.filtered_colimits.M {J : Type v} (F : J CommMon) :

The colimit of F ⋙ forget₂ CommMon Mon in the category Mon. In the following, we will show that this has the structure of a commutative monoid.

@[protected, instance]
Equations
@[protected, instance]
noncomputable def CommMon.filtered_colimits.colimit_comm_monoid {J : Type v} (F : J CommMon) :
Equations
noncomputable def AddCommMon.filtered_colimits.colimit {J : Type v} (F : J AddCommMon) :

The bundled additive commutative monoid giving the filtered colimit of a diagram.

Equations
noncomputable def CommMon.filtered_colimits.colimit {J : Type v} (F : J CommMon) :

The bundled commutative monoid giving the filtered colimit of a diagram.

Equations
noncomputable def AddCommMon.filtered_colimits.colimit_cocone {J : Type v} (F : J AddCommMon) :

The cocone over the proposed colimit additive commutative monoid.

Equations
noncomputable def CommMon.filtered_colimits.colimit_cocone {J : Type v} (F : J CommMon) :

The cocone over the proposed colimit commutative monoid.

Equations

The proposed colimit cocone is a colimit in AddCommMon.

Equations

The proposed colimit cocone is a colimit in CommMon.

Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations