on master help sign in
Note on metatheory
commit528c4b48f5bb8db7b30da2a47b6238e5519c4787 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateFri 8 Feb 2013, 20:57 (14 years ago) parent0d11515
2 files changed+40−1
papers/impl-paper/elaboration.tex+5−1 papers/impl-paper/typechecking.tex+35
papers/impl-paper/elaboration.tex+5−1
@@ -586,6 +586,10 @@ the goal type.
586586
587587\FFIG{
588588\begin{array}{lll}
589+\mbox{\textbf{Tactic}} & \mbox{\textbf{Resulting Proof Term}} &
590+\mbox{\textbf{Queue}}
591+\medskip
592+\\
589593\mbox{Initial state}
590594& \hole{\vx}{\all{\vA}{\Type}\SC\all{\va}{\vA}\SC\vA}\SC\vx
591595& \langle\vx\rangle \\
@@ -701,7 +705,7 @@ the goal type.
701705Figure \ref{mkidrefine} shows how each step of this sequence of tactics affects
702706the proof state and hole queue. In each step, the underlined fragment of the
703707term is the fragment in focus. One might observe that the
704−$\MO{Attack}$/$\MO{Solve}$ pairs may be unnecessary in this case, as the term
708+$\MO{Attack}$/$\MO{Solve}$ pairs are unnecessary in this case, as the term
705709is already in a form suitable for introduction. However, we retain these for
706710uniform treatment of introductions.
707711
papers/impl-paper/typechecking.tex+35
@@ -243,6 +243,7 @@ be implemented in the usual way~\cite{loh2010tutorial}.
243243{Cumulativity}
244244{cumul}
245245
246+
246247\subsection{Inductive Families}
247248
248249\label{sect:inductivefams}
@@ -472,6 +473,40 @@ trees~\cite{Augustsson1985}.
472473% In practice, for efficiency, pattern matching is implemented by compiling the match clauses to
473474% a tree of case expressions~\cite{Augustsson1985}.
474475
476+\subsection{Metatheory}
477+
478+\FFIG{
479+\AR{
480+\mbox{\textbf{TODO}}\\
481+\mbox{Church-Rosser}
482+\\
483+\mbox{Subject Reduction}
484+\\
485+\mbox{Strengthening}
486+\\
487+\mbox{Cut}
488+\\
489+}
490+}
491+{Metatheoretic properties of \TT{}}
492+{metatheory}
493+
494+\TT{} respects the usual metatheoretic properties, as shown in Figure
495+\ref{metatheory}. Specifically: the \demph{Church-Rosser} property
496+(i.e. that distinct reduction sequences lead to the same normal form);
497+\demph{subject
498+reduction} (i.e. that computation preserves type); the \demph{cut} property
499+(i.e. that $\RW{let}$-bound terms may be substituted into their scope); and
500+\demph{strengthening} (i.e. that introducing new definitions into scope does
501+not affect typechecking).
502+
503+One property which is noticeably absent is \demph{strong normalisation}.
504+Although desirable to preserve termination and decidability of type checking,
505+we allow diverging terms for pragmatic reasons as \Idris{} is primarily a
506+programming language rather than a theorem prover. Nevertheless, we do
507+\emph{check} for totality in order to be sure which terms are safe to
508+evaluate at compile time.
509+
475510\subsection{Totality checking}
476511
477512In order to ensure termination of type checking we must distinguish terms for