Statistiques
| Révision :

root / CSL16 / arithmetic.tex @ 71

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

1
\section{A variant of arithmetic in linear logic}
2

    
3
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

    
5

    
6
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
\[
8
!(A\land B) \equiv (!A \land !B)
9
\]
10
Notice that the right-left direction is already valid in usual linear logic, but the left-right direction requires weakening.
11

    
12
%We define a variant of arithmetic inspired by Bellantoni and Hofmann's $A^1_2$. We describe later some connections to bounded arithmetic.
13

    
14

    
15
\newcommand{\lang}{\mathcal L}
16

    
17
\subsection{Axiomatisation and an equivalent rule system}
18

    
19
\begin{definition}
20
[Language]
21
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
\end{definition}
23

    
24
$\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

    
26
\begin{remark}
27
[Interpretation of natural numbers]
28
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
\end{remark}
30

    
31

    
32
The `basic' axioms are essentially the axioms of Robinson arithmetic (or Peano Arithmetic without induction) without axioms for addition and multiplication.
33
%\footnote{They are also similar to the `generative' axioms of Leivant's intrinsic theories [cite] for this signature.} 
34
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

    
36
\newcommand{\wordcntr}{\word_\cntr}
37
\newcommand{\natcntr}{\nat_\cntr}
38
\newcommand{\geneps}{\word_{\epsilon}}
39
\newcommand{\genzer}{\word_{0}}
40
\newcommand{\genone}{\word_{1}}
41

    
42

    
43
\newcommand{\sepeps}{\epsilon}
44
\newcommand{\sepzer}{\succ_{0}}
45
\newcommand{\sepone}{\succ_{1}}
46

    
47
\newcommand{\inj}{\mathit{inj}}
48
\newcommand{\surj}{\mathit{surj}}
49

    
50
\newcommand{\basic}{\mathit{BASIC}}
51

    
52
\begin{definition}
53
[Basic axioms]
54
The theory $\basic$ consists of the following axioms:
55
\[
56
\begin{array}{rl}
57
%\wk & (A \land B )\limp A \\
58
\geneps & \word(\epsilon) \\
59
\genzer & \forall x^\word . \word(\succ_0 x) \\
60
\genone & \forall x^\word . \word(\succ_1 x) \\
61
\sepeps & \forall x^\word . (\epsilon \neq \succ_0 x \land \epsilon \neq \succ_1 x) \\
62
\sepzer & \forall x^\word , y^\word. ( \succ_0 x = \succ_0 y \limp x=y ) \\
63
\sepone & \forall x^\word , y^\word. ( \succ_1 x = \succ_1 y \limp x=y ) \\
64
\inj & \forall x^\word . \succ_0 x \neq \succ_1 x \\
65
\surj & \forall x^\word . (x = \epsilon \laor \exists y^\word . x = \succ_0 y \laor \exists y^\word . x = \succ_1 y ) \\
66
\noalign{\smallskip}
67
\wordcntr & \forall x^\word . (\word(x) \land \word(x)) 
68
\end{array}
69
\]
70
\end{definition}
71

    
72
\begin{definition}
73
[Induction]
74
The induction schema, denoted $\ind$, consists of the following schema,
75
\[
76
\begin{array}{rl}
77
& A(\epsilon) \\
78
\limp & !(\forall x^{!\word} . ( A(x) \limp A(\succ_0 x) ) ) \\
79
\limp & !(\forall x^{!\word} . ( A(x) \limp A(\succ_1 x) ) ) \\
80
\limp & \forall x^{!\word} . A(x)
81
\end{array}
82
\]
83
for each formula $A(x)$.
84

    
85
For a class of formulae $\Xi$, we write $\cax{\Xi}{\ind}$ to denote the set of induction axioms when $A(x) \in \Xi$. 
86

    
87
We write $I\Xi$ to denote the theory consisting of $\basic$ and $\cax{\Xi}{\ind}$.
88
\end{definition}
89

    
90

    
91
\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
\begin{proposition}
93
[Equivalent rules]
94
$\basic$ is equivalent to the following set of rules,
95
\[
96
\vlinf{}{}{\seqar \word (\epsilon)}{}
97
\quad
98
\vlinf{}{}{\word(t) \seqar \word(\succ_0 t)}{}
99
\quad
100
\vlinf{}{}{\word(t) \seqar \word(\succ_1 t)}{}
101
\qquad \qquad 
102
\vlinf{}{}{\word(t) \seqar \word(t) \land \word(t) }{}
103
\]
104
\[
105
\vlinf{}{}{ \word (t)  , \epsilon = \succ_0 t \seqar }{} 
106
\quad
107
\vlinf{}{}{ \word (t)  , \epsilon = \succ_1 t \seqar }{}
108
\quad
109
\vlinf{}{}{\word (s) , \word (t)  , \succ_0 s = \succ_0 t\seqar s = t }{}
110
\quad
111
\vlinf{}{}{\word (s) , \word (t)  , \succ_1 s = \succ_1 t\seqar s = t }{}
112
\]
113
\[
114
\vlinf{}{}{\word(t), \succ_0 t = \succ_1 t \seqar}{}
115
\quad
116
\vlinf{}{}{\word (t) \seqar t = \epsilon \laor \exists y^\word . t = \succ_0 y \laor \exists y^\word . t = \succ_1 y }{}
117
\]
118
\vspace{1em}
119
and $\ind$ is equivalent to,
120
\[
121
\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
\]
123
where, in all cases, $t$ varies over arbitrary terms.
124
\end{proposition}
125

    
126
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
\begin{proof}
128
We give only the case for induction, the others being routine.
129

    
130
Let us assume the induction axiom and derive the rule.
131

    
132
\todo{}
133
\end{proof}
134

    
135
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

    
137
%
138
%\subsection{Equivalent rule systems}
139
%Instead of weakening and induction axioms, we consider the following rules, which are provably equivalent:
140
%
141
%\[
142
%\vlinf{\lefrul{\wk}}{}{\Gamma, A \seqar \Delta}{\Gamma \seqar \Delta}
143
%\quad
144
%\vlinf{\rigrul{\wk}}{}{\Gamma \seqar \Delta, A}{\Gamma \seqar \Delta}
145
%\quad
146
%\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
%\]
148
%
149
%\todo{provable equivalence, if necessary.}
150
%
151
%The inclusion of the first two rules places us in an \emph{affine} setting, whereas the induction rule allows better proof theoretic manipulation.
152
%
153
%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
%\[
155
%\vlinf{\natcntr}{}{\nat(t) \seqar \nat(t) \land \nat(t) }{}
156
%\quad
157
%\vlinf{\nat_\epsilon}{}{\seqar \nat (\epsilon)}{}
158
%\quad
159
%\vlinf{\nat_0}{}{\nat(t) \seqar \nat(\succ_0 t)}{}
160
%\quad
161
%\vlinf{\nat_1}{}{\nat(t) \seqar \nat(\succ_1 t)}{}
162
%\]
163
%\[
164
%\vlinf{\epsilon^0}{}{ \nat (t)  , \epsilon = \succ_0 t \seqar }{} 
165
%\quad
166
%\vlinf{\epsilon^1}{}{ \nat (t)  , \epsilon = \succ_1 t \seqar }{}
167
%\quad
168
%\vlinf{\succ_0}{}{\nat (s) , \nat (t)  , \succ_0 s = \succ_0 t\seqar s = t }{}
169
%\quad
170
%\vlinf{\succ_1}{}{\nat (s) , \nat (t)  , \succ_1 s = \succ_1 t\seqar s = t }{}
171
%\]
172
%\[
173
%\vlinf{\inj}{}{\nat(t), \succ_0 t = \succ_1 t \seqar}{}
174
%\quad
175
%\vlinf{\surj}{}{\nat (t) \seqar t = \epsilon , \exists y^\nat . t = \succ_0 y , \exists y^\nat . t = \succ_1 y }{}
176
%\]
177
%%in place of their corresponding axioms.
178
%
179
%%\todo{in existential above, is there a prenexing problem?}
180
%
181
%
182
%\anupam{
183
%NEW INDUCTION STEP:
184
%\[
185
%\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
%\]
187
%
188
%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
%}
190

    
191

    
192
\subsection{Provably convergent functions}
193

    
194
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

    
196
\begin{definition}
197
	[Equational specifications and convergence]
