root / CSL16 / bc.tex @ 111
Historique | Voir | Annoter | Télécharger (5,33 ko)
| 1 |
|
|---|---|
| 2 |
\section{Bellantoni-Cook characterisation of polynomial-time functions}
|
| 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}.
|
| 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 |
%We say that an expression is well-sorted if the arities of function symbols in it is respected. |
| 7 |
|
| 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 |
\begin{definition}
|
| 10 |
[BC programs] |
| 11 |
BC is the set of programs generated as follows: |
| 12 |
% \paragraph{Initial functions}
|
| 13 |
% The initial functions are: |
| 14 |
\begin{enumerate}
|
| 15 |
\item The constant functions $\epsilon^k$ which takes $k$ arguments and outputs $\epsilon \in \Word$. |
| 16 |
\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$.
|
| 17 |
\item The successor functions $\succ_i ( ; x) := xi$ for $i = 0,1$. |
| 18 |
\item The predecessor function $\pred (; x) := \begin{cases}
|
| 19 |
\epsilon & \mbox{ if } x = \epsilon \\
|
| 20 |
x' & \mbox{ if } x = x'i
|
| 21 |
\end{cases}$.
|
| 22 |
\item The conditional function |
| 23 |
\[ |
| 24 |
%\begin{array}{rcl}
|
| 25 |
%C (; \epsilon, y_\epsilon , y_0, y_1 ) & = & y_\epsilon \\ |
| 26 |
%C(; x0 , y_\epsilon , y_0, y_1) & = & y_0 \\ |
| 27 |
%C(; x1 , y_\epsilon , y_0, y_1) & = & y_1 |
| 28 |
%\end{array}
|
| 29 |
C (; \epsilon, y_\epsilon , y_0, y_1 ) := y_\epsilon |
| 30 |
\quad |
| 31 |
C(; x0 , y_\epsilon , y_0, y_1) := y_0 |
| 32 |
\quad |
| 33 |
C(; x1 , y_\epsilon , y_0, y_1) := y_1 |
| 34 |
\] |
| 35 |
% $\cond (;x,y,z) := \begin{cases}
|
| 36 |
% y & \mbox{ if } x=x' 0 \\
|
| 37 |
% z & \text{otherwise}
|
| 38 |
% \end{cases}$.
|
| 39 |
\end{enumerate}
|
| 40 |
|
| 41 |
% One considers the following closure schemes: |
| 42 |
\begin{enumerate}
|
| 43 |
\setcounter{enumi}{5}
|
| 44 |
\item Predicative recursion on notation (PRN). If $g, h_0, h_1 $ are in BC then so is $f$ defined by, |
| 45 |
\[ |
| 46 |
\begin{array}{rcl}
|
| 47 |
f(0, \vec v ; \vec x) & := & g(\vec v ; \vec x) \\ |
| 48 |
f (\succ_i u , \vec v ; \vec x ) & := & h_i ( u , \vec v ; \vec x , f (u , \vec v ; \vec x) ) |
| 49 |
\end{array}
|
| 50 |
\] |
| 51 |
for $i = 0,1$, so long as the expressions are well-formed. % (i.e.\ in number/sort of arguments). |
| 52 |
\item Safe composition. If $g, \vec h, \vec h'$ are in BC then so is $f$ defined by, |
| 53 |
\[ |
| 54 |
f (\vec u ; \vec x) \quad := \quad g ( \vec h(\vec u ; ) ; \vec h' (\vec u ; \vec x) ) |
| 55 |
\] |
| 56 |
so long as the expression is well-formed. |
| 57 |
\end{enumerate}
|
| 58 |
\end{definition}
|
| 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 |
|
| 61 |
We will implicitly identify a BC program with the equational specification it induces. |
| 62 |
The main property of BC programs is: |
| 63 |
\begin{theorem}[\cite{BellantoniCook92}]
|
| 64 |
The class of functions representable by BC programs is $\FP$. |
| 65 |
\end{theorem}
|
| 66 |
Actually this property remains true if one replaces the PRN scheme by the following more general simultaneous PRN scheme \cite{BellantoniThesis}:
|
| 67 |
|
| 68 |
$(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:
|
| 69 |
\[ |
| 70 |
\begin{array}{rcl}
|
| 71 |
f^j(0, \vec v ; \vec x) & := & g^j(\vec v ; \vec x) \\ |
| 72 |
f^j(\succ_i u , \vec v ; \vec x ) & := & h^j_i ( u , \vec v ; \vec x , \vec{f} (u , \vec v ; \vec x) )
|
| 73 |
\end{array}
|
| 74 |
\] |
| 75 |
for $i = 0,1$, so long as the expressions are well-formed. |
| 76 |
|
| 77 |
%\anupam{simultaneous recursion?}
|
| 78 |
|
| 79 |
%\anupam{also identity, hereditarily safe, expressions, etc.}
|
| 80 |
|
| 81 |
%\anupam{we implicitly associate a BC program with its equational specification}
|
| 82 |
|
| 83 |
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$.
|
| 84 |
For instance $y$ occurs hereditarily safe in $f(u;y,g(v;y))$, but not in $f(g(v;y);x)$. |
| 85 |
\begin{proposition}
|
| 86 |
[Properties of BC programs] |
| 87 |
\label{prop:bc-properties}
|
| 88 |
We have the following properties: |
| 89 |
\begin{enumerate}
|
| 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})$
|
| 94 |
is also a BC program. |
| 95 |
\end{enumerate}
|
| 96 |
|
| 97 |
%\begin{proposition}
|
| 98 |
%[Properties of BC programs] |
| 99 |
%\label{prop:bc-properties}
|
| 100 |
%We have the following properties: |
| 101 |
%\begin{enumerate}
|
| 102 |
%\item Hereditarily safe expressions over BC programs are BC definable. |
| 103 |
%\item Can pass safe input to normal input. |
| 104 |
%\end{enumerate}
|
| 105 |
\end{proposition}
|