Skip to content

Commit 84aa0c7

Browse files
committed
add proof splitting and type injectivity sections
1 parent 0e3ddfe commit 84aa0c7

File tree

4 files changed

+230
-95
lines changed

4 files changed

+230
-95
lines changed

main.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
\renewcommand{\P}{\mathbb{P}}
2323
\newcommand{\ctx}{\;\mathsf{ctx}}
2424
\newcommand{\scott}[1]{\llbracket #1\rrbracket}
25+
\newcommand{\ttag}[1]{\llparenthesis #1\rrparenthesis}
2526
\newcommand{\elet}[2]{\mathsf{let}\;#1\mathrel{\mathsf{in}}#2}
2627
\newcommand{\rec}{\mathsf{rec}}
2728
\newcommand{\ok}{\ \mathsf{ok}}
@@ -46,6 +47,7 @@
4647
\newcommand{\nonempty}{\mathsf{nonempty}}
4748
\newcommand{\refl}{\mathsf{refl}}
4849
\newcommand{\lvl}{\operatorname{lvl}}
50+
\newcommand{\sort}{\operatorname{sort}}
4951
\newcommand{\rank}{\operatorname{rank}}
5052
\DeclareMathOperator{\imax}{imax}
5153
\let\lGamma\Gamma \renewcommand{\Gamma}{\mathrm{\lGamma}}

normalization.tex

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
\section{Strong normalization}
22
\subsection{Evaluation in the empty context}
33
In \autoref{sec:church_rosser}, we set up a reduction relation $\rightsquigarrow_\kappa$ which is plainly useless for a normalization algorithm, because of the following rule:
4-
$$(K)\ \frac{P\mbox{ is SS inductive}}{\Gamma\vdash \rec_P(C,e,p,h)\rightsquigarrow_\kappa e\;\inv[p,h]\;v}$$
5-
Recall that $v$ is a sequence of lambdas $v_i=\lambda x::\xi_i.\;\rec_P(C,e,\pi_i[\inv[p,h],x],u_i\;x)$. That is, we reduce any $\rec_P$ term, regardless of its arguments, to a longer expression that contains another $\rec_P$ term (assuming that the inductive type has a recursive argument). So this is guaranteed not to terminate, but it was sufficiently powerful to act as a semi-decision procedure for definitional equality where existing methods fail (by giving up early, they recover decidability at the cost of completeness).
4+
$$(K^+)\ \frac{P\mbox{ is SS inductive}\quad\Gamma\vdash \intro\;\inv[p,h]:\alpha}{\Gamma\vdash \rec_P\;C\;e\;p\;h\rightsquigarrow_\kappa e\;\inv[p,h]\;v}$$
5+
Recall that $v$ is a sequence of lambdas $v_i=\lambda x::\xi_i.\;\rec_P(C,e,\pi_i[\inv[p,h],x],u_i\;x)$. That is, we reduce any $\rec_P$ term, regardless of its arguments, to a longer expression that contains another $\rec_P$ term (assuming that the inductive type has a recursive argument). If the embedded $\rec_P$ term in $v$ is also susceptible to the $K^+$ reduction (which is quite often the case), then this will not terminate, but it was sufficiently powerful to act as a semi-decision procedure for definitional equality where existing methods fail (by giving up early, they recover decidability at the cost of completeness).
66

7-
But our examples thus far of undecidability of definitional equality all work in an inconsistent context. Is this necessary? What if the context is known to be inhabited by some terms? In this case we may as well substitute the terms in to reduce the problem to evaluation in the empty context.
7+
Let us scale back the $K^+$ rule, then, to the original $K$ rule, which is the same as $K^+$ except that it only applies if no $\inv_i$ terms are produced on the RHS. We will also reinstate the standard $\iota$ rule for subsingleton inductives as well. We will call the resulting reduction relation $\rightsquigarrow_\sigma$.
88

9-
That is, we wish to determine if $\vdash e\equiv e'$, hopefully by a method similar to the reduction $\rightsquigarrow_\kappa$, but without the self-destructive unfolding K rule.
9+
$$\boxed{\Gamma\vdash e\rightsquigarrow_\sigma e'}\qquad
10+
\frac{\Gamma\vdash e_1 \rightsquigarrow_\sigma e_1'}{\Gamma\vdash e_1\;e_2\rightsquigarrow_\sigma e_1'\;e_2}\qquad
11+
\frac{\Gamma\vdash e_2 \rightsquigarrow_\sigma e_2'}{\Gamma\vdash e_1\;e_2\rightsquigarrow_\sigma e_1\;e_2'}$$
12+
$$\frac{\Gamma\vdash \alpha \rightsquigarrow_\sigma\alpha'}{\Gamma\vdash \lambda x:\alpha.\;e\rightsquigarrow_\sigma \lambda x:\alpha'.\;e}\qquad
13+
\frac{\Gamma,x:\alpha\vdash e \rightsquigarrow_\sigma e'}{\Gamma\vdash \lambda x:\alpha.\;e\rightsquigarrow_\sigma \lambda x:\alpha.\;e'}\qquad\dots$$
14+
$$(\beta)\ \frac{}{\Gamma\vdash (\lambda x:\alpha.\;e)\;e'\rightsquigarrow_\sigma e[e'/x]}\qquad
15+
(\delta)\ \frac{\mathsf{def}\;c:\alpha:=e}{\Gamma\vdash c\rightsquigarrow_\sigma e}\qquad
16+
(\zeta)\ \frac{}{\Gamma\vdash \elet{x:\alpha:=e'}{e}\rightsquigarrow_\sigma e[e'/x]}$$
17+
$$(\iota)\ \frac{P\mbox{ is inductive with ctor }c}{\Gamma\vdash \rec_P\;C\;e\;p\;(c\;b)\rightsquigarrow_\sigma e_c\;b\;v}\qquad
18+
(\iota_q)\ \frac{}{\Gamma\vdash \lift\;R\;f\;h\;(\mk_R\;a)\rightsquigarrow_\sigma f\;a}$$
19+
$$(K)\ \frac{P\mbox{ is SS inductive}\quad\inv_i\notin\inv[p]\quad\Gamma\vdash \intro\;\inv[p]:\alpha}{\Gamma\vdash \rec_P\;C\;e\;p\;h\rightsquigarrow_\sigma e\;\inv[p]\;v}$$
20+
21+
We have indicated that $\inv$ consists only of $p_i$ terms and not $\inv_i\;h$ by the notation $\inv_i\notin\inv[p]$.

0 commit comments

Comments
 (0)