I often need align environments where the first line is centered, e.g., when first introducing the types of the functions to be defined, then defining them.
I essentially want to obtain the effect that \multicolumn{2}{c}
has in a table, but in an align environment.
The below solution is as far as I got, but the first line is then not centered. I could put them into separate environments, but this would mess with spacing in a way that I would like to avoid.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\omit \rlap{$f: A \to B, g: B \to C$}\\
f(a) &= \ldots \\
g(b) &= \ldots
\end{align*}
\end{document}
Any insight is appreciated. I don't really need the full power of a multicolumn command, but I want to be able to insert centered lines in an align environment.