# How to keep the vector product form?

When we deal with the vector product problem, we usually should define some fixed form for the vector product. For instance, I define it in this way,

   Unprotect[Times];
R[x1_] Rp[x2_] := RRp[x1, x2];
R[x1_] R[x2_] := If[x1==x2,R[x1]^2, RR[x1, x2]];
Rp[x1_] Rp[x2_] := If[x1==x2,Rp[x1]^2,RpRp[x1, x2]];
Protect[Times];


Here, R[] and Rp[] are vectors. In some simple cases, it works. For example,

   (R[1] - Rp[3])^2 // Expand
=R[1]^2 + Rp[3]^2 - 2 RRp[1, 3]


However, in the following case, something is wrong.

   (R[1] - Rp[3])^3 // Expand
=R[1]^3 - 3 R[1]^2 Rp[3] + 3 R[1] Rp[3]^2 - Rp[3]^3


The expected result is

  R[1]^3-R[1]^2Rp[3]+R[1]Rp[3]^2-Rp[3]^3-2 R[1]RRp[1, 3] +2 Rp[3]RRp[1, 3]


So, how to find a simple way to fixed the vector product in the complicated expand form ?

-
What kind of a vector product do you need? If Cross perhaps this question will be helpful. –  Artes Mar 21 at 12:58
You defined new rules for Times but not for Power. –  m_goldberg Mar 21 at 17:00