Statistiques
| Révision :

root / CSL16 / final-version / main.tex @ 254

Historique | Voir | Annoter | Télécharger (141,32 ko)

1
%\documentclass[a4paper]{article}
2
\documentclass[a4paper,UKenglish]{lipics-v2016}
3
%This is a template for producing LIPIcs articles. 
4
%See lipics-manual.pdf for further information.
5
%for A4 paper format use option "a4paper", for US-letter use option "letterpaper"
6
%for british hyphenation rules use option "UKenglish", for american hyphenation rules use option "USenglish"
7
% for section-numbered lemmas etc., use "numberwithinsect"
8
 
9
\usepackage{microtype}%if unwanted, comment out or use option "draft"
10

    
11
%\graphicspath{{./graphics/}}%helpful if your graphic files are in another directory
12

    
13
\bibliographystyle{plainurl}% the recommended bibstyle
14

    
15

    
16

    
17

    
18
\usepackage[lutzsyntax]{virginialake}
19
\usepackage{amsmath}
20
\usepackage{amssymb}
21
\usepackage{amsthm}
22
\usepackage{times}
23
%\usepackage{sans}
24
\usepackage{cmll}
25
\usepackage{bm}
26

    
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

    
168
\begin{document}
169

    
170
% Author macros::begin %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
171
\title{Free-cut elimination in linear logic and an application to a feasible arithmetic\footnote{
172
This work was supported by by the ANR Project ELICA ANR-14-CE25-0005 and by the LABEX MILYON (ANR-10-LABX-0070) of Universit\'e de Lyon, within the program "Investissements d'Avenir" (ANR-11-IDEX-
173
0007) operated by the French National Research Agency (ANR).}
174
}
175
%\titlerunning{A Sample LIPIcs Article} %optional, in case that the title is too long; the running title should fit into the top page column
176

    
177
%% Please provide for each author the \author and \affil macro, even when authors have the same affiliation, i.e. for each author there needs to be the  \author and \affil macros
178
\author{Patrick Baillot}
179
\author{Anupam Das}
180
\affil{Univ Lyon, CNRS, ENS de Lyon, UCB Lyon 1, LIP
181
%	\\
182
%	\texttt{open@dummyuniversity.org}
183
	}
184
%\affil[1]{Dummy University Computing Laboratory, Address/City, Country\\
185
%  \texttt{open@dummyuniversity.org}}
186
%\affil[2]{Department of Informatics, Dummy College, Address/City, Country\\
187
%  \texttt{access@dummycollege.org}}
188
\authorrunning{P.\ Baillot and A.\ Das} %mandatory. First: Use abbreviated first/middle names. Second (only in severe cases): Use first author plus 'et. al.'
189

    
190
\Copyright{Patrick Baillot and Anupam Das}%mandatory, please use full first names. LIPIcs license is "CC-BY";  http://creativecommons.org/licenses/by/3.0/
191

    
192
%\subjclass{Dummy classification -- please refer to \url{http://www.acm.org/about/class/ccs98-html}}% mandatory: Please choose ACM 1998 classifications from http://www.acm.org/about/class/ccs98-html . E.g., cite as "F.1.1 Models of Computation". 
193
%\keywords{Dummy keyword -- please provide 1--5 keywords}% mandatory: Please provide 1-5 keywords
194
%% Author macros::end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
195

    
196
%Editor-only macros:: begin (do not touch as author)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
197
%\EventEditors{John Q. Open and Joan R. Acces}
198
%\EventNoEds{2}
199
%\EventLongTitle{42nd Conference on Very Important Topics (CVIT 2016)}
200
%\EventShortTitle{CVIT 2016}
201
%\EventAcronym{CVIT}
202
%\EventYear{2016}
203
%\EventDate{December 24--27, 2016}
204
%\EventLocation{Little Whinging, United Kingdom}
205
%\EventLogo{}
206
%\SeriesVolume{42}
207
%\ArticleNo{23}
208
% Editor-only macros::end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
209

    
210
\maketitle
211

    
212
\begin{abstract}
213
We prove a general form of `free-cut elimination' for first-order theories in linear logic, yielding normal forms of proofs where cuts are anchored to nonlogical steps. To demonstrate the usefulness of this result, we consider a version of arithmetic in linear logic, based on a previous axiomatisation by Bellantoni and Hofmann. We prove a witnessing theorem for a fragment of this arithmetic via the `witness function method', showing that the provably convergent functions are precisely the polynomial-time functions. The programs extracted are implemented in the framework of `safe' recursive functions, due to Bellantoni and Cook, where the ! modality of linear logic corresponds to normal inputs of a safe recursive program. 
214
%We conclude with some comments for further applications of the free-cut elimination result. 
215
 \end{abstract}
216

    
217

    
218

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

    
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}. 
223

    
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. 
226

    
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.
230

    
231
\newcommand{\FP}{\mathbf{FP}}
232

    
233

    
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.
241

    
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.}
243

    
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.}
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}
1554
%%C (; \epsilon, y_\epsilon , y_0, y_1  ) & = & y_\epsilon \\
1555
%%C(; \succ_0 x , y_\epsilon , y_0, y_1) & = & y_0 \\
1556
%%C(; \succ_1 x , y_\epsilon , y_0, y_1) & = & y_1 
1557
%%\end{array}
1558
%%\]
1559
%Let $\vec y = ( y_\epsilon , y_0, y_1 )$ and construct the required proof as follows:
1560
%\[
1561
%\small
1562
%\vlderivation{
1563
%\vliq{}{}{ \word (x) , \word (\vec y) \seqar \word ( C(; x ,\vec y) )}{
1564
%\vliin{2\cdot \laor}{}{ x = \epsilon \laor \exists z^\word . x = \succ_0 z \laor \exists z^\word x = \succ_1 z , \word (\vec y) \seqar \word ( C(;x \vec y) ) }{
1565
%\vliq{}{}{ x = \epsilon , \word (\vec y) \seqar \word ( C(; x , \vec y) ) }{
1566
%\vliq{}{}{ \word (\vec y) \seqar \word ( C( ; \epsilon , \vec y ) ) }{
1567
%\vlin{\wk}{}{ \word (\vec y) \seqar \word (y_\epsilon) }{ 
1568
%\vlin{\id}{}{\word (y_\epsilon) \seqar \word ( y_\epsilon )}{\vlhy{}}
1569
%}
1570
%}
1571
%}
1572
%}{
1573
%\vlhy{
1574
%\left\{ 
1575
%\vlderivation{
1576
%\vlin{\lefrul{\exists}}{}{ \exists z^\word . x = \succ_i z , \word (\vec y) \seqar \word ( C(;x , \vec y) ) }{
1577
%\vliq{}{}{ x = \succ_i a , \word (\vec y ) \seqar \word (C(; x ,\vec y)) }{
1578
%\vliq{}{}{ \word (\vec y) \seqar \word ( C(; \succ_i a , \vec y ) ) }{
1579
%\vlin{\wk}{}{ \word (\vec y) \seqar \word (y_i) }{
1580
%\vlin{\id}{}{\word (y_i) \seqar \word (y_i)}{\vlhy{}}
1581
%}
1582
%}
1583
%}
1584
%}
1585
%}
1586
%\right\}_{i = 0,1}
1587
%}
1588
%}
1589
%}
1590
%}
1591
%\]
1592
%whence the result follows by $\forall$-introduction.
1593
%%The other initial functions are routine.
1594
\end{proof}
1595

    
1596

    
1597
\section{Witness function method}
1598
\label{sect:wfm}
1599
We now prove the converse to the last section: any provably convergent function in $\arith$ is polynomial-time computable,
1600
%.
1601
%To this end we use the \emph{witness function method} (WFM), a common technique in {bounded arithmetic} \cite{Buss86book}.
1602
using the witness function method (WFM) \cite{Buss86book}.
1603

    
1604
The WFM differs from realisability and Dialectica style witnessing arguments mainly since it does not require functionals at higher type. Instead a translation is conducted directly from a proof in De Morgan normal form, i.e.\ with negation pushed to the atoms, relying on classical logic. 
1605
%Free-cut elimination is employed to control the quantifer complexity of formulae occurring in a proof, although here we furthermore use it to control the presence of \emph{contraction} in a proof, to which we have access via the modalities of linear logic. This
1606
%Free-cut elimination is employed to control the logical complexity of formulae occurring in a proof, and a formal `witness' predicate plays a similar role to the realisability predicate.
1607

    
1608
The combination of De Morgan normalisation and free-cut elimination plays a similar role to the double-negation translation, and this is even more evident in our setting where the transformation of a classical proof to free-cut free form can be seen to be a partial `constructivisation' of the proof. As well as eliminating the (nonconstructive) occurrences of the $\forall$-right rule, as usual for the WFM, the linear logic refinement of the logical connectives means that right-contraction steps are also eliminated. This is important due to the fact that we are in a setting where programs are equational specifications, not formulae (as in bounded arithmetic \cite{Buss86book}) or combinatory terms (as in applicative theories \cite{Cantini02}), so we cannot in general decide atomic formulae.
1609

    
1610
%Some key features of this method are the following:
1611
%\begin{itemize}
1612
%	\item T
1613
%\end{itemize}
1614
%
1615
%Key features/differences from realisability:
1616
%\begin{itemize}
1617
%	\item De Morgan normal form: reduces type level to $0$, complementary to double-negation translation that \emph{increases} type level.
1618
%	\item Free-cut elimination: allows us to handles formulae of fixed logical complexity throughout the proof. 
1619
%	\item Respects logical properties of formulae, e.g.\ quantifier complexity, exponential complexity.
1620
%\end{itemize}
1621
%
1622
%\todo{say some more here}
1623
%
1624
%\todo{compare with applicative theories}
1625
%
1626
%\anupam{in particular, need to point out that this argument is actually something in between, since usually the WFM requires programs to be defined by formulae, not equational specifications.}
1627

    
1628
\newcommand{\type}{\mathtt{t}}
1629
\newcommand{\norm}{\nu}
1630
\newcommand{\safe}{\sigma}
1631

    
1632

    
1633

    
1634
\subsection{The translation}
1635

    
1636
We will associate to each (free-cut free) proof of a convergence statement in $\arith$ a function on $\Word$ defined by a BC program. In the next section we will show that this function satisfies the equational specification of the convergence statement.
1637
%, hence showing that any provably convergent function of $\arith$ is polynomial-time computable.\footnote{Strictly speaking, we will also require the equational specification at hand to be coherent, cf.\ Prop.~\ref{prop:eq-spec-model}.}
1638

    
1639
\begin{definition}
1640
	[Typing]
