Skip to content

Instantly share code, notes, and snippets.

@joom
Created April 14, 2018 02:03
Show Gist options
  • Save joom/1a730901ad0d5d6e1239b902fd5426f7 to your computer and use it in GitHub Desktop.
Save joom/1a730901ad0d5d6e1239b902fd5426f7 to your computer and use it in GitHub Desktop.
Barendregt's lambda cube in tikzcd, with labels on arrows
\documentclass{standalone}
\usepackage{tikz-cd}
\usepackage{amsmath}
\usepackage{tgpagella}
\begin{document}
\begin{tikzcd}
& & \lambda\omega \arrow[rrr] & & & \lambda\Pi\omega \\
& & & & & \\
\lambda 2 \arrow[rruu] \arrow[rrr] & & & \lambda\Pi 2 \arrow[rruu] & & \\
& & \lambda\underline{\omega} \arrow[rrr] \arrow[uuu] & & & \lambda\Pi\underline{\omega} \arrow[uuu] \\
& & & & & \\
\lambda\to
\arrow{rruu}[sloped,above]{\text{\tiny Types depending on types}}
\arrow{rruu}[sloped,below]{\text{\tiny Type operators}}
\arrow{uuu}[sloped,above]{\text{\tiny Values depending on types}}
\arrow{uuu}[sloped,below]{\text{\tiny Polymorphism}}
\arrow{rrr}[sloped,above]{\text{\tiny Types depending on values}}
\arrow{rrr}[sloped,below]{\text{\tiny Dependent types}}
& & & \lambda\Pi \arrow[rruu] \arrow[uuu] & &
\end{tikzcd}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment