I have the following simple code which causes some problems, would be great if someone could point out what is going wrong here:
\begin{compactenum}
\item Perform addition over all bits
\[
$\mbox{for~} j \in \{0 \ldots 7\} $ \\
$r_j = 8 \cdot a_j + 4 \cdot b_j + 2 \cdot x_j + 1 \cdot y_j$
\]
\end{compactenum}
LaTeX outputs the following error message:
! Missing $ inserted.
<inserted text>
$
l.822 $\mbox{for~} j \in
\{0 \ldots 7\} $ \\
