l3lab/ntp-mathlib huggingface dataset:
/-- 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⟩ := by
  

Proof state:
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
x y : (j : J) × ↑(F.obj j)
k : J
f : x.fst ⟶ k
g : y.fst ⟶ k
⊢ M.mk F x * M.mk F y = M.mk F { fst := k, snd := (F.map f) x.snd * (F.map g) y.snd }

Next tactic:
cases' x with j₁ x
/-- 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⟩ := by
  cases' x with j₁ x; 

Proof state:
case mk
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
y : (j : J) × ↑(F.obj j)
k : J
g : y.fst ⟶ k
j₁ : J
x : ↑(F.obj j₁)
f : { fst := j₁, snd := x }.fst ⟶ k
⊢ M.mk F { fst := j₁, snd := x } * M.mk F y =
    M.mk F { fst := k, snd := (F.map f) { fst := j₁, snd := x }.snd * (F.map g) y.snd }

Next tactic:
cases' y with j₂ y
/-- 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⟩ := by
  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
k j₁ : J
x : ↑(F.obj j₁)
f : { fst := j₁, snd := x }.fst ⟶ k
j₂ : J
y : ↑(F.obj j₂)
g : { fst := j₂, snd := y }.fst ⟶ k
⊢ M.mk F { fst := j₁, snd := x } * M.mk F { fst := j₂, snd := y } =
    M.mk F { fst := k, snd := (F.map f) { fst := j₁, snd := x }.snd * (F.map g) { fst := j₂, snd := y }.snd }

Next tactic:
obtain ⟨s, α, β, h₁, h₂⟩ := IsFiltered.bowtie (IsFiltered.leftToMax j₁ j₂) f
    (IsFiltered.rightToMax j₁ j₂) g
/-- 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⟩ := by
  cases' x with j₁ x; cases' y with j₂ y
  obtain ⟨s, α, β, h₁, h₂⟩ := IsFiltered.bowtie (IsFiltered.leftToMax j₁ j₂) f
    (IsFiltered.rightToMax j₁ j₂) g
  

Proof state:
case mk.mk.intro.intro.intro.intro
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
k j₁ : J
x : ↑(F.obj j₁)
f : { fst := j₁, snd := x }.fst ⟶ k
j₂ : J
y : ↑(F.obj j₂)
g : { fst := j₂, snd := y }.fst ⟶ k
s : J
α : IsFiltered.max j₁ j₂ ⟶ s
β : k ⟶ s
h₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β
h₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = g ≫ β
⊢ M.mk F { fst := j₁, snd := x } * M.mk F { fst := j₂, snd := y } =
    M.mk F { fst := k, snd := (F.map f) { fst := j₁, snd := x }.snd * (F.map g) { fst := j₂, snd := y }.snd }

Next tactic:
apply M.mk_eq
/-- 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⟩ := by
  cases' x with j₁ x; cases' y with j₂ y
  obtain ⟨s, α, β, h₁, h₂⟩ := IsFiltered.bowtie (IsFiltered.leftToMax j₁ j₂) f
    (IsFiltered.rightToMax j₁ j₂) g
  apply M.mk_eq
  

Proof state:
case mk.mk.intro.intro.intro.intro.h
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
k j₁ : J
x : ↑(F.obj j₁)
f : { fst := j₁, snd := x }.fst ⟶ k
j₂ : J
y : ↑(F.obj j₂)
g : { fst := j₂, snd := y }.fst ⟶ k
s : J
α : IsFiltered.max j₁ j₂ ⟶ s
β : k ⟶ s
h₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β
h₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = g ≫ β
⊢ ∃ k_1 f_1 g_1,
    (F.map f_1)
        { fst := IsFiltered.max { fst := j₁, snd := x }.fst { fst := j₂, snd := y }.fst,
            snd :=
              (F.map (IsFiltered.leftToMax { fst := j₁, snd := x }.fst { fst := j₂, snd := y }.fst))
                  { fst := j₁, snd := x }.snd *
                (F.map (IsFiltered.rightToMax { fst := j₁, snd := x }.fst { fst := j₂, snd := y }.fst))
                  { fst := j₂, snd := y }.snd }.snd =
      (F.map g_1) { fst := k, snd := (F.map f) { fst := j₁, snd := x }.snd * (F.map g) { fst := j₂, snd := y }.snd }.snd

Next tactic:
use s, α, β
/-- 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⟩ := by
  cases' x with j₁ x; cases' y with j₂ y
  obtain ⟨s, α, β, h₁, h₂⟩ := IsFiltered.bowtie (IsFiltered.leftToMax j₁ j₂) f
    (IsFiltered.rightToMax j₁ j₂) g
  apply M.mk_eq
  use s, α, β
  

