l3lab/ntp-mathlib huggingface dataset:
instance : MonoidalPreadditive (ModuleCat.{u} R) := by
  refine' ⟨_, _, _, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.zero_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.zero_apply, TensorProduct.tmul_zero]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.zero_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.zero_apply, TensorProduct.zero_tmul]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.add_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.add_apply, TensorProduct.tmul_add]
  · 

Proof state:
case refine'_4
R : Type u
inst✝ : CommRing R
⊢ ∀ {W X Y Z : ModuleCat R} (f g : W ⟶ X) (h : Y ⟶ Z), (f + g) ⊗ h = f ⊗ h + g ⊗ h

Next tactic:
dsimp only [autoParam]
instance : MonoidalPreadditive (ModuleCat.{u} R) := by
  refine' ⟨_, _, _, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.zero_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.zero_apply, TensorProduct.tmul_zero]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.zero_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.zero_apply, TensorProduct.zero_tmul]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.add_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.add_apply, TensorProduct.tmul_add]
  · dsimp only [autoParam]; 

Proof state:
case refine'_4
R : Type u
inst✝ : CommRing R
⊢ ∀ {W X Y Z : ModuleCat R} (f g : W ⟶ X) (h : Y ⟶ Z), (f + g) ⊗ h = f ⊗ h + g ⊗ h

Next tactic:
intros
instance : MonoidalPreadditive (ModuleCat.{u} R) := by
  refine' ⟨_, _, _, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.zero_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.zero_apply, TensorProduct.tmul_zero]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.zero_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.zero_apply, TensorProduct.zero_tmul]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.add_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.add_apply, TensorProduct.tmul_add]
  · dsimp only [autoParam]; intros
    

Proof state:
case refine'_4
R : Type u
inst✝ : CommRing R
W✝ X✝ Y✝ Z✝ : ModuleCat R
f✝ g✝ : W✝ ⟶ X✝
h✝ : Y✝ ⟶ Z✝
⊢ (f✝ + g✝) ⊗ h✝ = f✝ ⊗ h✝ + g✝ ⊗ h✝

Next tactic:
refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
instance : MonoidalPreadditive (ModuleCat.{u} R) := by
  refine' ⟨_, _, _, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.zero_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.zero_apply, TensorProduct.tmul_zero]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.zero_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.zero_apply, TensorProduct.zero_tmul]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.add_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.add_apply, TensorProduct.tmul_add]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    

Proof state:
case refine'_4
R : Type u
inst✝ : CommRing R
W✝ X✝ Y✝ Z✝ : ModuleCat R
f✝ g✝ : W✝ ⟶ X✝
h✝ : Y✝ ⟶ Z✝
x : ↑W✝
y : ↑Y✝
⊢ ((LinearMap.compr₂ (TensorProduct.mk R ↑W✝ ↑Y✝) ((f✝ + g✝) ⊗ h✝)) x) y =
    ((LinearMap.compr₂ (TensorProduct.mk R ↑W✝ ↑Y✝) (f✝ ⊗ h✝ + g✝ ⊗ h✝)) x) y

Next tactic:
simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
instance : MonoidalPreadditive (ModuleCat.{u} R) := by
  refine' ⟨_, _, _, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.zero_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.zero_apply, TensorProduct.tmul_zero]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.zero_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.zero_apply, TensorProduct.zero_tmul]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.add_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.add_apply, TensorProduct.tmul_add]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    

Proof state:
case refine'_4
R : Type u
inst✝ : CommRing R
W✝ X✝ Y✝ Z✝ : ModuleCat R
f✝ g✝ : W✝ ⟶ X✝
h✝ : Y✝ ⟶ Z✝
x : ↑W✝
y : ↑Y✝
⊢ ((f✝ + g✝) ⊗ h✝) (x ⊗ₜ[R] y) = (f✝ ⊗ h✝ + g✝ ⊗ h✝) (x ⊗ₜ[R] y)

Next tactic:
rw [LinearMap.add_apply]
instance : MonoidalPreadditive (ModuleCat.{u} R) := by
  refine' ⟨_, _, _, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.zero_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.zero_apply, TensorProduct.tmul_zero]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.zero_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.zero_apply, TensorProduct.zero_tmul]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.add_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.add_apply, TensorProduct.tmul_add]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.add_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    