1641
	\label{dfn:typing}
1642
	To each $(\forall, ?)$-free $\word^+$-formula $A$ we associate a sorted tuple of variables $\type (A)$, intended to range over $\Word$, as follows:
1643
	\[
1644
	%			\begin{array}{rcll}
1645
	%			\type (\word (t)) & := & (;x^{\word (t)} ) & \\
1646
	%			\type(s = t) & := & ( ; x^{s = t}) & \\
1647
	%			\type (s \neq t) & := & ( ;x^{s\neq t} )\\
1648
	%%			\type (A \lor B)  & : = & (\vec u , \vec v ; \vec x , \vec y) & \text{if $\type(A) = (\vec u ; \vec x)$ and $\type(B) = (\vec v ; \vec y)$.} \\
1649
	%			\type (A \star B)  & : = & (\vec u , \vec v ; \vec x , \vec y) & \text{if $\type(A) = (\vec u ; \vec x)$, $\type(B) = (\vec v ; \vec y)$ and $\star \in \{ \lor, \land, \laor, \laand \}$.} \\
1650
	%			\type (! A) & : = & ( \vec u ,\vec x  ; ) & \text{if $\type(A) = (\vec u ; \vec x )$.} \\
1651
	%			\type (\exists x^\word . A) & := & (\vec u ; \vec x , y) & \text{if $\type (A) = (\vec u ; \vec x)$.}
1652
	%			%	\type (\forall x^N . A) & := & \Nat \to \type(A)
1653
	%			\end{array}
1654
	%
1655
	\begin{array}{rcll}
1656
	\type (\word (t)) & := & (;x^{\word (t)} ) & \\
1657
	\type(s = t) & := & ( ; x^{s = t}) & 
1658
	%			\\
1659
	%			\type (s \neq t) & := & ( ;x^{s\neq t} )\\
1660
	%%			\type (A \lor B)  & : = & (\vec u , \vec v ; \vec x , \vec y) & \text{if $\type(A) = (\vec u ; \vec x)$ and $\type(B) = (\vec v ; \vec y)$.} \\
1661
	%			\type (A \star B)  & : = & (\vec u , \vec v ; \vec x , \vec y) & \text{if $\type(A) = (\vec u ; \vec x)$, $\type(B) = (\vec v ; \vec y)$ and $\star \in \{ \lor, \land, \laor, \laand \}$.} \\
1662
	%			\type (! A) & : = & ( \vec u ,\vec x  ; ) & \text{if $\type(A) = (\vec u ; \vec x )$.} \\
1663
	%			\type (\exists x^\word . A) & := & (\vec u ; \vec x , y) & \text{if $\type (A) = (\vec u ; \vec x)$.}
1664
	%			%	\type (\forall x^N . A) & := & \Nat \to \type(A)
1665
	\end{array}
1666
	\quad
1667
	\begin{array}{rcll}
1668
	%						\type (\word (t)) & := & (;x^{\word (t)} ) & \\
1669
	%						\type(s = t) & := & ( ; x^{s = t}) & \\
1670
	\type (s \neq t) & := & ( ;x^{s\neq t} )\\
1671
	%			\type (A \lor B)  & : = & (\vec u , \vec v ; \vec x , \vec y) & \text{if $\type(A) = (\vec u ; \vec x)$ and $\type(B) = (\vec v ; \vec y)$.} \\
1672
	%						\type (A \star B)  & : = & (\vec u , \vec v ; \vec x , \vec y) & \text{if $\type(A) = (\vec u ; \vec x)$, $\type(B) = (\vec v ; \vec y)$ and $\star \in \{ \lor, \land, \laor, \laand \}$.} \\
1673
	\type (! A) & : = & ( \vec u ,\vec x  ; ) & 
1674
	%						\text{if $\type(A) = (\vec u ; \vec x )$.} \\
1675
	%						\type (\exists x^\word . A) & := & (\vec u ; \vec x , y) & \text{if $\type (A) = (\vec u ; \vec x)$.}
1676
	%						%	\type (\forall x^N . A) & := & \Nat \to \type(A)
1677
	\end{array}
1678
	\quad
1679
	\begin{array}{rcll}
1680
	%									\type (\word (t)) & := & (;x^{\word (t)} ) & \\
1681
	%									\type(s = t) & := & ( ; x^{s = t}) & \\
1682
	%									\type (s \neq t) & := & ( ;x^{s\neq t} )\\
1683
	%						%			\type (A \lor B)  & : = & (\vec u , \vec v ; \vec x , \vec y) & \text{if $\type(A) = (\vec u ; \vec x)$ and $\type(B) = (\vec v ; \vec y)$.} \\
1684
	\type (A \star B)  & : = & (\vec u , \vec v ; \vec x , \vec y) & 
1685
	%									\text{if $\type(A) = (\vec u ; \vec x)$, $\type(B) = (\vec v ; \vec y)$ and $\star \in \{ \lor, \land, \laor, \laand \}$.} 
1686
	\\
1687
	%									\type (! A) & : = & ( \vec u ,\vec x  ; ) & \text{if $\type(A) = (\vec u ; \vec x )$.} \\
1688
	\type (\exists x^\word . A) & := & (\vec u ; \vec x , y) & 
1689
	%									\text{if $\type (A) = (\vec u ; \vec x)$.}
1690
	%	\type (\forall x^N . A) & := & \Nat \to \type(A)
1691
	\end{array}
1692
	\]
1693
	where $\type(A)  = (\vec u ; \vec x)$,  $\type(B)=(\vec v ;  \vec y)$  and $\star \in \{ \lor , \land, \laor, \laand \}$.
1694
	%	where $\nu$ designates that the inputs are normal.
