l3lab/ntp-mathlib huggingface dataset:
@[to_additive]
noncomputable instance colimitMonoid : Monoid (M.{v, u} F) :=
  { colimitMulOneClass F with
    mul_assoc := fun x y z => by
      refine Quot.induction_on₃ x y z ?_
      clear x y z
      intro x y z
      cases' x with j₁ x
      

Proof state:
case mk
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
src✝ : MulOneClass (M F) := colimitMulOneClass F
y z : (j : J) × (F ⋙ forget MonCat).obj j
j₁ : J
x : (F ⋙ forget MonCat).obj j₁
⊢ Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₁, snd := x } *
        Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) y *
      Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) z =
    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₁, snd := x } *
      (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) y * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) z)

Next tactic:
cases' y with j₂ y
@[to_additive]
noncomputable instance colimitMonoid : Monoid (M.{v, u} F) :=
  { colimitMulOneClass F with
    mul_assoc := fun x y z => by
      refine Quot.induction_on₃ x y z ?_
      clear x y z
      intro x y z
      cases' x with j₁ x
      cases' y with j₂ y
      

Proof state:
case mk.mk
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
src✝ : MulOneClass (M F) := colimitMulOneClass F
z : (j : J) × (F ⋙ forget MonCat).obj j
j₁ : J
x : (F ⋙ forget MonCat).obj j₁
j₂ : J
y : (F ⋙ forget MonCat).obj j₂
⊢ Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₁, snd := x } *
        Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₂, snd := y } *
      Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) z =
    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₁, snd := x } *
      (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₂, snd := y } *
        Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) z)

Next tactic:
cases' z with j₃ z
@[to_additive]
noncomputable instance colimitMonoid : Monoid (M.{v, u} F) :=
  { colimitMulOneClass F with
    mul_assoc := fun x y z => by
      refine Quot.induction_on₃ x y z ?_
      clear x y z
      intro x y z
      cases' x with j₁ x
      cases' y with j₂ y
      cases' z with j₃ z
      

Proof state:
case mk.mk.mk
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
src✝ : MulOneClass (M F) := colimitMulOneClass F
j₁ : J
x : (F ⋙ forget MonCat).obj j₁
j₂ : J
y : (F ⋙ forget MonCat).obj j₂
j₃ : J
z : (F ⋙ forget MonCat).obj j₃
⊢ Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₁, snd := x } *
        Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₂, snd := y } *
      Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₃, snd := z } =
    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₁, snd := x } *
      (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₂, snd := y } *
        Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j₃, snd := z })

