Question: Defining Specific Spacetime Vector

Hi all,

I am doing some rather complicated four-vector manipulations, which I would like to do with maple using the Physics package.  My problem is this: I can't figure out how to define a specific four-vector.  For example, one of my four-vectors is (p,0,0,p), while another is (p cos(theta), 0, p sin(theta), p).  Here's my attempt:




**Checking the components using e.g. P1[1] shows this doesn't work.**

Then I tried defining the components myself, using:

P1[1]:=p: P1[2]:=0: P1[3]:=0: P1[4]:=p:

But when I try to have maple simplify P1_mu P1^mu, it just returns that expression (instead of zero).  So, how to a define a specific spacetime four-vector, with the components I want (instead of an arbitrary one), and then how do I make Maple evaluate the products explicitly?

Thank you for your time!

Please Wait...