Statistiques
| Révision :

root / CSL16 / bc-convergence.tex @ 72

Historique | Voir | Annoter | Télécharger (10,36 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

    
7

    
8

    
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 poynomial-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 $\Phi(f)$ is an equational specification corresponding to a BC-program defining $f$, then $\cax{\Sigma^{\word}_1}{\pind} \proves  \ !\Phi(f) \limp \forall \vec{x}^{!\word} . \word(f(\vec x))$.
22
\end{theorem}
23
\begin{proof}
24
%	We write function symbols in $\arith$ with arguments delimited by $;$, as for BC-programs. 
25
	We show by induction on the structure of a BC-program for $f(\vec u ; \vec x)$ that:
26
	\begin{equation}
27
	\label{eqn:prv-cvg-ih}
28
	\Phi(f) \proves \ \forall \vec{u}^{!\nat} . \forall \vec{x}^\word . \word(f(\vec u ; \vec x))
29
	\end{equation}
30
	We give some key cases in what follows.
31
	
32
	Suppose $f$ is defined by PRN as:
33
	\[
34
	\begin{array}{rcl}
35
	f(0,\vec v ; \vec x) & = & g(\vec v ; \vec x) \\
36
	f(\succ_i u , \vec v; \vec x) & = & h_i (u, \vec v ; \vec x , f(u , \vec v ; \vec x))
37
	\end{array}
38
	\]
39
	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,
40
	\begin{equation}
41
% \forall u^{!\nat} .  (\nat(\vec x) \limp \nat(f(u , \vec v ; \vec x)  )
42
!\nat (u) , !\nat (\vec v) , \nat (\vec x) \seqar \nat ( f(u, \vec v ; \vec x) )
43
	\end{equation}
44
	by $\cax{\Sigma^N_1}{\pind}$ on $u$. After this the result will follow by $\forall$-introduction for $u, \vec v , \vec x$.
45
	
46
	In the base case we have the following proof,
47
	\[
48
%	\vlderivation{
49
%	\vlin{\rigrul{\limp}}{}{ \seqar \nat (\vec x) \limp \nat (f(\epsilon , \vec v ; \vec x )) }{
50
%		\vliq{\beta}{}{ \nat (\vec x) \seqar \nat ( f( \epsilon , \vec v ; \vec x) ) }{
51
%			\vliq{\alpha}{}{ \nat (\vec x) \seqar \nat ( g (\vec v ; \vec x) ) }{
52
%				\vltr{IH}{\seqar \forall v^{!\nat} . \forall x^\nat . \nat( g(\vec v ; \vec x) ) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
53
%				}
54
%			}
55
%		}		
56
%		}
57
\vlderivation{
58
	\vliq{\beta}{}{!\nat(\vec v) , \nat (\vec x) \seqar \nat(f (\epsilon , \vec v ; \vec x)) }{
59
		\vliq{\alpha}{}{!\nat (\vec v) , \nat (\vec x) \seqar \nat (g (\vec v ; \vec x) ) }{
60
			\vltr{\IH}{\seqar \forall \vec v^{!\nat} . \forall \vec x^\nat . \nat (g (\vec v ; \vec x)) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
61
			}
62
		}
63
	}
64
\]
65
where $\alpha$ is,
66
\[
67
\vlderivation{
68
%	\vliin{\cut}{}{ \nat (\vec x) \seqar \nat ( g (\vec v ; \vec x)) }{
69
%		\vlin{\rigrul{!}}{}{\seqar !\nat (v)}{
70
%			\vlin{assump}{}{\seqar \nat (\vec v)}{\vlhy{}}
71
%			}
72
%		}{
73
		\vliin{\cut}{}{ !\nat (\vec v ) , \nat (\vec x) \seqar \nat (g (\vec v ; \vec x )) }{
74
			\vlhy{\seqar \forall \vec v^{!\nat} . \forall \vec x^\nat . \nat (g (\vec v ; \vec x)) }
75
			}{
76
			\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 )) }{
77
				\vlin{\id}{}{\nat (g(\vec v ; \vec x )) \seqar \nat (g(\vec v ; \vec x ))}{\vlhy{}}
78
				}
79
			}
80
%		}
81
	}
82
\]
83
and $\beta$ is:
84
\[
85
\vlderivation{
86
	\vliin{\cut}{}{!\nat (\vec v) , \nat (\vec x) \seqar \nat ( f ( \epsilon , \vec v ; \vec x ) ) }{
87
		\vlhy{!\nat (\vec v) , \nat (\vec x) \seqar \nat (g (\vec v ; \vec x) ) }
88
		}{
89
		\vliin{\cut}{}{ \nat (g (\vec v ; \vec x) ) \seqar \nat (f (\epsilon, \vec v ; \vec x) ) }{
90
			\vlin{\Phi}{}{ \seqar f(\epsilon , \vec v ; \vec x) = g(\vec v ; \vec x) }{\vlhy{}}
91
			}{
92
			\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{}}
93
			}
94
		}
95
	}
96
\]
97

    
98
For the inductive step, we suppose that $\nat (u)$ and the proof is as follows,
99
\[
100
%\vlderivation{
101
%	\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) ) }{
102
%	\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) )   }{
103
%		\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) )    }{
104
%			\vlin{\id}{}{\nat(\vec x) \seqar \nat (\vec x) }{\vlhy{}}
105
%			}{
106
%			\vliq{\beta}{}{  \nat (\vec x) , \nat (f(u , \vec v ; \vec x) ) \seqar \nat ( f(\succ_i u , \vec v ; \vec x) ) }{
107
%				\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 )) ) }{
108
%					\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}}
109
%					}
110
%				}
111
%			}
112
%		}
113
%	}
114
%	}
115
\vlderivation{
116
	\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 ) )  }{
117
		\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 ) ) )   }{
118
			\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}}
