Révision 126 CSL16/final-version/main.tex

main.tex (revision 126)
24 24
\usepackage{cmll}
25 25
\usepackage{bm}
26 26

  
27
\input{macros}
28 27

  
28

  
29
%\newtheorem{theorem}{Theorem}    %% Patrick: added for 'article' class version
30
%\newtheorem{maintheorem}[theorem]{Main Theorem}
31
%\newtheorem{observation}[theorem]{Observation}
32
%\newtheorem{corollary}[theorem]{Corollary}
33
%\newtheorem{lemma}[theorem]{Lemma}
34
\theoremstyle{plain}
35
\newtheorem{proposition}[theorem]{Proposition}
36
%\newtheorem{conjecture}[theorem]{Conjecture}
37
%
38
%\theoremstyle{definition}
39
%\newtheorem{definition}[theorem]{Definition}
40
%\newtheorem{example}[theorem]{Example}
41
%\newtheorem{notation}[theorem]{Notation}
42
%\newtheorem{convention}[theorem]{Convention}
43
%\newtheorem{remark}[theorem]{Remark}
44
%\newtheorem{discussion}[theorem]{Discussion}
45

  
46
\newcommand{\todo}[1]{{\color{red}{\textbf{Todo:} #1}}}
47
\newcommand{\anupam}[1]{{\color{orange}{\textbf{Anupam:} #1}}}
48
\newcommand{\patrick}[1]{{\color{blue}{\textbf{Patrick:} #1}}}
49

  
50
\newcommand{\IH}{\mathit{IH}}
51

  
52
\newcommand{\defined}{:=}
53

  
54
\newcommand{\LL}{\it{LL}}
55
\vllineartrue
56

  
57

  
58
\newcommand{\FV}{\mathit{FV}}
59

  
60

  
61
%specification
62

  
63
\newcommand{\eqspec}{\mathcal E}
64
\newcommand{\closure}[1]{\overline{#1}}
65

  
66
\newcommand{\conv}{\mathit{Conv}}
67

  
68
% theories
69
\newcommand{\theory}{\mathcal T}
70
\newcommand{\system}{\mathcal S}
71

  
72

  
73
%terms
74
\newcommand{\pred}{p}
75
\newcommand{\cond}{C}
76
\renewcommand{\succ}{\mathsf{s}}
77
\renewcommand{\epsilon}{\varepsilon}
78

  
79
% linear connectives
80

  
81
\newcommand{\limp}{\multimap}
82
\renewcommand{\land}{\otimes}
83
\newcommand{\laand}{\&}
84
\newcommand{\laor}{\oplus}
85
\renewcommand{\lor}{\vlpa}
86
\renewcommand{\lnot}[1]{{#1^{\perp}}}
87
\newcommand{\lnotnot}[1]{#1^{\perp \perp}}
88

  
89
% classical connectives
90

  
91
\newcommand{\cimp}{\rightarrow}
92
\newcommand{\cand}{\wedge}
93
\newcommand{\cor}{\vee}
94
\newcommand{\cnot}{\neg}
95

  
96

  
97
\newcommand{\Ax}{\mathit{(Ax)}}
98
\newcommand{\Rl}{\mathit{(Rl)}}
99

  
100
\newcommand{\MELL}{\mathit{MELL}}
101
\newcommand{\MEAL}{\mathit{MELLW}}
102
\newcommand{\MELLW}{\mathit{MELL(W)}}
103

  
104
\newcommand{\Aonetwo}{\mathcal{A}^1_2}
105
\newcommand{\logic}{\mathit{L}_{\mathcal A} }
106

  
107
% predicates
108
\newcommand{\nat}{N}
109
\newcommand{\word}{W}
110

  
111
\newcommand{\Nat}{\mathbb{N}}
112
\newcommand{\Word}{\mathbb{W}}
113

  
114
%axioms
115
\newcommand{\wk}{\mathit{wk}}
116
\newcommand{\impl}{\cimp\text{-}\mathit{l}}
117
\newcommand{\impcomm}{\mathit{com}}
118
\newcommand{\conint}{\cand\text{-}\mathit{i}}
119
\newcommand{\conel}{\cand\text{-}\mathit{e}}
120
\newcommand{\negclass}{\cnot}
121

  
122
%equality
123
\newcommand{\refl}{\mathit{ref}}
124
\newcommand{\symm}{\mathit{sym}}
125
\newcommand{\trans}{\mathit{trans}}
126
\newcommand{\subst}{\mathit{sub}}
127

  
128
%rules
129
\newcommand{\inv}[1]{#1\text{-inv}}
130

  
131
\renewcommand{\mp}{\mathit{mp}}
132
\newcommand{\gen}{\mathit{gen}}
133
\newcommand{\inst}{\mathit{ins}}
134
\newcommand{\id}{\it{id}}
135
\newcommand{\cut}{\it{cut}}
136
\newcommand{\multicut}{\it{mcut}}
137
\newcommand{\indr}{\mathit{PIND}}
138
\newcommand{\nec}{\mathit{nec}}
139
\newcommand{\tax}{\mathit{T}}
140
\newcommand{\four}{\mathit{4}}
141
\newcommand{\kax}{\mathit{K}}
142
\newcommand{\cntr}{\mathit{cntr}}
143

  
144
\newcommand{\lefrul}[1]{#1\text{-}\mathit{l}}
145
\newcommand{\rigrul}[1]{#1\text{-}\mathit{r}}
146

  
147
%consequence relations
148
\newcommand{\admits}{\vDash}
149
\newcommand{\seqar}{\vdash}
150
\newcommand{\proves}{\vdash_e}
151

  
152
%induction
153
\newcommand{\ind}{\mathit{PIND}}
154
\newcommand{\pind}{\mathit{PIND}}
155
\newcommand{\cax}[2]{#1\text{-}#2}
156

  
157
\newcommand{\sigone}{\Sigma^{\word^+}_1 }
158
\newcommand{\sigzer}{\Sigma^{\word^+}_0}
159
\newcommand{\bharith}{\mathcal A^1_2}
160
\newcommand{\arith}{I\sigone}
161

  
162

  
163

  
164
% sizes
165
\newcommand{\height}[1]{\mathit{h}(#1)}
166

  
167

  
29 168
\begin{document}
30 169

  
31 170
% Author macros::begin %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......
77 216

  
78 217

  
79 218

  
80
\input{introduction}
219
\section{Introduction}
220
%\anupam{i put all the notes/suggestions at the end, before references.}
81 221

  
82
\input{preliminaries}
222
\emph{Free-cut elimination}\footnote{Also known as \emph{anchored} or \emph{directed} completeness, \emph{partial} cut-elimination or \emph{weak} cut-elimination in other works.} is a normalisation procedure on formal proofs in systems including nonlogical rules, e.g.\ the axioms and induction rules in arithmetic, introduced in \cite{Takeuti87}. It yields proofs in a form where, essentially, each cut step has at least one of its cut formulas principal for a nonlogical step. It is an important tool for proving witnessing theorems in first-order theories, and in particular it has been extensively used in \emph{bounded arithmetic} for proving complexity bounds on representable functions, by way of the \textit{witness function method} \cite{Buss86book}. 
83 223

  
84
\input{free-cut-elim}
224
Linear logic \cite{Girard87} is a decomposition of both intuitionistic and classical logic, based on a careful analysis of duplication and erasure of formulas. It has been useful in proofs-as-programs correspondences, proof search \cite{Andreoli92} and logic programming \cite{Miller04}. By controlling  structural rules with designated modalities, the \textit{exponentials}, linear logic has allowed for a fine study of complexity bounds in the Curry-Howard interpretation, inducing variants with polynomial-time complexity \cite{GirardSS92:bounded-ll} \cite{Girard98} \cite{Lafont04}. 
225
%   However most of this work has been done for 'purely logical' linear logic, or at least for variants with full cut elimination procedure. 
85 226

  
86
\input{arithmetic}
227
In this work we explore how the finer granularity of linear logic can be used to control complexity in \emph{first-order theories}, restricting the provably convergent functions rather than the typable terms as in the propositional setting.
228
%     aim at exploring in which way the complementary techniques of free-cut elimination and linear logic can be combined to analyze properties of first-order theories in which structural rules play a critical r\^ole. 
229
We believe this to be of general interest, in particular to understand the effect of substructural restrictions on nonlogical rules, e.g.\ induction, in mathematical theories. Some related works exist, e.g.\ the na\"ive set theories of Girard and Terui \cite{Girard94:lll} \cite{Terui04}, but overall it seems that the first-order proof theory of linear logic is still rather undeveloped; in particular, to our knowledge, there seems to be no general form of free-cut elimination available in the literature (although special cases occur in \cite{LincolnMSS92} and \cite{Baelde12}). Thus our first contribution, in Sect.~\ref{sect:free-cut-elim}, is to provide general sufficient conditions on nonlogical rules for a first-order linear logic system to admit free-cut elimination.
87 230

  
88
\input{bc}
231
\newcommand{\FP}{\mathbf{FP}}
89 232

  
90
\input{bc-convergence}
91 233

  
92
\input{wfm}
234
We illustrate the usefulness of this result by proving a witnessing theorem for an arithmetic in linear logic, showing that the provably convergent functions are precisely the polynomial-time computable functions (Sects.~\ref{sect:bc-convergence} and \ref{sect:wfm}), henceforth denoted $\FP$. Our starting point is an axiomatisation $\mathcal{A}_2^1$ from \cite{BelHof:02}, based on a modal logic, already known to characterise $\FP$.
235
%    In this system ,following Leivant \cite{Leivant94:intrinsic-theories} functions are defined by first-order equational specifications. 
236
%    The main result of $\mathcal{A}_2^1$ is then that the provably total functions are exactly the polynomial time class. 
237
This approach, and that of \cite{Leivant94:found-delin-ptime} before, differs from the bounded arithmetic approach since it does not employ bounds on quantifiers, but rather restricts nonlogical rules by substructural features of the modality \cite{BelHof:02} or by \emph{ramification} of formulas  \cite{Leivant94:intrinsic-theories}. The proof technique employed in both cases is a realisability argument, for which \cite{Leivant94:found-delin-ptime} operates directly in intuitionistic logic, whereas \cite{BelHof:02} obtains a result for a classical logic via a double-negation translation, relying on a higher-type generalisation of \emph{safe recursion}
238
%     which is applied to an intuitionistic version of the theory. In  \cite{BelHof:02} the target language of the realizability argument is a higher-order language \cite{Hofmann00}, SLR, based on safe recursion 
239
\cite{BellantoniCook92}. 
240
%     In a second step the result is extended to the classical variant $\mathcal{A}_2^1$ by using the Friedman A translation.
93 241

  
94
\input{further-work}
242
We show that Buss' witness function method can be employed to extract functions directly for classical systems similar to $\mathcal{A}_2^1$ based in linear logic, by taking advantage of free-cut elimination. The De Morgan normal form available in classical (linear) logic means that the functions we extract remain at ground type, based on the usual safe recursive programs of \cite{BellantoniCook92}. A similar proof method was used by Cantini in \cite{Cantini02}, who uses combinatory terms as the model of computation as opposed to the equational specifications in this work.\footnote{This turns out to be important due to the handling of right-contraction steps in the witnessing argument.}
95 243

  
96
\input{conclusions}
244
%    We show that the witness function method can be employed to extract functions directly for classical systems similar to $\mathcal{A}_2^1$ based on linear logic, taking advantage of free-cut elimination. De Morgan normal forms available in classical (linear) logic mean that extracted functions remain at ground type, based on the safe recursive programs of \cite{BellantoniCook92}. A similar proof method was used by Cantini \cite{Cantini02} using combinatory logic as the model of computation as opposed to the equational specifications in this work.\footnote{This turns out to be important due to the handling of right-contraction steps in the witnessing argument.}
97 245

  
246
Our result holds for an apparently weaker theory than $\mathcal{A}_2^1$, with induction restricted to positive existential formulas in a way similar to Leivant's $\mathit{RT}_0$ system in \cite{Leivant94:intrinsic-theories} (see also \cite{Marion01}), but the precise relationship between the two logical settings is unclear.
247
%
248
%   Our result holds for an apparently weaker theory than $\mathcal{A}_2^1$, with induction restricted to positive existential formulas in a way similar to Leivant's $\mathit{RT}_0$ system in \cite{Leivant94:intrinsic-theories}, but the precise relationship between the two logical settings is unclear.
249
%    We illustrate in the same time the relationship between  $\mathcal{A}_2^1$ and linear logic, which was hinted but not investigated in the original paper  \cite{BelHof:02}.  
250
We conclude in Sect.~\ref{sect:conclusions} with a survey of related work and some avenues for further applications of the free-cut elimination result. 
251

  
252
%More detailed proofs of the various results herein can be found in the appendices, Sects.~\ref{sect:app-preliminaries}-\ref{sect:app-wfm}.
253

  
254
A version of this article containing further proof details in appendices is available \cite{BaiDas}.
255
%in the appendices, Sects.~\ref{sect:app-preliminaries}-\ref{sect:app-wfm}. 
256
%Everything else remains the same, with the exception of this paragraph.
257

  
258

  
259
\section{Preliminaries}
260
\label{sect:preliminaries}
261
%
262
%\todo{consider removing and just have a section on linear logic, including free-cut elimination.}
263

  
264

  
265
%
266
%
267
%\paragraph*{Notation}
268
%Fix conventions here for use throughout:
269
%\begin{itemize}
270
%\item Eigenvariables: $a, b , c$.
271
%\item (Normal) variables: $u,v,w$. (only when distinction is important, e.g.\ $u^{!\nat}$).
272
%\item (Safe) variables: $x,y,z$. (as above, e.g.\ $x^\nat$.)
273
%\item Terms: $r,s,t$.
274
%\item Formulae: $A,B,C$.
275
%\item Atomic formulae: $p,q$.
276
%\item Free variables in a term, formula, sequent: $FV(u)$, $FV(A)$, $FV(\Gamma)$
277
%\item Sequents: $\Gamma, \Delta, \Sigma, \Pi$.
278
%\item lists of formulas $A(\vec{x})$, $!A(\vec{x})$ (in particular for $A=N$).
279
%\item Proofs: $\pi, \rho, \sigma$.
280
%\item Theories: $\mathcal T$. Sequent systems: $\mathcal S$.
281
%\end{itemize}
282
%
283
%\subsection{Linear logic}
284

  
285
%\anupam{use a system that is already in De Morgan form, for simplicity.}
286
%\anupam{Have skipped units, can reconsider this when in arithmetic. Also in affine setting can be recovered by any contradiction/tautology.}
287

  
288
We formulate linear logic without units with usual notation for the multiplicatives, additives and exponentials from \cite{Girard87}. We restrict negation to the atoms, so that formulae are always in De Morgan normal form, 
289
%and this is reflected in the sequent system below. We have included 
290
and we also consider
291
rules for arbitrary weakening when working in affine settings.
292

  
293
%\anupam{positive and negative.}
294

  
295

  
296

  
297

  
298

  
299
\begin{definition}
300
	%[Sequent calculus for linear logic]
301
	%[Sequent calculus for affine linear logic]
302
	\label{def:LLsequentcalculus}
303
	The sequent calculus for (affine) linear logic is as follows:\footnote{We consider a two-sided system since it is more intuitive for certain nonlogical rules, e.g.\ induction, and also convenient for the witness function method we use in Sect.~\ref{sect:wfm}.}
304
	\[
305
	\small
306
	\begin{array}{l}
307
	\begin{array}{cccc}
308
	\vlinf{\lefrul{\bot}}{}{p, \lnot{p} \seqar }{}
309
	& \vlinf{\id}{}{p \seqar p}{}
310
	& \vlinf{\rigrul{\bot}}{}{\seqar p, \lnot{p}}{}
311
	& \vliinf{\cut}{}{\Gamma, \Sigma \seqar \Delta , \Pi}{ \Gamma \seqar \Delta, A }{\Sigma, A \seqar \Pi}
312
	\\
313
	\noalign{\bigskip}
314
	%\text{Multiplicatives:} & & & \\
315
	%\noalign{\bigskip}
316
	\vliinf{\lefrul{\lor}}{}{\Gamma,\Sigma, A \lor B \seqar \Delta, \Pi}{\Gamma, A \seqar \Delta}{\Sigma , B \seqar \Pi}
317
	&
318
	\vlinf{\lefrul{\land}}{}{\Gamma, A\land B \seqar \Delta}{\Gamma, A , B \seqar \Delta}
319
	&
320
	\vlinf{\rigrul{\lor}}{}{\Gamma \seqar \Delta, A \lor B}{\Gamma \seqar \Delta, A, B}
321
	&
322
	\vliinf{\rigrul{\land}}{}{\Gamma, \Sigma \seqar \Delta , \Pi , A \land B}{\Gamma \seqar \Delta , A}{\Sigma \seqar \Pi , B}
323
	\\
324
	\noalign{\bigskip}
325
	%\text{Additives:} & & & \\
326
	%\noalign{\bigskip}
327
	\vliinf{\lefrul{\laor}}{}{\Gamma, A \laor B \seqar \Delta}{\Gamma , A \seqar \Delta}{\Gamma, B \seqar \Delta}
328
	&
329
	\vlinf{\lefrul{\laand}}{}{\Gamma, A_1\laand A_2 \seqar \Delta}{\Gamma, A_i \seqar \Delta}
330
	&
331
	%\vlinf{\lefrul{\laand}}{}{\Gamma, A\laand B \seqar \Delta}{\Gamma, B \seqar \Delta}
332
	%\quad
333
	\vlinf{\rigrul{\laor}}{}{\Gamma \seqar \Delta, A_1\laor A_2}{\Gamma \seqar \Delta, A_i}
334
	&
335
	%\vlinf{\rigrul{\laor}}{}{\Gamma \seqar \Delta, A\laor B}{\Gamma \seqar \Delta, B}
336
	%\quad
337
	\vliinf{\rigrul{\laand}}{}{\Gamma \seqar \Delta, A \laand B }{\Gamma \seqar \Delta, A}{\Gamma \seqar \Delta, B}
338
	\\
339
	\noalign{\bigskip}
340
	%\text{Exponentials:} & & & \\
341
	%\noalign{\bigskip}
342
	\vlinf{\lefrul{?}}{}{!\Gamma, ?A \seqar ?\Delta}{!\Gamma , A \seqar ?\Delta}
343
	&
344
	\vlinf{\lefrul{!}}{}{\Gamma, !A \seqar \Delta}{\Gamma, A \seqar \Delta}
345
	&
346
	\vlinf{\rigrul{?}}{}{\Gamma \seqar \Delta, ?A}{\Gamma \seqar \Delta, A}
347
	&
348
	\vlinf{\rigrul{!}}{}{!\Gamma \seqar ?\Delta, !A}{!\Gamma \seqar ?\Delta, A}
349
	\\
350
	\noalign{\bigskip}
351
	%\text{Structural:} & & & \\
352
	%\noalign{\bigskip}
353
	
354
	%\vlinf{\lefrul{\wk}}{}{\Gamma, !A \seqar \Delta}{\Gamma \seqar \Delta}  %% linear logic weakening
355
	\vlinf{\lefrul{\wk}}{}{\Gamma, A \seqar \Delta}{\Gamma \seqar \Delta}
356
	&
357
	\vlinf{\lefrul{\cntr}}{}{\Gamma, !A \seqar \Delta}{\Gamma, !A, !A \seqar \Delta}
358
	&
359
	%\vlinf{\rigrul{\wk}}{}{\Gamma \seqar \Delta, ?A }{\Gamma \seqar \Delta}   %% linear logic weakening
360
	
361
	\vlinf{\rigrul{\wk}}{}{\Gamma \seqar \Delta, A }{\Gamma \seqar \Delta}
362
	&
363
	\vlinf{\rigrul{\cntr}}{}{\Gamma \seqar \Delta, ?A}{\Gamma \seqar \Delta, ?A, ?A}
364
	\\
365
	\noalign{\bigskip}
366
	\vlinf{\lefrul{\exists}}{}{\Gamma, \exists x . A(x) \seqar \Delta}{\Gamma, A(a) \seqar \Delta}
367
	&
368
	\vlinf{\lefrul{\forall}}{}{\Gamma, \forall x. A(x) \seqar \Delta}{\Gamma, A(t) \seqar \Delta}
369
	&
370
	\vlinf{\rigrul{\exists}}{}{\Gamma \seqar \Delta, \exists x . A(x)}{ \Gamma \seqar \Delta, A(t)}
371
	&
372
	\vlinf{\rigrul{\forall}}{}{\Gamma \seqar \Delta, \forall x . A(x)}{ \Gamma \seqar \Delta, A(a) } \\
373
	%\noalign{\bigskip}
374
	% \vliinf{mix}{}{\Gamma, \Sigma \seqar \Delta , \Pi}{ \Gamma \seqar \Delta}{\Sigma \seqar \Pi} &&&
375
	\end{array}
376
	\end{array}
377
	\]
378
	where $p$ is atomic, $i \in \{ 1,2 \}$, $t$ is a term and the eigenvariable $a$ does not occur free in $\Gamma$ or $\Delta$.
379
\end{definition}
380
%\todo{$\limp$ abbreviation for ...}
381
%\todo{bracketing}
382

  
383
We do not formally include a symbol for implication but we sometimes write $A \limp B$ as shorthand for $\lnot{A} \lor B$, where $\lnot A$ is the De Morgan dual of $A$. We often omit brackets under associativity, and when writing long implications we assume the right-most bracketing.
384

  
385
We will use standard terminology to track formulae in proofs, as presented in e.g.\ \cite{Buss98:intro-proof-theory}.
386
In particular, each rule has a distinguished \textit{principal formula}, e.g.\
387
$A \lor B$ in the rule $\lefrul{\lor}$ (and similarly for all rules for the binary connectives) and $?A$ in the rule $\rigrul{\cntr}$, and \emph{active formulae}, e.g.\ $A$ and $B$ in $\lefrul{\lor}$ and so on. These induce the notions of (direct) descendants and ancestors in proofs, as in \cite{Buss98:intro-proof-theory}.
388
%The  \textit{direct ancestor} relation on occurrences of formulas in a proof is defined to keep track of identity of formulas from line to line, in the usual way.
389

  
390

  
391
% Observe that we do not consider here any exchange rules, the sequence are made of multisets of formulas and exchanges are implicit. Note that this system is \textit{affine} in the sense that it includes general weakening rules $\rigrul{\wk}$ and  $\lefrul{\wk}$, while in linear logic   $\rigrul{\wk}$ (resp. $\lefrul{\wk}$) is restricted to formulas of the form $?A$ (resp. $!A$).   In the following though, by linear logic we will mean affine linear logic.
392
\subsection{Theories and systems}
393

  
394
%  \anupam{need to add a note on semantics}
395
%  \anupam{mention equality rules}
396
%  \anupam{mention equality axioms and first-order theories and models at some point.}
397

  
398
A \emph{language} is a set of nonlogical symbols (i.e.\ constants, functions, predicates) and a \emph{theory} is a set of closed formulae over some language. We assume that all theories contain the axioms of equality:
399
% \[
400
% \begin{array}{rl}
401
%\refl & \forall x . x = x \\
402
%\symm & \forall x, y. (x = y \limp y = x )\\
403
%\trans & \forall x , y , z . ( x = y \limp y = z \limp x = z ) \\
404
%\subst_f & \forall \vec x , \vec y . (\vec x = \vec y \limp f(\vec x) = f(\vec y) ) \\
405
%\subst_P & \forall \vec x , \vec y. (\vec x = \vec y \limp P(\vec x) \limp P(\vec y)  )
406
% \end{array}
407
%\left\{
408
\begin{equation}
409
\label{eqn:equality-theory}
410
\begin{array}{l}
411
\forall x . x = x \quad, \quad \forall x, y. (x = y \limp y = x )\quad, \quad \forall x , y , z . ( x = y \limp y = z \limp x = z ) \\ \forall \vec x , \vec y . (\vec x = \vec y \limp f(\vec x) = f(\vec y) )  \quad , \quad \forall \vec x , \vec y. (\vec x = \vec y \limp P(\vec x) \limp P(\vec y)  )
412
\end{array}
413
\end{equation}
414
%\right\}
415
% \]
416
where $\vec x = \vec y$ is shorthand for $x_1 = y_1 \land \vldots \land x_n = y_n$.
417

  
418
\newcommand{\init}{\mathit{init}}    
419
We consider \emph{systems} of `nonlogical' rules extending Dfn.~\ref{def:LLsequentcalculus}, which we write as follows,
420
\[
421
\begin{array}{cc}
422
\vlinf{\init}{}{ \seqar A}{}  &  \vlinf{(R)}{}{ !\Gamma , \Sigma' \seqar \Delta' , ? \Pi  }{ \{!\Gamma , \Sigma_i \seqar \Delta_i , ? \Pi \}_{i \in I} }
423
\end{array}
424
\]
425
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:
426
\begin{enumerate}
427
	\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   
428
	$ !\Gamma,  ? \Pi$ are called \textit{context formulas}. In $\init$ $A$ is called a principal formula.
429
	\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$.
430
	\item A system $\system$ 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).  
431
	\item  In $(R)$  the sequent $ \Sigma'$ (resp. $\Delta'$) does not contain any formula of the shape $?B$ (resp. $!B$), and  in $\init$ the formula $A$ is not of the form  $!B$.
432
\end{enumerate}
433

  
434
%The distinction between modal and nonmodal formulae in $(R)$ induces condition 1
435
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. Condition 4 
436
% and the conventions of 1 
437
is peculiar to our linear logic setting in order to carry out certain proof-theoretic manipulations for the free-cut elimination argument in Sect.~\ref{sect:free-cut-elim}.
438
%  
439

  
440

  
441
Observe that $\init$ rules can actually be seen as particular cases of $(R)$ rules, with no premise, so in the following we will only consider $(R)$ rules.
442

  
443

  
444
%  \patrick{Anupam: note that I had to strengthen the conditions for the rules (R). Condition (1) is needed 
445
%  to be able to commute a cut with (R), in the case where this cut is with a principal formula of a   ($\rigrul{!}$) rule. 
446
%  
447
%  Condition (2) is a sufficient condition to avoid the following situation: cut between a principal formula in say $\Delta'$ in the conclusion of an (R) rule (left premise), and a context formula in $!\Gamma$ in the conclusion of another (R) rule (right premise). Indeed this is not an anchored cut in our sense, but we cannot eliminate it in general (because we cannot commute the cut with (R) up the right premise).
448
%  }
449

  
450

  
451

  
452

  
453
To each theory $\theory$ we formally associate the system of $\init$ rules $\seqar A$ for each $A \in \theory$.\footnote{Notice that this naively satisfies condition 3 since theories consist of only closed formulae.}  A proof in such a system will be called a \textit{ $\mathcal T$-proof}, or just {proof} when there is no risk of confusion.
454

  
455

  
456

  
457

  
458
%    
459
%  
460
%  In what follows we will be interested in an example of theory  $\mathcal T$ which is a form of arithmetic.
461

  
462
%   Let us give an example of a possible nonlogical rule that appears later in Sect.~\ref{sect:arithmetic}:
463
%   
464
%   \[
465
%	\vliinf{\ind}{}{ !\word(t), !\Gamma , A(\epsilon) \seqar A(t) , ?\Delta }{!\Gamma , !\word(a), A(a) \seqar A(s_0 a ), ?\Delta }{ !\Gamma , !\word(a), A(a) \seqar A(s_1 a ), ?\Delta }
466
%\]
467
%
468
%So here we have $I=\{0,1\}$ (two premises), $\Sigma_i=!\word(a), A(a)$ and $\Delta_i= A(s_i a )$ for $i=0,1$, $\Sigma'= !\word(t), A(\epsilon)$, $\Delta'= A(t)$. So condition 2 is satisfied provided $a\notin FV(!\Gamma, ?\Delta)$ and $a \notin FV(t)$. 
469

  
470

  
471
%\[
472
%	\vliinf{}{(x \notin \FV(\Gamma, \Delta))}{ !\Gamma , A(\epsilon) \seqar A(t) , ?\Delta }{ !\Gamma , A(x) \seqar A(s_0 x ), ?\Delta }{ !\Gamma, A(x) \seqar A( s_1 x ) , ?\Delta}
473
%	\]
474

  
475

  
476
%  A proof in such a system will be called a \textit{ $\mathcal T$-proof}, or just \textit{proof} when there is no risk of confusion.
477
%   The rules of Def. \ref{def:LLsequentcalculus} are called \textit{logical rules} while the rules (ax) and (R) of $\mathcal T$  are called \textit{non-logical}.
478
%  
479
%  As usual rules come with a notion of \textit{principal formulas}, which are a subset of the rules in the conclusion, e.g.:
480
%  $A \lor B$ in rule $\lefrul{\lor}$ (and similarly for all rules for connectives); $?A$ in rule $\rigrul{\cntr}$; all conclusion formulas in axiom rules;
481
%   $\Sigma', \Delta'$ in rule (R).
482

  
483

  
484
% \anupam{15/04: add definitions of theories and systems, unions, rules vs axioms etc. and abuses of notation:
485
% 	sometimes use same symbol for theory and system if fixed in advance;
486
% 	sometimes coincide axiom with initial rule;
487
% 	}
488

  
489

  
490
\begin{remark}
491
	[Semantics]
492
	The models we consider are usual Henkin models, with linear connectives interpreted by their classical counterparts. Consequently, we do not have any completeness theorem for our theories, but we do have soundness.
493
\end{remark}
494

  
495

  
496
\subsection{Some basic proof-theoretic results}
497
We briefly survey some well-known results for theories of linear logic.
498

  
499
A rule is \emph{invertible} if each of its upper sequents is derivable from its lower sequent.
500
\begin{proposition}
501
	[Invertible rules, folklore]
502
	\label{prop:invertible-rules}
503
	The rules $\lefrul{\land}, \rigrul{\lor}, \lefrul{\laor}, \rigrul{\laand}, \lefrul{\exists}, \rigrul{\forall}$ are invertible.
504
\end{proposition}
505
We will typically write $\inv{c}$ to denote the inverse derivation for a logical symbol $c$.
506

  
507
%[cite Avron:`semantics and proof theory of linear logic']
508
%
509
%We will make much use of the deduction theorem, allowing us to argue informally within a theory for hypotheses that have been promoted.
510
%
511
%%$$
512
%%	\vliiinf{}{}{ \seqar A}{ \seqar C}
513
%%	$$
514
%
515
%%\[
516
%%	\vliiinf{R}{}{ !\Gamma , \Sigma' \seqar \Delta' , ? \Pi  }{ \{!\Gamma , \Sigma_i \seqar \Delta_i , ? \Pi \}_{i \in I} }
517
%%	\]
518

  
519
We also rely on the following result, which is also folklore but appeared before in \cite{Avron88}.
520

  
521
\begin{theorem}
522
	[Deduction, folklore]
523
	\label{thm:deduction}
524
	For any theory $\theory$ and closed formula $A $, $\mathcal T \cup\{A\}$ proves $B$ if and only if $\mathcal{T}$ proves $!A \limp B$.
525
\end{theorem}
526

  
527
%The occurrence of $!$ in the deduction theorem above is crucial; this restriction is one of the reasons it can be difficult to reason informally in theories over linear logic.
528

  
529

  
530
Due to these results notice that, in place of the equality axioms, we can work in a quantifier-free system of rules:
531
\begin{proposition}
532
	[Equality rules]
533
	\eqref{eqn:equality-theory} is equivalent to the following system of rules,
534
	\[
535
	\vlinf{}{}{\seqar t = t}{}
536
	\qquad
537
	\vlinf{}{}{s = t \seqar t = s}{}
538
	\qquad 
539
	\vlinf{}{}{r = s, s= t \seqar r = t}{}
540
	\qquad 
541
	\vlinf{}{}{\vec s = \vec t \seqar f(\vec s) = f(\vec t)}{}
542
	\qquad
543
	\vlinf{}{}{\vec s = \vec t, P(\vec s) \seqar P(\vec t)}{}
544
	\]
545
	where $r,s,t $ range over terms.
546
\end{proposition}
547

  
548

  
549

  
550

  
551

  
552
%\subsection{Converting axioms to rules in $\MELLW$}
553
%
554
%\begin{proposition}
555
%	An axiom $\Ax$ of the form,
556
%	\[
557
%	A_1 \limp \vldots \limp A_m \limp !B_1 \limp \vldots \limp !B_n \limp C
558
%	\]
559
%	is equivalent (over propositional $\LL$) to the rule $\Rl$:
560
%	\[
561
%	\vliiinf{\Rl}{}{ !\Gamma , A_1 , \dots , A_m \seqar C , ? \Delta  }{ !\Gamma \seqar B_1 , ?\Delta }{\vldots }{ !\Gamma \seqar B_n , ?\Delta}
562
%	\]
563
%\end{proposition}
564
%\begin{proof}
565
%	Let us first assume $\Ax$ and derive $\Rl$. From the axiom and Currying, we have a proof of:
566
%	\begin{equation}\label{eqn:curried-axiom}
567
%	A_1 , \dots , A_m , !B_1 , \dots , !B_n \seqar C
568
%	\end{equation}
569
%	
570
%	This can simply be cut against each of the premisses of $\Rl$, applying appropriate contractions and necessitations, to derive it:
571
%	\[
572
%	\vlderivation{
573
%		\vliq{c}{}{!\Gamma , A_1 , \dots , A_m \seqar C , ?\Delta }{
574
%			\vliin{\cut}{}{!\Gamma, \dots , !\Gamma , A_1 , \dots , A_m \seqar C , ?\Delta, \dots , ?\Delta }{
575
%				\vlin{!}{}{!\Gamma \seqar !B_n, ?\Delta }{\vlhy{!\Gamma \seqar B_n , ?\Delta }}
576
%			}{
577
%			\vliin{\cut}{}{\qquad \qquad \qquad \qquad  \vlvdots \qquad \qquad \qquad \qquad }{
578
%				\vlin{!}{}{!\Gamma \seqar !B_1 , ?\Delta}{\vlhy{!\Gamma \seqar B_1, ?\Delta }}
579
%			}{\vlhy{ A_1 , \dots , A_m , !B_1 , \dots , !B_n \seqar C } }
580
%		}
581
%	}
582
%}
583
%\]
584
%
585
%Now let us prove $\Ax$ (again in the form of \eqref{eqn:curried-axiom}) by using $\Rl$ as follows:
586
%\[
587
%\vliiinf{\Rl}{}{ A_1 , \dots , A_m , !B_1 , \dots , !B_n \seqar C }{  \vlderivation{
588
%		\vlin{w}{}{ !B_1 , \dots , !B_n \seqar B_1 }{
589
%			\vlin{!}{}{!B_1 \seqar B_1 }{
590
%				\vlin{\id}{}{B_1 \seqar B_1 }{\vlhy{}}
591
%			}
592
%		}
593
%	}  }{\vldots}{
594
%	\vlderivation{
595
%		\vlin{w}{}{ !B_1 , \dots , !B_n \seqar B_n }{
596
%			\vlin{!}{}{!B_n \seqar B_n }{
597
%				\vlin{\id}{}{B_n \seqar B_n }{\vlhy{}}
598
%			}
599
%		}
600
%	}
601
%}
602
%\]
603
%\end{proof}
604
%
605
%
606
%\textbf{NB:} The proof does not strictly require side formulae $? \Delta$ on the right of the sequent arrow $\seqar$, it would work without them, e.g.\ for the intuitionistic case. In a one-sided setting there is no difference.
607
%
608
%
609
%
610
%\begin{corollary}
611
%	The induction axiom of $A^1_2$ is equivalent to the rule:
612
%	\[
613
%	\vliinf{}{(x \notin \FV(\Gamma, \Delta))}{ !\Gamma , !N(t), A(\epsilon) \seqar A(t) , ?\Delta }{ !\Gamma , !N(x), A(x) \seqar A(s_0 x ), ?\Delta }{ !\Gamma, !N(x),  A(x) \seqar A( s_1 x ) , ?\Delta}
614
%	\]
615
%\end{corollary}
616
%\begin{proof}
617
%	By proposition above, generalisation and Currying.
618
%\end{proof}
619
%
620
%\begin{proposition}
621
% The following induction rule is derivable from the one of the previous corollary:
622
%\[
623
%	\vliinf{}{(a, \vec{v}, \vec{x} \notin \FV(\Gamma, \Delta))}{ !\Gamma , !N(\vec{w}), N(\vec{y}), !N(t)  \seqar A(t,\vec{w},\vec{y}) , ?\Delta }{ !\Gamma ,  !N(\vec{v}), N(\vec{x}) \seqar A(\epsilon,\vec{v},\vec{x}), ?\Delta }{ !\Gamma ,  !N(\vec{v}), N(\vec{x}),    A(a,\vec{v},\vec{x}) \seqar  A(s_ia,\vec{v},\vec{x}) , ?\Delta}
624
%	\]
625
%where the second premise corresponds actually to two premises, one for $i=0$ and one for $i=1$.
626
%\end{proposition}
627
%\subsection{Prenexing}
628
%%In the presence of weakening we have a prenex normal form due to the following:
629
%%
630
%%\[
631
%%\vlderivation{
632
%%	\vlin{}{}{\exists x . A \lor B \seqar \exists x . (A(x) \lor B) }{
633
%%		
634
%%		}
635
%%	}
636
%%\]
637
%
638
%Cannot derive prenexing operations, e.g.\ a problem with $\exists x . A \lor B \seqar \exists x . (A(x) \lor B)$. Can safely add prenexing rules? Or not a problem due to Witness predicate?
639

  
640
\section{Free-cut elimination in linear logic}
641
\label{sect:free-cut-elim}
642
% While in plain logical systems such as linear logic cut rules can be eliminated, this is in general not the case anymore when one considers extension with a theory $\mathcal T$ . For this reason we need now to define the kind of cuts that  will remain in proofs after reduction. We will call these \textit{anchored cuts}. 
643
We first define which cut instances may remain in proofs after free-cut elimination.
644
%  They are called \textit{anchored cuts}.
645
%   Our first idea would be to consider as anchored  a cut whose cut-formulas  $A$ in the two premises are both principal for their rule, and at least one of these rules is non-logical. Now, the problem with this tentative definition is that a rule (R) of  $\mathcal T$ can contain several principal formulas  (in $\Sigma'$, $\Delta'$) and so we would like to allow an anchored cut on each of these principal formulas.
646
%  % Consider for instance the following derivation, where we have underlined principal formulas:
647
%  See for instance (the principal formulas are underlined):
648
%  \patrick{Anupam, could you please display this derivation in a suitable way?}
649
%  \[
650
%  \vlderivation{
651
%\vliin{cut_2}{}{ \seqar  \Delta}{
652
%\vliin{cut_1}{}{\seqar A_2 }{\vlin{\rigrul{\lor}}{}{\seqar \underline{A_1}}{}}{\vliin{(R)}{}{\underline{A_1}\seqar \underline{A_2}}{}{} }
653
%}{
654
%\vliin{\lefrul{\land}}{}{\underline{A_2}\seqar \Delta}{}{}
655
%}
656
%}
657
%\]
658
%  Here $cut_1$ is anchored in this sense, but not $cut_2$.   Therefore we propose a more general definition:
659
Since our nonlogical rules may have many principal formulae on which cuts may be anchored, we need a slightly more general notion of principality.
660
\begin{definition}\label{def:anchoredcut}
661
	We define the notions of \textit{hereditarily principal formula} and \textit{anchored cut} in a $\system$-proof, for a system $\system$, by mutual induction as follows:
662
	\begin{itemize}
663
		\item A formula $A$ in a sequent $\Gamma \seqar \Delta$ is \textit{hereditarily principal} for a rule instance (S) if either (i) the sequent is in the conclusion of (S) and $A$ is principal in it, or 
664
		(ii)  the sequent is in the conclusion of an anchored cut, the direct ancestor of $A$ in the corresponding premise is hereditarily principal for the rule instance (S), and the rule (S) is nonlogical.
665
		\item A cut-step is an \textit{anchored cut} if the two occurrences of its cut-formula $A$ in each premise are hereditarily principal for nonlogical steps, or one is hereditarily principal for a nonlogical step and the other one is principal for a logical step.
666
	\end{itemize}
667
	A cut which is not anchored will also be called a \textit{free-cut}.
668
\end{definition}
669
As a consequence of this definition, an anchored cut on a formula $A$ has the following properties:
670
\begin{itemize}
671
	\item At least one of the two premises of the cut has above it a sub-branch of the proof which starts (top-down) with a nonlogical step (R) with $A$ as one of its principal formulas, and then a sequence of anchored cuts in which $A$ is part of the context.
672
	\item The other premise is either of the same form or is a logical step with principal formula $A$. 
673
\end{itemize}
674
%  
675
%  Now, for instance a cut on a (principal) formula $A \lor B$ between a rule $\rigrul{\lor}$ and a rule (R) (where  $A \lor B$ occurs in $\Sigma'$) is anchored, while a cut between 
676
%  a rule $\rigrul{\lor}$ and a rule $\lefrul{\lor}$ is not.
677
%   
678

  
679

  
680
%  With this new definition both $cut_1$ and $cut_2$ in the previous example are anchored.
681

  
682
%   \patrick{@Anupam: if we need to shorten this part, I think we should anyway keep the key lemmas \ref{lem:hereditaryprincipalnonlogical} and \ref{lem:keycommutations}.  In the proof of the thm itself, I would give priority to keep the first case, maybe by skipping the first situation and keeping the second item, $S_1$=$!r$, $?l$ or $R$. Second case could be kept too, and third case could be briefly summarized and pushed in the appendix or online version.}
683

  
684
%   Let us first prove a key lemma on hereditarily principal formulas:
685
Due to condition 4 in Sect.~\ref{sect:preliminaries}, we have the following:
686
\begin{lemma}\label{lem:hereditaryprincipalnonlogical}
687
	A formula occurrence $A$ on the LHS (resp.\ RHS) of a sequent and hereditarily principal for a nonlogical rule (R) 
688
	cannot be of the form $A=?A'$ (resp. $A=!A'$).
689
\end{lemma}
690

  
691

  
692
Now we can state the main result of this section:
693
\begin{theorem}
694
	[Free-cut elimination]
695
	\label{thm:free-cut-elim}
696
	Given a system  $\system$, any  $\system$-proof $\pi$ can be transformed into a $\system$-proof $\pi'$ with same end sequent and without any free-cut.
697
\end{theorem}
698
%The proof will be given below. It will proceed
699
The proof proceeds in a way similar to the classical proof of cut elimination for linear logic,
700
%, but here for eliminating only free-cuts, and one has to check that all steps of the reasoning are compatible with the fact that the proof here also contains $\mathcal{T}$ rules. 
701
%%     Define the \textit{degree} of a formula as the number of logical connectives or quantifiers in it.  Let us first state an easy building-block of the proof, which comes from standard linear logic:
702
%%    \begin{lemma}[Logical non-exponential cut-elimination steps]\label{lem:logical steps}
703
%%    Any cut $c$ whose cut-formulas $A$ are both principal formulas of logical rules distinct from $?$, $!$, $wk$, $cntr$ rules can be replaced in one step by cuts on formulas of strictly lower degree (0, 1 or 2 cuts).
704
%%    \end{lemma}
705
%%    \begin{proof}
706
%%    This is exactly as in plain linear logic. Just note that the case of a quantifier formula involves a substitution by a term $t$ throughout the proof, and this is where we need condition 3 on non-logical rules requiring that they are closed by substitution.
707
%%    \end{proof}
708
%    Actually the most important part of the proof of Thm \ref{thm:free-cut-elim} is  the handling of the commutation steps, since this is where the new non-logical rules could raise some problems.
709
but eliminating only free-cuts and verifying compatibility with our notion of nonlogical rule, in particular for the commutation cases.
710

  
711
First, observe that the only rules in which there is a condition on the context are the following ones: $(\rigrul{\forall})$, $(\lefrul{\exists})$, $(\rigrul{!})$, $(\lefrul{?})$, $(R)$. These are thus the rules for which the commutation with cut steps are not straightforward. Commutations with logical rules  other than $(\rigrul{!})$, $(\lefrul{?})$ are done in the standard way, as in pure linear logic:\footnote{Note that, for the $(\rigrul{\forall})$, $(\lefrul{\exists})$ rules, there might also be a global renaming of eigenvariables if necessary.}
712
\begin{lemma}[Standard commutations]\label{lem:standardcommutations}
713
	Any logical rule  distinct from $(\rigrul{!})$, $(\lefrul{?})$ can be commuted under a cut. If the logical rule is binary this may produce two cuts, each in a separate branch.
714
\end{lemma}
715

  
716

  
717
%     In the following we will need to be more careful about rules $(\rigrul{!})$, $(\lefrul{?})$, $(R)$. For that we establish our second key lemma:
718
For rules $(\rigrul{!})$, $(\lefrul{?})$, $(R)$ we establish our second key lemma:
719
\begin{lemma}[Key commutations]\label{lem:keycommutations}
720
	A cut of the following form, where $?A$ is not principal for $(R)$, can be commuted above the $(R)$ step:
721
	\[
722
	\vliinf{cut}{}{ !\Gamma', \Gamma,  \Sigma'   \seqar \Delta', ?A, ?\Pi, ?\Pi'}
723
	{ \vlinf{(R)}{}{!\Gamma, \Sigma'  \seqar \Delta', ?A, ?\Pi}{  \{ !\Gamma, \Sigma_i  \seqar \Delta_i, ?A, ?\Pi \}_{i\in I} } }
724
	{  
725
		%                    	\vlinf{}{}{?A, !\Gamma' \seqar  ?\Pi'}{} 
726
		?A, !\Gamma' \seqar  ?\Pi'
727
	} 
728
	\]
729
	Similarly if $(R)$ is replaced with $(\rigrul{!})$, with $?A$ in its RHS context, and also for the symmetric situations:
730
	cut on the LHS of the conclusion of an $(R)$ or a $(\lefrul{?})$ step on a (non-principal) formula $!A$, with a sequent $!\Gamma' \seqar  ?\Pi', !A$.
731
\end{lemma}  
732
\begin{proof}
733
	The derivation is transformed as follows:
734
	\[
735
	\vlinf{(R)}{}{ !\Gamma', !\Gamma,  \Sigma'   \seqar \Delta', ?\Pi, ?\Pi'}
736
	{ \vliinf{cut}{}{\{!\Gamma', !\Gamma, \Sigma_i  \seqar \Delta_i, ?\Pi,?\Pi' \}_{i\in I}} {
737
			%                                 		 \vlinf{}{}{ !\Gamma, \Sigma_i  \seqar \Delta_i, ?A, ?\Pi}{}
738
			!\Gamma, \Sigma_i  \seqar \Delta_i, ?A, ?\Pi
739
		} {
740
		%                                 		  \vlinf{}{}{?A, !\Gamma' \seqar  ?\Pi'}{} 
741
		?A, !\Gamma' \seqar  ?\Pi'
742
	} }
743
	\]
744
	Here if an eigenvariable in $\Sigma_i, \Delta_i$ happens to be free in $!\Gamma', ?\Pi'$ we rename it to avoid the collision, which is possible because by condition 2 on nonlogical rules these eigenvariables do not appear in $\Sigma', \Delta'$ or $!\Gamma, ?\Pi$. So the occurrence of $(R)$ in this new subderivation is valid.
745
	
746
	Similarly  for the symmetric derivation with a cut on the LHS of the conclusion of an $(R)$ on a formula $!A$.
747
	The analogous situations with rules  $(\rigrul{!})$ and $(\lefrul{?})$ are handled in the same way, as usual in linear logic.
748
\end{proof}
749
%Now we have all the necessary lemmas to proceed with the proof of the theorem.
750

  
751
Now we can prove the main free-cut elimination result:
752
\begin{proof}[Proof sketch of Thm.~\ref{thm:free-cut-elim}]
753
	Given a cut step $c$ in a proof $\pi$, we call  \emph{degree} $\deg( c)$  the number of connectives and quantifiers of its  cut-formula. Now the \emph{degree} of $\pi$, $\deg( \pi)$, is the multiset of the degrees of its non-anchored cuts. We consider the usual Dershowitz-Manna ordering on multisets of natural numbers \cite{Dershowitz:1979:PTM:359138.359142}.\footnote{Let $M,N: \Nat \to \Nat$ be two multisets of natural numbers. Then $M<N$ if $M\neq N$ and, whenever $M(x) > N(x)$ there is some $y >x$ such that $N(y) > M(y)$. When $M$ and $N$ are finite, i.e.\ have finite support, $<$ is well-founded.}
754
	The proof proceeds by induction on $\deg( \pi)$.  For a given degree we proceed with a sub-induction on the \textit{height} $\height{\pi}$ of the proof.
755
	
756
	Consider a proof $\pi$ of non-null degree. We want to show how to reduce it to a proof of strictly lower degree. Consider a top-most non-anchored cut $c$ in $\pi$, i.e.\ such that there is no non-anchored cut above $c$.  Let us call $A$ the cut-formula, and $(S_1)$ (resp. $(S_2)$) the rule above the left (resp. right) premise of $c$.  
757
	\[    
758
	\vliinf{c \; \; \cut}{}{\Gamma, \Sigma \seqar \Delta , \Pi}{ \vlinf{S_1}{}{\Gamma \seqar \Delta, A}{} }{\vlinf{S_2}{}{\Sigma, A \seqar \Pi}{}}
759
	\]
760
	Intuitively we proceed as follows: if $A$ is not hereditarily principal in one of its premises  we try to commute $c$ with the rule along its left premise  $(S_1)$, and if not possible then commute it with the rule along its right premise $(S_2)$, by Lemmas \ref{lem:hereditaryprincipalnonlogical}, \ref{lem:standardcommutations} and \ref{lem:keycommutations}. If $A$ is hereditarily principal in both premises we proceed with a cut-elimination step, as in standard linear logic. For this second step, the delicate part is the elimination of exponential cuts, for which we use a big-step reduction. This works because the contexts in the nonlogical rules $(R)$ are marked with $!$ (resp. $?$) on the LHS (resp. RHS). 
761
	%    See the appendix for the full proof.
762
\end{proof}
763

  
764
%   \begin{itemize}
765
%    \item \textbf{First case}: the cut-formula $A$ on the l.h.s. of  $c$ is non hereditarily principal. 
766
%    
767
%\begin{itemize}
768
%\item Consider first the situation where $(S_1)$ is not one of the rules $(\rigrul{!})$, $(\lefrul{?})$, $(R)$.
769
%
770
%In this case the commutation of $c$ with $(S_1)$ can be done in the usual way, by using Lemma \ref{lem:standardcommutations}. Let us handle as an example the case where $(S_1)=(\rigrul{\laand})$.
771
%{\small
772
%\[
773
%\vlderivation{
774
%\vliin{c}{}{ \Gamma, \Sigma \seqar B_1\vlan B_2, \Delta, \Pi }{ \vliin{S_1=\rigrul{\vlan}}{}{\Gamma  \seqar B_1\vlan B_2, \Delta, A}{ \vlhy{\Gamma  \seqar B_1, \Delta, A} }{\vlhy{\Gamma  \seqar  B_2,\Delta, A}}}{ \vlhy{ \Sigma, A \seqar  \Pi} }
775
%}
776
%\quad\to\quad
777
%\vlderivation{
778
%\vliin{\rigrul{\vlan}}{}{  \Gamma, \Sigma \seqar B_1\vlan B_2, \Delta, \Pi  }{
779
%\vliin{c_1}{}{\Gamma,\Sigma \seqar B_1, \Delta, \Pi }{ \vlhy{\Gamma  \seqar B_1, \Delta, A} }{\vlhy{ \Sigma, A \seqar  \Pi} }
780
%}{
781
%\vliin{c_2}{}{\Gamma,\Sigma \seqar B_2, \Delta, \Pi }{ \vlhy{\Gamma  \seqar B_2, \Delta, A} }{\vlhy{ \Sigma, A \seqar  \Pi} }
782
%}
783
%}
784
%\]
785
%}
786
%
787
%Observe that here $c$ is replaced by two cuts $c_1$ and $c_2$. Call $\pi_i$ the sub-derivation of last rule $c_i$, for $i=1,2$. As for $i=1, 2$ we have
788
%$\deg{\pi_i}\leq \deg{\pi}$ and $\height{\pi_i}< \height{\pi}$ we can apply the induction hypothesis, and reduce $\pi_i$ to a proof $\pi'_i$ of same conclusion and with
789
%$\deg{\pi'_i} < \deg{\pi_i}$. Therefore  by replacing $\pi_i$ by $\pi'_i$ for $i=1, 2$ we obtain a proof $\pi'$ such that $\deg{\pi'}<\deg{\pi}$.  
790
%
791
%The case (S)=($\lefrul{\laor}$) is identical, and the other cases are similar. % (see the Appendix for more examples). 
792
%
793
%\item Consider now the case where $(S_1)$ is equal to $(\rigrul{!})$, $(\lefrul{?})$ or $(R)$. Let us also assume that the cut-formula is hereditarily principal in its r.h.s. premise, because if this does not hold we can move to the second case below. 
794
%
795
%First consider  $(S_1)=(\rigrul{!})$. As $A$ is not principal in the conclusion of $(\rigrul{!})$ it is of the form $A=?A'$. By assumption we know that  $A=?A'$ in the conclusion of $(S_2)$ is hereditarily principal on the l.h.s., so by Lemma \ref{lem:hereditaryprincipalnonlogical} it cannot be hereditarily principal for a non-logical rule, so by definition of hereditarily principal we deduce that $(S_2)$ is not an $(R)$ rule. It cannot be an  $(\rigrul{!})$ rule either because then $?A'$ could not be a principal formula in its conclusion. Therefore the only possibility is that 
796
% $(S_2)$ is an  $(\lefrul{?})$ rule. So the r.h.s. premise is of the shape $?A',!\Gamma' \seqar ?\Pi'$ and by Lemma \ref{lem:keycommutations} the commutation on the l.h.s. is possible. We can conclude as previously. The case where  $(S_1)=(\lefrul{?})$ is the same.
797
% 
798
% Now consider the case where $(S_1)=(R)$.  As $A$ is not hereditarily principal in the conclusion of $(R)$, it is a context formula and it is on the r.h.s., so by definition of $(R)$ rules it is  the form $A=?A'$. So as before by Lemma \ref{lem:hereditaryprincipalnonlogical} we deduce that   $(S_2)=(\lefrul{?})$, and  so the r.h.s. premise is of the shape $?A',!\Gamma' \seqar ?\Pi'$.  By Lemma \ref{lem:keycommutations} the commutation on the l.h.s. is possible, and so again we conclude as previously.
799
% \end{itemize}
800
%    \item \textbf{Second case}: the cut-formulas on the l.h.s. and r.h.s. of  $c$ are both non hereditarily principal. 
801
%    
802
%   After the first case we are here left with the situation where  $(S_1)$ is equal to $(\rigrul{!})$, $(\lefrul{?})$ or $(R)$.
803
%   \begin{itemize}
804
%    \item Consider the case where  $(S_1)$=$(\rigrul{!})$, $(\lefrul{?})$, so $A$ is of the form $A=?A'$. All cases of commutation of $c$ with $(S_2)$ are as in standard linear logic, except if $(S_2)=(R)$. In this case though we cannot have $A=?A'$ because of the shape of rule $(R)$. So we are done. 
805
%    \item Consider  $(S_1)=(R)$. Again as $A$ is not principal in the conclusion of $(S_1)$ and on the r.h.s. of the sequent it is a context formula, and thus of the form  $A=?A'$. As $?A'$ is not principal in the conclusion of $(S_2)$, it is thus a context formula on the l.h.s. of sequent, and therefore $(S_2)$ is not a rule $(R)$. So $(S_2)$ is a logical rule. If it is not an $(\rigrul{!})$ or an $(\lefrul{?})$ it admits commutation with the cut, and we are done. If it is equal to $(\rigrul{!})$ or $(\lefrul{?})$ it cannot have $?A'$ as a context formula in the l.h.s. of its conclusion, so these subcases do not occur.  
806
%   \end{itemize}
807
% 
808
%   
809
%    \item \textbf{Third case}: the cut-formulas on the l.h.s. and r.h.s. of  $c$ are both  hereditarily principal.
810
%     
811
%    By assumption $c$ is non anchored, so none of the two cut-formulas is hereditarily principal for a non-logical rule $(R)$. We can deduce from that
812
%    that the l.h.s. cut-formula is principal for $(S_1)$ and the r.h.s. cut-formula is principal for $(S_2)$. Call $\pi_1$ (resp. $\pi_2$) the subderivation
813
%    of last rule $(S_1)$ (resp. $(S_2)$).
814
%     
815
%    Then we consider the following sub-cases, in order:
816
%     \begin{itemize}
817
%         \item \textbf{weakening sub-case}: this is the case  when one of the premises of $c$ is a $wk$ rule. W.l.o.g. assume that it is the left premise of $c$ which is conclusion of $\rigrul{\wk}$, with principal formula $A$. We eliminate the cut by keeping only the l.h.s. proof $\pi_1$, removing the last cut $c$ and last    $\rigrul{\wk}$ rule    on $A$, and by adding enough
818
%        $\rigrul{\wk}$, $\lefrul{\wk}$ rules to introduce all the new formulas in the final sequent.  The degree has decreased.
819
%
820
%      \item \textbf{exponential sub-case}: this is when one of the premises of $c$ is conclusion of a $cntr$, $\rigrul{?}$ or $\lefrul{!}$ rule on a formula $?A$ or $!A$, and the other one is not a conclusion of $\wk$.
821
%      
822
%       Assume w.l.o.g. that it is the right premise which is conclusion of $\lefrul{\cntr}$ or $\lefrul{!}$ on $!A$, and thus the only possibility for the left premise is to  be conclusion of $\rigrul{!}$.  This is rule $(S_1)$ on the picture, last rule of the subderivation $\pi_1$, and we denote its conclusion as $!\Gamma' \seqar ?\Delta', !A$. We will use here a global rewriting step. For that consider in $\pi_2$ all the top-most direct ancestors of the cut-formula $!A$, that is to say direct ancestors which do not have any more direct ancestors above. Let us denote them as $!A^{j}$ for $1\leq j \leq k$. Observe that each $!A^{j}$ is principal formula of a rule $\lefrul{!}$ or $\lefrul{wk}$. Denote by $\rho$ the subderivation
823
%       of $\pi_2$ which has as leaves the sequents premises of these  $\lefrul{!}$ or $\lefrul{wk}$ rules with conclusion containing $!A^{j}$.
824
%       Let $\rho'$ be a derivation obtained from $\rho$ by renaming if necessary eigenvariables occurring in premises of rules $\lefrul{\exists}$, $\rigrul{\forall}$, $(R)$  so that none of them belongs to $FV(!\Gamma', ?\Delta')$, where we recall that $!\Gamma' \seqar ?\Delta',!A$ is the l.h.s. premise of the cut $c$.
825
%  Now, let $\pi'_1$ be the immediate subderivation of $\pi_1$, of conclusion       $!\Gamma' \seqar ?\Delta',A$.  We then define the derivation 
826
%  $\rho''$ obtained from   $\rho'$ in the following way:
827
%  \begin{itemize}
828
%  \item add a cut $c_j$ with (a copy) of $\pi'_1$ on $A^j$ at each leaf which is premise of a rule  $\lefrul{!}$;
829
%  \item add to each sequent coming from $\rho'$  an additional context $!\Gamma'$ on the l.h.s. and an additional context $?\Delta'$ on the r.h.s., and additional $wk$ rules to introduce these formulas below the $\lefrul{wk}$ rules on formulas $!A^{j}$;
830
%  \item introduce suitable $\lefrul{cntr}$ and $\rigrul{cntr}$ rules after multiplicative binary rules $\rigrul{\land}$, $\lefrul{\lor}$  in such a way to replace $!\Gamma', !\Gamma'$ (resp. $?\Delta', ?\Delta'$) by  $!\Gamma'$ (resp. $?\Delta'$). 
831
%  \end{itemize}
832
%  
833
%  It can be checked that  $\rho''$ is a valid derivation, because all the conditions for context-sensitive rules $(\rigrul{\forall})$, $(\lefrul{\exists})$, $(\rigrul{!})$, $(\lefrul{?})$, $(R)$ are satisfied. In particular the rules $(\rigrul{!})$, $(\lefrul{?})$, $(R)$ are satisfied because the contexts have been enlarged with $!$ formulas on the l.h.s. of the sequents ($!\Gamma'$) and ?  formulas on the r.h.s. of the sequents ($?\Gamma'$).  
834
%  
835
%  Now, let $\pi'$ be the derivation obtained from $\pi$ by removing the cut $c$ and replacing the subderivation $\rho$ by $\rho''$. The derivation $\pi'$ is a valid one, it has the same conclusion $!\Gamma', \Sigma \seqar ?\Delta', \Pi$ and with respect to $\pi$ we have replaced one non-anchored cut $c$ with at most $k$ ones $c_j$, but which are of strictly lower degree. So $\deg(\pi')<\deg(\pi)$ and we are done.
836
%
837
%      
838
%      \item \textbf{logical sub-case}: we are now left with the case where both premises of $c$ are conclusions of rules others than $?$, $!$, $wk$, $cntr$. We can thus apply Lemma \ref{lem:logical steps}.
839
%         If one of the premises is an axiom $\lefrul{\bot}$, $\id$ or $\rigrul{\bot}$, then $\pi$ can be rewritten to a suitable proof $\pi'$ by removing $c$ and the axiom rule. Otherwise both premises introduce the same connective, either  $\land$, $\lor$, $\laor$, $\laand$, $\forall$ or $\exists$. In each case a specific rewriting rule replaces the cut $c$ with one cut of strictly lower degree. 
840
%      %See the Appendix.
841
%           \end{itemize}
842
%     \end{itemize}
843
%     \end{proof}
844

  
845

  
846
\section{A variant of arithmetic in linear logic}
847
\label{sect:arithmetic}
848
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 axioms that we present are obtained from $\bharith$ by using linear logic connectives in place of their classical analogues, calibrating the use of additives or multiplicatives in order to be compatible with the completeness and witnessing arguments that we present in Sects.~\ref{sect:bc-convergence} and \ref{sect:wfm}. We also make use of free variables and the structural delimiters of the sequent calculus to control the logical complexity of nonlogical rules.
849

  
850

  
851
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 does not have much effect on complexity while also creating a more robust proof theory. For example it induces the equivalence:
852
\(
853
!(A\land B) \equiv (!A \land !B)
854
\).\footnote{Notice that the right-left direction is already valid in usual linear logic, but the left-right direction requires weakening.}
855

  
856

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

  
859

  
860
\newcommand{\lang}{\mathcal L}
861

  
862
\subsection{Axiomatisation and an equivalent rule system}
863

  
864
%\begin{definition}
865
%[Language]
866
We consider the language $\lang$ consisting of the constant symbol $\epsilon$, unary function symbols $\succ_0 , \succ_1$ and the predicate symbol  $\word$, together with function symbols $f,g,h$ etc.
867
%\end{definition}
868
$\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).
869

  
870
As an abbreviation, we write $\word (\vec t)$ for $\bigotimes^{|\vec t|}_{i=1} \word(t_i)$.
871

  
872
\begin{remark}
873
	[Interpretation of natural numbers]
874
	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 what follows as theories over $\Nat^+$.
875
\end{remark}
876

  
877

  
878
The `basic' axioms are essentially the axioms of Robinson arithmetic (or Peano Arithmetic without induction) without axioms for addition and multiplication.
879
%\footnote{They are also similar to the `generative' axioms of Leivant's intrinsic theories [cite] for this signature.} 
880
Let us write $\forall x^\word . A$ for $\forall x . ( \word(x) \limp A )$ and $\exists x^\word . A$ for $\exists x . ( \word(x) \land A )$. We use the abbreviations $\forall x^{!\word}$ and $\exists x^{!\word}$ similarly.
881

  
882
\newcommand{\wordcntr}{\word_\cntr}
883
\newcommand{\natcntr}{\nat_\cntr}
884
\newcommand{\geneps}{\word_{\epsilon}}
885
\newcommand{\genzer}{\word_{0}}
886
\newcommand{\genone}{\word_{1}}
887

  
888

  
889
\newcommand{\sepeps}{\epsilon}
890
\newcommand{\sepzer}{\succ_{0}}
891
\newcommand{\sepone}{\succ_{1}}
892

  
893
\newcommand{\inj}{\mathit{inj}}
894
\newcommand{\surj}{\mathit{surj}}
895

  
896
\newcommand{\basic}{\mathit{BASIC}}
897

  
898
\begin{definition}
899
	[Basic axioms]
900
	The theory $\basic$ consists of the following axioms:
901
	\[
902
	\small
903
	\begin{array}{rl}
904
	%\wk & (A \land B )\limp A \\
905
	%\geneps 
906
	& \word(\epsilon) \\
907
	%\genzer 
908
	& \forall x^\word . \word(\succ_0 x) \\
909
	%\genone 
910
	& \forall x^\word . \word(\succ_1 x) \\
911
	%\sepeps & \forall x^\word . (\epsilon \neq \succ_0 x \land \epsilon \neq \succ_1 x) \\
912
	%\sepzer & \forall x^\word , y^\word. ( \succ_0 x = \succ_0 y \limp x=y ) \\
913
	%\sepone & \forall x^\word , y^\word. ( \succ_1 x = \succ_1 y \limp x=y ) \\
914
	%\inj & \forall x^\word . \succ_0 x \neq \succ_1 x \\
915
	%\surj & \forall x^\word . (x = \epsilon \laor \exists y^\word . x = \succ_0 y \laor \exists y^\word . x = \succ_1 y ) \\
916
	%\noalign{\smallskip}
917
	%\wordcntr & \forall x^\word . (\word(x) \land \word(x)) 
918
	\end{array}
919
	%\quad
920
	\begin{array}{rl}
921
	%\wk & (A \land B )\limp A \\
922
	%\geneps & \word(\epsilon) \\
923
	%\genzer & \forall x^\word . \word(\succ_0 x) \\
924
	%\genone & \forall x^\word . \word(\succ_1 x) \\
925
	%\sepeps 
926
	& \forall x^\word . (\epsilon \neq \succ_0 x \land \epsilon \neq \succ_1 x) \\
927
	%\sepzer 
928
	& \forall x^\word , y^\word. ( \succ_0 x = \succ_0 y \limp x=y ) \\
929
	%\sepone 
930
	& \forall x^\word , y^\word. ( \succ_1 x = \succ_1 y \limp x=y ) \\
931
	%\inj & \forall x^\word . \succ_0 x \neq \succ_1 x \\
932
	%\surj & \forall x^\word . (x = \epsilon \laor \exists y^\word . x = \succ_0 y \laor \exists y^\word . x = \succ_1 y ) \\
933
	%\noalign{\smallskip}
934
	%\wordcntr & \forall x^\word . (\word(x) \land \word(x)) 
935
	\end{array}
936
	%\quad
937
	\begin{array}{rl}
938
	%\wk & (A \land B )\limp A \\
939
	%\geneps & \word(\epsilon) \\
940
	%\genzer & \forall x^\word . \word(\succ_0 x) \\
941
	%\genone & \forall x^\word . \word(\succ_1 x) \\
942
	%\sepeps & \forall x^\word . (\epsilon \neq \succ_0 x \land \epsilon \neq \succ_1 x) \\
943
	%\sepzer & \forall x^\word , y^\word. ( \succ_0 x = \succ_0 y \limp x=y ) \\
944
	%\sepone & \forall x^\word , y^\word. ( \succ_1 x = \succ_1 y \limp x=y ) \\
945
	%\inj 
946
	& \forall x^\word . \succ_0 x \neq \succ_1 x \\
947
	%\surj 
948
	& \forall x^\word . (x = \epsilon \laor \exists y^\word . x = \succ_0 y \laor \exists y^\word . x = \succ_1 y ) \\
949
	%\noalign{\smallskip}
950
	%\wordcntr 
951
	& \forall x^\word . (\word(x) \land \word(x)) 
952
	\end{array}
953
	\]
954
\end{definition}
955

  
956
These axioms insist that, in any model, the set induced by $\word (x)$ has the free algebra $\Word$ as an initial segment. 
957
Importantly, there is also a form of contraction for the $\word$ predicate.
958
We will consider theories over $\basic$ extended by induction schemata:
959

  
960
\begin{definition}
961
	[Induction]
962
	The \emph{(polynomial) induction} axiom schema, $\ind$, consists of the following axioms,
963
	\[
964
	%\begin{array}{rl}
965
	%& A(\epsilon) \\
966
	%\limp & !(\forall x^{!\word} . ( A(x) \limp A(\succ_0 x) ) ) \\
967
	%\limp & !(\forall x^{!\word} . ( A(x) \limp A(\succ_1 x) ) ) \\
968
	%\limp & \forall x^{!\word} . A(x)
969
	%\end{array}
970
	A(\epsilon) 
971
	\limp !(\forall x^{!\word} . ( A(x) \limp A(\succ_0 x) ) ) 
972
	\limp  !(\forall x^{!\word} . ( A(x) \limp A(\succ_1 x) ) ) 
973
	\limp  \forall x^{!\word} . A(x)
974
	\]
975
	for each formula $A(x)$.
976
	
977
	For a class $\Xi$ of formulae, $\cax{\Xi}{\ind}$ denotes the set of induction axioms when $A(x) \in \Xi$. 
978
	
979
	We write $I\Xi$ to denote the theory consisting of $\basic$ and $\cax{\Xi}{\ind}$.
980
\end{definition}
981

  
982
We use the terminology `polynomial induction' to maintain consistency with the bounded arithmetic literature, e.g.\ in \cite{Buss86book}, where it is distinguished from induction on the \emph{value} of a string (construed as a natural number). The two forms have different computational behaviour, specifically with regards to complexity, but we will restrict attention to $\ind$ throughout this work, and thus may simply refer to it as `induction'.
983

  
984

  
985
%\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.}
986
\begin{proposition}
987
	[Equivalent rules]
988
	\label{prop:equiv-rules}
989
	$\basic$ is equivalent to the following set of rules,
990
	\[
991
	\small
992
	\begin{array}{l}
993
	\begin{array}{cccc}
994
	\vlinf{\geneps}{}{\seqar \word (\epsilon)}{}&
995
	\vlinf{\genzer}{}{\word(t) \seqar \word(\succ_0 t)}{}&
996
	\vlinf{\sepeps_0}{}{ \word (t)   \seqar \epsilon \neq \succ_0 t}{} &
997
	\vlinf{\sepzer}{}{\word (s) , \word (t)  , \succ_0 s = \succ_0 t\seqar s = t }{}\\
998
	\vlinf{\inj}{}{\word(t) \seqar\succ_0 t \neq \succ_1 t}{}&
999
	\vlinf{\genone}{}{\word(t) \seqar \word(\succ_1 t)}{}&
1000
	\vlinf{\sepeps_1}{}{ \word (t)   \seqar \epsilon \neq \succ_1 t }{}&
1001
	\vlinf{\sepone}{}{\word (s) , \word (t)  , \succ_1 s = \succ_1 t\seqar s = t }{}
1002
	\end{array}
1003
	\\
1004
	\vlinf{\surj}{}{\word (t) \seqar t = \epsilon \laor \exists y^\word . t = \succ_0 y \laor \exists y^\word . t = \succ_1 y }{}
1005
	\qquad
1006
	\vlinf{\wordcntr}{}{\word(t) \seqar \word(t) \land \word(t) }{}
1007
	\end{array}
1008
	\]
1009
	%\[
1010
	%\vlinf{}{}{\seqar \word (\epsilon)}{}
1011
	%\quad
1012
	%\vlinf{}{}{\word(t) \seqar \word(\succ_0 t)}{}
1013
	%\quad
1014
	%\vlinf{}{}{\word(t) \seqar \word(\succ_1 t)}{}
1015
	%\qquad \qquad 
1016
	%\vlinf{}{}{\word(t) \seqar \word(t) \land \word(t) }{}
1017
	%\]
1018
	%\[
1019
	%\vlinf{}{}{ \word (t)  , \epsilon = \succ_0 t \seqar }{} 
1020
	%\quad
1021
	%\vlinf{}{}{ \word (t)  , \epsilon = \succ_1 t \seqar }{}
1022
	%\quad
1023
	%\vlinf{}{}{\word (s) , \word (t)  , \succ_0 s = \succ_0 t\seqar s = t }{}
1024
	%\quad
1025
	%\vlinf{}{}{\word (s) , \word (t)  , \succ_1 s = \succ_1 t\seqar s = t }{}
1026
	%\]
1027
	%\[
1028
	%\vlinf{}{}{\word(t), \succ_0 t = \succ_1 t \seqar}{}
1029
	%\quad
1030
	%\vlinf{}{}{\word (t) \seqar t = \epsilon \laor \exists y^\word . t = \succ_0 y \laor \exists y^\word . t = \succ_1 y }{}
1031
	%\]
1032
	%\vspace{1em}
1033
	and $\ind$ is equivalent to,
1034
	\begin{equation}
1035
	\label{eqn:ind-rule}
1036
	\small
1037
	\vliinf{\ind}{}{ !\word(t) , !\Gamma , A(\epsilon) \seqar A(t), ?\Delta }{ !\word(a) , !\Gamma, A(a) \seqar A(\succ_0 a) , ?\Delta }{ !\word(a) , !\Gamma, A(a) \seqar A(\succ_1 a) , ?\Delta  }
1038
	\end{equation}
1039
	where, in all cases, $t$ varies over arbitrary terms and the eigenvariable $a$ does not occur in the lower sequent of the $\ind$ rule.
1040
\end{proposition}
1041

  
1042
Note, in particular, that since this system of rules is closed under substitution of terms for free variables, free-cut elimination, Thm.~\ref{thm:free-cut-elim}, applies.
1043

  
1044

  
1045
When converting from a $\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.
1046

  
1047
\begin{remark}
1048
	%\anupam{Mention that two induction rules are not the same. This is crucial in, e.g.\ the completeness section for the case of PRN.}
1049
	Usually the induction axiom is also equivalent to a formulation with a designated premise for the base case:
1050
	\begin{equation}
1051
	\label{eqn:ind-rul-base-prem}
1052
	\vliiinf{}{}{ !\word(t) , !\Gamma  \seqar A(t), ?\Delta }{!\Gamma \seqar A(\epsilon)}{ !\word(a) , !\Gamma, A(a) \seqar A(\succ_0 a) , ?\Delta }{ !\word(a) , !\Gamma, A(a) \seqar A(\succ_1 a) , ?\Delta  }
1053
	\end{equation}
1054
	However, 
1055
	%but 
1056
	this is not true in the linear logic setting since the proof that \eqref{eqn:ind-rul-base-prem} simulates \eqref{eqn:ind-rule} above relies on contraction on the formula $A(\epsilon)$, which is not in general available. Therefore \eqref{eqn:ind-rul-base-prem} is somewhat weaker than \eqref{eqn:ind-rule}, and is in fact equivalent to a version of the induction axiom with $!A(\epsilon)$ in place of $A(\epsilon)$. This distinction turns out to be crucial in Sect.~\ref{sect:bc-convergence}, namely when proving the convergence of functions defined by predicative recursion on notation.
1057
\end{remark}
1058

  
1059
%
1060
%\subsection{Equivalent rule systems}
1061
%Instead of weakening and induction axioms, we consider the following rules, which are provably equivalent:
1062
%
1063
%\[
1064
%\vlinf{\lefrul{\wk}}{}{\Gamma, A \seqar \Delta}{\Gamma \seqar \Delta}
1065
%\quad
1066
%\vlinf{\rigrul{\wk}}{}{\Gamma \seqar \Delta, A}{\Gamma \seqar \Delta}
1067
%\quad
1068
%\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  }
1069
%\]
1070
%
1071
%\todo{provable equivalence, if necessary.}
1072
%
1073
%The inclusion of the first two rules places us in an \emph{affine} setting, whereas the induction rule allows better proof theoretic manipulation.
1074
%
1075
%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:
1076
%\[
1077
%\vlinf{\natcntr}{}{\nat(t) \seqar \nat(t) \land \nat(t) }{}
1078
%\quad
1079
%\vlinf{\nat_\epsilon}{}{\seqar \nat (\epsilon)}{}
1080
%\quad
1081
%\vlinf{\nat_0}{}{\nat(t) \seqar \nat(\succ_0 t)}{}
1082
%\quad
1083
%\vlinf{\nat_1}{}{\nat(t) \seqar \nat(\succ_1 t)}{}
1084
%\]
1085
%\[
1086
%\vlinf{\epsilon^0}{}{ \nat (t)  , \epsilon = \succ_0 t \seqar }{} 
1087
%\quad
1088
%\vlinf{\epsilon^1}{}{ \nat (t)  , \epsilon = \succ_1 t \seqar }{}
1089
%\quad
1090
%\vlinf{\succ_0}{}{\nat (s) , \nat (t)  , \succ_0 s = \succ_0 t\seqar s = t }{}
1091
%\quad
1092
%\vlinf{\succ_1}{}{\nat (s) , \nat (t)  , \succ_1 s = \succ_1 t\seqar s = t }{}
1093
%\]
1094
%\[
1095
%\vlinf{\inj}{}{\nat(t), \succ_0 t = \succ_1 t \seqar}{}
1096
%\quad
1097
%\vlinf{\surj}{}{\nat (t) \seqar t = \epsilon , \exists y^\nat . t = \succ_0 y , \exists y^\nat . t = \succ_1 y }{}
1098
%\]
1099
%%in place of their corresponding axioms.
1100
%
1101
%%\todo{in existential above, is there a prenexing problem?}
1102
%
1103
%
1104
%\anupam{
1105
%NEW INDUCTION STEP:
1106
%\[
1107
%\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)}
1108
%\]
1109
%
1110
%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.
1111
%}
1112

  
1113

  
1114
\subsection{Provably convergent functions}
1115
%
1116
%\anupam{Herbrand-G\"odel equational programs from Kle52, cited in Lei94b.}
1117
%
1118
%\anupam{`coherent' programs, defined by Leivant. = consistent so has a model.}
1119

  
1120
As in the work of Bellantoni and Hofmann \cite{BelHof:02} and Leivant before \cite{Leivant94:found-delin-ptime}, our model of computation is that of Herbrand-G\"odel style \emph{equational specifications}. 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 convergent function'.
1121

  
1122
\begin{definition}
1123
	[Equational specifications and convergence]
1124
	An \emph{equational specification} (ES) is a set of equations between terms. We say that an ES is \emph{coherent} if the equality between any two distinct ground terms cannot be proved by equational logic.
1125
	%	\footnote{This is the quantifier-free fragment of first-order logic with equality and no other predicate symbols.}
1126
	
1127
	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:
1128
	\[
1129
	\bigotimes_{A \in \eqspec} ! \forall \vec x . A
1130
	\ \limp \ 
1131
	\forall \vec x^{! \word} .  \word (f (\vec x) )
1132
	\]
1133
\end{definition}
1134

  
1135

  
1136
The notion of coherence appeared in \cite{Leivant94:found-delin-ptime} and it is important to prevent a convergence statement from being a vacuous implication. In this work we will typically consider only coherent ESs, relying on the following result which is also essentially in \cite{Leivant94:found-delin-ptime}:
1137
\begin{proposition}
1138
	\label{prop:eq-spec-model}
1139
	%	For every equational specification $\eqspec$, its universal closure has a model.
1140
	The universal closure of a coherent ES $\eqspec$ has a model satisfying $\basic + \ind$.
1141
\end{proposition}
1142

  
1143
%\begin{proof}
1144
%%\todo{ take $\Word \cup \{\bot\}$ or use completeness? Omit if no time. }
1145
%Consider the standard model $\Word $ extended by an element $\infty$ with $\succ_0 \infty = \succ_1 \infty = \infty$. Setting $\word = \Word$ means this model satisfies $\basic$. Now, for each function symbol $f$, define $f(\sigma) = \tau$ for every $\sigma, \tau \in \Word$ for which this equation is forced by $\eqspec$. Otherwise define $f(\sigma) = f(\infty) = \infty$.
1146
%\todo{replace with argument using completeness.}
1147
%\end{proof}
1148

  
1149
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.
1150
%	\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.}
1151
We avoid this problem by appealing to the deduction theorem and further invertibility arguments:
1152

  
1153

  
1154
Let us write $\closure{\eqspec}$ for the closure of a specification $\eqspec$ under substitution of terms for free variables.
1155

  
1156
\begin{lemma}
1157
	\label{lemma:spec-norm-form}
1158
	A system $\system$ proves $\conv (f , \eqspec)$ if and only if $\system \cup \closure{\eqspec}$ proves $!\word (\vec a) \seqar \word ( f (\vec a) )$.
1159
\end{lemma}
1160
\begin{proof}[Proof sketch]
1161
	By deduction, Thm.~\ref{thm:deduction}, and invertibility arguments.
1162
\end{proof}	
1163

  
1164
Notice that the initial rules from $ \closure{\eqspec}$ are also closed under term substitution, and so compatible with free-cut elimination, and that $\closure{\eqspec}$ and $\word (\vec a) \seqar \word ( f (\vec a) )$ are free of negation and universal quantifiers.
1165

  
1166

  
1167
\subsection{$\word$-guarded quantifiers, rules and cut-reduction cases}
1168
We consider a quantifier hierarchy here analogous to the arithmetical hierarchy, where each class is closed under positive multiplicative operations. In the scope of this work we are only concerned with the first level:
1169

  
1170
%We now introduce a quantifier hierarchy of formulae so we can identify the theories that we will be concerned with for the remainder of this article.
1171
%
1172
%
1173
\begin{definition}
1174
	%[Quantifier hierarchy]
1175
	We define $\sigzer $ as the class of multiplicative formulae that are free of quantifiers where $\word$ occurs positively.\footnote{Since our proof system is in De Morgan normal form, this is equivalent to saying that there is no occurrence of $\word^\bot$.}
1176
	The class $\sigone$ is the closure of $\sigzer$ by $\exists$, $\lor$ and $\land$.
1177
	%	For $i> 0$ we define $\Sigma^\word_i$ and $\Pi^\word_i$ as follows:
1178
	%	\begin{itemize}
1179
	%		\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$.
1180
	%		\item If $A \in \Sigma^\word_i$ then $\exists x^\word . A \in \Sigma^\word_i$.
1181
	%		\item If $A \in \Pi^\word_i$ then $\forall x^\word . A \in \Pi^\word_i$.
1182
	%		\item If $A,B \in \Sigma^\word_i$ then $A \lor B$ and $A\land B \in \Sigma^\word_i$.
1183
	%		\item If $A,B \in \Pi^\word_i$ then $A \lor B$ and $A\land B \in \Pi^\word_i$.
1184
	%	\end{itemize}
1185
	%	We add $+$ in superscript to a class to restrict it to formulae where $\word$ occurs in only positive context.
1186
\end{definition}
1187

  
1188
For the remainder of this article we mainly work with the theory $\arith$, i.e.\ $\basic + \cax{\sigone}{\ind}$.
1189

  
1190
%\vspace{1em}
1191

  
1192
It will be useful for us to work with proofs using the `guarded' quantifiers $\forall x^\word$ and $\exists x^\word$ in place of their unguarded counterparts, in particular to carry out the argument in Sect.~\ref{sect:wfm}. 
1193
%To this end we introduce rules for these guarded quantifiers and show that they are compatible with free-cut elimination.
1194
%
1195
%For the quantifiers $\exists x^N $ and $\forall x^N$ we introduce the following rules, which are compatible with free-cut elimination:
1196
%For the quantifiers $\exists x^\word $ and $\forall x^\word$ we 
1197
Therefore we define the following rules, which are already derivable:
1198
\[
1199
%\begin{array}{cc}
1200
%\vlinf{}{}{\Gamma \seqar \Delta, \forall x^\word . A(x)}{\Gamma, \word(a) \seqar \Delta , A(a)}
1201
%\quad & \quad
1202
%\vlinf{}{}{\Gamma, \word(t),\forall x^\word A(x) \seqar \Delta}{\Gamma,  A(t) \seqar \Delta}
1203
%\\
1204
%\noalign{\bigskip}
1205
%\vlinf{}{}{\Gamma , \exists x^\word A(x) \seqar \Delta}{\Gamma, \word(a), A(a) \seqar \Delta}
1206
%\quad &\quad 
1207
%\vlinf{}{}{\Gamma, \word(t) \seqar \Delta , \exists x^\word . A(x)}{\Gamma  \seqar \Delta, A(t)}
1208
%\end{array}
1209
\vlinf{}{}{\Gamma \seqar \Delta, \forall x^\word . A(x)}{\Gamma, \word(a) \seqar \Delta , A(a)}
1210
\quad
1211
\vlinf{}{}{\Gamma, \word(t),\forall x^\word A(x) \seqar \Delta}{\Gamma,  A(t) \seqar \Delta}
1212
\quad 
1213
\vlinf{}{}{\Gamma , \exists x^\word A(x) \seqar \Delta}{\Gamma, \word(a), A(a) \seqar \Delta}
1214
\quad
1215
\vlinf{}{}{\Gamma, \word(t) \seqar \Delta , \exists x^\word . A(x)}{\Gamma  \seqar \Delta, A(t)}
1216
\]
1217

  
1218
%\begin{proposition}
1219
%	Any principal cut between the quantifier rules above and a logical step is reducible.
1220
%	\end{proposition}
1221

  
1222
We now show that these rules are compatible with free-cut elimination.
1223

  
1224
\begin{proposition}\label{prop:logicalstepguardedquantifer}
1225
	Any cut between the principal formula of a quantifier rule above and the principal formula of  a logical step is reducible.
1226
\end{proposition}
1227
\begin{proof}
1228
	For a cut on $\forall x^\word . A(x)$, 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. 
1229
\end{proof}	
1230

  
1231
\begin{corollary}
1232
	[Free-cut elimination for guarded quantifiers]
1233
	\label{cor:free-cut-elim-guarded-quants}
1234
	Given a system  $\system$, any  $\system$-proof $\pi$ using $\exists x^\word $ and $\forall x^\word$  rules can be transformed into free-cut free form.
1235
\end{corollary}
1236
%\begin{proof}
1237
%  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:
1238
%  \begin{itemize}
1239
%  \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,
1240
%  \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}.
1241
%  \end{itemize}
1242
%  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.
1243
%\end{proof}
1244

  
1245
As a consequence of this Corollary observe that any $I\Sigma^{\word^+}_{1}$-proof can be transformed into a proof which is free-cut free and whose formulas contain only $\exists x^\word$ quantifiers.   
1246

  
1247

  
1248
\section{Bellantoni-Cook characterisation of polynomial-time functions}
1249

  
1250
We recall the Bellantoni-Cook  algebra BC of functions defined by \emph{safe} (or \emph{predicative}) recursion on notation \cite{BellantoniCook92}. These will be employed for proving both the completeness   (all polynomial time functions are provably convergent) and the soundness result (all provably total functions are polynomial time) of $\arith$. We consider function symbols $f$ over the domain  $\Word$ with sorted arguments $(\vec u ; \vec x)$, where the inputs $\vec u$ are called \textit{normal} and $\vec x$ are called \textit{safe}. 
1251
%Each symbol is given with an arity $m$ and a number $n\leq m$ of normal arguments, and will be denoted as $f(\vec{u};\vec{x})$ where $\vec{u}$ (resp. $\vec{x}$) are the normal (resp. safe) arguments.
1252
%We say that an expression is well-sorted if the arities of function symbols in it is respected.
1253

  
1254
%\patrick{Note that below I used the terminology 'BC programs', to distinguish them from 'functions' in the extensional sense, which I find clearer. But if you prefer to keep 'BC functions' it is all right for me.}
1255
\begin{definition}
1256
	[BC programs]
1257
	BC is the set of functions generated as follows:
1258
	%	\paragraph{Initial functions}
1259
	%	The initial functions are:
1260
	\begin{enumerate}
1261
		\item The constant functions $\epsilon^k$ which takes $k$ arguments and outputs $\epsilon \in \Word$.
1262
		\item The projection functions $\pi^{m,n}_k ( x_1 , \dots , x_m ; x_{m+1} , \dots, x_{m+n} )  := x_k$ for $n,m \in \Word$ and $1 \leq k \leq m+n$.
1263
		\item The successor functions $\succ_i ( ; x) := xi$ for $i = 0,1$.
1264
		\item The predecessor function $\pred (; x) := \begin{cases}
1265
		\epsilon &  \mbox{ if }  x = \epsilon \\
1266
		x' &  \mbox{ if }  x = x'i
1267
		\end{cases}$.
1268
		\item The conditional function 
1269
		\[
1270
		%\begin{array}{rcl}
1271
		%C (; \epsilon, y_\epsilon , y_0, y_1  ) & = & y_\epsilon \\
1272
		%C(; x0 , y_\epsilon , y_0, y_1) & = & y_0 \\
1273
		%C(; x1 , y_\epsilon , y_0, y_1) & = & y_1 
1274
		%\end{array}
1275
		C (; \epsilon, y_\epsilon , y_0, y_1  ) := y_\epsilon 
1276
		\quad
1277
		C(; x0 , y_\epsilon , y_0, y_1) := y_0 
1278
		\quad
1279
		C(; x1 , y_\epsilon , y_0, y_1) := y_1 
1280
		\]
1281
		%		$\cond (;x,y,z) := \begin{cases}
1282
		%		y & \mbox{ if } x=x' 0 \\
1283
		%		z & \text{otherwise}
1284
		%		\end{cases}$.
1285
	\end{enumerate}
1286
	
1287
	%	One considers the following closure schemes:
1288
	\begin{enumerate}
1289
		\setcounter{enumi}{5}
1290
		\item Predicative recursion on notation (PRN). If $g, h_0, h_1 $ are in BC then so is $f$ defined by,
1291
		\[
1292
		\begin{array}{rcl}
1293
		f(0, \vec v ; \vec x) & := & g(\vec v ; \vec x) \\
1294
		f (\succ_i u , \vec v ; \vec x ) & := & h_i ( u , \vec v ; \vec x , f (u , \vec v ; \vec x) )
1295
		\end{array}
1296
		\]
1297
		for $i = 0,1$,  so long as the expressions are well-formed. % (i.e.\ in number/sort of arguments).
1298
		\item Safe composition. If $g, \vec h, \vec h'$ are in BC then so is $f$ defined by,
1299
		\[
1300
		f (\vec u ; \vec x) \quad := \quad g ( \vec h(\vec u ; ) ; \vec h' (\vec u ; \vec x) )
1301
		\]
1302
		so long as the expression is well-formed.
1303
	\end{enumerate}
1304
\end{definition}
1305
%Note that the  programs of this class can be defined by equational specifications in a natural way, and in the following we will thus silently identify a BC program with the corresponding equational specification.
1306

  
1307
We will implicitly identify a BC function with the equational specification it induces.
1308
The main property of BC programs is:
1309
\begin{theorem}[\cite{BellantoniCook92}]
1310
	The class of functions representable by BC programs is $\FP$.
1311
\end{theorem}	
1312
Actually this property remains true if one replaces the PRN scheme by the following more general simultaneous PRN scheme \cite{BellantoniThesis}:
1313

  
1314
$(f^j)_{1\leq j\leq n}$ are defined by simultaneous PRN scheme  from $(g^j)_{1\leq j\leq n}$, $(h^j_0, h^j_1)_{1\leq j\leq n}$ if for $1\leq j\leq n$ we have:
1315
\[
1316
\begin{array}{rcl}
1317
f^j(0, \vec v ; \vec x) & := & g^j(\vec v ; \vec x) \\
1318
f^j(\succ_i u , \vec v ; \vec x ) & := & h^j_i ( u , \vec v ; \vec x , \vec{f} (u , \vec v ; \vec x) )
1319
\end{array}
1320
\]
1321
for $i = 0,1$,  so long as the expressions are well-formed.
1322

  
1323
%\anupam{simultaneous recursion?}
1324

  
1325
%\anupam{also identity, hereditarily safe, expressions, etc.}
1326

  
1327
%\anupam{we implicitly associate a BC program with its equational specification} 
1328

  
1329
Consider a well-formed expression $t$ built from function symbols and variables. We say that a variable $y$ occurs \textit{hereditarily safe} in $t$ if, for every subexpression $f(\vec{r}; \vec{s})$ of $t$, the terms in $\vec{r}$ do not contain $y$.
1330
For instance $y$ occurs hereditarily safe in $f(u;y,g(v;y))$, but not in $f(g(v;y);x)$.
1331
\begin{proposition}
1332
	[Properties of BC programs]
1333
	\label{prop:bc-properties}
1334
	We have the following properties:
1335
	\begin{enumerate}
1336
		\item The identity function is in BC.
1337
		\item Let $t$ be a well-formed expression built from BC functions and variables, denote its free variables as $\{u_1,\dots, u_n,x_1,\dots, x_k\}$, and assume for each $1\leq i\leq k$, $x_i$ is hereditarily safe in $t$. Then the function $f(u_1,\dots, u_n; x_1,\dots, x_k):=t$ is in BC.
1338
		\item If $f$ is a BC function, then the function $g(\vec{u},v;\vec{x})$ defined as $f(\vec{u};v,\vec{x})$
1339
		is also a BC program.
1340
	\end{enumerate}
1341
	
1342
	%\begin{proposition}
1343
	%[Properties of BC programs]
1344
	%\label{prop:bc-properties}
1345
	%We have the following properties:
1346
	%\begin{enumerate}
1347
	%\item Hereditarily safe expressions over BC programs are BC definable.
1348
	%\item Can pass safe input to normal input.
1349
	%\end{enumerate}
1350
\end{proposition}
1351

  
1352

  
1353
\section{Convergence of Bellantoni-Cook programs in $\arith$}
1354
\label{sect:bc-convergence}
1355
%\anupam{In this section, use whatever form of the deduction theorem is necessary and reverse engineer precise statement later.}
1356

  
1357
In this section we show that $I\sigzer$, and so also $\arith$, proves the convergence of any equational specification induced by a BC program, hence any function in $\FP$. 
1358
%Since BC programs can compute any polynomial-time function, we obtain a completeness result. In the next section we will show the converse, that any provably convergent function of $\arith$ is polynomial-time computable.
1359
%
1360
The underlying construction of the proof here is similar in spirit to those occurring in \cite{Cantini02} and \cite{Leivant94:found-delin-ptime}. In fact, like in those works, only quantifier-free positive induction is required, but here we moreover must take care to respect additive and multiplicative behaviour of linear connectives.
1361

  
1362
We will assume the formulation of BC programs with regular PRN, not simultaneous PRN.
1363

  
1364

  
1365
%\subsection{Convergence in arithmetic}
1366

  
1367
%\begin{theorem}
1368
%	[Convergence]
1369
%	If $\Phi(f)$ is an equational specification corresponding to a BC-program defining $f$, then $\cax{\Sigma^N_1}{\pind} \proves  \ !\Phi(f) \limp \forall \vec{x}^{!N} . N(f(\vec x))$.
1370
%\end{theorem}
1371

  
1372
%We first want to show that the system ${\Sigma^{\word}_1}-{\pind}$ is expressive enough, that is to say that all polynomial-time functions can be represented by some equational specifications that are provably total. To do so   we consider equational specifications of BC-programs.
1373
\begin{theorem}
1374
	%	[Convergence]
1375
	\label{thm:arith-proves-bc-conv}
1376
	If $\eqspec$ is a BC program defining a function $f$, then $I\sigzer$ proves $\conv(f, \eqspec)$.
1377
\end{theorem}
1378

  
1379
%\anupam{Consider informalising some of these arguments under (some version of) the deduction theorem. Formal stuff can be put in an appendix. Maybe add a remark somewhere about arguing informally under deduction, taking care for non-modalised formulae.}
1380

  
1381
\begin{proof}[Proof sketch]
1382
	%	We write function symbols in $\arith$ with arguments delimited by $;$, as for BC-programs. 
1383
	We appeal to Lemma~\ref{lemma:spec-norm-form} and show that $\closure{\eqspec} \cup I\sigzer$ proves $\forall \vec{u}^{!\word} . \forall \vec{x}^\word . \word(f(\vec u ; \vec x))$.
1384
	%	\begin{equation}
1385
	%	\label{eqn:prv-cvg-ih}
1386
	%\forall \vec{u}^{!\word} . \forall \vec{x}^\word . \word(f(\vec u ; \vec x))
1387
	%	\end{equation}
1388
	We proceed by induction on the structure of a BC program for $f$, and sketch only the key cases here.
1389
	%	We give some key cases in what follows.
1390
	
1391
	Suppose $f(u, \vec v ; \vec x)$ is defined by PRN from functions $g(\vec v ; \vec x), h_i ( u , \vec v ; \vec x , y )$.
1392
	%	\[
1393
	%	\begin{array}{rcl}
1394
	%	f(\epsilon,\vec v ; \vec x) & = & g(\vec v ; \vec x) \\
1395
	%	f(\succ_i u , \vec v; \vec x) & = & h_i (u, \vec v ; \vec x , f(u , \vec v ; \vec x))
1396
	%	\end{array}
1397
	%	\]
1398
	%	By the inductive hypothesis we have \eqref{eqn:prv-cvg-ih} for $g,h_0,h_1$ in place of $f$. 
1399
	From the inductive hypothesis for $g$, we construct the following proof,
1400
	\begin{equation}
1401
	\label{eqn:prn-cvg-base}
1402
	\small
1403
	\vlderivation{
1404
		\vliq{\beta}{}{!\word(\vec v) , \word (\vec x) \seqar \word(f (\epsilon , \vec v ; \vec x)) }{
1405
			\vliq{\alpha}{}{!\word (\vec v) , \word (\vec x) \seqar \word (g (\vec v ; \vec x) ) }{
1406
				%					\vltr{\IH}{\seqar \forall \vec v^{!\word} . \forall \vec x^\word . \word (g (\vec v ; \vec x)) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
1407
				%				\vliq{}{}{\seqar \forall \vec v^{!\word} . \forall \vec x^\word . \word (g (\vec v ; \vec x))}{\vlhy{}}
1408
				\vlhy{\seqar \forall \vec v^{!\word} . \forall \vec x^\word . \word (g (\vec v ; \vec x))}
1409
			}
1410
		}
1411
	}
1412
	\end{equation}
1413
	where $\alpha $ is purely logical and $\beta$ is obtained from $\closure{\eqspec}$ and equality.	
1414
	%	We first prove,
1415
	%	\begin{equation}
1416
	%	!\word (a) , !\word (\vec v) , \word (\vec x) \land \word (f( a , \vec v ; \vec x ) )
1417
	%	\seqar
1418
	%	\word (\vec x) \land \word (f( \succ_i a , \vec v ; \vec x ) )
1419
	%	\end{equation}
1420
	%	for $i=0,1$, whence we will apply $\ind$. We construct the following proofs:
1421
	We also construct the proofs,
1422
	\begin{equation}
1423
	\label{eqn:prn-cvg-ind}
1424
	%\vlderivation{
1425
	%	\vlin{\rigrul{\limp}}{}{ \word(\vec x) \limp \word ( f(u, \vec v ; \vec x) )  \seqar \word (\vec x) \limp \word( f(\succ_i u , \vec v ; \vec x) ) }{
1426
	%	\vliq{\gamma}{}{\word(\vec x), \word(\vec x) \limp \word ( f(u, \vec v ; \vec x) )  \seqar \word( f(\succ_i u , \vec v ; \vec x) )   }{
1427
	%		\vliin{\lefrul{\limp}}{}{\word(\vec x), \word(\vec x), \word(\vec x) \limp \word ( f(u, \vec v ; \vec x) )  \seqar \word( f(\succ_i u , \vec v ; \vec x) )    }{
1428
	%			\vlin{\id}{}{\word(\vec x) \seqar \word (\vec x) }{\vlhy{}}
1429
	%			}{
1430
	%			\vliq{\beta}{}{  \word (\vec x) , \word (f(u , \vec v ; \vec x) ) \seqar \word ( f(\succ_i u , \vec v ; \vec x) ) }{
1431
	%				\vliq{\alpha}{}{ \word (\vec x) , \word (f(u , \vec v ; \vec x) ) \seqar \word ( h_i( u , \vec v ; \vec x , f( u, \vec v ; \vec x )) ) }{
1432
	%					\vltr{IH}{ \seqar \forall  u^{!\word}, \vec v^{!\word} . \forall \vec x^\word , y^\word . \word( h_i (u, \vec v ; \vec x, y) ) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
1433
	%					}
1434
	%				}
1435
	%			}
1436
	%		}
1437
	%	}
1438
	%	}
1439
	\small
1440
	\vlderivation{
1441
		\vlin{\lefrul{\land}}{}{ !\word (a) , !\word (\vec v) , \word (\vec x) \land \word (f( a , \vec v ; \vec x ) ) \seqar \word (\vec x) \land \word (f( \succ_i a , \vec v ; \vec x ) ) }{
1442
			\vlin{\lefrul{\cntr}}{}{  !\word (a) , !\word (\vec v) , \word (\vec x) , \word (f( a , \vec v ; \vec x ) ) \seqar \word (\vec x) \land \word (f( \succ_i a , \vec v ; \vec x ) )}{
1443
				\vliin{\rigrul{\land}}{}{   !\word (a) , !\word (\vec v) , \word(\vec x),  \word (\vec x) , \word (f( a , \vec v ; \vec x ) ) \seqar \word (\vec x) \land \word (f( \succ_i a , \vec v ; \vec x ) )}{
1444
					\vlin{\id}{}{\word (\vec x) \seqar \word (\vec x)}{\vlhy{}}
1445
				}{
1446
				\vliq{\beta}{}{ !\word (u) , !\word(\vec v)  , \word (\vec x) , \word (f ( u , \vec v ; \vec x ) ) \seqar \word (f (\succ_i u , \vec{v} ; \vec x ) )  }{
1447
					\vliq{\alpha}{}{  !\word (u) , !\word (\vec v)  , \word (\vec x) , \word (f ( u , \vec v ; \vec x ) ) \seqar \word ( h_i ( u , \vec v ; \vec x , f( u , \vec v ; \vec x ) ) )   }{
1448
						%					\vltr{\IH}{ \seqar \forall u^{!\word} , \vec v^{!\word} . \forall \vec x^\word , y^\word  .  \word ( h_i ( u, \vec v ; \vec x, y ) ) }{ \vlhy{\quad} }{\vlhy{}}{\vlhy{\quad}}
1449
						%\vliq{}{}{ \seqar \forall u^{!\word} , \vec v^{!\word} . \forall \vec x^\word , y^\word  .  \word ( h_i ( u, \vec v ; \vec x, y ) ) }{\vlhy{}}
1450
						\vlhy{\seqar \forall u^{!\word} , \vec v^{!\word} . \forall \vec x^\word , y^\word  .  \word ( h_i ( u, \vec v ; \vec x, y ) )}
1451
					}
1452
				}
1453
			}
1454
		}
1455
	}
1456
}
1457
\end{equation}
1458
from the inductive hypotheses for $h_i$, where $\alpha$ and $\beta$ are similar to before.
1459
%%	so let us suppose that $\word(\vec v)$ and prove,
1460
%	\begin{equation}
1461
%% \forall u^{!\word} .  (\word(\vec x) \limp \word(f(u , \vec v ; \vec x)  )
1462
%!\word (u) , !\word (\vec v) , \word (\vec x) \seqar \word ( f(u, \vec v ; \vec x) )
1463
%	\end{equation}
1464
%	by $\cax{\Sigma^N_1}{\pind}$ on $u$. After this the result will follow by $\forall$-introduction for $u, \vec v , \vec x$.
1465

  
1466
%	In the base case we have the following proof,
1467
%	\[
1468
%	\vlderivation{
1469
%	\vlin{\rigrul{\limp}}{}{ \seqar \word (\vec x) \limp \word (f(\epsilon , \vec v ; \vec x )) }{
1470
%		\vliq{\beta}{}{ \word (\vec x) \seqar \word ( f( \epsilon , \vec v ; \vec x) ) }{
1471
%			\vliq{\alpha}{}{ \word (\vec x) \seqar \word ( g (\vec v ; \vec x) ) }{
1472
%				\vltr{IH}{\seqar \forall v^{!\word} . \forall x^\word . \word( g(\vec v ; \vec x) ) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
1473
%				}
1474
%			}
1475
%		}		
1476
%		}
1477
Finally we compose these proofs as follows:
1478
\[
1479
\small
1480
\vlderivation{
1481
	\vliq{\rigrul{\forall}}{}{ \seqar \forall u^{!\word} , \vec v^{!\word} . \forall \vec x^\word . \word ( f(u , \vec v ;\vec x)  ) }{
1482
		\vliq{\lefrul{\cntr}}{}{ !\word (u), !\word (\vec v) , \word (\vec x) \seqar  \word ( f(u , \vec v ;\vec x)  )  }
1483
		{
1484
			\vliin{\cut}{}{  !\word (u), !\word(\vec v), !\word (\vec v) , \word (\vec x) , \word (\vec x) \seqar  \word ( f(u , \vec v ;\vec x)  )   }{
1485
				%\vltr{\pi_\epsilon}{ !\word (\vec v) , \word (\vec x) \seqar \word ( f( \epsilon , \vec v ; \vec x ) ) }{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
1486
				\vlhy{ !\word (\vec v) , \word (\vec x) \seqar \word ( f( \epsilon , \vec v ; \vec x ) ) }
1487
			}
1488
			{
1489
				\vliq{\wk}{}{ !\word (u), !\word (\vec v) , \word (\vec x), \word ( f( \epsilon , \vec v ; \vec x ) ) \seqar \word ( f( u , \vec v ; \vec x ) ) }{
1490
					\vliq{\land\text{-}\mathit{inv}}{}{  !\word (u), !\word (\vec v) , \word (\vec x) ,\word ( f( \epsilon , \vec v ; \vec x ) ) \seqar \word (\vec x) \land \word ( f( u , \vec v ; \vec x ) )  }{
1491
						\vlin{\ind}{}{   !\word (u), !\word (\vec v) , \word (\vec x) \land \word ( f( \epsilon , \vec v ; \vec x ) ) \seqar \word (\vec x) \land \word ( f( u , \vec v ; \vec x ) )  }
1492
						{
1493
							\vlhy{
1494
								\left\{
1495
								%\vltreeder{\pi_i}{   !\word (a), !\word (\vec v) , \word (\vec x) \word ( f( a , \vec v ; \vec x ) ) \seqar \word (\vec x) \land \word ( f( \succ_i u , \vec v ; \vec x ) )  }{\quad}{}{}
1496
								!\word (a), !\word (\vec v) , \word (\vec x) \word ( f( a , \vec v ; \vec x ) ) \seqar \word (\vec x) \land \word ( f( \succ_i u , \vec v ; \vec x ) )  
1497
								\right\}_i
1498
							}
1499
						}
1500
					}
1501
				}
1502
			}
1503
		}
1504
	}
1505
}
1506
\]
1507
for $i=0,1$, where the steps $\inv{\land}$ are obtained from invertibility of $\lefrul{\land}$.
1508

  
1509
%For the inductive step, we suppose that $\word (u)$ and the proof is as follows,
1510
%
1511
%where the steps indicated $\alpha$ and $\beta$ are analogous to those for the base case.
1512
%%, and $\gamma$ is an instance of the general scheme:
1513
%%\begin{equation}
1514
%%\label{eqn:nat-cntr-left-derivation}
1515
%%\vlderivation{
1516
%%	\vliin{\cut}{}{ \word (t) , \Gamma \seqar \Delta }{
1517
%%		\vlin{\wordcntr}{}{ \word (t) \seqar \word (t) \land \word (t) }{\vlhy{}}
1518
%%		}{
1519
%%		\vlin{\lefrul{\land}}{}{\word (t)  \land \word (t) , \Gamma \seqar \Delta}{ \vlhy{\word (t)  ,\word (t) , \Gamma \seqar \Delta} }
1520
%%		}
1521
%%	}
1522
%%\end{equation}
1523
%
1524
%%
1525
%%For the inductive step, we need to show that,
1526
%%\[
1527
%%\forall x^{!N} . (( N(\vec y) \limp N( f(x, \vec x ; \vec y) ) ) \limp N(\vec y) \limp N(f(\succ_i x , \vec x ; \vec y) )   )
1528
%%\]
1529
%%so let us suppose that $N(x)$ and we give the following proof:
1530
%%\[
1531
%%\vlderivation{
1532
%%	\vlin{N\cntr}{}{N(y) \limp ( N(y ) \limp N(f( x , \vec x ; \vec y ) ) ) \limp N(f (\succ_i x , \vec x ; \vec y)  ) }{
1533
%%		\vliin{}{}{N(y) \limp N(y) \limp ( N(y ) \limp N(f( x , \vec x ; \vec y ) ) ) \limp N(f (\succ_i x , \vec x ; \vec y)  ) }{
1534
%%			\vliin{}{}{ N(y) \limp N(y) \limp ( N(y) \limp N( f(x, \vec x ; \vec y) ) ) \limp N( h_i (x , \vec x ; \vec y , f(x , \vec x ; \vec y) ) ) }{
1535
%%				\vltr{MLL}{( N(\vec y) \limp (N (\vec y) \limp N(f(x, \vec x ; \vec y) )) \limp N(f(x, \vec x ; \vec y)) }{\vlhy{\quad }}{\vlhy{\ }}{\vlhy{\quad }}
1536
%%			}{
1537
%%			\vlhy{2}
1538
%%		}
1539
%%	}{
1540
%%	\vlhy{3}
1541
%%}
1542
%%}
1543
%%}
1544
%%\]
1545
%%TOFINISH
1546

  
1547
Safe compositions are essentially handled by many cut steps, using $\alpha$ and $\beta$ like derivations again and, crucially, left-contractions on both $!\word$ and $\word $ formulae.\footnote{In the latter case, strictly speaking, we mean cuts against $\wordcntr$.} The initial functions are routine.
1548

  
1549

  
1550
%We also give the case of the conditional initial function $C (; x, y_\epsilon , y_0, y_1)$, to exemplify the use of additives. 
1551
%%The conditional is defined equationally as:
1552
%%\[
1553
%%\begin{array}{rcl}
... Ce différentiel a été tronqué car il excède la taille maximale pouvant être affichée.

Formats disponibles : Unified diff