With tikz-cd
:
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tikz-cd}
\usetikzlibrary{decorations.pathreplacing, calligraphy}
\begin{document}
\[
\begin{tikzcd}[
row sep=0pt,
every matrix/.append style={name=mycd, nodes={text centered, text height=height{"C"},text depth=depth{"p"}, inner ysep=2pt}
},
/tikz/column 2/.append style={nodes={text width=width("Down")}},
execute at end picture={
\draw [decorate,decoration={calligraphic brace, amplitude=5pt}] (mycd-1-1.north east) -- (mycd-3-1.south east);
\draw [decorate,decoration={calligraphic brace, mirror, amplitude=5pt}] (mycd-1-2.north west) -- (mycd-3-2.south west);
},
]
A\ar[r,"f", shorten=-.1cm]&[2em]\text{Cup}\\
\otimes\ar[r,"f\otimes g", shorten=.3cm]&\otimes\\
B\ar[r,"g"', shorten=-.1cm]&\text{Down}
\end{tikzcd}
\]
\[
\begin{tikzcd}[
row sep=0pt,
every matrix/.append style={name=mycd, nodes={text centered, text height=height{"C"},text depth=depth{"p"}, inner ysep=2pt}
},
/tikz/column 2/.append style={nodes={text width=width("Down")}},
execute at end picture={
\draw [decorate,decoration={calligraphic brace, amplitude=5pt}] (mycd-1-1.north east) -- (mycd-3-1.south east);
\draw [decorate,decoration={calligraphic brace, mirror, amplitude=5pt}] (mycd-1-2.north west) -- (mycd-3-2.south west);
},
]
A\ar[r,"f", shorten=-.1cm, bend left]&[2em]\text{Cup}\\
\otimes\ar[r,"f\otimes g", shorten=.3cm]&\otimes\\
B\ar[r,"g"', , shorten=-.1cm, bend right]&\text{Down}
\end{tikzcd}
\]
\end{document}