Statistiques
| Révision :

root / CSL17 / tech-report / arithmetic.tex @ 261

Historique | Voir | Annoter | Télécharger (27,28 ko)

1 251 adas
\section{An arithmetic for the polynomial hierarchy}\label{sect:arithmetic}
2 251 adas
%Our base language is $\{ 0, \succ{} , + , \times, \smsh , |\cdot| , \leq \}$.
3 251 adas
Our base language consists of constant and function symbols $\{ 0, \succ{} , + , \times, \smsh , |\cdot|, \hlf{}.\}$ and predicate symbols
4 251 adas
 $\{\leq, \safe, \normal \}$. The function symbols are interpreted in the intuitive way, with $|x|$ denoting the length of $x$ seen as a binary string, and $x\smsh y$ denoting $2^{|x||y|}$, so a string of length $|x||y|+1$.
5 251 adas
 We may write $\succ{0}(x)$ for $2\cdot x$, $\succ{1}(x)$ for $\succ{}(2\cdot x)$, and $\pred (x)$ for $\hlf{x}$, to better relate to the $\bc$ setting.
6 251 adas
7 251 adas
We consider formulas of classical first-order logic, over $\neg$, $\cand$, $\cor$, $\forall$, $\exists$, along with usual shorthands and abbreviations.
8 251 adas
%The formula $A \cimp B$ will be a notation for $\neg A \cor B$.
9 251 adas
%We will also use as shorthand notations:
10 251 adas
%$$ (s=t) = (s\leq t) \cand (t\leq s), \quad (s\neq t) = \neg(s=t).$$
11 251 adas
\textit{Atomic formulas} formulas are of the form $s\leq t$, for terms $s,t$.
12 251 adas
 We will assume, without loss of generality, that formulas are in \textit{De Morgan normal form}, that is to say that in formulas negation can only occur on atomic formulas, and that there is not any occurrence of a subformula of the form $\neg \neg A$.
13 251 adas
14 251 adas
15 251 adas
 We write $\exists x^{N_i} . A$ or $\forall x^{N_i} . A$ for $\exists x . (N_i (x) \cand A)$ and $\forall x . (N_i (x) \cimp A)$ respectively. We refer to  $\exists x^{N_0}$,  $\forall x^{N_0}$ as \emph{safe} quantifiers.
16 251 adas
 We also write $\exists x^\normal \leq |t| . A$ for $\exists x^\normal . ( x \leq |t| \cand A )$ and $\forall x^\normal \leq |t|. A $ for $\forall x^\normal. (x \leq |t| \cimp A )$. We refer to these as \emph{sharply bounded} quantifiers, as in bounded arithmetic.
