l3lab/ntp-mathlib huggingface dataset:
/-- 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
  · intro x y r
    induction r with
    | refl => rfl
    | symm x y _ ih => exact ih.symm
    | trans x y z _ _ ih1 ih2 => exact ih1.trans ih2
    | map j j' f x => exact RingHom.congr_fun (s.ι.naturality f) x
    | zero j => simp
    | one j => simp
    | neg j x => simp
    | add j x y => simp
    | mul j x y => simp
    | neg_1 x x' r ih => dsimp; rw [ih]
    | add_1 x x' y r ih => dsimp; rw [ih]
    | add_2 x y y' r ih => dsimp; rw [ih]
    | mul_1 x x' y r ih => dsimp; rw [ih]
    | mul_2 x y y' r ih => dsimp; rw [ih]
    | zero_add x => dsimp; rw [zero_add]
    | add_zero x => dsimp; rw [add_zero]
    | one_mul x => dsimp; rw [one_mul]
    | mul_one x => dsimp; rw [mul_one]
    | add_left_neg x => dsimp; rw [add_left_neg]
    | add_comm x y => dsimp; rw [add_comm]
    | mul_comm x y => dsimp; rw [mul_comm]
    | add_assoc x y z => dsimp; rw [add_assoc]
    | mul_assoc x y z => dsimp; rw [mul_assoc]
    | left_distrib x y z => dsimp; rw [mul_add]
    | right_distrib x y z => dsimp; rw [add_mul]
    | zero_mul x => dsimp; rw [zero_mul]
    | mul_zero x => 

Proof state:
case a.mul_zero
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x✝ y x : Prequotient F
⊢ descFunLift F s (mul x zero) = descFunLift F s zero

Next tactic:
dsimp
/-- 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
  · intro x y r
    induction r with
    | refl => rfl
    | symm x y _ ih => exact ih.symm
    | trans x y z _ _ ih1 ih2 => exact ih1.trans ih2
    | map j j' f x => exact RingHom.congr_fun (s.ι.naturality f) x
    | zero j => simp
    | one j => simp
    | neg j x => simp
    | add j x y => simp
    | mul j x y => simp
    | neg_1 x x' r ih => dsimp; rw [ih]
    | add_1 x x' y r ih => dsimp; rw [ih]
    | add_2 x y y' r ih => dsimp; rw [ih]
    | mul_1 x x' y r ih => dsimp; rw [ih]
    | mul_2 x y y' r ih => dsimp; rw [ih]
    | zero_add x => dsimp; rw [zero_add]
    | add_zero x => dsimp; rw [add_zero]
    | one_mul x => dsimp; rw [one_mul]
    | mul_one x => dsimp; rw [mul_one]
    | add_left_neg x => dsimp; rw [add_left_neg]
    | add_comm x y => dsimp; rw [add_comm]
    | mul_comm x y => dsimp; rw [mul_comm]
    | add_assoc x y z => dsimp; rw [add_assoc]
    | mul_assoc x y z => dsimp; rw [mul_assoc]
    | left_distrib x y z => dsimp; rw [mul_add]
    | right_distrib x y z => dsimp; rw [add_mul]
    | zero_mul x => dsimp; rw [zero_mul]
    | mul_zero x => dsimp; 

Proof state:
case a.mul_zero
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x✝ y x : Prequotient F
⊢ descFunLift F s x * 0 = 0

Next tactic:
rw [mul_zero]
/-- The ring homomorphism from the colimit commutative ring to the cone point of any other
cocone. -/
def descMorphism (s : Cocone F) : colimit F ⟶ s.pt where
  toFun := descFun F s
  map_one' := rfl
  map_zero' := rfl
  map_add' x y := by
    refine Quot.induction_on₂ x y fun a b => ?_
    dsimp [descFun]
    rw [← quot_add]
    rfl
  map_mul' x y := by 

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x y : ↑(colimit F)
⊢ OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (x * y) =
    OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } x *
      OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } y

