-- Lean 4 proof step from Mathlib.RingTheory.Coalgebra.TensorProduct (goal)
Goal:
R : Type u_1
S : Type u_2
A : Type u_3
B : Type u_4
inst : CommSemiring R
inst_1 : CommSemiring S
inst_2 : AddCommMonoid A
inst_3 : AddCommMonoid B
inst_4 : Algebra R S
inst_5 : Module R A
inst_6 : Module S A
inst_7 : Module R B
inst_8 : IsScalarTower R S A
inst_9 : Coalgebra R B
inst_10 : Coalgebra S A
x : A
y : B
F : TensorProduct.{u_1, u_3, u_4} R (A ⊗[S] (A ⊗[S] A)) (B ⊗[R] (B ⊗[R] B)) ≃ₗ[S]
  A ⊗[R] B ⊗[S] (A ⊗[R] B ⊗[S] (A ⊗[R] B)) :=
  (AlgebraTensorModule.tensorTensorTensorComm R S R S A (A ⊗[S] A) B (B ⊗[R] B) :
      TensorProduct.{u_1, u_3, u_4} R (A ⊗[S] (A ⊗[S] A)) (B ⊗[R] (B ⊗[R] B)) ≃ₗ[S]
        A ⊗[R] B ⊗[S] TensorProduct.{u_1, u_3, u_4} R (A ⊗[S] A) (B ⊗[R] B)) ≪≫ₗ
    (AlgebraTensorModule.congr (LinearEquiv.refl S (A ⊗[R] B))
        (AlgebraTensorModule.tensorTensorTensorComm R S R S A A B B) :
      A ⊗[R] B ⊗[S] TensorProduct.{u_1, u_3, u_4} R (A ⊗[S] A) (B ⊗[R] B) ≃ₗ[S]
        A ⊗[R] B ⊗[S] (A ⊗[R] B ⊗[S] (A ⊗[R] B)))
F' : TensorProduct.{u_1, u_3, u_4} R (A ⊗[S] (A ⊗[S] A)) (B ⊗[R] (B ⊗[R] B)) →ₗ[S]
  A ⊗[R] B ⊗[S] (A ⊗[R] B ⊗[S] (A ⊗[R] B)) :=
  mapOfCompatibleSMul S S S (A ⊗[R] B) (A ⊗[R] B ⊗[S] (A ⊗[R] B)) ∘ₗ
    map LinearMap.id (mapOfCompatibleSMul S S S (A ⊗[R] B) (A ⊗[R] B)) ∘ₗ
      (↑F : A ⊗[S] (A ⊗[S] A) ⊗[R] (B ⊗[R] (B ⊗[R] B)) →ₗ[S] A ⊗[R] B ⊗[S] (A ⊗[R] B ⊗[S] (A ⊗[R] B)))
⊢ Eq (α := A ⊗[R] B ⊗[S] (A ⊗[R] B ⊗[S] (A ⊗[R] B)))
    ((LinearMap.lTensor (A ⊗[R] B) comul : (a : A ⊗[R] B ⊗[S] (A ⊗[R] B)) → A ⊗[R] B ⊗[S] (A ⊗[R] B ⊗[S] (A ⊗[R] B)))
        (((AlgebraTensorModule.tensorTensorTensorComm R S R S A A B B :
              TensorProduct.{u_1, u_3, u_4} R (A ⊗[S] A) (B ⊗[R] B) ≃ₗ[S] A ⊗[R] B ⊗[S] (A ⊗[R] B)) :
            (a : A ⊗[S] A ⊗[R] (B ⊗[R] B)) → A ⊗[R] B ⊗[S] (A ⊗[R] B))
          ((comul : (a : A) → A ⊗[S] A) x ⊗ₜ[R] (comul : (a : B) → B ⊗[R] B) y)) :
      A ⊗[R] B ⊗[S] (A ⊗[R] B ⊗[S] (A ⊗[R] B)))
    ((F : (a : A ⊗[S] (A ⊗[S] A) ⊗[R] (B ⊗[R] (B ⊗[R] B))) → A ⊗[R] B ⊗[S] (A ⊗[R] B ⊗[S] (A ⊗[R] B)))
        ((LinearMap.lTensor A comul : (a : A ⊗[S] A) → A ⊗[S] (A ⊗[S] A)) ((comul : (a : A) → A ⊗[S] A) x) ⊗ₜ[R]
          (LinearMap.lTensor B comul : (a : B ⊗[R] B) → B ⊗[R] (B ⊗[R] B)) ((comul : (a : B) → B ⊗[R] B) y)) :
      A ⊗[R] B ⊗[S] (A ⊗[R] B ⊗[S] (A ⊗[R] B)))
have h : ∀ (x₁ x₂ : A),
  Eq (α := A ⊗[R] B ⊗[S] (A ⊗[R] B ⊗[S] (A ⊗[R] B)))
    ((LinearMap.lTensor (A ⊗[R] B) comul : (a : A ⊗[R] B ⊗[S] (A ⊗[R] B)) → A ⊗[R] B ⊗[S] (A ⊗[R] B ⊗[S] (A ⊗[R] B)))
        (((AlgebraTensorModule.tensorTensorTensorComm R S R S A A B B :
              TensorProduct.{u_1, u_3, u_4} R (A ⊗[S] A) (B ⊗[R] B) ≃ₗ[S] A ⊗[R] B ⊗[S] (A ⊗[R] B)) :
            (a : A ⊗[S] A ⊗[R] (B ⊗[R] B)) → A ⊗[R] B ⊗[S] (A ⊗[R] B))
          (x₁ ⊗ₜ[S] x₂ ⊗ₜ[R] (comul : (a : B) → B ⊗[R] B) y)) :
      A ⊗[R] B ⊗[S] (A ⊗[R] B ⊗[S] (A ⊗[R] B)))
    ((F : (a : A ⊗[S] (A ⊗[S] A) ⊗[R] (B ⊗[R] (B ⊗[R] B))) → A ⊗[R] B ⊗[S] (A ⊗[R] B ⊗[S] (A ⊗[R] B)))
        ((LinearMap.lTensor A comul : (a : A ⊗[S] A) → A ⊗[S] (A ⊗[S] A)) (x₁ ⊗ₜ[S] x₂) ⊗ₜ[R]
          (LinearMap.lTensor B comul : (a : B ⊗[R] B) → B ⊗[R] (B ⊗[R] B)) ((comul : (a : B) → B ⊗[R] B) y)) :
      A ⊗[R] B ⊗[S] (A ⊗[R] B ⊗[S] (A ⊗[R] B)))
Tactic: hopf_tensor_induction comul (R := S) x with x₁ x₂