l3lab/ntp-mathlib huggingface dataset:
theorem isClosedMap_smul_left (c : E) : IsClosedMap fun x : 𝕜 => x • c := by
  by_cases hc : c = 0
  · 

Proof state:
case pos
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝¹³ : NontriviallyNormedField 𝕜
inst✝¹² : CompleteSpace 𝕜
inst✝¹¹ : AddCommGroup E
inst✝¹⁰ : TopologicalSpace E
inst✝⁹ : T2Space E
inst✝⁸ : TopologicalAddGroup E
inst✝⁷ : Module 𝕜 E
inst✝⁶ : ContinuousSMul 𝕜 E
inst✝⁵ : AddCommGroup F
inst✝⁴ : TopologicalSpace F
inst✝³ : T2Space F
inst✝² : TopologicalAddGroup F
inst✝¹ : Module 𝕜 F
inst✝ : ContinuousSMul 𝕜 F
c : E
hc : c = 0
⊢ IsClosedMap fun x => x • c

Next tactic:
simp_rw [hc, smul_zero]
theorem isClosedMap_smul_left (c : E) : IsClosedMap fun x : 𝕜 => x • c := by
  by_cases hc : c = 0
  · simp_rw [hc, smul_zero]
    

Proof state:
case pos
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝¹³ : NontriviallyNormedField 𝕜
inst✝¹² : CompleteSpace 𝕜
inst✝¹¹ : AddCommGroup E
inst✝¹⁰ : TopologicalSpace E
inst✝⁹ : T2Space E
inst✝⁸ : TopologicalAddGroup E
inst✝⁷ : Module 𝕜 E
inst✝⁶ : ContinuousSMul 𝕜 E
inst✝⁵ : AddCommGroup F
inst✝⁴ : TopologicalSpace F
inst✝³ : T2Space F
inst✝² : TopologicalAddGroup F
inst✝¹ : Module 𝕜 F
inst✝ : ContinuousSMul 𝕜 F
c : E
hc : c = 0
⊢ IsClosedMap fun x => 0

Next tactic:
exact isClosedMap_const
theorem isClosedMap_smul_left (c : E) : IsClosedMap fun x : 𝕜 => x • c := by
  by_cases hc : c = 0
  · simp_rw [hc, smul_zero]
    exact isClosedMap_const
  · 

Proof state:
case neg
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝¹³ : NontriviallyNormedField 𝕜
inst✝¹² : CompleteSpace 𝕜
inst✝¹¹ : AddCommGroup E
inst✝¹⁰ : TopologicalSpace E
inst✝⁹ : T2Space E
inst✝⁸ : TopologicalAddGroup E
inst✝⁷ : Module 𝕜 E
inst✝⁶ : ContinuousSMul 𝕜 E
inst✝⁵ : AddCommGroup F
inst✝⁴ : TopologicalSpace F
inst✝³ : T2Space F
inst✝² : TopologicalAddGroup F
inst✝¹ : Module 𝕜 F
inst✝ : ContinuousSMul 𝕜 F
c : E
hc : ¬c = 0
⊢ IsClosedMap fun x => x • c

Next tactic:
exact (closedEmbedding_smul_left hc).isClosedMap
theorem Finset.Nonempty.sup'_eq_cSup_image {s : Finset β} (hs : s.Nonempty) (f : β → α) :
    s.sup' hs f = sSup (f '' s) :=
  eq_of_forall_ge_iff fun a => by
    

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : ConditionallyCompleteLattice α
s✝ t : Set α
a✝ b : α
s : Finset β
hs : Finset.Nonempty s
f : β → α
a : α
⊢ sup' s hs f ≤ a ↔ sSup (f '' ↑s) ≤ a

Next tactic:
simp [csSup_le_iff (s.finite_toSet.image f).bddAbove (hs.to_set.image f)]
theorem Finset.Nonempty.sup'_id_eq_cSup {s : Finset α} (hs : s.Nonempty) :
    s.sup' hs id = sSup s := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : ConditionallyCompleteLattice α
s✝ t : Set α
a b : α
s : Finset α
hs : Finset.Nonempty s
⊢ sup' s hs id = sSup ↑s

