Statistiques
| Révision :

root / CSL17 / completeness.tex @ 197

Historique | Voir | Annoter | Télécharger (8,09 ko)

1
\section{Completeness}
2

    
3
The main result of this section is the following:
4

    
5
\begin{theorem}
6
	\label{thm:completeness}
7
	For every $\mubci{i-1}$ program $f(\vec u ; \vec x)$ (which is in $\fphi i$), there is a $\Sigma^{\safe}_i$ formula $A_f(\vec u, \vec x)$ such that $\arith^i$ proves $\forall^{\normal} \vec u, \forall^{\safe} \vec x, \exists^{\safe} ! y. A_f(\vec u , \vec x , y )$ and $\Nat \models \forall \vec u , \vec x. A(\vec u , \vec x , f(\vec u ; \vec x))$.
8
\end{theorem}
9

    
10
The rest of this section is devoted to a proof of this theorem.
11
We proceed by structural induction on a $\mubc^{i-1} $ program, dealing with each case in the proceeding paragraphs.
12

    
13
\paragraph*{Predicative minimisation}
14
Suppose $f(\vec u ; \vec x)$ is defined as $\mu x^{+1} . g(\vec u ; \vec x , x) =_2 0$. 
15
By definition $g$ is in $\mubci{i-2}$, and so by the inductive hypothesis there is a $\Sigma_{i-1}$ formula $A_g (\vec u , \vec x , x , y)$ computing the graph of $g$ such that,
16
\[
17
\arith^i \proves \forall \vec u^\normal . \forall \vec x^\safe , x^\safe . \exists ! y^\safe . A_g(\vec u , \vec x , x , y)
18
\]
19
Let us define $A_f(\vec u ; \vec x , z)$ as:
20
\[
21
\begin{array}{rl}
22
&\left(
23
z=0 \  \cand \ \forall x^\safe , y^\safe . (A_g (\vec u , \vec x , x, y) \cimp y=_2 1)
24
\right) \\
25
\cor & \left(
26
\begin{array}{ll}
27
z\neq 0 
28
& \cand\   \forall y^\safe . (A_g (\vec u , \vec x , p z , y) \cimp y=_2 0 ) \\
29
& \cand\ \forall x^\safe < p z . \forall y^\safe . (A_g (\vec u , \vec x , x , y) \cimp y=_2 1) 
30
\end{array}
31
\right)
32
\end{array}
33
\]
34
Notice that $A_f$ is $\Pi_{i-1}$, since $A_g$ is $\Sigma_{i-1}$ and occurs only in negative context above, with additional safe universal quantifiers occurring in positive context.
35
In particular this means $A_f$ is $\Sigma_i$.
36

    
37
Now, to prove totality of $A_f$, we rely on $\Sigma^\safe_{i-1}$-minimisation, which is a consequence of $\cpind{\Sigma^\safe_i}$:
38

    
39
\begin{lemma}
40
[Minimisation]
41
$\arith^i \proves \cmin{\Sigma^\safe_{i-1}}$.	
42
\end{lemma}
43
% see Thm 20 p. 58 in Buss' book.
44
\begin{proof}
45
\todo{}
46
\end{proof}
47

    
48
Now, working in $\arith^i$, let $\vec u \in \normal , \vec x \in \safe$ and let us prove:
49
\[
50
\exists !z^\safe  . A_f(\vec u ; \vec x , z)
51
\]
52
Suppose that $\exists x^\safe , y^\safe .  (A_g (\vec u ,\vec x , x , y) \cand y=_2 0)$.
53
We can apply minimisation due to the lemma above to find the least $x\in \safe$ such that $\exists y^\safe .  (A_g (\vec u ,\vec x , x , y) \cand y=_2 0)$, and we set $z = \succ 1 x$. So $x= p z$. 
54
%\todo{verify $z\neq 0$ disjunct.} 
55
Then $z \neq 0$ holds. Moreover we had  $\exists ! y^\safe . A_g(\vec u , \vec x , x , y)$. So we deduce that
56
 $\forall y^\safe . (A_g (\vec u , \vec x , p z , y) \cimp y=_2 0 ) $. Finally, as $p z$ is the least element such that
57
  $\exists y^\safe .  (A_g (\vec u ,\vec x , p z , y) \cand y=_2 0)$, we deduce 
58
 $\ \forall x^\safe < p z . \forall y^\safe . (A_g (\vec u , \vec x , x , y) \cimp y=_2 1) $. We conclude that the second member of the disjunction
59
 $A_f(\vec u ; \vec x , z)$ is proven.  
60

    
61
 Otherwise, we have that $\forall x^\safe , y^\safe . (A_g (\vec u , \vec x , x, y) \cimp y=_2 1)$, so we can set $z=0$ and the first member of the disjunction $A_f(\vec u ; \vec x , z)$ is proven.  
62

    
63
So we have proven $\exists z^\safe  . A_f(\vec u ; \vec x , z)$, and unicity can be easily verified.
64

    
65
\paragraph*{Predicative recursion on notation}
66

    
67
\anupam{Assume access to the following predicates (makes completeness easier, soundness will be okay):
68
	\begin{itemize}
69
	%	\item $\pair x y z $ . ``$z$ is the sequence that appends $y$ to the sequence $x$''
70
		\item $\pair x y z$. ``$z$ is the sequence that prepends $x$ to the sequence $y$''
71
		\item $\beta (i; x ,y)$. ``The $i$th element of the sequence $x$ is $y$.''
72
	\end{itemize}
73
	}
