Statistiques
| Révision :

root / CSL16 / bc.tex @ 239

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

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