Next tactic:
exact Quot.induction_on₂ x y fun a b => rfl
/-- The ring homomorphism from the colimit commutative ring to the cone point of any other
cocone. -/
def descMorphism (s : Cocone F) : colimit F ⟶ s.pt where
  toFun := descFun F s
  map_one' := rfl
  map_zero' := rfl
  map_add' x y := by
    

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x y : ↑(colimit F)
⊢ OneHom.toFun
      (↑{ toOneHom := { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) },
          map_mul' :=
            (_ :
              ∀ (x y : ↑(colimit F)),
                OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (x * y) =
                  OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } x *
                    OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } y) })
      (x + y) =
    OneHom.toFun
        (↑{ toOneHom := { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) },
            map_mul' :=
              (_ :
                ∀ (x y : ↑(colimit F)),
                  OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (x * y) =
                    OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } x *
                      OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } y) })
        x +
      OneHom.toFun
        (↑{ toOneHom := { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) },
            map_mul' :=
              (_ :
                ∀ (x y : ↑(colimit F)),
                  OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (x * y) =
                    OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } x *
                      OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } y) })
        y

Next tactic:
refine Quot.induction_on₂ x y fun a b => ?_
/-- The ring homomorphism from the colimit commutative ring to the cone point of any other
cocone. -/
def descMorphism (s : Cocone F) : colimit F ⟶ s.pt where
  toFun := descFun F s
  map_one' := rfl
  map_zero' := rfl
  map_add' x y := by
    refine Quot.induction_on₂ x y fun a b => ?_
    

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x y : ↑(colimit F)
a b : Prequotient F
⊢ OneHom.toFun
      (↑{ toOneHom := { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) },
          map_mul' :=
            (_ :
              ∀ (x y : ↑(colimit F)),
                OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (x * y) =
                  OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } x *
                    OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } y) })
      (Quot.mk Setoid.r a + Quot.mk Setoid.r b) =
    OneHom.toFun
        (↑{ toOneHom := { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) },
            map_mul' :=
              (_ :
                ∀ (x y : ↑(colimit F)),
                  OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (x * y) =
                    OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } x *
                      OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } y) })
        (Quot.mk Setoid.r a) +
      OneHom.toFun
        (↑{ toOneHom := { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) },
            map_mul' :=
              (_ :
                ∀ (x y : ↑(colimit F)),
                  OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } (x * y) =
                    OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } x *
                      OneHom.toFun { toFun := descFun F s, map_one' := (_ : descFun F s 1 = descFun F s 1) } y) })
        (Quot.mk Setoid.r b)

Next tactic:
dsimp [descFun]
/-- The ring homomorphism from the colimit commutative ring to the cone point of any other
cocone. -/
def descMorphism (s : Cocone F) : colimit F ⟶ s.pt where
  toFun := descFun F s
  map_one' := rfl
  map_zero' := rfl
  map_add' x y := by
    refine Quot.induction_on₂ x y fun a b => ?_
    dsimp [descFun]
    

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x y : ↑(colimit F)
a b : Prequotient F
⊢ Quot.lift (descFunLift F s) (_ : ∀ (x y : Prequotient F), Setoid.r x y → descFunLift F s x = descFunLift F s y)
      (Quot.mk Setoid.r a + Quot.mk Setoid.r b) =
    descFunLift F s a + descFunLift F s b

Next tactic:
rw [← quot_add]
/-- The ring homomorphism from the colimit commutative ring to the cone point of any other
cocone. -/
def descMorphism (s : Cocone F) : colimit F ⟶ s.pt where
  toFun := descFun F s
  map_one' := rfl
  map_zero' := rfl
  map_add' x y := by
    refine Quot.induction_on₂ x y fun a b => ?_
    dsimp [descFun]
    rw [← quot_add]
    

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x y : ↑(colimit F)
a b : Prequotient F
⊢ Quot.lift (descFunLift F s) (_ : ∀ (x y : Prequotient F), Setoid.r x y → descFunLift F s x = descFunLift F s y)
      (Quot.mk Setoid.r (add a b)) =
    descFunLift F s a + descFunLift F s b

Next tactic:
rfl
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := RingHom.ext fun x => by
    

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
m : (colimitCocone F).pt ⟶ s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
x : ↑(colimitCocone F).pt
⊢ m x = ((fun s => descMorphism F s) s) x

Next tactic:
change (colimitCocone F).pt →+* s.pt at m
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := RingHom.ext fun x => by
    change (colimitCocone F).pt →+* s.pt at m
    

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x : ↑(colimitCocone F).pt
m : ↑(colimitCocone F).pt →+* ↑s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
⊢ m x = ((fun s => descMorphism F s) s) x

Next tactic:
refine Quot.inductionOn x ?_
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := RingHom.ext fun x => by
    change (colimitCocone F).pt →+* s.pt at m
    refine Quot.inductionOn x ?_
    

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x : ↑(colimitCocone F).pt
m : ↑(colimitCocone F).pt →+* ↑s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
⊢ ∀ (a : Prequotient F), m (Quot.mk Setoid.r a) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r a)

