Question: Contraction in Physics package

So I have the following:

restart;
with(Physics):
Setup(mathematicalnotation=true,coordinatesystems=cartesian);
Define(A[mu](X));

First of all X ist defined in terms of (x,y,z,t). Is is also possible to define it in terms of (t,x,y,z) with t being mu=0.

When I do

alias(X=(t,x,y,z))

this applies only to this one vector and

d_[4] is still the time differentiation, right?

 

Then I wanted to construct the divergence

d_[`~mu`] A[mu](X);
TensorArray(%,performsumoverrepeatedindices=true);

 

This should give me sth like d1 A1 + ... + d4 A4, but it stays with d_mu A_mu ?!?

Why?

Is there also a "function" which does the contraction?

So if I have

f[mu,nu]=d_[mu] A[nu](X)

eval(f[mu,nu],nu=mu)

contract(%)

??

Please Wait...