root / CSL16 / bc-convergence.tex @ 74
Historique | Voir | Annoter | Télécharger (10,74 ko)
| 1 |
|
|---|---|
| 2 |
\section{Convergence of Bellantoni-Cook programs in $\arith$}
|
| 3 |
|
| 4 |
%\anupam{In this section, use whatever form of the deduction theorem is necessary and reverse engineer precise statement later.}
|
| 5 |
|
| 6 |
In this section we show that $\arith$ proves the convergence of any equational specification induced by a BC program. Since BC programs can compute any polynomial-time function, we obtain a completeness result. In the next section we will show the converse, that any provably convergent function of $\arith$ is polynomial-time computable. |
| 7 |
|
| 8 |
We will assume the formulation of BC programs with regular PRN, not simultaneous PRN. |
| 9 |
|
| 10 |
|
| 11 |
%\subsection{Convergence in arithmetic}
|
| 12 |
|
| 13 |
%\begin{theorem}
|
| 14 |
% [Convergence] |
| 15 |
% 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))$.
|
| 16 |
%\end{theorem}
|
| 17 |
|
| 18 |
%We first want to show that the system ${\Sigma^{\word}_1}-{\pind}$ is expressive enough, that is to say that all polynomial-time functions can be represented by some equational specifications that are provably total. To do so we consider equational specifications of BC-programs.
|
| 19 |
\begin{theorem}
|
| 20 |
% [Convergence] |
| 21 |
If $\eqspec$ is a BC program defining a function $f$, then $\arith$ proves $\conv(f, \eqspec)$. |
| 22 |
\end{theorem}
|
| 23 |
\begin{proof}
|
| 24 |
% We write function symbols in $\arith$ with arguments delimited by $;$, as for BC-programs. |
| 25 |
We appeal to Lemma~\ref{lemma:spec-norm-form} and show that $\closure{\eqspec} \cup \arith$ proves,
|
| 26 |
\begin{equation}
|
| 27 |
\label{eqn:prv-cvg-ih}
|
| 28 |
\forall \vec{u}^{!\word} . \forall \vec{x}^\word . \word(f(\vec u ; \vec x))
|
| 29 |
\end{equation}
|
| 30 |
We proceed by induction on the structure of a BC program for $f$. |
| 31 |
% We give some key cases in what follows. |
| 32 |
|
| 33 |
Suppose $f$ is defined by PRN as: |
| 34 |
\[ |
| 35 |
\begin{array}{rcl}
|
| 36 |
f(0,\vec v ; \vec x) & = & g(\vec v ; \vec x) \\ |
| 37 |
f(\succ_i u , \vec v; \vec x) & = & h_i (u, \vec v ; \vec x , f(u , \vec v ; \vec x)) |
| 38 |
\end{array}
|
| 39 |
\] |
| 40 |
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,
|
| 41 |
\begin{equation}
|
| 42 |
% \forall u^{!\nat} . (\nat(\vec x) \limp \nat(f(u , \vec v ; \vec x) )
|
| 43 |
!\nat (u) , !\nat (\vec v) , \nat (\vec x) \seqar \nat ( f(u, \vec v ; \vec x) ) |
| 44 |
\end{equation}
|
| 45 |
by $\cax{\Sigma^N_1}{\pind}$ on $u$. After this the result will follow by $\forall$-introduction for $u, \vec v , \vec x$.
|
| 46 |
|
| 47 |
In the base case we have the following proof, |
| 48 |
\[ |
| 49 |
% \vlderivation{
|
| 50 |
% \vlin{\rigrul{\limp}}{}{ \seqar \nat (\vec x) \limp \nat (f(\epsilon , \vec v ; \vec x )) }{
|
| 51 |
% \vliq{\beta}{}{ \nat (\vec x) \seqar \nat ( f( \epsilon , \vec v ; \vec x) ) }{
|
| 52 |
% \vliq{\alpha}{}{ \nat (\vec x) \seqar \nat ( g (\vec v ; \vec x) ) }{
|
| 53 |
% \vltr{IH}{\seqar \forall v^{!\nat} . \forall x^\nat . \nat( g(\vec v ; \vec x) ) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
|
| 54 |
% } |
| 55 |
% } |
| 56 |
% } |
| 57 |
% } |
| 58 |
\vlderivation{
|
| 59 |
\vliq{\beta}{}{!\nat(\vec v) , \nat (\vec x) \seqar \nat(f (\epsilon , \vec v ; \vec x)) }{
|
| 60 |
\vliq{\alpha}{}{!\nat (\vec v) , \nat (\vec x) \seqar \nat (g (\vec v ; \vec x) ) }{
|
| 61 |
\vltr{\IH}{\seqar \forall \vec v^{!\nat} . \forall \vec x^\nat . \nat (g (\vec v ; \vec x)) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
|
| 62 |
} |
| 63 |
} |
| 64 |
} |
| 65 |
\] |
| 66 |
where $\alpha$ is, |
| 67 |
\[ |
| 68 |
\vlderivation{
|
| 69 |
% \vliin{\cut}{}{ \nat (\vec x) \seqar \nat ( g (\vec v ; \vec x)) }{
|
| 70 |
% \vlin{\rigrul{!}}{}{\seqar !\nat (v)}{
|
| 71 |
% \vlin{assump}{}{\seqar \nat (\vec v)}{\vlhy{}}
|
| 72 |
% } |
| 73 |
% }{
|
| 74 |
\vliin{\cut}{}{ !\nat (\vec v ) , \nat (\vec x) \seqar \nat (g (\vec v ; \vec x )) }{
|
| 75 |
\vlhy{\seqar \forall \vec v^{!\nat} . \forall \vec x^\nat . \nat (g (\vec v ; \vec x)) }
|
| 76 |
}{
|
| 77 |
\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 )) }{
|
| 78 |
\vlin{\id}{}{\nat (g(\vec v ; \vec x )) \seqar \nat (g(\vec v ; \vec x ))}{\vlhy{}}
|
| 79 |
} |
| 80 |
} |
| 81 |
% } |
| 82 |
} |
| 83 |
\] |
| 84 |
and $\beta$ is: |
| 85 |
\[ |
| 86 |
\vlderivation{
|
| 87 |
\vliin{\cut}{}{!\nat (\vec v) , \nat (\vec x) \seqar \nat ( f ( \epsilon , \vec v ; \vec x ) ) }{
|
| 88 |
\vlhy{!\nat (\vec v) , \nat (\vec x) \seqar \nat (g (\vec v ; \vec x) ) }
|
| 89 |
}{
|
| 90 |
\vliin{\cut}{}{ \nat (g (\vec v ; \vec x) ) \seqar \nat (f (\epsilon, \vec v ; \vec x) ) }{
|
| 91 |
\vlin{\Phi}{}{ \seqar f(\epsilon , \vec v ; \vec x) = g(\vec v ; \vec x) }{\vlhy{}}
|
| 92 |
}{
|
| 93 |
\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{}}
|
| 94 |
} |
| 95 |
} |
| 96 |
} |
| 97 |
\] |
| 98 |
|
| 99 |
For the inductive step, we suppose that $\nat (u)$ and the proof is as follows, |
| 100 |
\[ |
| 101 |
%\vlderivation{
|
| 102 |
% \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) ) }{
|
| 103 |
% \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) ) }{
|
| 104 |
% \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) ) }{
|
| 105 |
% \vlin{\id}{}{\nat(\vec x) \seqar \nat (\vec x) }{\vlhy{}}
|
| 106 |
% }{
|
| 107 |
% \vliq{\beta}{}{ \nat (\vec x) , \nat (f(u , \vec v ; \vec x) ) \seqar \nat ( f(\succ_i u , \vec v ; \vec x) ) }{
|
| 108 |
% \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 )) ) }{
|
| 109 |
% \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}}
|
| 110 |
% } |
| 111 |
% } |
| 112 |
% } |
| 113 |
% } |
| 114 |
% } |
| 115 |
% } |
| 116 |
\vlderivation{
|
| 117 |
\vliq{\beta}{}{ !\nat (u) , !\nat (\vec v) , \nat (\vec x) , \nat (f ( u , \vec v ; \vec x ) ) \seqar \nat (f (\succ_i u , \vec{v} ; \vec x ) ) }{
|
| 118 |
\vliq{\alpha}{}{ !\nat (u) , !\nat (\vec v) , \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 ) ) ) }{
|
| 119 |
\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}}
|
| 120 |
} |
| 121 |
} |
| 122 |
} |
| 123 |
\] |
| 124 |
where the steps indicated $\alpha$ and $\beta$ are analogous to those for the base case. |
| 125 |
%, and $\gamma$ is an instance of the general scheme: |
| 126 |
%\begin{equation}
|
| 127 |
%\label{eqn:nat-cntr-left-derivation}
|
| 128 |
%\vlderivation{
|
| 129 |
% \vliin{\cut}{}{ \nat (t) , \Gamma \seqar \Delta }{
|
| 130 |
% \vlin{\natcntr}{}{ \nat (t) \seqar \nat (t) \land \nat (t) }{\vlhy{}}
|
| 131 |
% }{
|
| 132 |
% \vlin{\lefrul{\land}}{}{\nat (t) \land \nat (t) , \Gamma \seqar \Delta}{ \vlhy{\nat (t) ,\nat (t) , \Gamma \seqar \Delta} }
|
| 133 |
% } |
| 134 |
% } |
| 135 |
%\end{equation}
|
| 136 |
|
| 137 |
% |
| 138 |
%For the inductive step, we need to show that, |
| 139 |
%\[ |
| 140 |
%\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) ) )
|
| 141 |
%\] |
| 142 |
%so let us suppose that $N(x)$ and we give the following proof: |
| 143 |
%\[ |
| 144 |
%\vlderivation{
|
| 145 |
% \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) ) }{
|
| 146 |
% \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) ) }{
|
| 147 |
% \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) ) ) }{
|
| 148 |
% \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 }}
|
| 149 |
% }{
|
| 150 |
% \vlhy{2}
|
| 151 |
% } |
| 152 |
% }{
|
| 153 |
% \vlhy{3}
|
| 154 |
%} |
| 155 |
%} |
| 156 |
%} |
| 157 |
%\] |
| 158 |
%TOFINISH |
| 159 |
|
| 160 |
Suppose $f$ is defined by safe composition as follows: |
| 161 |
\[ |
| 162 |
f( \vec u ; \vec x ) |
| 163 |
\quad = \quad |
| 164 |
h( \vec g (\vec u ; ) ; \vec g' ( \vec u ; \vec x ) ) |
| 165 |
\] |
| 166 |
|
| 167 |
By the inductive hypothesis we already have \eqref{eqn:prv-cvg-ih} for $h$ and each $g_i$ and $g_j'$ in place of $f$. We construct the required proof as follows:
|
| 168 |
\[ |
| 169 |
\vlderivation{
|
| 170 |
\vliq{\rigrul{\forall}}{}{ \seqar \forall\vec u^{!\nat} . \forall \vec x^\nat . \nat( f(\vec u ; \vec x ) ) }{
|
| 171 |
\vliq{\beta}{}{ !\nat (\vec u) , \nat (\vec x) \seqar \nat ( f( \vec u ; \vec x ) ) }{
|
| 172 |
\vliq{\cntr}{}{ !\nat (\vec u) , \nat (\vec x) \seqar \nat ( h( \vec g(\vec u ;) ; \vec g' ( \vec u ; \vec x ) ) ) }{
|
| 173 |
\vliiiq{\cut}{}{!\nat (\vec u) , \dots , !\nat (\vec u) , \nat (\vec x) , \dots , \nat (\vec x) \seqar \nat ( h( \vec g(\vec u ;) ; \vec g' ( \vec u ; \vec x ) ) ) }{
|
| 174 |
\vlhy{
|
| 175 |
\left\{
|
| 176 |
\vlderivation{
|
| 177 |
\vlin{\rigrul{!}}{}{ !\nat (\vec u) \seqar !\nat ( g_i (\vec u ;) ) }{
|
| 178 |
\vliq{\alpha}{}{ !\nat (\vec u) \seqar \nat ( g_i (\vec u ;) }{
|
| 179 |
\vltr{\IH}{ \forall \vec u^{!\nat} . \nat (g_i (\vec u ;) ) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
|
| 180 |
} |
| 181 |
} |
| 182 |
} |
| 183 |
\right\}_{i \leq |\vec g| }
|
| 184 |
} |
| 185 |
}{
|
| 186 |
\vlhy{
|
| 187 |
\left\{
|
| 188 |
\vlderivation{
|
| 189 |
\vliq{\alpha}{}{ !\nat ( \vec u ) , \nat (\vec x) \seqar \nat ( g_j' ( \vec u ; \vec x ) ) }{
|
| 190 |
\vltr{\IH}{ \seqar \forall \vec u^{!\nat}. \forall \vec x^\nat . \nat ( g_j' (\vec u ; \vec x) ) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
|
| 191 |
} |
| 192 |
} |
| 193 |
\right\}_{j \leq |\vec g'|}
|
| 194 |
} |
| 195 |
}{
|
| 196 |
\vliq{\alpha}{}{ !\nat ( \vec g (\vec u ;) ) , \nat ( \vec g ' ( \vec u ; \vec x ) ) \seqar \nat ( h( \vec g(\vec u ;) ; \vec g' ( \vec u ; \vec x ) ) ) ) }{
|
| 197 |
\vltr{\IH}{ \seqar \forall \vec v^{!\nat} . \forall \vec y^\nat . \nat ( h( \vec v ; \vec y ) ) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
|
| 198 |
} |
| 199 |
} |
| 200 |
} |
| 201 |
} |
| 202 |
} |
| 203 |
} |
| 204 |
\] |
| 205 |
where $\alpha$ and $\beta$ are similar to before. |
| 206 |
|
| 207 |
\todo{reformat a bit}
|
| 208 |
|
| 209 |
It remains to check the initial functions. |
| 210 |
|
| 211 |
Consider the conditional function, defined equationally as: |
| 212 |
\[ |
| 213 |
\begin{array}{rcl}
|
| 214 |
C (; \epsilon, y_\epsilon , y_0, y_1 ) & = & y_\epsilon \\ |
| 215 |
C(; \succ_0 x , y_\epsilon , y_0, y_1) & = & y_0 \\ |
| 216 |
C(; \succ_1 x , y_\epsilon , y_0, y_1) & = & y_1 |
| 217 |
\end{array}
|
| 218 |
\] |
| 219 |
Let $\vec y = ( y_\epsilon , y_0, y_1 )$ and construct the required proof as follows: |
| 220 |
\[ |
| 221 |
\vlderivation{
|
| 222 |
\vliq{}{}{ \nat (x) , \nat (\vec y) \seqar \nat ( C(; x ,\vec y) )}{
|
| 223 |
\vliin{2\cdot \laor}{}{ x = \epsilon \laor \exists z^\nat . x = \succ_0 z \laor \exists z^\nat x = \succ_1 z , \nat (\vec y) \seqar \nat ( C(;x \vec y) ) }{
|
| 224 |
\vliq{}{}{ x = \epsilon , \nat (\vec y) \seqar \nat ( C(; x , \vec y) ) }{
|
| 225 |
\vliq{}{}{ \nat (\vec y) \seqar \nat ( C( ; \epsilon , \vec y ) ) }{
|
| 226 |
\vlin{\wk}{}{ \nat (\vec y) \seqar \nat (y_\epsilon) }{
|
| 227 |
\vlin{\id}{}{\nat (y_\epsilon) \seqar \nat ( y_\epsilon )}{\vlhy{}}
|
| 228 |
} |
| 229 |
} |
| 230 |
} |
| 231 |
}{
|
| 232 |
\vlhy{
|
| 233 |
\left\{
|
| 234 |
\vlderivation{
|
| 235 |
\vlin{\lefrul{\exists}}{}{ \exists z^\nat . x = \succ_i z , \nat (\vec y) \seqar \nat ( C(;x , \vec y) ) }{
|
| 236 |
\vliq{}{}{ x = \succ_i a , \nat (\vec y ) \seqar \nat (C(; x ,\vec y)) }{
|
| 237 |
\vliq{}{}{ \nat (\vec y) \seqar \nat ( C(; \succ_i a , \vec y ) ) }{
|
| 238 |
\vlin{\wk}{}{ \nat (\vec y) \seqar \nat (y_i) }{
|
| 239 |
\vlin{\id}{}{\nat (y_i) \seqar \nat (y_i)}{\vlhy{}}
|
| 240 |
} |
| 241 |
} |
| 242 |
} |
| 243 |
} |
| 244 |
} |
| 245 |
\right\}_{i = 0,1}
|
| 246 |
} |
| 247 |
} |
| 248 |
} |
| 249 |
} |
| 250 |
\] |
| 251 |
whence the result follows by $\forall$-introduction. |
| 252 |
\todo{reformat a bit}
|
| 253 |
|
| 254 |
Other initial functions are far simpler. |
| 255 |
|
| 256 |
\end{proof}
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
|