17 251 adas
18 251 adas
19 251 adas
The theories we introduce are directly inspired from bounded arithmetic, namely the theories $S^i_2$.
20 251 adas
We include a similar set of axioms for direct comparison, although in our setting these are not minimal.
21 251 adas
Indeed, $\#$ can be defined using induction in our setting.
22 251 adas
23 251 adas
The $\basic$ axioms of bounded arithmetic give the inductive definitions and interrelationships of the various function and predicate symbols.
24 251 adas
It also states fundamental algebraic properties, e.g.\ $(0,\succ{ } )$ is a free algebra, and, for us, it will also give us certain `typing' information for our function symbols based on their $\bc$ specification, with safe inputs ranging over $\safe$ and normal ones over $\normal$.
25 251 adas
26 261 adas
27 261 adas
Namely, in addition to usual axioms, our $\basic$ includes the following:\footnote{Later some of these will be redundant, for instance $\safe (u \times x) $ and $\safe (u \smsh v)$ are consequences of $\Sigma^\safe_i$-$\pind$, but $\safe (x + y)$ is not since both inputs are safe and so we cannot induct.}
28 261 adas
\begin{enumerate}[(a)]
29 261 adas
	\item $\forall u^\normal. \safe(u) $
30 261 adas
	\item $\safe (0) $
31 261 adas
	\item $\forall x^\safe . \safe (\succ{} x) $
32 261 adas
	\item $\forall u^\safe .\safe(\hlf{u})$
33 261 adas
	\item $\forall x^\safe, y^\safe . \safe(x+y)$
34 261 adas
	\item $\forall u^\normal, x^\safe . \safe(u\times x) $
35 261 adas
	\item $\forall u^\normal , v^\normal . \safe (u \smsh v)$
36 261 adas
	\item $\forall u^\normal .\safe(|x|)$
37 261 adas
\end{enumerate}
38 261 adas
%\[
39 261 adas
%\begin{array}{l}
40 261 adas
%\forall u^\normal. \safe(u) \\
41 261 adas
%\safe (0) \\
42 261 adas
%\forall x^\safe . \safe (\succ{} x) \\
43 261 adas
%\forall u^\safe .\safe(\hlf{u})
44 261 adas
%\end{array}
45 261 adas
%\qquad
46 261 adas
%\begin{array}{l}
47 261 adas
%\forall x^\safe, y^\safe . \safe(x+y)\\
48 261 adas
%\forall u^\normal, x^\safe . \safe(u\times x) \\
49 261 adas
%\forall u^\normal , v^\normal . \safe (u \smsh v)\\
50 261 adas
%\forall u^\normal .\safe(|x|)
51 261 adas
%\end{array}
52 261 adas
%\]
53 261 adas
Notice in particular that we have $\normal \subseteq \safe$.
54 261 adas
%
55 254 adas
Apart from these, the remaining $\basic$ axioms mimic those of Buss in \cite{Buss86book}:
56 261 adas
\begin{enumerate}[(1)]
57 261 adas
	\item $\forall x^{\safe}, y^{\safe}.  (y\leq x\cimp  y \leq \succ{} x) $
58 261 adas
	\item $\forall x^{\safe}. x \neq \succ{} x$
59 261 adas
	\item $\forall x^{\safe}.0 \leq x$
60 261 adas
	\item $\forall x^{\safe}, y^{\safe}. ((x\leq y \cand x \neq y) \ciff \succ{} x \leq y) $
61 261 adas
	\item $\forall x^{\safe}. (x\neq 0 \cimp \succ{0}x \neq 0)$
62 261 adas
	\item $\forall x^{\safe}, y^{\safe}. (y\leq x \cor x \leq y)$
63 261 adas
	\item $\forall x^{\safe}, y^{\safe}. ((x\leq y \cand y\leq x )\cimp x=y)$
64 261 adas
	\item $\forall x^{\safe}, y^{\safe}, z^{\safe}. ((x\leq y \cand y\leq z) \cimp x\leq z)$
65 261 adas
	\item $|0|=0$
66 261 adas
	\item $\forall x^{\safe}, y^{\safe}.( x\neq 0 \cimp  (|\succ{0}x|=\succ{}( |x|) \cand |\succ{1}x|= \succ{}(|x|))) $
67 261 adas
	\item $|\succ{}0|=\succ{} 0$
68 261 adas
	\item $\forall x^{\safe}, y^{\safe}.   (x\leq y \cimp   |x|\leq  |y|)$
69 261 adas
	\item $\forall x^{\normal}, y^{\normal}.    |x\smsh y|=\succ{}( |x|\cdot  |y|)$
70 261 adas
	\item $\forall y^{\normal}.    0 \smsh y=\succ{} 0$
71 261 adas
	\item $\forall x^{\normal}.    (x\neq 0 \cimp (1 \smsh(\succ{0}x)=\succ{0}(1\smsh x) \cand 1 \smsh(\succ{1}x)=\succ{0}(1\smsh x)))$
72 261 adas
	\item $\forall x^{\normal}, y^{\normal}.    x \smsh y = y \smsh x$
73 261 adas
	\item $\forall x^{\normal}, y^{\normal}, z^{\normal}. (   |x|= |y| \cimp x\smsh z = y\smsh z)$
74 261 adas
	\item $\forall x^{\normal}, u^{\normal}, v^{\normal}, y^{\normal}.      (|x|= |u|+  |v| \cimp x\smsh y=(u\smsh y)\cdot (v\smsh y))$
75 261 adas
	\item $\forall x^{\safe}, y^{\safe}.      x\leq x+y$
76 261 adas
	\item $\forall x^{\safe}, y^{\safe}.    (  ( x\leq y \cand x\neq y) \cimp( \succ{}(\succ{0}x) \leq \succ{0}y \cand  \succ{}(\succ{0}x) \neq \succ{0}y))$
77 261 adas
	\item $\forall x^{\safe}, y^{\safe}.     x+y=y+x$
78 261 adas
	\item $\forall x^{\safe}.       x+0=x$
79 261 adas
	\item $\forall x^{\safe}, y^{\safe}.       x+\succ{}y=\succ{}(x+y)$
80 261 adas
	\item $\forall x^{\safe}, y^{\safe}, z^{\safe}.      (x+y)+z=x+(y+z)$
81 261 adas
	\item $\forall x^{\safe}, y^{\safe}, z^{\safe}. (    x+y \leq x+z \ciff y\leq z)$
82 261 adas
	\item $\forall x^{\safe}       0\cdot x =0$
83 261 adas
	\item $\forall x^{\safe}, y^{\normal}.  x\cdot(\succ{}y)=(x\cdot y)+x$
84 261 adas
	\item $\forall x^{\normal}, y^{\normal}. x\cdot y=y\cdot x$
85 261 adas
	\item $\forall x^{\normal}, y^{\safe}, z^{\safe}.  x\cdot(y+z)=(x\cdot y)+(x\cdot z)$
86 261 adas
	\item $\forall x^{\normal}, y^{\safe}, z^{\safe}.      (x\geq \succ{} 0 \cimp (x\cdot y \leq x\cdot z \ciff y\leq z))$
87 261 adas
	\item $\forall x^{\normal}  .     (x\neq 0 \cimp  |x|=\succ{}(\hlf{x}))$
88 261 adas
	\item $\forall x^{\safe}, y^{\safe}.   (  x= \hlf{y} \ciff (\succ{0}x=y \cor \succ{}(\succ{0}x)=y))$
89 261 adas
\end{enumerate}
90 254 adas
91 254 adas
92 261 adas
%$$
93 261 adas
%%\begin{equation}
94 261 adas
%\begin{array}{l}
95 261 adas
%\forall x^{\safe}, y^{\safe}.  (y\leq x\cimp  y \leq \succ{} x) \\
96 261 adas
%\forall x^{\safe}. x \neq \succ{} x\\
97 261 adas
%\forall x^{\safe}.0 \leq x\\
98 261 adas
%\forall x^{\safe}, y^{\safe}. ((x\leq y \cand x \neq y) \ciff \succ{} x \leq y) \\
99 261 adas
%\forall x^{\safe}. (x\neq 0 \cimp \succ{0}x \neq 0)\\
100 261 adas
%\forall x^{\safe}, y^{\safe}. (y\leq x \cor x \leq y)\\
101 261 adas
%\forall x^{\safe}, y^{\safe}. ((x\leq y \cand y\leq x )\cimp x=y)\\
102 261 adas
%\forall x^{\safe}, y^{\safe}, z^{\safe}. ((x\leq y \cand y\leq z) \cimp x\leq z)\\
103 261 adas
%|0|=0\\
104 261 adas
%\forall x^{\safe}, y^{\safe}.( x\neq 0 \cimp  (|\succ{0}x|=\succ{}( |x|) \cand |\succ{1}x|= \succ{}(|x|))) \\
105 261 adas
%|\succ{}0|=\succ{} 0\\
106 261 adas
%\forall x^{\safe}, y^{\safe}.   (x\leq y \cimp   |x|\leq  |y|)\\
107 261 adas
%\forall x^{\normal}, y^{\normal}.    |x\smsh y|=\succ{}( |x|\cdot  |y|)\\
108 261 adas
%\forall y^{\normal}.    0 \smsh y=\succ{} 0\\
109 261 adas
%\forall x^{\normal}.    (x\neq 0 \cimp (1 \smsh(\succ{0}x)=\succ{0}(1\smsh x) \cand 1 \smsh(\succ{1}x)=\succ{0}(1\smsh x)))\\
110 261 adas
%\forall x^{\normal}, y^{\normal}.    x \smsh y = y \smsh x\\
111 261 adas
%\forall x^{\normal}, y^{\normal}, z^{\normal}. (   |x|= |y| \cimp x\smsh z = y\smsh z)\\
112 261 adas
%\forall x^{\normal}, u^{\normal}, v^{\normal}, y^{\normal}.      (|x|= |u|+  |v| \cimp x\smsh y=(u\smsh y)\cdot (v\smsh y))\\
113 261 adas
%\forall x^{\safe}, y^{\safe}.      x\leq x+y\\
114 261 adas
%\forall x^{\safe}, y^{\safe}.    (  ( x\leq y \cand x\neq y) \cimp( \succ{}(\succ{0}x) \leq \succ{0}y \cand  \succ{}(\succ{0}x) \neq \succ{0}y))\\
115 261 adas
%\forall x^{\safe}, y^{\safe}.     x+y=y+x\\
116 261 adas
%\forall x^{\safe}.       x+0=x\\
117 261 adas
%\forall x^{\safe}, y^{\safe}.       x+\succ{}y=\succ{}(x+y)\\
118 261 adas
%\forall x^{\safe}, y^{\safe}, z^{\safe}.      (x+y)+z=x+(y+z)\\
119 261 adas
%\forall x^{\safe}, y^{\safe}, z^{\safe}. (    x+y \leq x+z \ciff y\leq z)\\
120 261 adas
%\forall x^{\safe}       0\cdot x =0\\
121 261 adas
%\forall x^{\safe}, y^{\normal}.  x\cdot(\succ{}y)=(x\cdot y)+x\\
122 261 adas
%%\text{\anupam{check above normal/safe! Pretty sure should be other way around.}}\\
123 261 adas
%\forall x^{\normal}, y^{\normal}. x\cdot y=y\cdot x\\
124 261 adas
%\forall x^{\normal}, y^{\safe}, z^{\safe}.  x\cdot(y+z)=(x\cdot y)+(x\cdot z)\\
125 261 adas
%\forall x^{\normal}, y^{\safe}, z^{\safe}.      (x\geq \succ{} 0 \cimp (x\cdot y \leq x\cdot z \ciff y\leq z))\\
126 261 adas
%\forall x^{\normal}  .     (x\neq 0 \cimp  |x|=\succ{}(\hlf{x}))\\
127 261 adas
%\forall x^{\safe}, y^{\safe}.   (  x= \hlf{y} \ciff (\succ{0}x=y \cor \succ{}(\succ{0}x)=y))
128 261 adas
%\end{array}
129 261 adas
%%\end{equation}
130 261 adas
%$$
131 261 adas
%
132 256 adas
133 256 adas
134 256 adas
135 256 adas
136 259 adas
137 256 adas
138 256 adas
139 251 adas
%\begin{definition}
140 251 adas
%	[Basic theory]
141 251 adas
%	The theory $\basic$ consists of the axioms from Appendix \ref{appendix:arithmetic}.
142 251 adas
%	\end{definition}
143 251 adas
144 251 adas
145 251 adas
%Notation: if $\vec t=t_0,\dots, t_k$, we will denote as $\safe(\vec t)$ the sequence of formulas $\safe(t_0),\dots, \safe(t_k)$. Similarly for $\normal(\vec t)$.
146 251 adas
147 251 adas
%\begin{definition}
148 251 adas
%[Derived functions and notations]
149 251 adas
%We write $1,2,3,\dots$ for the terms $\succ{} 0, \succ{} \succ{} 0, \succ{} \succ{} \succ{} 0 \dots$, and frequently omit the $\times$ symbol.
150 251 adas
%We define the functions $\succ 0 x , \succ 1 x$ as $2 x$ and $2x +1$ respectively.
151 251 adas
%
152 251 adas
%Need $bit$, $\beta$ , $\pair{}{}{}$.
153 251 adas
%\end{definition}
154 251 adas
%
155 251 adas
%(Here use a variation of S12 with sharply bounded quantifiers and safe quantifiers)
156 251 adas
%
157 251 adas
%Use base theory + sharply bounded quantifiers.
158 251 adas
159 261 adas
In addition to these axioms, our theories will contain forms of induction, defined below.
160 251 adas
161 251 adas
%\anupam{Collection principles for prenexing? Otherwise need to add closure under sharply bounded quantifiers.}
162 251 adas
163 251 adas
164 251 adas
\begin{definition}
165 251 adas
[Polynomial induction]
166 251 adas
\label{def:polynomialinduction}
167 251 adas
The \emph{polynomial induction} axiom schema, $\pind$, consists of the following axioms, for each formula $A(x)$:
168 251 adas
\[
169 251 adas
\left(
170 251 adas
A(0)
171 251 adas
\cand (\forall x^{\normal} . ( A(x) \cimp A(\succ{0} x) ) )
172 251 adas
\cand  (\forall x^{\normal} . ( A(x) \cimp A(\succ{1} x) ) )
173 251 adas
\right)
174 251 adas
\cimp  \forall x^{\normal} . A(x)
175 251 adas
\]
176 251 adas
For a class $\Xi$ of formulae, $\cax{\Xi}{\pind}$ denotes the set of $\pind$ axioms where $A(x) \in \Xi$.
177 251 adas
178 251 adas
%We write $I\Xi$ to denote the theory consisting of $\basic$ and $\cax{\Xi}{\ind}$.
179 251 adas
\end{definition}
180 251 adas
181 261 adas
We will introduce in fact a hierarchy of theories calibrated by the complexity of induction formulae, so we now introduce the appropriate quantifier hierarchy.
182 251 adas
183 261 adas
\begin{definition}
184 261 adas
	[Quantifier hierarchy]
185 261 adas
	$\Sigma^\safe_0 = \Pi^\safe_0 $ is the set of formulae whose only quantifiers are sharply bounded and where $\safe , \normal$ do not occur free.
186 261 adas
	We define $\Sigma^\safe_{i+1}$ as the closure of $\Pi^\safe_i $ under $\cor, \cand $, safe existentials and sharply bounded quantifiers.
187 261 adas
	We define $\Pi^\safe_{i+1}$ as the closure of $\Sigma^\safe_i $ under $\cor, \cand $, safe universals and sharply bounded quantifiers.
188 261 adas
\end{definition}
189 261 adas
190 261 adas
191 261 adas
Notice that the criterion that $\safe$ does not occur free is not a real restriction, since we can write $\safe (x)$ as $\exists y^\safe . y=x$.
192 261 adas
The criterion is purely to give an appropriate definition of the hierarchy above.
193 261 adas
194 261 adas
195 251 adas
\begin{definition}\label{def:ariththeory}
196 251 adas
Define the theory $\arith^i$ consisting of the $\basic$ axioms, $\cpind{\Sigma^\safe_i } $,
197 251 adas
%\begin{itemize}
198 251 adas
%	\item $\basic$;
199 251 adas
%	\item $\cpind{\Sigma^\safe_i } $:
200 251 adas
%\end{itemize}
201 251 adas
and a particular inference rule, called $\rais$, for closed formulas $\forall \vec x. \exists y. A$:
202 251 adas
\[
203 251 adas
 \dfrac{\proves \forall \vec x^\normal . \exists  y^\safe .  A }{ \proves \forall \vec x^\normal .\exists y^\normal . A}
204 251 adas
\]
205 251 adas
We will write $\arith^i \proves A$ if $A$ is a logical consequence of the axioms and rules of $\arith^i$, in the usual way.
206 251 adas
\end{definition}
207 251 adas
%\patrick{I think in the definition of  $\arith^i$ we should impose that the formulas considered are \textit{integer positive}, that is to say that the only negative occurrences of atoms $\safe(t)$, $\normal(t)$ are those occurring in $\forall^{\safe}$ and $\forall^{\normal}$.  Indeed I don't think this can be just proved to be a consequence of a kind of 'normal form' of proofs, as we had discussed (see sect 4.4)}
208 251 adas
%
209 251 adas
%\anupam{In induction,for inductive cases, need $u\neq 0$ for $\succ 0$ case.}
210 251 adas
211 251 adas
\begin{remark}
212 251 adas
Notice that $\rais$ looks similar to the $K$ rule from the calculus for the modal logic $S4$ (which subsumes necessitation), and indeed we believe there is a way to present these results in such a framework.
213 251 adas
However, the proof theory of first-order modal logics, in particular free-cut elimination results used for witnessing, is not sufficiently developed to carry out such an exposition.
214 251 adas
	\end{remark}
215 251 adas
216 251 adas
217 259 adas
\begin{example}
218 259 adas
	[Some basic theorems]
219 259 adas
	We give proofs of the following, that are sometimes included as basic axioms, in $\arith^1$:
220 259 adas
	\[
221 259 adas
	\begin{array}{l}
222 259 adas
	\forall x^\safe . 0 \neq \succ{} (x) \\
223 259 adas
	\forall x^\safe , y^\safe . (\succ{} x = \succ{} y \cimp x = y) \\
224 259 adas
	\forall x^\safe . (x = 0 \cor \exists y^\safe.\  x = \succ{} y   )  \\
225 259 adas
	\forall u^\normal ,x^\safe . u \succ{} x = u + ux
226 259 adas
	\end{array}
227 259 adas
	\]
228 259 adas
	\todo{Proof: Patrick? The final two should require PIND.}
229 259 adas
\end{example}
230 251 adas
231 261 adas
It is often useful for us to work with \emph{length-induction}, which is equivalent to polynomial induction and well known from bounded arithmetic:
232 261 adas
\begin{proposition}
233 261 adas
	[Length induction]
234 261 adas
	The axiom schema of formulae,
235 261 adas
	\begin{equation}
236 261 adas
	\label{eqn:lind}
237 261 adas
	( A(0) \cand \forall x^\normal . (A(x) \cimp A(\succ{} x)) ) \cimp \forall x^\safe. A(|x|)
238 261 adas
	\end{equation}
239 261 adas
	for formulae $A \in \Sigma^\safe_i$
240 261 adas
	is equivalent to $\cpind{\Sigma^\safe_i}$.
241 261 adas
\end{proposition}
242 261 adas
\begin{proof}
243 261 adas
	Suppose we have $A(0)$ and $A(a) \cimp A(\succ{} a)$ for each $a \in \normal$.
244 261 adas
	Then, by $\basic$, we have that $A(|a|) \cimp A(|2a|)$ and $A(|a|) \cimp A(|2a+1|)$ for each $a \in \normal$, whence we may conclude $\forall x. A(|x|)$ by polynomial induction on $A(|x|)$.
245 261 adas
\end{proof}
246 251 adas
247 261 adas
Let us refer to the axiom schema in \eqref{eqn:lind} as $\clind{\Xi}$, when $A \in \Xi$.
248 261 adas
We will freely use this in place of polynomial induction whenever it is convenient.
249 261 adas
250 261 adas
251 251 adas
\subsection{Graphs of some basic functions}\label{sect:graphsbasicfunctions}
252 251 adas
253 261 adas
We say that a function $f$ is \emph{represented} by a formula $A_f$ in a theory if we can prove a formula of the form $\forall \vec u^{\normal} , \forall  \vec x^{\safe}, \exists! y^{\safe}. A_f (\vec u , \vec x , y)$, such that $\Nat \models A_f (\vec u , \vec x , f(\vec u , \vec x))$. The variables $\vec u$ and $\vec x$ can respectively be thought of as normal and safe arguments of $f$, and $y$ is the output of $f(\vec u; \vec x)$.
254 261 adas
We sometimes explicitly delimit variables as such when it is helpful, writing $A_f (\vec u ; \vec x , y)$.
255 251 adas
256 251 adas
Let us give a few examples for basic functions representable in $\arith^1$, wherein proofs of totality are routine:
257 251 adas
\begin{itemize}
258 251 adas
\item Projection $\pi_k^{m,n}$: $\forall u_1^{\normal} , \dots, u_m^{\normal} ,  \forall x_{m+1}^{\safe} , \dots, x^{\safe} _{m+n}, \exists y^{\safe} . y=x_k$ if $k\geq m+1$ (resp. $u_k$ if $k\leq m$).
259 251 adas
%\item Successor $\succ{}$: $\forall x^{\safe} , \exists^{\safe} y. y=x+1.$. The formulas for the binary successors $\succ{0}$, $\succ{1}$ and the constant functions $\epsilon^k$ are defined in a similar way.
260 251 adas
%\item Predecessor $p$:   $\forall^{\safe} x, \exists^{\safe} y. (x=\succ{0} y \cor x=\succ{1} y \cor (x=\epsilon \cand y= \epsilon)) .$
261 251 adas
\item Conditional $C$:
262 261 adas
$$
263 261 adas
\forall x^{\safe} ,  y_0^{\safe}, y_1^{\safe}, \exists y^{\safe}.
264 261 adas
\left(
265 261 adas
\begin{array}{rl}
266 261 adas
&\exists z^{\safe}.x=\succ{0}z \cand y=y_0 \\
267 261 adas
\cor&  \exists z^{\safe}.x=\succ{1}z \cand y=y_1
268 251 adas
\end{array}
269 261 adas
\right)
270 251 adas
$$
271 261 adas
%$$\begin{array}{ll}
272 261 adas
%\forall x^{\safe} ,  y_0^{\safe}, y_1^{\safe}, \exists y^{\safe}. & ((x=0)\cand (y=y_0)\\
273 261 adas
%                                                                                                   & \cor( \exists z^{\safe}.(x=\succ{0}z) \cand (y=y_0))\\
274 261 adas
%                                                                                                   & \cor( \exists z^{\safe}.(x=\succ{1}z) \cand (y=y_1)))\
275 261 adas
%\end{array}
276 261 adas
%$$
277 251 adas
%\item Addition:
278 251 adas
%$\forall^{\safe} x, y,  \exists^{\safe} z. z=x+y$.
279 251 adas
\item Prefix:
280 251 adas
  This is a predicate that we will need for technical reasons, in the completeness proof. The predicate $\pref(k,x,y)$ holds if the prefix of string $x$
281 251 adas
  of length $k$ is $y$. It is defined as:
282 251 adas
  $$\begin{array}{ll}
283 251 adas
\exists z^{\safe} , \exists l^{\normal} \leq |x|. & (k+l= |x|\\
284 251 adas
                                                                                                   & \cand \; |z|=l\\
285 251 adas
                                                                                                   & \cand \; x=y\smsh(2,l)+z)
286 251 adas
                                                                                                   \end{array}
287 251 adas
$$
288 251 adas
\item The following predicates will also be needed in proofs:
289 251 adas
290 251 adas
$\zerobit(x,k)$ (resp. $\onebit(x,k)$) holds iff the $k$th bit of $x$ is 0 (resp. 1). The predicate $\zerobit(x,k)$  for instance can be
291 251 adas
defined by:
292 251 adas
$$ \exists y^{\safe} .(\pref(k,x,y) \cand \exists z^{\safe} . y=\succ{0}z).$$
293 251 adas
\end{itemize}
294 251 adas
295 251 adas
\subsection{A sequent calculus presentation}
296 251 adas
\begin{figure}
297 251 adas
	\[
298 251 adas
	\small
299 254 adas
	\hspace{-4em}
300 251 adas
	\begin{array}{cccc}
301 251 adas
	%\vlinf{\lefrul{\bot}}{}{p, \lnot{p} \seqar }{}
302 251 adas
	%& \vlinf{\id}{}{p \seqar p}{}
303 251 adas
	%& \vlinf{\rigrul{\bot}}{}{\seqar p, \lnot{p}}{}
304 251 adas
	%& \vliinf{\cut}{}{\Gamma, \Sigma \seqar \Delta , \Pi}{ \Gamma \seqar \Delta, A }{\Sigma, A \seqar \Pi}
305 251 adas
	\vlinf{id}{}{\Gamma, p \seqar p, \Delta }{}
306 251 adas
	& \vliinf{cut}{}{\Gamma, \Sigma \seqar \Delta, \Pi }{ \Gamma \seqar \Delta, A }{\Sigma, A \seqar \Pi}
307 251 adas
	&	\vlinf{\lefrul{\neg}}{}{\Gamma, \neg A \seqar \Delta}{\Gamma \seqar A, \Delta}
308 251 adas
	&
309 251 adas
310 251 adas
	\vlinf{\rigrul{\neg}}{}{\Gamma, \seqar \neg A, \Delta}{\Gamma, A \seqar  \Delta}
311 251 adas
		\\
312 251 adas
313 251 adas
		\noalign{\bigskip}
314 251 adas
		%\text{Structural:} & & & \\
315 251 adas
		%\noalign{\bigskip}
316 251 adas
317 251 adas
		\vlinf{\lefrul{\wk}}{}{\Gamma, A \seqar \Delta}{\Gamma \seqar \Delta}
318 251 adas
		&
319 251 adas
		\vlinf{\lefrul{\cntr}}{}{\Gamma, A \seqar \Delta}{\Gamma, A, A \seqar \Delta}
320 251 adas
		&
321 251 adas
		\vlinf{\rigrul{\wk}}{}{\Gamma \seqar \Delta, A }{\Gamma \seqar \Delta}
322 251 adas
		&
323 251 adas
		\vlinf{\rigrul{\cntr}}{}{\Gamma \seqar \Delta, A}{\Gamma \seqar \Delta, A, A}
324 251 adas
		\\
325 251 adas
		\noalign{\bigskip}
326 251 adas
		\vlinf{\lefrul{\exists}}{}{\Gamma, \exists x . A(x) \seqar \Delta}{\Gamma, A(a) \seqar \Delta}
327 251 adas
		&
328 251 adas
		\vlinf{\lefrul{\forall}}{}{\Gamma, \forall x. A(x) \seqar \Delta}{\Gamma, A(t) \seqar \Delta}
329 251 adas
		&
330 251 adas
		\vlinf{\rigrul{\exists}}{}{\Gamma \seqar \Delta, \exists x . A(x)}{ \Gamma \seqar \Delta, A(t)}
331 251 adas
		&
332 251 adas
		\vlinf{\rigrul{\forall}}{}{\Gamma \seqar \Delta, \forall x . A(x)}{ \Gamma \seqar \Delta, A(a) }
333 251 adas
	\\
334 251 adas
	\noalign{\bigskip}
335 251 adas
	%\noalign{\bigskip}
336 251 adas
	\vliinf{\lefrul{\cor}}{}{\Gamma, \Sigma, A \cor B \seqar \Delta, \Pi}{\Gamma , A \seqar \Delta}{\Sigma, B \seqar \Pi}
337 251 adas
	&
338 251 adas
	\vlinf{\lefrul{\cand}}{}{\Gamma, A\cand B \seqar \Delta}{\Gamma, A , B \seqar \Delta}
339 251 adas
	&
340 251 adas
	%\vlinf{\lefrul{\laand}}{}{\Gamma, A\laand B \seqar \Delta}{\Gamma, B \seqar \Delta}
341 251 adas
	%\quad
342 251 adas
	\vlinf{\rigrul{\cor}}{}{\Gamma \seqar \Delta, A \cor B}{\Gamma \seqar \Delta, A, B}
343 251 adas
	&
344 251 adas
	%\vlinf{\rigrul{\laor}}{}{\Gamma \seqar \Delta, A\laor B}{\Gamma \seqar \Delta, B}
345 251 adas
	%\quad
346 251 adas
	\vliinf{\rigrul{\cand}}{}{\Gamma, \Sigma \seqar \Delta, \Pi, A \cand B }{\Gamma \seqar \Delta, A}{\Sigma \seqar \Pi, B}
347 251 adas
	%\noalign{\bigskip}
348 251 adas
	% \vliinf{mix}{}{\Gamma, \Sigma \seqar \Delta , \Pi}{ \Gamma \seqar \Delta}{\Sigma \seqar \Pi} &&&
349 251 adas
	\end{array}
350 251 adas
	\]
351 251 adas
	\caption{Sequent calculus rules, where $p$ is atomic, $i \in \{ 1,2 \}$, $t$ is a term and the eigenvariable $a$ does not occur free in $\Gamma$ or $\Delta$.}\label{fig:sequentcalculus}
352 251 adas
\end{figure}
353 251 adas
354 251 adas
In order to carry out witness extraction for proofs of $\arith^i$, it will be useful to work with a \emph{sequent calculus} representation of proofs.
355 251 adas
Such systems exhibit strong normal forms, notably `free-cut free' proofs, and so are widely used for the `witness function method' for extracting programs from proofs \cite{Buss86book,Buss98:intro-proof-theory}.
356 251 adas
We state the required technical material here only briefly, due to space constraints.
357 251 adas
358 251 adas
A \emph{sequent} is an expression $\Gamma \seqar \Delta$ where $\Gamma$ and $\Delta$ are multisets of formulas.
359 251 adas
The inference rules of the sequent calculus $\LK$ are displayed in Fig.~\ref{fig:sequentcalculus}.
360 251 adas
Of course, we have the following:
361 251 adas
\begin{proposition}
362 251 adas
	$A$ is a first-order theorem if and only if there is an $\LK$ proof of $\seqar A$.
