# 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.

Type v

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

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

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

(Σ (j : J), (F.obj j))

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

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) :
@[instance]
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
@[instance]

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₀⟩.

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.

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.

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.

@[instance]

Addition in the colimit. See also colimit_add_aux.

@[instance]
def Mon.filtered_colimits.colimit_has_mul {J : Type v} (F : J Mon)  :

Multiplication in the colimit. See also colimit_mul_aux.

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.

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

The bundled monoid giving the filtered colimit of a diagram.

Equations

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

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.

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') :
theorem AddMon.filtered_colimits.cocone_naturality {J : Type v} (F : J AddMon) {j j' : J} (f : j j') :
def Mon.filtered_colimits.colimit_cocone {J : Type v} (F : J Mon)  :

The cocone over the proposed colimit monoid.

Equations

/-- The cocone over the proposed colimit additive monoid. -/

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.

The proposed colimit cocone is a colimit in AddMon.

The proposed colimit cocone is a colimit in Mon.

Equations
@[instance]
Equations

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.

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.

@[instance]
@[instance]
Equations

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

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

Equations

The cocone over the proposed colimit additive commutative monoid.

The cocone over the proposed colimit commutative monoid.

Equations

The proposed colimit cocone is a colimit in AddCommMon.

The proposed colimit cocone is a colimit in CommMon.

Equations
@[instance]
Equations
@[instance]
Equations