Proof state:
case h
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
k j₁ : J
x : ↑(F.obj j₁)
f : { fst := j₁, snd := x }.fst ⟶ k
j₂ : J
y : ↑(F.obj j₂)
g : { fst := j₂, snd := y }.fst ⟶ k
s : J
α : IsFiltered.max j₁ j₂ ⟶ s
β : k ⟶ s
h₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β
h₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = g ≫ β
⊢ (F.map α)
      { fst := IsFiltered.max { fst := j₁, snd := x }.fst { fst := j₂, snd := y }.fst,
          snd :=
            (F.map (IsFiltered.leftToMax { fst := j₁, snd := x }.fst { fst := j₂, snd := y }.fst))
                { fst := j₁, snd := x }.snd *
              (F.map (IsFiltered.rightToMax { fst := j₁, snd := x }.fst { fst := j₂, snd := y }.fst))
                { fst := j₂, snd := y }.snd }.snd =
    (F.map β) { fst := k, snd := (F.map f) { fst := j₁, snd := x }.snd * (F.map g) { fst := j₂, snd := y }.snd }.snd

Next tactic:
dsimp
/-- 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⟩ := by
  cases' x with j₁ x; cases' y with j₂ y
  obtain ⟨s, α, β, h₁, h₂⟩ := IsFiltered.bowtie (IsFiltered.leftToMax j₁ j₂) f
    (IsFiltered.rightToMax j₁ j₂) g
  apply M.mk_eq
  use s, α, β
  dsimp
  

Proof state:
case h
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
k j₁ : J
x : ↑(F.obj j₁)
f : { fst := j₁, snd := x }.fst ⟶ k
j₂ : J
y : ↑(F.obj j₂)
g : { fst := j₂, snd := y }.fst ⟶ k
s : J
α : IsFiltered.max j₁ j₂ ⟶ s
β : k ⟶ s
h₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β
h₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = g ≫ β
⊢ (F.map α) ((F.map (IsFiltered.leftToMax j₁ j₂)) x * (F.map (IsFiltered.rightToMax j₁ j₂)) y) =
    (F.map β) ((F.map f) x * (F.map g) y)

Next tactic:
simp_rw [MonoidHom.map_mul]
/-- 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⟩ := by
  cases' x with j₁ x; cases' y with j₂ y
  obtain ⟨s, α, β, h₁, h₂⟩ := IsFiltered.bowtie (IsFiltered.leftToMax j₁ j₂) f
    (IsFiltered.rightToMax j₁ j₂) g
  apply M.mk_eq
  use s, α, β
  dsimp
  simp_rw [MonoidHom.map_mul]
  -- Porting note : Lean cannot seem to use lemmas from concrete categories directly
  

Proof state:
case h
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
k j₁ : J
x : ↑(F.obj j₁)
f : { fst := j₁, snd := x }.fst ⟶ k
j₂ : J
y : ↑(F.obj j₂)
g : { fst := j₂, snd := y }.fst ⟶ k
s : J
α : IsFiltered.max j₁ j₂ ⟶ s
β : k ⟶ s
h₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β
h₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = g ≫ β
⊢ (F.map α) ((F.map (IsFiltered.leftToMax j₁ j₂)) x) * (F.map α) ((F.map (IsFiltered.rightToMax j₁ j₂)) y) =
    (F.map β) ((F.map f) x) * (F.map β) ((F.map g) y)

Next tactic:
change (F.map _ ≫ F.map _) _ * (F.map _ ≫ F.map _) _ =
    (F.map _ ≫ F.map _) _ * (F.map _ ≫ F.map _) _
/-- 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⟩ := by
  cases' x with j₁ x; cases' y with j₂ y
  obtain ⟨s, α, β, h₁, h₂⟩ := IsFiltered.bowtie (IsFiltered.leftToMax j₁ j₂) f
    (IsFiltered.rightToMax j₁ j₂) g
  apply M.mk_eq
  use s, α, β
  dsimp
  simp_rw [MonoidHom.map_mul]
  -- Porting note : Lean cannot seem to use lemmas from concrete categories directly
  change (F.map _ ≫ F.map _) _ * (F.map _ ≫ F.map _) _ =
    (F.map _ ≫ F.map _) _ * (F.map _ ≫ F.map _) _
  

Proof state:
case h
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
k j₁ : J
x : ↑(F.obj j₁)
f : { fst := j₁, snd := x }.fst ⟶ k
j₂ : J
y : ↑(F.obj j₂)
g : { fst := j₂, snd := y }.fst ⟶ k
s : J
α : IsFiltered.max j₁ j₂ ⟶ s
β : k ⟶ s
h₁ : IsFiltered.leftToMax j₁ j₂ ≫ α = f ≫ β
h₂ : IsFiltered.rightToMax j₁ j₂ ≫ α = g ≫ β
⊢ (F.map (IsFiltered.leftToMax j₁ j₂) ≫ F.map α) x * (F.map (IsFiltered.rightToMax j₁ j₂) ≫ F.map α) y =
    (F.map f ≫ F.map β) x * (F.map g ≫ F.map β) y

