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