l3lab/ntp-mathlib huggingface dataset:
/-- 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
    intro x y
    

Proof state:
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
t : Cocone F
x y : (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)) x * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) 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) }
        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) 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) }
        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) y)

Next tactic:
cases' x with i x
/-- 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
    intro x y
    cases' x with i x
    

Proof state:
case mk
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
t : Cocone F
y : (j : J) × (F ⋙ forget MonCat).obj j
i : J
x : (F ⋙ forget MonCat).obj i
⊢ 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)) { fst := i, snd := x } *
        Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) 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) }
        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := i, snd := 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) }
        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) y)

Next tactic:
cases' y with j 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
    intro x y
    cases' x with i x
    cases' y with j y
    

Proof state:
case mk.mk
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
t : Cocone F
i : J
x : (F ⋙ forget MonCat).obj i
j : J
y : (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)) { fst := i, snd := x } *
        Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j, snd := 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) }
        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := i, snd := 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) }
        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j, snd := y })

Next tactic:
rw [colimit_mul_mk_eq F ⟨i, x⟩ ⟨j, y⟩ (max' i j) (IsFiltered.leftToMax i j)
      (IsFiltered.rightToMax i j)]
/-- 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
    intro x y
    cases' x with i x
    cases' y with j y
    rw [colimit_mul_mk_eq F ⟨i, x⟩ ⟨j, y⟩ (max' i j) (IsFiltered.leftToMax i j)
      (IsFiltered.rightToMax i j)]
    

Proof state:
case mk.mk
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
t : Cocone F
i : J
x : (F ⋙ forget MonCat).obj i
j : J
y : (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) }
      (M.mk F
        { fst := IsFiltered.max i j,
          snd :=
            (F.map (IsFiltered.leftToMax i j)) { fst := i, snd := x }.snd *
              (F.map (IsFiltered.rightToMax i j)) { fst := j, snd := y }.snd }) =
    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)) { fst := i, snd := 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) }
        (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j, snd := y })

