Statistiques
| Révision :

root / CSL16 / bc.tex @ 94

Historique | Voir | Annoter | Télécharger (4,48 ko)

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