4
$\begingroup$

I'm trying to get out some equations in the xAct suite. I would like to somehow define that the norm of a vector is a constant.

DefManifold[M, 4, {\[Alpha], \[Beta], \[Gamma], \[Mu], \[Nu], \[Rho], \ \[Sigma]}] DefMetric[-1, metricg[-\[Alpha], -\[Beta]], CD, {"|", "\[Del]"}, PrintAs -> "g"] DefTensor[u[\[Alpha]], M] u[\[Beta]] CD[-\[Alpha]]@u[-\[Beta]] // ToCanonical

I recieve the output $$ u^\beta \nabla_\alpha u_\beta $$ but I would like recieve zero, since if the vector is normalized to an arbitrary constant it holds that $$ u^\beta \nabla_\alpha u_\beta = \frac{1}{2} \nabla_\alpha(u^\beta u_\beta) = 0. $$ Is there a way to do this?

$\endgroup$

1 Answer 1

2
$\begingroup$

This can be done using upvalues. If, for example, your vector has norm -1 then you can declare:

u /: u[\[Alpha]_] u[-\[Alpha]_] := -1

u /: u[\[Beta]_] CD[\[Alpha]_][u[\[Gamma]_]] := 0 /; PairQ[\[Beta], \[Gamma]]

Note that xAct does not automatically deduce the second relation from the first.

Note also that this is assuming that all indices are abstract indices and that they are all raised and lowered with the metric you defined.

$\endgroup$
1
  • $\begingroup$ Thank you very much! $\endgroup$
    – Nitaa a
    Commented Aug 29, 2022 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.