Révision 69

CSL16/bc-convergence.tex (revision 69)
97 97

  
98 98
\anupam{simultaneous recursion?}
99 99

  
100
\anupam{also identity, hereditarily safe, expressions, etc.}
101

  
102

  
103
\begin{proposition}
104
[Properties of BC programs]
105
\label{prop:bc-properties}
106
We have the following properties:
107
\begin{enumerate}
108
\item Hereditarily safe expressions over BC programs are BC definable.
109
\item Can pass safe input to normal input.
110
\end{enumerate}
111

  
112
\todo{finish this, add properties as required.}
113
\end{proposition}
114

  
100 115
\subsection{Convergence in arithmetic}
101 116

  
102 117
%\begin{theorem}
CSL16/wfm.tex (revision 69)
163 163
		\right)
164 164
		\] 
165 165
		
166
		We will continue with a similar notational convention as above in the remainder of this argument.
166
		We will continue with similar notational conventions in the remainder of this argument.
167 167
		
168 168
		%	\anupam{bad notation since need to include free variables of sequent too. (also of theory.) Reconsider.}
169 169
		
......
174 174
		
175 175
		By assumption, there are no $\bot$, $?$ or $\forall$ steps occurring in $\pi$.
176 176
		
177
		
178
			Suppose $\pi$ ends with a $\rigrul{\exists}$ step,