198
	An \emph{equational specification} is a set of equations between terms.
199
	
200
	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
	\[
202
	\bigotimes_{A \in \eqspec} ! \forall \vec x . A
203
	\ \limp \ 
204
	\forall \vec x^\word . \word (f (\vec x) )
205
	\]
206
	\end{definition}
207
	
208
	
209
\begin{proposition}
210
	\label{prop:eq-spec-model}
211
	For every equational specification $\eqspec$, its universal closure has a model.
212
\end{proposition}
213
\begin{proof}
214
	\todo{Proof. Also, need to specify that model extends $\Word$?}
215
\end{proof}
216

    
217
	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
%	\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
	We avoid this problem by appealing to the deduction theorem and further invertibility arguments:
220
	
221
	
222
	Let us write $\closure{\eqspec}$ for the closure of a specification $\eqspec$ under substitution of terms.
223
	
224
	\begin{lemma}
225
		\label{lemma:spec-norm-form}
226
	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
	\end{lemma}
228
	\begin{proof}
229
		\todo{Use deduction theorem and invertibility of $\forall$-right rule.}
230
	\end{proof}	
231
	
232
	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

    
234

    
235
\subsection{$\word$-guarded quantifiers, rules and cut-reduction cases}
236

    
237
\begin{definition}
238
	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
	
