Statistiques
| Révision :

root / CSL16 / arithmetic.tex @ 71

Historique | Voir | Annoter | Télécharger (14,48 ko)

1 47 adas
\section{A variant of arithmetic in linear logic}
2 33 adas
3 53 adas
For the remainder of this article we will consider an implementation of arithmetic in the sequent calculus based on the theory $\bharith$ of Bellantoni and Hofmann in \cite{BelHof:02}. The initial rules that we present are obtained from $\bharith$ by using linear logic connectives in place of their analogues, calibrating the use of additives or multiplicatives in order to be compatible with the completeness and witnessing arguments that we present in later sections. We also make use free variables and the structural delimiters of the sequent calculus to control the logical complexity of nonlogical rules.
4 47 adas
5 47 adas
6 54 adas
Henceforth, we will work in the \emph{affine} variant of linear logic, which validates weakening: $(A \land B )\limp A$. There are many reasons for this; essentially it has not much effect on complexity while also creating a more robust proof theory. For example it induces the following equivalence:
7 33 adas
\[
8 33 adas
!(A\land B) \equiv (!A \land !B)
9 33 adas
\]
10 53 adas
Notice that the right-left direction is already valid in usual linear logic, but the left-right direction requires weakening.
11 33 adas
12 53 adas
%We define a variant of arithmetic inspired by Bellantoni and Hofmann's $A^1_2$. We describe later some connections to bounded arithmetic.
13 33 adas
14 33 adas
15 53 adas
\newcommand{\lang}{\mathcal L}
16 33 adas
17 54 adas
\subsection{Axiomatisation and an equivalent rule system}
18 53 adas
19 53 adas
\begin{definition}
20 53 adas
[Language]
21 53 adas
We define the language $\lang$ consisting of the constant symbol $\epsilon$, unary function symbols $\succ_0 , \succ_1$ and the predicate symbol  $\word$, together with countably many function symbols $f,g,h$ etc.
22 53 adas
\end{definition}
23 53 adas
24 53 adas
$\lang$-structures are typically extensions of $\Word = \{ 0,1 \}^*$, in which $\epsilon, \succ_0, \succ_1$ are intended to have their usual interpretations. The $\word$ predicate is intended to indicate those elements of the model that are binary words (in the same way as Peano's $N$ predicate indicates those elements that are natural numbers).
25 53 adas
26 54 adas
\begin{remark}
27 54 adas
[Interpretation of natural numbers]
28 54 adas
Notice that the set $\Nat^+$ of positive integers is $\lang$-isomorphic to $\Word$ under the interpretation $\{ \epsilon \mapsto 1 , \succ_0 (x) \mapsto 2x , \succ_1 (x) \mapsto 2x+1 \}$, so we could equally consider the following axiomatisations as theories over $\Nat^+$.
29 54 adas
\end{remark}
30 53 adas
31 53 adas
32 54 adas
The `basic' axioms are essentially the axioms of Robinson arithmetic (or Peano Arithmetic without induction) without axioms for addition and multiplication.
33 54 adas
%\footnote{They are also similar to the `generative' axioms of Leivant's intrinsic theories [cite] for this signature.}
34 54 adas
They insist that, in any model, the set induced by $\word (x)$ has the free algebra $\Word$ as an initial segment. We also have a designated contraction rule for the $\word$ predicate.
35 53 adas
36 54 adas
\newcommand{\wordcntr}{\word_\cntr}
37 54 adas
\newcommand{\natcntr}{\nat_\cntr}
38 54 adas
\newcommand{\geneps}{\word_{\epsilon}}
39 54 adas
\newcommand{\genzer}{\word_{0}}
40 54 adas
\newcommand{\genone}{\word_{1}}
41 33 adas
42 33 adas
43 33 adas
\newcommand{\sepeps}{\epsilon}
44 33 adas
\newcommand{\sepzer}{\succ_{0}}
45 33 adas
\newcommand{\sepone}{\succ_{1}}
46 33 adas
47 33 adas
\newcommand{\inj}{\mathit{inj}}
48 33 adas
\newcommand{\surj}{\mathit{surj}}
49 33 adas
50 53 adas
\newcommand{\basic}{\mathit{BASIC}}
51 53 adas
52 33 adas
\begin{definition}
53 53 adas
[Basic axioms]
54 53 adas
The theory $\basic$ consists of the following axioms:
55 33 adas
\[
56 33 adas
\begin{array}{rl}
57 53 adas
%\wk & (A \land B )\limp A \\
58 54 adas
\geneps & \word(\epsilon) \\
59 54 adas
\genzer & \forall x^\word . \word(\succ_0 x) \\
60 54 adas
\genone & \forall x^\word . \word(\succ_1 x) \\
61 54 adas
\sepeps & \forall x^\word . (\epsilon \neq \succ_0 x \land \epsilon \neq \succ_1 x) \\
62 54 adas
\sepzer & \forall x^\word , y^\word. ( \succ_0 x = \succ_0 y \limp x=y ) \\
63 54 adas
\sepone & \forall x^\word , y^\word. ( \succ_1 x = \succ_1 y \limp x=y ) \\
64 54 adas
\inj & \forall x^\word . \succ_0 x \neq \succ_1 x \\
65 54 adas
\surj & \forall x^\word . (x = \epsilon \laor \exists y^\word . x = \succ_0 y \laor \exists y^\word . x = \succ_1 y ) \\
66 54 adas
\noalign{\smallskip}
67 54 adas
\wordcntr & \forall x^\word . (\word(x) \land \word(x))
68 33 adas
\end{array}
69 33 adas
\]
70 54 adas
\end{definition}
71 33 adas
72 54 adas
\begin{definition}
73 54 adas
[Induction]
74 54 adas
The induction schema, denoted $\ind$, consists of the following schema,
75 33 adas
\[
76 54 adas
\begin{array}{rl}
77 54 adas
& A(\epsilon) \\
78 54 adas
\limp & !(\forall x^{!\word} . ( A(x) \limp A(\succ_0 x) ) ) \\
79 54 adas
\limp & !(\forall x^{!\word} . ( A(x) \limp A(\succ_1 x) ) ) \\
80 54 adas
\limp & \forall x^{!\word} . A(x)
81 54 adas
\end{array}
82 33 adas
\]
83 54 adas
for each formula $A(x)$.
84 33 adas
85 54 adas
For a class of formulae $\Xi$, we write $\cax{\Xi}{\ind}$ to denote the set of induction axioms when $A(x) \in \Xi$.
86 33 adas
87 54 adas
We write $I\Xi$ to denote the theory consisting of $\basic$ and $\cax{\Xi}{\ind}$.
88 54 adas
\end{definition}
89 34 adas
90 59 adas
91 59 adas
\anupam{in fact just give general case for a universal closed formula. Then remark about invertibility of negation giving purely positive initial steps. These occur in section 6 so no need to write them out here.}
92 54 adas
\begin{proposition}
93 54 adas
[Equivalent rules]
94 54 adas
$\basic$ is equivalent to the following set of rules,
95 34 adas
\[
96 65 pbaillot
\vlinf{}{}{\seqar \word (\epsilon)}{}
97 39 adas
\quad
98 65 pbaillot
\vlinf{}{}{\word(t) \seqar \word(\succ_0 t)}{}
99 34 adas
\quad
100 65 pbaillot
\vlinf{}{}{\word(t) \seqar \word(\succ_1 t)}{}
101 54 adas
\qquad \qquad
102 65 pbaillot
\vlinf{}{}{\word(t) \seqar \word(t) \land \word(t) }{}
103 34 adas
\]
104 39 adas
\[
105 65 pbaillot
\vlinf{}{}{ \word (t)  , \epsilon = \succ_0 t \seqar }{}
106 39 adas
\quad
107 65 pbaillot
\vlinf{}{}{ \word (t)  , \epsilon = \succ_1 t \seqar }{}
108 39 adas
\quad
109 65 pbaillot
\vlinf{}{}{\word (s) , \word (t)  , \succ_0 s = \succ_0 t\seqar s = t }{}
110 39 adas
\quad
111 65 pbaillot
\vlinf{}{}{\word (s) , \word (t)  , \succ_1 s = \succ_1 t\seqar s = t }{}
112 39 adas
\]
113 39 adas
\[
114 65 pbaillot
\vlinf{}{}{\word(t), \succ_0 t = \succ_1 t \seqar}{}
115 39 adas
\quad
116 65 pbaillot
\vlinf{}{}{\word (t) \seqar t = \epsilon \laor \exists y^\word . t = \succ_0 y \laor \exists y^\word . t = \succ_1 y }{}
117 39 adas
\]
118 54 adas
\vspace{1em}
119 54 adas
and $\ind$ is equivalent to,
120 54 adas
\[
121 55 pbaillot
\vliinf{}{}{ !N(t) , !\Gamma , A(\epsilon) \seqar A(t), ?\Delta }{ !N(a) , !\Gamma, A(a) \seqar A(\succ_0 a) , ?\Delta }{ !N(a) , !\Gamma, A(a) \seqar A(\succ_1 a) , ?\Delta  }
122 54 adas
\]
123 54 adas
where, in all cases, $t$ varies over arbitrary terms.
124 54 adas
\end{proposition}
125 34 adas
126 54 adas
Note, in particular, that since this set of rules is closed under substitution of terms for free variables, free-cut elimination, Thm.~\ref{thm:free-cut-elim}, applies.
127 54 adas
\begin{proof}
128 54 adas
We give only the case for induction, the others being routine.
129 34 adas
130 54 adas
Let us assume the induction axiom and derive the rule.
131 34 adas
132 54 adas
\todo{}
133 54 adas
\end{proof}
134 39 adas
135 58 adas
Notice, in particular, that when converting from an $\ind$ axiom instance to a rule instance (or vice-versa) the induction formula remains the same. For this reason when we consider theories that impose logical restrictions on induction we can use either interchangeably.
136 43 adas
137 54 adas
%
138 54 adas
%\subsection{Equivalent rule systems}
139 54 adas
%Instead of weakening and induction axioms, we consider the following rules, which are provably equivalent:
140 54 adas
%
141 54 adas
%\[
142 54 adas
%\vlinf{\lefrul{\wk}}{}{\Gamma, A \seqar \Delta}{\Gamma \seqar \Delta}
143 54 adas
%\quad
144 54 adas
%\vlinf{\rigrul{\wk}}{}{\Gamma \seqar \Delta, A}{\Gamma \seqar \Delta}
145 54 adas
%\quad
146 54 adas
%\vliinf{\pind}{}{ !N(t) , !\Gamma , A(\epsilon) \seqar A(t), ?\Delta }{ !N(a) , !\Gamma, A(a) \seqar A(\succ_0 a) , ?\Delta }{ !N(a) , !\Gamma, A(a) \seqar A(\succ_0 a) , ?\Delta  }
147 54 adas
%\]
148 54 adas
%
149 54 adas
%\todo{provable equivalence, if necessary.}
150 54 adas
%
151 54 adas
%The inclusion of the first two rules places us in an \emph{affine} setting, whereas the induction rule allows better proof theoretic manipulation.
152 54 adas
%
153 54 adas
%Finally, for each universally quantified axiom, we consider instead the schema of initial rules with unbound terms in place of universally quantified variables, again for proof theoretic reasons:
154 54 adas
%\[
155 54 adas
%\vlinf{\natcntr}{}{\nat(t) \seqar \nat(t) \land \nat(t) }{}
156 54 adas
%\quad
157 54 adas
%\vlinf{\nat_\epsilon}{}{\seqar \nat (\epsilon)}{}
158 54 adas
%\quad
159 54 adas
%\vlinf{\nat_0}{}{\nat(t) \seqar \nat(\succ_0 t)}{}
160 54 adas
%\quad
161 54 adas
%\vlinf{\nat_1}{}{\nat(t) \seqar \nat(\succ_1 t)}{}
162 54 adas
%\]
163 54 adas
%\[
164 54 adas
%\vlinf{\epsilon^0}{}{ \nat (t)  , \epsilon = \succ_0 t \seqar }{}
165 54 adas
%\quad
166 54 adas
%\vlinf{\epsilon^1}{}{ \nat (t)  , \epsilon = \succ_1 t \seqar }{}
167 54 adas
%\quad
168 54 adas
%\vlinf{\succ_0}{}{\nat (s) , \nat (t)  , \succ_0 s = \succ_0 t\seqar s = t }{}
169 54 adas
%\quad
170 54 adas
%\vlinf{\succ_1}{}{\nat (s) , \nat (t)  , \succ_1 s = \succ_1 t\seqar s = t }{}
171 54 adas
%\]
172 54 adas
%\[
173 54 adas
%\vlinf{\inj}{}{\nat(t), \succ_0 t = \succ_1 t \seqar}{}
174 54 adas
%\quad
175 54 adas
%\vlinf{\surj}{}{\nat (t) \seqar t = \epsilon , \exists y^\nat . t = \succ_0 y , \exists y^\nat . t = \succ_1 y }{}
176 54 adas
%\]
177 54 adas
%%in place of their corresponding axioms.
178 54 adas
%
179 54 adas
%%\todo{in existential above, is there a prenexing problem?}
180 54 adas
%
181 54 adas
%
182 54 adas
%\anupam{
183 54 adas
%NEW INDUCTION STEP:
184 54 adas
%\[
185 54 adas
%\vliiinf{\pind}{}{!\Gamma, !\nat(t) , \nat (\vec x) \seqar A(t, \vec x) }{!\Gamma , \nat (\vec x) \seqar A(\epsilon, \vec x) }{ !\Gamma, !\nat (a) , \nat (\vec x) , A(a, \vec x) \seqar A(\succ_i a, \vec x) }{!\Gamma, !\nat (a) , \nat (\vec x) , A(a, \vec x) \seqar A(\succ_i a, \vec x)}
186 54 adas
%\]
187 54 adas
%
188 54 adas
%Need to examine strength of this: somewhat weaker since needs actual premiss for base case (only significant because of linear logic), but somewhat stronger because of use of $\nat(\vec x)$ on the left in context.
189 54 adas
%}
190 33 adas
191 54 adas
192 60 adas
\subsection{Provably convergent functions}
193 54 adas
194 60 adas
As in the work of Bellantoni and Hofmann \cite{BelHof:02} and Leivant before [cite], our programs are \emph{equational specifications}, sets of equations. These are expressive enough to define every partial recursive function, which is the reason why we also need the $\word$ predicate to have a meaningful notion of `provably total function'.
195 60 adas
196 60 adas
\begin{definition}
197 60 adas
	[Equational specifications and convergence]
198 60 adas
	An \emph{equational specification} is a set of equations between terms.
199 60 adas
200 60 adas
	The \emph{convergence statement} $\conv (f , \eqspec)$ for an equational specification $\eqspec$ and a function symbol $f$ (that occurs in $\eqspec$) is the following formula:
201 60 adas
	\[
202 60 adas
	\bigotimes_{A \in \eqspec} ! \forall \vec x . A
203 60 adas
	\ \limp \
204 60 adas
	\forall \vec x^\word . \word (f (\vec x) )
205 60 adas
	\]
206 60 adas
	\end{definition}
207 64 adas
208 64 adas
209 64 adas
\begin{proposition}
210 64 adas
	\label{prop:eq-spec-model}
211 64 adas
	For every equational specification $\eqspec$, its universal closure has a model.
212 64 adas
\end{proposition}
213 64 adas
\begin{proof}
214 64 adas
	\todo{Proof. Also, need to specify that model extends $\Word$?}
215 64 adas
\end{proof}
216 60 adas
217 60 adas
	One issue is that a convergence statement contains universal quantifiers, which is problematic for the extraction of functions by the witness function method later on.
218 60 adas
%	\footnote{Intuitively universal quantifiers can be interpreted by type 1 functions. From here, in an intuitionistic setting, a $\forall$-right step can be directly realised, but in the classical setting the presence of side-formulae on the right can cause issues for constructivity.}
219 60 adas
	We avoid this problem by appealing to the deduction theorem and further invertibility arguments:
220 60 adas
221 60 adas
222 60 adas
	Let us write $\closure{\eqspec}$ for the closure of a specification $\eqspec$ under substitution of terms.
223 60 adas
224 64 adas
	\begin{lemma}
225 64 adas
		\label{lemma:spec-norm-form}
226 60 adas
	For any system $\system$, we have that $\system$ proves $\conv (f , \eqspec)$ if and only if $\system \cup \closure{\eqspec}$ proves $\word (\vec a) \seqar \word ( f (\vec a) )$.
227 64 adas
	\end{lemma}
228 60 adas
	\begin{proof}
229 64 adas
		\todo{Use deduction theorem and invertibility of $\forall$-right rule.}
230 60 adas
	\end{proof}
231 60 adas
232 61 adas
	Notice that the initial rules from $ \closure{\eqspec}$ and the conclusion $\word (\vec a) \seqar \word ( f (\vec a) )$ of a convergence proof in this form are free of negation and universal quantifiers.
233 60 adas
234 60 adas
235 57 adas
\subsection{$\word$-guarded quantifiers, rules and cut-reduction cases}
236 33 adas
237 33 adas
\begin{definition}
238 65 pbaillot
	Let us define the quantifiers $\exists x^\word . A$ and $\forall x^\word . A$ as $\exists x . (\word(x) \land A)$ and $\forall x . (\word (x) \limp A) $ respectively.
239 33 adas
240 66 pbaillot
	We define $\Sigma^\word_0 = \Pi^\word_0 $ as the class of formulae that are free of quantifiers. For $i> 0$ we define $\Sigma^\word_i$ and $\Pi^\word_i$ as follows:
241 33 adas
	\begin{itemize}
242 65 pbaillot
		\item If $A \in \Sigma^\word_{i-1} \cup \Pi^\word_{i-1}$ then $A \in \Sigma^\word_i$ and $A \in \Pi^\word_i$.
243 65 pbaillot
		\item If $A \in \Sigma^\word_i$ then $\exists x^\word . A \in \Sigma^\word_i$.
244 65 pbaillot
		\item If $A \in \Pi^\word_i$ then $\forall x^\word . A \in \Pi^\word_i$.
245 65 pbaillot
		\item If $A,B \in \Sigma^\word_i$ then $A \lor B$ and $A\land B \in \Sigma^\word_i$.
246 65 pbaillot
		\item If $A,B \in \Pi^\word_i$ then $A \lor B$ and $A\land B \in \Pi^\word_i$.
247 33 adas
	\end{itemize}
248 33 adas
\end{definition}
249 33 adas
250 65 pbaillot
%For the quantifiers $\exists x^N $ and $\forall x^N$ we introduce the following rules, which are compatible with free-cut elimination:
251 65 pbaillot
For the quantifiers $\exists x^\word $ and $\forall x^\word$ we introduce the following rules, which are derivable:
252 33 adas
253 33 adas
\[
254 33 adas
\begin{array}{cc}
255 65 pbaillot
\vlinf{}{}{\Gamma \seqar \Delta, \forall x^\word . A(x)}{\Gamma, \word(a) \seqar \Delta , A(a)}
256 33 adas
\quad & \quad
257 65 pbaillot
\vlinf{}{}{\Gamma, \word(t),\forall x^\word A(x) \seqar \Delta}{\Gamma,  A(t) \seqar \Delta}
258 33 adas
\\
259 33 adas
\noalign{\bigskip}
260 65 pbaillot
\vlinf{}{}{\Gamma , \exists x^\word A(x) \seqar \Delta}{\Gamma, \word(a), A(a) \seqar \Delta}
261 33 adas
\quad &\quad
262 65 pbaillot
\vlinf{}{}{\Gamma, \word(t) \seqar \Delta , \exists x^\word . A(x)}{\Gamma  \seqar \Delta, A(t)}
263 33 adas
\end{array}
264 33 adas
\]
265 57 adas
266 65 pbaillot
%\begin{proposition}
267 65 pbaillot
%	Any principal cut between the quantifier rules above and a logical step is reducible.
268 65 pbaillot
%	\end{proposition}
269 70 pbaillot
\begin{proposition}\label{prop:logicalstepguardedquantifer}
270 65 pbaillot
	Any cut between the principal formula of a quantifier rule above and the principal formula of  a logical step is reducible.
271 57 adas
	\end{proposition}
272 68 pbaillot
\begin{proof}
273 68 pbaillot
 In the case of such a cut on $\forall x^\word . A(x)$ formula, the reduction is obtained by performing successively the two reduction steps for the $\forall$ and $\limp$ connectives. The case of   $\exists x^\word A(x)$ is similar.
274 68 pbaillot
\end{proof}
275 57 adas
276 68 pbaillot
		\begin{corollary}
277 57 adas
		[Free-cut elimination for guarded quantifiers]
278 68 pbaillot
		  Given a theory  $\mathcal T$, any  $\mathcal T$-proof $\pi$ using $\exists x^\word $ and $\forall x^\word$  rules can be transformed into a $\mathcal T$-proof $\pi'$ with same conclusion sequent and in which all cuts are anchored.
279 68 pbaillot
\end{corollary}
280 70 pbaillot
\begin{proof}
281 70 pbaillot
  First translate the proof $\pi$ into the proof $\pi_0$ where all guarded quantifiers rules have been replaced by their derivation, and say that two rule instances in $\pi_0$ are \textit{siblings} if they come from the same derivation of a guarded quantifier rule. So in $\pi_0$ any two sibling rules are consecutive. Now observe that in the free-cut elimination procedure:
282 70 pbaillot
  \begin{itemize}
283 70 pbaillot
  \item when we do a commutation step of a cut with a $\forall$ (resp. $\exists$ rule) that has a sibling, we can follow it by another commutation of cut with its sibling,
284 70 pbaillot
  \item when we do a logical cut-elimination step on a $\forall$ (resp. $\exists$ rule) that has a sibling, we can follow it by a logical cut-elimination step on its sibling, as illustrated by Prop. \ref{prop:logicalstepguardedquantifer}.
285 70 pbaillot
  \end{itemize}
286 70 pbaillot
  In this way sibling rules remain consecutive in the proof-tree throughout the reduction, and the procedure transforms the proof into one with only anchored cuts.
287 70 pbaillot
\end{proof}
288 70 pbaillot
In the rest of this paper we will consider the system with the guarded quantifiers  $\exists x^\word $ and $\forall x^\word$  and without the former general quantifiers $\exists x$ and $\forall x$.
289 68 pbaillot
290 68 pbaillot
\patrick{@Anupam: The statement above is what we do, right?}