74
\patrick{I also assume access to the following predicates:
75
\begin{itemize}
76
   \item $\zerobit (u,k)$ (resp. $\onebit(u,k)$). " The $k$th bit of $u$ is 0 (resp. 1)"
77
   \item $\pref(k,x,y)$. "The prefix of $x$ (as a binary string) of length $k$ is $y$" 
78
   \item $\addtosequence(w,y,w')$. "$w'$ represents the sequence obtained by adding $y$ at the end of the sequence represented by $w$". Here we are referring to sequences which can be decoded with predicate $\beta$.
79
\end{itemize}}
80
Now suppose that $f$ is defined by PRN:
81
\[
82
\begin{array}{rcl}
83
f(0 , \vec u ; \vec x) & \dfn & g(\vec u ; \vec x) \\
84
f(\succ i u, \vec u ; \vec x) & \dfn & h_i( u , \vec u ; \vec x , f(u , \vec u ; \vec x))
85
\end{array}
86
\]
87

    
88
\anupam{using $\beta(i,x,y)$ predicate for sequences: ``$i$th element of $x$ is $y$''. Provably total in $\arith^1$.}
89

    
90
Suppose we have $\Sigma^\safe_i$ formulae $A_g (\vec u ; \vec x,y)$ and $A_{h_i} (u , \vec u ; \vec x , y , z)$ computing the graphs of $g$ and $h_i$ respectively, provably total in $\arith^i$.
91
We define $A_f (u ,\vec u ; \vec x , y)$ as,
92
\[
93
\exists w^\safe . \left(
94
\begin{array}{ll}
95
& 
96
%Seq(z) \cand 
97
\exists y_0 . ( A_g (\vec u , \vec x , y_0) \cand \beta(0, w , y_0) ) \cand \beta(|u|, w,y ) \\
98
%\cand & \forall k < |u| . \exists y_k , y_{k+1} . ( \beta (k, w, y_k) \cand \beta (k+1 ,w, y_{k+1})  \cand A_{h_i} (u , \vec u ; \vec x , y_k , y_{k+1}) )\\
99
\cand & \forall k < |u| . \exists y_k , y_{k+1} . ( \beta (k, w, y_k) \cand \beta (k+1 ,w, y_{k+1})  \cand B (u , \vec u ; \vec x , y_k , y_{k+1}) )
100
\end{array}
101
\right)
102
\]
103
where 
104
\[
105
B (u , \vec u ; \vec x , y_k , y_{k+1}) = \left(
106
\begin{array}{ll}
107
& \zerobit(u,k+1) \cimp  \exists v .(\pref(k,u,v)  \cand A_{h_0}(v,\vec u ; \vec x, y_k, y_{k+1}) )\\
108
\cand &  \onebit(u,k+1) \cimp  \exists v .(\pref(k,u,v)  \cand A_{h_1}(v,\vec u ; \vec x, y_k, y_{k+1}) )
109
\end{array}
110
\right)
111
\]
112

    
113
%which is $\Sigma^\safe_i$ by inspection, and indeed defines the graph of $f$.
114

    
115
To show totality, let $\vec u \in \normal, \vec x \in \safe$ and proceed by induction on $u \in \normal$.
116
The base case, when $u=0$, is immediate from the totality of $A_g$, so for the inductive case we need to show:
117
\[
118
\exists y^\safe . A_f (u , \vec u ; \vec x , y) 
119
\quad \seqar \quad
120
\exists z^\safe . A_f (s_i u, \vec u ; \vec x , z)
121
\]
122

    
123
So let us assume $\exists y^\safe . A_f (u , \vec u ; \vec x , y) $. Then there exists $w$ such that $\safe(w)$ and 
124
 $A_f (u , \vec u ; \vec x , w) $.
125
 
126
 We know that there exists a $z$ such that $A_{h_i}(u,\vec u ; \vec x, y, z)$. Let then $w'$ be such that
127
 $\addtosequence(w,z,w')$. Observe also that we have $\pref(|u|,s_i u,u)$
128
 
129
 So we have, for $k=|u|$:
130
 
131
 $$  \beta (k, w', y) \cand \beta (k+1 ,w', z)  \cand B (u , \vec u ; \vec x , y , z).$$
132
  
133
  and we can conclude that
134
   \[
135
\exists w'^\safe . \left(
136
\begin{array}{ll}
137
& 
138
%Seq(z) \cand 
139
\exists y_0 . ( A_g (\vec u , \vec x , y_0) \cand \beta(0, w' , y_0) ) \cand \beta(|u|+1, w',z ) \\
140
\cand & \forall k < |u|+1 . \exists y_k , y_{k+1} . ( \beta (k, w, y_k) \cand \beta (k+1 ,w, y_{k+1})  \cand B (u , \vec u ; \vec x , y_k , y_{k+1}) )
141
\end{array}
142
\right)
143
\]
144
So $\exists z^{\safe} . A_f (s_i u, \vec u ; \vec x , z)$ has been proven. So by induction we have proven $\forall^{\normal} u,  
145
\forall^{\normal} \vec u, \exists^{\safe} y. A_f (u ,\vec u ; \vec x , y)$. Moreover one can also check the unicity of $y$, and so we have proved the required formula. 
146

    
147
\anupam{here need to `add' element to the computation sequence. Need to do this earlier in the paper.}
148

    
149
\anupam{for inductive cases, need $u\neq 0$ for $\succ 0$ case.}
150

    
151
\paragraph*{Safe composition}
152
Now suppose that $f$ is defined by safe composition:
153
\[
154
f(\vec u ; \vec x) \quad \dfn \quad g( \vec h(\vec u;) ; \vec h' (\vec u ; \vec x) )
155
\]
156

    
157
By the inductive hypothesis, let us suppose that we have $\Sigma^\safe_i $ definitions $A_g , A_{h_i} , A_{h_j'} $ of the graphs of $g , h_i , h_j'$ respectively, which are provably total etc.
158
In particular, by Raising, we have that $\forall \vec u^\normal . \exists v^\normal . A_{h_i} (\vec u , v)$.
159

    
160
We define $A_f (\vec u , \vec x , z)$ defining the graph of $f$ as follows:
161
\[
162
\exists \vec v^\normal . \exists \vec y^\safe .  
163
\left(  
164
\bigwedge\limits_i A_{h_i} (\vec u , v_i)
165
\wedge
166
\bigwedge\limits_j A_{h_j'} (\vec u ; \vec x , y_j)
167
\wedge
168
A_g ( \vec v , \vec y , z ) 
169
\right)
170
\]
171
The provable totality of $A_f$ follows from simple first-order reasoning, mostly cuts and basic quantifier manipulations.
172

    
173
\todo{elaborate}
174

    
175
\paragraph*{Other cases}
176
\todo{}
177

    
178

    
179

    
180

    
181

    
182

    
183

    
184

    
185

    
186

    
187

    
188

    
189

    
190

    
191

    
192

    
193

    
194

    
195

    
196

    
197

    
198

    
199

    
200