Révision 121
| CSL16/bc.tex (revision 121) | ||
|---|---|---|
| 1 | 1 |
|
| 2 | 2 |
\section{Bellantoni-Cook characterisation of polynomial-time functions}
|
| 3 | 3 |
|
| 4 |
We recall the Bellantoni-Cook algebra BC of programs 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}.
|
|
| 4 |
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}.
|
|
| 5 | 5 |
%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.
|
| 6 | 6 |
%We say that an expression is well-sorted if the arities of function symbols in it is respected. |
| 7 | 7 |
|
| 8 | 8 |
%\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.}
|
| 9 | 9 |
\begin{definition}
|
| 10 | 10 |
[BC programs] |
| 11 |
BC is the set of programs generated as follows:
|
|
| 11 |
BC is the set of functions generated as follows:
|
|
| 12 | 12 |
% \paragraph{Initial functions}
|
| 13 | 13 |
% The initial functions are: |
| 14 | 14 |
\begin{enumerate}
|
| ... | ... | |
| 58 | 58 |
\end{definition}
|
| 59 | 59 |
%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. |
| 60 | 60 |
|
| 61 |
We will implicitly identify a BC program with the equational specification it induces.
|
|
| 61 |
We will implicitly identify a BC function with the equational specification it induces.
|
|
| 62 | 62 |
The main property of BC programs is: |
| 63 | 63 |
\begin{theorem}[\cite{BellantoniCook92}]
|
| 64 | 64 |
The class of functions representable by BC programs is $\FP$. |
| ... | ... | |
| 88 | 88 |
We have the following properties: |
| 89 | 89 |
\begin{enumerate}
|
| 90 | 90 |
\item The identity function is in BC. |
| 91 |
\item Let $t$ be a well-formed expression built from BC programs and variables, denote its free variables as $\{u_1,\dots, u_n,x_1,\dots, x_k\}$, and assume for for each $1\leq i\leq k$, $x_i$ is hereditarily safe in $t$. Then the function $f$ defined
|
|
| 92 |
by $f(u_1,\dots, u_n; x_1,\dots, x_k):=t$ is a BC program. |
|
| 93 |
\item If $f$ is a BC program, then the program $g(\vec{u},v;\vec{x})$ defined as $f(\vec{u};v,\vec{x})$
|
|
| 91 |
\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.
|
|
| 92 |
\item If $f$ is a BC function, then the function $g(\vec{u},v;\vec{x})$ defined as $f(\vec{u};v,\vec{x})$
|
|
| 94 | 93 |
is also a BC program. |
| 95 | 94 |
\end{enumerate}
|
| 96 | 95 |
|
| CSL16/arithmetic.tex (revision 121) | ||
|---|---|---|
| 1 | 1 |
\section{A variant of arithmetic in linear logic}
|
| 2 | 2 |
\label{sect:arithmetic}
|
| 3 |
For the remainder of this article we will consider an implementation of arithmetic in the sequent calculus based on the theory $\bharith$ of Bellantoni and Hofmann in \cite{BelHof:02}. The axioms that we present are obtained from $\bharith$ by using linear logic connectives in place of their analogues, calibrating the use of additives or multiplicatives in order to be compatible with the completeness and witnessing arguments that we present in 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.
|
|
| 3 |
For the remainder of this article we will consider an implementation of arithmetic in the sequent calculus based on the theory $\bharith$ of Bellantoni and Hofmann in \cite{BelHof:02}. The 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.
|
|
| 4 | 4 |
|
| 5 | 5 |
|
| 6 | 6 |
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:
|
| ... | ... | |
| 292 | 292 |
\begin{proposition}
|
| 293 | 293 |
\label{prop:eq-spec-model}
|
| 294 | 294 |
% For every equational specification $\eqspec$, its universal closure has a model. |
| 295 |
The universal closure of any coherent ES $\eqspec$ has a model satisfying $\basic + \ind$.
|
|
| 295 |
The universal closure of a coherent ES $\eqspec$ has a model satisfying $\basic + \ind$. |
|
| 296 | 296 |
\end{proposition}
|
| 297 | 297 |
|
| 298 | 298 |
%\begin{proof}
|
| ... | ... | |
| 397 | 397 |
% 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. |
| 398 | 398 |
%\end{proof}
|
| 399 | 399 |
|
| 400 |
As a consequence of this Corollary observe that any $I\Sigma^\word_{i}$-proof (ot $I\Pi^\word_{i}$-proof) can be transformed into a proof which is free-cut free and whose formulas contain only $\word$-guarded quantifiers.
|
|
| 400 |
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.
|
|
| CSL16/biblio.bib (revision 121) | ||
|---|---|---|
| 9 | 9 |
year = {2012}
|
| 10 | 10 |
} |
| 11 | 11 |
|
| 12 |
|
|
| 13 |
@article{Dershowitz:1979:PTM:359138.359142,
|
|
| 14 |
author = {Dershowitz, Nachum and Manna, Zohar},
|
|
| 15 |
title = {Proving Termination with Multiset Orderings},
|
|
| 16 |
journal = {Commun. ACM},
|
|
| 17 |
issue_date = {Aug. 1979},
|
|
| 18 |
volume = {22},
|
|
| 19 |
number = {8},
|
|
| 20 |
month = aug, |
|
| 21 |
year = {1979},
|
|
| 22 |
issn = {0001-0782},
|
|
| 23 |
pages = {465--476},
|
|
| 24 |
numpages = {12},
|
|
| 25 |
url = {http://doi.acm.org/10.1145/359138.359142},
|
|
| 26 |
doi = {10.1145/359138.359142},
|
|
| 27 |
acmid = {359142},
|
|
| 28 |
publisher = {ACM},
|
|
| 29 |
address = {New York, NY, USA},
|
|
| 30 |
keywords = {bags, multisets, production systems, program correctness, program termination, program verification, reduction rules, term rewriting systems, tree replacement systems, well-founded orderings, well-founded sets},
|
|
| 31 |
} |
|
| 32 |
|
|
| 33 |
|
|
| 34 |
|
|
| 12 | 35 |
@article{Beckmann11,
|
| 13 | 36 |
author = {Arnold Beckmann and
|
| 14 | 37 |
Samuel R. Buss}, |
| CSL16/free-cut-elim.tex (revision 121) | ||
|---|---|---|
| 17 | 17 |
%} |
| 18 | 18 |
%\] |
| 19 | 19 |
% Here $cut_1$ is anchored in this sense, but not $cut_2$. Therefore we propose a more general definition: |
| 20 |
Since our nonlogical rules may have many principal formulae on which we permit cuts to be anchored, we need a slightly more general notion than `principal formula'.
|
|
| 20 |
Since our nonlogical rules may have many principal formulae on which cuts may be anchored, we need a slightly more general notion of principality.
|
|
| 21 | 21 |
\begin{definition}\label{def:anchoredcut}
|
| 22 | 22 |
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:
|
| 23 | 23 |
\begin{itemize}
|
| 24 |
\item A formula $A$ in a sequent $\Gamma \seqar \Delta$ is \textit{hereditarily principal} for a rule (S) if either (i) the sequent is in the conclusion of (S) and $A$ is principal in it, or
|
|
| 24 |
\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
|
|
| 25 | 25 |
(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. |
| 26 |
\item A cut-step is an \textit{anchored cut} if either of its cut-formulas $A$ in the two premises are both hereditarily principal for nonlogical steps, or one is hereditarily principal for a nonlogical step and the other one is principal for a logical step.
|
|
| 26 |
\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.
|
|
| 27 | 27 |
\end{itemize}
|
| 28 |
A cut which is not anchored will also be called a \textit{free-cut}.
|
|
| 28 | 29 |
\end{definition}
|
| 29 | 30 |
As a consequence of this definition, an anchored cut on a formula $A$ has the following properties: |
| 30 | 31 |
\begin{itemize}
|
| 31 | 32 |
\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. |
| 32 | 33 |
\item The other premise is either of the same form or is a logical step with principal formula $A$. |
| 33 | 34 |
\end{itemize}
|
| 34 |
|
|
| 35 |
% |
|
| 35 | 36 |
% 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
|
| 36 | 37 |
% a rule $\rigrul{\lor}$ and a rule $\lefrul{\lor}$ is not.
|
| 37 |
|
|
| 38 |
A cut which is not anchored will also be called a \textit{free-cut}.
|
|
| 38 |
% |
|
| 39 |
|
|
| 39 | 40 |
|
| 40 | 41 |
% With this new definition both $cut_1$ and $cut_2$ in the previous example are anchored. |
| 41 | 42 |
|
| ... | ... | |
| 53 | 54 |
\begin{theorem}
|
| 54 | 55 |
[Free-cut elimination] |
| 55 | 56 |
\label{thm:free-cut-elim}
|
| 56 |
Given a system $\system$, any $\system$-proof $\pi$ can be transformed into a $\system$-proof $\pi'$ with same conclusion sequent and without any free-cut.
|
|
| 57 |
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.
|
|
| 57 | 58 |
\end{theorem}
|
| 58 | 59 |
%The proof will be given below. It will proceed |
| 59 | 60 |
The proof proceeds in a way similar to the classical proof of cut elimination for linear logic, |
| ... | ... | |
| 70 | 71 |
|
| 71 | 72 |
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.}
|
| 72 | 73 |
\begin{lemma}[Standard commutations]\label{lem:standardcommutations}
|
| 73 |
Any logical rule distinct from $(\rigrul{!})$, $(\lefrul{?})$ can be commuted top-down with any cut $c$. If the logical rule is binary this will produce two cuts.
|
|
| 74 |
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.
|
|
| 74 | 75 |
\end{lemma}
|
| 75 | 76 |
|
| 76 | 77 |
|
| 77 | 78 |
% In the following we will need to be more careful about rules $(\rigrul{!})$, $(\lefrul{?})$, $(R)$. For that we establish our second key lemma:
|
| 78 | 79 |
For rules $(\rigrul{!})$, $(\lefrul{?})$, $(R)$ we establish our second key lemma:
|
| 79 | 80 |
\begin{lemma}[Key commutations]\label{lem:keycommutations}
|
| 80 |
A cut of the following form, where $?A$ is non principal for $(R)$, can be commuted with the $(R)$ rule:
|
|
| 81 |
A cut of the following form, where $?A$ is not principal for $(R)$, can be commuted above the $(R)$ step:
|
|
| 81 | 82 |
\[ |
| 82 | 83 |
\vliinf{cut}{}{ !\Gamma', \Gamma, \Sigma' \seqar \Delta', ?A, ?\Pi, ?\Pi'}
|
| 83 | 84 |
{ \vlinf{(R)}{}{!\Gamma, \Sigma' \seqar \Delta', ?A, ?\Pi}{ \{ !\Gamma, \Sigma_i \seqar \Delta_i, ?A, ?\Pi \}_{i\in I} } }
|
| ... | ... | |
| 90 | 91 |
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$.
|
| 91 | 92 |
\end{lemma}
|
| 92 | 93 |
\begin{proof}
|
| 93 |
The left subderivation can be replaced by:
|
|
| 94 |
The derivation is transformed as follows:
|
|
| 94 | 95 |
\[ |
| 95 | 96 |
\vlinf{(R)}{}{ !\Gamma', !\Gamma, \Sigma' \seqar \Delta', ?\Pi, ?\Pi'}
|
| 96 | 97 |
{ \vliinf{cut}{}{\{!\Gamma', !\Gamma, \Sigma_i \seqar \Delta_i, ?\Pi,?\Pi' \}_{i\in I}} {
|
| ... | ... | |
| 101 | 102 |
?A, !\Gamma' \seqar ?\Pi' |
| 102 | 103 |
} } |
| 103 | 104 |
\] |
| 104 |
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 non-logical rules these eigenvariables do not appear in $\Sigma', \Delta'$ or $!\Gamma, ?\Pi$. So the occurrence of $(R)$ in this new subderivation is valid.
|
|
| 105 |
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. |
|
| 105 | 106 |
|
| 106 | 107 |
Similarly for the symmetric derivation with a cut on the LHS of the conclusion of an $(R)$ on a formula $!A$. |
| 107 | 108 |
The analogous situations with rules $(\rigrul{!})$ and $(\lefrul{?})$ are handled in the same way, as usual in linear logic.
|
| ... | ... | |
| 110 | 111 |
|
| 111 | 112 |
Now we can prove the main free-cut elimination result: |
| 112 | 113 |
\begin{proof}[Proof sketch of Thm.~\ref{thm:free-cut-elim}]
|
| 113 |
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 the proof $\deg( \pi)$ is the multiset of the degrees of its non-anchored formulas. The degrees will be compared with the multiset ordering.
|
|
| 114 |
The demonstration proceeds by induction on the degree $\deg( \pi)$. For a given degree we proceed with a sub-induction on the \textit{height} $\height{\pi}$ of the proof.
|
|
| 114 |
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.}
|
|
| 115 |
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.
|
|
| 115 | 116 |
|
| 116 |
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$, that is to say 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$.
|
|
| 117 |
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$.
|
|
| 117 | 118 |
\[ |
| 118 | 119 |
\vliinf{c \; \; \cut}{}{\Gamma, \Sigma \seqar \Delta , \Pi}{ \vlinf{S_1}{}{\Gamma \seqar \Delta, A}{} }{\vlinf{S_2}{}{\Sigma, A \seqar \Pi}{}}
|
| 119 | 120 |
\] |
| CSL16/preliminaries.tex (revision 121) | ||
|---|---|---|
| 174 | 174 |
\end{enumerate}
|
| 175 | 175 |
|
| 176 | 176 |
%The distinction between modal and nonmodal formulae in $(R)$ induces condition 1 |
| 177 |
Conditions 2 and 3 are actually standard 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
|
|
| 177 |
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
|
|
| 178 | 178 |
% and the conventions of 1 |
| 179 |
is peculiar to our linear logic setting in order to carry out certain proof-theoretic manipulations, mainly free-cut elimination in Sect.~\ref{sect:free-cut-elim}.
|
|
| 179 |
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}.
|
|
| 180 | 180 |
% |
| 181 | 181 |
|
| 182 | 182 |
|
Formats disponibles : Unified diff