l3lab/ntp-mathlib huggingface dataset:
instance module' {V : Type*} [NormedAddCommGroup V] [NormedSpace 𝕜 V] :
    Module C^∞⟮I, N; 𝓘(𝕜), 𝕜⟯ C^∞⟮I, N; 𝓘(𝕜, V), V⟯ where
  smul := (· • ·)
  smul_add c f g := by ext x; exact smul_add (c x) (f x) (g x)
  add_smul c₁ c₂ f := by ext x; exact add_smul (c₁ x) (c₂ x) (f x)
  mul_smul c₁ c₂ f := by ext x; exact mul_smul (c₁ x) (c₂ x) (f x)
  one_smul f := by ext x; exact one_smul 𝕜 (f x)
  zero_smul f := by ext x; 

Proof state:
case h
𝕜 : Type u_1
inst✝¹⁵ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁴ : NormedAddCommGroup E
inst✝¹³ : NormedSpace 𝕜 E
E' : Type u_3
inst✝¹² : NormedAddCommGroup E'
inst✝¹¹ : NormedSpace 𝕜 E'
H : Type u_4
inst✝¹⁰ : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
H' : Type u_5
inst✝⁹ : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
N : Type u_6
inst✝⁸ : TopologicalSpace N
inst✝⁷ : ChartedSpace H N
E'' : Type u_7
inst✝⁶ : NormedAddCommGroup E''
inst✝⁵ : NormedSpace 𝕜 E''
H'' : Type u_8
inst✝⁴ : TopologicalSpace H''
I'' : ModelWithCorners 𝕜 E'' H''
N' : Type u_9
inst✝³ : TopologicalSpace N'
inst✝² : ChartedSpace H'' N'
V : Type u_10
inst✝¹ : NormedAddCommGroup V
inst✝ : NormedSpace 𝕜 V
f : C^⊤⟮I, N; 𝓘(𝕜, V), V⟯
x : N
⊢ (0 • f) x = 0 x

Next tactic:
exact zero_smul _ _
instance : CommRing (ColimitType.{v} F) :=
  { ColimitType.AddGroupWithOne F with
    mul := Quot.map₂ Prequotient.mul Relation.mul_2 Relation.mul_1
    one_mul := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.one_mul _
    mul_one := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.mul_one _
    add_comm := fun x y => Quot.induction_on₂ x y fun x y => Quot.sound <| Relation.add_comm _ _
    mul_comm := fun x y => Quot.induction_on₂ x y fun x y => Quot.sound <| Relation.mul_comm _ _
    mul_assoc := fun x y z => Quot.induction_on₃ x y z fun x y z => by
      simp only [(· * ·)]
      exact Quot.sound (Relation.mul_assoc _ _ _)
    mul_zero := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.mul_zero _
    zero_mul := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.zero_mul _
    left_distrib := fun x y z => Quot.induction_on₃ x y z fun x y z => by
      

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
src✝ : AddGroupWithOne (ColimitType F) := ColimitType.AddGroupWithOne F
x✝ y✝ z✝ : ColimitType F
x y z : Prequotient F
⊢ Quot.mk Setoid.r x * (Quot.mk Setoid.r y + Quot.mk Setoid.r z) =
    Quot.mk Setoid.r x * Quot.mk Setoid.r y + Quot.mk Setoid.r x * Quot.mk Setoid.r z

Next tactic:
simp only [(· + ·), (· * ·), Add.add]
instance : CommRing (ColimitType.{v} F) :=
  { ColimitType.AddGroupWithOne F with
    mul := Quot.map₂ Prequotient.mul Relation.mul_2 Relation.mul_1
    one_mul := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.one_mul _
    mul_one := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.mul_one _
    add_comm := fun x y => Quot.induction_on₂ x y fun x y => Quot.sound <| Relation.add_comm _ _
    mul_comm := fun x y => Quot.induction_on₂ x y fun x y => Quot.sound <| Relation.mul_comm _ _
    mul_assoc := fun x y z => Quot.induction_on₃ x y z fun x y z => by
      simp only [(· * ·)]
      exact Quot.sound (Relation.mul_assoc _ _ _)
    mul_zero := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.mul_zero _
    zero_mul := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.zero_mul _
    left_distrib := fun x y z => Quot.induction_on₃ x y z fun x y z => by
      simp only [(· + ·), (· * ·), Add.add]
      

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
src✝ : AddGroupWithOne (ColimitType F) := ColimitType.AddGroupWithOne F
x✝ y✝ z✝ : ColimitType F
x y z : Prequotient F
⊢ Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))
      (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y)) (Quot.mk Setoid.r x)
      (Quotient.map₂ add (_ : ∀ (x x' : Prequotient F), x ≈ x' → ∀ (y y' : Prequotient F), y ≈ y' → add x y ≈ add x' y')
        (Quot.mk Setoid.r y) (Quot.mk Setoid.r z)) =
    Quotient.map₂ add (_ : ∀ (x x' : Prequotient F), x ≈ x' → ∀ (y y' : Prequotient F), y ≈ y' → add x y ≈ add x' y')
      (Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))
        (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y)) (Quot.mk Setoid.r x)
        (Quot.mk Setoid.r y))
      (Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))
        (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y)) (Quot.mk Setoid.r x)
        (Quot.mk Setoid.r z))