Next tactic:
intro x
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := RingHom.ext fun x => by
    change (colimitCocone F).pt →+* s.pt at m
    refine Quot.inductionOn x ?_
    intro x
    

Proof state:
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x✝ : ↑(colimitCocone F).pt
m : ↑(colimitCocone F).pt →+* ↑s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
x : Prequotient F
⊢ m (Quot.mk Setoid.r x) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)

Next tactic:
induction x with
    | zero => erw [quot_zero, map_zero (f := m), (descMorphism F s).map_zero]
    | one => erw [quot_one, map_one (f := m), (descMorphism F s).map_one]
    -- extra rfl with leanprover/lean4#2644
    | neg x ih => erw [quot_neg, map_neg (f := m), (descMorphism F s).map_neg, ih]; rfl
    | of j x =>
      exact congr_fun (congr_arg (fun f : F.obj j ⟶ s.pt => (f : F.obj j → s.pt)) (w j)) x
    | add x y ih_x ih_y =>
    -- extra rfl with leanprover/lean4#2644
        erw [quot_add, map_add (f := m), (descMorphism F s).map_add, ih_x, ih_y]; rfl
    | mul x y ih_x ih_y =>
    -- extra rfl with leanprover/lean4#2644
        erw [quot_mul, map_mul (f := m), (descMorphism F s).map_mul, ih_x, ih_y]; rfl
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := RingHom.ext fun x => by
    change (colimitCocone F).pt →+* s.pt at m
    refine Quot.inductionOn x ?_
    intro x
    induction x with
    

Proof state:
case zero
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x : ↑(colimitCocone F).pt
m : ↑(colimitCocone F).pt →+* ↑s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
⊢ m (Quot.mk Setoid.r zero) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r zero)

Next tactic:
| zero => erw [quot_zero, map_zero (f := m), (descMorphism F s).map_zero]
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := RingHom.ext fun x => by
    change (colimitCocone F).pt →+* s.pt at m
    refine Quot.inductionOn x ?_
    intro x
    induction x with
    | zero => 

Proof state:
case zero
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x : ↑(colimitCocone F).pt
m : ↑(colimitCocone F).pt →+* ↑s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
⊢ m (Quot.mk Setoid.r zero) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r zero)

Next tactic:
erw [quot_zero, map_zero (f := m), (descMorphism F s).map_zero]
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := RingHom.ext fun x => by
    change (colimitCocone F).pt →+* s.pt at m
    refine Quot.inductionOn x ?_
    intro x
    induction x with
    | zero => erw [quot_zero, map_zero (f := m), (descMorphism F s).map_zero]
    

Proof state:
case one
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x : ↑(colimitCocone F).pt
m : ↑(colimitCocone F).pt →+* ↑s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
⊢ m (Quot.mk Setoid.r one) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r one)

Next tactic:
| one => erw [quot_one, map_one (f := m), (descMorphism F s).map_one]
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := RingHom.ext fun x => by
    change (colimitCocone F).pt →+* s.pt at m
    refine Quot.inductionOn x ?_
    intro x
    induction x with
    | zero => erw [quot_zero, map_zero (f := m), (descMorphism F s).map_zero]
    | one => 

Proof state:
case one
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x : ↑(colimitCocone F).pt
m : ↑(colimitCocone F).pt →+* ↑s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
⊢ m (Quot.mk Setoid.r one) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r one)

Next tactic:
erw [quot_one, map_one (f := m), (descMorphism F s).map_one]
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := RingHom.ext fun x => by
    change (colimitCocone F).pt →+* s.pt at m
    refine Quot.inductionOn x ?_
    intro x
    induction x with
    | zero => erw [quot_zero, map_zero (f := m), (descMorphism F s).map_zero]
    | one => erw [quot_one, map_one (f := m), (descMorphism F s).map_one]
    -- extra rfl with leanprover/lean4#2644
    

Proof state:
case neg
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x✝ : ↑(colimitCocone F).pt
m : ↑(colimitCocone F).pt →+* ↑s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
x : Prequotient F
ih : m (Quot.mk Setoid.r x) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)
⊢ m (Quot.mk Setoid.r (neg x)) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r (neg x))

Next tactic:
| neg x ih => erw [quot_neg, map_neg (f := m), (descMorphism F s).map_neg, ih]; rfl
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := RingHom.ext fun x => by
    change (colimitCocone F).pt →+* s.pt at m
    refine Quot.inductionOn x ?_
    intro x
    induction x with
    | zero => erw [quot_zero, map_zero (f := m), (descMorphism F s).map_zero]
    | one => erw [quot_one, map_one (f := m), (descMorphism F s).map_one]
    -- extra rfl with leanprover/lean4#2644
    | neg x ih => 

Proof state:
case neg
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x✝ : ↑(colimitCocone F).pt
m : ↑(colimitCocone F).pt →+* ↑s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
x : Prequotient F
ih : m (Quot.mk Setoid.r x) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)
⊢ m (Quot.mk Setoid.r (neg x)) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r (neg x))

Next tactic:
erw [quot_neg, map_neg (f := m), (descMorphism F s).map_neg, ih]
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := RingHom.ext fun x => by
    change (colimitCocone F).pt →+* s.pt at m
    refine Quot.inductionOn x ?_
    intro x
    induction x with
    | zero => erw [quot_zero, map_zero (f := m), (descMorphism F s).map_zero]
    | one => erw [quot_one, map_one (f := m), (descMorphism F s).map_one]
    -- extra rfl with leanprover/lean4#2644
    | neg x ih => erw [quot_neg, map_neg (f := m), (descMorphism F s).map_neg, ih]; 

Proof state:
case neg
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x✝ : ↑(colimitCocone F).pt
m : ↑(colimitCocone F).pt →+* ↑s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
x : Prequotient F
ih : m (Quot.mk Setoid.r x) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)
⊢ -((fun s => descMorphism F s) s) (Quot.mk Setoid.r x) = -(descMorphism F s) (Quot.mk Setoid.r x)

Next tactic:
rfl
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := RingHom.ext fun x => by
    change (colimitCocone F).pt →+* s.pt at m
    refine Quot.inductionOn x ?_
    intro x
    induction x with
    | zero => erw [quot_zero, map_zero (f := m), (descMorphism F s).map_zero]
    | one => erw [quot_one, map_one (f := m), (descMorphism F s).map_one]
    -- extra rfl with leanprover/lean4#2644
    | neg x ih => erw [quot_neg, map_neg (f := m), (descMorphism F s).map_neg, ih]; rfl
    

Proof state:
case of
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x✝ : ↑(colimitCocone F).pt
m : ↑(colimitCocone F).pt →+* ↑s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
j : J
x : ↑(F.obj j)
⊢ m (Quot.mk Setoid.r (Prequotient.of j x)) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r (Prequotient.of j x))

Next tactic:
| of j x =>
      exact congr_fun (congr_arg (fun f : F.obj j ⟶ s.pt => (f : F.obj j → s.pt)) (w j)) x
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := RingHom.ext fun x => by
    change (colimitCocone F).pt →+* s.pt at m
    refine Quot.inductionOn x ?_
    intro x
    induction x with
    | zero => erw [quot_zero, map_zero (f := m), (descMorphism F s).map_zero]
    | one => erw [quot_one, map_one (f := m), (descMorphism F s).map_one]
    -- extra rfl with leanprover/lean4#2644
    | neg x ih => erw [quot_neg, map_neg (f := m), (descMorphism F s).map_neg, ih]; rfl
    | of j x =>
      

Proof state:
case of
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x✝ : ↑(colimitCocone F).pt
m : ↑(colimitCocone F).pt →+* ↑s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
j : J
x : ↑(F.obj j)
⊢ m (Quot.mk Setoid.r (Prequotient.of j x)) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r (Prequotient.of j x))

