File: Mathlib/Algebra/Category/MonCat/FilteredColimits.lean

full_name: AddMonCat.FilteredColimits.M
code: /-- The colimit of `F ⋙ forget MonCat` in the category of types.
In the following, we will construct a monoid structure on `M`.
-/
@[to_additive
      "The colimit of `F ⋙ forget AddMon` in the category of types.
      In the following, we will construct an additive monoid structure on `M`."]
abbrev M 
goal: Type (max u v)

full_name: MonCat.FilteredColimits.M
code: /-- The colimit of `F ⋙ forget MonCat` in the category of types.
In the following, we will construct a monoid structure on `M`.
-/
@[to_additive
      "The colimit of `F ⋙ forget AddMon` in the category of types.
      In the following, we will construct an additive monoid structure on `M`."]
abbrev M 
goal: Type (max u v)

full_name: AddMonCat.FilteredColimits.M.mk
code: /-- The canonical projection into the colimit, as a quotient type. -/
@[to_additive "The canonical projection into the colimit, as a quotient type."]
noncomputable abbrev M.mk : (Σ j, F.obj j) → M.{v, u} F 
goal: (j : J) × ↑(F.obj j) → AddMonCat.FilteredColimits.M F

full_name: MonCat.FilteredColimits.M.mk
code: /-- The canonical projection into the colimit, as a quotient type. -/
@[to_additive "The canonical projection into the colimit, as a quotient type."]
noncomputable abbrev M.mk : (Σ j, F.obj j) → M.{v, u} F 
goal: (j : J) × ↑(F.obj j) → MonCat.FilteredColimits.M F

full_name: AddMonCat.FilteredColimits.M.mk_eq
code: @[to_additive]
theorem M.mk_eq (x y : Σ j, F.obj j)
    (h : ∃ (k : J) (f : x.1 ⟶ k) (g : y.1 ⟶ k), F.map f x.2 = F.map g y.2) :
    M.mk.{v, u} F x = M.mk F y 
goal: AddMonCat.FilteredColimits.M.mk F x = AddMonCat.FilteredColimits.M.mk F y

full_name: MonCat.FilteredColimits.M.mk_eq
code: @[to_additive]
theorem M.mk_eq (x y : Σ j, F.obj j)
    (h : ∃ (k : J) (f : x.1 ⟶ k) (g : y.1 ⟶ k), F.map f x.2 = F.map g y.2) :
    M.mk.{v, u} F x = M.mk F y 
goal: MonCat.FilteredColimits.M.mk F x = MonCat.FilteredColimits.M.mk F y

full_name: AddMonCat.FilteredColimits.colimitZero
code: /-- 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₀⟩`.
-/
@[to_additive
  "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 colimitOne :
  One (M.{v, u} F) 
goal: Zero (AddMonCat.FilteredColimits.M F)

full_name: MonCat.FilteredColimits.colimitOne
code: /-- 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₀⟩`.
-/
@[to_additive
  "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 colimitOne :
  One (M.{v, u} F) 
goal: One (MonCat.FilteredColimits.M F)

full_name: MonCat.FilteredColimits.colimit_one_eq
code: /-- 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`.
-/
@[to_additive
      "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 colimit_one_eq (j : J) : (1 : M.{v, u} F) = M.mk F ⟨j, 1⟩ 
goal: 1 = MonCat.FilteredColimits.M.mk F ⟨j, 1⟩

full_name: AddMonCat.FilteredColimits.colimit_zero_eq
code: /-- 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`.
-/
@[to_additive
      "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 colimit_one_eq (j : J) : (1 : M.{v, u} F) = M.mk F ⟨j, 1⟩ 
goal: 0 = AddMonCat.FilteredColimits.M.mk F ⟨j, 0⟩

full_name: AddMonCat.FilteredColimits.colimitAddAux
code: /-- 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.
-/
@[to_additive
      "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."]
noncomputable def colimitMulAux (x y : Σ j, F.obj j) : M.{v, u} F 
goal: AddMonCat.FilteredColimits.M F

full_name: MonCat.FilteredColimits.colimitMulAux
code: /-- 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.
-/
@[to_additive
      "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."]
noncomputable def colimitMulAux (x y : Σ j, F.obj j) : M.{v, u} F 
goal: MonCat.FilteredColimits.M F

full_name: MonCat.FilteredColimits.colimitMulAux_eq_of_rel_left
code: /-- Multiplication in the colimit is well-defined in the left argument. -/
@[to_additive "Addition in the colimit is well-defined in the left argument."]
theorem colimitMulAux_eq_of_rel_left {x x' y : Σ j, F.obj j}
    (hxx' : Types.FilteredColimit.Rel (F ⋙ forget MonCat) x x') :
    colimitMulAux.{v, u} F x y = colimitMulAux.{v, u} F x' y 
goal: MonCat.FilteredColimits.colimitMulAux F x y = MonCat.FilteredColimits.colimitMulAux F x' y

full_name: AddMonCat.FilteredColimits.colimitAddAux_eq_of_rel_left
code: /-- Multiplication in the colimit is well-defined in the left argument. -/
@[to_additive "Addition in the colimit is well-defined in the left argument."]
theorem colimitMulAux_eq_of_rel_left {x x' y : Σ j, F.obj j}
    (hxx' : Types.FilteredColimit.Rel (F ⋙ forget MonCat) x x') :
    colimitMulAux.{v, u} F x y = colimitMulAux.{v, u} F x' y 
goal: AddMonCat.FilteredColimits.colimitAddAux F x y = AddMonCat.FilteredColimits.colimitAddAux F x' y

full_name: MonCat.FilteredColimits.colimitMulAux_eq_of_rel_right
code: /-- Multiplication in the colimit is well-defined in the right argument. -/
@[to_additive "Addition in the colimit is well-defined in the right argument."]
theorem colimitMulAux_eq_of_rel_right {x y y' : Σ j, F.obj j}
    (hyy' : Types.FilteredColimit.Rel (F ⋙ forget MonCat) y y') :
    colimitMulAux.{v, u} F x y = colimitMulAux.{v, u} F x y' 
goal: MonCat.FilteredColimits.colimitMulAux F x y = MonCat.FilteredColimits.colimitMulAux F x y'

full_name: AddMonCat.FilteredColimits.colimitAddAux_eq_of_rel_right
code: /-- Multiplication in the colimit is well-defined in the right argument. -/
@[to_additive "Addition in the colimit is well-defined in the right argument."]
theorem colimitMulAux_eq_of_rel_right {x y y' : Σ j, F.obj j}
    (hyy' : Types.FilteredColimit.Rel (F ⋙ forget MonCat) y y') :
    colimitMulAux.{v, u} F x y = colimitMulAux.{v, u} F x y' 
goal: AddMonCat.FilteredColimits.colimitAddAux F x y = AddMonCat.FilteredColimits.colimitAddAux F x y'

full_name: MonCat.FilteredColimits.colimitMul
code: /-- Multiplication in the colimit. See also `colimitMulAux`. -/
@[to_additive "Addition in the colimit. See also `colimitAddAux`."]
noncomputable instance colimitMul : Mul (M.{v, u} F) 
goal: Mul (MonCat.FilteredColimits.M F)

full_name: AddMonCat.FilteredColimits.colimitAdd
code: /-- Multiplication in the colimit. See also `colimitMulAux`. -/
@[to_additive "Addition in the colimit. See also `colimitAddAux`."]
noncomputable instance colimitMul : Mul (M.{v, u} F) 
goal: Add (AddMonCat.FilteredColimits.M F)

full_name: AddMonCat.FilteredColimits.colimit_add_mk_eq
code: /-- 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`.
-/
@[to_additive
      "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 colimit_mul_mk_eq (x y : Σ j, F.obj j) (k : J) (f : x.1 ⟶ k) (g : y.1 ⟶ k) :
    M.mk.{v, u} F x * M.mk F y = M.mk F ⟨k, F.map f x.2 * F.map g y.2⟩ 
goal: AddMonCat.FilteredColimits.M.mk F x + AddMonCat.FilteredColimits.M.mk F y =
  AddMonCat.FilteredColimits.M.mk F ⟨k, (F.map f) x.snd + (F.map g) y.snd⟩

full_name: MonCat.FilteredColimits.colimit_mul_mk_eq
code: /-- 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`.
-/
@[to_additive
      "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 colimit_mul_mk_eq (x y : Σ j, F.obj j) (k : J) (f : x.1 ⟶ k) (g : y.1 ⟶ k) :
    M.mk.{v, u} F x * M.mk F y = M.mk F ⟨k, F.map f x.2 * F.map g y.2⟩ 
goal: MonCat.FilteredColimits.M.mk F x * MonCat.FilteredColimits.M.mk F y =
  MonCat.FilteredColimits.M.mk F ⟨k, (F.map f) x.snd * (F.map g) y.snd⟩

full_name: MonCat.FilteredColimits.colimitMulOneClass
code: @[to_additive]
noncomputable instance colimitMulOneClass : MulOneClass (M.{v, u} F) 
goal: MulOneClass (MonCat.FilteredColimits.M F)

full_name: AddMonCat.FilteredColimits.colimitAddZeroClass
code: @[to_additive]
noncomputable instance colimitMulOneClass : MulOneClass (M.{v, u} F) 
goal: AddZeroClass (AddMonCat.FilteredColimits.M F)

full_name: AddMonCat.FilteredColimits.colimitAddMonoid
code: @[to_additive]
noncomputable instance colimitMonoid : Monoid (M.{v, u} F) 
goal: AddMonoid (AddMonCat.FilteredColimits.M F)

full_name: MonCat.FilteredColimits.colimitMonoid
code: @[to_additive]
noncomputable instance colimitMonoid : Monoid (M.{v, u} F) 
goal: Monoid (MonCat.FilteredColimits.M F)

full_name: MonCat.FilteredColimits.colimit
code: /-- The bundled monoid giving the filtered colimit of a diagram. -/
@[to_additive
  "The bundled additive monoid giving the filtered colimit of a diagram."]
noncomputable def colimit : MonCat.{max v u} 
goal: MonCat

full_name: AddMonCat.FilteredColimits.colimit
code: /-- The bundled monoid giving the filtered colimit of a diagram. -/
@[to_additive
  "The bundled additive monoid giving the filtered colimit of a diagram."]
noncomputable def colimit : MonCat.{max v u} 
goal: AddMonCat

full_name: MonCat.FilteredColimits.coconeMorphism
code: /-- The monoid homomorphism from a given monoid in the diagram to the colimit monoid. -/
@[to_additive
      "The additive monoid homomorphism from a given additive monoid in the diagram to the
      colimit additive monoid."]
def coconeMorphism (j : J) : F.obj j ⟶ colimit F 
goal: F.obj j ⟶ MonCat.FilteredColimits.colimit F

full_name: AddMonCat.FilteredColimits.coconeMorphism
code: /-- The monoid homomorphism from a given monoid in the diagram to the colimit monoid. -/
@[to_additive
      "The additive monoid homomorphism from a given additive monoid in the diagram to the
      colimit additive monoid."]
def coconeMorphism (j : J) : F.obj j ⟶ colimit F 
goal: F.obj j ⟶ AddMonCat.FilteredColimits.colimit F

full_name: AddMonCat.FilteredColimits.cocone_naturality
code: @[to_additive (attr := simp)]
theorem cocone_naturality {j j' : J} (f : j ⟶ j') :
    F.map f ≫ coconeMorphism.{v, u} F j' = coconeMorphism F j 
goal: F.map f ≫ AddMonCat.FilteredColimits.coconeMorphism F j' = AddMonCat.FilteredColimits.coconeMorphism F j

full_name: MonCat.FilteredColimits.cocone_naturality
code: @[to_additive (attr := simp)]
theorem cocone_naturality {j j' : J} (f : j ⟶ j') :
    F.map f ≫ coconeMorphism.{v, u} F j' = coconeMorphism F j 
goal: F.map f ≫ MonCat.FilteredColimits.coconeMorphism F j' = MonCat.FilteredColimits.coconeMorphism F j

full_name: AddMonCat.FilteredColimits.colimitCocone
code: /-- The cocone over the proposed colimit monoid. -/
@[to_additive "The cocone over the proposed colimit additive monoid."]
noncomputable def colimitCocone : Cocone F 
goal: CategoryTheory.Limits.Cocone F

full_name: MonCat.FilteredColimits.colimitCocone
code: /-- The cocone over the proposed colimit monoid. -/
@[to_additive "The cocone over the proposed colimit additive monoid."]
noncomputable def colimitCocone : Cocone F 
goal: CategoryTheory.Limits.Cocone F

full_name: AddMonCat.FilteredColimits.colimitDesc
code: /-- 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.
-/
@[to_additive
      "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."]
def colimitDesc (t : Cocone F) : colimit.{v, u} F ⟶ t.pt 
goal: AddMonCat.FilteredColimits.colimit F ⟶ t.pt

full_name: MonCat.FilteredColimits.colimitDesc
code: /-- 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.
-/
@[to_additive
      "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."]
def colimitDesc (t : Cocone F) : colimit.{v, u} F ⟶ t.pt 
goal: MonCat.FilteredColimits.colimit F ⟶ t.pt

full_name: MonCat.FilteredColimits.colimitCoconeIsColimit
code: /-- The proposed colimit cocone is a colimit in `MonCat`. -/
@[to_additive "The proposed colimit cocone is a colimit in `AddMonCat`."]
def colimitCoconeIsColimit : IsColimit (colimitCocone.{v, u} F) 
goal: CategoryTheory.Limits.IsColimit (MonCat.FilteredColimits.colimitCocone F)

full_name: AddMonCat.FilteredColimits.colimitCoconeIsColimit
code: /-- The proposed colimit cocone is a colimit in `MonCat`. -/
@[to_additive "The proposed colimit cocone is a colimit in `AddMonCat`."]
def colimitCoconeIsColimit : IsColimit (colimitCocone.{v, u} F) 
goal: CategoryTheory.Limits.IsColimit (AddMonCat.FilteredColimits.colimitCocone F)

full_name: AddMonCat.FilteredColimits.forgetPreservesFilteredColimits
code: @[to_additive]
noncomputable instance forgetPreservesFilteredColimits :
    PreservesFilteredColimits (forget MonCat.{u}) 
goal: CategoryTheory.Limits.PreservesFilteredColimits (CategoryTheory.forget AddMonCat)

full_name: MonCat.FilteredColimits.forgetPreservesFilteredColimits
code: @[to_additive]
noncomputable instance forgetPreservesFilteredColimits :
    PreservesFilteredColimits (forget MonCat.{u}) 
goal: CategoryTheory.Limits.PreservesFilteredColimits (CategoryTheory.forget MonCat)

full_name: AddCommMonCat.FilteredColimits.M
code: /-- 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.
-/
@[to_additive
      "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."]
noncomputable abbrev M : MonCat.{max v u} 
goal: AddMonCat

full_name: CommMonCat.FilteredColimits.M
code: /-- 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.
-/
@[to_additive
      "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."]
noncomputable abbrev M : MonCat.{max v u} 
goal: MonCat

full_name: AddCommMonCat.FilteredColimits.colimitAddCommMonoid
code: @[to_additive]
noncomputable instance colimitCommMonoid : CommMonoid.{max v u} (M.{v, u} F) 
goal: AddCommMonoid ↑(AddCommMonCat.FilteredColimits.M F)

full_name: CommMonCat.FilteredColimits.colimitCommMonoid
code: @[to_additive]
noncomputable instance colimitCommMonoid : CommMonoid.{max v u} (M.{v, u} F) 
goal: CommMonoid ↑(CommMonCat.FilteredColimits.M F)

full_name: CommMonCat.FilteredColimits.colimit
code: /-- The bundled commutative monoid giving the filtered colimit of a diagram. -/
@[to_additive "The bundled additive commutative monoid giving the filtered colimit of a diagram."]
noncomputable def colimit : CommMonCat.{max v u} 
goal: CommMonCat

full_name: AddCommMonCat.FilteredColimits.colimit
code: /-- The bundled commutative monoid giving the filtered colimit of a diagram. -/
@[to_additive "The bundled additive commutative monoid giving the filtered colimit of a diagram."]
noncomputable def colimit : CommMonCat.{max v u} 
goal: AddCommMonCat

full_name: CommMonCat.FilteredColimits.colimitCocone
code: /-- The cocone over the proposed colimit commutative monoid. -/
@[to_additive "The cocone over the proposed colimit additive commutative monoid."]
noncomputable def colimitCocone : Cocone F 
goal: CategoryTheory.Limits.Cocone F

full_name: AddCommMonCat.FilteredColimits.colimitCocone
code: /-- The cocone over the proposed colimit commutative monoid. -/
@[to_additive "The cocone over the proposed colimit additive commutative monoid."]
noncomputable def colimitCocone : Cocone F 
goal: CategoryTheory.Limits.Cocone F

full_name: CommMonCat.FilteredColimits.colimitCoconeIsColimit
code: /-- The proposed colimit cocone is a colimit in `CommMonCat`. -/
@[to_additive "The proposed colimit cocone is a colimit in `AddCommMonCat`."]
def colimitCoconeIsColimit : IsColimit (colimitCocone.{v, u} F) 
goal: CategoryTheory.Limits.IsColimit (CommMonCat.FilteredColimits.colimitCocone F)

full_name: AddCommMonCat.FilteredColimits.colimitCoconeIsColimit
code: /-- The proposed colimit cocone is a colimit in `CommMonCat`. -/
@[to_additive "The proposed colimit cocone is a colimit in `AddCommMonCat`."]
def colimitCoconeIsColimit : IsColimit (colimitCocone.{v, u} F) 
goal: CategoryTheory.Limits.IsColimit (AddCommMonCat.FilteredColimits.colimitCocone F)

full_name: CommMonCat.FilteredColimits.forget₂MonPreservesFilteredColimits
code: @[to_additive forget₂AddMonPreservesFilteredColimits]
noncomputable instance forget₂MonPreservesFilteredColimits :
  PreservesFilteredColimits (forget₂ CommMonCat MonCat.{u}) 
goal: CategoryTheory.Limits.PreservesFilteredColimits (CategoryTheory.forget₂ CommMonCat MonCat)

full_name: AddCommMonCat.FilteredColimits.forget₂AddMonPreservesFilteredColimits
code: @[to_additive forget₂AddMonPreservesFilteredColimits]
noncomputable instance forget₂MonPreservesFilteredColimits :
  PreservesFilteredColimits (forget₂ CommMonCat MonCat.{u}) 
goal: CategoryTheory.Limits.PreservesFilteredColimits (CategoryTheory.forget₂ AddCommMonCat AddMonCat)

full_name: CommMonCat.FilteredColimits.forgetPreservesFilteredColimits
code: @[to_additive]
noncomputable instance forgetPreservesFilteredColimits :
    PreservesFilteredColimits (forget CommMonCat.{u}) 
goal: CategoryTheory.Limits.PreservesFilteredColimits (CategoryTheory.forget CommMonCat)

full_name: AddCommMonCat.FilteredColimits.forgetPreservesFilteredColimits
code: @[to_additive]
noncomputable instance forgetPreservesFilteredColimits :
    PreservesFilteredColimits (forget CommMonCat.{u}) 
goal: CategoryTheory.Limits.PreservesFilteredColimits (CategoryTheory.forget AddCommMonCat)