Next tactic:
dsimp [Types.colimitCoconeIsColimit]
/-- 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
    intro x y
    cases' x with i x
    cases' y with j y
    rw [colimit_mul_mk_eq F ⟨i, x⟩ ⟨j, y⟩ (max' i j) (IsFiltered.leftToMax i j)
      (IsFiltered.rightToMax i j)]
    dsimp [Types.colimitCoconeIsColimit]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    

Proof state:
case mk.mk
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
t : Cocone F
i : J
x : (F ⋙ forget MonCat).obj i
j : J
y : (F ⋙ forget MonCat).obj j
⊢ (t.ι.app (IsFiltered.max i j)) ((F.map (IsFiltered.leftToMax i j)) x * (F.map (IsFiltered.rightToMax i j)) y) =
    (t.ι.app i) x * (t.ι.app j) y

Next tactic:
erw [MonoidHom.map_mul]
/-- 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
    intro x y
    cases' x with i x
    cases' y with j y
    rw [colimit_mul_mk_eq F ⟨i, x⟩ ⟨j, y⟩ (max' i j) (IsFiltered.leftToMax i j)
      (IsFiltered.rightToMax i j)]
    dsimp [Types.colimitCoconeIsColimit]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidHom.map_mul]
    -- Porting note : `rw` can't see through coercion is actually forgetful functor,
    -- so can't rewrite `t.w_apply`
    

Proof state:
case mk.mk
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
t : Cocone F
i : J
x : (F ⋙ forget MonCat).obj i
j : J
y : (F ⋙ forget MonCat).obj j
⊢ (t.ι.app (IsFiltered.max i j)) ((F.map (IsFiltered.leftToMax i j)) x) *
      (t.ι.app (IsFiltered.max i j)) ((F.map (IsFiltered.rightToMax i j)) y) =
    (t.ι.app i) x * (t.ι.app j) y

Next tactic:
congr 1
/-- 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
    intro x y
    cases' x with i x
    cases' y with j y
    rw [colimit_mul_mk_eq F ⟨i, x⟩ ⟨j, y⟩ (max' i j) (IsFiltered.leftToMax i j)
      (IsFiltered.rightToMax i j)]
    dsimp [Types.colimitCoconeIsColimit]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidHom.map_mul]
    -- Porting note : `rw` can't see through coercion is actually forgetful functor,
    -- so can't rewrite `t.w_apply`
    congr 1 <;>
    

Proof state:
case mk.mk.e_a
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
t : Cocone F
i : J
x : (F ⋙ forget MonCat).obj i
j : J
y : (F ⋙ forget MonCat).obj j
⊢ (t.ι.app (IsFiltered.max i j)) ((F.map (IsFiltered.leftToMax i j)) x) = (t.ι.app i) x

Next tactic:
exact t.w_apply _ _
/-- 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
    intro x y
    cases' x with i x
    cases' y with j y
    rw [colimit_mul_mk_eq F ⟨i, x⟩ ⟨j, y⟩ (max' i j) (IsFiltered.leftToMax i j)
      (IsFiltered.rightToMax i j)]
    dsimp [Types.colimitCoconeIsColimit]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidHom.map_mul]
    -- Porting note : `rw` can't see through coercion is actually forgetful functor,
    -- so can't rewrite `t.w_apply`
    congr 1 <;>
    

Proof state:
case mk.mk.e_a
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
t : Cocone F
i : J
x : (F ⋙ forget MonCat).obj i
j : J
y : (F ⋙ forget MonCat).obj j
⊢ (t.ι.app (IsFiltered.max i j)) ((F.map (IsFiltered.rightToMax i j)) y) = (t.ι.app j) y

Next tactic:
exact t.w_apply _ _
@[to_additive]
noncomputable instance colimitCommMonoid : CommMonoid.{max v u} (M.{v, u} F) :=
  { (M.{v, u} F) with
    mul_comm := fun x y => by
      

Proof state:
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ CommMonCat
src✝ : MonCat := M F
x y : ↑(M F)
⊢ x * y = y * x

Next tactic:
refine Quot.induction_on₂ x y ?_
@[to_additive]
noncomputable instance colimitCommMonoid : CommMonoid.{max v u} (M.{v, u} F) :=
  { (M.{v, u} F) with
    mul_comm := fun x y => by
      refine Quot.induction_on₂ x y ?_
      

Proof state:
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ CommMonCat
src✝ : MonCat := M F
x y : ↑(M F)
⊢ ∀ (a b : (j : J) × ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat).obj j),
    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) a *
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) b =
      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) b *
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) a

Next tactic:
clear x y
@[to_additive]
noncomputable instance colimitCommMonoid : CommMonoid.{max v u} (M.{v, u} F) :=
  { (M.{v, u} F) with
    mul_comm := fun x y => by
      refine Quot.induction_on₂ x y ?_
      clear x y
      

Proof state:
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ CommMonCat
src✝ : MonCat := M F
⊢ ∀ (a b : (j : J) × ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat).obj j),
    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) a *
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) b =
      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) b *
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) a

Next tactic:
intro x y
@[to_additive]
noncomputable instance colimitCommMonoid : CommMonoid.{max v u} (M.{v, u} F) :=
  { (M.{v, u} F) with
    mul_comm := fun x y => by
      refine Quot.induction_on₂ x y ?_
      clear x y
      intro x y
      

Proof state:
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ CommMonCat
src✝ : MonCat := M F
x y : (j : J) × ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat).obj j
⊢ Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) x *
      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) y =
    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) y *
      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) x

Next tactic:
let k := max' x.1 y.1
@[to_additive]
noncomputable instance colimitCommMonoid : CommMonoid.{max v u} (M.{v, u} F) :=
  { (M.{v, u} F) with
    mul_comm := fun x y => by
      refine Quot.induction_on₂ x y ?_
      clear x y
      intro x y
      let k := max' x.1 y.1
      

Proof state:
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ CommMonCat
src✝ : MonCat := M F
x y : (j : J) × ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat).obj j
k : J := IsFiltered.max x.fst y.fst
⊢ Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) x *
      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) y =
    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) y *
      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) x

