root / CSL16 / bc-convergence.tex @ 43
Historique | Voir | Annoter | Télécharger (7,09 ko)
| 1 |
|
|---|---|
| 2 |
\section{Convergence of Bellantoni-Cook programs}
|
| 3 |
|
| 4 |
\anupam{In this section, use whatever form of the deduction theorem is necessary and reverse engineer precise statement later.}
|
| 5 |
|
| 6 |
|
| 7 |
\subsection{Bellantoni-Cook programs}
|
| 8 |
We first recall the notion of safe recursion on notation from BC. TODO |
| 9 |
|
| 10 |
\anupam{Do we need simultaneous PRN? cf.\ Bellantoni's thesis.}
|
| 11 |
|
| 12 |
\todo{reformulate below for binary words, not natural numbers?}
|
| 13 |
|
| 14 |
\begin{definition}
|
| 15 |
[BC functions] |
| 16 |
BC is the set of functions generated by the following initial functions and closure schemes. |
| 17 |
|
| 18 |
% \paragraph{Initial functions}
|
| 19 |
There are the following initial functions: |
| 20 |
\begin{enumerate}
|
| 21 |
\item The constant function $0$ which takes no arguments and outputs $0 \in \Nat$. |
| 22 |
\item The projection functions $\pi^{m,n}_k ( x_1 , \dots , x_m ; x_{m+1} , \dots, x_{m+n} ) := x_k$ for $n,m \in \Nat$ and $1 \leq k \leq m+n$.
|
| 23 |
\item The successor functions $\succ_i ( ; x) := xi$ for $i = 0,1$. |
| 24 |
\item The predecessor function $\pred (; x) := \begin{cases}
|
| 25 |
0 & x = 0 \\ |
| 26 |
x' & x = x'i |
| 27 |
\end{cases}$.
|
| 28 |
\item The conditional function $\cond (;x,y,z) := \begin{cases}
|
| 29 |
y & x \mod{2} = 0 \\
|
| 30 |
z & \text{otherwise}
|
| 31 |
\end{cases}$.
|
| 32 |
\end{enumerate}
|
| 33 |
|
| 34 |
There are the following closure properties. |
| 35 |
\begin{enumerate}
|
| 36 |
\setcounter{enumi}{5}
|
| 37 |
\item Predicative recursion on notation. If $g, h_0, h_1 $ are in BC then so is the function $f$ defined by, |
| 38 |
\[ |
| 39 |
\begin{array}{rcl}
|
| 40 |
f(0, \vec v ; \vec x) & := & g(\vec v ; \vec x) \\ |
| 41 |
f (\succ_i u , \vec v ; \vec x ) & := & h_i ( u , \vec v ; \vec x , f (u , \vec v ; \vec x) ) |
| 42 |
\end{array}
|
| 43 |
\] |
| 44 |
for $i = 0,1$, so long as the expressions are well-formed (i.e.\ in number/sort of arguments). |
| 45 |
\item Safe composition. If $g, \vec h, \vec h'$ are in BC then so is $f$ defined by, |
| 46 |
\[ |
| 47 |
f (\vec u ; \vec x) \quad := \quad g ( \vec h(\vec u ; ) ; \vec h' (\vec u ; \vec x) ) |
| 48 |
\] |
| 49 |
so long as the expression is well-formed. |
| 50 |
\end{enumerate}
|
| 51 |
\end{definition}
|
| 52 |
|
| 53 |
|
| 54 |
\anupam{simultaneous recursion?}
|
| 55 |
|
| 56 |
\subsection{Convergence in arithmetic}
|
| 57 |
\begin{theorem}
|
| 58 |
[Convergence] |
| 59 |
If $\Phi(f)$ is an equational specification corresponding to a BC-program defining $f$, then $\cax{\Sigma^N_1}{\pind} \proves \ !\Phi(f) \limp \forall \vec{x}^{!N} . N(f(\vec x))$.
|
| 60 |
\end{theorem}
|
| 61 |
\begin{proof}
|
| 62 |
% We write function symbols in $\arith$ with arguments delimited by $;$, as for BC-programs. |
| 63 |
We show by induction on the structure of a BC-program for $f(\vec u ; \vec x)$ that: |
| 64 |
\begin{equation}
|
| 65 |
\label{eqn:prv-cvg-ih}
|
| 66 |
\Phi(f) \proves \ \forall \vec{u}^{!\nat} . \forall \vec{x}^\nat . \nat(f(\vec u ; \vec x))
|
| 67 |
\end{equation}
|
| 68 |
We give some key cases in what follows. |
| 69 |
|
| 70 |
Suppose $f$ is defined by PRN as: |
| 71 |
\[ |
| 72 |
\begin{array}{rcl}
|
| 73 |
f(0,\vec v ; \vec x) & = & g(\vec v ; \vec x) \\ |
| 74 |
f(\succ_i u , \vec v; \vec x) & = & h_i (u, \vec v ; \vec x , f(u , \vec v ; \vec x)) |
| 75 |
\end{array}
|
| 76 |
\] |
| 77 |
By the inductive hypothesis we already have \eqref{eqn:prv-cvg-ih} for $g,h_0,h_1$ in place of $f$, so let us suppose that $\nat(\vec v)$ and prove,
|
| 78 |
\begin{equation}
|
| 79 |
\forall u^{!\nat} . (\nat(\vec x) \limp \nat(f(u , \vec v ; \vec x) )
|
| 80 |
\end{equation}
|
| 81 |
by $\cax{\Sigma^N_1}{\pind}$ on $u$.
|
| 82 |
|
| 83 |
In the base case we have the following proof, |
| 84 |
\[ |
| 85 |
\vlderivation{
|
| 86 |
\vlin{\rigrul{\limp}}{}{ \seqar \nat (\vec x) \limp \nat (f(\epsilon , \vec v ; \vec x )) }{
|
| 87 |
\vliq{\beta}{}{ \nat (\vec x) \seqar \nat ( f( \epsilon , \vec v ; \vec x) ) }{
|
| 88 |
\vliq{\alpha}{}{ \nat (\vec x) \seqar \nat ( g (\vec v ; \vec x) ) }{
|
| 89 |
\vltr{IH}{\seqar \forall v^{!\nat} . \forall x^\nat . \nat( g(\vec v ; \vec x) ) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
|
| 90 |
} |
| 91 |
} |
| 92 |
} |
| 93 |
} |
| 94 |
\] |
| 95 |
where $\alpha$ is, |
| 96 |
\[ |
| 97 |
\vlderivation{
|
| 98 |
\vliin{\cut}{}{ \nat (\vec x) \seqar \nat ( g (\vec v ; \vec x)) }{
|
| 99 |
\vlin{\rigrul{!}}{}{\seqar !\nat (v)}{
|
| 100 |
\vlin{assump}{}{\seqar \nat (\vec v)}{\vlhy{}}
|
| 101 |
} |
| 102 |
}{
|
| 103 |
\vliin{\cut}{}{ !\nat (\vec v ) , \nat (\vec x) \seqar \nat (g (\vec v ; \vec x )) }{
|
| 104 |
\vlhy{\seqar \forall \vec v^{!\nat} . \forall \vec x^\nat . \nat (g (\vec v ; \vec x)) }
|
| 105 |
}{
|
| 106 |
\vliq{\lefrul{\forall}}{ }{ !\nat (\vec v) , \nat (\vec x) , \forall \vec v^{!\nat} . \forall \vec x^\nat \nat (g(\vec v ; \vec x )) \seqar \nat (g(\vec v ; \vec x )) }{
|
| 107 |
\vlin{\id}{}{\nat (g(\vec v ; \vec x )) \seqar \nat (g(\vec v ; \vec x ))}{\vlhy{}}
|
| 108 |
} |
| 109 |
} |
| 110 |
} |
| 111 |
} |
| 112 |
\] |
| 113 |
and $\beta$ is: |
| 114 |
\[ |
| 115 |
\vlderivation{
|
| 116 |
\vliin{\cut}{}{\nat (\vec x) \seqar \nat ( f ( \epsilon , \vec v ; \vec x ) ) }{
|
| 117 |
\vlhy{\nat (\vec x) \seqar \nat (g (\vec v ; \vec x) ) }
|
| 118 |
}{
|
| 119 |
\vliin{\cut}{}{ \nat (g (\vec v ; \vec x) ) \seqar \nat (f (\epsilon, \vec v ; \vec x) ) }{
|
| 120 |
\vlin{\Phi}{}{ \seqar f(\epsilon , \vec v ; \vec x) = g(\vec v ; \vec x) }{\vlhy{}}
|
| 121 |
}{
|
| 122 |
\vlin{=}{}{\nat ( g(\vec v ; \vec x) ) , f(\epsilon , \vec v ; \vec x) = g(\vec v ; \vec x) \seqar \nat (f (\epsilon, \vec v ; \vec x) ) }{\vlhy{}}
|
| 123 |
} |
| 124 |
} |
| 125 |
} |
| 126 |
\] |
| 127 |
|
| 128 |
For the inductive step, we suppose that $\nat (u)$ and the proof is as follows, |
| 129 |
\[ |
| 130 |
\vlderivation{
|
| 131 |
\vlin{\rigrul{\limp}}{}{ \nat(\vec x) \limp \nat ( f(u, \vec v ; \vec x) ) \seqar \nat (\vec x) \limp \nat( f(\succ_i u , \vec v ; \vec x) ) }{
|
| 132 |
\vliq{\gamma}{}{\nat(\vec x), \nat(\vec x) \limp \nat ( f(u, \vec v ; \vec x) ) \seqar \nat( f(\succ_i u , \vec v ; \vec x) ) }{
|
| 133 |
\vliin{\lefrul{\limp}}{}{\nat(\vec x), \nat(\vec x), \nat(\vec x) \limp \nat ( f(u, \vec v ; \vec x) ) \seqar \nat( f(\succ_i u , \vec v ; \vec x) ) }{
|
| 134 |
\vlin{\id}{}{\nat(\vec x) \seqar \nat (\vec x) }{\vlhy{}}
|
| 135 |
}{
|
| 136 |
\vliq{\beta}{}{ \nat (\vec x) , \nat (f(u , \vec v ; \vec x) ) \seqar \nat ( f(\succ_i u , \vec v ; \vec x) ) }{
|
| 137 |
\vliq{\alpha}{}{ \nat (\vec x) , \nat (f(u , \vec v ; \vec x) ) \seqar \nat ( h_i( u , \vec v ; \vec x , f( u, \vec v ; \vec x )) ) }{
|
| 138 |
\vltr{IH}{ \seqar \forall u^{!\nat}, \vec v^{!\nat} . \forall \vec x^\nat , y^\nat . \nat( h_i (u, \vec v ; \vec x, y) ) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
|
| 139 |
} |
| 140 |
} |
| 141 |
} |
| 142 |
} |
| 143 |
} |
| 144 |
} |
| 145 |
\] |
| 146 |
where the steps indicated $\alpha$ and $\beta$ are analogous to those for the base case, and $\gamma$ is an instance of the general scheme: |
| 147 |
\begin{equation}
|
| 148 |
\label{eqn:nat-cntr-left-derivation}
|
| 149 |
\vlderivation{
|
| 150 |
\vliin{\cut}{}{ \nat (t) , \Gamma \seqar \Delta }{
|
| 151 |
\vlin{\natcntr}{}{ \nat (t) \seqar \nat (t) \land \nat (t) }{\vlhy{}}
|
| 152 |
}{
|
| 153 |
\vlin{\lefrul{\land}}{}{\nat (t) \land \nat (t) , \Gamma \seqar \Delta}{ \vlhy{\nat (t) ,\nat (t) , \Gamma \seqar \Delta} }
|
| 154 |
} |
| 155 |
} |
| 156 |
\end{equation}
|
| 157 |
|
| 158 |
% |
| 159 |
%For the inductive step, we need to show that, |
| 160 |
%\[ |
| 161 |
%\forall x^{!N} . (( N(\vec y) \limp N( f(x, \vec x ; \vec y) ) ) \limp N(\vec y) \limp N(f(\succ_i x , \vec x ; \vec y) ) )
|
| 162 |
%\] |
| 163 |
%so let us suppose that $N(x)$ and we give the following proof: |
| 164 |
%\[ |
| 165 |
%\vlderivation{
|
| 166 |
% \vlin{N\cntr}{}{N(y) \limp ( N(y ) \limp N(f( x , \vec x ; \vec y ) ) ) \limp N(f (\succ_i x , \vec x ; \vec y) ) }{
|
| 167 |
% \vliin{}{}{N(y) \limp N(y) \limp ( N(y ) \limp N(f( x , \vec x ; \vec y ) ) ) \limp N(f (\succ_i x , \vec x ; \vec y) ) }{
|
| 168 |
% \vliin{}{}{ N(y) \limp N(y) \limp ( N(y) \limp N( f(x, \vec x ; \vec y) ) ) \limp N( h_i (x , \vec x ; \vec y , f(x , \vec x ; \vec y) ) ) }{
|
| 169 |
% \vltr{MLL}{( N(\vec y) \limp (N (\vec y) \limp N(f(x, \vec x ; \vec y) )) \limp N(f(x, \vec x ; \vec y)) }{\vlhy{\quad }}{\vlhy{\ }}{\vlhy{\quad }}
|
| 170 |
% }{
|
| 171 |
% \vlhy{2}
|
| 172 |
% } |
| 173 |
% }{
|
| 174 |
% \vlhy{3}
|
| 175 |
%} |
| 176 |
%} |
| 177 |
%} |
| 178 |
%\] |
| 179 |
%TOFINISH |
| 180 |
\end{proof}
|
| 181 |
|
| 182 |
|