Skip to content

Instantly share code, notes, and snippets.

@solomon-b
Created August 26, 2021 00:03
Show Gist options
  • Save solomon-b/8be4d43d846627bb3e7e43d093bd895c to your computer and use it in GitHub Desktop.
Save solomon-b/8be4d43d846627bb3e7e43d093bd895c to your computer and use it in GitHub Desktop.
\documentclass[tikz,convert={outfile=\jobname.svg}]{standalone}
%\usetikzlibrary{...}% tikz package already loaded by 'tikz' option
\begin{document}
\begin{tikzpicture}% Example:
\[\begin{tikzcd}
{(f a \oplus f b) \oplus f c} && {fa \oplus (fb \oplus fc)} & {} \\
\\
{f (a \otimes b) \oplus f c} && {f a \oplus f (b \otimes c)} \\
\\
{f ((a \otimes b) \otimes c)} && {f (a \otimes (b \otimes c))}
\arrow["{\small{fwd\ assoc}}", from=1-1, to=1-3]
\arrow["{\small{gbimap\ combine\ id}}"', from=1-1, to=3-1]
\arrow["{\small{combine}}"', from=3-1, to=5-1]
\arrow["{\small{gbimap\ id\ combine}}", from=1-3, to=3-3]
\arrow["{\small{combine}}", from=3-3, to=5-3]
\arrow["{\small{fmap\ (fwd\ assoc)}}", from=5-1, to=5-3]
\end{tikzcd}\]
\end{tikzpicture}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment