-- Module: Mathlib.RingTheory.Coalgebra.Basic
Goal:
R : Type u
A : Type v
B : Type w
inst : CommSemiring R
inst_1 : AddCommMonoid A
inst_2 : AddCommMonoid B
inst_3 : Module R A
inst_4 : Module R B
inst_5 : Coalgebra R A
inst_6 : Coalgebra R B
x : B
hr :
  Eq (α := (A × B) ⊗[R] ((A × B) ⊗[R] (A × B)))
    ((TensorProduct.assoc R (A × B) (A × B) (A × B) :
          (a : (A × B) ⊗[R] (A × B) ⊗[R] (A × B)) → (A × B) ⊗[R] ((A × B) ⊗[R] (A × B)))
        ((rTensor (A × B)
              (coprod (TensorProduct.map (inl R A B) (inl R A B) ∘ₗ comul)
                (TensorProduct.map (inr R A B) (inr R A B) ∘ₗ comul)) :
            (a : (A × B) ⊗[R] (A × B)) → (A × B) ⊗[R] (A × B) ⊗[R] (A × B))
          (HAdd.hAdd (α := (A × B) ⊗[R] (A × B)) (β := (A × B) ⊗[R] (A × B))
            ((TensorProduct.map (inl R A B) (inl R A B) : (a : A ⊗[R] A) → (A × B) ⊗[R] (A × B))
                ((comul : (a : A) → A ⊗[R] A) 0) :
              (A × B) ⊗[R] (A × B))
            ((TensorProduct.map (inr R A B) (inr R A B) : (a : B ⊗[R] B) → (A × B) ⊗[R] (A × B))
                ((comul : (a : B) → B ⊗[R] B) x) :
              (A × B) ⊗[R] (A × B)))) :
      (A × B) ⊗[R] ((A × B) ⊗[R] (A × B)))
    ((lTensor (A × B)
            (coprod (TensorProduct.map (inl R A B) (inl R A B) ∘ₗ comul)
              (TensorProduct.map (inr R A B) (inr R A B) ∘ₗ comul)) :
          (a : (A × B) ⊗[R] (A × B)) → (A × B) ⊗[R] ((A × B) ⊗[R] (A × B)))
        (HAdd.hAdd (α := (A × B) ⊗[R] (A × B)) (β := (A × B) ⊗[R] (A × B))
          ((TensorProduct.map (inl R A B) (inl R A B) : (a : A ⊗[R] A) → (A × B) ⊗[R] (A × B))
              ((comul : (a : A) → A ⊗[R] A) 0) :
            (A × B) ⊗[R] (A × B))
          ((TensorProduct.map (inr R A B) (inr R A B) : (a : B ⊗[R] B) → (A × B) ⊗[R] (A × B))
              ((comul : (a : B) → B ⊗[R] B) x) :
            (A × B) ⊗[R] (A × B))) :
      (A × B) ⊗[R] ((A × B) ⊗[R] (A × B)))
⊢ Eq (α := (A × B) ⊗[R] ((A × B) ⊗[R] (A × B)))
    ((((↑(TensorProduct.assoc R (A × B) (A × B) (A × B)) :
                (A × B) ⊗[R] (A × B) ⊗[R] (A × B) →ₗ[R] (A × B) ⊗[R] ((A × B) ⊗[R] (A × B))) ∘ₗ
              rTensor (A × B)
                  (coprod (TensorProduct.map (inl R A B) (inl R A B) ∘ₗ comul)
                    (TensorProduct.map (inr R A B) (inr R A B) ∘ₗ comul)) ∘ₗ
                coprod (TensorProduct.map (inl R A B) (inl R A B) ∘ₗ comul)
                  (TensorProduct.map (inr R A B) (inr R A B) ∘ₗ comul)) ∘ₗ
            inr R A B :
          (a : B) → (A × B) ⊗[R] ((A × B) ⊗[R] (A × B)))
        x :
      (A × B) ⊗[R] ((A × B) ⊗[R] (A × B)))
    (((lTensor (A × B)
                (coprod (TensorProduct.map (inl R A B) (inl R A B) ∘ₗ comul)
                  (TensorProduct.map (inr R A B) (inr R A B) ∘ₗ comul)) ∘ₗ
              coprod (TensorProduct.map (inl R A B) (inl R A B) ∘ₗ comul)
                (TensorProduct.map (inr R A B) (inr R A B) ∘ₗ comul)) ∘ₗ
            inr R A B :
          (a : B) → (A × B) ⊗[R] ((A × B) ⊗[R] (A × B)))
        x :
      (A × B) ⊗[R] ((A × B) ⊗[R] (A × B)))

Tactic:
dsimp only [comp_apply, LinearEquiv.coe_coe, coe_inl, coe_inr, coprod_apply]

Premises used: LinearMap.coe_inr, LinearMap.coprod_apply, LinearMap.comp_apply, LinearMap.coe_inl, LinearEquiv.coe_coe