179
				\[
180
				\vlderivation{
181
					\vlin{\rigrul{\exists}}{}{ \Gamma, \nat(t) \seqar \Delta , \exists x^\nat . A(x) }{
182
						\vltr{\pi'}{ \Gamma \seqar \Delta , A(t) }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
183
					}
184
				}
185
				\]
186
				so by the inductive hypothesis we have functions $\vec f^\Delta , \vec f^{A(t)}$ with arguments $(\vec u ; \vec x )= \type(\bigotimes \Gamma)$. We define $\vec f^\pi$ as follows:
187
				\[
188
				\vec f^\pi (\vec u ; \vec x , y)
189
				\quad := \quad
190
				\left( 
191
				\vec f^\Delta (\vec u ; \vec x) ,
192
				{\id (;y)},
193
				\vec f^{A(t)} (\vec u; \vec x)  
194
				\right)
195
				\]
196
		%		(The identity function on $y$ is defined from successor, predecessor and safe composition).
197
				
198
				
199
				%Suppose we have functions $\vec f^X (\vec x ; \vec y)$ from $\pi'$ for $X = \Delta$ or $ X=A$. 
200
				%\[
201
				%\vec f(\vec x ; \vec y , z) \quad := \quad ( \vec f^\Delta (\vec x ; \vec y)   ,  z , \vec f^A ( \vec x ; \vec y ) )
202
				%\]
203
				
204
				
205
				If $\pi$ ends with a $\lefrul{\exists}$ step,
206
				\[
207
				\vlderivation{
208
					\vlin{\lefrul{\exists}}{}{ \Gamma, \exists x^N . A(x) \seqar \Delta }{
209
						\vltr{\pi'}{ \Gamma , A(a),  N(a) \seqar \Delta  }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
210
					}
211
				}
212
				\]
213
				then $\vec f^{\pi}$ is exactly the same as $\vec f^{\pi'}$.
214
				%
215
				%Suppose we have functions $\vec f' (\vec u , \vec v ; x , \vec y , \vec z)$ from $\pi'$ with $(\vec u ; \vec x )$ corresponding to $\Gamma$, $(;x)$ corresponding to $N(a)$ and $(\vec v ; \vec z)$ corresponding to $A(a)$. We define:
216
				%\[
217
				%\vec f ( \vec u , \vec v ;  )
218
				%\]
219
				
220
%				\anupam{should just be same? Consider variable naming, just in case.}
221
%				\anupam{This is probably where the consideration for free variables is.}
222
				
223
				%Suppose we have functions $\vec g (\vec v  , \vec w ; \vec x , y , \vec z)$ where $(\vec v ; \vec x) $ corresponds to $\Gamma$, $y$ corresponds to $\nat(a)$ and $(\vec w ; \vec z) $ corresponds to $A(a)$. Then we define:
224
				%\[
225
				%\vec f ( \vec v , \vec w ; \vec x , y , \vec z )
226
				%\]
227
			
228
			
229
			
230
					%	\[
231
					%	\vlderivation{
232
					%	\vliin{\rigrul{\laand}}{}{\Gamma \seqar \Delta, A \laand B}{
233
					%	\vltr{\pi_1}{  \Gamma \seqar \Delta, A}{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
234
					%	}{
235
					%	\vltr{\pi_2}{  \Gamma \seqar \Delta, B}{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
236
					%	}
237
					%	}
238
					%	\]
239
					%	
240
					%	Suppose we have $\vec f^i (\vec x , \vec a ; \vec y , \vec b)$ from $\pi_i$.
241
					%	
242
					%	\anupam{problem: does this require many tests, just like for contraction? Can we isolate a different complexity class? e.g.\ PH or Grzegorzyck?}
243
					%	\anupam{skip this case and consider later.}
244
					
245
			%		\anupam{commented stuff on additives. To remark later perhaps.}
246
					
247
					
248
			If $\pi$ consists of a subproof $\pi'$ followed by a $\rigrul{!}$ step then $\vec f^\pi$ is exactly the same as $\vec f^{\pi'}$. If $\pi$ ends with a $\lefrul{!}$ step then we just appeal to Prop.~\ref{prop:bc-properties} to turn a safe input into a normal input.		
249
				
250
			Since there are no $?$ symbols in $\pi$, we can assume also that there are no $\rigrul{\cntr}$ steps in $\pi$.
251
						
252
		%		\anupam{This is important, so expand on this here or in a remark before/after.}
253
				
177 254
		Suppose $\pi$ ends with a $\lefrul{\cntr}$ step,
178 255
		\[
179 256
		\vlderivation{
......
182 259
			}
183 260
		}
184 261
		\]
185
		so we have functions $\vec f' ( \vec u^1, \vec u^2 , \vec v ; \vec x)$ with $\vec u^1$ and $\vec u^2$ corresponding to the two copies of $!A$ in the conclusion of $\pi'$, respectively, and $\type (\Gamma) = (\vec v; \vec x)$. 
262
		so we have functions $\vec f' ( \vec u^1, \vec u^2 , \vec v ; \vec x)$, with $\vec u^1$ and $\vec u^2$ corresponding to the two copies of $!A$ in the conclusion of $\pi'$ and $\type (\Gamma) = (\vec v; \vec x)$. 
186 263
%		(Recall that the typing corresponding to $!$ means that all inputs for each $!A$ are normal). 
187 264
		We define $\vec f^\pi$ by duplicating the arguments for $!A$:
188 265
		\[
......
211 288
		%	
212 289
		%	\anupam{this is actually the main point.}
213 290
		
214
		From the assumption that there are no $?$ symbols in $\pi$, we can assume also that there are no $\rigrul{\cntr}$ steps in $\pi$.
215
				
216
%		\anupam{This is important, so expand on this here or in a remark before/after.}
291
	
217 292
		
293
	
218 294
		
219
		%	\[
220
		%	\vlderivation{
221
		%	\vliin{\rigrul{\laand}}{}{\Gamma \seqar \Delta, A \laand B}{
222
		%	\vltr{\pi_1}{  \Gamma \seqar \Delta, A}{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
223
		%	}{
224
		%	\vltr{\pi_2}{  \Gamma \seqar \Delta, B}{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
225
		%	}
226
		%	}
227
		%	\]
228
		%	
229
		%	Suppose we have $\vec f^i (\vec x , \vec a ; \vec y , \vec b)$ from $\pi_i$.
230
		%	
231
		%	\anupam{problem: does this require many tests, just like for contraction? Can we isolate a different complexity class? e.g.\ PH or Grzegorzyck?}
232
		%	\anupam{skip this case and consider later.}
233
		
234
%		\anupam{commented stuff on additives. To remark later perhaps.}
235
		
236
		
237
		
238
		Suppose $\pi$ ends with a $\rigrul{\exists}$ step,
239
		\[
240
		\vlderivation{
241
			\vlin{\rigrul{\exists}}{}{ \Gamma, \nat(t) \seqar \Delta , \exists x^\nat . A(x) }{
242
				\vltr{\pi'}{ \Gamma \seqar \Delta , A(t) }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
243
			}
244
		}
245
		\]
246
		so by the inductive hypothesis we have functions $\vec f^\Delta , \vec f^{A(t)}$ with arguments $(\vec u ; \vec x )= \type(\bigotimes \Gamma)$. We define $\vec f^\pi$ as follows:
247
		\[
248
		\vec f^\pi (\vec u ; \vec x , y)
249
		\quad := \quad
250
		\left( \vec f^\Delta (\vec u ; \vec x) , \id (;y), \vec{ f}^{A(t)} (\vec u; \vec x)  \right)
251
		\]
252
		(The identity function on $y$ is defined from successor, predecessor and safe composition).
253
		
254
		
255
		%Suppose we have functions $\vec f^X (\vec x ; \vec y)$ from $\pi'$ for $X = \Delta$ or $ X=A$. 
256
		%\[
257
		%\vec f(\vec x ; \vec y , z) \quad := \quad ( \vec f^\Delta (\vec x ; \vec y)   ,  z , \vec f^A ( \vec x ; \vec y ) )
258
		%\]
259
		
260
		
261
		Suppose $\pi$ ends with a $\lefrul{\exists}$ step:
262
		\[
263
		\vlderivation{
264
			\vlin{\lefrul{\exists}}{}{ \Gamma, \exists x^N . A(x) \seqar \Delta }{
265
				\vltr{\pi'(a)}{ \Gamma , A(a),  N(a) \seqar \Delta  }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
266
			}
267
		}
268
		\]
269
		%
270
		%Suppose we have functions $\vec f' (\vec u , \vec v ; x , \vec y , \vec z)$ from $\pi'$ with $(\vec u ; \vec x )$ corresponding to $\Gamma$, $(;x)$ corresponding to $N(a)$ and $(\vec v ; \vec z)$ corresponding to $A(a)$. We define:
271
		%\[
272
		%\vec f ( \vec u , \vec v ;  )
273
		%\]
274
		
275
		\anupam{should just be same? Consider variable naming, just in case.}
276
		\anupam{This is probably where the consideration for free variables is.}
277
		
278
		%Suppose we have functions $\vec g (\vec v  , \vec w ; \vec x , y , \vec z)$ where $(\vec v ; \vec x) $ corresponds to $\Gamma$, $y$ corresponds to $\nat(a)$ and $(\vec w ; \vec z) $ corresponds to $A(a)$. Then we define:
279
		%\[
280
		%\vec f ( \vec v , \vec w ; \vec x , y , \vec z )
281
		%\]
282
		
283
		
284 295
		Suppose $\pi$ ends with a $\cut$ step:
285 296
		\[
286 297
		\vlderivation{
......
303 314
	\vec h ( \vec v ; \vec y , \vec g^A ( \vec u ; \vec x ) )
304 315
	\right)
305 316
	\]
306
	(Notice that all safe inputs are hereditarily safe in these expressions, so they are definable by safe composition and projection).
317
	Notice that all safe inputs on the left occur hereditarily safe on the right, and so these expressions are definable in BC by Prop.~\ref{prop:bc-properties}.
307 318
	
308 319
	
309 320
	
310 321
	
311
	In the other case, where $A$ may be modal, it must be of the form $!\nat (t)$ since it is a cut formula, and so must directly descend from an induction step or axiom on one side. The only such occurrence of a modality is in the conclusion of an induction step, whence such a formula has the form $!\nat (t)$. By free-cut elimination we can also assume that this cut formula is principal on \emph{both} sides, i.e.\ $\pi$ is of the form:
322
	In the other case, where $A$ may be modal, it must be of the form $!\nat (t)$ since it must directly descend from an induction step on one side.
323
%	 or axiom on one side. The only such occurrence of a modality is in the conclusion of an induction step, whence such a formula has the form $!\nat (t)$. 
324
	 By free-cut elimination we can also assume that this cut formula is principal on \emph{both} sides, i.e.\ $\pi$ is of the form:
312 325
	
313
	\anupam{need to check this assumption against free-cut elimination conditions. To discuss.}
326
%	\anupam{need to check this assumption against free-cut elimination conditions. To discuss.}
314 327
	
315 328
\[
316 329
\vlderivation{
317 330
	\vliin{\cut}{}{!\Gamma , !\Sigma  , A(\epsilon) \seqar A(t)  }{
318
%		\vlin{\rigrul{!}}{}{!\Gamma \seqar ?\Delta, !\nat(t)}{
319
			\vltr{\pi_1}{!\Gamma \seqar  !\nat(t)}{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
320
%			}
331
		\vlin{\rigrul{!}}{}{!\Gamma \seqar  !\nat(t)}{
332
			\vltr{\pi_1'}{!\Gamma \seqar  \nat(t)}{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
333
			}
321 334
		}{
322 335
		\vltr{\pi_2}{ !\Sigma, !\nat(t) , A(\epsilon)\seqar A(t)  }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
323 336
		}
324 337
	}
325 338
\]
326
where $\pi_1$ ends with a $\rigrul{!}$ step for which $!\nat (t)$ is principal, $\pi_2$ ends with a $\pind$ step where $A(x)$ is the induction formula, and we assume there are no side-formulae on the right of both conclusions for the same reason as $\rigrul{\cntr}$: a free-cut free proof of a convergence statement contains no $?$ symbol.
327

  
328
So by the inductive hypothesis we have functions $ g( \vec u ; )$ and $\vec h ( \vec v , w ; \vec x)$ from $\pi_1$ and $\pi_2$ respectively, where $\vec u$, $\vec v$, $w$ and $\vec x$ correspond to $!\Gamma$, $!\Sigma$, $!\nat(t)$ (in $\pi_2$) and $A(\epsilon)$ respectively. We construct the functions $\vec f^\pi $ as follows:
339
 where $\pi_2$ ends with a $\ind$ step for which  $A(x)$ is the induction formula, and we assume there are no side-formulae on the right of both end-sequents for the same reason as $\rigrul{\cntr}$: $\pi$ does not contain any occurrences of $?$. By the inductive hypothesis we have functions $ g( \vec u ; )$ and $\vec h ( \vec v , w ; \vec x)$ from $\pi_1'$ and $\pi_2$ respectively, where $\vec u$, $\vec v$, $w$ and $\vec x$ correspond to $!\Gamma$, $!\Sigma$, $!\nat(t)$ (in $\pi_2$) and $A(\epsilon)$ respectively. We construct the functions $\vec f^\pi $ as follows:
329 340
\[
330 341
\vec f^\pi (\vec u , \vec v ; \vec x)
331 342
\quad := \quad
332 343
\vec h (  \vec v , g(\vec u ; ) ; \vec x)
333 344
\]
334
(Notice that this is definable by safe composition and projection since all safe inputs $\vec x$ are hereditarily safe on the right.)
345
Notice, again, that all safe inputs on the left occur hereditarily safe on the right, and so these expressions are definable in BC by Prop.~\ref{prop:bc-properties}.
346

  
347

  
335 348
	
349
%	Suppose $\pi$ ends with a $\lefrul{!}$ step:
350
%	\[
351
%	\vlderivation{
352
%		\vlin{!}{}{\Gamma, !A \seqar \Delta}{
353
%			\vltr{\pi'}{ \Gamma , A \seqar \Delta  }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
354
%		}
355
%	}
356
%	\]
357
%	\todo{finish this case, just passing a safe input to a normal input.}
358
%	
359
%	
360
%	Suppose $\pi$ ends with a $\rigrul{!}$ step:
361
%	
362
%	\todo{finish this case, should not change function at all, but maybe there is a consideration.}
336 363
	
337
	Suppose $\pi$ ends with a $\lefrul{!}$ step:
338
	\[
339
	\vlderivation{
340
		\vlin{!}{}{\Gamma, !A \seqar \Delta}{
341
			\vltr{\pi'}{ \Gamma , A \seqar \Delta  }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
342
		}
343
	}
344
	\]
345
	\todo{finish this case, just passing a safe input to a normal input.}
364
	If $\pi$ ends with a $\rigrul{\wk}$ step then we just add a tuple of constant functions $\vec \epsilon$ of appropriate length as dummy functions. If $\pi$ ends with a $\lefrul{\wk}$ step then we just add dummy inputs of appropriate length.
346 365
	
366
%	Suppose $\pi$ ends with a $\lefrul{\wk}$ step:
367
%	
368
%	\todo{finish this case, just add a dummy input.}
369
%	
370
%	Suppose $\pi$ ends with a $\rigrul{\wk}$ step:
371
%	
372
%	\todo{finish this case, just add a dummy function.}
373
%	
347 374
	
348
	Suppose $\pi$ ends with a $\rigrul{!}$ step:
349 375
	
350
	\todo{finish this case, should not change function at all, but maybe there is a consideration.}
351
	
352
	Suppose $\pi$ ends with a $\lefrul{\wk}$ step:
353
	
354
	\todo{finish this case, just add a dummy input.}
355
	
356
	Suppose $\pi$ ends with a $\rigrul{\wk}$ step:
357
	
358
	\todo{finish this case, just add a dummy function.}
359
	
360
	
361
	
362
	Suppose $\pi$ ends with a $\pind$ step. For the same reason as $\rigrul{\cntr}$ we can assume there are no $?$ formulae and so no side formulae on the right. Thus a $\pi$ has the following form:
376
	Finally, suppose $\pi$ ends with an $\ind$ step. Since there are no occurrences of $?$ in $\pi$ we can again assume that there are no side formulae on the right of any induction step. Thus $\pi$ has the following form:
363 377
	\[
364 378
	\vlderivation{
365 379
		\vliin{\pind}{}{ !\nat (t), !\Gamma  ,  A(\epsilon) \seqar A(t) }{
......
369 383
	}
370 384
}
371 385
\]
372
\anupam{is this better with a premiss for the base case?}
386
%\anupam{is this better with a premiss for the base case?}
373 387

  
374
By the inductive hypothesis we have functions $\vec g^0 (u , \vec v ; \vec x)$ and $\vec g^1 (u , \vec v ; \vec x)$ with $u$, $\vec v$ and $\vec x$ corresponding to $!\nat(a)$, $!\Gamma$ and $A(a)$ respectively. We define $\vec f^\pi$ by (simultaneous) predicative recursion on notation as follows:
388
By the inductive hypothesis we have functions $\vec g^0 (u , \vec v ; \vec x)$ and $\vec g^1 (u , \vec v ; \vec x)$ with $u$, $\vec v$ and $\vec x$ corresponding to $!\nat(a)$, $!\Gamma$ and $A(a)$ respectively. We define $\vec f^\pi$ by simultaneous predicative recursion on notation as follows:
375 389
\[
376 390
\begin{array}{rcll}
377 391
\vec f^\pi ( \epsilon, \vec v ; \vec x ) & := & \vec x & \\
......
379 393
\end{array}
380 394
\]
381 395

  
382
\anupam{check this}
396
%\anupam{check this}
397
%
398
%\todo{simultaneous PRN.}
383 399

  
384
\todo{simultaneous PRN.}
385 400

  
386

  
387 401
\end{definition}
388 402

  
403
The induction step above is the reason why we enrich the usual BC framework with a simultaneous version of PRN.
404

  
389 405
\subsection{Witness predicate and extensional equivalence of functions}
390 406

  
391
Now that we have defined how to extract a function from a proof, we need to show that the function satisfies the appropriate semantic properties.
407
Now that we have defined how to extract BC functions from proofs, we show that these functions satisfy the appropriate semantic properties.
392 408

  
393 409
For this we work in a quantifier-free logic whose atoms are equations between terms of our arithmetic and whose (sound) rules are simply the axioms of our arithmetic.
394 410

  

Formats disponibles : Unified diff