Next tactic:
exact Quot.sound (Relation.left_distrib _ _ _)
instance : CommRing (ColimitType.{v} F) :=
  { ColimitType.AddGroupWithOne F with
    mul := Quot.map₂ Prequotient.mul Relation.mul_2 Relation.mul_1
    one_mul := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.one_mul _
    mul_one := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.mul_one _
    add_comm := fun x y => Quot.induction_on₂ x y fun x y => Quot.sound <| Relation.add_comm _ _
    mul_comm := fun x y => Quot.induction_on₂ x y fun x y => Quot.sound <| Relation.mul_comm _ _
    mul_assoc := fun x y z => Quot.induction_on₃ x y z fun x y z => by
      simp only [(· * ·)]
      exact Quot.sound (Relation.mul_assoc _ _ _)
    mul_zero := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.mul_zero _
    zero_mul := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.zero_mul _
    left_distrib := fun x y z => Quot.induction_on₃ x y z fun x y z => by
      simp only [(· + ·), (· * ·), Add.add]
      exact Quot.sound (Relation.left_distrib _ _ _)
    right_distrib := fun x y z => Quot.induction_on₃ x y z fun x y z => by
      

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
src✝ : AddGroupWithOne (ColimitType F) := ColimitType.AddGroupWithOne F
x✝ y✝ z✝ : ColimitType F
x y z : Prequotient F
⊢ (Quot.mk Setoid.r x + Quot.mk Setoid.r y) * Quot.mk Setoid.r z =
    Quot.mk Setoid.r x * Quot.mk Setoid.r z + Quot.mk Setoid.r y * Quot.mk Setoid.r z

Next tactic:
simp only [(· + ·), (· * ·), Add.add]
instance : CommRing (ColimitType.{v} F) :=
  { ColimitType.AddGroupWithOne F with
    mul := Quot.map₂ Prequotient.mul Relation.mul_2 Relation.mul_1
    one_mul := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.one_mul _
    mul_one := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.mul_one _
    add_comm := fun x y => Quot.induction_on₂ x y fun x y => Quot.sound <| Relation.add_comm _ _
    mul_comm := fun x y => Quot.induction_on₂ x y fun x y => Quot.sound <| Relation.mul_comm _ _
    mul_assoc := fun x y z => Quot.induction_on₃ x y z fun x y z => by
      simp only [(· * ·)]
      exact Quot.sound (Relation.mul_assoc _ _ _)
    mul_zero := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.mul_zero _
    zero_mul := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.zero_mul _
    left_distrib := fun x y z => Quot.induction_on₃ x y z fun x y z => by
      simp only [(· + ·), (· * ·), Add.add]
      exact Quot.sound (Relation.left_distrib _ _ _)
    right_distrib := fun x y z => Quot.induction_on₃ x y z fun x y z => by
      simp only [(· + ·), (· * ·), Add.add]
      

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
src✝ : AddGroupWithOne (ColimitType F) := ColimitType.AddGroupWithOne F
x✝ y✝ z✝ : ColimitType F
x y z : Prequotient F
⊢ Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))
      (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y))
      (Quotient.map₂ add (_ : ∀ (x x' : Prequotient F), x ≈ x' → ∀ (y y' : Prequotient F), y ≈ y' → add x y ≈ add x' y')
        (Quot.mk Setoid.r x) (Quot.mk Setoid.r y))
      (Quot.mk Setoid.r z) =
    Quotient.map₂ add (_ : ∀ (x x' : Prequotient F), x ≈ x' → ∀ (y y' : Prequotient F), y ≈ y' → add x y ≈ add x' y')
      (Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))
        (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y)) (Quot.mk Setoid.r x)
        (Quot.mk Setoid.r z))
      (Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))
        (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y)) (Quot.mk Setoid.r y)
        (Quot.mk Setoid.r z))

Next tactic:
exact Quot.sound (Relation.right_distrib _ _ _)
instance : CommRing (ColimitType.{v} F) :=
  { ColimitType.AddGroupWithOne F with
    mul := Quot.map₂ Prequotient.mul Relation.mul_2 Relation.mul_1
    one_mul := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.one_mul _
    mul_one := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.mul_one _
    add_comm := fun x y => Quot.induction_on₂ x y fun x y => Quot.sound <| Relation.add_comm _ _
    mul_comm := fun x y => Quot.induction_on₂ x y fun x y => Quot.sound <| Relation.mul_comm _ _
    mul_assoc := fun x y z => Quot.induction_on₃ x y z fun x y z => by
      

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
src✝ : AddGroupWithOne (ColimitType F) := ColimitType.AddGroupWithOne F
x✝ y✝ z✝ : ColimitType F
x y z : Prequotient F
⊢ Quot.mk Setoid.r x * Quot.mk Setoid.r y * Quot.mk Setoid.r z =
    Quot.mk Setoid.r x * (Quot.mk Setoid.r y * Quot.mk Setoid.r z)

Next tactic:
simp only [(· * ·)]
instance : CommRing (ColimitType.{v} F) :=
  { ColimitType.AddGroupWithOne F with
    mul := Quot.map₂ Prequotient.mul Relation.mul_2 Relation.mul_1
    one_mul := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.one_mul _
    mul_one := fun x => Quot.inductionOn x fun x => Quot.sound <| Relation.mul_one _
    add_comm := fun x y => Quot.induction_on₂ x y fun x y => Quot.sound <| Relation.add_comm _ _
    mul_comm := fun x y => Quot.induction_on₂ x y fun x y => Quot.sound <| Relation.mul_comm _ _
    mul_assoc := fun x y z => Quot.induction_on₃ x y z fun x y z => by
      simp only [(· * ·)]
      

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
src✝ : AddGroupWithOne (ColimitType F) := ColimitType.AddGroupWithOne F
x✝ y✝ z✝ : ColimitType F
x y z : Prequotient F
⊢ Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))
      (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y))
      (Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))
        (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y)) (Quot.mk Setoid.r x)
        (Quot.mk Setoid.r y))
      (Quot.mk Setoid.r z) =
    Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))
      (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y)) (Quot.mk Setoid.r x)
      (Quot.map₂ mul (_ : ∀ (x y y' : Prequotient F), Relation F y y' → Relation F (mul x y) (mul x y'))
        (_ : ∀ (x x' y : Prequotient F), Relation F x x' → Relation F (mul x y) (mul x' y)) (Quot.mk Setoid.r y)
        (Quot.mk Setoid.r z))

Next tactic:
exact Quot.sound (Relation.mul_assoc _ _ _)
@[simp]
theorem quot_neg (x : Prequotient F) :
    -- Porting note : Lean can't see `Quot.mk Setoid.r x` is a `ColimitType F` even with type
    -- annotation unless we use `by exact` to change the elaboration order.
    (by 

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
x : Prequotient F
⊢ ColimitType F

Next tactic:
exact Quot.mk Setoid.r (neg x)
@[simp]
theorem quot_neg (x : Prequotient F) :
    -- Porting note : Lean can't see `Quot.mk Setoid.r x` is a `ColimitType F` even with type
    -- annotation unless we use `by exact` to change the elaboration order.
    (by exact Quot.mk Setoid.r (neg x) : ColimitType F) = -(by 

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
x : Prequotient F
⊢ ColimitType F

Next tactic:
exact Quot.mk Setoid.r x
@[simp]
theorem quot_add (x y) :
    (by 

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
x : ?m.32726
y : ?m.32729
⊢ ColimitType F

Next tactic:
exact Quot.mk Setoid.r (add x y)
@[simp]
theorem quot_add (x y) :
    (by exact Quot.mk Setoid.r (add x y) : ColimitType F) =
      (by 

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
x y : Prequotient F
⊢ ColimitType F

Next tactic:
exact Quot.mk _ x
@[simp]
theorem quot_add (x y) :
    (by exact Quot.mk Setoid.r (add x y) : ColimitType F) =
      (by exact Quot.mk _ x) + (by 

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
x y : Prequotient F
⊢ ColimitType F

Next tactic:
exact Quot.mk _ y
@[simp]
theorem quot_mul (x y) :
    (by 

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
x : ?m.33246
y : ?m.33249
⊢ ColimitType F

Next tactic:
exact Quot.mk Setoid.r (mul x y)
@[simp]
theorem quot_mul (x y) :
    (by exact Quot.mk Setoid.r (mul x y) : ColimitType F) =
      (by 

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
x y : Prequotient F
⊢ ColimitType F

Next tactic:
exact Quot.mk _ x
@[simp]
theorem quot_mul (x y) :
    (by exact Quot.mk Setoid.r (mul x y) : ColimitType F) =
      (by exact Quot.mk _ x) * (by 

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
x y : Prequotient F
⊢ ColimitType F

Next tactic:
exact Quot.mk _ y
/-- The ring homomorphism from a given commutative ring in the diagram to the colimit commutative
ring. -/
def coconeMorphism (j : J) : F.obj j ⟶ colimit F where
  toFun := coconeFun F j
  map_one' := by 

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
j : J
⊢ coconeFun F j 1 = 1

Next tactic:
apply Quot.sound
/-- The ring homomorphism from a given commutative ring in the diagram to the colimit commutative
ring. -/
def coconeMorphism (j : J) : F.obj j ⟶ colimit F where
  toFun := coconeFun F j
  map_one' := by apply Quot.sound; 

Proof state:
case a
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
j : J
⊢ Setoid.r (Prequotient.of j 1) one

Next tactic:
apply Relation.one
/-- The ring homomorphism from a given commutative ring in the diagram to the colimit commutative
ring. -/
def coconeMorphism (j : J) : F.obj j ⟶ colimit F where
  toFun := coconeFun F j
  map_one' := by apply Quot.sound; apply Relation.one
  map_mul' := by 

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
j : J
⊢ ∀ (x y : ↑(F.obj j)),
    OneHom.toFun
        { toFun := coconeFun F j, map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) }
        (x * y) =
      OneHom.toFun
          { toFun := coconeFun F j, map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) } x *
        OneHom.toFun
          { toFun := coconeFun F j, map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) } y

Next tactic:
intros
/-- The ring homomorphism from a given commutative ring in the diagram to the colimit commutative
ring. -/
def coconeMorphism (j : J) : F.obj j ⟶ colimit F where
  toFun := coconeFun F j
  map_one' := by apply Quot.sound; apply Relation.one
  map_mul' := by intros; 

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
j : J
x✝ y✝ : ↑(F.obj j)
⊢ OneHom.toFun
      { toFun := coconeFun F j, map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) }
      (x✝ * y✝) =
    OneHom.toFun
        { toFun := coconeFun F j, map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) } x✝ *
      OneHom.toFun
        { toFun := coconeFun F j, map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) } y✝

Next tactic:
apply Quot.sound
/-- The ring homomorphism from a given commutative ring in the diagram to the colimit commutative
ring. -/
def coconeMorphism (j : J) : F.obj j ⟶ colimit F where
  toFun := coconeFun F j
  map_one' := by apply Quot.sound; apply Relation.one
  map_mul' := by intros; apply Quot.sound; 

Proof state:
case a
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
j : J
x✝ y✝ : ↑(F.obj j)
⊢ Setoid.r (Prequotient.of j (x✝ * y✝)) (mul (Prequotient.of j x✝) (Prequotient.of j y✝))

Next tactic:
apply Relation.mul
/-- The ring homomorphism from a given commutative ring in the diagram to the colimit commutative
ring. -/
def coconeMorphism (j : J) : F.obj j ⟶ colimit F where
  toFun := coconeFun F j
  map_one' := by apply Quot.sound; apply Relation.one
  map_mul' := by intros; apply Quot.sound; apply Relation.mul
  map_zero' := by 

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
j : J
⊢ OneHom.toFun
      (↑{
          toOneHom :=
            { toFun := coconeFun F j, map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) },
          map_mul' :=
            (_ :
              ∀ (x y : ↑(F.obj j)),
                Quot.mk Setoid.r (Prequotient.of j (x * y)) =
                  Quot.mk Setoid.r (mul (Prequotient.of j x) (Prequotient.of j y))) })
      0 =
    0

Next tactic:
apply Quot.sound
/-- The ring homomorphism from a given commutative ring in the diagram to the colimit commutative
ring. -/
def coconeMorphism (j : J) : F.obj j ⟶ colimit F where
  toFun := coconeFun F j
  map_one' := by apply Quot.sound; apply Relation.one
  map_mul' := by intros; apply Quot.sound; apply Relation.mul
  map_zero' := by apply Quot.sound; 

Proof state:
case a
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
j : J
⊢ Setoid.r (Prequotient.of j 0) zero

Next tactic:
apply Relation.zero
/-- The ring homomorphism from a given commutative ring in the diagram to the colimit commutative
ring. -/
def coconeMorphism (j : J) : F.obj j ⟶ colimit F where
  toFun := coconeFun F j
  map_one' := by apply Quot.sound; apply Relation.one
  map_mul' := by intros; apply Quot.sound; apply Relation.mul
  map_zero' := by apply Quot.sound; apply Relation.zero
  map_add' := by 

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
j : J
⊢ ∀ (x y : ↑(F.obj j)),
    OneHom.toFun
        (↑{
            toOneHom :=
              { toFun := coconeFun F j,
                map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) },
            map_mul' :=
              (_ :
                ∀ (x y : ↑(F.obj j)),
                  Quot.mk Setoid.r (Prequotient.of j (x * y)) =
                    Quot.mk Setoid.r (mul (Prequotient.of j x) (Prequotient.of j y))) })
        (x + y) =
      OneHom.toFun
          (↑{
              toOneHom :=
                { toFun := coconeFun F j,
                  map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) },
              map_mul' :=
                (_ :
                  ∀ (x y : ↑(F.obj j)),
                    Quot.mk Setoid.r (Prequotient.of j (x * y)) =
                      Quot.mk Setoid.r (mul (Prequotient.of j x) (Prequotient.of j y))) })
          x +
        OneHom.toFun
          (↑{
              toOneHom :=
                { toFun := coconeFun F j,
                  map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) },
              map_mul' :=
                (_ :
                  ∀ (x y : ↑(F.obj j)),
                    Quot.mk Setoid.r (Prequotient.of j (x * y)) =
                      Quot.mk Setoid.r (mul (Prequotient.of j x) (Prequotient.of j y))) })
          y

Next tactic:
intros
/-- The ring homomorphism from a given commutative ring in the diagram to the colimit commutative
ring. -/
def coconeMorphism (j : J) : F.obj j ⟶ colimit F where
  toFun := coconeFun F j
  map_one' := by apply Quot.sound; apply Relation.one
  map_mul' := by intros; apply Quot.sound; apply Relation.mul
  map_zero' := by apply Quot.sound; apply Relation.zero
  map_add' := by intros; 

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
j : J
x✝ y✝ : ↑(F.obj j)
⊢ OneHom.toFun
      (↑{
          toOneHom :=
            { toFun := coconeFun F j, map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) },
          map_mul' :=
            (_ :
              ∀ (x y : ↑(F.obj j)),
                Quot.mk Setoid.r (Prequotient.of j (x * y)) =
                  Quot.mk Setoid.r (mul (Prequotient.of j x) (Prequotient.of j y))) })
      (x✝ + y✝) =
    OneHom.toFun
        (↑{
            toOneHom :=
              { toFun := coconeFun F j,
                map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) },
            map_mul' :=
              (_ :
                ∀ (x y : ↑(F.obj j)),
                  Quot.mk Setoid.r (Prequotient.of j (x * y)) =
                    Quot.mk Setoid.r (mul (Prequotient.of j x) (Prequotient.of j y))) })
        x✝ +
      OneHom.toFun
        (↑{
            toOneHom :=
              { toFun := coconeFun F j,
                map_one' := (_ : Quot.mk Setoid.r (Prequotient.of j 1) = Quot.mk Setoid.r one) },
            map_mul' :=
              (_ :
                ∀ (x y : ↑(F.obj j)),
                  Quot.mk Setoid.r (Prequotient.of j (x * y)) =
                    Quot.mk Setoid.r (mul (Prequotient.of j x) (Prequotient.of j y))) })
        y✝

Next tactic:
apply Quot.sound
/-- The ring homomorphism from a given commutative ring in the diagram to the colimit commutative
ring. -/
def coconeMorphism (j : J) : F.obj j ⟶ colimit F where
  toFun := coconeFun F j
  map_one' := by apply Quot.sound; apply Relation.one
  map_mul' := by intros; apply Quot.sound; apply Relation.mul
  map_zero' := by apply Quot.sound; apply Relation.zero
  map_add' := by intros; apply Quot.sound; 

Proof state:
case a
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
j : J
x✝ y✝ : ↑(F.obj j)
⊢ Setoid.r (Prequotient.of j (x✝ + y✝)) (add (Prequotient.of j x✝) (Prequotient.of j y✝))

Next tactic:
apply Relation.add
@[simp]
theorem cocone_naturality {j j' : J} (f : j ⟶ j') :
    F.map f ≫ coconeMorphism F j' = coconeMorphism F j := by
  

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
j j' : J
f : j ⟶ j'
⊢ F.map f ≫ coconeMorphism F j' = coconeMorphism F j

Next tactic:
ext
@[simp]
theorem cocone_naturality {j j' : J} (f : j ⟶ j') :
    F.map f ≫ coconeMorphism F j' = coconeMorphism F j := by
  ext
  

Proof state:
case w
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
j j' : J
f : j ⟶ j'
x✝ : (forget CommRingCat).obj (F.obj j)
⊢ (F.map f ≫ coconeMorphism F j') x✝ = (coconeMorphism F j) x✝

Next tactic:
apply Quot.sound
@[simp]
theorem cocone_naturality {j j' : J} (f : j ⟶ j') :
    F.map f ≫ coconeMorphism F j' = coconeMorphism F j := by
  ext
  apply Quot.sound
  

Proof state:
case w.a
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
j j' : J
f : j ⟶ j'
x✝ : (forget CommRingCat).obj (F.obj j)
⊢ Setoid.r (Prequotient.of j' ((F.map f) x✝)) (Prequotient.of j x✝)

Next tactic:
apply Relation.map
@[simp]
theorem cocone_naturality_components (j j' : J) (f : j ⟶ j') (x : F.obj j) :
    (coconeMorphism F j') (F.map f x) = (coconeMorphism F j) x := by
  

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
j j' : J
f : j ⟶ j'
x : ↑(F.obj j)
⊢ (coconeMorphism F j') ((F.map f) x) = (coconeMorphism F j) x

Next tactic:
rw [← cocone_naturality F f, comp_apply]
/-- The function from the colimit commutative ring to the cone point of any other cocone. -/
def descFun (s : Cocone F) : ColimitType F → s.pt := by
  

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
⊢ ColimitType F → ↑s.pt

Next tactic:
fapply Quot.lift
/-- The function from the colimit commutative ring to the cone point of any other cocone. -/
def descFun (s : Cocone F) : ColimitType F → s.pt := by
  fapply Quot.lift
  · 

Proof state:
case f
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
⊢ Prequotient F → ↑s.pt

Next tactic:
exact descFunLift F s
/-- The function from the colimit commutative ring to the cone point of any other cocone. -/
def descFun (s : Cocone F) : ColimitType F → s.pt := by
  fapply Quot.lift
  · exact descFunLift F s
  · 

Proof state:
case a
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
⊢ ∀ (a b : Prequotient F), Setoid.r a b → descFunLift F s a = descFunLift F s b

Next tactic:
intro x y r