Next tactic:
let f := IsFiltered.leftToMax x.1 y.1
@[to_additive]
noncomputable instance colimitCommMonoid : CommMonoid.{max v u} (M.{v, u} F) :=
  { (M.{v, u} F) with
    mul_comm := fun x y => by
      refine Quot.induction_on₂ x y ?_
      clear x y
      intro x y
      let k := max' x.1 y.1
      let f := IsFiltered.leftToMax x.1 y.1
      

Proof state:
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ CommMonCat
src✝ : MonCat := M F
x y : (j : J) × ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat).obj j
k : J := IsFiltered.max x.fst y.fst
f : x.fst ⟶ IsFiltered.max x.fst y.fst := IsFiltered.leftToMax x.fst y.fst
⊢ Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) x *
      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) y =
    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) y *
      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) x

Next tactic:
let g := IsFiltered.rightToMax x.1 y.1
@[to_additive]
noncomputable instance colimitCommMonoid : CommMonoid.{max v u} (M.{v, u} F) :=
  { (M.{v, u} F) with
    mul_comm := fun x y => by
      refine Quot.induction_on₂ x y ?_
      clear x y
      intro x y
      let k := max' x.1 y.1
      let f := IsFiltered.leftToMax x.1 y.1
      let g := IsFiltered.rightToMax x.1 y.1
      

Proof state:
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ CommMonCat
src✝ : MonCat := M F
x y : (j : J) × ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat).obj j
k : J := IsFiltered.max x.fst y.fst
f : x.fst ⟶ IsFiltered.max x.fst y.fst := IsFiltered.leftToMax x.fst y.fst
g : y.fst ⟶ IsFiltered.max x.fst y.fst := IsFiltered.rightToMax x.fst y.fst
⊢ Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) x *
      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) y =
    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) y *
      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat)) x

Next tactic:
rw [colimit_mul_mk_eq.{v, u} (F ⋙ forget₂ CommMonCat MonCat) x y k f g,
        colimit_mul_mk_eq.{v, u} (F ⋙ forget₂ CommMonCat MonCat) y x k g f]
@[to_additive]
noncomputable instance colimitCommMonoid : CommMonoid.{max v u} (M.{v, u} F) :=
  { (M.{v, u} F) with
    mul_comm := fun x y => by
      refine Quot.induction_on₂ x y ?_
      clear x y
      intro x y
      let k := max' x.1 y.1
      let f := IsFiltered.leftToMax x.1 y.1
      let g := IsFiltered.rightToMax x.1 y.1
      rw [colimit_mul_mk_eq.{v, u} (F ⋙ forget₂ CommMonCat MonCat) x y k f g,
        colimit_mul_mk_eq.{v, u} (F ⋙ forget₂ CommMonCat MonCat) y x k g f]
      

Proof state:
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ CommMonCat
src✝ : MonCat := M F
x y : (j : J) × ((F ⋙ forget₂ CommMonCat MonCat) ⋙ forget MonCat).obj j
k : J := IsFiltered.max x.fst y.fst
f : x.fst ⟶ IsFiltered.max x.fst y.fst := IsFiltered.leftToMax x.fst y.fst
g : y.fst ⟶ IsFiltered.max x.fst y.fst := IsFiltered.rightToMax x.fst y.fst
⊢ MonCat.FilteredColimits.M.mk (F ⋙ forget₂ CommMonCat MonCat)
      { fst := k,
        snd := ((F ⋙ forget₂ CommMonCat MonCat).map f) x.snd * ((F ⋙ forget₂ CommMonCat MonCat).map g) y.snd } =
    MonCat.FilteredColimits.M.mk (F ⋙ forget₂ CommMonCat MonCat)
      { fst := k, snd := ((F ⋙ forget₂ CommMonCat MonCat).map g) y.snd * ((F ⋙ forget₂ CommMonCat MonCat).map f) x.snd }

Next tactic:
dsimp