Statistiques
| Révision :

root / CSL16 / draft / bc.tex @ 116

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

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