Hi. I'm trying to compactify a la Kaluza-Klein a very simple term

$$L = H*{\Sigma \Sigma} \theta \partial*{\Pi}{\partial^{\Pi}{\theta}},$$
where the capital Greek indices are in five dimensions, $H$ and $\theta$ are the fields (and so far I don't care about the position of the indices).

## Definitions

```
{\Lambda,\Theta,\Sigma,\Xi,\Gamma,\Delta,\Pi,\Omega}::Indices(full,position=independent);
{\mu,\nu,\rho,\sigma,\gamma,\lambda}::Indices(space1,position=independent);
\partial{#}::PartialDerivative;
H_{\Pi? \Sigma?}::Symmetric;
```

## The spliting of indices

```
fourterm:= a k/4 (H_{\Sigma \Sigma} \theta \partial_{\Pi}{\partial^{\Pi}{\theta}});
split_index(_, $\Sigma,\sigma,4$, repeat=True);
```

So far so good, but I would like to substitute the different components of $H$ according to the Kaluza-Klein ansatz.

## Substitutions

```
Htoh:= H_{\mu? \nu?} -> (e^{2 \alpha \phi} h_{\mu? \nu?} + e^{2 \beta \phi} A_{\mu?} A_{\nu?});
Htot:= H_t -> e^{2 \alpha \phi} h_t;
HtoA:= H_{\mu? 4} -> e^{2 \beta \phi} A_{\mu?};
HtoS:= H_{4 4} -> e^{2 \beta \phi};
```

when I execute the line

`substitute(fourterm, HtoS);`

the result is Ok. However, if I ask to substitute the tensor component,

`substitute(fourterm, Htoh);`

I get the message:

```
"""
RuntimeError: substitute: Index error in replacement rule. Free indices in different terms in a sum do not match.
At:
<string>(2): <module>
"""
```

### Questions

- Do you reprodure the error?
- What can I do to solve it?
- It seems that is due to the presence of the sum on the substitution.... If I ask to substitute a monomial it does it without problems. However, I've done complicated substitutions with the commend.

**Set up**

Running Debian buster (up to date).

Cadabra: 2.2.6 (compilated from github)