1695
\end{definition}
1696

    
1697

    
1698
%		\anupam{need to account for normality and safety somewhere. Attempting inlined and leaving types without this decoration.}
1699
%		
1700
%		\begin{remark}
1701
%			[Distribution of $!$]
1702
%			There is a potential issue that the $!$ contains $\lor$ symbols in its scope, whence we do not in general have $!(A \lor B) \cong !A \lor !B$. However this will not be a problem here by inspection of a convergence statement: there are no $\lor$ symbols in the scope of a $!$. Therefore, after free-cut elimination, no formula in the proof will have this property either.
1703
%			
1704
%			On the other hand, since we are working in affine logic, we do in general have $!(A \land B) \cong !A \land !B$.
1705
%		\end{remark}
1706

    
1707
For a sorted tuple $(u_1 , \dots u_m ; x_1 , \dots ,x_n )$ we write $|(\vec u ; \vec x)|$ to denote its length, i.e.\ $m+n$. This sorted tuple corresponds to input variables, normal and safe respectively.
1708
%		\footnote{It becomes important here that we are considering proofs of a convergence statement, since a free-cut free $\arith$-proof of a convergence statement cannot contain any $\lor$ symbols in the scope of a $!$. This could cause an issue in the above definition since we do not in general have the equivalence $!(A \lor B) \equiv !A \lor !B$. On the other hand, the equivalence $!(A\land B) \equiv !A \land !B$ follows since we are in the affine setting.}
1709

    
1710

    
1711
Let us fix a particular (coherent) equational specification $\eqspec(f)$. Rather than directly considering $\arith$-proofs of $\conv ( f , \eqspec )$, we will consider a $\closure{\eqspec} \cup \arith $ sequent proof of $!\word (\vec x) \seqar \word (f (\vec x) )$, under Lemma~\ref{lemma:spec-norm-form}. 
1712
%		
1713
Free-cut elimination crucially yields strong regularity properties for proofs:
1714

    
1715
\begin{proposition}
1716
	[Freedom]
1717
	\label{prop:freedom}
1718
	A free-cut free $\closure{\eqspec} \cup \arith $ sequent proof of $!\word (\vec x) \seqar \word (f (\vec x) )$ is:
1719
	\begin{enumerate}
1720
		\item\label{item:no-neg-word} Free of any negative occurrences of $\word$.
1721
		\item\label{item:no-forall} Free of any $\forall$ symbols.
1722
		\item\label{item:no-quest} Free of any $?$ symbols.
1723
		\item\label{item:no-laor-step} Free of any $\laor$ or $\laand$ steps.\footnote{Because of the $\surj$ rule, the proof may still contain $\laor$ symbols, but these must be direct ancestors of some cut-step by free-cut freeness.}
1724
	\end{enumerate}
1725
\end{proposition}
1726

    
1727

    
1728
For this reason we can assume that $\type$ is well-defined for all formulae occurring in a free-cut free proof of convergence, and so we can proceed with the translation from proofs to BC programs.
1729

    
1730
\begin{definition}
1731
	[Translation]
1732
	\label{dfn:translation-of-proofs}
1733
	We give a translation from a free-cut free $\closure{\eqspec} \cup \arith $ proof $\pi$, satisfying properties \ref{item:no-neg-word}, \ref{item:no-forall}, \ref{item:no-quest}, \ref{item:no-laor-step} of Prop.~\ref{prop:freedom} above, of a sequent $\Gamma \seqar \Delta$ to BC programs for a tuple of functions $\vec f^\pi$ with arguments $\type \left(\bigotimes\Gamma\right)$ such that $|\vec f^\pi | = | \type\left(\bigparr\Delta\right)|$.
1734
	
1735
	
1736
	The translation is by induction on the structure of $\pi$, so we proceed by inspection of its final step.
1737
	
1738
	If $\pi$ is an instance of the initial rules $\geneps, \sepeps^0 , \sepeps^1, \sepzer, \sepone$ or $\inj$ then $\vec f^\pi$ is simply the constant function $\epsilon$ (possibly with dummy inputs as required by $\type$).
1739
	%			\footnote{This is because proofs of (in)equalities can be seen to carry no computational content.}
1740
	If $\pi$ is an $\closure{\eqspec}$ or $=$ initial step it is also translated simply to $\epsilon$.
1741
	%			
1742
	The initial steps $\genzer, \genone , \surj$ and $\wordcntr$ are translated to $\succ_0( ; x) , \succ_1 (; x), ( \epsilon , \pred ( ;x) , \pred (; x) )$ and $(\id (;x) , \id(;x))$ respectively.
1743
	%		
1744
	Finally, suppose $\pi$ is a logical initial step. If $\pi $ is an instance of $\id$, i.e.\ $p \seqar p$, then we translate it to $\id$. Notice that, if $\pi$ is an instance of $\lefrul{\bot}$ (i.e.\ $p, p^\bot \seqar $ ) or $\rigrul{\bot}$ (i.e.\ $\seqar p, p^\bot$) then $p$ must be an equality $s=t$ for some terms $s,t$, since $p$ must be atomic and, by assumption, $\word$ does not occur negatively. Therefore $\pi$ is translated to tuples of $\epsilon$ as appropriate.
1745
	
1746
	
1747
	
1748
	
1749
	Now we consider the inductive cases.
1750
	%	
1751
	%		We will continue with similar notational conventions in the remainder of this argument.
1752
	%		
1753
	%		%	\anupam{bad notation since need to include free variables of sequent too. (also of theory.) Reconsider.}
1754
	%		
1755
	If $\pi$ ends with a $\rigrul{\land}$ or $\lefrul{\lor}$ step then we just rearrange the tuple of functions obtained from the inductive hypothesis.
1756
	%		The case when $\pi$ ends with a $\lefrul{\lor}$ step is analogous to the $\rigrul{\land}$ case above.		
1757
	If $\pi$ consists of a subproof $\pi'$ ending with a $\lefrul{\land}$ or $\rigrul{\lor}$-step, then $\vec f^\pi$ is exactly $\vec f^{\pi'}$.
1758
	By assumption, there are no $\laor$, $\laand$, $?$ or $\forall$ steps occurring in $\pi$, and if $\pi$ consists of a subproof $\pi'$ followed by a $\lefrul{\exists}$ step then $\vec f^\pi$ is exactly the same as $\vec f^{\pi'}$, under possible reordering of the tuple.
1759
	
1760
	Suppose $\pi$ consists of a subproof $\pi'$ followed by a $\rigrul{\exists}$ step,
