3

Consider the following minimal working example:

<< xAct`xTras`
DefManifold[spacetime, 4, {α, β, γ, μ, κ, ν, ξ, ρ, ζ, τ}]
DefMetric[{3, 1, 0}, Met[-μ, -ν], CD, {";", "∇"}, 
 PrintAs -> "g"]

(* 1 *) DefTensor[u[-μ], spacetime] DefChart[coords, spacetime, {0, 1, 2, 3}, {t[], r[], Θ[], ϕ[]}]

(* 2 *) expr = u[α] PD[-α][u[-β]] basisexpr = ToBasis[coords][%]

(* 3 *) TraceBasisDummy[basisexpr] ContractBasis[ComponentArray[%]]

In (1) I have defined a tensor and a chart. In (2) I define a single term of some expression:

$$ \text{expr}_\beta = u^\alpha \partial_\alpha u_\beta $$

Then ask to give the result in a basis (3). However, it will not replace the free indices with the basis indices:

enter image description here

ContractBasis does not work. I assume there is a function to tell xAct that the basis vectors can move through the partial derivatives (perhaps the mixed indices are confusing it) but I can't find it in the manual now.

Thanks

user64494
  • 26,149
  • 4
  • 27
  • 56
akozi
  • 853
  • 3
  • 10

0 Answers0