240
	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
	\begin{itemize}
242
		\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
		\item If $A \in \Sigma^\word_i$ then $\exists x^\word . A \in \Sigma^\word_i$.
244
		\item If $A \in \Pi^\word_i$ then $\forall x^\word . A \in \Pi^\word_i$.
245
		\item If $A,B \in \Sigma^\word_i$ then $A \lor B$ and $A\land B \in \Sigma^\word_i$.
246
		\item If $A,B \in \Pi^\word_i$ then $A \lor B$ and $A\land B \in \Pi^\word_i$.
247
	\end{itemize}
248
\end{definition}
249

    
250
%For the quantifiers $\exists x^N $ and $\forall x^N$ we introduce the following rules, which are compatible with free-cut elimination:
251
For the quantifiers $\exists x^\word $ and $\forall x^\word$ we introduce the following rules, which are derivable:
252

    
253
\[
254
\begin{array}{cc}
255
\vlinf{}{}{\Gamma \seqar \Delta, \forall x^\word . A(x)}{\Gamma, \word(a) \seqar \Delta , A(a)}
256
\quad & \quad
257
\vlinf{}{}{\Gamma, \word(t),\forall x^\word A(x) \seqar \Delta}{\Gamma,  A(t) \seqar \Delta}
258
\\
259
\noalign{\bigskip}
260
\vlinf{}{}{\Gamma , \exists x^\word A(x) \seqar \Delta}{\Gamma, \word(a), A(a) \seqar \Delta}
261
\quad &\quad 
262
\vlinf{}{}{\Gamma, \word(t) \seqar \Delta , \exists x^\word . A(x)}{\Gamma  \seqar \Delta, A(t)}
263
\end{array}
264
\]
265

    
266
%\begin{proposition}
267
%	Any principal cut between the quantifier rules above and a logical step is reducible.
268
%	\end{proposition}
269
\begin{proposition}\label{prop:logicalstepguardedquantifer}
270
	Any cut between the principal formula of a quantifier rule above and the principal formula of  a logical step is reducible.
271
	\end{proposition}
272
\begin{proof}
273
 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
\end{proof}	
275
	
276
		\begin{corollary}
277
		[Free-cut elimination for guarded quantifiers]
278
		  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
\end{corollary}
280
\begin{proof}
281
  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
  \begin{itemize}
283
  \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
  \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
  \end{itemize}
286
  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
\end{proof}
288
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

    
290
\patrick{@Anupam: The statement above is what we do, right?}