363 251 adas
\end{proposition}
364 251 adas
365 251 adas
%We consider \emph{systems} of `nonlogical' rules extending this sequent calculus, which we write as follows,
366 251 adas
% \[
367 251 adas
% \begin{array}{cc}
368 251 adas
%    \vlinf{(R)}{}{ \Gamma , \Sigma' \seqar \Delta' , \Pi  }{ \{\Gamma , \Sigma_i \seqar \Delta_i , \Pi \}_{i \in I} }
369 251 adas
%\end{array}
370 251 adas
%\]
371 251 adas
% where, in each rule $(R)$, $I$ is a finite possibly empty set (indicating the number of premises) and we assume the following conditions and terminology:
372 251 adas
% \begin{enumerate}
373 251 adas
% \item In $(R)$ the formulas of $\Sigma', \Delta'$  are called \textit{principal}, those of $\Sigma_i, \Delta_i$ are called \textit{active}, and those of
374 251 adas
%$ \Gamma,  \Pi$ are called \textit{context formulas}.
375 251 adas
%\item Each rule $(R)$ comes with a list $a_1$, \dots, $a_k$ of eigenvariables such that each $a_j$ appears in exactly one $\Sigma_i, \Delta_i$ (so in some active formulas of exactly one premise)  and does not appear in  $\Sigma', \Delta'$ or $ \Gamma,  \Pi$.
376 251 adas
%    \item A system $\mathcal{S}$ of rules must be closed under substitutions of free variables by terms (where these substitutions do not contain the eigenvariables $a_j$ in their domain or codomain).
377 251 adas
%   \end{enumerate}
378 251 adas
%
379 251 adas
%%The distinction between modal and nonmodal formulae in $(R)$ induces condition 1
380 251 adas
% Conditions 2 and 3 are standard requirements for nonlogical rules, independently of the logical setting, cf.\ \cite{Beckmann11}. Condition 2 reflects the intuitive idea that, in our nonlogical rules, we often need a notion of \textit{bound} variables in the active formulas (typically for induction rules), for which we rely on eigenvariables. Condition 3 is needed for our proof system to admit elimination of cuts on quantified formulas.
381 251 adas
%
382 251 adas
%%\begin{definition}
383 251 adas
%%[Polynomial induction]
384 251 adas
%%The \emph{polynomial induction} axiom schema, $\pind$, consists of the following axioms,
385 251 adas
%%\[
386 251 adas
%%A(0)
387 251 adas
%%\cimp (\forall x^{\normal} . ( A(x) \cimp A(\succ{0} x) ) )
388 251 adas
%%\cimp  (\forall x^{\normal} . ( A(x) \cimp A(\succ{1} x) ) )
389 251 adas
%%\cimp  \forall x^{\normal} . A(x)
390 251 adas
%%\]
391 251 adas
%%for each formula $A(x)$.
392 251 adas
%%
393 251 adas
%%For a class $\Xi$ of formulae, $\cax{\Xi}{\pind}$ denotes the set of induction axioms when $A(x) \in \Xi$.
394 251 adas
%%
395 251 adas
%%We write $I\Xi$ to denote the theory consisting of $\basic$ and $\cax{\Xi}{\ind}$.
396 251 adas
%%\end{definition}
397 251 adas
%
398 251 adas
%As an example any axiom can be represented by such a nonlogical rule $(R)$, with no premise ($I=\emptyset$), $\Delta'$ equal to the axiom and $\Gamma=\Sigma'=\Pi$.
399 251 adas
400 251 adas
We extend this purely logical calculus with certain non-logical rules and initial sequents corresponding to our theories $\arith^i$.
401 251 adas
 For instance the axiom $\pind$ of Dfn.~\ref{def:polynomialinduction} is represented by the following rule:
402 251 adas
\begin{equation}
403 251 adas
\label{eqn:ind-rule}
404 251 adas
\small
405 251 adas
\vliinf{\pind}{}{ \normal(t) , \Gamma , A(0) \seqar A(t), \Delta }{ \normal(a) , \Gamma, A(a) \seqar A(\succ{0} a) , \Delta }{ \normal(a) , \Gamma, A(a) \seqar A(\succ{1} a) , \Delta  }
406 251 adas
\end{equation}
407 251 adas
where $t$ varies over terms and the eigenvariable $a$ does not occur in the lower sequent.
408 251 adas
%
409 251 adas
Similarly the $\rais$ inference rule of Dfn.~\ref{def:ariththeory} is represented by the nonlogical rule,
410 251 adas
 \[
411 251 adas
 \begin{array}{cc}
412 251 adas
    \vlinf{\rais}{}{  \normal(t_1), \dots, \normal(t_k) \seqar  \exists  y^\normal .  A }{  \normal(t_1), \dots, \normal(t_k) \seqar \exists  y^\safe .  A}
413 251 adas
\end{array}
414 251 adas
\]
415 251 adas
%
416 251 adas
%\patrick{In fact, I think we rather need the following nonlogical rule, which implies the previous one but is I guess more general:
417 251 adas
%\[
418 251 adas
% \begin{array}{cc}
419 251 adas
%    \vlinf{\rais}{}{  \normal(t_1), \dots, \normal(t_k) \seqar  \normal(t) }{  \normal(t_1), \dots, \normal(t_k) \seqar \safe(t)}
420 251 adas
%\end{array}
421 251 adas
%\]
422 251 adas
%}
423 251 adas
%
424 251 adas
$\basic$ axioms are represented by designated initial sequents.
425 251 adas
For instance here are some initial sequents corresponding to some of the $\basic$ axioms:
426 251 adas
\[
427 251 adas
\small
428 251 adas
\begin{array}{l}
429 251 adas
\begin{array}{cccc}
430 251 adas
\vlinf{}{}{\seqar \safe (0)}{}&
431 251 adas
\vlinf{}{}{\safe(t) \seqar \safe(\succ{} t)}{}&
432 251 adas
\vlinf{}{}{ \safe (t)   \seqar 0 \neq \succ{} t}{} &
433 251 adas
\vlinf{}{}{\safe (s) , \safe (t)  , \succ{} s = \succ{} t\seqar s = t }{}\\
434 251 adas
\end{array}
435 251 adas
\\
436 251 adas
\vlinf{}{}{\safe (t) \seqar t = 0 \cor \exists y^\safe . t = \succ{} y  }{}
437 251 adas
\qquad
438 251 adas
\vlinf{}{}{\safe(s), \safe(t) \seqar \safe(s+t) }{}\\
439 251 adas
\vlinf{}{}{\normal (s), \safe(t) \seqar \safe(s \times t)  }{}
440 251 adas
\qquad
441 251 adas
\vlinf{}{}{\normal (s), \normal(t) \seqar \safe(s \smsh t)  }{}\\
442 251 adas
\vlinf{}{}{\normal(t) \seqar \safe(t)  }{}
443 251 adas
\end{array}
444 251 adas
\]
445 251 adas
446 251 adas
The sequent system for $\arith^i$ extends $\LK$ by the $\basic$,  $\cpind{\Sigma^\safe_i } $ and $\rais$ rules.
447 251 adas
 Naturally, by completeness, we have that $\arith^i \proves A$ if and only if there is a sequent proof of $\seqar A$ in the corresponding system.
448 251 adas
 In fact, by \emph{free-cut elimination} results \cite{Takeuti87,Cook:2010:LFP:1734064} we may actually say something much stronger.
449 251 adas
450 251 adas
 Let us say that a sorting $(\vec u ; \vec x)$ of the variables $\vec u , \vec x$ is \emph{compatible} with a formula $A$ if each variable of $\vec x$ occurs hereditarily safe with respect to the $\bc$-typing of terms, i.e.\ never under $\smsh, |\cdot|$ and to the right of $\times$.
451 251 adas
452 251 adas
\begin{theorem}
453 251 adas
	[Typed variable normal form]
454 251 adas
	\label{thm:normal-form}
455 251 adas
	If $\arith^i\proves  A$ then there is a $\arith^i$ sequent proof $\pi$ of $A$ such that each line has the form:
456 251 adas
	\[
457 251 adas
	\normal(\vec u), \safe (\vec x), \Gamma \seqar \Delta
458 251 adas
	\]
459 251 adas
	where $\Gamma \seqar \Delta$ contains only $\Sigma^\safe_i$ formulae for which the sorting $(\vec u ;\vec x)$ is compatible.
460 251 adas
\end{theorem}
461 251 adas
462 251 adas
Strictly speaking, we must alter some of the sequent rules a little to arrive at this normal form. For instance the $\pind$ rule would have $\normal(\vec u)$ in its lower sequent rather than $\normal (t(\vec u))$. The latter is a consequence of the former already in $\basic$.
463 251 adas
The proof of this result also relies on a heavy use of the structural rules, contraction and weakening, to ensure that we always have a complete and compatible sorting of variables on the LHS of a sequent. This is similar to what is done in \cite{OstrinWainer05} where they use a $G3$ style calculus to manage such structural manipulations.
464 251 adas
465 251 adas
As we mentioned, the fact that only $\Sigma^\safe_i$ formulae occur is due to the free-cut elimination result for first-order calculi \cite{Takeuti87,Cook:2010:LFP:1734064}, which gives a form of proof where every $\cut$ step has one of its cut formulae `immediately' below a non-logical step. Again, we have to adapt the $\rais$ rule a little to achieve our result, due to the fact that it has a $\exists x^\normal$ in its lower sequent. For this we consider a merge of $\rais$ and $\cut$, which allows us to directly cut the upper sequent of $\rais$ against a sequent of the form $\normal(u), A(u), \Gamma \seqar \Delta$.
466 251 adas
467 251 adas
Finally, as is usual in bounded arithmetic, we use distinguished rules for our relativised quantifiers, although we use ones that satisfy the aforementioned constraints. For instance, we include the following rules, from which the remaining ones are similar:
468 251 adas
\[
469 251 adas
\vlinf{\rigrul{\forall}}{}{ \normal(\vec u) , \safe (\vec x), \Gamma \seqar \Delta , \forall x^\safe . A(x)}{\normal(\vec u ) , \safe (\vec x), \safe (x) , \Gamma \seqar \Delta, A(x)}
470 251 adas
\quad
471 251 adas
\vlinf{\rigrul{\exists}}{}{\normal(\vec u) , \safe (\vec x) , \Gamma \seqar \Delta , \exists x^\safe . A(x)}{ \normal (\vec u) , \safe (\vec x) , \Gamma \seqar \Delta , A(t) }
472 251 adas
\]
473 251 adas
\[
474 251 adas
\vlinf{\lefrul{|\forall|}}{}{\normal (\vec u ) , \safe (\vec x) , s(\vec u) \leq |t(\vec u)| , \forall u^\normal \leq |t(\vec u)| . A(u) , \Gamma \seqar \Delta }{\normal (\vec u ) , \safe (\vec x) , A(s(\vec u)  ) , \Gamma \seqar \Delta  }
475 251 adas
\]
476 251 adas
with the usual side conditions and where, in $\rigrul{\exists}$, $(\vec u ; \vec x)$ is compatible with $t$.