Statistiques
| Révision :

root / CSL16 / draft / bc.tex @ 186

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

1

    
2
\section{Bellantoni-Cook characterisation of polynomial-time functions}
3

    
4
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
We say that an expression is well-sorted if the arities of function symbols in it is respected.
6

    
7
\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
\begin{definition}
9
	[BC programs]
10
	BC is the set of programs over $\Word$ generated by the following initial functions and closure schemes.
11
	%	\paragraph{Initial functions}
12
%	The initial functions are:
13
	\begin{enumerate}
14
		\item The constant function $\epsilon$ which takes no arguments and outputs $\epsilon \in \Word$.
15
		\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
		\item The successor functions $\succ_i ( ; x) := xi$ for $i = 0,1$.
17
		\item The predecessor function $\pred (; x) := \begin{cases}
18
		\epsilon &  \mbox{ if }  x = \epsilon \\
19
		x' &  \mbox{ if }  x = x'i
20
		\end{cases}$.
21
		\item The conditional function 
22
		\[
23
\begin{array}{rcl}
24
C (; \epsilon, y_\epsilon , y_0, y_1  ) & = & y_\epsilon \\
25
C(; x0 , y_\epsilon , y_0, y_1) & = & y_0 \\
26
C(; x1 , y_\epsilon , y_0, y_1) & = & y_1 
27
\end{array}
28
\]
29
%		$\cond (;x,y,z) := \begin{cases}
30
%		y & \mbox{ if } x=x' 0 \\
31
%		z & \text{otherwise}
32
%		\end{cases}$.
33
	\end{enumerate}
34
	
35
	One considers the following closure schemes:
36
	\begin{enumerate}
37
	\setcounter{enumi}{5}
38
	\item Predicative recursion on notation (PRN). If $g, h_0, h_1 $ are in BC then so is $f$ defined by,
39
	\[
40
	\begin{array}{rcl}
41
	f(0, \vec v ; \vec x) & := & g(\vec v ; \vec x) \\
42
	f (\succ_i u , \vec v ; \vec x ) & := & h_i ( u , \vec v ; \vec x , f (u , \vec v ; \vec x) )
43
	\end{array}
44
	\]
45
	for $i = 0,1$,  so long as the expressions are well-formed. % (i.e.\ in number/sort of arguments).
46
	\item Safe composition. If $g, \vec h, \vec h'$ are in BC then so is $f$ defined by,
47
	\[
48
	f (\vec u ; \vec x) \quad := \quad g ( \vec h(\vec u ; ) ; \vec h' (\vec u ; \vec x) )
49
	\]
50
	so long as the expression is well-formed.
51
	\end{enumerate}
52
	\end{definition}
53
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

    
55
Now, the main property of BC programs is
56
\begin{theorem}\cite{BellantoniCook92}
57
The class of functions representable by BC programs is the class FP.
58
\end{theorem}	
59
Actually this property remains true if one replaces the PRN scheme by the following more general simultaneous PRN scheme \cite{BellantoniThesis}:
60

    
61
$(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
	\[
63
	\begin{array}{rcl}
64
	f^j(0, \vec v ; \vec x) & := & g^j(\vec v ; \vec x) \\
65
	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
	\end{array}
67
	\]
68
	for $i = 0,1$,  so long as the expressions are well-formed.
69

    
70
%\anupam{simultaneous recursion?}
71

    
72
\anupam{also identity, hereditarily safe, expressions, etc.}
73

    
74
%\anupam{we implicitly associate a BC program with its equational specification} 
75

    
76
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
\begin{proposition}
78
[Properties of BC programs]
79
\label{prop:bc-properties}
80
We have the following properties:
81
\begin{enumerate}
82
\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
by $f(u_1,\dots, u_n,x_1,\dots, x_k):=t$ is a BC program.
84
\item Assume $f$ is a BC program, then the program $g$ defined as
85
$$ g(\vec{u},v;\vec{x}):=f(\vec{u};v,\vec{x})$$
86
is also a BC program.
87
\end{enumerate}
88

    
89
%\begin{proposition}
90
%[Properties of BC programs]
91
%\label{prop:bc-properties}
92
%We have the following properties:
93
%\begin{enumerate}
94
%\item Hereditarily safe expressions over BC programs are BC definable.
95
%\item Can pass safe input to normal input.
96
%\end{enumerate}
97
\end{proposition}