Next tactic:
change M.mk F _ * M.mk F _ * M.mk F _ = M.mk F _ * M.mk F _
@[to_additive]
noncomputable instance colimitMonoid : Monoid (M.{v, u} F) :=
  { colimitMulOneClass F with
    mul_assoc := fun x y z => by
      refine Quot.induction_on₃ x y z ?_
      clear x y z
      intro x y z
      cases' x with j₁ x
      cases' y with j₂ y
      cases' z with j₃ z
      change M.mk F _ * M.mk F _ * M.mk F _ = M.mk F _ * M.mk F _
      

Proof state:
case mk.mk.mk
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
src✝ : MulOneClass (M F) := colimitMulOneClass F
j₁ : J
x : (F ⋙ forget MonCat).obj j₁
j₂ : J
y : (F ⋙ forget MonCat).obj j₂
j₃ : J
z : (F ⋙ forget MonCat).obj j₃
⊢ M.mk F { fst := j₁, snd := x } * M.mk F { fst := j₂, snd := y } * M.mk F { fst := j₃, snd := z } =
    M.mk F { fst := j₁, snd := x } *
      M.mk F
        { fst := IsFiltered.max { fst := j₂, snd := y }.fst { fst := j₃, snd := z }.fst,
          snd :=
            (F.map (IsFiltered.leftToMax { fst := j₂, snd := y }.fst { fst := j₃, snd := z }.fst))
                { fst := j₂, snd := y }.snd *
              (F.map (IsFiltered.rightToMax { fst := j₂, snd := y }.fst { fst := j₃, snd := z }.fst))
                { fst := j₃, snd := z }.snd }

Next tactic:
dsimp
@[to_additive]
noncomputable instance colimitMonoid : Monoid (M.{v, u} F) :=
  { colimitMulOneClass F with
    mul_assoc := fun x y z => by
      refine Quot.induction_on₃ x y z ?_
      clear x y z
      intro x y z
      cases' x with j₁ x
      cases' y with j₂ y
      cases' z with j₃ z
      change M.mk F _ * M.mk F _ * M.mk F _ = M.mk F _ * M.mk F _
      dsimp
      

Proof state:
case mk.mk.mk
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
src✝ : MulOneClass (M F) := colimitMulOneClass F
j₁ : J
x : (F ⋙ forget MonCat).obj j₁
j₂ : J
y : (F ⋙ forget MonCat).obj j₂
j₃ : J
z : (F ⋙ forget MonCat).obj j₃
⊢ M.mk F { fst := j₁, snd := x } * M.mk F { fst := j₂, snd := y } * M.mk F { fst := j₃, snd := z } =
    M.mk F { fst := j₁, snd := x } *
      M.mk F
        { fst := IsFiltered.max j₂ j₃,
          snd := (F.map (IsFiltered.leftToMax j₂ j₃)) y * (F.map (IsFiltered.rightToMax j₂ j₃)) z }

Next tactic:
rw [colimit_mul_mk_eq F ⟨j₁, x⟩ ⟨j₂, y⟩ (IsFiltered.max j₁ (IsFiltered.max j₂ j₃))
          (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃))
          (IsFiltered.leftToMax j₂ j₃ ≫ IsFiltered.rightToMax _ _),
        colimit_mul_mk_eq F ⟨(IsFiltered.max j₁ (IsFiltered.max j₂ j₃)), _⟩ ⟨j₃, z⟩
          (IsFiltered.max j₁ (IsFiltered.max j₂ j₃)) (𝟙 _)
          (IsFiltered.rightToMax j₂ j₃ ≫ IsFiltered.rightToMax _ _),
        colimit_mul_mk_eq.{v, u} F ⟨j₁, x⟩ ⟨IsFiltered.max j₂ j₃, _⟩ _
          (IsFiltered.leftToMax _ _) (IsFiltered.rightToMax _ _)]
@[to_additive]
noncomputable instance colimitMonoid : Monoid (M.{v, u} F) :=
  { colimitMulOneClass F with
    mul_assoc := fun x y z => by
      refine Quot.induction_on₃ x y z ?_
      clear x y z
      intro x y z
      cases' x with j₁ x
      cases' y with j₂ y
      cases' z with j₃ z
      change M.mk F _ * M.mk F _ * M.mk F _ = M.mk F _ * M.mk F _
      dsimp
      rw [colimit_mul_mk_eq F ⟨j₁, x⟩ ⟨j₂, y⟩ (IsFiltered.max j₁ (IsFiltered.max j₂ j₃))
          (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃))
          (IsFiltered.leftToMax j₂ j₃ ≫ IsFiltered.rightToMax _ _),
        colimit_mul_mk_eq F ⟨(IsFiltered.max j₁ (IsFiltered.max j₂ j₃)), _⟩ ⟨j₃, z⟩
          (IsFiltered.max j₁ (IsFiltered.max j₂ j₃)) (𝟙 _)
          (IsFiltered.rightToMax j₂ j₃ ≫ IsFiltered.rightToMax _ _),
        colimit_mul_mk_eq.{v, u} F ⟨j₁, x⟩ ⟨IsFiltered.max j₂ j₃, _⟩ _
          (IsFiltered.leftToMax _ _) (IsFiltered.rightToMax _ _)]
      congr 2
      

Proof state:
case mk.mk.mk.e_a.e_snd
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
src✝ : MulOneClass (M F) := colimitMulOneClass F
j₁ : J
x : (F ⋙ forget MonCat).obj j₁
j₂ : J
y : (F ⋙ forget MonCat).obj j₂
j₃ : J
z : (F ⋙ forget MonCat).obj j₃
⊢ (F.map
          (𝟙
            { fst := IsFiltered.max j₁ (IsFiltered.max j₂ j₃),
                snd :=
                  (F.map (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃))) { fst := j₁, snd := x }.snd *
                    (F.map (IsFiltered.leftToMax j₂ j₃ ≫ IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃)))
                      { fst := j₂, snd := y }.snd }.fst))
        { fst := IsFiltered.max j₁ (IsFiltered.max j₂ j₃),
            snd :=
              (F.map (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃))) { fst := j₁, snd := x }.snd *
                (F.map (IsFiltered.leftToMax j₂ j₃ ≫ IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃)))
                  { fst := j₂, snd := y }.snd }.snd *
      (F.map (IsFiltered.rightToMax j₂ j₃ ≫ IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃)))
        { fst := j₃, snd := z }.snd =
    (F.map
          (IsFiltered.leftToMax { fst := j₁, snd := x }.fst
            { fst := IsFiltered.max j₂ j₃,
                snd := (F.map (IsFiltered.leftToMax j₂ j₃)) y * (F.map (IsFiltered.rightToMax j₂ j₃)) z }.fst))
        { fst := j₁, snd := x }.snd *
      (F.map
          (IsFiltered.rightToMax { fst := j₁, snd := x }.fst
            { fst := IsFiltered.max j₂ j₃,
                snd := (F.map (IsFiltered.leftToMax j₂ j₃)) y * (F.map (IsFiltered.rightToMax j₂ j₃)) z }.fst))
        { fst := IsFiltered.max j₂ j₃,
            snd := (F.map (IsFiltered.leftToMax j₂ j₃)) y * (F.map (IsFiltered.rightToMax j₂ j₃)) z }.snd

