Statistiques
| Révision :

root / CSL16 / bc-convergence.tex @ 54

Historique | Voir | Annoter | Télécharger (11,58 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
!\nat (u) , !\nat (\vec v) , \nat (\vec x) \seqar \nat ( f(u, \vec v ; \vec x) )
81
	\end{equation}
82
	by $\cax{\Sigma^N_1}{\pind}$ on $u$. After this the result will follow by $\forall$-introduction for $u, \vec v , \vec x$.
83
	
84
	In the base case we have the following proof,
85
	\[
86
%	\vlderivation{
87
%	\vlin{\rigrul{\limp}}{}{ \seqar \nat (\vec x) \limp \nat (f(\epsilon , \vec v ; \vec x )) }{
88
%		\vliq{\beta}{}{ \nat (\vec x) \seqar \nat ( f( \epsilon , \vec v ; \vec x) ) }{
89
%			\vliq{\alpha}{}{ \nat (\vec x) \seqar \nat ( g (\vec v ; \vec x) ) }{
90
%				\vltr{IH}{\seqar \forall v^{!\nat} . \forall x^\nat . \nat( g(\vec v ; \vec x) ) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
91
%				}
92
%			}
93
%		}		
94
%		}
95
\vlderivation{
96
	\vliq{\beta}{}{!\nat(\vec v) , \nat (\vec x) \seqar \nat(f (\epsilon , \vec v ; \vec x)) }{
97
		\vliq{\alpha}{}{!\nat (\vec v) , \nat (\vec x) \seqar \nat (g (\vec v ; \vec x) ) }{
98
			\vltr{\IH}{\seqar \forall \vec v^{!\nat} . \forall \vec x^\nat . \nat (g (\vec v ; \vec x)) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
99
			}
100
		}
101
	}
102
\]
103
where $\alpha$ is,
104
\[
105
\vlderivation{
106
%	\vliin{\cut}{}{ \nat (\vec x) \seqar \nat ( g (\vec v ; \vec x)) }{
107
%		\vlin{\rigrul{!}}{}{\seqar !\nat (v)}{
108
%			\vlin{assump}{}{\seqar \nat (\vec v)}{\vlhy{}}
109
%			}
110
%		}{
111
		\vliin{\cut}{}{ !\nat (\vec v ) , \nat (\vec x) \seqar \nat (g (\vec v ; \vec x )) }{
112
			\vlhy{\seqar \forall \vec v^{!\nat} . \forall \vec x^\nat . \nat (g (\vec v ; \vec x)) }
113
			}{
114
			\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 )) }{
115
				\vlin{\id}{}{\nat (g(\vec v ; \vec x )) \seqar \nat (g(\vec v ; \vec x ))}{\vlhy{}}
116
				}
117
			}
118
%		}
119
	}
120
\]
121
and $\beta$ is:
122
\[
123
\vlderivation{
124
	\vliin{\cut}{}{!\nat (\vec v) , \nat (\vec x) \seqar \nat ( f ( \epsilon , \vec v ; \vec x ) ) }{
125
		\vlhy{!\nat (\vec v) , \nat (\vec x) \seqar \nat (g (\vec v ; \vec x) ) }
126
		}{
127
		\vliin{\cut}{}{ \nat (g (\vec v ; \vec x) ) \seqar \nat (f (\epsilon, \vec v ; \vec x) ) }{
128
			\vlin{\Phi}{}{ \seqar f(\epsilon , \vec v ; \vec x) = g(\vec v ; \vec x) }{\vlhy{}}
129
			}{
130
			\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{}}
131
			}
132
		}
133
	}
134
\]
135

    
136
For the inductive step, we suppose that $\nat (u)$ and the proof is as follows,
137
\[
138
%\vlderivation{
139
%	\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) ) }{
140
%	\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) )   }{
141
%		\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) )    }{
142
%			\vlin{\id}{}{\nat(\vec x) \seqar \nat (\vec x) }{\vlhy{}}
143
%			}{
144
%			\vliq{\beta}{}{  \nat (\vec x) , \nat (f(u , \vec v ; \vec x) ) \seqar \nat ( f(\succ_i u , \vec v ; \vec x) ) }{
145
%				\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 )) ) }{
146
%					\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}}
147
%					}
148
%				}
149
%			}
150
%		}
151
%	}
152
%	}
153
\vlderivation{
154
	\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 ) )  }{
155
		\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 ) ) )   }{
156
			\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}}
157
		}
158
	}
