root / CSL17 / tech-report / arithmetic.tex @ 268
Historique | Voir | Annoter | Télécharger (32,07 ko)
1 |
\section{An arithmetic for the polynomial hierarchy}\label{sect:arithmetic} |
---|---|
2 |
%Our base language is $\{ 0, \succ{} , + , \times, \smsh , |\cdot| , \leq \}$. |
3 |
Our base language consists of constant and function symbols $\{ 0, \succ{} , + , \times, \smsh , |\cdot|, \hlf{}.\}$ and predicate symbols |
4 |
$\{\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 |
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 |
|
7 |
We consider formulas of classical first-order logic, over $\neg$, $\cand$, $\cor$, $\forall$, $\exists$, along with usual shorthands and abbreviations. |
8 |
%The formula $A \cimp B$ will be a notation for $\neg A \cor B$. |
9 |
%We will also use as shorthand notations: |
10 |
%$$ (s=t) = (s\leq t) \cand (t\leq s), \quad (s\neq t) = \neg(s=t).$$ |
11 |
\textit{Atomic formulas} formulas are of the form $s\leq t$, for terms $s,t$. |
12 |
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 |
|
14 |
|
15 |
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 |
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 |
|
18 |
|
19 |
The theories we introduce are directly inspired from bounded arithmetic, namely the theories $S^i_2$. |
20 |
We include a similar set of axioms for direct comparison, although in our setting these are not minimal. |
21 |
Indeed, $\#$ can be defined using induction in our setting. |
22 |
|
23 |
The $\basic$ axioms of bounded arithmetic give the inductive definitions and interrelationships of the various function and predicate symbols. |
24 |
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 |
|
26 |
|
27 |
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 |
\begin{enumerate}[(a)] |
29 |
\item\label{ax:a} $\forall u^\normal. \safe(u) $ |
30 |
\item $\safe (0) $ |
31 |
\item $\forall x^\safe . \safe (\succ{} x) $ |
32 |
\item $\forall u^\safe .\safe(\hlf{u})$ |
33 |
\item $\forall x^\safe, y^\safe . \safe(x+y)$ |
34 |
\item $\forall u^\normal, x^\safe . \safe(u\times x) $ |
35 |
\item $\forall u^\normal , v^\normal . \safe (u \smsh v)$ |
36 |
\item\label{ax:h} $\forall u^\normal .\safe(|u|)$ |
37 |
\end{enumerate} |
38 |
%\[ |
39 |
%\begin{array}{l} |
40 |
%\forall u^\normal. \safe(u) \\ |
41 |
%\safe (0) \\ |
42 |
%\forall x^\safe . \safe (\succ{} x) \\ |
43 |
%\forall u^\safe .\safe(\hlf{u}) |
44 |
%\end{array} |
45 |
%\qquad |
46 |
%\begin{array}{l} |
47 |
%\forall x^\safe, y^\safe . \safe(x+y)\\ |
48 |
%\forall u^\normal, x^\safe . \safe(u\times x) \\ |
49 |
%\forall u^\normal , v^\normal . \safe (u \smsh v)\\ |
50 |
%\forall u^\normal .\safe(|x|) |
51 |
%\end{array} |
52 |
%\] |
53 |
%\patrick{Actually I guess that we could replace the last one by $\forall x^\normal .\safe(|x|)$, as $|x|$ has smaller size as $x$? But I am not sure this would be needed anywhere. } |
54 |
|
55 |
Notice in particular that we have $\normal \subseteq \safe$. |
56 |
% |
57 |
Apart from these, the remaining $\basic$ axioms mimic those of Buss in \cite{Buss86book}: |
58 |
\begin{enumerate}[(1)] |
59 |
\item $\forall x^{\safe}, y^{\safe}. (y\leq x\cimp y \leq \succ{} x) $ \label{axiom1} |
60 |
\item $\forall x^{\safe}. x \neq \succ{} x$ \label{axiom2} |
61 |
\item $\forall x^{\safe}.0 \leq x$ \label{axiom3} |
62 |
\item $\forall x^{\safe}, y^{\safe}. ((x\leq y \cand x \neq y) \ciff \succ{} x \leq y) $ \label{axiom4} |
63 |
\item $\forall x^{\safe}. (x\neq 0 \cimp \succ{0}x \neq 0)$ |
64 |
\item $\forall x^{\safe}, y^{\safe}. (y\leq x \cor x \leq y)$ \label{axiom6} |
65 |
\item $\forall x^{\safe}, y^{\safe}. ((x\leq y \cand y\leq x )\cimp x=y)$ |
66 |
\item $\forall x^{\safe}, y^{\safe}, z^{\safe}. ((x\leq y \cand y\leq z) \cimp x\leq z)$ \label{axiom<=transitivity} |
67 |
\item $|0|=0$ |
68 |
\item $\forall x^{\safe}, y^{\safe}.( x\neq 0 \cimp (|\succ{0}x|=\succ{}( |x|) \cand |\succ{1}x|= \succ{}(|x|))) $ |
69 |
\item $|\succ{}0|=\succ{} 0$ |
70 |
\item $\forall x^{\safe}, y^{\safe}. (x\leq y \cimp |x|\leq |y|)$ |
71 |
\item $\forall x^{\normal}, y^{\normal}. |x\smsh y|=\succ{}( |x|\cdot |y|)$ |
72 |
\item $\forall y^{\normal}. 0 \smsh y=\succ{} 0$ |
73 |
\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)))$ |
74 |
\item $\forall x^{\normal}, y^{\normal}. x \smsh y = y \smsh x$ |
75 |
\item $\forall x^{\normal}, y^{\normal}, z^{\normal}. ( |x|= |y| \cimp x\smsh z = y\smsh z)$ |
76 |
\item $\forall x^{\normal}, u^{\normal}, v^{\normal}, y^{\normal}. (|x|= |u|+ |v| \cimp x\smsh y=(u\smsh y)\cdot (v\smsh y))$ |
77 |
\item $\forall x^{\safe}, y^{\safe}. x\leq x+y$ |
78 |
\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))$ |
79 |
\item $\forall x^{\safe}, y^{\safe}. x+y=y+x$ \label{axiom21} |
80 |
\item $\forall x^{\safe}. x+0=x$ \label{axiom22} |
81 |
\item $\forall x^{\safe}, y^{\safe}. x+\succ{}y=\succ{}(x+y)$ \label{axiom23} |
82 |
\item $\forall x^{\safe}, y^{\safe}, z^{\safe}. (x+y)+z=x+(y+z)$ |
83 |
\item $\forall x^{\safe}, y^{\safe}, z^{\safe}. ( x+y \leq x+z \ciff y\leq z)$ |
84 |
\item $\forall x^{\safe} 0\cdot x =0$ |
85 |
%\item $\forall x^{\normal}, y^{\safe}. x\cdot(\succ{}y)=(x\cdot y)+x$ \label{axiom27} %% version with alternative sorting |
86 |
\item $\forall x^{\safe}, y^{\normal}. x\cdot(\succ{}y)=(x\cdot y)+x$ \label{axiom27} |
87 |
\item $\forall x^{\normal}, y^{\normal}. x\cdot y=y\cdot x$ |
88 |
\item $\forall x^{\normal}, y^{\safe}, z^{\safe}. x\cdot(y+z)=(x\cdot y)+(x\cdot z)$ \label{axiom29} |
89 |
\item $\forall x^{\normal}, y^{\safe}, z^{\safe}. (x\geq \succ{} 0 \cimp (x\cdot y \leq x\cdot z \ciff y\leq z))$ |
90 |
\item $\forall x^{\normal} . (x\neq 0 \cimp |x|=\succ{}(\hlf{x}))$ |
91 |
\item $\forall x^{\safe}, y^{\safe}. ( x= \hlf{y} \ciff (\succ{0}x=y \cor \succ{}(\succ{0}x)=y))$ |
92 |
\end{enumerate} |
93 |
|
94 |
|
95 |
%$$ |
96 |
%%\begin{equation} |
97 |
%\begin{array}{l} |
98 |
%\forall x^{\safe}, y^{\safe}. (y\leq x\cimp y \leq \succ{} x) \\ |
99 |
%\forall x^{\safe}. x \neq \succ{} x\\ |
100 |
%\forall x^{\safe}.0 \leq x\\ |
101 |
%\forall x^{\safe}, y^{\safe}. ((x\leq y \cand x \neq y) \ciff \succ{} x \leq y) \\ |
102 |
%\forall x^{\safe}. (x\neq 0 \cimp \succ{0}x \neq 0)\\ |
103 |
%\forall x^{\safe}, y^{\safe}. (y\leq x \cor x \leq y)\\ |
104 |
%\forall x^{\safe}, y^{\safe}. ((x\leq y \cand y\leq x )\cimp x=y)\\ |
105 |
%\forall x^{\safe}, y^{\safe}, z^{\safe}. ((x\leq y \cand y\leq z) \cimp x\leq z)\\ |
106 |
%|0|=0\\ |
107 |
%\forall x^{\safe}, y^{\safe}.( x\neq 0 \cimp (|\succ{0}x|=\succ{}( |x|) \cand |\succ{1}x|= \succ{}(|x|))) \\ |
108 |
%|\succ{}0|=\succ{} 0\\ |
109 |
%\forall x^{\safe}, y^{\safe}. (x\leq y \cimp |x|\leq |y|)\\ |
110 |
%\forall x^{\normal}, y^{\normal}. |x\smsh y|=\succ{}( |x|\cdot |y|)\\ |
111 |
%\forall y^{\normal}. 0 \smsh y=\succ{} 0\\ |
112 |
%\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)))\\ |
113 |
%\forall x^{\normal}, y^{\normal}. x \smsh y = y \smsh x\\ |
114 |
%\forall x^{\normal}, y^{\normal}, z^{\normal}. ( |x|= |y| \cimp x\smsh z = y\smsh z)\\ |
115 |
%\forall x^{\normal}, u^{\normal}, v^{\normal}, y^{\normal}. (|x|= |u|+ |v| \cimp x\smsh y=(u\smsh y)\cdot (v\smsh y))\\ |
116 |
%\forall x^{\safe}, y^{\safe}. x\leq x+y\\ |
117 |
%\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))\\ |
118 |
%\forall x^{\safe}, y^{\safe}. x+y=y+x\\ |
119 |
%\forall x^{\safe}. x+0=x\\ |
120 |
%\forall x^{\safe}, y^{\safe}. x+\succ{}y=\succ{}(x+y)\\ |
121 |
%\forall x^{\safe}, y^{\safe}, z^{\safe}. (x+y)+z=x+(y+z)\\ |
122 |
%\forall x^{\safe}, y^{\safe}, z^{\safe}. ( x+y \leq x+z \ciff y\leq z)\\ |
123 |
%\forall x^{\safe} 0\cdot x =0\\ |
124 |
%\forall x^{\safe}, y^{\normal}. x\cdot(\succ{}y)=(x\cdot y)+x\\ |
125 |
%%\text{\anupam{check above normal/safe! Pretty sure should be other way around.}}\\ |
126 |
%\forall x^{\normal}, y^{\normal}. x\cdot y=y\cdot x\\ |
127 |
%\forall x^{\normal}, y^{\safe}, z^{\safe}. x\cdot(y+z)=(x\cdot y)+(x\cdot z)\\ |
128 |
%\forall x^{\normal}, y^{\safe}, z^{\safe}. (x\geq \succ{} 0 \cimp (x\cdot y \leq x\cdot z \ciff y\leq z))\\ |
129 |
%\forall x^{\normal} . (x\neq 0 \cimp |x|=\succ{}(\hlf{x}))\\ |
130 |
%\forall x^{\safe}, y^{\safe}. ( x= \hlf{y} \ciff (\succ{0}x=y \cor \succ{}(\succ{0}x)=y)) |
131 |
%\end{array} |
132 |
%%\end{equation} |
133 |
%$$ |
134 |
% |
135 |
|
136 |
|
137 |
|
138 |
|
139 |
|
140 |
|
141 |
|
142 |
%\begin{definition} |
143 |
% [Basic theory] |
144 |
% The theory $\basic$ consists of the axioms from Appendix \ref{appendix:arithmetic}. |
145 |
% \end{definition} |
146 |
|
147 |
|
148 |
%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)$. |
149 |
|
150 |
%\begin{definition} |
151 |
%[Derived functions and notations] |
152 |
%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. |
153 |
%We define the functions $\succ 0 x , \succ 1 x$ as $2 x$ and $2x +1$ respectively. |
154 |
% |
155 |
%Need $bit$, $\beta$ , $\pair{}{}{}$. |
156 |
%\end{definition} |
157 |
% |
158 |
%(Here use a variation of S12 with sharply bounded quantifiers and safe quantifiers) |
159 |
% |
160 |
%Use base theory + sharply bounded quantifiers. |
161 |
|
162 |
In addition to these axioms, our theories will contain forms of induction, defined below. |
163 |
|
164 |
%\anupam{Collection principles for prenexing? Otherwise need to add closure under sharply bounded quantifiers.} |
165 |
|
166 |
|
167 |
\begin{definition} |
168 |
[Polynomial induction] |
169 |
\label{def:polynomialinduction} |
170 |
The \emph{polynomial induction} axiom schema, $\pind$, consists of the following axioms, for each formula $A(x)$: |
171 |
\[ |
172 |
\left( |
173 |
A(0) |
174 |
\cand (\forall x^{\normal} . ( A(x) \cimp A(\succ{0} x) ) ) |
175 |
\cand (\forall x^{\normal} . ( A(x) \cimp A(\succ{1} x) ) ) |
176 |
\right) |
177 |
\cimp \forall x^{\normal} . A(x) |
178 |
\] |
179 |
For a class $\Xi$ of formulae, $\cax{\Xi}{\pind}$ denotes the set of $\pind$ axioms where $A(x) \in \Xi$. |
180 |
|
181 |
%We write $I\Xi$ to denote the theory consisting of $\basic$ and $\cax{\Xi}{\ind}$. |
182 |
\end{definition} |
183 |
|
184 |
We will introduce in fact a hierarchy of theories calibrated by the complexity of induction formulae, so we now introduce the appropriate quantifier hierarchy. |
185 |
|
186 |
\begin{definition} |
187 |
[Quantifier hierarchy] |
188 |
$\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. |
189 |
We define $\Sigma^\safe_{i+1}$ as the closure of $\Pi^\safe_i $ under $\cor, \cand $, safe existentials and sharply bounded quantifiers. |
190 |
We define $\Pi^\safe_{i+1}$ as the closure of $\Sigma^\safe_i $ under $\cor, \cand $, safe universals and sharply bounded quantifiers. |
191 |
\end{definition} |
192 |
|
193 |
|
194 |
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$. |
195 |
The criterion is purely to give an appropriate definition of the hierarchy above. |
196 |
|
197 |
|
198 |
\begin{definition}\label{def:ariththeory} |
199 |
Define the theory $\arith^i$ consisting of the $\basic$ axioms, $\cpind{\Sigma^\safe_i } $, |
200 |
%\begin{itemize} |
201 |
% \item $\basic$; |
202 |
% \item $\cpind{\Sigma^\safe_i } $: |
203 |
%\end{itemize} |
204 |
and a particular inference rule, called $\rais$, for closed formulas $\forall \vec x. \exists y. A$: |
205 |
\[ |
206 |
\dfrac{\proves \forall \vec x^\normal . \exists y^\safe . A }{ \proves \forall \vec x^\normal .\exists y^\normal . A} |
207 |
\] |
208 |
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. |
209 |
\end{definition} |
210 |
%\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)} |
211 |
% |
212 |
%\anupam{In induction,for inductive cases, need $u\neq 0$ for $\succ 0$ case.} |
213 |
|
214 |
%\anupam{Need vector $\vec y^\safe$?} |
215 |
|
216 |
\begin{remark} |
217 |
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. |
218 |
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. |
219 |
\end{remark} |
220 |
|
221 |
|
222 |
Let us consider some basic examples of theorems of our |
223 |
\begin{example} |
224 |
[Some basic theorems] |
225 |
We give proofs of the following, that are sometimes included as basic axioms, in $\arith^1$: |
226 |
\begin{enumerate}[(i)] |
227 |
\item\label{item:i} $\forall x^\safe . 0 \neq \succ{} (x)$ |
228 |
\item\label{item:ii} $\forall x^\safe , y^\safe . (\succ{} x = \succ{} y \cimp x = y) $ |
229 |
\item\label{item:iii} $\forall u^\normal . (u = 0 \cor \exists y^\safe. u = \succ{} v ) $ |
230 |
\item\label{item:iv} $\forall u^\normal ,x^\safe . u \cdot \succ{} x = u + ux$ |
231 |
\end{enumerate} |
232 |
% \[ |
233 |
% \begin{array}{l} |
234 |
% \forall x^\safe . 0 \neq \succ{} (x) \\ |
235 |
% \forall x^\safe , y^\safe . (\succ{} x = \succ{} y \cimp x = y) \\ |
236 |
% %\forall x^\safe . (x = 0 \cor \exists y^\safe.\ x = \succ{} y ) \\ %% version 1: Anupam |
237 |
% %\forall u^\normal . (u = 0 \cor \exists v^\normal.\ u = \succ{} v ) %% version 2: Patrick |
238 |
% \forall u^\normal . (u = 0 \cor \exists y^\safe. u = \succ{} v ) \\ %% version 3: after discussion |
239 |
% \forall u^\normal ,x^\safe . u \cdot \succ{} x = u + ux |
240 |
% \end{array} |
241 |
% \] |
242 |
% \todo{Proof: Patrick? The final two should require PIND.} |
243 |
|
244 |
% \patrick{Actually statement 4 is nearly trivial from axiom 27 (for which I corrected the sorts). Maybe you meant something else? |
245 |
% \anupam{I actually changed those sorts from the submitted version: I really think axiom 27 should be $\forall x^{\safe}, y^{\normal}. x\cdot(\succ{}y)=(x\cdot y)+x$, i.e.\ with the recursion on the normal variable. That way we can do induction on it. Statement 4 is meant to state the recursive property for the safe argument, which we can prove by induction on the normal argument, $u$.} |
246 |
% |
247 |
% For statement 3 I replaced the quantifications $\safe$ by $\normal$, otherwise I don't know how to prove it. But I think we need the stronger statement with $\safe$, so probably we should add it as an additional axiom.} |
248 |
%\anupam{Rather, I do not know how you would prove the current version: we cannot induct on $\exists v^\normal$ from axiom 27 as I state it. For the previous version I would just do induction on $u$ in $(u = 0 \cor \exists x^\safe.\ u = \succ{} x )$. } |
249 |
\end{example} |
250 |
\begin{proof} |
251 |
For \eqref{item:i}, assume $\succ{} (x)=0$ in order to derive a contradiction. From axiom \ref{axiom1} we deduce $x \leq x$, and so by transitivity (axiom \ref{axiom<=transitivity}) we have $x\leq 0$. So axiom \ref{axiom3} gives us $x=0$, and so $x=\succ{} (x)$. Finally with axiom \ref{axiom2} we conclude with a contradiction. |
252 |
|
253 |
For \eqref{item:ii} assume $\succ{} x= \succ{} y$ and, in view of a contradiction, $x\neq y$. Let us apply axiom \ref{axiom6} and assume we are in the case where $x\leq y$ (the case $y\leq x$ is symmetric). By axiom \ref{axiom4}, using the assumption $x\neq y$ we deduce $\succ{} x \leq y$. So as $\succ{} x = \succ{} y$ we can derive that $\succ{} y \leq y$. So by using axiom \ref{axiom1} we obtain that $\succ{} y = y$, hence axiom \ref{axiom2} gives us a contradiction, so we are done. |
254 |
|
255 |
For \eqref{item:iii} we proceed by induction on $u$ on the formula %$A(u)= (u=0) \cup \exists^{\normal} v. u=\succ{} v$. |
256 |
$A(u)= (u=0) \cup \exists^{\safe} v. u=\succ{} v$. Note that this formula is in $\Sigma^{\safe}_1$, so we can do induction on it in $\arith^1$. |
257 |
The formula $A(0)$ obviously holds. Let us assume $A(u)$ and prove $A(\succ{0} u)$ (the case for $A(\succ{1} u)$ will be similar). By $A(u)$ we deduce that either $u=0$, in which case we also have $\succ{0} u=0$, hence $A(\succ{0} u)$ also holds, or there is a $y$ such that $u=\succ{} y$. In this latter case we have $\succ{0} u=2\cdot(\succ{} y)=2 v +2$ (by axiom \ref{axiom29}), hence have $\succ{0} u=\succ{} (\succ{} (2\cdot y))$, and so $A(\succ{0} u)$ holds. |
258 |
By induction we conclude that $\forall^{\normal} u. A(u)$ holds. |
259 |
|
260 |
For \eqref{item:iv} let $u$ be in $\normal$ and $x$ in $\safe$, and try to prove $u\succ{} x=u+ux$. We have $\succ{} x=x+1$ by axioms \ref{axiom23} and \ref{axiom22} , so $u\succ{} x= u(x+1)$, so from axiom \ref{axiom29} we deduce $ u\succ{} x= u(x+1)=ux+u$, and by axiom \ref{axiom21} we conclude that $ u\succ{} x=u+ux$. |
261 |
\end{proof} |
262 |
It is often useful for us to work with \emph{length-induction}, which is equivalent to polynomial induction and well known from bounded arithmetic: |
263 |
\begin{proposition} |
264 |
[Length induction] |
265 |
The axiom schema of formulae, |
266 |
\begin{equation} |
267 |
\label{eqn:lind} |
268 |
( A(0) \cand \forall x^\normal . (A(x) \cimp A(\succ{} x)) ) \cimp \forall x^\safe. A(|x|) |
269 |
\end{equation} |
270 |
for formulae $A \in \Sigma^\safe_i$ |
271 |
is equivalent to $\cpind{\Sigma^\safe_i}$. |
272 |
\end{proposition} |
273 |
\begin{proof} |
274 |
Suppose we have $A(0)$ and $A(a) \cimp A(\succ{} a)$ for each $a \in \normal$. |
275 |
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|)$. |
276 |
\end{proof} |
277 |
|
278 |
Let us refer to the axiom schema in \eqref{eqn:lind} as $\clind{\Xi}$, when $A \in \Xi$. |
279 |
We will freely use this in place of polynomial induction whenever it is convenient. |
280 |
|
281 |
|
282 |
\subsection{Graphs of some basic functions}\label{sect:graphsbasicfunctions} |
283 |
|
284 |
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)$. |
285 |
We sometimes explicitly delimit variables as such when it is helpful, writing $A_f (\vec u ; \vec x , y)$. |
286 |
|
287 |
Let us give a few examples for basic functions representable in $\arith^1$, wherein proofs of totality are routine: |
288 |
\begin{itemize} |
289 |
\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$). |
290 |
%\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. |
291 |
%\item Predecessor $p$: $\forall^{\safe} x, \exists^{\safe} y. (x=\succ{0} y \cor x=\succ{1} y \cor (x=\epsilon \cand y= \epsilon)) .$ |
292 |
\item Conditional $C$: |
293 |
$$ |
294 |
\forall x^{\safe} , y_0^{\safe}, y_1^{\safe}, \exists y^{\safe}. |
295 |
\left( |
296 |
\begin{array}{rl} |
297 |
&\exists z^{\safe}.x=\succ{0}z \cand y=y_0 \\ |
298 |
\cor& \exists z^{\safe}.x=\succ{1}z \cand y=y_1 |
299 |
\end{array} |
300 |
\right) |
301 |
$$ |
302 |
%$$\begin{array}{ll} |
303 |
%\forall x^{\safe} , y_0^{\safe}, y_1^{\safe}, \exists y^{\safe}. & ((x=0)\cand (y=y_0)\\ |
304 |
% & \cor( \exists z^{\safe}.(x=\succ{0}z) \cand (y=y_0))\\ |
305 |
% & \cor( \exists z^{\safe}.(x=\succ{1}z) \cand (y=y_1)))\ |
306 |
%\end{array} |
307 |
%$$ |
308 |
%\item Addition: |
309 |
%$\forall^{\safe} x, y, \exists^{\safe} z. z=x+y$. |
310 |
\item Prefix: |
311 |
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$ |
312 |
of length $k$ is $y$. It is defined as: |
313 |
$$\begin{array}{ll} |
314 |
\exists z^{\safe} , \exists l^{\normal} \leq |x|. & (k+l= |x|\\ |
315 |
& \cand \; |z|=l\\ |
316 |
& \cand \; x=y\smsh(2,l)+z) |
317 |
\end{array} |
318 |
$$ |
319 |
\item The following predicates will also be needed in proofs: |
320 |
|
321 |
$\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 |
322 |
defined by: |
323 |
$$ \exists y^{\safe} .(\pref(k,x,y) \cand \exists z^{\safe} . y=\succ{0}z).$$ |
324 |
\end{itemize} |
325 |
|
326 |
\subsection{A sequent calculus presentation} |
327 |
\begin{figure} |
328 |
\[ |
329 |
\small |
330 |
\hspace{-4em} |
331 |
\begin{array}{cccc} |
332 |
%\vlinf{\lefrul{\bot}}{}{p, \lnot{p} \seqar }{} |
333 |
%& \vlinf{\id}{}{p \seqar p}{} |
334 |
%& \vlinf{\rigrul{\bot}}{}{\seqar p, \lnot{p}}{} |
335 |
%& \vliinf{\cut}{}{\Gamma, \Sigma \seqar \Delta , \Pi}{ \Gamma \seqar \Delta, A }{\Sigma, A \seqar \Pi} |
336 |
\vlinf{id}{}{\Gamma, p \seqar p, \Delta }{} |
337 |
& \vliinf{cut}{}{\Gamma, \Sigma \seqar \Delta, \Pi }{ \Gamma \seqar \Delta, A }{\Sigma, A \seqar \Pi} |
338 |
& \vlinf{\lefrul{\neg}}{}{\Gamma, \neg A \seqar \Delta}{\Gamma \seqar A, \Delta} |
339 |
& |
340 |
|
341 |
\vlinf{\rigrul{\neg}}{}{\Gamma, \seqar \neg A, \Delta}{\Gamma, A \seqar \Delta} |
342 |
\\ |
343 |
|
344 |
\noalign{\bigskip} |
345 |
%\text{Structural:} & & & \\ |
346 |
%\noalign{\bigskip} |
347 |
|
348 |
\vlinf{\lefrul{\wk}}{}{\Gamma, A \seqar \Delta}{\Gamma \seqar \Delta} |
349 |
& |
350 |
\vlinf{\lefrul{\cntr}}{}{\Gamma, A \seqar \Delta}{\Gamma, A, A \seqar \Delta} |
351 |
& |
352 |
\vlinf{\rigrul{\wk}}{}{\Gamma \seqar \Delta, A }{\Gamma \seqar \Delta} |
353 |
& |
354 |
\vlinf{\rigrul{\cntr}}{}{\Gamma \seqar \Delta, A}{\Gamma \seqar \Delta, A, A} |
355 |
\\ |
356 |
\noalign{\bigskip} |
357 |
\vlinf{\lefrul{\exists}}{}{\Gamma, \exists x . A(x) \seqar \Delta}{\Gamma, A(a) \seqar \Delta} |
358 |
& |
359 |
\vlinf{\lefrul{\forall}}{}{\Gamma, \forall x. A(x) \seqar \Delta}{\Gamma, A(t) \seqar \Delta} |
360 |
& |
361 |
\vlinf{\rigrul{\exists}}{}{\Gamma \seqar \Delta, \exists x . A(x)}{ \Gamma \seqar \Delta, A(t)} |
362 |
& |
363 |
\vlinf{\rigrul{\forall}}{}{\Gamma \seqar \Delta, \forall x . A(x)}{ \Gamma \seqar \Delta, A(a) } |
364 |
\\ |
365 |
\noalign{\bigskip} |
366 |
%\noalign{\bigskip} |
367 |
\vliinf{\lefrul{\cor}}{}{\Gamma, \Sigma, A \cor B \seqar \Delta, \Pi}{\Gamma , A \seqar \Delta}{\Sigma, B \seqar \Pi} |
368 |
& |
369 |
\vlinf{\lefrul{\cand}}{}{\Gamma, A\cand B \seqar \Delta}{\Gamma, A , B \seqar \Delta} |
370 |
& |
371 |
%\vlinf{\lefrul{\laand}}{}{\Gamma, A\laand B \seqar \Delta}{\Gamma, B \seqar \Delta} |
372 |
%\quad |
373 |
\vlinf{\rigrul{\cor}}{}{\Gamma \seqar \Delta, A \cor B}{\Gamma \seqar \Delta, A, B} |
374 |
& |
375 |
%\vlinf{\rigrul{\laor}}{}{\Gamma \seqar \Delta, A\laor B}{\Gamma \seqar \Delta, B} |
376 |
%\quad |
377 |
\vliinf{\rigrul{\cand}}{}{\Gamma, \Sigma \seqar \Delta, \Pi, A \cand B }{\Gamma \seqar \Delta, A}{\Sigma \seqar \Pi, B} |
378 |
%\noalign{\bigskip} |
379 |
% \vliinf{mix}{}{\Gamma, \Sigma \seqar \Delta , \Pi}{ \Gamma \seqar \Delta}{\Sigma \seqar \Pi} &&& |
380 |
\end{array} |
381 |
\] |
382 |
\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} |
383 |
\end{figure} |
384 |
|
385 |
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. |
386 |
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}. |
387 |
We state the required technical material here only briefly, due to space constraints. |
388 |
|
389 |
A \emph{sequent} is an expression $\Gamma \seqar \Delta$ where $\Gamma$ and $\Delta$ are multisets of formulas. |
390 |
The inference rules of the sequent calculus $\LK$ are displayed in Fig.~\ref{fig:sequentcalculus}. |
391 |
Of course, we have the following: |
392 |
\begin{proposition} |
393 |
$A$ is a first-order theorem if and only if there is an $\LK$ proof of $\seqar A$. |
394 |
\end{proposition} |
395 |
|
396 |
%We consider \emph{systems} of `nonlogical' rules extending this sequent calculus, which we write as follows, |
397 |
% \[ |
398 |
% \begin{array}{cc} |
399 |
% \vlinf{(R)}{}{ \Gamma , \Sigma' \seqar \Delta' , \Pi }{ \{\Gamma , \Sigma_i \seqar \Delta_i , \Pi \}_{i \in I} } |
400 |
%\end{array} |
401 |
%\] |
402 |
% 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: |
403 |
% \begin{enumerate} |
404 |
% \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 |
405 |
%$ \Gamma, \Pi$ are called \textit{context formulas}. |
406 |
%\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$. |
407 |
% \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). |
408 |
% \end{enumerate} |
409 |
% |
410 |
%%The distinction between modal and nonmodal formulae in $(R)$ induces condition 1 |
411 |
% 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. |
412 |
% |
413 |
%%\begin{definition} |
414 |
%%[Polynomial induction] |
415 |
%%The \emph{polynomial induction} axiom schema, $\pind$, consists of the following axioms, |
416 |
%%\[ |
417 |
%%A(0) |
418 |
%%\cimp (\forall x^{\normal} . ( A(x) \cimp A(\succ{0} x) ) ) |
419 |
%%\cimp (\forall x^{\normal} . ( A(x) \cimp A(\succ{1} x) ) ) |
420 |
%%\cimp \forall x^{\normal} . A(x) |
421 |
%%\] |
422 |
%%for each formula $A(x)$. |
423 |
%% |
424 |
%%For a class $\Xi$ of formulae, $\cax{\Xi}{\pind}$ denotes the set of induction axioms when $A(x) \in \Xi$. |
425 |
%% |
426 |
%%We write $I\Xi$ to denote the theory consisting of $\basic$ and $\cax{\Xi}{\ind}$. |
427 |
%%\end{definition} |
428 |
% |
429 |
%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$. |
430 |
|
431 |
We extend this purely logical calculus with certain non-logical rules and initial sequents corresponding to our theories $\arith^i$. |
432 |
For instance the axiom $\pind$ of Dfn.~\ref{def:polynomialinduction} is represented by the following rule: |
433 |
\begin{equation} |
434 |
\label{eqn:ind-rule} |
435 |
\small |
436 |
\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 } |
437 |
\end{equation} |
438 |
where $t$ varies over terms and the eigenvariable $a$ does not occur in the lower sequent. |
439 |
% |
440 |
Similarly the $\rais$ inference rule of Dfn.~\ref{def:ariththeory} is represented by the nonlogical rule, |
441 |
\[ |
442 |
\begin{array}{cc} |
443 |
\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} |
444 |
\end{array} |
445 |
\] |
446 |
% |
447 |
%\patrick{In fact, I think we rather need the following nonlogical rule, which implies the previous one but is I guess more general: |
448 |
%\[ |
449 |
% \begin{array}{cc} |
450 |
% \vlinf{\rais}{}{ \normal(t_1), \dots, \normal(t_k) \seqar \normal(t) }{ \normal(t_1), \dots, \normal(t_k) \seqar \safe(t)} |
451 |
%\end{array} |
452 |
%\] |
453 |
%} |
454 |
% |
455 |
$\basic$ axioms are represented by designated initial sequents. |
456 |
For instance here are some initial sequents corresponding to some of the $\basic$ axioms: |
457 |
\[ |
458 |
\small |
459 |
\begin{array}{l} |
460 |
\begin{array}{cccc} |
461 |
\vlinf{}{}{\seqar \safe (0)}{}& |
462 |
\vlinf{}{}{\safe(t) \seqar \safe(\succ{} t)}{}& |
463 |
\vlinf{}{}{ \safe (t) \seqar 0 \neq \succ{} t}{} & |
464 |
\vlinf{}{}{\safe (s) , \safe (t) , \succ{} s = \succ{} t\seqar s = t }{}\\ |
465 |
\end{array} |
466 |
\\ |
467 |
\vlinf{}{}{\safe (t) \seqar t = 0 \cor \exists y^\safe . t = \succ{} y }{} |
468 |
\qquad |
469 |
\vlinf{}{}{\safe(s), \safe(t) \seqar \safe(s+t) }{}\\ |
470 |
\vlinf{}{}{\normal (s), \safe(t) \seqar \safe(s \times t) }{} |
471 |
\qquad |
472 |
\vlinf{}{}{\normal (s), \normal(t) \seqar \safe(s \smsh t) }{}\\ |
473 |
\vlinf{}{}{\normal(t) \seqar \safe(t) }{} |
474 |
\end{array} |
475 |
\] |
476 |
|
477 |
The sequent system for $\arith^i$ extends $\LK$ by the $\basic$, $\cpind{\Sigma^\safe_i } $ and $\rais$ rules. |
478 |
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. |
479 |
In fact, by \emph{free-cut elimination} results \cite{Takeuti87,Cook:2010:LFP:1734064} we may actually say something much stronger. |
480 |
|
481 |
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$. |
482 |
|
483 |
\begin{theorem} |
484 |
[Typed variable normal form] |
485 |
\label{thm:normal-form} |
486 |
If $\arith^i\proves A$ then there is a $\arith^i$ sequent proof $\pi$ of $A$ such that each line has the form: |
487 |
\[ |
488 |
\normal(\vec u), \safe (\vec x), \Gamma \seqar \Delta |
489 |
\] |
490 |
where $\Gamma \seqar \Delta$ contains only $\Sigma^\safe_i$ formulae for which the sorting $(\vec u ;\vec x)$ is compatible. |
491 |
\end{theorem} |
492 |
|
493 |
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))$: |
494 |
\[ |
495 |
\small |
496 |
\vliinf{}{}{ \normal(\vec u) , \safe (\vec x) , \Gamma , A(0) \seqar A(t(\vec u)), \Delta }{ \normal(u), \normal (\vec u) , \safe (\vec x) , \Gamma, A(u) \seqar A(\succ{0} u) , \Delta }{ \normal(u) ,, \normal(\vec u ) , \safe (\vec x) , \Gamma, A(u) \seqar A(\succ{1} u) , \Delta } |
497 |
\] |
498 |
Notice that $\normal(t(\vec u))$ is a consequence of $\normal (\vec u)$ already in $\basic$, due to the axioms \eqref{ax:a}-\eqref{ax:h}. |
499 |
That the variables of $t$ can be assumed to occur already in the premisses is due to weakening. |
500 |
Indeed, the proof of this result 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. |
501 |
|
502 |
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$: |
503 |
\[ |
504 |
\vliinf{\rais\cut}{}{\normal (\vec u) , \Gamma \seqar \Delta}{\normal (\vec u) \seqar \exists x^\safe . A(x)}{\normal (u) , A(u) , \Gamma \seqar \Delta} |
505 |
\] |
506 |
|
507 |
Finally, as is usual in bounded arithmetic, we use distinguished rules for our relativised quantifiers \cite{Buss86book}, although we use ones that satisfy the aforementioned constraints. For instance, we include the following rules, from which the remaining ones are similar: |
508 |
\[ |
509 |
\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)} |
510 |
\quad |
511 |
\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) } |
512 |
\] |
513 |
\[ |
514 |
\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 } |
515 |
\] |
516 |
with the usual side conditions and where, in $\rigrul{\exists}$, $(\vec u ; \vec x)$ is compatible with $t$. |