Next tactic:
dsimp only
@[to_additive]
noncomputable instance colimitMonoid : Monoid (M.{v, u} F) :=
  { colimitMulOneClass F with
    mul_assoc := fun x y z => by
      refine Quot.induction_on₃ x y z ?_
      clear x y z
      intro x y z
      cases' x with j₁ x
      cases' y with j₂ y
      cases' z with j₃ z
      change M.mk F _ * M.mk F _ * M.mk F _ = M.mk F _ * M.mk F _
      dsimp
      rw [colimit_mul_mk_eq F ⟨j₁, x⟩ ⟨j₂, y⟩ (IsFiltered.max j₁ (IsFiltered.max j₂ j₃))
          (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃))
          (IsFiltered.leftToMax j₂ j₃ ≫ IsFiltered.rightToMax _ _),
        colimit_mul_mk_eq F ⟨(IsFiltered.max j₁ (IsFiltered.max j₂ j₃)), _⟩ ⟨j₃, z⟩
          (IsFiltered.max j₁ (IsFiltered.max j₂ j₃)) (𝟙 _)
          (IsFiltered.rightToMax j₂ j₃ ≫ IsFiltered.rightToMax _ _),
        colimit_mul_mk_eq.{v, u} F ⟨j₁, x⟩ ⟨IsFiltered.max j₂ j₃, _⟩ _
          (IsFiltered.leftToMax _ _) (IsFiltered.rightToMax _ _)]
      congr 2
      dsimp only
      

Proof state:
case mk.mk.mk.e_a.e_snd
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
src✝ : MulOneClass (M F) := colimitMulOneClass F
j₁ : J
x : (F ⋙ forget MonCat).obj j₁
j₂ : J
y : (F ⋙ forget MonCat).obj j₂
j₃ : J
z : (F ⋙ forget MonCat).obj j₃
⊢ (F.map (𝟙 (IsFiltered.max j₁ (IsFiltered.max j₂ j₃))))
        ((F.map (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃))) x *
          (F.map (IsFiltered.leftToMax j₂ j₃ ≫ IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃))) y) *
      (F.map (IsFiltered.rightToMax j₂ j₃ ≫ IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃))) z =
    (F.map (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃))) x *
      (F.map (IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃)))
        ((F.map (IsFiltered.leftToMax j₂ j₃)) y * (F.map (IsFiltered.rightToMax j₂ j₃)) z)

Next tactic:
rw [F.map_id, show ∀ x, (𝟙 (F.obj (IsFiltered.max j₁ (IsFiltered.max j₂ j₃)))) x = x
        from fun _ => rfl, mul_assoc, MonoidHom.map_mul, F.map_comp, F.map_comp]
