I am using the theorem environment to arrange equations. I am assigning a distinct label for each equation. Some equations, e.g. \label{equation-a} and \label{equation-b}, are under the same theorem environment:
\begin{theorem}[Algebra-Basic] For any natural numbers a, b and c
\begin{IEEEeqnarray}{c}
a + b = b + a \label{equation-a}\\
a + (b + c) = (a + b) + c\label{equation-b}
\end{IEEEeqnarray}
\end{theorem}
I would like to add equation-a and equation-b to the index. But these should collapsed under the same entry because \nameref{...} expands both to the same string. The problem is that the expansion does not occur before generating the index, and I end up with duplicates in my list of indexes. Is it possible to make latex to expand \nameref{} before generating the index?