Statistiques
| Révision :

root / CSL16 / draft / bc.tex @ 102

Historique | Voir | Annoter | Télécharger (5,2 ko)

1 101 adas
2 101 adas
\section{Bellantoni-Cook characterisation of polynomial-time functions}
3 101 adas
%We first recall the notion of safe recursion on notation from BC. TODO
4 101 adas
We recall the Bellantoni-Cook  algebra BC of programs defined by safe recursion on notation \cite{BellantoniCook92}. These will be employed for proving both the completeness   (all polynomial time functions are provably total) and the soundness result (all provably total functions are polynomial time) of our system. We consider function symbols $f$ over the domain  $\Word$ which have \textit{normal} and \textit{safe} arguments. 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.
5 101 adas
We say that an expression is well-sorted if the arities of function symbols in it is respected.
6 101 adas
%\cite{BellantoniThesis}
7 101 adas
8 101 adas
\anupam{Do we need simultaneous PRN? cf.\ Bellantoni's thesis.}
9 101 adas
10 101 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.}
11 101 adas
\begin{definition}
12 101 adas
	[BC programs]
13 101 adas
	BC is the set of programs over $\Word$ generated by the following initial functions and closure schemes.
14 101 adas
	%	\paragraph{Initial functions}
15 101 adas
%	The initial functions are:
16 101 adas
	\begin{enumerate}
17 101 adas
		\item The constant function $\epsilon$ which takes no arguments and outputs $\epsilon \in \Word$.
18 101 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$.
19 101 adas
		\item The successor functions $\succ_i ( ; x) := xi$ for $i = 0,1$.
20 101 adas
		\item The predecessor function $\pred (; x) := \begin{cases}
21 101 adas
		\epsilon &  \mbox{ if }  x = \epsilon \\
22 101 adas
		x' &  \mbox{ if }  x = x'i
23 101 adas
		\end{cases}$.
24 101 adas
		\item The conditional function
25 101 adas
		\[
26 101 adas
\begin{array}{rcl}
27 101 adas
C (; \epsilon, y_\epsilon , y_0, y_1  ) & = & y_\epsilon \\
28 101 adas
C(; x0 , y_\epsilon , y_0, y_1) & = & y_0 \\
29 101 adas
C(; x1 , y_\epsilon , y_0, y_1) & = & y_1
30 101 adas
\end{array}
31 101 adas
\]
32 101 adas
%		$\cond (;x,y,z) := \begin{cases}
33 101 adas
%		y & \mbox{ if } x=x' 0 \\
34 101 adas
%		z & \text{otherwise}
35 101 adas
%		\end{cases}$.
36 101 adas
	\end{enumerate}
37 101 adas
38 101 adas
	One considers the following closure schemes:
39 101 adas
	\begin{enumerate}
40 101 adas
	\setcounter{enumi}{5}
41 101 adas
	\item Predicative recursion on notation (PRN). If $g, h_0, h_1 $ are in BC then so is $f$ defined by,
42 101 adas
	\[
43 101 adas
	\begin{array}{rcl}
44 101 adas
	f(0, \vec v ; \vec x) & := & g(\vec v ; \vec x) \\
45 101 adas
	f (\succ_i u , \vec v ; \vec x ) & := & h_i ( u , \vec v ; \vec x , f (u , \vec v ; \vec x) )
46 101 adas
	\end{array}
47 101 adas
	\]
48 101 adas
	for $i = 0,1$,  so long as the expressions are well-formed. % (i.e.\ in number/sort of arguments).
49 101 adas
	\item Safe composition. If $g, \vec h, \vec h'$ are in BC then so is $f$ defined by,
50 101 adas
	\[
51 101 adas
	f (\vec u ; \vec x) \quad := \quad g ( \vec h(\vec u ; ) ; \vec h' (\vec u ; \vec x) )
52 101 adas
	\]
53 101 adas
	so long as the expression is well-formed.
54 101 adas
	\end{enumerate}
55 101 adas
	\end{definition}
56 101 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.
57 101 adas
58 101 adas
Now, the main property of BC programs is
59 101 adas
\begin{theorem}\cite{BellantoniCook92}
60 101 adas
The class of functions representable by BC programs is the class FP.
61 101 adas
\end{theorem}
62 101 adas
Actually this property remains true if one replaces the PRN scheme by the following more general simultaneous PRN scheme \cite{BellantoniThesis}:
63 101 adas
64 101 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:
65 101 adas
	\[
66 101 adas
	\begin{array}{rcl}
67 101 adas
	f^j(0, \vec v ; \vec x) & := & g^j(\vec v ; \vec x) \\
68 101 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) )
69 101 adas
	\end{array}
70 101 adas
	\]
71 101 adas
	for $i = 0,1$,  so long as the expressions are well-formed.
72 101 adas
73 101 adas
%\anupam{simultaneous recursion?}
74 101 adas
75 101 adas
\anupam{also identity, hereditarily safe, expressions, etc.}
76 101 adas
77 101 adas
%\anupam{we implicitly associate a BC program with its equational specification}
78 101 adas
79 101 adas
Consider a well-formed expression $t$ built from function symbols, initial functions and variables. One says that a variable $y$ is \textit{hereditarily safe} in $t$ if  for every subexpression $f(\vec{r}; \vec{s})$ of $t$ the terms in $\vec{r}$ do not contain any occurrence of $y$.  For instance $y$ is hereditarily safe in $f(u;y,g(v;y))$, but not in $f(g(v;y);x)$.
80 101 adas
\begin{proposition}
81 101 adas
[Properties of BC programs]
82 101 adas
\label{prop:bc-properties}
83 101 adas
We have the following properties:
84 101 adas
\begin{enumerate}
85 101 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
86 101 adas
by $f(u_1,\dots, u_n,x_1,\dots, x_k):=t$ is a BC program.
87 101 adas
\item Assume $f$ is a BC program, then the program $g$ defined as
88 101 adas
$$ g(\vec{u},v;\vec{x}):=f(\vec{u};v,\vec{x})$$
89 101 adas
is also a BC program.
90 101 adas
\end{enumerate}
91 101 adas
92 101 adas
%\begin{proposition}
93 101 adas
%[Properties of BC programs]
94 101 adas
%\label{prop:bc-properties}
95 101 adas
%We have the following properties:
96 101 adas
%\begin{enumerate}
97 101 adas
%\item Hereditarily safe expressions over BC programs are BC definable.
98 101 adas
%\item Can pass safe input to normal input.
99 101 adas
%\end{enumerate}
100 101 adas
\end{proposition}