# Sorting indices of tensors [closed]

Hi. I've been working on a Kaluza-Klein dimensional reduction. In the reduced model there are terms like $g{a 5}$ and $g{5 a}$. Is the a command that sort the indices, and allows to write everything in terms of a single component?
closed with the note: Solved!... after declaring the symmetries os the tensor $g$, canonicalise does the job