(R : Type uR) →
  (A : Type uA) →
    (B : Type uB) →
      (M : Type uM) →
        (N : Type uN) →
          [inst : CommSemiring R] →
            [inst_1 : CommSemiring A] →
              [inst_2 : Semiring B] →
                [inst_3 : Algebra R A] →
                  [inst_4 : Algebra R B] →
                    [inst_5 : AddCommMonoid M] →
                      [inst_6 : Module R M] →
                        [inst_7 : Module A M] →
                          [inst_8 : Module B M] →
                            [IsScalarTower R A M] →
                              [inst_10 : IsScalarTower R B M] →
                                [inst_11 : SMulCommClass A B M] →
                                  [inst_12 : AddCommMonoid N] →
                                    [inst_13 : Module R N] →
                                      [inst_14 : Algebra A B] →
                                        [IsScalarTower A B M] →
                                          TensorProduct A M (TensorProduct R A N) ≃ₗ[B] TensorProduct R M N