l3lab/ntp-mathlib huggingface dataset:
/-- Scalar multiplication in the colimit. See also `colimitSMulAux`. -/
instance colimitHasSMul : SMul R (M F) where
  smul r x := by
    refine' Quot.lift (colimitSMulAux F r) _ x
    intro x y h
    apply colimitSMulAux_eq_of_rel
    apply Types.FilteredColimit.rel_of_quot_rel
    

Proof state:
case h.a
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
r : R
x✝ : ↑(M F)
x y : (j : J) × ↑(F.obj j)
h :
  Types.Quot.Rel
    ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
        forget₂ AddGroupCat AddMonCat) ⋙
      forget AddMonCat)
    x y
⊢ Types.Quot.Rel (F ⋙ forget (ModuleCat R)) x y

Next tactic:
exact h
private theorem colimitModule.one_smul (x : (M F)) : (1 : R) • x = x := by
  

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
x : ↑(M F)
⊢ 1 • x = x

Next tactic:
refine' Quot.inductionOn x _
private theorem colimitModule.one_smul (x : (M F)) : (1 : R) • x = x := by
  refine' Quot.inductionOn x _; 

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
x : ↑(M F)
⊢ ∀
    (a :
      (j : J) ×
        ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat).obj
          j),
    1 •
        Quot.mk
          (Types.Quot.Rel
            ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat))
          a =
      Quot.mk
        (Types.Quot.Rel
          ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
              forget₂ AddGroupCat AddMonCat) ⋙
            forget AddMonCat))
        a

Next tactic:
clear x
private theorem colimitModule.one_smul (x : (M F)) : (1 : R) • x = x := by
  refine' Quot.inductionOn x _; clear x; 

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
⊢ ∀
    (a :
      (j : J) ×
        ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat).obj
          j),
    1 •
        Quot.mk
          (Types.Quot.Rel
            ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat))
          a =
      Quot.mk
        (Types.Quot.Rel
          ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
              forget₂ AddGroupCat AddMonCat) ⋙
            forget AddMonCat))
        a

Next tactic:
intro x
private theorem colimitModule.one_smul (x : (M F)) : (1 : R) • x = x := by
  refine' Quot.inductionOn x _; clear x; intro x; 

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
x :
  (j : J) ×
    ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
            forget₂ AddGroupCat AddMonCat) ⋙
          forget AddMonCat).obj
      j
⊢ 1 •
      Quot.mk
        (Types.Quot.Rel
          ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
              forget₂ AddGroupCat AddMonCat) ⋙
            forget AddMonCat))
        x =
    Quot.mk
      (Types.Quot.Rel
        ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
            forget₂ AddGroupCat AddMonCat) ⋙
          forget AddMonCat))
      x

Next tactic:
cases' x with j x
private theorem colimitModule.one_smul (x : (M F)) : (1 : R) • x = x := by
  refine' Quot.inductionOn x _; clear x; intro x; cases' x with j x
  

Proof state:
case mk
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
j : J
x :
  ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
          forget₂ AddGroupCat AddMonCat) ⋙
        forget AddMonCat).obj
    j
⊢ 1 •
      Quot.mk
        (Types.Quot.Rel
          ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
              forget₂ AddGroupCat AddMonCat) ⋙
            forget AddMonCat))
        { fst := j, snd := x } =
    Quot.mk
      (Types.Quot.Rel
        ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
            forget₂ AddGroupCat AddMonCat) ⋙
          forget AddMonCat))
      { fst := j, snd := x }

Next tactic:
erw [colimit_smul_mk_eq F 1 ⟨j, x⟩]
private theorem colimitModule.one_smul (x : (M F)) : (1 : R) • x = x := by
  refine' Quot.inductionOn x _; clear x; intro x; cases' x with j x
  erw [colimit_smul_mk_eq F 1 ⟨j, x⟩]
  

Proof state:
case mk
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
j : J
x :
  ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
          forget₂ AddGroupCat AddMonCat) ⋙
        forget AddMonCat).obj
    j