Next tactic:
rw [hs.sup'_eq_cSup_image, Set.image_id]
theorem Finset.Nonempty.cSup_mem {s : Finset α} (h : s.Nonempty) : sSup (s : Set α) ∈ s := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : ConditionallyCompleteLinearOrder α
s✝ t : Set α
a b : α
s : Finset α
h : Finset.Nonempty s
⊢ sSup ↑s ∈ s

Next tactic:
rw [h.cSup_eq_max']
theorem Finset.Nonempty.cSup_mem {s : Finset α} (h : s.Nonempty) : sSup (s : Set α) ∈ s := by
  rw [h.cSup_eq_max']
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : ConditionallyCompleteLinearOrder α
s✝ t : Set α
a b : α
s : Finset α
h : Finset.Nonempty s
⊢ max' s h ∈ s

Next tactic:
exact s.max'_mem _
theorem Set.Nonempty.cSup_mem (h : s.Nonempty) (hs : s.Finite) : sSup s ∈ s := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : ConditionallyCompleteLinearOrder α
s t : Set α
a b : α
h : Set.Nonempty s
hs : Set.Finite s
⊢ sSup s ∈ s

Next tactic:
lift s to Finset α using hs
theorem Set.Nonempty.cSup_mem (h : s.Nonempty) (hs : s.Finite) : sSup s ∈ s := by
  lift s to Finset α using hs
  

Proof state:
case intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : ConditionallyCompleteLinearOrder α
t : Set α
a b : α
s : Finset α
h : Set.Nonempty ↑s
⊢ sSup ↑s ∈ ↑s

Next tactic:
exact Finset.Nonempty.cSup_mem h
theorem sup'_eq_csSup_image [ConditionallyCompleteLattice β] (s : Finset α) (H) (f : α → β) :
    s.sup' H f = sSup (f '' s) := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : ConditionallyCompleteLattice β
s : Finset α
H : Finset.Nonempty s
f : α → β
⊢ sup' s H f = sSup (f '' ↑s)

Next tactic:
apply le_antisymm
theorem sup'_eq_csSup_image [ConditionallyCompleteLattice β] (s : Finset α) (H) (f : α → β) :
    s.sup' H f = sSup (f '' s) := by
  apply le_antisymm
  · 

Proof state:
case a
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : ConditionallyCompleteLattice β
s : Finset α
H : Finset.Nonempty s
f : α → β
⊢ sup' s H f ≤ sSup (f '' ↑s)

Next tactic:
refine' Finset.sup'_le _ _ fun a ha => _
theorem sup'_eq_csSup_image [ConditionallyCompleteLattice β] (s : Finset α) (H) (f : α → β) :
    s.sup' H f = sSup (f '' s) := by
  apply le_antisymm
  · refine' Finset.sup'_le _ _ fun a ha => _
    

Proof state:
case a
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : ConditionallyCompleteLattice β
s : Finset α
H : Finset.Nonempty s
f : α → β
a : α
ha : a ∈ s
⊢ f a ≤ sSup (f '' ↑s)

Next tactic:
refine' le_csSup ⟨s.sup' H f, _⟩ ⟨a, ha, rfl⟩
theorem sup'_eq_csSup_image [ConditionallyCompleteLattice β] (s : Finset α) (H) (f : α → β) :
    s.sup' H f = sSup (f '' s) := by
  apply le_antisymm
  · refine' Finset.sup'_le _ _ fun a ha => _
    refine' le_csSup ⟨s.sup' H f, _⟩ ⟨a, ha, rfl⟩
    

Proof state:
case a
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : ConditionallyCompleteLattice β
s : Finset α
H : Finset.Nonempty s
f : α → β
a : α
ha : a ∈ s
⊢ sup' s H f ∈ upperBounds (f '' ↑s)

Next tactic:
rintro i ⟨j, hj, rfl⟩
theorem sup'_eq_csSup_image [ConditionallyCompleteLattice β] (s : Finset α) (H) (f : α → β) :
    s.sup' H f = sSup (f '' s) := by
  apply le_antisymm
  · refine' Finset.sup'_le _ _ fun a ha => _
    refine' le_csSup ⟨s.sup' H f, _⟩ ⟨a, ha, rfl⟩
    rintro i ⟨j, hj, rfl⟩
    

Proof state:
case a.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : ConditionallyCompleteLattice β
s : Finset α
H : Finset.Nonempty s
f : α → β
a : α
ha : a ∈ s
j : α
hj : j ∈ ↑s
⊢ f j ≤ sup' s H f

Next tactic:
exact Finset.le_sup' _ hj
theorem sup'_eq_csSup_image [ConditionallyCompleteLattice β] (s : Finset α) (H) (f : α → β) :
    s.sup' H f = sSup (f '' s) := by
  apply le_antisymm
  · refine' Finset.sup'_le _ _ fun a ha => _
    refine' le_csSup ⟨s.sup' H f, _⟩ ⟨a, ha, rfl⟩
    rintro i ⟨j, hj, rfl⟩
    exact Finset.le_sup' _ hj
  · 

Proof state:
case a
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : ConditionallyCompleteLattice β
s : Finset α
H : Finset.Nonempty s
f : α → β
⊢ sSup (f '' ↑s) ≤ sup' s H f

Next tactic:
apply csSup_le ((coe_nonempty.mpr H).image _)
theorem sup'_eq_csSup_image [ConditionallyCompleteLattice β] (s : Finset α) (H) (f : α → β) :
    s.sup' H f = sSup (f '' s) := by
  apply le_antisymm
  · refine' Finset.sup'_le _ _ fun a ha => _
    refine' le_csSup ⟨s.sup' H f, _⟩ ⟨a, ha, rfl⟩
    rintro i ⟨j, hj, rfl⟩
    exact Finset.le_sup' _ hj
  · apply csSup_le ((coe_nonempty.mpr H).image _)
    

Proof state:
case a
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : ConditionallyCompleteLattice β
s : Finset α
H : Finset.Nonempty s
f : α → β
⊢ ∀ b ∈ f '' ↑s, b ≤ sup' s H f

Next tactic:
rintro _ ⟨a, ha, rfl⟩
theorem sup'_eq_csSup_image [ConditionallyCompleteLattice β] (s : Finset α) (H) (f : α → β) :
    s.sup' H f = sSup (f '' s) := by
  apply le_antisymm
  · refine' Finset.sup'_le _ _ fun a ha => _
    refine' le_csSup ⟨s.sup' H f, _⟩ ⟨a, ha, rfl⟩
    rintro i ⟨j, hj, rfl⟩
    exact Finset.le_sup' _ hj
  · apply csSup_le ((coe_nonempty.mpr H).image _)
    rintro _ ⟨a, ha, rfl⟩
    

Proof state:
case a.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : ConditionallyCompleteLattice β
s : Finset α
H : Finset.Nonempty s
f : α → β
a : α
ha : a ∈ ↑s
⊢ f a ≤ sup' s H f

Next tactic:
exact Finset.le_sup' _ ha
theorem sup'_id_eq_csSup [ConditionallyCompleteLattice α] (s : Finset α) (H) :
    s.sup' H id = sSup s := by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : ConditionallyCompleteLattice α
s : Finset α
H : Finset.Nonempty s
⊢ sup' s H id = sSup ↑s

Next tactic:
rw [sup'_eq_csSup_image s H, Set.image_id]
instance semiringObj (j : J) :
    Semiring (((F ⋙ forget₂ SemiRingCatMax.{v, u} MonCat) ⋙ forget MonCat).obj j) :=
  show Semiring (F.obj j) by 

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ SemiRingCatMax
j : J
⊢ Semiring ↑(F.obj j)

Next tactic:
infer_instance
instance colimitSemiring : Semiring.{max v u} <| R.{v, u} F :=
  { (R.{v, u} F).str,
    AddCommMonCat.FilteredColimits.colimitAddCommMonoid
      (F ⋙ forget₂ SemiRingCat AddCommMonCat.{max v u}) with
    mul_zero := fun x => by
      refine Quot.inductionOn x ?_; clear x; intro x
      cases' x with j x
      erw [colimit_zero_eq _ j, colimit_mul_mk_eq _ ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j)]
      rw [CategoryTheory.Functor.map_id]
      dsimp
      rw [mul_zero x]
      rfl
    zero_mul := fun x => by
      refine Quot.inductionOn x ?_; clear x; intro x
      cases' x with j x
      erw [colimit_zero_eq _ j, colimit_mul_mk_eq _ ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j)]
      rw [CategoryTheory.Functor.map_id]
      dsimp
      rw [zero_mul x]
      rfl
    left_distrib := fun x y z => by
      

Proof state:
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ SemiRingCatMax
inst✝ : IsFiltered J
src✝¹ : Monoid ↑(R F) := (R F).str
src✝ : AddCommMonoid ↑(AddCommMonCat.FilteredColimits.M (F ⋙ forget₂ SemiRingCat AddCommMonCat)) :=
  AddCommMonCat.FilteredColimits.colimitAddCommMonoid (F ⋙ forget₂ SemiRingCat AddCommMonCat)
x y z : ↑(R F)
⊢ x * (y + z) = x * y + x * z

Next tactic:
refine Quot.induction_on₃ x y z ?_
instance colimitSemiring : Semiring.{max v u} <| R.{v, u} F :=
  { (R.{v, u} F).str,
    AddCommMonCat.FilteredColimits.colimitAddCommMonoid
      (F ⋙ forget₂ SemiRingCat AddCommMonCat.{max v u}) with
    mul_zero := fun x => by
      refine Quot.inductionOn x ?_; clear x; intro x
      cases' x with j x
      erw [colimit_zero_eq _ j, colimit_mul_mk_eq _ ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j)]
      rw [CategoryTheory.Functor.map_id]
      dsimp
      rw [mul_zero x]
      rfl
    zero_mul := fun x => by
      refine Quot.inductionOn x ?_; clear x; intro x
      cases' x with j x
      erw [colimit_zero_eq _ j, colimit_mul_mk_eq _ ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j)]
      rw [CategoryTheory.Functor.map_id]
      dsimp
      rw [zero_mul x]
      rfl
    left_distrib := fun x y z => by
      refine Quot.induction_on₃ x y z ?_; 

Proof state:
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ SemiRingCatMax
inst✝ : IsFiltered J
src✝¹ : Monoid ↑(R F) := (R F).str
src✝ : AddCommMonoid ↑(AddCommMonCat.FilteredColimits.M (F ⋙ forget₂ SemiRingCat AddCommMonCat)) :=
  AddCommMonCat.FilteredColimits.colimitAddCommMonoid (F ⋙ forget₂ SemiRingCat AddCommMonCat)
x y z : ↑(R F)
⊢ ∀ (a b c : (j : J) × ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat).obj j),
    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) a *
        (Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) b +
          Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) c) =
      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) a *
          Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) b +
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) a *
          Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) c

