(R : Type uR) →
  (A : Type uA) →
    (M : Type uM) →
      (P : Type uP) →
        (Q : Type uQ) →
          [inst : CommSemiring R] →
            [inst_1 : CommSemiring A] →
              [inst_2 : Algebra R A] →
                [inst_3 : AddCommMonoid M] →
                  [inst_4 : Module R M] →
                    [inst_5 : Module A M] →
                      [inst_6 : IsScalarTower R A M] →
                        [inst_7 : AddCommMonoid P] →
                          [inst_8 : Module A P] →
                            [inst_9 : AddCommMonoid Q] →
                              [inst_10 : Module R Q] →
                                [inst_11 : Module R P] →
                                  [inst_12 : IsScalarTower R A P] →
                                    TensorProduct A M (TensorProduct R P Q) ≃ₗ[A]
                                      TensorProduct A P (TensorProduct R M Q)