Next tactic:
exact congr_fun (congr_arg (fun f : F.obj j ⟶ s.pt => (f : F.obj j → s.pt)) (w j)) x
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := RingHom.ext fun x => by
    change (colimitCocone F).pt →+* s.pt at m
    refine Quot.inductionOn x ?_
    intro x
    induction x with
    | zero => erw [quot_zero, map_zero (f := m), (descMorphism F s).map_zero]
    | one => erw [quot_one, map_one (f := m), (descMorphism F s).map_one]
    -- extra rfl with leanprover/lean4#2644
    | neg x ih => erw [quot_neg, map_neg (f := m), (descMorphism F s).map_neg, ih]; rfl
    | of j x =>
      exact congr_fun (congr_arg (fun f : F.obj j ⟶ s.pt => (f : F.obj j → s.pt)) (w j)) x
    

Proof state:
case add
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x✝ : ↑(colimitCocone F).pt
m : ↑(colimitCocone F).pt →+* ↑s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
x y : Prequotient F
ih_x : m (Quot.mk Setoid.r x) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)
ih_y : m (Quot.mk Setoid.r y) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r y)
⊢ m (Quot.mk Setoid.r (add x y)) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r (add x y))

Next tactic:
| add x y ih_x ih_y =>
    -- extra rfl with leanprover/lean4#2644
        erw [quot_add, map_add (f := m), (descMorphism F s).map_add, ih_x, ih_y]; rfl
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := RingHom.ext fun x => by
    change (colimitCocone F).pt →+* s.pt at m
    refine Quot.inductionOn x ?_
    intro x
    induction x with
    | zero => erw [quot_zero, map_zero (f := m), (descMorphism F s).map_zero]
    | one => erw [quot_one, map_one (f := m), (descMorphism F s).map_one]
    -- extra rfl with leanprover/lean4#2644
    | neg x ih => erw [quot_neg, map_neg (f := m), (descMorphism F s).map_neg, ih]; rfl
    | of j x =>
      exact congr_fun (congr_arg (fun f : F.obj j ⟶ s.pt => (f : F.obj j → s.pt)) (w j)) x
    | add x y ih_x ih_y =>
    -- extra rfl with leanprover/lean4#2644
        

Proof state:
case add
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x✝ : ↑(colimitCocone F).pt
m : ↑(colimitCocone F).pt →+* ↑s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
x y : Prequotient F
ih_x : m (Quot.mk Setoid.r x) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)
ih_y : m (Quot.mk Setoid.r y) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r y)
⊢ m (Quot.mk Setoid.r (add x y)) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r (add x y))

Next tactic:
erw [quot_add, map_add (f := m), (descMorphism F s).map_add, ih_x, ih_y]
/-- Evidence that the proposed colimit is the colimit. -/
def colimitIsColimit : IsColimit (colimitCocone F) where
  desc s := descMorphism F s
  uniq s m w := RingHom.ext fun x => by
    change (colimitCocone F).pt →+* s.pt at m
    refine Quot.inductionOn x ?_
    intro x
    induction x with
    | zero => erw [quot_zero, map_zero (f := m), (descMorphism F s).map_zero]
    | one => erw [quot_one, map_one (f := m), (descMorphism F s).map_one]
    -- extra rfl with leanprover/lean4#2644
    | neg x ih => erw [quot_neg, map_neg (f := m), (descMorphism F s).map_neg, ih]; rfl
    | of j x =>
      exact congr_fun (congr_arg (fun f : F.obj j ⟶ s.pt => (f : F.obj j → s.pt)) (w j)) x
    | add x y ih_x ih_y =>
    -- extra rfl with leanprover/lean4#2644
        erw [quot_add, map_add (f := m), (descMorphism F s).map_add, ih_x, ih_y]; 

Proof state:
case add
J : Type v
inst✝ : SmallCategory J
F : J ⥤ CommRingCat
s : Cocone F
x✝ : ↑(colimitCocone F).pt
m : ↑(colimitCocone F).pt →+* ↑s.pt
w : ∀ (j : J), (colimitCocone F).ι.app j ≫ m = s.ι.app j
x y : Prequotient F
ih_x : m (Quot.mk Setoid.r x) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r x)
ih_y : m (Quot.mk Setoid.r y) = ((fun s => descMorphism F s) s) (Quot.mk Setoid.r y)
⊢ ((fun s => descMorphism F s) s) (Quot.mk Setoid.r x) + ((fun s => descMorphism F s) s) (Quot.mk Setoid.r y) =
    (descMorphism F s) (Quot.mk Setoid.r x) + (descMorphism F s) (Quot.mk Setoid.r y)

Next tactic:
rfl