summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChloe Brown <chloe.brown.00@outlook.com>2025-04-24 13:02:31 +0100
committerChloe Brown <chloe.brown.00@outlook.com>2025-04-24 13:27:47 +0100
commit0ccd53de6e7ed7cbc8df51e24d136ab1a445aa4e (patch)
treed00d3ef5912976705db20af6db4d6eb5c61a3a8a
parent0beab7bb8e8505a39086bb35a7549060f59c8610 (diff)
Describe why roll is hard to encode.
-rw-r--r--sec/encoding.ltx13
1 files changed, 10 insertions, 3 deletions
diff --git a/sec/encoding.ltx b/sec/encoding.ltx
index 84ec4a5..0e7b244 100644
--- a/sec/encoding.ltx
+++ b/sec/encoding.ltx
@@ -50,11 +50,18 @@ let compose tree = foldmatch tree with
\end{systemt}
\end{listing}
+\subsection{Phase 1: Simplifying Roll}%
+\label{subsec:simplify-roll}
+
+Recall the typing judgement for \roll{} in \cref{fig:lang-ty}. The premise has
+type \(\sub{A}{X/\mu X. A}\). One consequence of the use of substitution is that
+inductive values can appear scattered throughout a term of this type. Take the
+inductive type \(\mu X. (1 + \nat \times X + \mu Y. 1 + X \times Y) \times (1 + X)\). A term of
+this type can have any number of inductive values, located in distant parts of
+the term.
+
\TODO{
\begin{itemize}
- \item state that the initial type of roll makes it hard to encode
- \item explain that there could be an arbitrary number of recursive arguments
- scattered in a term
\item describe that collecting them into one location makes future encoding
steps easier
\item justify why I add lists as a built-in type former