⊢ M.mk F { fst := { fst := j, snd := x }.fst, snd := 1 • { fst := j, snd := x }.snd } =
    Quot.mk
      (Types.Quot.Rel
        ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
            forget₂ AddGroupCat AddMonCat) ⋙
          forget AddMonCat))
      { fst := j, snd := x }

Next tactic:
simp
private theorem colimitModule.one_smul (x : (M F)) : (1 : R) • x = x := by
  refine' Quot.inductionOn x _; clear x; intro x; cases' x with j x
  erw [colimit_smul_mk_eq F 1 ⟨j, x⟩]
  simp
  

Proof state:
case mk
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
j : J
x :
  ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
          forget₂ AddGroupCat AddMonCat) ⋙
        forget AddMonCat).obj
    j
⊢ M.mk F { fst := j, snd := x } =
    Quot.mk
      (Types.Quot.Rel
        ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
            forget₂ AddGroupCat AddMonCat) ⋙
          forget AddMonCat))
      { fst := j, snd := x }

Next tactic:
rfl
instance colimitMulAction : MulAction R (M F) where
  one_smul x := by
    

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
x : ↑(M F)
⊢ 1 • x = x

Next tactic:
refine' Quot.inductionOn x _
instance colimitMulAction : MulAction R (M F) where
  one_smul x := by
    refine' Quot.inductionOn x _; 

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
x : ↑(M F)
⊢ ∀
    (a :
      (j : J) ×
        ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat).obj
          j),
    1 •
        Quot.mk
          (Types.Quot.Rel
            ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat))
          a =
      Quot.mk
        (Types.Quot.Rel
          ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
              forget₂ AddGroupCat AddMonCat) ⋙
            forget AddMonCat))
        a

Next tactic:
clear x
instance colimitMulAction : MulAction R (M F) where
  one_smul x := by
    refine' Quot.inductionOn x _; clear x; 

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
⊢ ∀
    (a :
      (j : J) ×
        ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat).obj
          j),
    1 •
        Quot.mk
          (Types.Quot.Rel
            ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat))
          a =
      Quot.mk
        (Types.Quot.Rel
          ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
              forget₂ AddGroupCat AddMonCat) ⋙
            forget AddMonCat))
        a

Next tactic:
intro x
instance colimitMulAction : MulAction R (M F) where
  one_smul x := by
    refine' Quot.inductionOn x _; clear x; intro x; 

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
x :
  (j : J) ×
    ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
            forget₂ AddGroupCat AddMonCat) ⋙
          forget AddMonCat).obj
      j
⊢ 1 •
      Quot.mk
        (Types.Quot.Rel
          ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
              forget₂ AddGroupCat AddMonCat) ⋙
            forget AddMonCat))
        x =
    Quot.mk
      (Types.Quot.Rel
        ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
            forget₂ AddGroupCat AddMonCat) ⋙
          forget AddMonCat))
      x

Next tactic:
cases' x with j x
instance colimitMulAction : MulAction R (M F) where
  one_smul x := by
    refine' Quot.inductionOn x _; clear x; intro x; cases' x with j x
    

Proof state:
case mk
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
j : J
x :
  ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
          forget₂ AddGroupCat AddMonCat) ⋙
        forget AddMonCat).obj
    j
⊢ 1 •
      Quot.mk
        (Types.Quot.Rel
          ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
              forget₂ AddGroupCat AddMonCat) ⋙
            forget AddMonCat))
        { fst := j, snd := x } =
    Quot.mk
      (Types.Quot.Rel
        ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
            forget₂ AddGroupCat AddMonCat) ⋙
          forget AddMonCat))
      { fst := j, snd := x }

Next tactic:
erw [colimit_smul_mk_eq F 1 ⟨j, x⟩, one_smul]
instance colimitMulAction : MulAction R (M F) where
  one_smul x := by
    refine' Quot.inductionOn x _; clear x; intro x; cases' x with j x
    erw [colimit_smul_mk_eq F 1 ⟨j, x⟩, one_smul]
    

Proof state:
case mk
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
j : J
x :
  ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
          forget₂ AddGroupCat AddMonCat) ⋙
        forget AddMonCat).obj
    j
⊢ M.mk F { fst := { fst := j, snd := x }.fst, snd := { fst := j, snd := x }.snd } =
    Quot.mk
      (Types.Quot.Rel
        ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
            forget₂ AddGroupCat AddMonCat) ⋙
          forget AddMonCat))
      { fst := j, snd := x }

Next tactic:
rfl
instance colimitMulAction : MulAction R (M F) where
  one_smul x := by
    refine' Quot.inductionOn x _; clear x; intro x; cases' x with j x
    erw [colimit_smul_mk_eq F 1 ⟨j, x⟩, one_smul]
    rfl
  mul_smul r s x := by
    

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
r s : R
x : ↑(M F)
⊢ (r * s) • x = r • s • x

Next tactic:
refine' Quot.inductionOn x _
instance colimitMulAction : MulAction R (M F) where
  one_smul x := by
    refine' Quot.inductionOn x _; clear x; intro x; cases' x with j x
    erw [colimit_smul_mk_eq F 1 ⟨j, x⟩, one_smul]
    rfl
  mul_smul r s x := by
    refine' Quot.inductionOn x _; 

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
r s : R
x : ↑(M F)
⊢ ∀
    (a :
      (j : J) ×
        ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat).obj
          j),
    (r * s) •
        Quot.mk
          (Types.Quot.Rel
            ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat))
          a =
      r •
        s •
          Quot.mk
            (Types.Quot.Rel
              ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                  forget₂ AddGroupCat AddMonCat) ⋙
                forget AddMonCat))
            a

Next tactic:
clear x
instance colimitMulAction : MulAction R (M F) where
  one_smul x := by
    refine' Quot.inductionOn x _; clear x; intro x; cases' x with j x
    erw [colimit_smul_mk_eq F 1 ⟨j, x⟩, one_smul]
    rfl
  mul_smul r s x := by
    refine' Quot.inductionOn x _; clear x; 

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
r s : R
⊢ ∀
    (a :
      (j : J) ×
        ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat).obj
          j),
    (r * s) •
        Quot.mk
          (Types.Quot.Rel
            ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat))
          a =
      r •
        s •
          Quot.mk
            (Types.Quot.Rel
              ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                  forget₂ AddGroupCat AddMonCat) ⋙
                forget AddMonCat))
            a

Next tactic:
intro x
instance colimitMulAction : MulAction R (M F) where
  one_smul x := by
    refine' Quot.inductionOn x _; clear x; intro x; cases' x with j x
    erw [colimit_smul_mk_eq F 1 ⟨j, x⟩, one_smul]
    rfl
  mul_smul r s x := by
    refine' Quot.inductionOn x _; clear x; intro x; 

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
r s : R
x :
  (j : J) ×
    ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
            forget₂ AddGroupCat AddMonCat) ⋙
          forget AddMonCat).obj
      j
⊢ (r * s) •
      Quot.mk
        (Types.Quot.Rel
          ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
              forget₂ AddGroupCat AddMonCat) ⋙
            forget AddMonCat))
        x =
    r •
      s •
        Quot.mk
          (Types.Quot.Rel
            ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat))
          x

Next tactic:
cases' x with j x
instance colimitMulAction : MulAction R (M F) where
  one_smul x := by
    refine' Quot.inductionOn x _; clear x; intro x; cases' x with j x
    erw [colimit_smul_mk_eq F 1 ⟨j, x⟩, one_smul]
    rfl
  mul_smul r s x := by
    refine' Quot.inductionOn x _; clear x; intro x; cases' x with j x
    

Proof state:
case mk
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
r s : R
j : J
x :
  ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
          forget₂ AddGroupCat AddMonCat) ⋙
        forget AddMonCat).obj
    j
⊢ (r * s) •
      Quot.mk
        (Types.Quot.Rel
          ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
              forget₂ AddGroupCat AddMonCat) ⋙
            forget AddMonCat))
        { fst := j, snd := x } =
    r •
      s •
        Quot.mk
          (Types.Quot.Rel
            ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat))
          { fst := j, snd := x }

Next tactic:
erw [colimit_smul_mk_eq F (r * s) ⟨j, x⟩, colimit_smul_mk_eq F s ⟨j, x⟩,
      colimit_smul_mk_eq F r ⟨j, _⟩, mul_smul]
instance colimitSMulWithZero : SMulWithZero R (M F) :=
{ colimitMulAction F with
  smul_zero := fun r => by
    

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
src✝ : MulAction R ↑(M F) := colimitMulAction F
r : R
⊢ r • 0 = 0

Next tactic:
erw [colimit_zero_eq _ (IsFiltered.nonempty.some : J), colimit_smul_mk_eq, smul_zero]
instance colimitSMulWithZero : SMulWithZero R (M F) :=
{ colimitMulAction F with
  smul_zero := fun r => by
    erw [colimit_zero_eq _ (IsFiltered.nonempty.some : J), colimit_smul_mk_eq, smul_zero]
    

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
src✝ : MulAction R ↑(M F) := colimitMulAction F
r : R
⊢ M.mk F { fst := { fst := Nonempty.some (_ : Nonempty J), snd := 0 }.fst, snd := 0 } =
    AddMonCat.FilteredColimits.M.mk
      (((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
        forget₂ AddGroupCat AddMonCat)
      { fst := Nonempty.some (_ : Nonempty J), snd := 0 }

Next tactic:
rfl
instance colimitSMulWithZero : SMulWithZero R (M F) :=
{ colimitMulAction F with
  smul_zero := fun r => by
    erw [colimit_zero_eq _ (IsFiltered.nonempty.some : J), colimit_smul_mk_eq, smul_zero]
    rfl
  zero_smul := fun x => by
    

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
src✝ : MulAction R ↑(M F) := colimitMulAction F
x : ↑(M F)
⊢ 0 • x = 0

Next tactic:
refine' Quot.inductionOn x _
instance colimitSMulWithZero : SMulWithZero R (M F) :=
{ colimitMulAction F with
  smul_zero := fun r => by
    erw [colimit_zero_eq _ (IsFiltered.nonempty.some : J), colimit_smul_mk_eq, smul_zero]
    rfl
  zero_smul := fun x => by
    refine' Quot.inductionOn x _; 

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
src✝ : MulAction R ↑(M F) := colimitMulAction F
x : ↑(M F)
⊢ ∀
    (a :
      (j : J) ×
        ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat).obj
          j),
    0 •
        Quot.mk
          (Types.Quot.Rel
            ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat))
          a =
      0

Next tactic:
clear x
instance colimitSMulWithZero : SMulWithZero R (M F) :=
{ colimitMulAction F with
  smul_zero := fun r => by
    erw [colimit_zero_eq _ (IsFiltered.nonempty.some : J), colimit_smul_mk_eq, smul_zero]
    rfl
  zero_smul := fun x => by
    refine' Quot.inductionOn x _; clear x; 

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
src✝ : MulAction R ↑(M F) := colimitMulAction F
⊢ ∀
    (a :
      (j : J) ×
        ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat).obj
          j),
    0 •
        Quot.mk
          (Types.Quot.Rel
            ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat))
          a =
      0

Next tactic:
intro x
instance colimitSMulWithZero : SMulWithZero R (M F) :=
{ colimitMulAction F with
  smul_zero := fun r => by
    erw [colimit_zero_eq _ (IsFiltered.nonempty.some : J), colimit_smul_mk_eq, smul_zero]
    rfl
  zero_smul := fun x => by
    refine' Quot.inductionOn x _; clear x; intro x; 

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
src✝ : MulAction R ↑(M F) := colimitMulAction F
x :
  (j : J) ×
    ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
            forget₂ AddGroupCat AddMonCat) ⋙
          forget AddMonCat).obj
      j
⊢ 0 •
      Quot.mk
        (Types.Quot.Rel
          ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
              forget₂ AddGroupCat AddMonCat) ⋙
            forget AddMonCat))
        x =
    0

Next tactic:
cases' x with j x
instance colimitSMulWithZero : SMulWithZero R (M F) :=
{ colimitMulAction F with
  smul_zero := fun r => by
    erw [colimit_zero_eq _ (IsFiltered.nonempty.some : J), colimit_smul_mk_eq, smul_zero]
    rfl
  zero_smul := fun x => by
    refine' Quot.inductionOn x _; clear x; intro x; cases' x with j x
    

Proof state:
case mk
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
src✝ : MulAction R ↑(M F) := colimitMulAction F
j : J
x :
  ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
          forget₂ AddGroupCat AddMonCat) ⋙
        forget AddMonCat).obj
    j
⊢ 0 •
      Quot.mk
        (Types.Quot.Rel
          ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
              forget₂ AddGroupCat AddMonCat) ⋙
            forget AddMonCat))
        { fst := j, snd := x } =
    0

Next tactic:
erw [colimit_smul_mk_eq, zero_smul, colimit_zero_eq _ j]
instance colimitSMulWithZero : SMulWithZero R (M F) :=
{ colimitMulAction F with
  smul_zero := fun r => by
    erw [colimit_zero_eq _ (IsFiltered.nonempty.some : J), colimit_smul_mk_eq, smul_zero]
    rfl
  zero_smul := fun x => by
    refine' Quot.inductionOn x _; clear x; intro x; cases' x with j x
    erw [colimit_smul_mk_eq, zero_smul, colimit_zero_eq _ j]
    

Proof state:
case mk
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
src✝ : MulAction R ↑(M F) := colimitMulAction F
j : J
x :
  ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
          forget₂ AddGroupCat AddMonCat) ⋙
        forget AddMonCat).obj
    j
⊢ M.mk F { fst := { fst := j, snd := x }.fst, snd := 0 } =
    AddMonCat.FilteredColimits.M.mk
      (((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
        forget₂ AddGroupCat AddMonCat)
      { fst := j, snd := 0 }

Next tactic:
rfl
private theorem colimitModule.add_smul (r s : R) (x : (M F)) : (r + s) • x = r • x + s • x := by
  

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
r s : R
x : ↑(M F)
⊢ (r + s) • x = r • x + s • x

Next tactic:
refine' Quot.inductionOn x _
private theorem colimitModule.add_smul (r s : R) (x : (M F)) : (r + s) • x = r • x + s • x := by
  refine' Quot.inductionOn x _; 

Proof state:
R : Type u
inst✝² : Ring R
J : Type v
inst✝¹ : SmallCategory J
inst✝ : IsFiltered J
F : J ⥤ ModuleCatMax R
r s : R
x : ↑(M F)
⊢ ∀
    (a :
      (j : J) ×
        ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat).obj
          j),
    (r + s) •
        Quot.mk
          (Types.Quot.Rel
            ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                forget₂ AddGroupCat AddMonCat) ⋙
              forget AddMonCat))
          a =
      r •
          Quot.mk
            (Types.Quot.Rel
              ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                  forget₂ AddGroupCat AddMonCat) ⋙
                forget AddMonCat))
            a +
        s •
          Quot.mk
            (Types.Quot.Rel
              ((((F ⋙ forget₂ (ModuleCat R) AddCommGroupCat) ⋙ forget₂ AddCommGroupCat AddGroupCat) ⋙
                  forget₂ AddGroupCat AddMonCat) ⋙
                forget AddMonCat))
            a

Next tactic:
clear x