Proof state:
case refine'_4
R : Type u
inst✝ : CommRing R
W✝ X✝ Y✝ Z✝ : ModuleCat R
f✝ g✝ : W✝ ⟶ X✝
h✝ : Y✝ ⟶ Z✝
x : ↑W✝
y : ↑Y✝
⊢ ((f✝ + g✝) ⊗ h✝) (x ⊗ₜ[R] y) = (f✝ ⊗ h✝) (x ⊗ₜ[R] y) + (g✝ ⊗ h✝) (x ⊗ₜ[R] y)

Next tactic:
erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
instance : MonoidalPreadditive (ModuleCat.{u} R) := by
  refine' ⟨_, _, _, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.zero_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.zero_apply, TensorProduct.tmul_zero]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.zero_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.zero_apply, TensorProduct.zero_tmul]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.add_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.add_apply, TensorProduct.tmul_add]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.add_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    

Proof state:
case refine'_4
R : Type u
inst✝ : CommRing R
W✝ X✝ Y✝ Z✝ : ModuleCat R
f✝ g✝ : W✝ ⟶ X✝
h✝ : Y✝ ⟶ Z✝
x : ↑W✝
y : ↑Y✝
⊢ (f✝ + g✝) x ⊗ₜ[R] h✝ y = f✝ x ⊗ₜ[R] h✝ y + (g✝ ⊗ h✝) (x ⊗ₜ[R] y)

Next tactic:
erw [MonoidalCategory.hom_apply]
instance : MonoidalPreadditive (ModuleCat.{u} R) := by
  refine' ⟨_, _, _, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.zero_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.zero_apply, TensorProduct.tmul_zero]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.zero_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.zero_apply, TensorProduct.zero_tmul]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.add_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    erw [MonoidalCategory.hom_apply]
    rw [LinearMap.add_apply, TensorProduct.tmul_add]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.add_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    erw [MonoidalCategory.hom_apply]
    

Proof state:
case refine'_4
R : Type u
inst✝ : CommRing R
W✝ X✝ Y✝ Z✝ : ModuleCat R
f✝ g✝ : W✝ ⟶ X✝
h✝ : Y✝ ⟶ Z✝
x : ↑W✝
y : ↑Y✝
⊢ (f✝ + g✝) x ⊗ₜ[R] h✝ y = f✝ x ⊗ₜ[R] h✝ y + g✝ x ⊗ₜ[R] h✝ y

Next tactic:
rw [LinearMap.add_apply, TensorProduct.add_tmul]
instance : MonoidalLinear R (ModuleCat.{u} R) := by
  

Proof state:
R : Type u
inst✝ : CommRing R
⊢ MonoidalLinear R (ModuleCat R)

Next tactic:
refine' ⟨_, _⟩
instance : MonoidalLinear R (ModuleCat.{u} R) := by
  refine' ⟨_, _⟩
  · 

Proof state:
case refine'_1
R : Type u
inst✝ : CommRing R
⊢ ∀ {W X Y Z : ModuleCat R} (f : W ⟶ X) (r : R) (g : Y ⟶ Z), f ⊗ r • g = r • (f ⊗ g)

Next tactic:
dsimp only [autoParam]
instance : MonoidalLinear R (ModuleCat.{u} R) := by
  refine' ⟨_, _⟩
  · dsimp only [autoParam]; 

Proof state:
case refine'_1
R : Type u
inst✝ : CommRing R
⊢ ∀ {W X Y Z : ModuleCat R} (f : W ⟶ X) (r : R) (g : Y ⟶ Z), f ⊗ r • g = r • (f ⊗ g)

Next tactic:
intros
instance : MonoidalLinear R (ModuleCat.{u} R) := by
  refine' ⟨_, _⟩
  · dsimp only [autoParam]; intros
    

Proof state:
case refine'_1
R : Type u
inst✝ : CommRing R
W✝ X✝ Y✝ Z✝ : ModuleCat R
f✝ : W✝ ⟶ X✝
r✝ : R
g✝ : Y✝ ⟶ Z✝
⊢ f✝ ⊗ r✝ • g✝ = r✝ • (f✝ ⊗ g✝)

Next tactic:
refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
instance : MonoidalLinear R (ModuleCat.{u} R) := by
  refine' ⟨_, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    

Proof state:
case refine'_1
R : Type u
inst✝ : CommRing R
W✝ X✝ Y✝ Z✝ : ModuleCat R
f✝ : W✝ ⟶ X✝
r✝ : R
g✝ : Y✝ ⟶ Z✝
x : ↑W✝
y : ↑Y✝
⊢ ((LinearMap.compr₂ (TensorProduct.mk R ↑W✝ ↑Y✝) (f✝ ⊗ r✝ • g✝)) x) y =
    ((LinearMap.compr₂ (TensorProduct.mk R ↑W✝ ↑Y✝) (r✝ • (f✝ ⊗ g✝))) x) y

