| 1 |
1 |
\section{Witness function method}
|
| 2 |
2 |
\label{sect:wfm}
|
| 3 |
|
We now prove the converse to the last section: any provably convergent function in $\arith$ is polynomial-time computable
|
|
3 |
We now prove the converse to the last section: any provably convergent function in $\arith$ is polynomial-time computable,
|
| 4 |
4 |
%.
|
| 5 |
5 |
%To this end we use the \emph{witness function method} (WFM), a common technique in {bounded arithmetic} \cite{Buss86book}.
|
| 6 |
6 |
using the witness function method (WFM) \cite{Buss86book}.
|
| ... | ... | |
| 9 |
9 |
%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. This
|
| 10 |
10 |
%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.
|
| 11 |
11 |
|
| 12 |
|
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 free-cut free 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 \cite{Buss86book}) or combinatory terms (as in applicative theories \cite{Cantini02}), so we cannot in general decide atomic formulae.
|
|
12 |
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 free-cut free 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 are 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 \cite{Buss86book}) or combinatory terms (as in applicative theories \cite{Cantini02}), so we cannot in general decide atomic formulae.
|
| 13 |
13 |
|
| 14 |
14 |
%Some key features of this method are the following:
|
| 15 |
15 |
%\begin{itemize}
|
| ... | ... | |
| 114 |
114 |
|
| 115 |
115 |
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}.
|
| 116 |
116 |
%
|
| 117 |
|
Free-cut elimination crucially yields strong regularity properties:
|
|
117 |
Free-cut elimination crucially yields strong regularity properties for proofs:
|
| 118 |
118 |
|
| 119 |
119 |
\begin{proposition}
|
| 120 |
120 |
[Freedom]
|
| ... | ... | |
| 137 |
137 |
We give a translation from a free-cut free $\closure{\eqspec} \cup \arith $ proof $\pi$, 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} above, of a sequent $\Gamma \seqar \Delta$ to BC programs for a tuple of functions $\vec f^\pi$ with arguments $\type \left(\bigotimes\Gamma\right)$ such that $|\vec f^\pi | = | \type\left(\bigparr\Delta\right)|$.
|
| 138 |
138 |
|
| 139 |
139 |
|
| 140 |
|
The translation is by induction on the size of $\pi$, so we proceed by inspection of its final step.
|
|
140 |
The translation is by induction on the structure of $\pi$, so we proceed by inspection of its final step.
|
| 141 |
141 |
|
| 142 |
|
If $\pi$ is an instance of the initial rules $\geneps, \sepeps^0 , \sepeps^1, \sepzer, \sepone$ or $\inj$ then $\vec f^\pi$ is simply the constant function $\epsilon$ (possibly with dummy inputs as required by $\type$).\footnote{This is because proofs of (in)equalities can be seen to carry no computational content.}
|
|
142 |
If $\pi$ is an instance of the initial rules $\geneps, \sepeps^0 , \sepeps^1, \sepzer, \sepone$ or $\inj$ then $\vec f^\pi$ is simply the constant function $\epsilon$ (possibly with dummy inputs as required by $\type$).
|
|
143 |
% \footnote{This is because proofs of (in)equalities can be seen to carry no computational content.}
|
| 143 |
144 |
If $\pi$ is an $\closure{\eqspec}$ or $=$ initial step it is also translated simply to $\epsilon$.
|
| 144 |
|
|
|
145 |
%
|
| 145 |
146 |
The initial steps $\genzer, \genone , \surj$ and $\wordcntr$ are translated to $\succ_0( ; x) , \succ_1 (; x), ( \epsilon , \pred ( ;x) , \pred (; x) )$ and $(\id (;x) , \id(;x))$ respectively.
|
| 146 |
|
|
|
147 |
%
|
| 147 |
148 |
Finally, suppose $\pi$ is a logical initial step. If $\pi $ is an instance of $\id$, i.e.\ $p \seqar p$, then we translate it to $\id$. Notice that, if $\pi$ is an instance of $\lefrul{\bot}$ (i.e.\ $p, p^\bot \seqar $ ) or $\rigrul{\bot}$ (i.e.\ $\seqar p, p^\bot$) then $p$ must be an equality $s=t$ for some terms $s,t$, since $p$ must be atomic and, by assumption, $\word$ does not occur negatively. Therefore $\pi$ is translated to tuples of $\epsilon$ as appropriate.
|
| 148 |
149 |
|
| 149 |
150 |
|
| ... | ... | |
| 259 |
260 |
|
| 260 |
261 |
If $\pi$ ends with a $\cut$ step whose cut-formula is free of modalities, then it can be directly translated to a safe composition of functions obtained by the inductive hypothesis, by relying on Prop.~\ref{prop:bc-properties}. Otherwise, the cut-formula must be of the form $!\word (t)$ since it must directly descend from the left-hand side of an induction step, by free-cut freeness.
|
| 261 |
262 |
% 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 $!\word (t)$.
|
| 262 |
|
Since the cut is anchored, we can also assume that the cut formula is principal on the other side, i.e.\ $\pi$ is of the form:
|
|
263 |
Since the cut is anchored, we can also assume that the cut formula is principal on the other side, i.e.\ $\pi$ ends as follows:
|
| 263 |
264 |
% \anupam{need to check this assumption against free-cut elimination conditions. To discuss.}
|
| 264 |
265 |
\[
|
| 265 |
266 |
\vlderivation{
|
| ... | ... | |
| 313 |
314 |
%
|
| 314 |
315 |
|
| 315 |
316 |
|
| 316 |
|
Finally, suppose $\pi$ ends with a $\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:
|
|
317 |
Finally, suppose $\pi$ ends with a $\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$ ends as follows:
|
| 317 |
318 |
\[
|
| 318 |
319 |
\vlderivation{
|
| 319 |
320 |
\vliin{\ind}{}{ !\word (t), !\Gamma , A(\epsilon) \seqar A(t) }{
|
| ... | ... | |
| 329 |
330 |
|
| 330 |
331 |
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 $!\word(a)$, $!\Gamma$ and $A(a)$ respectively. We define $\vec f^\pi$ by simultaneous predicative recursion on notation as follows:
|
| 331 |
332 |
\[
|
| 332 |
|
%\begin{array}{rcll}
|
| 333 |
|
%\vec f^\pi ( \epsilon, \vec v ; \vec x ) & := & \vec x & \\
|
| 334 |
|
%\vec f^\pi ( \succ_i u , \vec v ; \vec x) & := & \vec g^i ( u, \vec v ; \vec f^\pi ( u, \vec v ; \vec x ) )
|
| 335 |
|
%\end{array}
|
| 336 |
|
\vec f^\pi ( \epsilon, \vec v ; \vec x ) := \vec x \qquad
|
| 337 |
|
\vec f^\pi ( \succ_i u , \vec v ; \vec x) := \vec g^i ( u, \vec v ; \vec f^\pi ( u, \vec v ; \vec x ) )
|
|
333 |
\begin{array}{rcll}
|
|
334 |
\vec f^\pi ( \epsilon, \vec v ; \vec x ) & := & \vec x & \\
|
|
335 |
\vec f^\pi ( \succ_i u , \vec v ; \vec x) & := & \vec g^i ( u, \vec v ; \vec f^\pi ( u, \vec v ; \vec x ) )
|
|
336 |
\end{array}
|
|
337 |
%\vec f^\pi ( \epsilon, \vec v ; \vec x ) := \vec x \qquad
|
|
338 |
%\vec f^\pi ( \succ_i u , \vec v ; \vec x) := \vec g^i ( u, \vec v ; \vec f^\pi ( u, \vec v ; \vec x ) )
|
| 338 |
339 |
\]
|
| 339 |
340 |
|
| 340 |
341 |
%\anupam{check this}
|
| ... | ... | |
| 352 |
353 |
|
| 353 |
354 |
%\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.}
|
| 354 |
355 |
|
| 355 |
|
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.\footnote{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.}
|
|
356 |
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 \emph{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.
|
|
357 |
|
|
358 |
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 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.
|
| 356 |
359 |
%, the complexity properties already handled by the BC programs we just constructed.
|
| 357 |
360 |
|
| 358 |
361 |
|
| ... | ... | |
| 463 |
466 |
|
| 464 |
467 |
\begin{lemma}
|
| 465 |
468 |
\label{lemma:witness-invariant}
|
| 466 |
|
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 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:
|
|
469 |
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 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:
|
| 467 |
470 |
\[
|
| 468 |
471 |
\left(\forall \eqspec \cand \forall \eqspec^\pi \cand \witness{}{\bigotimes \Gamma} (\vec a)\right) \cimp \witness{}{\bigparr \Delta } (\vec f^\pi(\vec a))
|
| 469 |
472 |
\]
|
| ... | ... | |
| 495 |
498 |
|
| 496 |
499 |
\begin{theorem}
|
| 497 |
500 |
\label{thm:main-result}
|
| 498 |
|
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 ]$.
|
|
501 |
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$) satisfying $\eqspec [ g/ f ]$.
|
| 499 |
502 |
|
| 500 |
503 |
% 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:
|
| 501 |
504 |
% \begin{equation}
|