Dear xAct Community,
I am working on a model with an \( R^2 \) term and a scalar field in general relativity, using xAct. My Lagrangian is defined as \( L = R + \alpha R^2 + \frac{1}{2} \nabla_a \phi \nabla^a \phi - V(\phi) \), and I am trying to compute the variations `VarAction[L, g[a, b]]` and `VarAction[L, \[Phi][]]` in general form (without a specific metric). However, I encounter the following errors:
- Join::heads: Heads IndexList and xAct`xTensor`Private`movedindices at positions 1 and 2 are expected to be the same.
- $RecursionLimit::reclim: Recursion depth of 1024 exceeded.
- Output: `TerminatedEvaluation["RecursionLimit"]`
I have set up a chart (`DefChart[generalChart, M4, {x1, x2, x3, x4}, {0, 1, 2, 3}]`) and computed geometric objects (`InvertMetric[g]`, `MetricCompute[g]`, etc.), but the issue persists.
I am attaching the notebook `r2_theory_error.nb` with the full code and error output for reference.
Could someone please help me identify the cause of this error and suggest a solution? Any advice would be greatly appreciated!
Could someone please help me identify the cause of this error and suggest a solution? Any advice would be greatly appreciated!