159
}
160
\]
161
where the steps indicated $\alpha$ and $\beta$ are analogous to those for the base case.
162
%, and $\gamma$ is an instance of the general scheme:
163
%\begin{equation}
164
%\label{eqn:nat-cntr-left-derivation}
165
%\vlderivation{
166
%	\vliin{\cut}{}{ \nat (t) , \Gamma \seqar \Delta }{
167
%		\vlin{\natcntr}{}{ \nat (t) \seqar \nat (t) \land \nat (t) }{\vlhy{}}
168
%		}{
169
%		\vlin{\lefrul{\land}}{}{\nat (t)  \land \nat (t) , \Gamma \seqar \Delta}{ \vlhy{\nat (t)  ,\nat (t) , \Gamma \seqar \Delta} }
170
%		}
171
%	}
172
%\end{equation}
173

    
174
%
175
%For the inductive step, we need to show that,
176
%\[
177
%\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) )   )
178
%\]
179
%so let us suppose that $N(x)$ and we give the following proof:
180
%\[
181
%\vlderivation{
182
%	\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)  ) }{
183
%		\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)  ) }{
184
%			\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) ) ) }{
185
%				\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 }}
186
%			}{
187
%			\vlhy{2}
188
%		}
189
%	}{
190
%	\vlhy{3}
191
%}
192
%}
193
%}
194
%\]
195
%TOFINISH
196

    
197
Suppose $f$ is defined by safe composition as follows:
198
\[
199
f( \vec u ; \vec x )
200
\quad = \quad
201
h( \vec g (\vec u ; )  ; \vec g' ( \vec u ; \vec x ) )
202
\]
203

    
204
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:
205
\[
206
\vlderivation{
207
	\vliq{\rigrul{\forall}}{}{ \seqar \forall\vec u^{!\nat} . \forall \vec x^\nat . \nat( f(\vec u ; \vec x ) ) }{
208
		\vliq{\beta}{}{ !\nat (\vec u) , \nat (\vec x) \seqar \nat ( f( \vec u ; \vec x ) ) }{
209
			\vliq{\cntr}{}{  !\nat (\vec u) , \nat (\vec x) \seqar \nat ( h( \vec g(\vec u ;) ; \vec g' ( \vec u ; \vec x )  ) )  }{
210
				\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 )  ) )   }{
211
					\vlhy{
212
						\left\{  
213
						\vlderivation{
214
							\vlin{\rigrul{!}}{}{ !\nat (\vec u) \seqar !\nat ( g_i (\vec u ;) ) }{
215
								\vliq{\alpha}{}{ !\nat (\vec u) \seqar \nat ( g_i (\vec u ;) }{
216
									\vltr{\IH}{ \forall \vec u^{!\nat} . \nat (g_i (\vec u ;) ) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
217
									}
218
								}
219
							}
220
						\right\}_{i \leq |\vec g| }
221
						}
222
					}{
223
					\vlhy{
224
						\left\{
225
						\vlderivation{
226
							\vliq{\alpha}{}{ !\nat ( \vec u )  , \nat (\vec x) \seqar \nat  ( g_j' ( \vec u ; \vec x ) ) }{
227
								\vltr{\IH}{ \seqar \forall \vec u^{!\nat}. \forall \vec x^\nat . \nat ( g_j' (\vec u ; \vec x) ) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
228
								}
229
							}
230
						\right\}_{j \leq |\vec g'|}
231
						}
232
					}{
233
					\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 )  )  ) ) }{
234
						\vltr{\IH}{ \seqar \forall \vec v^{!\nat} . \forall \vec y^\nat . \nat ( h( \vec v ; \vec y ) ) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
235
						}
236
					}
237
				}
238
			}
239
		}
240
	}
241
\]
242
where $\alpha$ and $\beta$ are similar to before.
243

    
244
\todo{reformat a bit}
245

    
246
It remains to check the initial functions. 
247

    
248
Consider the conditional function, defined equationally as:
249
\[
250
\begin{array}{rcl}
251
C (; \epsilon, y_\epsilon , y_0, y_1  ) & = & y_\epsilon \\
252
C(; \succ_0 x , y_\epsilon , y_0, y_1) & = & y_0 \\
253
C(; \succ_1 x , y_\epsilon , y_0, y_1) & = & y_1 
254
\end{array}
255
\]
256
Let $\vec y = ( y_\epsilon , y_0, y_1 )$ and construct the required proof as follows:
257
\[
258
\vlderivation{
259
\vliq{}{}{ \nat (x) , \nat (\vec y) \seqar \nat ( C(; x ,\vec y) )}{
260
\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) ) }{
261
\vliq{}{}{ x = \epsilon , \nat (\vec y) \seqar \nat ( C(; x , \vec y) ) }{
262
\vliq{}{}{ \nat (\vec y) \seqar \nat ( C( ; \epsilon , \vec y ) ) }{
263
\vlin{\wk}{}{ \nat (\vec y) \seqar \nat (y_\epsilon) }{ 
264
\vlin{\id}{}{\nat (y_\epsilon) \seqar \nat ( y_\epsilon )}{\vlhy{}}
265
}
266
}
267
}
268
}{
269
\vlhy{
270
\left\{ 
271
\vlderivation{
272
\vlin{\lefrul{\exists}}{}{ \exists z^\nat . x = \succ_i z , \nat (\vec y) \seqar \nat ( C(;x , \vec y) ) }{
273
\vliq{}{}{ x = \succ_i a , \nat (\vec y ) \seqar \nat (C(; x ,\vec y)) }{
274
\vliq{}{}{ \nat (\vec y) \seqar \nat ( C(; \succ_i a , \vec y ) ) }{
275
\vlin{\wk}{}{ \nat (\vec y) \seqar \nat (y_i) }{
276
\vlin{\id}{}{\nat (y_i) \seqar \nat (y_i)}{\vlhy{}}
277
}
278
}
279
}
280
}
281
}
282
\right\}_{i = 0,1}
283
}
284
}
285
}
286
}
287
\]
288
whence the result follows by $\forall$-introduction.
289
\todo{reformat a bit}
290

    
291
Other initial functions are far simpler.
292

    
293
\end{proof}
294

    
295

    
296

    
297

    
298

    
299

    
300

    
301

    
302

    
303

    
304

    
305

    
306

    
307

    
308

    
309

    
310

    
311

    
312

    
313

    
314

    
315

    
316

    
317

    
318

    
319

    
320

    
321

    
322

    
323

    
324

    
325

    
326

    
327

    
328

    
329

    
330

    
331

    
332

    
333

    
334

    
335