# Documentation

Mathlib.Algebra.Category.MonCat.FilteredColimits

# 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 ⥤ MonCat. We then construct a monoid structure on the colimit of F ⋙ forget MonCat (in Type), thereby showing that the forgetful functor forget MonCat preserves filtered colimits. Similarly for AddMonCat, CommMonCat and AddCommMonCat.

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

Instances For
@[inline, reducible]
abbrev MonCat.FilteredColimits.M {J : Type v} (F : ) :

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

Instances For
abbrev AddMonCat.FilteredColimits.M.mk {J : Type v} (F : ) :
(j : J) × ↑(F.obj j)

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

Instances For
@[inline, reducible]
abbrev MonCat.FilteredColimits.M.mk {J : Type v} (F : ) :
(j : J) × ↑(F.obj j)

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

Instances For
theorem AddMonCat.FilteredColimits.M.mk_eq {J : Type v} (F : ) (x : (j : J) × ↑(F.obj j)) (y : (j : J) × ↑(F.obj j)) (h : k f g, ↑(F.map f) x.snd = ↑(F.map g) y.snd) :
theorem MonCat.FilteredColimits.M.mk_eq {J : Type v} (F : ) (x : (j : J) × ↑(F.obj j)) (y : (j : J) × ↑(F.obj j)) (h : k f g, ↑(F.map f) x.snd = ↑(F.map g) y.snd) :
noncomputable instance AddMonCat.FilteredColimits.colimitZero {J : Type v} (F : ) :

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

noncomputable instance MonCat.FilteredColimits.colimitOne {J : Type v} (F : ) :

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

