theorem mul_assoc {na nb nc} (a : (⨂[R]^na) M) (b : (⨂[R]^nb) M) (c : (⨂[R]^nc) M) :
    cast R M (add_assoc _ _ _) (a ₜ* b ₜ* c) = a ₜ* (b ₜ* c) := by
  let mul : ∀ n m : ℕ, (⨂[R]^n) M →ₗ[R] (⨂[R]^m) M →ₗ[R] (⨂[R]^(n + m)) M := fun n m =>
    (TensorProduct.mk R _ _).compr₂ ↑(mulEquiv : _ ≃ₗ[R] (⨂[R]^(n + m)) M)
  -- replace `a`, `b`, `c` with `tprod R a`, `tprod R b`, `tprod R c`
  let e : (⨂[R]^(na + nb + nc)) M ≃ₗ[R] (⨂[R]^(na + (nb + nc))) M := cast R M (add_assoc _ _ _)
  let lhs : (⨂[R]^na) M →ₗ[R] (⨂[R]^nb) M →ₗ[R] (⨂[R]^nc) M →ₗ[R] (⨂[R]^(na + (nb + nc))) M :=
    (LinearMap.llcomp R _ _ _ ((mul _ nc).compr₂ e.toLinearMap)).comp (mul na nb)
  have lhs_eq : ∀ a b c, lhs a b c = e (a ₜ* b ₜ* c) := fun _ _ _ => rfl
  let rhs : (⨂[R]^na) M →ₗ[R] (⨂[R]^nb) M →ₗ[R] (⨂[R]^nc) M →ₗ[R] (⨂[R]^(na + (nb + nc))) M :=
    (LinearMap.llcomp R _ _ _ (LinearMap.lflip (R := R)) <|
        (LinearMap.llcomp R _ _ _ (mul na _).flip).comp (mul nb nc)).flip
  have rhs_eq : ∀ a b c, rhs a b c = a ₜ* (b ₜ* c) := fun _ _ _ => rfl
  suffices : lhs = rhs
  

Proof state:
R : Type u_1
M : Type u_2
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
na nb nc : ℕ
a : (⨂[R]^na) M
b : (⨂[R]^nb) M
c : (⨂[R]^nc) M
mul : (n m : ℕ) → (⨂[R]^n) M →ₗ[R] (⨂[R]^m) M →ₗ[R] (⨂[R]^(n + m)) M :=
  fun n m => LinearMap.compr₂ (TensorProduct.mk R ((⨂[R]^n) M) ((⨂[R]^m) M)) ↑mulEquiv
e : (⨂[R]^(na + nb + nc)) M ≃ₗ[R] (⨂[R]^(na + (nb + nc))) M := cast R M (_ : na + nb + nc = na + (nb + nc))
lhs : (⨂[R]^na) M →ₗ[R] (⨂[R]^nb) M →ₗ[R] (⨂[R]^nc) M →ₗ[R] (⨂[R]^(na + (nb + nc))) M :=
  (LinearMap.llcomp R ((⨂[R]^nb) M) ((⨂[R]^(na + nb)) M) ((⨂[R]^nc) M →ₗ[R] (⨂[R]^(na + (nb + nc))) M))
      (LinearMap.compr₂ (mul (na + nb) nc) ↑e) ∘ₗ
    mul na nb
lhs_eq :
  ∀ (a : (⨂[R]^na) M) (b : (⨂[R]^nb) M) (c : (⨂[R]^nc) M),
    ((lhs a) b) c = e (GradedMonoid.GMul.mul (GradedMonoid.GMul.mul a b) c)
rhs : (⨂[R]^na) M →ₗ[R] (⨂[R]^nb) M →ₗ[R] (⨂[R]^nc) M →ₗ[R] (⨂[R]^(na + (nb + nc))) M :=
  LinearMap.flip
    (((LinearMap.llcomp R ((⨂[R]^nb) M) ((⨂[R]^nc) M →ₗ[R] (⨂[R]^na) M →ₗ[R] (⨂[R]^(na + (nb + nc))) M)
          ((⨂[R]^na) M →ₗ[R] (⨂[R]^nc) M →ₗ[R] (⨂[R]^(na + (nb + nc))) M))
        LinearMap.lflip)
      ((LinearMap.llcomp R ((⨂[R]^nc) M) ((⨂[R]^(nb + nc)) M) ((⨂[R]^na) M →ₗ[R] (⨂[R]^(na + (nb + nc))) M))
          (LinearMap.flip (mul na (nb + nc))) ∘ₗ
        mul nb nc))
rhs_eq :
  ∀ (a : (⨂[R]^na) M) (b : (⨂[R]^nb) M) (c : (⨂[R]^nc) M),
    ((rhs a) b) c = GradedMonoid.GMul.mul a (GradedMonoid.GMul.mul b c)
this : lhs = rhs
⊢ (cast R M (_ : na + nb + nc = na + (nb + nc))) (GradedMonoid.GMul.mul (GradedMonoid.GMul.mul a b) c) =
    GradedMonoid.GMul.mul a (GradedMonoid.GMul.mul b c)
case this
R : Type u_1
M : Type u_2
inst✝² : CommSemiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
na nb nc : ℕ
a : (⨂[R]^na) M
b : (⨂[R]^nb) M
c : (⨂[R]^nc) M
mul : (n m : ℕ) → (⨂[R]^n) M →ₗ[R] (⨂[R]^m) M →ₗ[R] (⨂[R]^(n + m)) M :=
  fun n m => LinearMap.compr₂ (TensorProduct.mk R ((⨂[R]^n) M) ((⨂[R]^m) M)) ↑mulEquiv
e : (⨂[R]^(na + nb + nc)) M ≃ₗ[R] (⨂[R]^(na + (nb + nc))) M := cast R M (_ : na + nb + nc = na + (nb + nc))
lhs : (⨂[R]^na) M →ₗ[R] (⨂[R]^nb) M →ₗ[R] (⨂[R]^nc) M →ₗ[R] (⨂[R]^(na + (nb + nc))) M :=
  (LinearMap.llcomp R ((⨂[R]^nb) M) ((⨂[R]^(na + nb)) M) ((⨂[R]^nc) M →ₗ[R] (⨂[R]^(na + (nb + nc))) M))
      (LinearMap.compr₂ (mul (na + nb) nc) ↑e) ∘ₗ
    mul na nb
lhs_eq :
  ∀ (a : (⨂[R]^na) M) (b : (⨂[R]^nb) M) (c : (⨂[R]^nc) M),
    ((lhs a) b) c = e (GradedMonoid.GMul.mul (GradedMonoid.GMul.mul a b) c)
rhs : (⨂[R]^na) M →ₗ[R] (⨂[R]^nb) M →ₗ[R] (⨂[R]^nc) M →ₗ[R] (⨂[R]^(na + (nb + nc))) M :=
  LinearMap.flip
    (((LinearMap.llcomp R ((⨂[R]^nb) M) ((⨂[R]^nc) M →ₗ[R] (⨂[R]^na) M →ₗ[R] (⨂[R]^(na + (nb + nc))) M)
          ((⨂[R]^na) M →ₗ[R] (⨂[R]^nc) M →ₗ[R] (⨂[R]^(na + (nb + nc))) M))
        LinearMap.lflip)
      ((LinearMap.llcomp R ((⨂[R]^nc) M) ((⨂[R]^(nb + nc)) M) ((⨂[R]^na) M →ₗ[R] (⨂[R]^(na + (nb + nc))) M))
          (LinearMap.flip (mul na (nb + nc))) ∘ₗ
        mul nb nc))
rhs_eq :
  ∀ (a : (⨂[R]^na) M) (b : (⨂[R]^nb) M) (c : (⨂[R]^nc) M),
    ((rhs a) b) c = GradedMonoid.GMul.mul a (GradedMonoid.GMul.mul b c)
⊢ lhs = rhs

Next tactic:
exact LinearMap.congr_fun (LinearMap.congr_fun (LinearMap.congr_fun this a) b) c