Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
+2 votes

I have a variable "a" which only is a function of time, ie all space derivatives are zero.

I have been trying various ways of dealing with expressions like \begin{equation}{}\partial^{r}{{a}^{-2}} h_{r}\end{equation}

I have used the substitute command to convert it to: \begin{equation}{}\eta^{r}{}_{0} \partial^{0}{{a}^{-2}} h_{r}\end{equation}

Problem is that eliminate metric doesn't seem to push through to give an h_0 term

I am using fixed indices.

Even worse when instead of $hr$, the second term is a partial derivative like \begin{equation}{}\partial^{r}{{a}^{-2}} \partial\{r}{h}\end{equation}

Then I get \begin{equation}{}\eta^{r}{}_{0} \partial^{0}{{a}^{-2}} \partial_{r}{h}\end{equation}

And I cannot get the r index pushed through via eliminate metric.

I don't want to use kronecker deltas because I will loose the sign structure of metric.

Also I have many versions of the above expression, so I have been creating long substitution rules (seems like I need all the combinations of fixed indices, plus different tensor and derivative forms).

I don't really want to use the split index function to separate out space and time indices at this point in my calculation since the number of terms will explode, and I already have very many. It is a perturbation problem to third order.

Also many times canonicalize seems to crash the program with all of these metric terms.

Final question -- since fixed indices seems to make it tough to simply things, when is it safe to switch back to free indices. My raising and lowering metric is Minkowski.

Can I do part of a calculation with fixed indices then switch to free later on with another Indices declaration. Same with post_process -- can I start with one (without canonicalize) and then use another later.

Thanks for your thoughts.

Any ideas?

So, is there a better way to do this

in General questions by (520 points)

1 Answer

+2 votes

I think you make this more complicated than necessary. If you already have it as

$$\eta^{r}{}_{0} \partial^{0}a^{-2}~h_{r}$$

then $\eta^{r}{}_{0}$ is a Kronecker delta. Declare it as such and use eliminate_kronecker to get rid of it. That doesn't 'loose sign' of the metric because you still have your $\partial^{0}$ with upper index 0, not lower index.

Maybe I misunderstood.

In general, what you probably would want to have is some way to do a split_index but only for indices which appear on certain tensors (in your case: indices which appear on derivatives which hit $a$ factors). I'll think about this; I never had the need for this.

As for the 2nd part of your question: you can change the declaration of an index set half-way through a computation, as long as the set is the same. So you can do

{r,s,t}::Indices(position=fixed);
[some computation]
{r,s,t}::Indices(position=free);

but you cannot do

{r,s,t}::Indices(position=fixed);
[some computation]
{r,s}::Indices(position=free);

(or at least the result is undefined).

You can safely re-define the post_process function midway, too.

by (83.1k points)
Kronecker 0 0 form
...