Next tactic:
simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
instance : MonoidalLinear R (ModuleCat.{u} R) := by
  refine' ⟨_, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    

Proof state:
case refine'_1
R : Type u
inst✝ : CommRing R
W✝ X✝ Y✝ Z✝ : ModuleCat R
f✝ : W✝ ⟶ X✝
r✝ : R
g✝ : Y✝ ⟶ Z✝
x : ↑W✝
y : ↑Y✝
⊢ (f✝ ⊗ r✝ • g✝) (x ⊗ₜ[R] y) = (r✝ • (f✝ ⊗ g✝)) (x ⊗ₜ[R] y)

Next tactic:
rw [LinearMap.smul_apply]
instance : MonoidalLinear R (ModuleCat.{u} R) := by
  refine' ⟨_, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.smul_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    

Proof state:
case refine'_1
R : Type u
inst✝ : CommRing R
W✝ X✝ Y✝ Z✝ : ModuleCat R
f✝ : W✝ ⟶ X✝
r✝ : R
g✝ : Y✝ ⟶ Z✝
x : ↑W✝
y : ↑Y✝
⊢ (f✝ ⊗ r✝ • g✝) (x ⊗ₜ[R] y) = r✝ • (f✝ ⊗ g✝) (x ⊗ₜ[R] y)

Next tactic:
erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
instance : MonoidalLinear R (ModuleCat.{u} R) := by
  refine' ⟨_, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.smul_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    

Proof state:
case refine'_1
R : Type u
inst✝ : CommRing R
W✝ X✝ Y✝ Z✝ : ModuleCat R
f✝ : W✝ ⟶ X✝
r✝ : R
g✝ : Y✝ ⟶ Z✝
x : ↑W✝
y : ↑Y✝
⊢ f✝ x ⊗ₜ[R] (r✝ • g✝) y = r✝ • f✝ x ⊗ₜ[R] g✝ y

Next tactic:
rw [LinearMap.smul_apply, TensorProduct.tmul_smul]
instance : MonoidalLinear R (ModuleCat.{u} R) := by
  refine' ⟨_, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.smul_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    rw [LinearMap.smul_apply, TensorProduct.tmul_smul]
  · 

Proof state:
case refine'_2
R : Type u
inst✝ : CommRing R
⊢ ∀ {W X Y Z : ModuleCat R} (r : R) (f : W ⟶ X) (g : Y ⟶ Z), r • f ⊗ g = r • (f ⊗ g)

Next tactic:
dsimp only [autoParam]
instance : MonoidalLinear R (ModuleCat.{u} R) := by
  refine' ⟨_, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.smul_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    rw [LinearMap.smul_apply, TensorProduct.tmul_smul]
  · dsimp only [autoParam]; 

Proof state:
case refine'_2
R : Type u
inst✝ : CommRing R
⊢ ∀ {W X Y Z : ModuleCat R} (r : R) (f : W ⟶ X) (g : Y ⟶ Z), r • f ⊗ g = r • (f ⊗ g)

Next tactic:
intros
instance : MonoidalLinear R (ModuleCat.{u} R) := by
  refine' ⟨_, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.smul_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    rw [LinearMap.smul_apply, TensorProduct.tmul_smul]
  · dsimp only [autoParam]; intros
    

Proof state:
case refine'_2
R : Type u
inst✝ : CommRing R
W✝ X✝ Y✝ Z✝ : ModuleCat R
r✝ : R
f✝ : W✝ ⟶ X✝
g✝ : Y✝ ⟶ Z✝
⊢ r✝ • f✝ ⊗ g✝ = r✝ • (f✝ ⊗ g✝)

Next tactic:
refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
instance : MonoidalLinear R (ModuleCat.{u} R) := by
  refine' ⟨_, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.smul_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    rw [LinearMap.smul_apply, TensorProduct.tmul_smul]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    

Proof state:
case refine'_2
R : Type u
inst✝ : CommRing R
W✝ X✝ Y✝ Z✝ : ModuleCat R
r✝ : R
f✝ : W✝ ⟶ X✝
g✝ : Y✝ ⟶ Z✝
x : ↑W✝
y : ↑Y✝
⊢ ((LinearMap.compr₂ (TensorProduct.mk R ↑W✝ ↑Y✝) (r✝ • f✝ ⊗ g✝)) x) y =
    ((LinearMap.compr₂ (TensorProduct.mk R ↑W✝ ↑Y✝) (r✝ • (f✝ ⊗ g✝))) x) y

