I've made the equations align here using \hphantom{}:
\begin{theorem}[Möbius inversion]
Let $n \in \mathbb{Z}^+$, and let $g$ and $h$ be complex-valued functions defined on $\mathbb{Z}^+$ or on the set of divisors of $n$.
\renewcommand{\labelenumi}{(\roman{enumi})}
\begin{enumerate}
\item If\hphantom{then} $\displaystyle h(k) = \sum\limits_{d \mid k} g(d) \hphantom{\mu(k/d)}$ \quad for all $k$, \\\\
then\hphantom{If} $\displaystyle g(k) = \sum\limits_{d \mid k} \mu(k/d) h(d)$ \quad for all $k$. \\
\item If\hphantom{then} $\displaystyle h(k) = \sum\limits_{k \mid d \mid n} g(d) \hphantom{\mu(d/k)}$ \quad for all $k$, \\\\
then\hphantom{If} $\displaystyle g(k) = \sum\limits_{k \mid d \mid n} \mu(d/k) h(d)$ \quad for all $k$.
\end{enumerate}
\end{theorem}
However, it's a bit of a hassle and it's not a very flexible method. I'd like something like \paddedtext{2em}{If} which takes the text If and adds horizontal space so that its width is 2em. Or some way to say "insert 2em minus the length of If".



\renewcommand{\labelenumi}{(\roman{enumi})}to\renewcommand{\labelenumi}{\upshape(\roman{enumi})}. That way,(i),(ii)etc will be rendered in the upright font shape, making them look more "structural" and less like part of the running text. – Mico Jun 09 '21 at 06:37