-- Mathlib/LinearAlgebra/DirectSum/Finsupp.lean
lemma finsuppLeft_apply_tmul (p : ι →₀ M) (n : N) :
    finsuppLeft R M N ι (p ⊗ₜ[R] n) = p.sum fun i m ↦ Finsupp.single i (m ⊗ₜ[R] n)

Proof state:
case hsingle
R : Type u_1
inst✝⁵ : CommSemiring R
M : Type u_2
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
N : Type u_3
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
ι : Type u_4
inst✝ : DecidableEq ι
p : ι →₀ M
n : N
⊢ ∀ (a : ι) (b : M),
    (finsuppLeft R M N ι) (Finsupp.single a b ⊗ₜ[R] n) =
      (Finsupp.single a b).sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)

Tactic:
simp [finsuppLeft]

Result:
no goals

Proof state:
R : Type u_1
inst✝⁵ : CommSemiring R
M : Type u_2
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
N : Type u_3
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
ι : Type u_4
inst✝ : DecidableEq ι
p : ι →₀ M
n : N
⊢ (finsuppLeft R M N ι) (p ⊗ₜ[R] n) = p.sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)

Tactic:
apply p.induction_linear

Result:
case h0
R : Type u_1
inst✝⁵ : CommSemiring R
M : Type u_2
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
N : Type u_3
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
ι : Type u_4
inst✝ : DecidableEq ι
p : ι →₀ M
n : N
⊢ (finsuppLeft R M N ι) (0 ⊗ₜ[R] n) = Finsupp.sum 0 fun i m => Finsupp.single i (m ⊗ₜ[R] n)

case hadd
R : Type u_1
inst✝⁵ : CommSemiring R
M : Type u_2
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
N : Type u_3
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
ι : Type u_4
inst✝ : DecidableEq ι
p : ι →₀ M
n : N
⊢ ∀ (f g : ι →₀ M),
    ((finsuppLeft R M N ι) (f ⊗ₜ[R] n) = f.sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)) →
      ((finsuppLeft R M N ι) (g ⊗ₜ[R] n) = g.sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)) →
        (finsuppLeft R M N ι) ((f + g) ⊗ₜ[R] n) = (f + g).sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)

case hsingle
R : Type u_1
inst✝⁵ : CommSemiring R
M : Type u_2
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
N : Type u_3
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
ι : Type u_4
inst✝ : DecidableEq ι
p : ι →₀ M
n : N
⊢ ∀ (a : ι) (b : M),
    (finsuppLeft R M N ι) (Finsupp.single a b ⊗ₜ[R] n) =
      (Finsupp.single a b).sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)

Proof state:
case hadd
R : Type u_1
inst✝⁵ : CommSemiring R
M : Type u_2
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
N : Type u_3
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
ι : Type u_4
inst✝ : DecidableEq ι
p : ι →₀ M
n : N
f g : ι →₀ M
hf : (finsuppLeft R M N ι) (f ⊗ₜ[R] n) = f.sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)
hg : (finsuppLeft R M N ι) (g ⊗ₜ[R] n) = g.sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)
⊢ (finsuppLeft R M N ι) ((f + g) ⊗ₜ[R] n) = (f + g).sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)

Tactic:
simp [add_tmul, map_add, hf, hg, Finsupp.sum_add_index]

Result:
no goals

Proof state:
case h0
R : Type u_1
inst✝⁵ : CommSemiring R
M : Type u_2
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
N : Type u_3
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
ι : Type u_4
inst✝ : DecidableEq ι
p : ι →₀ M
n : N
⊢ (finsuppLeft R M N ι) (0 ⊗ₜ[R] n) = Finsupp.sum 0 fun i m => Finsupp.single i (m ⊗ₜ[R] n)

Tactic:
simp

Result:
no goals

Proof state:
case hadd
R : Type u_1
inst✝⁵ : CommSemiring R
M : Type u_2
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
N : Type u_3
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
ι : Type u_4
inst✝ : DecidableEq ι
p : ι →₀ M
n : N
⊢ ∀ (f g : ι →₀ M),
    ((finsuppLeft R M N ι) (f ⊗ₜ[R] n) = f.sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)) →
      ((finsuppLeft R M N ι) (g ⊗ₜ[R] n) = g.sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)) →
        (finsuppLeft R M N ι) ((f + g) ⊗ₜ[R] n) = (f + g).sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)

Tactic:
intros f g hf hg

Result:
case hadd
R : Type u_1
inst✝⁵ : CommSemiring R
M : Type u_2
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
N : Type u_3
inst✝² : AddCommMonoid N
inst✝¹ : Module R N
ι : Type u_4
inst✝ : DecidableEq ι
p : ι →₀ M
n : N
f g : ι →₀ M
hf : (finsuppLeft R M N ι) (f ⊗ₜ[R] n) = f.sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)
hg : (finsuppLeft R M N ι) (g ⊗ₜ[R] n) = g.sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)
⊢ (finsuppLeft R M N ι) ((f + g) ⊗ₜ[R] n) = (f + g).sum fun i m => Finsupp.single i (m ⊗ₜ[R] n)