Next tactic:
simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
instance : MonoidalLinear R (ModuleCat.{u} R) := by
  refine' ⟨_, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.smul_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    rw [LinearMap.smul_apply, TensorProduct.tmul_smul]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    

Proof state:
case refine'_2
R : Type u
inst✝ : CommRing R
W✝ X✝ Y✝ Z✝ : ModuleCat R
r✝ : R
f✝ : W✝ ⟶ X✝
g✝ : Y✝ ⟶ Z✝
x : ↑W✝
y : ↑Y✝
⊢ (r✝ • f✝ ⊗ g✝) (x ⊗ₜ[R] y) = (r✝ • (f✝ ⊗ g✝)) (x ⊗ₜ[R] y)

Next tactic:
rw [LinearMap.smul_apply]
instance : MonoidalLinear R (ModuleCat.{u} R) := by
  refine' ⟨_, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.smul_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    rw [LinearMap.smul_apply, TensorProduct.tmul_smul]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.smul_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    

Proof state:
case refine'_2
R : Type u
inst✝ : CommRing R
W✝ X✝ Y✝ Z✝ : ModuleCat R
r✝ : R
f✝ : W✝ ⟶ X✝
g✝ : Y✝ ⟶ Z✝
x : ↑W✝
y : ↑Y✝
⊢ (r✝ • f✝ ⊗ g✝) (x ⊗ₜ[R] y) = r✝ • (f✝ ⊗ g✝) (x ⊗ₜ[R] y)

Next tactic:
erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
instance : MonoidalLinear R (ModuleCat.{u} R) := by
  refine' ⟨_, _⟩
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.smul_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    rw [LinearMap.smul_apply, TensorProduct.tmul_smul]
  · dsimp only [autoParam]; intros
    refine' TensorProduct.ext (LinearMap.ext fun x => LinearMap.ext fun y => _)
    simp only [LinearMap.compr₂_apply, TensorProduct.mk_apply]
    rw [LinearMap.smul_apply]
    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
    erw [MonoidalCategory.hom_apply, MonoidalCategory.hom_apply]
    

Proof state:
case refine'_2
R : Type u
inst✝ : CommRing R
W✝ X✝ Y✝ Z✝ : ModuleCat R
r✝ : R
f✝ : W✝ ⟶ X✝
g✝ : Y✝ ⟶ Z✝
x : ↑W✝
y : ↑Y✝
⊢ (r✝ • f✝) x ⊗ₜ[R] g✝ y = r✝ • f✝ x ⊗ₜ[R] g✝ y

Next tactic:
rw [LinearMap.smul_apply, TensorProduct.smul_tmul, TensorProduct.tmul_smul]
/-- The Dold-Kan equivalence `Karoubi (SimplicialObject C) ≌ Karoubi (ChainComplex C ℕ)`
for additive categories. -/
@[simps]
def equivalence : Karoubi (SimplicialObject C) ≌ Karoubi (ChainComplex C ℕ) where
  functor := N
  inverse := Γ
  unitIso := Γ₂N₂
  counitIso := N₂Γ₂
  functor_unitIso_comp P := by
    

Proof state:
C : Type u_1
inst✝² : Category.{?u.1392, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
P : Karoubi (SimplicialObject C)
⊢ N.map (Γ₂N₂.hom.app P) ≫ N₂Γ₂.hom.app (N.obj P) = 𝟙 (N.obj P)

Next tactic:
let α := N.mapIso (Γ₂N₂.app P)
/-- The Dold-Kan equivalence `Karoubi (SimplicialObject C) ≌ Karoubi (ChainComplex C ℕ)`
for additive categories. -/
@[simps]
def equivalence : Karoubi (SimplicialObject C) ≌ Karoubi (ChainComplex C ℕ) where
  functor := N
  inverse := Γ
  unitIso := Γ₂N₂
  counitIso := N₂Γ₂
  functor_unitIso_comp P := by
    let α := N.mapIso (Γ₂N₂.app P)
    

Proof state:
C : Type u_1
inst✝² : Category.{?u.1392, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
P : Karoubi (SimplicialObject C)
α : N.obj ((𝟭 (Karoubi (SimplicialObject C))).obj P) ≅ N.obj ((N₂ ⋙ Γ₂).obj P) := N.mapIso (Γ₂N₂.app P)
⊢ N.map (Γ₂N₂.hom.app P) ≫ N₂Γ₂.hom.app (N.obj P) = 𝟙 (N.obj P)

Next tactic:
let β := N₂Γ₂.app (N.obj P)