l3lab/ntp-mathlib huggingface dataset:
/-- The induced scalar multiplication on
`colimit (F ⋙ forget₂ _ AddCommGroupCat)`. -/
@[simps]
noncomputable def coconePointSMul :
    R →+* End (colimit (F ⋙ forget₂ _ AddCommGroupCat)) where
  toFun r := colimMap
    { app := fun j => (F.obj j).smul r
      naturality := fun X Y f => smul_naturality _ _ }
  map_zero' := colimit.hom_ext (by simp)
  map_one' := colimit.hom_ext (by simp)
  map_add' r s := colimit.hom_ext (fun j => by
    simp only [Functor.comp_obj, forget₂_obj, map_add, ι_colimMap]
    rw [Preadditive.add_comp, Preadditive.comp_add]
    simp only [ι_colimMap, Functor.comp_obj, forget₂_obj])
  map_mul' r s := colimit.hom_ext (fun j => by 

Proof state:
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
r s : R
j : J
⊢ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
      OneHom.toFun
        { toFun := fun r => colimMap (NatTrans.mk fun j => (smul (F.obj j)) r),
          map_one' := (_ : (fun r => colimMap (NatTrans.mk fun j => (smul (F.obj j)) r)) 1 = 1) }
        (r * s) =
    colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
      (OneHom.toFun
          { toFun := fun r => colimMap (NatTrans.mk fun j => (smul (F.obj j)) r),
            map_one' := (_ : (fun r => colimMap (NatTrans.mk fun j => (smul (F.obj j)) r)) 1 = 1) }
          r *
        OneHom.toFun
          { toFun := fun r => colimMap (NatTrans.mk fun j => (smul (F.obj j)) r),
            map_one' := (_ : (fun r => colimMap (NatTrans.mk fun j => (smul (F.obj j)) r)) 1 = 1) }
          s)

Next tactic:
simp
/-- The induced scalar multiplication on
`colimit (F ⋙ forget₂ _ AddCommGroupCat)`. -/
@[simps]
noncomputable def coconePointSMul :
    R →+* End (colimit (F ⋙ forget₂ _ AddCommGroupCat)) where
  toFun r := colimMap
    { app := fun j => (F.obj j).smul r
      naturality := fun X Y f => smul_naturality _ _ }
  map_zero' := colimit.hom_ext (by 

Proof state:
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
⊢ ∀ (j : J),
    colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
        OneHom.toFun
          (↑{
              toOneHom :=
                { toFun := fun r => colimMap (NatTrans.mk fun j => (smul (F.obj j)) r),
                  map_one' := (_ : (fun r => colimMap (NatTrans.mk fun j => (smul (F.obj j)) r)) 1 = 1) },
              map_mul' :=
                (_ :
                  ∀ (r s : R),
                    OneHom.toFun
                        { toFun := fun r => colimMap (NatTrans.mk fun j => (smul (F.obj j)) r),
                          map_one' := (_ : (fun r => colimMap (NatTrans.mk fun j => (smul (F.obj j)) r)) 1 = 1) }
                        (r * s) =
                      OneHom.toFun
                          { toFun := fun r => colimMap (NatTrans.mk fun j => (smul (F.obj j)) r),
                            map_one' := (_ : (fun r => colimMap (NatTrans.mk fun j => (smul (F.obj j)) r)) 1 = 1) }
                          r *
                        OneHom.toFun
                          { toFun := fun r => colimMap (NatTrans.mk fun j => (smul (F.obj j)) r),
                            map_one' := (_ : (fun r => colimMap (NatTrans.mk fun j => (smul (F.obj j)) r)) 1 = 1) }
                          s) })
          0 =
      colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫ 0

Next tactic:
simp
/-- The induced scalar multiplication on
`colimit (F ⋙ forget₂ _ AddCommGroupCat)`. -/
@[simps]
noncomputable def coconePointSMul :
    R →+* End (colimit (F ⋙ forget₂ _ AddCommGroupCat)) where
  toFun r := colimMap
    { app := fun j => (F.obj j).smul r
      naturality := fun X Y f => smul_naturality _ _ }
  map_zero' := colimit.hom_ext (by simp)
  map_one' := colimit.hom_ext (by simp)
  map_add' r s := colimit.hom_ext (fun j => by
    simp only [Functor.comp_obj, forget₂_obj, map_add, ι_colimMap]
    

Proof state:
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
r s : R
j : J
⊢ ((smul (F.obj j)) r + (smul (F.obj j)) s) ≫ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j =
    colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
      (colimMap (NatTrans.mk fun j => (smul (F.obj j)) r) + colimMap (NatTrans.mk fun j => (smul (F.obj j)) s))

Next tactic:
rw [Preadditive.add_comp, Preadditive.comp_add]
/-- The induced scalar multiplication on
`colimit (F ⋙ forget₂ _ AddCommGroupCat)`. -/
@[simps]
noncomputable def coconePointSMul :
    R →+* End (colimit (F ⋙ forget₂ _ AddCommGroupCat)) where
  toFun r := colimMap
    { app := fun j => (F.obj j).smul r
      naturality := fun X Y f => smul_naturality _ _ }
  map_zero' := colimit.hom_ext (by simp)
  map_one' := colimit.hom_ext (by simp)
  map_add' r s := colimit.hom_ext (fun j => by
    simp only [Functor.comp_obj, forget₂_obj, map_add, ι_colimMap]
    rw [Preadditive.add_comp, Preadditive.comp_add]
    

Proof state:
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
r s : R
j : J
⊢ (smul (F.obj j)) r ≫ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j +
      (smul (F.obj j)) s ≫ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j =
    colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫ colimMap (NatTrans.mk fun j => (smul (F.obj j)) r) +
      colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫ colimMap (NatTrans.mk fun j => (smul (F.obj j)) s)

Next tactic:
simp only [ι_colimMap, Functor.comp_obj, forget₂_obj]
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)`. -/
@[simps]
noncomputable def colimitCocone : Cocone F where
  pt := mkOfSMul (coconePointSMul F)
  ι :=
    { app := fun j => homMk (colimit.ι (F ⋙ forget₂ _ AddCommGroupCat)  j) (fun r => by
        

Proof state:
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
j : J
r : R
⊢ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
      (smul (((Functor.const J).obj (mkOfSMul (coconePointSMul F))).obj j)) r =
    (smul (F.obj j)) r ≫ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j

Next tactic:
dsimp
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)`. -/
@[simps]
noncomputable def colimitCocone : Cocone F where
  pt := mkOfSMul (coconePointSMul F)
  ι :=
    { app := fun j => homMk (colimit.ι (F ⋙ forget₂ _ AddCommGroupCat)  j) (fun r => by
        dsimp
        -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
        

Proof state:
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
j : J
r : R
⊢ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫ (smul (mkOfSMul (coconePointSMul F))) r =
    (smul (F.obj j)) r ≫ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j

Next tactic:
erw [mkOfSMul_smul]
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)`. -/
@[simps]
noncomputable def colimitCocone : Cocone F where
  pt := mkOfSMul (coconePointSMul F)
  ι :=
    { app := fun j => homMk (colimit.ι (F ⋙ forget₂ _ AddCommGroupCat)  j) (fun r => by
        dsimp
        -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
        erw [mkOfSMul_smul]
        

Proof state:
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
j : J
r : R
⊢ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫ (coconePointSMul F) r =
    (smul (F.obj j)) r ≫ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j

Next tactic:
simp
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)`. -/
@[simps]
noncomputable def colimitCocone : Cocone F where
  pt := mkOfSMul (coconePointSMul F)
  ι :=
    { app := fun j => homMk (colimit.ι (F ⋙ forget₂ _ AddCommGroupCat)  j) (fun r => by
        dsimp
        -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
        erw [mkOfSMul_smul]
        simp)
      naturality := fun i j f => by
        

Proof state:
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
i j : J
f : i ⟶ j
⊢ F.map f ≫
      (fun j =>
          homMk (colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j)
            (_ :
              ∀ (r : R),
                colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
                    (smul (((Functor.const J).obj (mkOfSMul (coconePointSMul F))).obj j)) r =
                  (smul (F.obj j)) r ≫ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j))
        j =
    (fun j =>
          homMk (colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j)
            (_ :
              ∀ (r : R),
                colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
                    (smul (((Functor.const J).obj (mkOfSMul (coconePointSMul F))).obj j)) r =
                  (smul (F.obj j)) r ≫ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j))
        i ≫
      ((Functor.const J).obj (mkOfSMul (coconePointSMul F))).map f

Next tactic:
apply (forget₂ _ AddCommGroupCat).map_injective
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)`. -/
@[simps]
noncomputable def colimitCocone : Cocone F where
  pt := mkOfSMul (coconePointSMul F)
  ι :=
    { app := fun j => homMk (colimit.ι (F ⋙ forget₂ _ AddCommGroupCat)  j) (fun r => by
        dsimp
        -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
        erw [mkOfSMul_smul]
        simp)
      naturality := fun i j f => by
        apply (forget₂ _ AddCommGroupCat).map_injective
        

Proof state:
case a
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
i j : J
f : i ⟶ j
⊢ (forget₂ (ModuleCat R) AddCommGroupCat).map
      (F.map f ≫
        (fun j =>
            homMk (colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j)
              (_ :
                ∀ (r : R),
                  colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
                      (smul (((Functor.const J).obj (mkOfSMul (coconePointSMul F))).obj j)) r =
                    (smul (F.obj j)) r ≫ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j))
          j) =
    (forget₂ (ModuleCat R) AddCommGroupCat).map
      ((fun j =>
            homMk (colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j)
              (_ :
                ∀ (r : R),
                  colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
                      (smul (((Functor.const J).obj (mkOfSMul (coconePointSMul F))).obj j)) r =
                    (smul (F.obj j)) r ≫ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j))
          i ≫
        ((Functor.const J).obj (mkOfSMul (coconePointSMul F))).map f)

Next tactic:
simp only [Functor.map_comp, forget₂_map_homMk]
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)`. -/
@[simps]
noncomputable def colimitCocone : Cocone F where
  pt := mkOfSMul (coconePointSMul F)
  ι :=
    { app := fun j => homMk (colimit.ι (F ⋙ forget₂ _ AddCommGroupCat)  j) (fun r => by
        dsimp
        -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
        erw [mkOfSMul_smul]
        simp)
      naturality := fun i j f => by
        apply (forget₂ _ AddCommGroupCat).map_injective
        simp only [Functor.map_comp, forget₂_map_homMk]
        

Proof state:
case a
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
i j : J
f : i ⟶ j
⊢ (forget₂ (ModuleCat R) AddCommGroupCat).map (F.map f) ≫ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j =
    colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) i ≫
      (forget₂ (ModuleCat R) AddCommGroupCat).map (((Functor.const J).obj (mkOfSMul (coconePointSMul F))).map f)

Next tactic:
dsimp
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)`. -/
@[simps]
noncomputable def colimitCocone : Cocone F where
  pt := mkOfSMul (coconePointSMul F)
  ι :=
    { app := fun j => homMk (colimit.ι (F ⋙ forget₂ _ AddCommGroupCat)  j) (fun r => by
        dsimp
        -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
        erw [mkOfSMul_smul]
        simp)
      naturality := fun i j f => by
        apply (forget₂ _ AddCommGroupCat).map_injective
        simp only [Functor.map_comp, forget₂_map_homMk]
        dsimp
        

Proof state:
case a
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
i j : J
f : i ⟶ j
⊢ LinearMap.toAddMonoidHom (F.map f) ≫ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j =
    colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) i ≫
      LinearMap.toAddMonoidHom (𝟙 (mkOfSMul (coconePointSMul F)))

Next tactic:
erw [colimit.w (F ⋙ forget₂ _ AddCommGroupCat), comp_id]
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)` is a colimit cocone. -/
noncomputable def isColimitColimitCocone : IsColimit (colimitCocone F) where
  desc s := homMk (colimit.desc _ ((forget₂ _ AddCommGroupCat).mapCocone s)) (fun r => by
    

Proof state:
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
s : Cocone F
r : R
⊢ colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s) ≫
      (smul s.pt) r =
    (smul (colimitCocone F).pt) r ≫
      colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s)

Next tactic:
apply colimit.hom_ext
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)` is a colimit cocone. -/
noncomputable def isColimitColimitCocone : IsColimit (colimitCocone F) where
  desc s := homMk (colimit.desc _ ((forget₂ _ AddCommGroupCat).mapCocone s)) (fun r => by
    apply colimit.hom_ext
    

Proof state:
case w
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
s : Cocone F
r : R
⊢ ∀ (j : J),
    colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
        colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s) ≫
          (smul s.pt) r =
      colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
        (smul (colimitCocone F).pt) r ≫
          colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s)

Next tactic:
intro j
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)` is a colimit cocone. -/
noncomputable def isColimitColimitCocone : IsColimit (colimitCocone F) where
  desc s := homMk (colimit.desc _ ((forget₂ _ AddCommGroupCat).mapCocone s)) (fun r => by
    apply colimit.hom_ext
    intro j
    

Proof state:
case w
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
s : Cocone F
r : R
j : J
⊢ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
      colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s) ≫
        (smul s.pt) r =
    colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
      (smul (colimitCocone F).pt) r ≫
        colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s)

Next tactic:
dsimp
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)` is a colimit cocone. -/
noncomputable def isColimitColimitCocone : IsColimit (colimitCocone F) where
  desc s := homMk (colimit.desc _ ((forget₂ _ AddCommGroupCat).mapCocone s)) (fun r => by
    apply colimit.hom_ext
    intro j
    dsimp
    

Proof state:
case w
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
s : Cocone F
r : R
j : J
⊢ colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
      colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s) ≫
        (smul s.pt) r =
    colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
      (smul (mkOfSMul (coconePointSMul F))) r ≫
        colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s)

Next tactic:
rw [colimit.ι_desc_assoc]
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)` is a colimit cocone. -/
noncomputable def isColimitColimitCocone : IsColimit (colimitCocone F) where
  desc s := homMk (colimit.desc _ ((forget₂ _ AddCommGroupCat).mapCocone s)) (fun r => by
    apply colimit.hom_ext
    intro j
    dsimp
    rw [colimit.ι_desc_assoc]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    

Proof state:
case w
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
s : Cocone F
r : R
j : J
⊢ ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s).ι.app j ≫ (smul s.pt) r =
    colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
      (smul (mkOfSMul (coconePointSMul F))) r ≫
        colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s)

Next tactic:
erw [mkOfSMul_smul]
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)` is a colimit cocone. -/
noncomputable def isColimitColimitCocone : IsColimit (colimitCocone F) where
  desc s := homMk (colimit.desc _ ((forget₂ _ AddCommGroupCat).mapCocone s)) (fun r => by
    apply colimit.hom_ext
    intro j
    dsimp
    rw [colimit.ι_desc_assoc]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [mkOfSMul_smul]
    

Proof state:
case w
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
s : Cocone F
r : R
j : J
⊢ ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s).ι.app j ≫ (smul s.pt) r =
    colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
      (coconePointSMul F) r ≫
        colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s)

Next tactic:
dsimp
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)` is a colimit cocone. -/
noncomputable def isColimitColimitCocone : IsColimit (colimitCocone F) where
  desc s := homMk (colimit.desc _ ((forget₂ _ AddCommGroupCat).mapCocone s)) (fun r => by
    apply colimit.hom_ext
    intro j
    dsimp
    rw [colimit.ι_desc_assoc]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [mkOfSMul_smul]
    dsimp
    

Proof state:
case w
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
s : Cocone F
r : R
j : J
⊢ LinearMap.toAddMonoidHom (s.ι.app j) ≫ (smul s.pt) r =
    colimit.ι (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) j ≫
      colimMap (NatTrans.mk fun j => (smul (F.obj j)) r) ≫
        colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s)

