When \circ is used with math operators and letters inside align environment, the spacing around it is not correct in some cases.
Code:
\documentclass{article}
\usepackage{amsmath}
\DeclareMathOperator{\pr}{pr}
\begin{document}
\begin{align*}
\pr \circ f \\
\pr &\circ f \\
\\
f \circ f \\
f &\circ f \\
\\
\pr \circ \pr \\
\pr &\circ \pr \\
\\
f \circ \pr \\
f &\circ \pr
\end{align*}
\end{document}
produces:
The last six lines of formulas look fine. But for the first two lines, the space between \circ and f is too small in the first line where \circ is not behind &; while in the second line where \circ is behind a &, the space is normal, just as the following lines.
Why do the spacings behave this way?

&can only confuse the matter, but basically, if\pris used in that context, then it's not a math operator. – egreg May 17 '17 at 06:04alignstill confuses me. After further testing I find that, when I put\circ fin odd columns(which are right-aligned), there are no space between\circandf, and if in the even columns(which are left-aligned), the space is normal. How does this happen? – AaronS May 17 '17 at 07:08{}, which does as an ordinary symbol, but odd numbered columns don't end with{}. For instance, in some cases one needs=in odd numbered colums inalign; in this case={}&is required. – egreg May 17 '17 at 07:12\newcommand{\pr}{\mathop{\mathrm{pr}}\mathopen{}\mathord{}}. – Watson Jan 08 '21 at 17:27