|
1 | 1 | \section{Strong normalization}
|
2 | 2 | \subsection{Evaluation in the empty context}
|
3 | 3 | 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). |
6 | 6 |
|
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$. |
8 | 8 |
|
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