Next tactic:
clear x y z
instance colimitSemiring : Semiring.{max v u} <| R.{v, u} F :=
  { (R.{v, u} F).str,
    AddCommMonCat.FilteredColimits.colimitAddCommMonoid
      (F ⋙ forget₂ SemiRingCat AddCommMonCat.{max v u}) with
    mul_zero := fun x => by
      refine Quot.inductionOn x ?_; clear x; intro x
      cases' x with j x
      erw [colimit_zero_eq _ j, colimit_mul_mk_eq _ ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j)]
      rw [CategoryTheory.Functor.map_id]
      dsimp
      rw [mul_zero x]
      rfl
    zero_mul := fun x => by
      refine Quot.inductionOn x ?_; clear x; intro x
      cases' x with j x
      erw [colimit_zero_eq _ j, colimit_mul_mk_eq _ ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j)]
      rw [CategoryTheory.Functor.map_id]
      dsimp
      rw [zero_mul x]
      rfl
    left_distrib := 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 ⥤ SemiRingCatMax
inst✝ : IsFiltered J
src✝¹ : Monoid ↑(R F) := (R F).str
src✝ : AddCommMonoid ↑(AddCommMonCat.FilteredColimits.M (F ⋙ forget₂ SemiRingCat AddCommMonCat)) :=
  AddCommMonCat.FilteredColimits.colimitAddCommMonoid (F ⋙ forget₂ SemiRingCat AddCommMonCat)
⊢ ∀ (a b c : (j : J) × ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat).obj j),
    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) a *
        (Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) b +
          Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) c) =
      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) a *
          Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) b +
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) a *
          Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) c

Next tactic:
intro x y z
instance colimitSemiring : Semiring.{max v u} <| R.{v, u} F :=
  { (R.{v, u} F).str,
    AddCommMonCat.FilteredColimits.colimitAddCommMonoid
      (F ⋙ forget₂ SemiRingCat AddCommMonCat.{max v u}) with
    mul_zero := fun x => by
      refine Quot.inductionOn x ?_; clear x; intro x
      cases' x with j x
      erw [colimit_zero_eq _ j, colimit_mul_mk_eq _ ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j)]
      rw [CategoryTheory.Functor.map_id]
      dsimp
      rw [mul_zero x]
      rfl
    zero_mul := fun x => by
      refine Quot.inductionOn x ?_; clear x; intro x
      cases' x with j x
      erw [colimit_zero_eq _ j, colimit_mul_mk_eq _ ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j)]
      rw [CategoryTheory.Functor.map_id]
      dsimp
      rw [zero_mul x]
      rfl
    left_distrib := 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 ⥤ SemiRingCatMax
inst✝ : IsFiltered J
src✝¹ : Monoid ↑(R F) := (R F).str
src✝ : AddCommMonoid ↑(AddCommMonCat.FilteredColimits.M (F ⋙ forget₂ SemiRingCat AddCommMonCat)) :=
  AddCommMonCat.FilteredColimits.colimitAddCommMonoid (F ⋙ forget₂ SemiRingCat AddCommMonCat)
