@@ -333,15 +333,18 @@ protected theorem add_smul (r s : R'') (x : M ⊗[R] N) : (r + s) • x = r •
333333 rw [ihx, ihy, add_add_add_comm]
334334#align tensor_product.add_smul TensorProduct.add_smul
335335
336+ instance addMonoid : AddMonoid (M ⊗[R] N) :=
337+ { TensorProduct.addZeroClass _ _ with
338+ toAddSemigroup := TensorProduct.addSemigroup _ _
339+ toZero := (TensorProduct.addZeroClass _ _).toZero
340+ nsmul := fun n v => n • v
341+ nsmul_zero := by simp [TensorProduct.zero_smul]
342+ nsmul_succ := by simp only [TensorProduct.one_smul, TensorProduct.add_smul, add_comm,
343+ forall_const] }
344+
336345instance addCommMonoid : AddCommMonoid (M ⊗[R] N) :=
337- { TensorProduct.addCommSemigroup _ _,
338- TensorProduct.addZeroClass _ _ with
339- toAddSemigroup := TensorProduct.addSemigroup _ _
340- toZero := (TensorProduct.addZeroClass _ _).toZero
341- nsmul := fun n v => n • v
342- nsmul_zero := by simp [TensorProduct.zero_smul]
343- nsmul_succ := by simp only [TensorProduct.one_smul, TensorProduct.add_smul, add_comm,
344- forall_const] }
346+ { TensorProduct.addCommSemigroup _ _ with
347+ toAddMonoid := TensorProduct.addMonoid }
345348
346349instance leftDistribMulAction : DistribMulAction R' (M ⊗[R] N) :=
347350 have : ∀ (r : R') (m : M) (n : N), r • m ⊗ₜ[R] n = (r • m) ⊗ₜ n := fun _ _ _ => rfl
0 commit comments