@[to_additive]
noncomputable instance colimitMonoid : Monoid (M.{v, u} F) :=
  { colimitMulOneClass F with
    mul_assoc := fun x y z => by
      refine Quot.induction_on₃ x y z ?_
      clear x y z
      intro x y z
      cases' x with j₁ x
      cases' y with j₂ y
      cases' z with j₃ z
      change M.mk F _ * M.mk F _ * M.mk F _ = M.mk F _ * M.mk F _
      dsimp
      rw [colimit_mul_mk_eq F ⟨j₁, x⟩ ⟨j₂, y⟩ (IsFiltered.max j₁ (IsFiltered.max j₂ j₃))
          (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃))
          (IsFiltered.leftToMax j₂ j₃ ≫ IsFiltered.rightToMax _ _),
        colimit_mul_mk_eq F ⟨(IsFiltered.max j₁ (IsFiltered.max j₂ j₃)), _⟩ ⟨j₃, z⟩
          (IsFiltered.max j₁ (IsFiltered.max j₂ j₃)) (𝟙 _)
          (IsFiltered.rightToMax j₂ j₃ ≫ IsFiltered.rightToMax _ _),
        colimit_mul_mk_eq.{v, u} F ⟨j₁, x⟩ ⟨IsFiltered.max j₂ j₃, _⟩ _
          (IsFiltered.leftToMax _ _) (IsFiltered.rightToMax _ _)]
      congr 2
      dsimp only
      rw [F.map_id, show ∀ x, (𝟙 (F.obj (IsFiltered.max j₁ (IsFiltered.max j₂ j₃)))) x = x
        from fun _ => rfl, mul_assoc, MonoidHom.map_mul, F.map_comp, F.map_comp]
      

Proof state:
case mk.mk.mk.e_a.e_snd
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
src✝ : MulOneClass (M F) := colimitMulOneClass F
j₁ : J
x : (F ⋙ forget MonCat).obj j₁
j₂ : J
y : (F ⋙ forget MonCat).obj j₂
j₃ : J
z : (F ⋙ forget MonCat).obj j₃
⊢ (F.map (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃))) x *
      ((F.map (IsFiltered.leftToMax j₂ j₃) ≫ F.map (IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃))) y *
        (F.map (IsFiltered.rightToMax j₂ j₃) ≫ F.map (IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃))) z) =
    (F.map (IsFiltered.leftToMax j₁ (IsFiltered.max j₂ j₃))) x *
      ((F.map (IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃))) ((F.map (IsFiltered.leftToMax j₂ j₃)) y) *
        (F.map (IsFiltered.rightToMax j₁ (IsFiltered.max j₂ j₃))) ((F.map (IsFiltered.rightToMax j₂ j₃)) z))

Next tactic:
rfl
/-- 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.{v, u} F where
  toFun := (Types.colimitCocone (F ⋙ forget MonCat)).ι.app j
  map_one' := (colimit_one_eq F j).symm
  map_mul' x y := by
    

