When calculating the Einstein equation in this tutorial

https://cadabra.science/notebooks/einstein_equations.html

why write

t1 = action[1][0][0][2]

?

Thank you for any elucidation.

+1 vote

When calculating the Einstein equation in this tutorial

https://cadabra.science/notebooks/einstein_equations.html

why write

t1 = action[1][0][0][2]

?

Thank you for any elucidation.

+1 vote

Hi.

First I'd like to point that `action`

is an expression representing the variation of the action, written as an equation. Therefore, the zeroes component of the equation is the left-hand side, i.e., `action[0]`

is $\delta S$, while the first component of the equation is the right-hand side, i.e., `action[1]`

represents the whole integral , $\int \Big( \cdots \Big) \mathrm{d}x$.

Since the left-hand side of `action`

is composed by other terms, you can repeat the decomposition process... and this allow you to select the piece of the expression for you to manipulate. In the notebook you mention, `action[1][0][0][2]`

represents the term containing the variation of the metric (without the variation of the connection).

+1 vote

Hi skyfold,

as explained by doxdrum, the

```
action[1][0][0][2]
```

command selects the part of expression we are interested to.

In particular, the command extracts the terms not represented by total derivatives.

I note that in general this approach is not very stable because it depends on the position [1][0][0][2] of the terms in the expression. If they had had a change of position or the expression had a different manipulation, the command would fail.

Mattia

...