119
		}
120
	}
121
}
122
\]
123
where the steps indicated $\alpha$ and $\beta$ are analogous to those for the base case.
124
%, and $\gamma$ is an instance of the general scheme:
125
%\begin{equation}
126
%\label{eqn:nat-cntr-left-derivation}
127
%\vlderivation{
128
%	\vliin{\cut}{}{ \nat (t) , \Gamma \seqar \Delta }{
129
%		\vlin{\natcntr}{}{ \nat (t) \seqar \nat (t) \land \nat (t) }{\vlhy{}}
130
%		}{
131
%		\vlin{\lefrul{\land}}{}{\nat (t)  \land \nat (t) , \Gamma \seqar \Delta}{ \vlhy{\nat (t)  ,\nat (t) , \Gamma \seqar \Delta} }
132
%		}
133
%	}
134
%\end{equation}
135

    
136
%
137
%For the inductive step, we need to show that,
138
%\[
139
%\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) )   )
140
%\]
141
%so let us suppose that $N(x)$ and we give the following proof:
142
%\[
143
%\vlderivation{
144
%	\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)  ) }{
145
%		\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)  ) }{
146
%			\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) ) ) }{
147
%				\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 }}
148
%			}{
149
%			\vlhy{2}
150
%		}
151
%	}{
152
%	\vlhy{3}
153
%}
154
%}
155
%}
156
%\]
157
%TOFINISH
158

    
159
Suppose $f$ is defined by safe composition as follows:
160
\[
161
f( \vec u ; \vec x )
162
\quad = \quad
163
h( \vec g (\vec u ; )  ; \vec g' ( \vec u ; \vec x ) )
164
\]
165

    
166
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:
167
\[
168
\vlderivation{
169
	\vliq{\rigrul{\forall}}{}{ \seqar \forall\vec u^{!\nat} . \forall \vec x^\nat . \nat( f(\vec u ; \vec x ) ) }{
170
		\vliq{\beta}{}{ !\nat (\vec u) , \nat (\vec x) \seqar \nat ( f( \vec u ; \vec x ) ) }{
171
			\vliq{\cntr}{}{  !\nat (\vec u) , \nat (\vec x) \seqar \nat ( h( \vec g(\vec u ;) ; \vec g' ( \vec u ; \vec x )  ) )  }{
172
				\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 )  ) )   }{
173
					\vlhy{
174
						\left\{  
175
						\vlderivation{
176
							\vlin{\rigrul{!}}{}{ !\nat (\vec u) \seqar !\nat ( g_i (\vec u ;) ) }{
177
								\vliq{\alpha}{}{ !\nat (\vec u) \seqar \nat ( g_i (\vec u ;) }{
178
									\vltr{\IH}{ \forall \vec u^{!\nat} . \nat (g_i (\vec u ;) ) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
179
									}
180
								}
181
							}
182
						\right\}_{i \leq |\vec g| }
183
						}
184
					}{
185
					\vlhy{
186
						\left\{
187
						\vlderivation{
188
							\vliq{\alpha}{}{ !\nat ( \vec u )  , \nat (\vec x) \seqar \nat  ( g_j' ( \vec u ; \vec x ) ) }{
189
								\vltr{\IH}{ \seqar \forall \vec u^{!\nat}. \forall \vec x^\nat . \nat ( g_j' (\vec u ; \vec x) ) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
190
								}
191
							}
192
						\right\}_{j \leq |\vec g'|}
193
						}
194
					}{
195
					\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 )  )  ) ) }{
196
						\vltr{\IH}{ \seqar \forall \vec v^{!\nat} . \forall \vec y^\nat . \nat ( h( \vec v ; \vec y ) ) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
197
						}
198
					}
199
				}
200
			}
201
		}
202
	}
203
\]
204
where $\alpha$ and $\beta$ are similar to before.
205

    
206
\todo{reformat a bit}
207

    
208
It remains to check the initial functions. 
209

    
210
Consider the conditional function, defined equationally as:
211
\[
212
\begin{array}{rcl}
213
C (; \epsilon, y_\epsilon , y_0, y_1  ) & = & y_\epsilon \\
214
C(; \succ_0 x , y_\epsilon , y_0, y_1) & = & y_0 \\
215
C(; \succ_1 x , y_\epsilon , y_0, y_1) & = & y_1 
216
\end{array}
217
\]
218
Let $\vec y = ( y_\epsilon , y_0, y_1 )$ and construct the required proof as follows:
219
\[
220
\vlderivation{
221
\vliq{}{}{ \nat (x) , \nat (\vec y) \seqar \nat ( C(; x ,\vec y) )}{
222
\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) ) }{
223
\vliq{}{}{ x = \epsilon , \nat (\vec y) \seqar \nat ( C(; x , \vec y) ) }{
224
\vliq{}{}{ \nat (\vec y) \seqar \nat ( C( ; \epsilon , \vec y ) ) }{
225
\vlin{\wk}{}{ \nat (\vec y) \seqar \nat (y_\epsilon) }{ 
226
\vlin{\id}{}{\nat (y_\epsilon) \seqar \nat ( y_\epsilon )}{\vlhy{}}
227
}
228
}
229
}
230
}{
231
\vlhy{
232
\left\{ 
233
\vlderivation{
234
\vlin{\lefrul{\exists}}{}{ \exists z^\nat . x = \succ_i z , \nat (\vec y) \seqar \nat ( C(;x , \vec y) ) }{
235
\vliq{}{}{ x = \succ_i a , \nat (\vec y ) \seqar \nat (C(; x ,\vec y)) }{
236
\vliq{}{}{ \nat (\vec y) \seqar \nat ( C(; \succ_i a , \vec y ) ) }{
237
\vlin{\wk}{}{ \nat (\vec y) \seqar \nat (y_i) }{
238
\vlin{\id}{}{\nat (y_i) \seqar \nat (y_i)}{\vlhy{}}
239
}
240
}
241
}
242
}
243
}
244
\right\}_{i = 0,1}
245
}
246
}
247
}
248
}
249
\]
250
whence the result follows by $\forall$-introduction.
251
\todo{reformat a bit}
252

    
253
Other initial functions are far simpler.
254

    
255
\end{proof}
256

    
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