Proof state:
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
j : J
x y : ↑(F.obj j)
⊢ OneHom.toFun
      { toFun := (Types.colimitCocone (F ⋙ forget MonCat)).ι.app j,
        map_one' := (_ : M.mk F { fst := j, snd := 1 } = 1) }
      (x * y) =
    OneHom.toFun
        { toFun := (Types.colimitCocone (F ⋙ forget MonCat)).ι.app j,
          map_one' := (_ : M.mk F { fst := j, snd := 1 } = 1) }
        x *
      OneHom.toFun
        { toFun := (Types.colimitCocone (F ⋙ forget MonCat)).ι.app j,
          map_one' := (_ : M.mk F { fst := j, snd := 1 } = 1) }
        y

Next tactic:
convert (colimit_mul_mk_eq.{v, u} F ⟨j, x⟩ ⟨j, y⟩ j (𝟙 j) (𝟙 j)).symm
/-- 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.{v, u} F where
  toFun := (Types.colimitCocone (F ⋙ forget MonCat)).ι.app j
  map_one' := (colimit_one_eq F j).symm
  map_mul' x y := by
    convert (colimit_mul_mk_eq.{v, u} F ⟨j, x⟩ ⟨j, y⟩ j (𝟙 j) (𝟙 j)).symm
    

Proof state:
case h.e'_2.h
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
j : J
x y : ↑(F.obj j)
e_1✝ : ↑(colimit F) = M F
⊢ OneHom.toFun
      { toFun := (Types.colimitCocone (F ⋙ forget MonCat)).ι.app j,
        map_one' := (_ : M.mk F { fst := j, snd := 1 } = 1) }
      (x * y) =
    M.mk F { fst := j, snd := (F.map (𝟙 j)) { fst := j, snd := x }.snd * (F.map (𝟙 j)) { fst := j, snd := y }.snd }

Next tactic:
rw [F.map_id]
/-- 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.{v, u} F where
  toFun := (Types.colimitCocone (F ⋙ forget MonCat)).ι.app j
  map_one' := (colimit_one_eq F j).symm
  map_mul' x y := by
    convert (colimit_mul_mk_eq.{v, u} F ⟨j, x⟩ ⟨j, y⟩ j (𝟙 j) (𝟙 j)).symm
    rw [F.map_id]
    

Proof state:
case h.e'_2.h
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
j : J
x y : ↑(F.obj j)
e_1✝ : ↑(colimit F) = M F
⊢ OneHom.toFun
      { toFun := (Types.colimitCocone (F ⋙ forget MonCat)).ι.app j,
        map_one' := (_ : M.mk F { fst := j, snd := 1 } = 1) }
      (x * y) =
    M.mk F
      { fst := j,
        snd :=
          (𝟙 (F.obj { fst := j, snd := x }.fst)) { fst := j, snd := x }.snd *
            (𝟙 (F.obj { fst := j, snd := x }.fst)) { fst := j, snd := y }.snd }

Next tactic:
rfl
/-- 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 where
  toFun := (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)).desc ((forget MonCat).mapCocone t)
  map_one' := by
    

Proof state:
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
t : Cocone F
⊢ IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1

Next tactic:
rw [colimit_one_eq F IsFiltered.nonempty.some]
/-- 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 where
  toFun := (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)).desc ((forget MonCat).mapCocone t)
  map_one' := by
    rw [colimit_one_eq F IsFiltered.nonempty.some]
    

Proof state:
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
t : Cocone F
⊢ IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t)
      (M.mk F { fst := Nonempty.some (_ : Nonempty J), snd := 1 }) =
    1

Next tactic:
exact MonoidHom.map_one _
/-- 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 where
  toFun := (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)).desc ((forget MonCat).mapCocone t)
  map_one' := by
    rw [colimit_one_eq F IsFiltered.nonempty.some]
    exact MonoidHom.map_one _
  map_mul' x y := by
    

Proof state:
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
t : Cocone F
x y : ↑(colimit F)
⊢ OneHom.toFun
      { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),
        map_one' :=
          (_ : IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }
      (x * y) =
    OneHom.toFun
        { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),
          map_one' :=
            (_ :
              IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }
        x *
      OneHom.toFun
        { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),
          map_one' :=
            (_ :
              IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }
        y

Next tactic:
refine Quot.induction_on₂ x y ?_
/-- 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 where
  toFun := (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)).desc ((forget MonCat).mapCocone t)
  map_one' := by
    rw [colimit_one_eq F IsFiltered.nonempty.some]
    exact MonoidHom.map_one _
  map_mul' x y := by
    refine Quot.induction_on₂ x y ?_
    

Proof state:
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
t : Cocone F
x y : ↑(colimit F)
⊢ ∀ (a b : (j : J) × (F ⋙ forget MonCat).obj j),
    OneHom.toFun
        { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),
          map_one' :=
            (_ :
              IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }
        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) b) =
      OneHom.toFun
          { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),
            map_one' :=
              (_ :
                IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }
          (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a) *
        OneHom.toFun
          { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),
            map_one' :=
              (_ :
                IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }
          (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) b)

Next tactic:
clear x y
/-- 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 where
  toFun := (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)).desc ((forget MonCat).mapCocone t)
  map_one' := by
    rw [colimit_one_eq F IsFiltered.nonempty.some]
    exact MonoidHom.map_one _
  map_mul' x y := by
    refine Quot.induction_on₂ x y ?_
    clear x y
    

Proof state:
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
t : Cocone F
⊢ ∀ (a b : (j : J) × (F ⋙ forget MonCat).obj j),
    OneHom.toFun
        { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),
          map_one' :=
            (_ :
              IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }
        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) b) =
      OneHom.toFun
          { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),
            map_one' :=
              (_ :
                IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }
          (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a) *
        OneHom.toFun
          { toFun := IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t),
            map_one' :=
              (_ :
                IsColimit.desc (Types.colimitCoconeIsColimit (F ⋙ forget MonCat)) ((forget MonCat).mapCocone t) 1 = 1) }
          (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) b)

Next tactic:
intro x y