summaryrefslogtreecommitdiff
path: root/sec/encoding.ltx
diff options
context:
space:
mode:
authorChloe Brown <chloe.brown.00@outlook.com>2025-04-25 12:00:48 +0100
committerChloe Brown <chloe.brown.00@outlook.com>2025-04-25 12:00:48 +0100
commit6ca26199d5b57ebc0c33d1009d8bff8be92142c1 (patch)
treed0d09ba3b8e9836bb0e09804e2622fdbcab1be85 /sec/encoding.ltx
parentc639f719734d4ea6d7f5d2661626f0490a1de19c (diff)
Describe encoding of inductive types.
Diffstat (limited to 'sec/encoding.ltx')
-rw-r--r--sec/encoding.ltx10
1 files changed, 9 insertions, 1 deletions
diff --git a/sec/encoding.ltx b/sec/encoding.ltx
index ffc868b..a8d0269 100644
--- a/sec/encoding.ltx
+++ b/sec/encoding.ltx
@@ -101,9 +101,17 @@ Given a well-formedness derivation \(\jdgmnt{ty}{\Psi}{A}\), a type variable \(X
that calls each accumulator within \(A\) in sequence. The definition is by
induction on the well-formedness derivation.
+\subsection{Phase 2: Encoding Inductive Types}%
+\label{subsec:inductive-types}
+
+We use a modified heap encoding to encode regular types. We use a
+\(\mathsf{List}~\nat\)-indexed heap, but keep the pointers within terms as
+naturals. The idea is that the heap index describes the path taken through the
+term to reach a particular point, whilst the pointers describe the next step
+along the path.
+
\TODO{
\begin{itemize}
- \item state that we encode inductive types as nat-list-indexed heaps
\item describe that storing higher-order data makes G\"odel encodings
impractical
\item describe that the need for local encodings rules out Church encodings