Theorem: TensorPower.mul_assoc
File: Mathlib/LinearAlgebra/TensorPower.lean

tactic: 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)
state_before: 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
⊢ ↑(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)

tactic: let e : (⨂[R]^(na + nb + nc)) M ≃ₗ[R] (⨂[R]^(na + (nb + nc))) M := cast R M (add_assoc _ _ _)
state_before: 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
⊢ ↑(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)

tactic: 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)
state_before: 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))
⊢ ↑(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)

tactic: have lhs_eq : ∀ a b c, lhs a b c = e (a ₜ* b ₜ* c) := fun _ _ _ => rfl
state_before: 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.comp
    (↑(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)
⊢ ↑(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)

tactic: 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
state_before: 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.comp
    (↑(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)
⊢ ↑(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)

tactic: have rhs_eq : ∀ a b c, rhs a b c = a ₜ* (b ₜ* c) := fun _ _ _ => rfl
state_before: 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.comp
    (↑(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.comp
        (↑(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)))
⊢ ↑(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)

tactic: suffices : lhs = rhs
state_before: 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.comp
    (↑(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.comp
        (↑(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)
⊢ ↑(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)

tactic: exact LinearMap.congr_fun (LinearMap.congr_fun (LinearMap.congr_fun this a) b) c
state_before: 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.comp
    (↑(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.comp
        (↑(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.comp
    (↑(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.comp
        (↑(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

tactic: ext (a b c)
state_before: 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.comp
    (↑(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.comp
        (↑(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

tactic: simp only [LinearMap.compMultilinearMap_apply, lhs_eq, rhs_eq, tprod_mul_tprod, cast_tprod]
state_before: case this.H.H.H.H.H.H
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.comp
    (↑(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.comp
        (↑(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)
a : Fin na → M
b : Fin nb → M
c : Fin nc → M
⊢ ↑(LinearMap.compMultilinearMap
          (↑(LinearMap.compMultilinearMap (↑(LinearMap.compMultilinearMap lhs (tprod R)) a) (tprod R)) b) (tprod R))
      c =
    ↑(LinearMap.compMultilinearMap
          (↑(LinearMap.compMultilinearMap (↑(LinearMap.compMultilinearMap rhs (tprod R)) a) (tprod R)) b) (tprod R))
      c

tactic: congr with j
state_before: case this.H.H.H.H.H.H
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.comp
    (↑(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.comp
        (↑(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)
a : Fin na → M
b : Fin nb → M
c : Fin nc → M
⊢ ↑(tprod R) (Fin.append (Fin.append a b) c ∘ ↑(Fin.cast (_ : na + (nb + nc) = na + nb + nc))) =
    ↑(tprod R) (Fin.append a (Fin.append b c))

tactic: rw [Fin.append_assoc]
state_before: case this.H.H.H.H.H.H.h.e_6.h.h
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.comp
    (↑(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.comp
        (↑(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)
a : Fin na → M
b : Fin nb → M
c : Fin nc → M
j : Fin (na + (nb + nc))
⊢ (Fin.append (Fin.append a b) c ∘ ↑(Fin.cast (_ : na + (nb + nc) = na + nb + nc))) j = Fin.append a (Fin.append b c) j

tactic: refine' congr_arg (Fin.append a (Fin.append b c)) (Fin.ext _)
state_before: case this.H.H.H.H.H.H.h.e_6.h.h
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.comp
    (↑(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.comp
        (↑(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)
a : Fin na → M
b : Fin nb → M
c : Fin nc → M
j : Fin (na + (nb + nc))
⊢ ((Fin.append a (Fin.append b c) ∘ ↑(Fin.cast (_ : na + nb + nc = na + (nb + nc)))) ∘
        ↑(Fin.cast (_ : na + (nb + nc) = na + nb + nc)))
      j =
    Fin.append a (Fin.append b c) j

tactic: rw [Fin.coe_cast, Fin.coe_cast]
state_before: case this.H.H.H.H.H.H.h.e_6.h.h
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.comp
    (↑(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.comp
        (↑(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)
a : Fin na → M
b : Fin nb → M
c : Fin nc → M
j : Fin (na + (nb + nc))
⊢ ↑(↑(Fin.cast (_ : na + nb + nc = na + (nb + nc))) (↑(Fin.cast (_ : na + (nb + nc) = na + nb + nc)) j)) = ↑j