1761
	\[
1762
	\vlderivation{
1763
		\vlin{\rigrul{\exists}}{}{ \Gamma, \word(t) \seqar \Delta , \exists x^\word . A(x) }{
1764
			%						\vltr{\pi'}{ \Gamma \seqar \Delta , A(t) }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
1765
			\vlhy{ \Gamma \seqar \Delta , A(t) }
1766
		}
1767
	}
1768
	\]
1769
	so by the inductive hypothesis we have functions $\vec f^\Delta , \vec f^{A(t)}$ with arguments $(\vec u ; \vec x )= \type(\bigotimes \Gamma)$. We define 
1770
	%				$\vec f^\pi$ as follows:
1771
	%				\[
1772
	$
1773
	\vec f^\pi (\vec u ; \vec x , y)
1774
	%				\quad := \quad
1775
	$ as $
1776
	\left( 
1777
	\vec f^\Delta (\vec u ; \vec x) ,
1778
	{\id (;y)},
1779
	\vec f^{A(t)} (\vec u; \vec x)  
1780
	\right)
1781
	$.				
1782
	%\]
1783
	%		(The identity function on $y$ is defined from successor, predecessor and safe composition).
1784
	
1785
	
1786
	%Suppose we have functions $\vec f^X (\vec x ; \vec y)$ from $\pi'$ for $X = \Delta$ or $ X=A$. 
1787
	%\[
1788
	%\vec f(\vec x ; \vec y , z) \quad := \quad ( \vec f^\Delta (\vec x ; \vec y)   ,  z , \vec f^A ( \vec x ; \vec y ) )
1789
	%\]
1790
	
1791
	
1792
	
1793
	%
1794
	%Suppose we have functions $\vec f' (\vec u , \vec v ; x , \vec y , \vec z)$ from $\pi'$ with $(\vec u ; \vec x )$ corresponding to $\Gamma$, $(;x)$ corresponding to $N(a)$ and $(\vec v ; \vec z)$ corresponding to $A(a)$. We define:
1795
	%\[
1796
	%\vec f ( \vec u , \vec v ;  )
1797
	%\]
1798
	
1799
	%				\anupam{should just be same? Consider variable naming, just in case.}
1800
	%				\anupam{This is probably where the consideration for free variables is.}
1801
	
1802
	%Suppose we have functions $\vec g (\vec v  , \vec w ; \vec x , y , \vec z)$ where $(\vec v ; \vec x) $ corresponds to $\Gamma$, $y$ corresponds to $\word(a)$ and $(\vec w ; \vec z) $ corresponds to $A(a)$. Then we define:
1803
	%\[
1804
	%\vec f ( \vec v , \vec w ; \vec x , y , \vec z )
1805
	%\]
1806
	
1807
	
1808
	
1809
	%	\[
1810
	%	\vlderivation{
1811
	%	\vliin{\rigrul{\laand}}{}{\Gamma \seqar \Delta, A \laand B}{
1812
	%	\vltr{\pi_1}{  \Gamma \seqar \Delta, A}{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
1813
	%	}{
1814
	%	\vltr{\pi_2}{  \Gamma \seqar \Delta, B}{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
1815
	%	}
1816
	%	}
1817
	%	\]
1818
	%	
1819
	%	Suppose we have $\vec f^i (\vec x , \vec a ; \vec y , \vec b)$ from $\pi_i$.
1820
	%	
1821
	%	\anupam{problem: does this require many tests, just like for contraction? Can we isolate a different complexity class? e.g.\ PH or Grzegorzyck?}
1822
	%	\anupam{skip this case and consider later.}
1823
	
1824
	%		\anupam{commented stuff on additives. To remark later perhaps.}
1825
	
1826
	
1827
	If $\pi$ consists of a subproof $\pi'$ followed by a $\rigrul{!}$ step then $\vec f^\pi$ is exactly the same as $\vec f^{\pi'}$. If $\pi$ ends with a $\lefrul{!}$ step then we just appeal to Prop.~\ref{prop:bc-properties} to turn a safe input into a normal input.		
1828
	
1829
	Since there are no $?$ symbols in $\pi$, we can assume also that there are no $\rigrul{\cntr}$ steps in $\pi$.\footnote{Again, this is crucially important, since we cannot test the equality between arbitrary terms in the presence of nonlogical function symbols.}
1830
	
1831
	%		\anupam{This is important, so expand on this here or in a remark before/after.}
1832
	
1833
	If $\pi$ ends with a $\lefrul{\cntr}$ step then we duplicate some normal inputs of the functions obtained by the inductive hypothesis.			
1834
	
1835
	%		(Notice that this is obtainable in BC by a trivial instance of safe composition.)
1836
	
1837
	
1838
	%	cntr right
1839
	%	\[
1840
	%	\vlderivation{
1841
	%	\vlin{\rigrul{\cntr}}{}{\Gamma \seqar \Delta, ?A}{
1842
	%	\vltr{\pi'}{  \Gamma \seqar \Delta, ?A, ?A}{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
1843
	%	}
1844
	%	}
1845
	%	\]
1846
	%	(need test function against witness predicate?)
1847
	%	
1848
	%	\anupam{problem: how to test even equality of two terms? Maybe treat $?$ as $!$ on left?}
1849
	%	
1850
	%	\anupam{Not a problem by free-cut elimination! Can assume there are no $?$ in the proof! Is this equivalent to treaing $?$ as $!$ on left?}
1851
	%	
1852
	%	\anupam{Yes I think so. We can work in a left-sided calculus. only problem is for induction. But this can never be a problem for modalities since induction formulae are modality-free.}
1853
	%	
1854
	%	\anupam{this is actually the main point.}
1855
	
1856
	
1857
	If $\pi$ ends with a $\cut$ step whose cut-formula is free of modalities, then it can be directly translated to a safe composition of functions obtained by the inductive hypothesis, by relying on Prop.~\ref{prop:bc-properties}. Otherwise, the cut-formula must be of the form $!\word (t)$ since it must directly descend from the left-hand side of an induction step, by free-cut freeness.
1858
	%	 or axiom on one side. The only such occurrence of a modality is in the conclusion of an induction step, whence such a formula has the form $!\word (t)$. 
1859
	Since the cut is anchored, we can also assume that the cut formula is principal on the other side, i.e.\ $\pi$ ends as follows:	
1860
	%	\anupam{need to check this assumption against free-cut elimination conditions. To discuss.}
1861
	\[
1862
	\vlderivation{
1863
		\vliin{\cut}{}{!\Gamma , \Sigma  \seqar \Delta }{
1864
			\vlin{\rigrul{!}}{}{!\Gamma \seqar  !\word(t)}{
1865
				%			\vltr{\pi_1'}{!\Gamma \seqar  \word(t)}{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
1866
				\vlhy{!\Gamma \seqar  \word(t)}
1867
			}
1868
		}{
1869
		%		\vltr{\pi_2}{ !\word(t), \Sigma\seqar \Delta}{\vlhy{\quad}}{\vlhy{}}{\vlhy{\quad}}
1870
		\vlhy{ !\word(t), \Sigma\seqar \Delta}
1871
	}
1872
}
1873
\]
1874
where 
1875
% $\pi_2$ ends with a $\ind$ step for which  $A(x)$ is the induction formula, and 
1876
we assume there are no side-formulae on the right of the end-sequent of the left subproof for the same reason as $\rigrul{\cntr}$: $\pi$ does not contain any occurrences of $?$. By the inductive hypothesis we have functions $ g( \vec u ; )$ and $\vec h (  v , \vec w ; \vec x)$ where $\vec u$, $ v$ and $(\vec w ; \vec x)$ correspond to $!\Gamma$,  $!\word(t)$ and $\Sigma$ respectively. We construct the functions $\vec f^\pi $ as follows:
1877
\[
1878
\vec f^\pi (\vec u , \vec w ; \vec x)
1879
\quad := \quad
1880
\vec h (   g(\vec u ; ), \vec w  ; \vec x)
1881
\]
1882
Notice, again, that all safe inputs on the left occur hereditarily safe on the right, and so these expressions are definable in BC by Prop.~\ref{prop:bc-properties}.
1883

    
1884

    
1885

    
1886
%	Suppose $\pi$ ends with a $\lefrul{!}$ step:
1887
%	\[
1888
%	\vlderivation{
1889
%		\vlin{!}{}{\Gamma, !A \seqar \Delta}{
1890
%			\vltr{\pi'}{ \Gamma , A \seqar \Delta  }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
1891
%		}
1892
%	}
1893
%	\]
1894
%	\todo{finish this case, just passing a safe input to a normal input.}
1895
%	
1896
%	
1897
%	Suppose $\pi$ ends with a $\rigrul{!}$ step:
1898
%	
1899
%	\todo{finish this case, should not change function at all, but maybe there is a consideration.}
1900

    
1901
If $\pi$ ends with a $\rigrul{\wk}$ step then we just add a tuple of constant functions $\vec \epsilon$ of appropriate length as dummy functions. If $\pi$ ends with a $\lefrul{\wk}$ step then we just add dummy inputs of appropriate length.
1902

    
1903
%	Suppose $\pi$ ends with a $\lefrul{\wk}$ step:
1904
%	
1905
%	\todo{finish this case, just add a dummy input.}
1906
%	
1907
%	Suppose $\pi$ ends with a $\rigrul{\wk}$ step:
1908
%	
1909
%	\todo{finish this case, just add a dummy function.}
1910
%	
1911

    
1912

    
1913
Finally, suppose $\pi$ ends with a $\ind$ step. Since there are no occurrences of $?$ in $\pi$ we can again assume that there are no side formulae on the right of any induction step. Thus $\pi$ ends as follows:
1914
\[
1915
\vlderivation{
1916
	\vliin{\ind}{}{ !\word (t), !\Gamma  ,  A(\epsilon) \seqar A(t) }{
1917
		%			\vltr{\pi_0}{!\word(a) , !\Gamma ,  A(a) \seqar A(\succ_0 a)}{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
1918
		\vlhy{!\word(a) , !\Gamma ,  A(a) \seqar A(\succ_0 a)}
1919
	}{
1920
	%		\vltr{\pi_1}{!\word(a), !\Gamma ,  A(a)\seqar A(\succ_1 a) }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
1921
	\vlhy{!\word(a), !\Gamma ,  A(a)\seqar A(\succ_1 a)}
1922
}
1923
}
1924
\]
1925
%\anupam{is this better with a premiss for the base case?}
1926

    
1927
By the inductive hypothesis we have functions $\vec g^0 (u , \vec v ; \vec x)$ and $\vec g^1 (u , \vec v ; \vec x)$ with $u$, $\vec v$ and $\vec x$ corresponding to $!\word(a)$, $!\Gamma$ and $A(a)$ respectively. We define $\vec f^\pi$ by simultaneous predicative recursion on notation as follows:
1928
\[
1929
\begin{array}{rcll}
1930
\vec f^\pi ( \epsilon, \vec v ; \vec x ) & := & \vec x & \\
1931
\vec f^\pi ( \succ_i u , \vec v ; \vec x) & := & \vec g^i ( u, \vec v ; \vec f^\pi ( u, \vec v ; \vec x ) )
1932
\end{array}
1933
%\vec f^\pi ( \epsilon, \vec v ; \vec x ) := \vec x  \qquad
1934
%\vec f^\pi ( \succ_i u , \vec v ; \vec x) :=  \vec g^i ( u, \vec v ; \vec f^\pi ( u, \vec v ; \vec x ) )
1935
\]
1936

    
1937
%\anupam{check this}
1938
%
1939
%\todo{simultaneous PRN.}
1940

    
1941

    
1942
\end{definition}
1943

    
1944
The induction step above is the reason why we enrich the usual BC framework with a simultaneous version of PRN.
1945

    
1946
\newcommand{\qfindth}{\mathit{IQF}}
1947

    
1948
\subsection{Witness predicate and extensional equivalence of functions}
1949

    
1950
%\anupam{need to mention that this predicate is similar to realisability predicate in absence, and indeed is presented like that for applicative theories, which also rely on free-cut elimination.}
1951

    
1952
Now that we have seen how to extract BC functions from proofs, we show that these functions satisfy the appropriate semantic properties, namely the equational program $\eqspec$ we started with. For this we turn to a quantifier-free \emph{classical} theory, in a similar fashion to $\mathit{PV}$ for $S^1_2$ in \cite{Buss86book} or system $T$ in G\"odel's Dialectica interpretation. This is adequate since we only care about extensional properties of extracted functions at this stage.
1953

    
1954
We could equally use a realisability approach, as done in e.g.\ \cite{Cantini02} and other works in applicative theories: since the formulae we deal with are essentially positive there is not much difference between the two approaches. Indeed here the witness predicate plays the same role as the realisability predicate in other works.
1955
%, the complexity properties already handled by the BC programs we just constructed.
1956

    
1957

    
1958

    
1959
%The witness predicate of the WFM is similar to the realisability predicate, and this is even more true in out setting
1960

    
1961
Let $\qfindth$ be the classical theory over the language $\{ \epsilon, \succ_0, \succ_1 , (f^k_i )\}$ obtained from the axioms $\sepeps, \sepzer, \sepone, \inj, \surj$ and $\ind$ by dropping all relativisations to $\word$ (or $!\word$), replacing all linear connectives by their classical counterparts, and restricting induction to only quantifier-free formulae.
1962

    
1963
%For this we work in a quantifier-free classical logic whose atoms are equations between terms of our arithmetic and whose (sound) rules are simply the axioms of our arithmetic.
1964
%
1965
%(This is similar to the role of PV in the witnessing argument for $S^1_2$ and system $T$ for witnessing $I\Sigma_1$.)
1966

    
1967

    
1968
%	\todo{add cases for $\laor$ and $\neq$.}
1969

    
1970
\newcommand{\witness}[2]{\mathit{Wit}^{#1}_{#2}}
1971
\begin{definition}
1972
	[Witness predicate]
1973
	\label{dfn:wit-pred}
1974
	For formulae $A, B$ of $\arith$ satisfying properties \ref{item:no-neg-word}, \ref{item:no-forall}, \ref{item:no-quest} of Prop.~\ref{prop:freedom}, we define the following `witness' predicate as a quantifier-free formula of $\qfindth$:
1975
	%			 $A$ with free variables amongst $\vec a$:
1976
	
1977
	\renewcommand{\sigma}{a}
1978
	\[
1979
	%			\begin{array}{rcll}
1980
	%			\witness{}{A} (\sigma) & := & \sigma = t & \text{if $A$ is $\word (t)$.} \\
1981
	%			\witness{}{A} (\sigma) & := & s=t & \text{if $A$ is $s=t$.} \\
1982
	%						\witness{}{A} (\sigma) & := & s\neq t & \text{if $A$ is $s\neq t$.} \\
1983
	%			\witness{}{A \star B} ( \vec \sigma^A , \vec \sigma^B) & := &  \witness{}{A} (\vec \sigma^A) \cor \witness{}{B} (\vec \sigma^B) & 
1984
	%						\text{for $\star \in \{ \lor,\laor\}$.} 
1985
	%			\\
1986
	%			\witness{}{A \star B} ( \vec \sigma^A , \vec \sigma^B) & := &  \witness{}{A} (\vec \sigma^A ) \cand \witness{}{B} (\vec \sigma^B ) & 
1987
	%						\text{for $\star \in \{ \land, \laand \}$.} 
1988
	%			\\
1989
	%			\witness{}{\exists x^\word A} ( \sigma, \vec \sigma^A  ) & := & \witness{}{A}(\vec \sigma^A , \sigma ) & \\
1990
	%			\witness{}{!A} (\vec \sigma^A) & := & \witness{}{A} (\vec \sigma^A)
1991
	%			\end{array}
1992
	\begin{array}{rcl}
1993
	\witness{}{\word (t)} (\sigma) & := & \sigma = t 
1994
	%			\text{if $A$ is $\word (t)$.} 
1995
	\\
1996
	\witness{}{s=t} (\sigma) & := & s=t 
1997
	%			\text{if $A$ is $s=t$.} 
1998
	\\
1999
	\witness{}{s \neq t} (\sigma) & := & s\neq t 
2000
	%			\text{if $A$ is $s\neq t$.} 
2001
	\\
2002
	%			\witness{}{A \star B} ( \vec \sigma^A , \vec \sigma^B) & := &  \witness{}{A} (\vec \sigma^A) \cor \witness{}{B} (\vec \sigma^B) & 
2003
	%			\text{for $\star \in \{ \lor,\laor\}$.} 
2004
	%			\\
2005
	%			\witness{}{A \star B} ( \vec \sigma^A , \vec \sigma^B) & := &  \witness{}{A} (\vec \sigma^A ) \cand \witness{}{B} (\vec \sigma^B ) & 
2006
	%			\text{for $\star \in \{ \land, \laand \}$.} 
2007
	%			\\
2008
	%			\witness{}{\exists x^\word A} ( \sigma, \vec \sigma^A  ) & := & \witness{}{A}(\vec \sigma^A , \sigma ) & \\
2009
	\witness{}{!A} (\vec \sigma^A) & := & \witness{}{A} (\vec \sigma^A)
2010
	\end{array}
2011
	\quad
2012
	\begin{array}{rcl}
2013
	%						\witness{}{\word (t)} (\sigma) & := & \sigma = t & \text{if $A$ is $\word (t)$.} \\
2014
	%						\witness{}{s=t} (\sigma) & := & s=t & \text{if $A$ is $s=t$.} \\
2015
	%						\witness{}{s \neq t} (\sigma) & := & s\neq t & 
2016
	%						\text{if $A$ is $s\neq t$.} 
2017
	%						\\
2018
	\witness{}{A \bullet B} ( \vec \sigma^A , \vec \sigma^B) & := &  \witness{}{A} (\vec \sigma^A) \cor \witness{}{B} (\vec \sigma^B) 
2019
	%						\text{for $\star \in \{ \lor,\laor\}$.} 
2020
	\\
2021
	\witness{}{A \circ B} ( \vec \sigma^A , \vec \sigma^B) & := &  \witness{}{A} (\vec \sigma^A ) \cand \witness{}{B} (\vec \sigma^B )  
2022
	%						\text{for $\star \in \{ \land, \laand \}$.} 
2023
	\\
2024
	\witness{}{\exists x^\word A} ( \sigma, \vec \sigma^A  ) & := & \witness{}{A}(\vec \sigma^A , \sigma ) 
2025
	%						 \\
2026
	%						\witness{}{!A} (\vec \sigma^A) & := & \witness{}{A} (\vec \sigma^A)
2027
	\end{array}
2028
	%						\begin{array}{rcl}
2029
	%%						\witness{}{\word (t)} (\sigma) & := & \sigma = t & \text{if $A$ is $\word (t)$.} \\
2030
	%%						\witness{}{s=t} (\sigma) & := & s=t & \text{if $A$ is $s=t$.} \\
2031
	%%						\witness{}{s \neq t} (\sigma) & := & s\neq t & \text{if $A$ is $s\neq t$.} \\
2032
	%%						\witness{}{A \star B} ( \vec \sigma^A , \vec \sigma^B) & := &  \witness{}{A} (\vec \sigma^A) \cor \witness{}{B} (\vec \sigma^B) & 
2033
	%%						\text{for $\star \in \{ \lor,\laor\}$.} 
2034
	%%						\\
2035
	%%						\witness{}{A \star B} ( \vec \sigma^A , \vec \sigma^B) & := &  \witness{}{A} (\vec \sigma^A ) \cand \witness{}{B} (\vec \sigma^B ) & 
2036
	%%						\text{for $\star \in \{ \land, \laand \}$.} 
2037
	%%						\\
2038
	%						\witness{}{\exists x^\word A} ( \sigma, \vec \sigma^A  ) & := & \witness{}{A}(\vec \sigma^A , \sigma )  \\
2039
	%						\witness{}{!A} (\vec \sigma^A) & := & \witness{}{A} (\vec \sigma^A)
2040
	%						\end{array}			
2041
	\]
2042
	where $\bullet \in \{ \lor, \laor \}$, $\circ \in \{ \land,\laand \}$, $|\vec \sigma^A| = |\type (A)|$ and $|\vec \sigma^B| = |\type (B)| $.
2043
\end{definition}
2044
%	\todo{problem: what about complexity of checking equality? }
2045

    
2046
%		\begin{remark}
2047
Notice that, unlike in the bounded arithmetic setting where the $\word$ predicate is redundant (since variables are tacitly assumed to range over $\word$), we do not parametrise the witness predicate by an assignment to the free variables of a formula. Instead these dependencies are taken care of by the explicit occurrences of the $\word$ predicate in $\arith$.
2048
%		\end{remark}
2049

    
2050
%		\todo{Reformulate above later if necessary.}
2051

    
2052
%	\todo{What about $\nat (t)$? What does it mean? Replace with true?}
2053

    
2054
%	\todo{either use the witness predicate above, or use realizability predicate at meta-level and a model theory, like BH.}
2055

    
2056
%	\anupam{Need to check above properly. $N(t)$ should be witnessed by the value of $t $ in the model. For equality of terms the witness should not do anything.}
2057

    
2058
%		\anupam{to consider/remark: formally, is witness predicate checked in model or some logical theory?}
2059

    
2060

    
2061

    
2062

    
2063
\begin{lemma}
2064
	\label{lemma:witness-invariant}
2065
	Let $\pi$ be a free-cut free proof in $\closure{\eqspec}\cup \arith$, satisfying properties \ref{item:no-neg-word}, \ref{item:no-forall}, \ref{item:no-quest}, \ref{item:no-laor-step} of Prop.~\ref{prop:freedom}, of a sequent $\Gamma \seqar \Delta $. Let $\eqspec^\pi$ denote the BC program for $\vec f^\pi$.\footnote{We assume that the function symbols occurring in $\eqspec^\pi$ are distinct from those occurring in $\eqspec$.} Then $\qfindth$ proves:
2066
	\[
2067
	\left(\forall \eqspec \cand \forall \eqspec^\pi \cand \witness{}{\bigotimes \Gamma} (\vec a)\right) \cimp \witness{}{\bigparr \Delta } (\vec f^\pi(\vec a))
2068
	\]
2069
	where $\forall \eqspec$ and $\forall \eqspec^\pi$ denote the universal closures of $\eqspec$ and $\eqspec^\pi$ respectively.
2070
	%Suppose $\pi$ is a free-cut free $\Sigma^\nat_1$-$\pind$ proof of a sequent $\Gamma (\vec a) \seqar \Delta (\vec a)$, with $\vec f^\pi$ defined as above. Then:
2071
	%	\[
2072
	%			\witness{\vec a}{\bigotimes \Gamma} (\vec w , \vec b) \implies \witness{\vec a}{\bigparr \Delta } (\vec f^\pi(\vec w , \vec b), \vec b)
2073
	%			\]
2074
\end{lemma}
2075

    
2076

    
2077
%			\anupam{to consider: do we need parameters $\vec a$ in argument of $f$? Or does $\nat$ predicate take care of this?}
2078
%			
2079
%			%	We will be explicit about normal and safe inputs when necessary, for the most part we will simply rearrange inputs into lists $(\vec u; \vec a)$ as in BC framework.
2080
%			
2081
%%			We often suppress the parameters $\vec a$ when it is not important.	
2082
%			
2083
%			\anupam{Is this implication provable in Bellantoni's version of PV based on BC?}
2084

    
2085
%	\anupam{for moment try ignore decoration on right? what about negation?}
2086

    
2087

    
2088
\begin{proof}[Proof sketch]
2089
	By structural induction on $\pi$, again, following the definition of $\vec f^\pi$.\footnote{Notice that, since we are in a classical theory, the proof of the above lemma can be carried out in an arbitrary model, by the completeness theorem, greatly easing the exposition.}
2090
\end{proof}	
2091

    
2092

    
2093
Finally, we arrive at our main result, providing a converse to Thm.~\ref{thm:arith-proves-bc-conv}.
2094

    
2095
\begin{theorem}
2096
	\label{thm:main-result}
2097
	For any coherent equational specification $\eqspec$, if $\arith $ proves $\conv (f , \eqspec)$ then there is a polynomial-time function $g $ on $\Word$ (of same arity as $f$) satisfying $\eqspec [  g/ f ]$.
2098
	
2099
	%		If we can prove a convergence statement for a function $f$ under a specification $\Phi(f)$ then there is a BC-program for a function $\mathbf f$ such that:
2100
	%		\begin{equation}
2101
	%		\label{eqn:spec-implies-program}
2102
	%\Phi(f) \implies f (\vec x) = \mathbf{f} (\vec x)
2103
	%		\end{equation}
2104
	%		\begin{equation}
2105
	%		\label{eqn:program-satisfies-spec}
2106
	%		\Phi(\mathbf f)
2107
	%		\end{equation}
2108
\end{theorem}
2109
\begin{proof}
2110
	[Proof sketch]
2111
	%		By Thm.~\ref{thm:free-cut-elim} and Lemma~\ref{lemma:spec-norm-form} we have a free-cut free proof $\pi$ in $\closure{\eqspec} \cup \arith$ of $!\word (\vec x ) \seqar \word (f (\vec x))$. By Lemma~\ref{lemma:witness-invariant} above this means that $\vec a = \vec x \cimp f^\pi (\vec a) = f(\vec x)$ is true in any model of $\qfindth$ satisfying $\eqspec$ and $\eqspec^\pi$. 
2112
	%%		Since some model must exist by coherence (cf.\ Prop.~\ref{prop:eq-spec-model}), we have that 
2113
	%		Using the fact that $\eqspec \cup \eqspec^\pi$ is coherent we can construct such a model, similarly to Prop.~\ref{prop:eq-spec-model}, which will contain $\Word$ as an initial segment, in which we must have $f^\pi (\vec x) = f (\vec x)$ for every $\vec x \in \Word$, as required.\todo{polish}
2114
	Follows from Lemmas~\ref{lemma:spec-norm-form} and \ref{lemma:witness-invariant}, Dfn.~\ref{dfn:wit-pred} and coherence of $\eqspec$, cf.~\ref{prop:eq-spec-model}.
2115
\end{proof}
2116

    
2117
%			\begin{proof}
2118
%			Notice that a convergence statement has the following form:
2119
%			\[
2120
%			!\Phi(f) , !\nat(\vec a) \seqar \nat(f (\vec a) )
2121
%			\]
2122
%			By the lemma above, and by inspection of the definition of the witness predicate, this means we have that,
2123
%			\[
2124
%			(\Phi(f) \cand \vec x = \vec a ) \implies \mathbf f (\vec x) = f(\vec a)
2125
%			\]
2126
%			whence we arrive at \eqref{eqn:spec-implies-program}.
2127
%			
2128
%			Finally, notice that $\Phi(f)$ has \emph{some} model, since it is a monotone inductive definition so some fixed point must exist. Therefore we obtain \eqref{eqn:program-satisfies-spec} as well.
2129
%			\end{proof}
2130
%			
2131
%			\anupam{rephrase above proof to make more sense.}
2132
%			
2133
%%
2134
%\newcommand{\concat}{\mathit{concat}}
2135
%\paragraph{Some points on concatenation \anupam{if necessary}}
2136
%We can define the concatenation operation by PRN:
2137
%\[
2138
%\begin{array}{rcl}
2139
%\concat (\epsilon ; y) & : = & x \\
2140
%\concat (\succ_i x ; y) & := & \succ_i \concat (x ; y)
2141
%\end{array}
2142
%\]
2143
%
2144
%From here we can define iterated concatenation:
2145
%\[
2146
%\concat (x_1 , \dots x_n ; y) \quad := \quad \concat (x_n ; \concat (x_{n-1} ; \vldots \concat (x_1 ; y) \vldots ) )
2147
%\]
2148
%
2149
%(notice all safe inputs are hereditarily to the right of $;$ so this is definable by safe composition and projection.)
2150

    
2151

    
2152

    
2153

    
2154
\section{Conclusions}
2155
\label{sect:conclusions}
2156

    
2157
As mentioned in the introduction, our motivation for this work is to commence a proof-theoretic study of first-order theories in linear logic, in particular from the point of view of complexity.
2158
To this end we proved a general form of `free-cut elimination' that generalises forms occurring in prior works, e.g.\ \cite{LincolnMSS92}. We adapted an arithmetic of Bellantoni and Hofmann in \cite{BelHof:02} to the linear logic setting, and used the free-cut elimination result, via the witness function method \cite{Buss86book}, to prove that a fragment of this arithmetic characterises $\FP$.
2159

    
2160
%. Our starting point was an axiomatisation proposed by Bellantoni and Hofmann in \cite{BelHof:02}, adapted to the linear logic setting. We identified a fragment, $\arith$, of the arithmetic that is sound and complete with respect to polynomial-time functions, using the free-cut elimination theorem and witness function method that is common in bounded arithmetic and applicative theories.
2161

    
2162
% To see if analogues of various results can be useful for the construction of theories corresponding to various complexity classes. In particular we are interested in the following conventions:
2163

    
2164

    
2165

    
2166

    
2167
%An alternative to \ref{item:crit-implicit-complexity} is the use of, say, bounded quantifiers, as done in bounded arithmetic \cite{Buss86book}.
2168
%
2169
%Regarding \ref{item:crit-ground-type}, almost all approaches 
2170

    
2171
%\subsection{Related work}
2172
From the point of view of constructing theories for complexity classes, the choice of linear logic and witness function method satisfies two particular desiderata:
2173

    
2174
\begin{enumerate}
2175
	\item\label{item:crit-implicit-complexity} Complexity is controlled by `implicit' means, not explicit bounds.
2176
	%, e.g.\ modalities or ramification, as in \cite{Leivant94:found-delin-ptime}. 
2177
	\item\label{item:crit-ground-type} Extraction of programs relies on functions of only ground type.
2178
\end{enumerate}
2179

    
2180
From this point of view, a relevant related work is that of Cantini \cite{Cantini02}, based on an \emph{applicative theory}, which we recently became aware of. The main difference here is the choice of model of computation: Cantini uses terms of combinatory logic, whereas we use equational specifications (ESs). 
2181
As we have mentioned, this choice necessitates a different proof-theoretic treatment, in particular since equality between terms is not decidable in the ES framework, hindering any constructive interpretation of the right-contraction rule. This is why Bellantoni and Hofmann require a double-negation translation into intuitionistic logic and the use of functionals at higher types, and why Leivant disregards classical logic altogether in \cite{Leivant94:found-delin-ptime}. Notice that this is precisely why our use of linear logic is important: the control of $?$ occurrences in a proof allows us to sidestep this problem. At the same time we are able to remain in a classical linear setting. We do not think that either model of computation is better, but rather that it is interesting to observe how such a choice affects the proof-theoretic considerations at hand.
2182

    
2183
%Our use of linear logic can, in some sense, be seen as a refinement of Leivant's result in \cite{Leivant94:found-delin-ptime}, where positive existential comprehension in intuitionistic second-order logic is found to correspond to polynomial time. The necessity of intuitionistic logic is since any double-negation translation from classical logic would break the positivity criterion. In this work we have observed that the further restriction to non-modal formulae in nonlogical rules is sufficient to carry out a witnessing argument directly from a classical setting, while remaining complete for polynomial-time functions. \todo{comprehension vs induction. Check this is not bullshit!}
2184
%\patrick{hmm, I am not sure I understand how our use of linear logic can be viewed as a refinement of this work.}
2185

    
2186

    
2187

    
2188
Most works on the relationships between linear logic and complexity fit in the approach of the proofs-as-programs correspondence and study variants of linear logic with weak exponential modalities \cite{GirardSS92:bounded-ll} \cite{Girard94:lll} \cite{Lafont04}. However, Terui considers a na\"ive set theory \cite{Terui04} that also characterises $\FP$ and is based on \emph{light linear logic}.\footnote{He also presents a cut-elimination result but, interestingly, it is entirely complementary to that which we present here: he obtains full cut-elimination since he works in a system without full exponentials and with Comprehension as the only nonlogical rule. Since the latter admits a cut-reduction step, the former ensures that cut-elimination eventually terminates by a \emph{height-based} argument, contrary to our argument that analyses the \emph{degrees} of cut-formulae.} His approach relies on functionals at higher type, using the propositional fragment of the logic to type the extracted functionals. Another work using linear logic to characterize  complexity classes by using convergence proofs is \cite{Lasson11} but it is tailored for second-order logic.
2189
The status of first-order theories is more developed for other substructural logics, for instance \emph{relevant logic} \cite{FriedmanM92}, although we do not know of any works connecting such logics to computational complexity.
2190

    
2191
%Most works on the relationships between linear logic and complexity concern the construction of \emph{type systems}, e.g.\ bounded linear logic \cite{GirardSS92:bounded-ll}, light linear logic and elementary linear logic \cite{Girard94:lll}, soft linear logic \cite{Lafont04}. However, Terui considers a na\"ive set theory \cite{Terui04} that is also sound and complete for polynomial time and is based on light linear logic. His approach relies on functionals at higher type, using light linear logic to type the extracted functionals.\footnote{He also presents a cut-elimination result but, interestingly, it is entirely complementary to that which we present here: he obtains full cut-elimination since he works in a system without full exponentials and with Comprehension as the only nonlogical axiom. Since the latter admits a cut-reduction step, the former ensures that cut-elimination eventually terminates by a \emph{height-based} argument, contrary to our argument that analyses the \emph{degrees} of cut-formulae.} The status of first-order theories is more developed for other substructural logics, for instance \emph{relevant logic} [cite?], although we do not know of any works connecting such logics to computational complexity.
2192

    
2193
Concerning the relationship between linear logic and safe recursion, we note that an embedding of a variant of safe recursion into light linear logic has been carried studied in \cite{Murawski04}, but this is in the setting of functional computation and is quite different from the present approach. Observe, however, that a difficulty in this setting  was the nonlinear treatment of safe arguments which here we manage by including in our theory an explicit contraction axiom for $W$. 
2194

    
2195
We have already mentioned the work of Bellantoni and Hofmann \cite{BelHof:02}, which was somewhat the inspiration behind this work. Our logical setting is very similar to theirs, under a certain identification of symbols, but there is a curious disconnect in our use of the additive disjunction for the $\surj$ axiom. They rely on just one variant of disjunction. As we said, they rely on a double-negation translation and thus functionals at higher-type.
2196

    
2197

    
2198
%\anupam{mention bounded arithmetic?}
2199
%
2200
%Finally, the approach of bounded arithmetic 
2201
%
2202
%In summary, as far we
2203
%
2204
%
2205
%******
2206
%
2207
%
2208
%
2209
%As far as we know no approach to  has combined a basis in linear (or a related) logic with a solely proof theoretic witnessing argument, such as the witness function method. 
2210
%
2211
%
2212
%
2213
%         
2214
%In summary, it is promising that free-cut elimination and the witness function method can be used to extract similar complexity results to those obtained in bounded arithmetic. 
2215

    
2216

    
2217

    
2218
%\subsection{Further work}
2219
%\todo{finish!}
2220

    
2221
%
2222
In further work we would like to apply the free-cut elimination theorem to theories based on other models of computation, namely the formula model employed in bounded arithmetic \cite{Buss86book}. We believe that the witness function method could be used at a much finer level in this setting,\footnote{One reason for this is that atomic formulae are decidable, and so we can have more freedom with the modalities in induction steps.} and extensions of the theory for other complexity classes, e.g.\ the polynomial hierarchy, might be easier to obtain.
2223
%
2224
%Say something about minimisation and the polynomial hierarchy. Could be achieved by controlling contraction/additives, since this requires a notion of tests.
2225
%
2226
%As we mentioned in the context section, there are many choices of model of computation when constructing theories. Applicative theories use combinatory algebra and in this work we have used equational specifications. Theories of bounded arithmetic, however, use arithmetic formulae to code computation sequences. The advantage of this is that any closed formula can be evaluated, and so equality is decidable. 
2227
%
2228
%We think the true power of the witness function method lies in an approach such as this, although we 
2229
%
2230
%
2231

    
2232
The problem of right-contraction seems to also present in work by Leivant \cite{Leivant94:found-delin-ptime}, which uses equational specifications, where the restriction to positive comprehension to characterise polynomial-time only goes through in an intuitionistic setting. It would be interesting to see if a linear logic refinement could reproduce that result in the classical setting, as we did here.
2233
%
2234
%Polynomial hierarchy? Cite Reinhard/Isobel and their cited works.
2235
%
2236
%\newpage
2237
%
2238
%
2239
%
2240
%
2241
%
2242
%
2243
%
2244
%
2245
%
2246
%
2247
%*******************************************
2248
%\todo{words or integers?}
2249
%% % % % % % % % % % Bullet points % % % % % % %
2250
%
2251
%Some points, either here or in body of paper:
2252
%
2253
%\begin{itemize}
2254
%\item Application of free-cut elimination to witnessing arguments: proof of concept.
2255
%\item Examine differences between our arithmetic and Bellantoni and Hofmann: (a) our induction rule, is it equivalent? Maybe not. (b) point about their surjectivity axiom: we do not think it works unless they add another axiom, like Leivant's, for the completeness in the conditional case. We can remark that linear logic solves this problem neatly by use of the additives.
2256
%\item Point about contraction on right: this is what free-cut elimination + linear logic adequately restricts. This is a problem for any classical theory that uses equational specifications.
2257
%\item Regarding Leivant's intrinsic theories: his result about polynomial-time functions being exactly the provably convergent functions of positive existential induction is necessarily in intuitionistic logic. In classical logic he cannot avoid contraction on the right without the linear logic refinement that we have. \anupam{This can be seen as another contribution of our work?}
2258
%\item On the other hand, our completeness argument can be seen as more-or-less what he had in mind, refined to linear logic.
2259
%\item Discuss different approaches to arithmetics for complexity/witnessing. Namely:
2260
%\begin{itemize}
2261
%\item Programs: terms of combinatory logic vs. formulae of arithmetic vs. equational specifications.
2262
%\item Convergence: N predicate vs. $\Pi^0_2$ sentence.
2263
%\end{itemize}
2264
%Remark: use of equational specifications necessitates N predicate. Hence contraction problems present, no problem for first two types of programs since there is a notion of execution (either via a well-typing or by seeing formula as a circuit), and so closed programs can be run and we can conduct equality tests for right-contraction steps.
2265
%
2266
%Remark: another variant in the equational specifications category is when equations are given on lambda-terms, e.g. as in
2267
%
2268
%Marc Lasson. Controlling Program Extraction in Light Logics. TLCA 2011: 123-137
2269
%
2270
%\item We should mention future line of work in bounded-arithmetic style, i.e. using formulas as programs.
2271
%\patrick{In particular mention that we conjecture that in this setting induction on Sigma1 formulas (not only positive) would be Ptime sound, if I understand well?}
2272
%
2273
%\item Related works:
2274
%\begin{itemize}
2275
% \item Discuss differences with line of work on Curry-Howard style implicit complexity, e.g. light linear logic. Mention work of Murawski to relate safe recursion
2276
% and LLL:
2277
% 
2278
%Andrzej S. Murawski, C.-H. Luke Ong:
2279
%On an interpretation of safe recursion in light affine logic. Theor. Comput. Sci. 318(1-2): 197-223 (2004)
2280
%\item related works on free-cut elimination style results in LL (David Baelde?)
2281
%\end{itemize}
2282
%\end{itemize}
2283
%
2284
%\medskip
2285
%
2286
%A proposal of organization (Patrick):
2287
%\begin{enumerate}
2288
%\item Introduction:
2289
%  \begin{itemize}
2290
%        \item motivate and explain:
2291
%                 \begin{itemize}
2292
%                      \item free-cut elimination: mention use in bounded arithmetic
2293
%                      \item linear logic: say mainly used for structural proof-theory, proofs-as-programs, proof search ?
2294
%                      \item free cut-elimination for linear logic
2295
%                  \end{itemize}  
2296
%          \item application in this paper: arithmetic systems for Ptime computability
2297
%                 \begin{itemize}
2298
%                   \item present Bellantoni-Hofmann's system and Leivant's ramified theory $RT_0$
2299
%                   \item explain their relationships with implicit computational complexity on the one hand, bounded arithmetic on the other. some words about witnessing method in bounded arithmetic
2300
%                   \item describe our contribution: re-prove a weak version of Bellantoni-Hofmann, by using the witnessing method.
2301
%                 \end{itemize}        
2302
%   \end{itemize}
2303
%\item Related works section (by the end?):
2304
%        \begin{itemize}
2305
%             \item about complexity:
2306
%               \begin{itemize}
2307
%                  \item overview of different approaches to arithmetics for complexity
2308
%                  \item technical comparison of our contribution w.r.t. Bellantoni-Hofmann and w.r.t. Leivant
2309
%                  \item short comparison with Murawski-Ong's study of safe recursion vs. LLL
2310
%                 \end{itemize}
2311
%             \item about linear logic:
2312
%                \begin{itemize}
2313
%                    \item if not done in the introduction, comparison with free-cut elimination like results by Baelde or others
2314
%                \end{itemize}
2315
%         \end{itemize}
2316
%\item Conclusion and future work:
2317
%
2318
%mention something about prenexing if needed.
2319
%
2320
% future work on bounded arithmetic style
2321
% \end{enumerate}
2322
% \medskip
2323
% 
2324
% *************************************
2325
%
2326
%
2327
%Comments:
2328
%
2329
%\vspace{2em}
2330
%
2331
%Related works section (by the end?):
2332
%        \begin{itemize}
2333
%             \item about complexity:
2334
%               \begin{itemize}
2335
%                  \item overview of different approaches to arithmetics for complexity
2336
%                  \item technical comparison of our contribution w.r.t. Bellantoni-Hofmann and w.r.t. Leivant
2337
%                  \item short comparison with Murawski-Ong's study of safe recursion vs. LLL
2338
%                 \end{itemize}
2339
%             \item about linear logic:
2340
%                \begin{itemize}
2341
%                    \item if not done in the introduction, comparison with free-cut elimination like results by Baelde or others
2342
%                \end{itemize}
2343
%         \end{itemize}
2344
%         
2345
%         
2346
%         
2347
%                 
2348
%                  % % % % % % % % % % % % % % % % % % % % % % % %
2349
%                  \subsubsection{Parameters}
2350
%                  \begin{itemize}
2351
%                  \item Programs. Equational specifications vs lambda terms vs formulae.
2352
%                  \item Convergence statement. Designated predicate vs $\Pi^0_2$ formula.
2353
%                  \item Source of complexity. Bounded quantifiers (induces Cobham limited recursive programs) vs modalities (induces ramified/safe recursive programs).
2354
%                  \item Proof method. Realisability/Dialectica (higher types) vs Proof theoretic (ground type).
2355
%                  \end{itemize}
2356
%                  
2357
%                  
2358
%                  \subsubsection{Linear logic and complexity}
2359
%                  \begin{itemize}
2360
%                  \item Mostly type systems, e.g.\ bounded/light/soft/elementary linear logic. (Girard, Girard (?), Lafont, ? resp.)
2361
%                  \item Girard/Terui/Grishin naive set theory. Uses realisability.
2362
%                  
2363
%                  
2364
%                  \end{itemize}
2365
%                  
2366
%                  \subsubsection{Modal systems}
2367
%                  Modal systems usually model the notion of ramification from Leivant's intrinsic theories.
2368
%                  
2369
%                  \subsection{Witnessing argument}
2370
%                  Almost all works use a 
2371
%                  
2372
%                  refinement of Leivant 94.
2373

    
2374

    
2375
\bibliographystyle{plain}
2376
\bibliography{biblio}
2377

    
2378
%\newpage
2379
%
2380
%\input{appendix}
2381

    
2382
\end{document}