| 1 |
1 |
\section{Witness function method}
|
| 2 |
2 |
\label{sect:wfm}
|
| 3 |
3 |
We now prove the converse to the last section: any provably convergent function in $\arith$ is polynomial-time computable.
|
| 4 |
|
To this end we use the so-called \emph{witness function method} (WFM), a common technique in {bounded arithmetic}.
|
| 5 |
|
Usually, the idea is to rely on free-cut elimination to control the quantifer complexity of formulae occurring in a proof.
|
| 6 |
|
Here we furthermore rely on free-cut elimination to control the use of contraction in a proof, to which we have access via the modalities of linear logic.
|
|
4 |
To this end we use the \emph{witness function method} (WFM), a common technique in {bounded arithmetic} \cite{Buss86book}.
|
| 7 |
5 |
|
| 8 |
|
The WFM differs from realisability and Dialectica style witnessing arguments mainly since it does not require functionals at higher type. Instead a translation is conducted directly from a proof in De Morgan normal form, i.e.\ with negation pushed to the atoms, relying crucially on classical logic. 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.
|
|
6 |
The WFM differs from realisability and Dialectica style witnessing arguments mainly since it does not require functionals at higher type. Instead a translation is conducted directly from a proof in De Morgan normal form, i.e.\ with negation pushed to the atoms, relying on classical logic.
|
|
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 |
%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 evaluate 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 $\lambda$-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}
|
| ... | ... | |
| 35 |
35 |
|
| 36 |
36 |
\subsection{The translation}
|
| 37 |
37 |
|
| 38 |
|
We will associate to each (free-cut free) proof of a convergence statement in $\arith$ a function on $\Word$ defined by a BC program. In the next section we will show that this function satisfies the equational specification of the convergence statement, hence showing that any provably convergent function of $\arith$ is polynomial-time computable.
|
|
38 |
We will associate to each (free-cut free) proof of a convergence statement in $\arith$ a function on $\Word$ defined by a BC program. In the next section we will show that this function satisfies the equational specification of the convergence statement, hence showing that any provably convergent function of $\arith$ is polynomial-time computable.\footnote{Strictly speaking, we will also require the equational specification at hand to be coherent, cf.\ Prop.~\ref{prop:eq-spec-model}.}
|
| 39 |
39 |
|
| 40 |
40 |
\begin{definition}
|
| 41 |
41 |
[Typing]
|
| 42 |
|
To each $\sigone$-formula $A$ we associate a sorted tuple of variables $\type (A)$, intended to range over $\Word$, as follows:
|
|
42 |
To each $(\forall, ?)$-free $\word^+$-formula $A$ we associate a sorted tuple of variables $\type (A)$, intended to range over $\Word$, as follows:
|
| 43 |
43 |
\[
|
| 44 |
44 |
\begin{array}{rcll}
|
| 45 |
|
\type (\nat (t)) & := & (;x^{\nat (t)} ) & \\
|
|
45 |
\type (\word (t)) & := & (;x^{\word (t)} ) & \\
|
| 46 |
46 |
\type(s = t) & := & ( ; x^{s = t}) & \\
|
| 47 |
|
\type (A \lor B) & : = & (\vec u , \vec v ; \vec x , \vec y) & \text{if $\type(A) = (\vec u ; \vec x)$ and $\type(B) = (\vec v ; \vec y)$.} \\
|
| 48 |
|
\type (A \land B) & : = & (\vec u , \vec v ; \vec x , \vec y) & \text{if $\type(A) = (\vec u ; \vec x)$ and $\type(B) = (\vec v ; \vec y)$.} \\
|
|
47 |
\type (s \neq t) & := & ( ;x^{s\neq t} )\\
|
|
48 |
% \type (A \lor B) & : = & (\vec u , \vec v ; \vec x , \vec y) & \text{if $\type(A) = (\vec u ; \vec x)$ and $\type(B) = (\vec v ; \vec y)$.} \\
|
|
49 |
\type (A \star B) & : = & (\vec u , \vec v ; \vec x , \vec y) & \text{if $\type(A) = (\vec u ; \vec x)$, $\type(B) = (\vec v ; \vec y)$ and $\star \in \{ \lor, \land, \laor, \laand \}$.} \\
|
| 49 |
50 |
\type (! A) & : = & ( \vec u ,\vec x ; ) & \text{if $\type(A) = (\vec u ; \vec x )$.} \\
|
| 50 |
|
\type (\exists x^\nat . A) & := & (\vec u ; \vec x , y) & \text{if $\type (A) = (\vec u ; \vec x)$.}
|
|
51 |
\type (\exists x^\word . A) & := & (\vec u ; \vec x , y) & \text{if $\type (A) = (\vec u ; \vec x)$.}
|
| 51 |
52 |
% \type (\forall x^N . A) & := & \Nat \to \type(A)
|
| 52 |
53 |
\end{array}
|
| 53 |
54 |
\]
|
| 54 |
|
For a sorted tuple $(\vec u ; \vec x)$ we write $|(\vec u ; \vec x)|$ to denote its length, i.e.\ $|\vec u| + |\vec x|$.
|
|
55 |
For a sorted tuple $(u_1 , \dots u_m ; x_1 , \dots ,x_n )$ we write $|(\vec u ; \vec x)|$ to denote its length, i.e.\ $m+n$.
|
| 55 |
56 |
% where $\nu$ designates that the inputs are normal.
|
| 56 |
57 |
\end{definition}
|
| 57 |
58 |
|
| ... | ... | |
| 65 |
66 |
% On the other hand, since we are working in affine logic, we do in general have $!(A \land B) \cong !A \land !B$.
|
| 66 |
67 |
% \end{remark}
|
| 67 |
68 |
|
| 68 |
|
This sorted tuple corresponds to the input variables, normal and safe, for the BC programs that we will define. It becomes important here that we are considering proofs of a convergence statement, since a free-cut free $\arith$-proof of a convergence statement cannot contain any $\lor$ symbols in the scope of a $!$. This could cause an issue in the above definition since we do not in general have the equivalence $!(A \lor B) \equiv !A \lor !B$. On the other hand, the equivalence $!(A\land B) \equiv !A \land !B$ follows since we are in the affine setting.
|
|
69 |
This sorted tuple corresponds to the input variables, normal and safe respectively, for the BC programs that we will define.
|
|
70 |
% \footnote{It becomes important here that we are considering proofs of a convergence statement, since a free-cut free $\arith$-proof of a convergence statement cannot contain any $\lor$ symbols in the scope of a $!$. This could cause an issue in the above definition since we do not in general have the equivalence $!(A \lor B) \equiv !A \lor !B$. On the other hand, the equivalence $!(A\land B) \equiv !A \land !B$ follows since we are in the affine setting.}
|
| 69 |
71 |
|
| 70 |
72 |
|
| 71 |
|
Let us fix a particular 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}.
|
|
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}.
|
| 72 |
74 |
|
| 73 |
75 |
Our crucial use of free-cut elimination is in the following result, which yields strong regularity properties:
|
| 74 |
76 |
|
| 75 |
77 |
\begin{proposition}
|
| 76 |
78 |
[Freedom]
|
| 77 |
|
A free-cut free $\closure{\eqspec} \cup \arith $ sequent proof of $\word (\vec x) \seqar \word (f (\vec x) )$ is:
|
|
79 |
\label{prop:freedom}
|
|
80 |
A free-cut free $\closure{\eqspec} \cup \arith $ sequent proof of $!\word (\vec x) \seqar \word (f (\vec x) )$ is:
|
| 78 |
81 |
\begin{enumerate}
|
| 79 |
|
\item Free of any negation symbols.
|
| 80 |
|
\item Free of any $\forall$ symbols.
|
| 81 |
|
\item Free of any $?$ symbols.
|
|
82 |
\item\label{item:no-neg-word} Free of any negative occurrences of $\word$.
|
|
83 |
\item\label{item:no-forall} Free of any $\forall$ symbols.
|
|
84 |
\item\label{item:no-quest} Free of any $?$ symbols.
|
|
85 |
\item\label{item:no-laor-step} Free of any $\laor$ or $\laand$ steps.\footnote{Because of the $\surj$ rule, the proof may still contain $\laor$ symbols, but these must be direct ancestors of some cut-step by free-cut freeness.}
|
| 82 |
86 |
\end{enumerate}
|
| 83 |
87 |
\end{proposition}
|
| 84 |
88 |
|
| ... | ... | |
| 87 |
91 |
|
| 88 |
92 |
\begin{definition}
|
| 89 |
93 |
[Translation]
|
| 90 |
|
We give a translation from a free-cut free $\closure{\eqspec}$ proof $\pi$, containing no $\bot,?,\forall$ symbols, of a sequent $\Gamma \seqar \Delta$, to BC programs for a vector of functions $\vec f^\pi$ with argument of type $\type \left(\bigotimes\Gamma\right)$ such that $|\vec f^\pi | = | \type\left(\bigparr\Delta\right)|$.
|
|
94 |
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)|$.
|
| 91 |
95 |
|
| 92 |
96 |
|
| 93 |
|
The translation is by induction on the size of a free-cut free proof, so we proceed by analysis of the final step of a proof.
|
|
97 |
The translation is by induction on the size of $\pi$, so we proceed by inspection of its final step.
|
| 94 |
98 |
|
| 95 |
|
First we consider the base cases. 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 equality can be seen to carry no computational content.}
|
|
99 |
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.}
|
| 96 |
100 |
The other initial steps of $\arith$ are translated as follows:
|
| 97 |
101 |
\[
|
| 98 |
102 |
\begin{array}{ccc}
|
| ... | ... | |
| 137 |
141 |
( \id (;x) , \id (;x) )
|
| 138 |
142 |
\end{array}
|
| 139 |
143 |
\]
|
| 140 |
|
Finally an $\closure{\eqspec}$ initial step is also translated simply to $\epsilon$.
|
|
144 |
If $\pi$ is an $\closure{\eqspec}$ initial step it is also translated simply to $\epsilon$.
|
|
145 |
|
|
146 |
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.
|
| 141 |
147 |
|
| 142 |
148 |
|
| 143 |
149 |
|
| ... | ... | |
| 173 |
179 |
If $\pi$ consists of a subproof $\pi'$ ending with a $\lefrul{\land}$ or $\rigrul{\lor}$-step, then $\vec f^\pi$ is exactly $\vec f^{\pi'}$.
|
| 174 |
180 |
|
| 175 |
181 |
|
| 176 |
|
By assumption, there are no $\bot$, $?$ or $\forall$ steps occurring in $\pi$.
|
|
182 |
By assumption, there are no $\laor$, $\laand$, $?$ or $\forall$ steps occurring in $\pi$.
|
| 177 |
183 |
|
| 178 |
184 |
|
| 179 |
185 |
Suppose $\pi$ ends with a $\rigrul{\exists}$ step,
|
| ... | ... | |
| 320 |
326 |
|
| 321 |
327 |
|
| 322 |
328 |
|
| 323 |
|
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.
|
|
329 |
In the other case, where $A$ may be modal, it must be of the form $!\nat (t)$ since it must directly descend from the left-hand side of an induction step, by free-cut freeness.
|
| 324 |
330 |
% 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)$.
|
| 325 |
|
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:
|
|
331 |
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:
|
| 326 |
332 |
|
| 327 |
333 |
% \anupam{need to check this assumption against free-cut elimination conditions. To discuss.}
|
| 328 |
334 |
|
| 329 |
335 |
\[
|
| 330 |
336 |
\vlderivation{
|
| 331 |
|
\vliin{\cut}{}{!\Gamma , !\Sigma , A(\epsilon) \seqar A(t) }{
|
|
337 |
\vliin{\cut}{}{!\Gamma , \Sigma \seqar \Delta }{
|
| 332 |
338 |
\vlin{\rigrul{!}}{}{!\Gamma \seqar !\nat(t)}{
|
| 333 |
339 |
\vltr{\pi_1'}{!\Gamma \seqar \nat(t)}{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
|
| 334 |
340 |
}
|
| 335 |
341 |
}{
|
| 336 |
|
\vltr{\pi_2}{ !\Sigma, !\nat(t) , A(\epsilon)\seqar A(t) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
|
|
342 |
\vltr{\pi_2}{ !\nat(t), \Sigma\seqar \Delta}{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
|
| 337 |
343 |
}
|
| 338 |
344 |
}
|
| 339 |
345 |
\]
|
| 340 |
|
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:
|
|
346 |
where
|
|
347 |
% $\pi_2$ ends with a $\ind$ step for which $A(x)$ is the induction formula, and
|
|
348 |
we assume there are no side-formulae on the right of the end-sequent of $\pi_1$ 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 ( v , \vec w ; \vec x)$ from $\pi_1'$ and $\pi_2$ respectively, where $\vec u$, $ v$ and $(\vec w ; \vec x)$ correspond to $!\Gamma$, $!\nat(t)$ and $\Sigma$ respectively. We construct the functions $\vec f^\pi $ as follows:
|
| 341 |
349 |
\[
|
| 342 |
|
\vec f^\pi (\vec u , \vec v ; \vec x)
|
|
350 |
\vec f^\pi (\vec u , \vec w ; \vec x)
|
| 343 |
351 |
\quad := \quad
|
| 344 |
|
\vec h ( \vec v , g(\vec u ; ) ; \vec x)
|
|
352 |
\vec h ( g(\vec u ; ), \vec w ; \vec x)
|
| 345 |
353 |
\]
|
| 346 |
354 |
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}.
|
| 347 |
355 |
|
| ... | ... | |
| 374 |
382 |
%
|
| 375 |
383 |
|
| 376 |
384 |
|
| 377 |
|
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:
|
|
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:
|
| 378 |
386 |
\[
|
| 379 |
387 |
\vlderivation{
|
| 380 |
388 |
\vliin{\pind}{}{ !\nat (t), !\Gamma , A(\epsilon) \seqar A(t) }{
|