Next tactic:
simp_rw [← F.map_comp, h₁, h₂]
@[to_additive]
noncomputable instance colimitMulOneClass : MulOneClass (M.{v, u} F) :=
  { colimitOne F,
    colimitMul F with
    one_mul := fun x => by
      

Proof state:
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
src✝¹ : One (M F) := colimitOne F
src✝ : Mul (M F) := colimitMul F
x : M F
⊢ 1 * x = x

Next tactic:
refine Quot.inductionOn x ?_
@[to_additive]
noncomputable instance colimitMulOneClass : MulOneClass (M.{v, u} F) :=
  { colimitOne F,
    colimitMul F with
    one_mul := fun x => by
      refine Quot.inductionOn x ?_
      

Proof state:
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
src✝¹ : One (M F) := colimitOne F
src✝ : Mul (M F) := colimitMul F
x : M F
⊢ ∀ (a : (j : J) × (F ⋙ forget MonCat).obj j),
    1 * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a = Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a

Next tactic:
intro x
@[to_additive]
noncomputable instance colimitMulOneClass : MulOneClass (M.{v, u} F) :=
  { colimitOne F,
    colimitMul F with
    one_mul := fun x => by
      refine Quot.inductionOn x ?_
      intro x
      

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

Next tactic:
cases' x with j x
@[to_additive]
noncomputable instance colimitMulOneClass : MulOneClass (M.{v, u} F) :=
  { colimitOne F,
    colimitMul F with
    one_mul := fun x => by
      refine Quot.inductionOn x ?_
      intro x
      cases' x with j x
      

Proof state:
case mk
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
src✝¹ : One (M F) := colimitOne F
src✝ : Mul (M F) := colimitMul F
x✝ : M F
j : J
x : (F ⋙ forget MonCat).obj j
⊢ 1 * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j, snd := x } =
    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j, snd := x }

Next tactic:
rw [colimit_one_eq F j, colimit_mul_mk_eq F ⟨j, 1⟩ ⟨j, x⟩ j (𝟙 j) (𝟙 j), MonoidHom.map_one,
        one_mul, F.map_id]
@[to_additive]
noncomputable instance colimitMulOneClass : MulOneClass (M.{v, u} F) :=
  { colimitOne F,
    colimitMul F with
    one_mul := fun x => by
      refine Quot.inductionOn x ?_
      intro x
      cases' x with j x
      rw [colimit_one_eq F j, colimit_mul_mk_eq F ⟨j, 1⟩ ⟨j, x⟩ j (𝟙 j) (𝟙 j), MonoidHom.map_one,
        one_mul, F.map_id]
      -- Porting note : `id_apply` does not work here, but the two sides are def-eq
      

Proof state:
case mk
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
src✝¹ : One (M F) := colimitOne F
src✝ : Mul (M F) := colimitMul F
x✝ : M F
j : J
x : (F ⋙ forget MonCat).obj j
⊢ M.mk F { fst := j, snd := (𝟙 (F.obj { fst := j, snd := x }.fst)) { fst := j, snd := x }.snd } =
    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j, snd := x }

Next tactic:
rfl
@[to_additive]
noncomputable instance colimitMulOneClass : MulOneClass (M.{v, u} F) :=
  { colimitOne F,
    colimitMul F with
    one_mul := fun x => by
      refine Quot.inductionOn x ?_
      intro x
      cases' x with j x
      rw [colimit_one_eq F j, colimit_mul_mk_eq F ⟨j, 1⟩ ⟨j, x⟩ j (𝟙 j) (𝟙 j), MonoidHom.map_one,
        one_mul, F.map_id]
      -- Porting note : `id_apply` does not work here, but the two sides are def-eq
      rfl
    mul_one := fun x => by
      

Proof state:
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
src✝¹ : One (M F) := colimitOne F
src✝ : Mul (M F) := colimitMul F
x : M F
⊢ x * 1 = x

Next tactic:
refine Quot.inductionOn x ?_
@[to_additive]
noncomputable instance colimitMulOneClass : MulOneClass (M.{v, u} F) :=
  { colimitOne F,
    colimitMul F with
    one_mul := fun x => by
      refine Quot.inductionOn x ?_
      intro x
      cases' x with j x
      rw [colimit_one_eq F j, colimit_mul_mk_eq F ⟨j, 1⟩ ⟨j, x⟩ j (𝟙 j) (𝟙 j), MonoidHom.map_one,
        one_mul, F.map_id]
      -- Porting note : `id_apply` does not work here, but the two sides are def-eq
      rfl
    mul_one := fun x => by
      refine Quot.inductionOn x ?_
      

Proof state:
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
src✝¹ : One (M F) := colimitOne F
src✝ : Mul (M F) := colimitMul F
x : M F
⊢ ∀ (a : (j : J) × (F ⋙ forget MonCat).obj j),
    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a * 1 = Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) a

Next tactic:
intro x
@[to_additive]
noncomputable instance colimitMulOneClass : MulOneClass (M.{v, u} F) :=
  { colimitOne F,
    colimitMul F with
    one_mul := fun x => by
      refine Quot.inductionOn x ?_
      intro x
      cases' x with j x
      rw [colimit_one_eq F j, colimit_mul_mk_eq F ⟨j, 1⟩ ⟨j, x⟩ j (𝟙 j) (𝟙 j), MonoidHom.map_one,
        one_mul, F.map_id]
      -- Porting note : `id_apply` does not work here, but the two sides are def-eq
      rfl
    mul_one := fun x => by
      refine Quot.inductionOn x ?_
      intro x
      

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

Next tactic:
cases' x with j x
@[to_additive]
noncomputable instance colimitMulOneClass : MulOneClass (M.{v, u} F) :=
  { colimitOne F,
    colimitMul F with
    one_mul := fun x => by
      refine Quot.inductionOn x ?_
      intro x
      cases' x with j x
      rw [colimit_one_eq F j, colimit_mul_mk_eq F ⟨j, 1⟩ ⟨j, x⟩ j (𝟙 j) (𝟙 j), MonoidHom.map_one,
        one_mul, F.map_id]
      -- Porting note : `id_apply` does not work here, but the two sides are def-eq
      rfl
    mul_one := fun x => by
      refine Quot.inductionOn x ?_
      intro x
      cases' x with j x
      

Proof state:
case mk
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
src✝¹ : One (M F) := colimitOne F
src✝ : Mul (M F) := colimitMul F
x✝ : M F
j : J
x : (F ⋙ forget MonCat).obj j
⊢ Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j, snd := x } * 1 =
    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j, snd := x }

Next tactic:
rw [colimit_one_eq F j, colimit_mul_mk_eq F ⟨j, x⟩ ⟨j, 1⟩ j (𝟙 j) (𝟙 j), MonoidHom.map_one,
        mul_one, F.map_id]
@[to_additive]
noncomputable instance colimitMulOneClass : MulOneClass (M.{v, u} F) :=
  { colimitOne F,
    colimitMul F with
    one_mul := fun x => by
      refine Quot.inductionOn x ?_
      intro x
      cases' x with j x
      rw [colimit_one_eq F j, colimit_mul_mk_eq F ⟨j, 1⟩ ⟨j, x⟩ j (𝟙 j) (𝟙 j), MonoidHom.map_one,
        one_mul, F.map_id]
      -- Porting note : `id_apply` does not work here, but the two sides are def-eq
      rfl
    mul_one := fun x => by
      refine Quot.inductionOn x ?_
      intro x
      cases' x with j x
      rw [colimit_one_eq F j, colimit_mul_mk_eq F ⟨j, x⟩ ⟨j, 1⟩ j (𝟙 j) (𝟙 j), MonoidHom.map_one,
        mul_one, F.map_id]
      -- Porting note : `id_apply` does not work here, but the two sides are def-eq
      

Proof state:
case mk
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
src✝¹ : One (M F) := colimitOne F
src✝ : Mul (M F) := colimitMul F
x✝ : M F
j : J
x : (F ⋙ forget MonCat).obj j
⊢ M.mk F { fst := j, snd := (𝟙 (F.obj { fst := j, snd := x }.fst)) { fst := j, snd := x }.snd } =
    Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) { fst := j, snd := x }

Next tactic:
rfl
@[to_additive]
noncomputable instance colimitMonoid : Monoid (M.{v, u} F) :=
  { colimitMulOneClass F with
    mul_assoc := fun x y z => by
      

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

Next tactic:
refine Quot.induction_on₃ x y 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 ?_
      

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

Next tactic:
clear x y 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
      

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

Next tactic:
intro x y 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
      

Proof state:
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ MonCat
inst✝ : IsFiltered J
src✝ : MulOneClass (M F) := colimitMulOneClass F
x y z : (j : J) × (F ⋙ forget MonCat).obj j
⊢ Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) 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)) x *
      (Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) y * Quot.mk (Types.Quot.Rel (F ⋙ forget MonCat)) z)

Next tactic:
cases' x with j₁ x