x y z : (j : J) × ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat).obj j
⊢ Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) x *
      (Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) y +
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) z) =
    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) x *
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) y +
      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) x *
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) z

Next tactic:
cases' x with j₁ x
instance colimitSemiring : Semiring.{max v u} <| R.{v, u} F :=
  { (R.{v, u} F).str,
    AddCommMonCat.FilteredColimits.colimitAddCommMonoid
      (F ⋙ forget₂ SemiRingCat AddCommMonCat.{max v u}) with
    mul_zero := fun x => by
      refine Quot.inductionOn x ?_; clear x; intro x
      cases' x with j x
      erw [colimit_zero_eq _ j, colimit_mul_mk_eq _ ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j)]
      rw [CategoryTheory.Functor.map_id]
      dsimp
      rw [mul_zero x]
      rfl
    zero_mul := fun x => by
      refine Quot.inductionOn x ?_; clear x; intro x
      cases' x with j x
      erw [colimit_zero_eq _ j, colimit_mul_mk_eq _ ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j)]
      rw [CategoryTheory.Functor.map_id]
      dsimp
      rw [zero_mul x]
      rfl
    left_distrib := 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 ⥤ SemiRingCatMax
inst✝ : IsFiltered J
src✝¹ : Monoid ↑(R F) := (R F).str
src✝ : AddCommMonoid ↑(AddCommMonCat.FilteredColimits.M (F ⋙ forget₂ SemiRingCat AddCommMonCat)) :=
  AddCommMonCat.FilteredColimits.colimitAddCommMonoid (F ⋙ forget₂ SemiRingCat AddCommMonCat)
y z : (j : J) × ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat).obj j
j₁ : J
x : ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat).obj j₁
⊢ Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₁, snd := x } *
      (Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) y +
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) z) =
    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₁, snd := x } *
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) y +
      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₁, snd := x } *
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) z

Next tactic:
cases' y with j₂ y
instance colimitSemiring : Semiring.{max v u} <| R.{v, u} F :=
  { (R.{v, u} F).str,
    AddCommMonCat.FilteredColimits.colimitAddCommMonoid
      (F ⋙ forget₂ SemiRingCat AddCommMonCat.{max v u}) with
    mul_zero := fun x => by
      refine Quot.inductionOn x ?_; clear x; intro x
      cases' x with j x
      erw [colimit_zero_eq _ j, colimit_mul_mk_eq _ ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j)]
      rw [CategoryTheory.Functor.map_id]
      dsimp
      rw [mul_zero x]
      rfl
    zero_mul := fun x => by
      refine Quot.inductionOn x ?_; clear x; intro x
      cases' x with j x
      erw [colimit_zero_eq _ j, colimit_mul_mk_eq _ ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j)]
      rw [CategoryTheory.Functor.map_id]
      dsimp
      rw [zero_mul x]
      rfl
    left_distrib := 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 ⥤ SemiRingCatMax
inst✝ : IsFiltered J
src✝¹ : Monoid ↑(R F) := (R F).str
src✝ : AddCommMonoid ↑(AddCommMonCat.FilteredColimits.M (F ⋙ forget₂ SemiRingCat AddCommMonCat)) :=
  AddCommMonCat.FilteredColimits.colimitAddCommMonoid (F ⋙ forget₂ SemiRingCat AddCommMonCat)
z : (j : J) × ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat).obj j
j₁ : J
x : ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat).obj j₁
j₂ : J
y : ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat).obj j₂
⊢ Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₁, snd := x } *
      (Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₂, snd := y } +
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) z) =
    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₁, snd := x } *
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₂, snd := y } +
      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₁, snd := x } *
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) z