theorem AddMonCat.FilteredColimits.colimit_zero_eq {J : Type v} (F : ) (j : J) :
0 = AddMonCat.FilteredColimits.M.mk F { fst := j, snd := 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 MonCat.FilteredColimits.colimit_one_eq {J : Type v} (F : ) (j : J) :
1 = MonCat.FilteredColimits.M.mk F { fst := j, snd := 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 AddMonCat.FilteredColimits.colimitAddAux {J : Type v} (F : ) (x : (j : J) × ↑(F.obj j)) (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 IsFiltered.max) and add them there.

Instances For
noncomputable def MonCat.FilteredColimits.colimitMulAux {J : Type v} (F : ) (x : (j : J) × ↑(F.obj j)) (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 IsFiltered.max) and multiply them there.

Instances For
theorem AddMonCat.FilteredColimits.colimitAddAux_eq_of_rel_left {J : Type v} (F : ) {x : (j : J) × ↑(F.obj j)} {x' : (j : J) × ↑(F.obj j)} {y : (j : J) × ↑(F.obj j)} :

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

theorem MonCat.FilteredColimits.colimitMulAux_eq_of_rel_left {J : Type v} (F : ) {x : (j : J) × ↑(F.obj j)} {x' : (j : J) × ↑(F.obj j)} {y : (j : J) × ↑(F.obj j)} :

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

theorem AddMonCat.FilteredColimits.colimitAddAux_eq_of_rel_right {J : Type v} (F : ) {x : (j : J) × ↑(F.obj j)} {y : (j : J) × ↑(F.obj j)} {y' : (j : J) × ↑(F.obj j)} :

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

theorem MonCat.FilteredColimits.colimitMulAux_eq_of_rel_right {J : Type v} (F : ) {x : (j : J) × ↑(F.obj j)} {y : (j : J) × ↑(F.obj j)} {y' : (j : J) × ↑(F.obj j)} :

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

Addition in the colimit. See also colimitAddAux.

theorem AddMonCat.FilteredColimits.colimitAdd.proof_2 {J : Type u_1} (F : ) (x : (j : J) × ↑(F.obj j)) (x' : (j : J) × ↑(F.obj j)) (y : (j : J) × ↑(F.obj j)) :
theorem AddMonCat.FilteredColimits.colimitAdd.proof_1 {J : Type u_1} (F : ) (x : (j : J) × ↑(F.obj j)) (y : (j : J) × ↑(F.obj j)) (y' : (j : J) × ↑(F.obj j)) :
noncomputable instance MonCat.FilteredColimits.colimitMul {J : Type v} (F : ) :

Multiplication in the colimit. See also colimitMulAux.

theorem AddMonCat.FilteredColimits.colimit_add_mk_eq {J : Type v} (F : ) (x : (j : J) × ↑(F.obj j)) (y : (j : J) × ↑(F.obj j)) (k : J) (f : x.fst k) (g : y.fst k) :
= AddMonCat.FilteredColimits.M.mk F { fst := k, snd := ↑(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 MonCat.FilteredColimits.colimit_mul_mk_eq {J : Type v} (F : ) (x : (j : J) × ↑(F.obj j)) (y : (j : J) × ↑(F.obj j)) (k : J) (f : x.fst k) (g : y.fst k) :
= MonCat.FilteredColimits.M.mk F { fst := k, snd := ↑(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.

noncomputable instance MonCat.FilteredColimits.colimitMulOneClass {J : Type v} (F : ) :
theorem AddMonCat.FilteredColimits.colimitAddMonoid.proof_2 {J : Type u_1} (F : ) (a : ) :
0 + a = a
∀ (x : ), nsmulRec 0 x = nsmulRec 0 x
theorem AddMonCat.FilteredColimits.colimitAddMonoid.proof_3 {J : Type u_1} (F : ) (a : ) :
a + 0 = a
theorem AddMonCat.FilteredColimits.colimitAddMonoid.proof_1 {J : Type u_1} (F : ) (x : ) (y : ) (z : ) :
x + y + z = x + (y + z)
∀ (n : ) (x : ), nsmulRec (n + 1) x = nsmulRec (n + 1) x
noncomputable instance MonCat.FilteredColimits.colimitMonoid {J : Type v} (F : ) :
noncomputable def AddMonCat.FilteredColimits.colimit {J : Type v} (F : ) :

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

Instances For
noncomputable def MonCat.FilteredColimits.colimit {J : Type v} (F : ) :

The bundled monoid giving the filtered colimit of a diagram.

Instances For
theorem AddMonCat.FilteredColimits.coconeMorphism.proof_1 {J : Type u_1} (F : ) (j : J) :
AddMonCat.FilteredColimits.M.mk F { fst := j, snd := 0 } = 0
def AddMonCat.FilteredColimits.coconeMorphism {J : Type v} (F : ) (j : J) :
F.obj j

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

Instances For
theorem AddMonCat.FilteredColimits.coconeMorphism.proof_2 {J : Type u_2} (F : ) (j : J) (x : ↑(F.obj j)) (y : ↑(F.obj j)) :
ZeroHom.toFun { toFun := ().ι.app j, map_zero' := (_ : AddMonCat.FilteredColimits.M.mk F { fst := j, snd := 0 } = 0) } (x + y) = ZeroHom.toFun { toFun := ().ι.app j, map_zero' := (_ : AddMonCat.FilteredColimits.M.mk F { fst := j, snd := 0 } = 0) } x + ZeroHom.toFun { toFun := ().ι.app j, map_zero' := (_ : AddMonCat.FilteredColimits.M.mk F { fst := j, snd := 0 } = 0) } y
def MonCat.FilteredColimits.coconeMorphism {J : Type v} (F : ) (j : J) :
F.obj j

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

Instances For
@[simp]
theorem AddMonCat.FilteredColimits.cocone_naturality {J : Type v} (F : ) {j : J} {j' : J} (f : j j') :
@[simp]
theorem MonCat.FilteredColimits.cocone_naturality {J : Type v} (F : ) {j : J} {j' : J} (f : j j') :
theorem AddMonCat.FilteredColimits.colimitCocone.proof_1 {J : Type u_1} (F : ) ⦃X : J ⦃Y : J (f : X Y) :
noncomputable def AddMonCat.FilteredColimits.colimitCocone {J : Type v} (F : ) :

The cocone over the proposed colimit additive monoid.

Instances For
noncomputable def MonCat.FilteredColimits.colimitCocone {J : Type v} (F : ) :

The cocone over the proposed colimit monoid.

Instances For

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.

Instances For
theorem AddMonCat.FilteredColimits.colimitDesc.proof_2 {J : Type u_2} (F : ) (t : ) (x : ) (y : ) :
ZeroHom.toFun { toFun := CategoryTheory.Limits.IsColimit.desc () (().mapCocone t), map_zero' := (_ : CategoryTheory.Limits.IsColimit.desc J inst✝ TypeMax CategoryTheory.types () () () (().mapCocone t) 0 = 0) } (x + y) = ZeroHom.toFun { toFun := CategoryTheory.Limits.IsColimit.desc () (().mapCocone t), map_zero' := (_ : CategoryTheory.Limits.IsColimit.desc J inst✝ TypeMax CategoryTheory.types () () () (().mapCocone t) 0 = 0) } x + ZeroHom.toFun { toFun := CategoryTheory.Limits.IsColimit.desc () (().mapCocone t), map_zero' := (_ : CategoryTheory.Limits.IsColimit.desc J inst✝ TypeMax CategoryTheory.types () () () (().mapCocone t) 0 = 0) } y
def MonCat.FilteredColimits.colimitDesc {J : Type v} (F : ) (t : ) :

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.

Instances For
theorem AddMonCat.FilteredColimits.colimitCoconeIsColimit.proof_1 {J : Type u_1} (F : ) (t : ) (j : J) :
= t.app j
theorem AddMonCat.FilteredColimits.colimitCoconeIsColimit.proof_2 {J : Type u_1} (F : ) (t : ) (m : t.pt) (h : ∀ (j : J), = t.app j) :

The proposed colimit cocone is a colimit in AddMon.

Instances For

The proposed colimit cocone is a colimit in MonCat.

Instances For
noncomputable abbrev AddCommMonCat.FilteredColimits.M {J : Type v} :

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

Instances For
@[inline, reducible]
noncomputable abbrev CommMonCat.FilteredColimits.M {J : Type v} (F : ) :

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

Instances For
noncomputable instance CommMonCat.FilteredColimits.colimitCommMonoid {J : Type v} (F : ) :

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

Instances For
noncomputable def CommMonCat.FilteredColimits.colimit {J : Type v} (F : ) :

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

Instances For

The cocone over the proposed colimit additive commutative monoid.

Instances For
theorem AddCommMonCat.FilteredColimits.colimitCocone.proof_1 {J : Type u_1} ⦃X : J ⦃Y : J (f : X Y) :
CategoryTheory.CategoryStruct.comp () (.app Y) = CategoryTheory.CategoryStruct.comp (.app X) ((().obj ().pt).map f)
noncomputable def CommMonCat.FilteredColimits.colimitCocone {J : Type v} (F : ) :

The cocone over the proposed colimit commutative monoid.

Instances For
theorem AddCommMonCat.FilteredColimits.colimitCoconeIsColimit.proof_1 {J : Type u_1} (t : ) (j : J) :
CategoryTheory.CategoryStruct.comp (.app j) ((fun t => ) t) = t.app j
theorem AddCommMonCat.FilteredColimits.colimitCoconeIsColimit.proof_2 {J : Type u_1} (t : ) (m : ) (h : ∀ (j : J), = t.app j) :
m = (fun t => ) t

The proposed colimit cocone is a colimit in AddCommMon.

Instances For

The proposed colimit cocone is a colimit in CommMonCat.

Instances For