Statistiques
| Révision :

root / CSL16 / bc.tex @ 103

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

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