2

An arrow between tensor products $A\otimes B\to C\otimes D$ is determined by its components $A\to C$ and $B\to D$. Hence it seems natural to represent such an arrow by a pair of arrows. My question is: how to draw such a arrow in tikz-cd?

The following is my trying. However, it is too complicate and the middle arrow $\otimes$ cannot match the correct boundary of the right-side tensor product.

\[
\begin{tikzcd}[row sep=0pt]
A\ar[r,phantom,shift right=0.8em,"{f}"]&
Cup\\
\otimes\ar[r,"\otimes"description]&\otimes\\
B\ar[r,phantom,shift left=0.8em,"{g}"]&
Down
\end{tikzcd}
\]

2 Answers 2

2

I really like the idea, but in this case I'd actually like to argue that one may use tikzmark instead to annotate an equation. In other words, I am not 100% convinced that one should start out with tikz-cd only because of its arrows. After all, LaTeX itself is very good for typesetting equations, and one could just add the arrows with TikZ rather than designing the full equation.

\documentclass[fleqn]{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
\[
\left.\begin{array}{c}\tikzmarknode{A}{A}\\ \otimes \\ 
\tikzmarknode{B}{B}\end{array}\!\right\}
\xrightarrow{f\otimes g}
\left\{\!\begin{array}{c}\tikzmarknode{Cup}{\text{Cup}}\\ \otimes \\ 
\tikzmarknode{Down}{\text{Down}}\end{array}\right.
\]
\begin{tikzpicture}[overlay,remember picture]
\draw[-latex,preaction={draw,white,very thick,-}] (A) to[bend left=15] node[midway,above]{$\scriptstyle f$} (Cup);
\draw[-latex,preaction={draw,white,very thick,-}] (B)  to[bend right=15] node[midway,below]{$\scriptstyle g$} (Down);
\end{tikzpicture}

\[
\left.\begin{array}{c}\tikzmarknode{A'}{A}\\ \otimes \\ 
\tikzmarknode{B'}{B}\end{array}\!\right\}
\xrightarrow{f\otimes g}
\left\{\!\begin{array}{c}\tikzmarknode{Cup'}{\text{Cup}}\\ \otimes \\ 
\tikzmarknode{Down'}{\text{Down}}\end{array}\right.
\]
\begin{tikzpicture}[overlay,remember picture]
\draw[->,preaction={draw,white,very thick,-}] (A') to
node[midway,above]{$\scriptstyle f$} (Cup');
\draw[->,preaction={draw,white,very thick,-}] (B')  to
node[midway,below]{$\scriptstyle g$} (Down');
\end{tikzpicture}

\end{document}

enter image description here

2

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}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .