How to make ParamD to commute with partial derivative?

46 views
Skip to first unread message

Júnior Diniz Toniato

unread,
Mar 2, 2018, 5:06:25 PM3/2/18
to xAct Tensor Computer Algebra
Dear all,

I'm learning to work with mathematica and xTensor package. 
I would like to know if it is possible to make ParamD and PD to comute.
My PD has been defined together with a flat metric:

DefMetric[1, \[Delta][-i, -j], PD, {",", "\[PartialD]"}, 
  FlatMetric -> True, PrintAs -> "\[Delta]"];

And I have a parameter t: 

DefParameter[t]

Now, I want that mathematica understands that

ParamD[t][PD[-i][X]]

is the same as

PD[-i][ParamD[t][X]],

where X can be any tensor with 0, 1 or 2 indices.

Thanks for your time.

ghadir jafari

unread,
Mar 3, 2018, 10:02:52 AM3/3/18
to xAct Tensor Computer Algebra
Hi Toniato
You can set this as follows:
Unprotect[PD];
ParamD[t]@PD[-i_]@A_ := PD[-i]@ParamD[t]@A
Protect[PD];

Júnior Diniz Toniato

unread,
Mar 7, 2018, 8:12:12 PM3/7/18
to xAct Tensor Computer Algebra
Thank you, Jafari.

It worked fine.
Reply all
Reply to author
Forward
0 new messages