Next tactic:
simp only [ι_colimMap_assoc, Functor.comp_obj, forget₂_obj, colimit.ι_desc,
      Functor.mapCocone_pt, Functor.mapCocone_ι_app, forget₂_map]
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)` is a colimit cocone. -/
noncomputable def isColimitColimitCocone : IsColimit (colimitCocone F) where
  desc s := homMk (colimit.desc _ ((forget₂ _ AddCommGroupCat).mapCocone s)) (fun r => by
    apply colimit.hom_ext
    intro j
    dsimp
    rw [colimit.ι_desc_assoc]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [mkOfSMul_smul]
    dsimp
    simp only [ι_colimMap_assoc, Functor.comp_obj, forget₂_obj, colimit.ι_desc,
      Functor.mapCocone_pt, Functor.mapCocone_ι_app, forget₂_map]
    

Proof state:
case w
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
s : Cocone F
r : R
j : J
⊢ LinearMap.toAddMonoidHom (s.ι.app j) ≫ (smul s.pt) r = (smul (F.obj j)) r ≫ LinearMap.toAddMonoidHom (s.ι.app j)

Next tactic:
exact smul_naturality (s.ι.app j) r
/-- The cocone for `F` constructed from the colimit of
`(F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)` is a colimit cocone. -/
noncomputable def isColimitColimitCocone : IsColimit (colimitCocone F) where
  desc s := homMk (colimit.desc _ ((forget₂ _ AddCommGroupCat).mapCocone s)) (fun r => by
    apply colimit.hom_ext
    intro j
    dsimp
    rw [colimit.ι_desc_assoc]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [mkOfSMul_smul]
    dsimp
    simp only [ι_colimMap_assoc, Functor.comp_obj, forget₂_obj, colimit.ι_desc,
      Functor.mapCocone_pt, Functor.mapCocone_ι_app, forget₂_map]
    exact smul_naturality (s.ι.app j) r)
  fac s j := by
    

Proof state:
R : Type w
inst✝² : Ring R
J : Type u
inst✝¹ : Category.{v, u} J
F : J ⥤ ModuleCat R
inst✝ : HasColimit (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
s : Cocone F
j : J
⊢ (colimitCocone F).ι.app j ≫
      (fun s =>
          homMk
            (colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
              ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s))
            (_ :
              ∀ (r : R),
                colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
                      ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s) ≫
                    (smul s.pt) r =
                  (smul (colimitCocone F).pt) r ≫
                    colimit.desc (F ⋙ forget₂ (ModuleCat R) AddCommGroupCat)
                      ((forget₂ (ModuleCat R) AddCommGroupCat).mapCocone s)))
        s =
    s.ι.app j

Next tactic:
apply (forget₂ _ AddCommGroupCat).map_injective