Révision 90

CSL16/bc-convergence.tex (revision 90)
20 20
%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.
21 21
\begin{theorem}
22 22
%	[Convergence]
23
\label{thm:arith-proves-bc-conv}
23 24
	If $\eqspec$ is a BC program defining a function $f$, then $I\sigzer$ proves $\conv(f, \eqspec)$.
24 25
\end{theorem}
25 26

  
CSL16/macros.tex (revision 90)
61 61
	
62 62
	% classical connectives
63 63
	
64
	\newcommand{\cimp}{\supset}
64
	\newcommand{\cimp}{\rightarrow}
65 65
	\newcommand{\cand}{\wedge}
66 66
	\newcommand{\cor}{\vee}
67 67
	\newcommand{\cnot}{\neg}
CSL16/wfm.tex (revision 90)
7 7
Free-cut elimination is employed to control the quantifer complexity of formulae occurring in a proof, although here we furthermore use it to control the presence of \emph{contraction} in a proof, to which we have access via the modalities of linear logic.
8 8
%Free-cut elimination is employed to control the logical complexity of formulae occurring in a proof, and a formal `witness' predicate plays a similar role to the realisability predicate.
9 9

  
10
The combination of De Morgan normalisation and free-cut elimination plays a similar role to the double negation translation, and this is even more evident in our setting where the transformation of a classical proof to anchored form can be seen to be a partial `constructivisation' of the proof. As well as eliminating the (nonconstructive) occurrences of the $\forall$-right rule, as usual for the WFM, the linear logic refinement of the logical connectives means that right-contraction steps is also eliminated. This is important due to the fact that we are in a setting where programs are equational specifications, not formulae (as in bounded arithmetic) or $\lambda$-terms (as in applicative theories), so we cannot in general decide atomic formulae.
10
The combination of De Morgan normalisation and free-cut elimination plays a similar role to the double negation translation, and this is even more evident in our setting where the transformation of a classical proof to anchored form can be seen to be a partial `constructivisation' of the proof. As well as eliminating the (nonconstructive) occurrences of the $\forall$-right rule, as usual for the WFM, the linear logic refinement of the logical connectives means that right-contraction steps is also eliminated. This is important due to the fact that we are in a setting where programs are equational specifications, not formulae (as in bounded arithmetic) or combinatory terms (as in applicative theories), so we cannot in general decide atomic formulae.
11 11

  
12 12
%Some key features of this method are the following:
13 13
%\begin{itemize}
......
71 71
		
72 72
	
73 73
		Let us fix a particular (coherent) equational specification $\eqspec(f)$. Rather than directly considering $\arith$-proofs of $\conv ( f , \eqspec )$, we will consider a $\closure{\eqspec} \cup \arith $ sequent proof of $!\word (\vec x) \seqar \word (f (\vec x) )$, under Lemma~\ref{lemma:spec-norm-form}. 
74
		
74
%		
75 75
		Our crucial use of free-cut elimination is in the following result, which yields strong regularity properties:
76 76
		
77 77
		\begin{proposition}
......
385 385
	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$ is of the form:
386 386
	\[
387 387
	\vlderivation{
388
		\vliin{\pind}{}{ !\nat (t), !\Gamma  ,  A(\epsilon) \seqar A(t) }{
388
		\vliin{\ind}{}{ !\nat (t), !\Gamma  ,  A(\epsilon) \seqar A(t) }{
389 389
			\vltr{\pi_0}{!\nat(a) , !\Gamma ,  A(a) \seqar A(\succ_0 a)}{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
390 390
		}{
391 391
		\vltr{\pi_1}{!\nat(a), !\Gamma ,  A(a)\seqar A(\succ_1 a) }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
......
411 411

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

  
414
\newcommand{\qfindth}{\mathit{IQF}}
415

  
414 416
\subsection{Witness predicate and extensional equivalence of functions}
415 417

  
416
\anupam{need to mention that this predicate is similar to realisability predicate in absence, and indeed is presented like that for applicative theories, which also rely on free-cut elimination.}
418
%\anupam{need to mention that this predicate is similar to realisability predicate in absence, and indeed is presented like that for applicative theories, which also rely on free-cut elimination.}
417 419

  
418
Now that we have defined how to extract BC functions from proofs, we show that these functions satisfy the appropriate semantic properties.
420
Now that we have seen how to extract BC functions from proofs, we show that these functions satisfy the appropriate semantic properties, namely the equational program $\eqspec$ we started with. For this we turn to a quantifier-free classical theory, in a similar fashion to $\mathit{PV}$ for $S^1_2$ in \cite{Buss86book} or system $T$ in G\"odel's Dialectica interpretation. This is adequate since we only care about extensional properties of extracted functions at this stage, the complexity properties already handled by the BC programs we just constructed.
419 421

  
420
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.
422
We point out that we could equally use a realisability approach, as done in e.g.\ \cite{Cantini02} and other works in applicative theories, since the formulae we deal with are essentially positive and so there is not much difference between the two approaches. Indeed here the witness predicate plays the same role as the realisability predicate in other works.
421 423

  
422
(This is similar to the role of PV in the witnessing argument for $S^1_2$ and system $T$ for witnessing $I\Sigma_1$.)
424
%The witness predicate of the WFM is similar to the realisability predicate, and this is even more true in out setting
423 425

  
426
Let $\qfindth$ be the classical theory over the language $\{ \epsilon, \succ_0, \succ_1 , (f^k_i )\}$ obtained from the axioms $\sepeps, \sepzer, \sepone, \inj, \surj$ and $\ind$ by dropping all relativisations to $\word$ (or $!\word$), replacing all linear connectives by their classical counterparts, and restricting induction to only quantifier-free formulae.
427

  
428
%For this we work in a quantifier-free classical logic whose atoms are equations between terms of our arithmetic and whose (sound) rules are simply the axioms of our arithmetic.
429
%
430
%(This is similar to the role of PV in the witnessing argument for $S^1_2$ and system $T$ for witnessing $I\Sigma_1$.)
431

  
424 432
	
425
	\todo{add cases for $\laor$ and $\neq$.}
433
%	\todo{add cases for $\laor$ and $\neq$.}
426 434
	
427 435
		\newcommand{\witness}[2]{\mathit{Witness}^{#1}_{#2}}
428 436
		\begin{definition}
429 437
			[Witness predicate]
430
			We define the following `witness' predicate for $\Sigma^\nat_1$-formulae $A$ with free variables amongst $\vec a$:
