[Tex/LaTex] Text above isomorphism symbol

amsmathcommutative-diagramsmath-mode

When writing that two objects are isomorphic, I use X \cong Y.

Sometimes however, it is necessary to specify the type of isomorphism in question. I wish to do this with text above/below the isomorphism symbol, in much the same way that one can use \xrightarrow{} to insert text above an arrow indicating a map from X to Y.

Using X \cong_{text} Y or X \cong^{text} Y doesn't do exactly what I want, because this gives me subscript/superscript, which are offset from the \cong symbol. What I want is text that appears directly above/below the isomorphism symbol, like \xrightarrow.

What can I do to make that happen?

Best Answer

Like this?

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}

\begin{document}

$A\overset{a}{\cong}B, c\underset{b}{\cong}D$

\end{document}

It is possible to use \text from amsmath.

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}

\begin{document}

$A\overset{\text{over}}{\cong}B, c\underset{\text{under}}{\cong}D$

\end{document}

enter image description here

Related Question