Next tactic:
cases' z with j₃ z
instance colimitSemiring : Semiring.{max v u} <| R.{v, u} F :=
  { (R.{v, u} F).str,
    AddCommMonCat.FilteredColimits.colimitAddCommMonoid
      (F ⋙ forget₂ SemiRingCat AddCommMonCat.{max v u}) with
    mul_zero := fun x => by
      refine Quot.inductionOn x ?_; clear x; intro x
      cases' x with j x
      erw [colimit_zero_eq _ j, colimit_mul_mk_eq _ ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j)]
      rw [CategoryTheory.Functor.map_id]
      dsimp
      rw [mul_zero x]
      rfl
    zero_mul := fun x => by
      refine Quot.inductionOn x ?_; clear x; intro x
      cases' x with j x
      erw [colimit_zero_eq _ j, colimit_mul_mk_eq _ ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j)]
      rw [CategoryTheory.Functor.map_id]
      dsimp
      rw [zero_mul x]
      rfl
    left_distrib := 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 ⥤ SemiRingCatMax
inst✝ : IsFiltered J
src✝¹ : Monoid ↑(R F) := (R F).str
src✝ : AddCommMonoid ↑(AddCommMonCat.FilteredColimits.M (F ⋙ forget₂ SemiRingCat AddCommMonCat)) :=
  AddCommMonCat.FilteredColimits.colimitAddCommMonoid (F ⋙ forget₂ SemiRingCat AddCommMonCat)
j₁ : J
x : ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat).obj j₁
j₂ : J
y : ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat).obj j₂
j₃ : J
z : ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat).obj j₃
⊢ Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₁, snd := x } *
      (Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₂, snd := y } +
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₃, snd := z }) =
    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₁, snd := x } *
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₂, snd := y } +
      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₁, snd := x } *
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₃, snd := z }

Next tactic:
let k := IsFiltered.max₃ j₁ j₂ j₃
instance colimitSemiring : Semiring.{max v u} <| R.{v, u} F :=
  { (R.{v, u} F).str,
    AddCommMonCat.FilteredColimits.colimitAddCommMonoid
      (F ⋙ forget₂ SemiRingCat AddCommMonCat.{max v u}) with
    mul_zero := fun x => by
      refine Quot.inductionOn x ?_; clear x; intro x
      cases' x with j x
      erw [colimit_zero_eq _ j, colimit_mul_mk_eq _ ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j)]
      rw [CategoryTheory.Functor.map_id]
      dsimp
      rw [mul_zero x]
      rfl
    zero_mul := fun x => by
      refine Quot.inductionOn x ?_; clear x; intro x
      cases' x with j x
      erw [colimit_zero_eq _ j, colimit_mul_mk_eq _ ⟨j, _⟩ ⟨j, _⟩ j (𝟙 j) (𝟙 j)]
      rw [CategoryTheory.Functor.map_id]
      dsimp
      rw [zero_mul x]
      rfl
    left_distrib := 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
      let k := IsFiltered.max₃ j₁ j₂ j₃
      

Proof state:
case mk.mk.mk
J : Type v
inst✝¹ : SmallCategory J
F : J ⥤ SemiRingCatMax
inst✝ : IsFiltered J
src✝¹ : Monoid ↑(R F) := (R F).str
src✝ : AddCommMonoid ↑(AddCommMonCat.FilteredColimits.M (F ⋙ forget₂ SemiRingCat AddCommMonCat)) :=
  AddCommMonCat.FilteredColimits.colimitAddCommMonoid (F ⋙ forget₂ SemiRingCat AddCommMonCat)
j₁ : J
x : ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat).obj j₁
j₂ : J
y : ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat).obj j₂
j₃ : J
z : ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat).obj j₃
k : J := IsFiltered.max₃ j₁ j₂ j₃
⊢ Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₁, snd := x } *
      (Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₂, snd := y } +
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₃, snd := z }) =
    Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₁, snd := x } *
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₂, snd := y } +
      Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₁, snd := x } *
        Quot.mk (Types.Quot.Rel ((F ⋙ forget₂ SemiRingCatMax MonCat) ⋙ forget MonCat)) { fst := j₃, snd := z }

Next tactic:
let f := IsFiltered.firstToMax₃ j₁ j₂ j₃