438
			For formulae $A, B$ satisfying properties \ref{item:no-neg-word}, \ref{item:no-forall}, \ref{item:no-quest} of Prop.~\ref{prop:freedom}, we define the following `witness' predicate as a quantifier-free formula of $\qfindth$:
439
%			 $A$ with free variables amongst $\vec a$:
440
		
441
		\renewcommand{\sigma}{a}
431 442
			\[
432 443
			\begin{array}{rcll}
433
			\witness{\vec a}{A} (w, \vec b) & := & w = t(\vec b) & \text{if $A(\vec a)$ is $\nat (t(\vec a))$.} \\
434
			\witness{\vec a}{A} (w, \vec b) & := & s(\vec b) = t(\vec b) & \text{if $A(\vec a)$ is $s(\vec a) = t (\vec a)$.} \\
435
			\witness{\vec a}{A \lor B} ( \vec w^1 , \vec w^2, \vec b ) & := &  \witness{\vec a}{A} (\vec w^1 , \vec b) \cor \witness{\vec a}{B} (\vec w^2 , \vec b) & 
436
			%			\text{for $\star \in \{ \land, \lor, \laand , \laor\}$.} 
444
			\witness{}{A} (\sigma) & := & \sigma = t & \text{if $A$ is $\word (t)$.} \\
445
			\witness{}{A} (\sigma) & := & s=t & \text{if $A$ is $s=t$.} \\
446
						\witness{}{A} (\sigma) & := & s\neq t & \text{if $A$ is $s\neq t$.} \\
447
			\witness{}{A \star B} ( \vec \sigma^A , \vec \sigma^B) & := &  \witness{}{A} (\vec \sigma^A) \cor \witness{}{B} (\vec \sigma^B) & 
448
						\text{for $\star \in \{ \lor,\laor\}$.} 
437 449
			\\
438
			\witness{\vec a}{A \land B} ( \vec w^1 , \vec w^2, \vec b ) & := &  \witness{\vec a}{A} (\vec w^1 , \vec b) \cand \witness{\vec a}{B} (\vec w^2 , \vec b) & 
439
			%			\text{for $\star \in \{ \land, \lor, \laand , \laor\}$.} 
450
			\witness{}{A \star B} ( \vec \sigma^A , \vec \sigma^B) & := &  \witness{}{A} (\vec \sigma^A ) \cand \witness{}{B} (\vec \sigma^B ) & 
451
						\text{for $\star \in \{ \land, \laand \}$.} 
440 452
			\\
441
			\witness{\vec a}{\exists x^\nat . A(x)} ( w, \vec w  , \vec b) & := & \witness{\vec{a}, a}{A(a)}(\vec w , \vec b, w ) & \\
453
			\witness{}{\exists x^\word A} ( \sigma, \vec \sigma^A  ) & := & \witness{}{A}(\vec \sigma^A , \sigma ) & \\
454
			\witness{}{!A} (\vec \sigma^A) & := & \witness{}{A} (\vec \sigma^A)
442 455
			\end{array}
443 456
			\]
444
			where $|\vec w^1| = |\type (A)|$ and $|\vec w^2| = |\type (B)| $.
457
			where $|\vec \sigma^A| = |\type (A)|$ and $|\vec \sigma^B| = |\type (B)| $.
445 458
		\end{definition}
446 459
		%	\todo{problem: what about complexity of checking equality? }
447 460
		
448
		\todo{Reformulate above later if necessary.}
461
		\begin{remark}
462
		Notice that, unlike in the bounded arithmetic setting where the $\word$ predicate is redundant (since variables are tacitly assumed to range over $\word$), we do not parametrise the witness predicate by an assignment to the free variables of a formula. Instead these dependencies are taken care of by the explicit occurrences of the $\word$ predicate in $\arith$.
463
		\end{remark}
449 464
		
465
%		\todo{Reformulate above later if necessary.}
466
		
450 467
		%	\todo{What about $\nat (t)$? What does it mean? Replace with true?}
451 468
		
452 469
		%	\todo{either use the witness predicate above, or use realizability predicate at meta-level and a model theory, like BH.}
453 470
		
454 471
		%	\anupam{Need to check above properly. $N(t)$ should be witnessed by the value of $t $ in the model. For equality of terms the witness should not do anything.}
455 472
		
456
		\anupam{to consider/remark: formally, is witness predicate checked in model or some logical theory?}
473
%		\anupam{to consider/remark: formally, is witness predicate checked in model or some logical theory?}
457 474

  
458 475

  
459 476

  
460 477

  
461 478
\begin{lemma}
462
Suppose $\pi$ is a free-cut free $\Sigma^\nat_1$-$\pind$ proof of a sequent $\Gamma (\vec a) \seqar \Delta (\vec a)$, with $\vec f^\pi$ defined as above. Then:
463
	\[
464
			\witness{\vec a}{\bigotimes \Gamma} (\vec w , \vec b) \implies \witness{\vec a}{\bigparr \Delta } (\vec f^\pi(\vec w , \vec b), \vec b)
465
			\]
479
\label{lemma:witness-invariant}
480
Let $\pi$ be a free-cut free proof in $\closure{\eqspec}\cup \arith$, satisfying properties \ref{item:no-neg-word}, \ref{item:no-forall}, \ref{item:no-quest}, \ref{item:no-laor-step} of Prop.~\ref{prop:freedom}, of a sequent $\Gamma \seqar \Delta $. Let $\eqspec^\pi$ denote the equational specification induced by the BC program for $\vec f^\pi$.\footnote{We assume that the function symbols occurring in $\eqspec^\pi$ are distinct from those occurring in $\eqspec$.} Then $\qfindth$ proves:
481
\[
482
\left(\forall \eqspec \cand \forall \eqspec^\pi \cand \witness{}{\bigotimes \Gamma} (\vec a)\right) \cimp \witness{}{\bigparr \Delta } (\vec f^\pi(\vec a))
483
\]
484
where $\forall \eqspec$ and $\forall \eqspec^\pi$ denote the universal closures of $\eqspec$ and $\eqspec^\pi$ respectively.
485
%Suppose $\pi$ is a free-cut free $\Sigma^\nat_1$-$\pind$ proof of a sequent $\Gamma (\vec a) \seqar \Delta (\vec a)$, with $\vec f^\pi$ defined as above. Then:
486
%	\[
487
%			\witness{\vec a}{\bigotimes \Gamma} (\vec w , \vec b) \implies \witness{\vec a}{\bigparr \Delta } (\vec f^\pi(\vec w , \vec b), \vec b)
488
%			\]
466 489
\end{lemma}
467 490
		
468 491
			
469
			\anupam{to consider: do we need parameters $\vec a$ in argument of $f$? Or does $\nat$ predicate take care of this?}
492
%			\anupam{to consider: do we need parameters $\vec a$ in argument of $f$? Or does $\nat$ predicate take care of this?}
493
%			
494
%			%	We will be explicit about normal and safe inputs when necessary, for the most part we will simply rearrange inputs into lists $(\vec u; \vec a)$ as in BC framework.
495
%			
496
%%			We often suppress the parameters $\vec a$ when it is not important.	
497
%			
498
%			\anupam{Is this implication provable in Bellantoni's version of PV based on BC?}
470 499
			
471
			%	We will be explicit about normal and safe inputs when necessary, for the most part we will simply rearrange inputs into lists $(\vec u; \vec a)$ as in BC framework.
472
			
473
%			We often suppress the parameters $\vec a$ when it is not important.	
474
			
475
			\anupam{Is this implication provable in Bellantoni's version of PV based on BC?}
476
			
477 500
			%	\anupam{for moment try ignore decoration on right? what about negation?}
478 501
	
479 502
	
480
	\begin{proof}
481
	By structural induction on $\pi$, again, following the definition of $\vec f^\pi$.
482
	\todo{}
503
	\begin{proof}[Proof sketch]
504
	By structural induction on $\pi$, again, following the definition of $\vec f^\pi$. 
483 505
	\end{proof}	
506
	Notice that, since we are in a classical theory, the proof of the above lemma can be carried out in an arbitrary model, by the completeness theorem, greatly easing the exposition.
507
	
508
	Finally, we arrive at our main result, providing a converse to Thm.~\ref{thm:arith-proves-bc-conv}.
484 509
		
485 510
		\begin{theorem}
486
		If we can prove a convergence statement for a function $f$ under a specification $\Phi(f)$ then there is a BC-program for a function $\mathbf f$ such that:
487
		\begin{equation}
488
		\label{eqn:spec-implies-program}
489
\Phi(f) \implies f (\vec x) = \mathbf{f} (\vec x)
490
		\end{equation}
491
		\begin{equation}
492
		\label{eqn:program-satisfies-spec}
493
		\Phi(\mathbf f)
494
		\end{equation}
511
		\label{thm:main-result}
512
		For any coherent equational specification $\eqspec$, if $\arith $ proves $\conv (f , \eqspec)$ then there is a polynomial-time function $g $ on $\Word$ (of same arity as $f$) such that $\eqspec [  g/ f ]$.
513
		
514
%		If we can prove a convergence statement for a function $f$ under a specification $\Phi(f)$ then there is a BC-program for a function $\mathbf f$ such that:
515
%		\begin{equation}
516
%		\label{eqn:spec-implies-program}
517
%\Phi(f) \implies f (\vec x) = \mathbf{f} (\vec x)
518
%		\end{equation}
519
%		\begin{equation}
520
%		\label{eqn:program-satisfies-spec}
521
%		\Phi(\mathbf f)
522
%		\end{equation}
495 523
		\end{theorem}
496
			\begin{proof}
497
			Notice that a convergence statement has the following form:
498
			\[
499
			!\Phi(f) , !\nat(\vec a) \seqar \nat(f (\vec a) )
500
			\]
501
			By the lemma above, and by inspection of the definition of the witness predicate, this means we have that,
502
			\[
503
			(\Phi(f) \cand \vec x = \vec a ) \implies \mathbf f (\vec x) = f(\vec a)
504
			\]
505
			whence we arrive at \eqref{eqn:spec-implies-program}.
506
			
507
			Finally, notice that $\Phi(f)$ has \emph{some} model, since it is a monotone inductive definition so some fixed point must exist. Therefore we obtain \eqref{eqn:program-satisfies-spec} as well.
508
			\end{proof}
509
			
510
			\anupam{rephrase above proof to make more sense.}
511
			
512
%
524
		\begin{proof}
525
%		[Proof sketch]
526
		By Thm.~\ref{thm:free-cut-elim} and Lemma~\ref{lemma:spec-norm-form} we have a free-cut free proof $\pi$ in $\closure{\eqspec} \cup \arith$ of $!\word (\vec x ) \seqar \word (f (\vec x))$. By Lemma~\ref{lemma:witness-invariant} above this means that $\vec a = \vec x \cimp f^\pi (\vec a) = f(\vec x)$ is true in any model of $\qfindth$ satisfying $\eqspec$ and $\eqspec^\pi$. 
527
%		Since some model must exist by coherence (cf.\ Prop.~\ref{prop:eq-spec-model}), we have that 
528
		Using the fact that $\eqspec \cup \eqspec^\pi$ is coherent we can construct such a model, similarly to Prop.~\ref{prop:eq-spec-model}, which will contain $\Word$ as an initial segment, in which we must have $f^\pi (\vec x) = f (\vec x)$ for every $\vec x \in \Word$, as required.\todo{polish}
529
		\end{proof}
530
		
531
%			\begin{proof}
532
%			Notice that a convergence statement has the following form:
533
%			\[
534
%			!\Phi(f) , !\nat(\vec a) \seqar \nat(f (\vec a) )
535
%			\]
536
%			By the lemma above, and by inspection of the definition of the witness predicate, this means we have that,
537
%			\[
538
%			(\Phi(f) \cand \vec x = \vec a ) \implies \mathbf f (\vec x) = f(\vec a)
539
%			\]
540
%			whence we arrive at \eqref{eqn:spec-implies-program}.
541
%			
542
%			Finally, notice that $\Phi(f)$ has \emph{some} model, since it is a monotone inductive definition so some fixed point must exist. Therefore we obtain \eqref{eqn:program-satisfies-spec} as well.
543
%			\end{proof}
544
%			
545
%			\anupam{rephrase above proof to make more sense.}
546
%			
547
%%
513 548
%\newcommand{\concat}{\mathit{concat}}
514 549
%\paragraph{Some points on concatenation \anupam{if necessary}}
515 550
%We can define the concatenation operation by PRN:
CSL16/arithmetic.tex (revision 90)
306 306
\begin{proposition}
307 307
	\label{prop:eq-spec-model}
308 308
%	For every equational specification $\eqspec$, its universal closure has a model.
309
The universal closure of any coherent ES $\eqspec$ has a model satisfying $\basic + \ind$.
309
The universal closure of any coherent ES $\eqspec$ has a model satisfying $\basic \cup \ind$.
310 310
\end{proposition}
311 311

  
312 312
\begin{proof}
313 313
%\todo{ take $\Word \cup \{\bot\}$ or use completeness? Omit if no time. }
314 314
Consider the standard model $\Word $ extended by an element $\infty$ with $\succ_0 \infty = \succ_1 \infty = \infty$. Setting $\word = \Word$ means this model satisfies $\basic$. Now, for each function symbol $f$, define $f(\sigma) = \tau$ for every $\sigma, \tau \in \Word$ for which this equation is forced by $\eqspec$. Otherwise define $f(\sigma) = f(\infty) = \infty$.
315
\todo{replace with argument using completeness.}
315 316
\end{proof}
316 317

  
317 318
	One issue is that a convergence statement contains universal quantifiers, which is problematic for the extraction of functions by the witness function method later on.

Formats disponibles : Unified diff