root / CSL17 / tech-report / appendix-completeness.tex @ 253
Historique | Voir | Annoter | Télécharger (10,84 ko)
1 | 251 | adas | \section{Proof of completeness}\label{appendix:completeness} |
---|---|---|---|
2 | 251 | adas | |
3 | 251 | adas | The rest of this section is devoted to a proof of this theorem. |
4 | 251 | adas | We proceed by structural induction on a $\mubc^{i-1} $ program, dealing with each case in the proceeding paragraphs. |
5 | 251 | adas | |
6 | 251 | adas | The property is easily verified for the class of initial functions of $\mubci{i-1}$: constant, projections, (binary) successors, predecessor, conditional, as already shown in Sect. \ref{sect:graphsbasicfunctions}. Now let us examine the three constructions: predicative minimisation, predicative (safe) recursion and composition. |
7 | 251 | adas | \paragraph*{Predicative minimisation} |
8 | 251 | adas | Suppose $f(\vec u ; \vec x)$ is defined by predicative minimisation from $g$ (we then denote $f$ as as $\mu x^{+1} . g(\vec u ; \vec x , x) =_2 0$). |
9 | 251 | adas | By definition $g$ is in $\mubci{i-2}$, and so by the inductive hypothesis there is a $\Sigma^{\safe}_{i-1}$ formula $A_g (\vec u , \vec x , x , y)$ computing the graph of $g$ such that, |
10 | 251 | adas | \[ |
11 | 251 | adas | \arith^i \proves \forall \vec u^\normal . \forall \vec x^\safe , x^\safe . \exists ! y^\safe . A_g(\vec u , \vec x , x , y) |
12 | 251 | adas | \] |
13 | 251 | adas | Let us define $A_f(\vec u ; \vec x , z)$ as: |
14 | 251 | adas | \[ |
15 | 251 | adas | \begin{array}{rl} |
16 | 251 | adas | &\left( |
17 | 251 | adas | z=0 \ \cand \ \forall x^\safe , y^\safe . (A_g (\vec u , \vec x , x, y) \cimp y=_2 1) |
18 | 251 | adas | \right) \\ |
19 | 251 | adas | \cor & \left( |
20 | 251 | adas | \begin{array}{ll} |
21 | 251 | adas | z\neq 0 |
22 | 251 | adas | & \cand\ \forall y^\safe . (A_g (\vec u , \vec x , p z , y) \cimp y=_2 0 ) \\ |
23 | 251 | adas | & \cand\ \forall x^\safe < p z . \forall y^\safe . (A_g (\vec u , \vec x , x , y) \cimp y=_2 1) |
24 | 251 | adas | \end{array} |
25 | 251 | adas | \right) |
26 | 251 | adas | \end{array} |
27 | 251 | adas | \] |
28 | 251 | adas | Notice that $A_f$ is $\Pi^{\safe}_{i-1}$, since $A_g$ is $\Sigma^{\safe}_{i-1}$ and occurs only in negative context above, with additional safe universal quantifiers occurring in positive context. |
29 | 251 | adas | In particular this means $A_f$ is $\Sigma^{\safe}_i$. |
30 | 251 | adas | |
31 | 251 | adas | Now, to prove totality of $A_f$, we rely on $\Sigma^\safe_{i-1}$-minimisation, which is a consequence of $\cpind{\Sigma^\safe_i}$: |
32 | 251 | adas | |
33 | 251 | adas | \begin{lemma} |
34 | 251 | adas | [Minimisation] |
35 | 251 | adas | $\arith^i \proves \cmin{\Sigma^\safe_{i-1}}$. |
36 | 251 | adas | \end{lemma} |
37 | 251 | adas | % see Thm 20 p. 58 in Buss' book. |
38 | 251 | adas | %\begin{proof} |
39 | 251 | adas | %\end{proof} |
40 | 251 | adas | \begin{proof} |
41 | 253 | pbaillot | This Lemma is proved by using the same method as for the proof of the analogous result in the bounded arithmetic $S_2^{i}$ (see \cite{Buss86book}, Thm 20, p. 58). |
42 | 251 | adas | |
43 | 251 | adas | Let $A(x)$ be a $\Sigma^\safe_{i-1}$ formula, with $x$ in $\safe$. We define the formula $B(a,b,c)$ as: |
44 | 251 | adas | $$ \forall x^{\safe}. (x < |a| \moins b \cimp \zerobit(x,c)) \cand \forall y^{\safe}<c. \neg A(y) \cand \exists y^{\safe} < 2^{|a|\moins b}.A(c+y)$$ |
45 | 251 | adas | where $a$ is in $\normal$, $b$ in $\normal$ and $c$ in $\safe$. $B(a,b,c)$ is in $\Sigma^\safe_{i}$. |
46 | 251 | adas | |
47 | 251 | adas | The intuitive idea of the proof is to observe that, if $A(a)$ is true for $a\neq 0$, then $\exists x^{\safe}\leq a. B(a,b,x)$ holds for $b=0$, and to try to prove it for $b=|a|$, by using a length induction on $b$. |
48 | 251 | adas | |
49 | 251 | adas | First, one can prove: |
50 | 251 | adas | $$ (A(a) \cand a \neq 0) \cimp B(a,0,0).$$ |
51 | 251 | adas | And thus: |
52 | 251 | adas | $$ (A(a) \cand a \neq 0) \cimp \exists x^{\safe}\leq a .B(a,0,x).$$ |
53 | 251 | adas | We then can check that the two following statements are provable: |
54 | 251 | adas | $$ |
55 | 251 | adas | \begin{array}{rcl} |
56 | 251 | adas | (b<|a| \cand B(a,b,c)\cand \exists y^{\safe}<2^{|a| \moins (b+1)}.A(c+y)) &\cimp& B(a,\succ{} b,c)\\ |
57 | 251 | adas | (b<|a| \cand B(a,b,c)\cand \forall y^{\safe}<2^{|a| \moins(b+1)}. A(c+y)) &\cimp & B(a,\succ{} b, c+2^{|a| \moins (b+1)}) |
58 | 251 | adas | \end{array} |
59 | 251 | adas | $$ |
60 | 251 | adas | Moreover we have: $A(a) \cand B(a,b,c) \cimp c\leq a$. |
61 | 251 | adas | From these three statements we deduce: |
62 | 251 | adas | $$(A(a) \cand a \neq 0 \cand b<|a| \cand \exists x^{\safe} \leq a. B(a,b,x)) \cimp \exists x^{\safe } \leq a.B(a,\succ{} b,x).$$ |
63 | 253 | pbaillot | Note that here we have used the fact that we are in classical logic. |
64 | 253 | pbaillot | |
65 | 251 | adas | The formula $\exists x\leq a. B(a,b,c)$ is in $\Sigma^{\safe}_{i}$, so by $\Sigma^{\safe}_{i}$-LIND on the formula $\exists x\leq a. B(a,b,c)$, with the variable $b$ which is in $\normal$, we obtain: |
66 | 251 | adas | $$(A(a) \cand a \neq 0 ) \cimp \exists x^{\safe } \leq a.B(a,|a|,x).$$ |
67 | 251 | adas | But $B(a,|a|,x)$ implies $(\forall y^{\safe}<x. \neg A(y))\cand A(x)$, so we have proven: |
68 | 251 | adas | $$(A(a) \cand a \neq 0 ) \cimp (\exists x^{\safe } \leq a. (\forall y^{\safe}<x. \neg A(y))\cand A(x))$$ |
69 | 251 | adas | which is the $\Sigma_{i-1}^{\safe}$ axiom for $A$. |
70 | 251 | adas | \end{proof} |
71 | 251 | adas | |
72 | 251 | adas | Now, working in $\arith^i$, let $\vec u \in \normal , \vec x \in \safe$ and let us prove: |
73 | 251 | adas | \[ |
74 | 251 | adas | \exists !z^\safe . A_f(\vec u ; \vec x , z) |
75 | 251 | adas | \] |
76 | 251 | adas | Suppose that $\exists x^\safe , y^\safe . (A_g (\vec u ,\vec x , x , y) \cand y=_2 0)$. |
77 | 251 | adas | 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$. |
78 | 251 | adas | %\todo{verify $z\neq 0$ disjunct.} |
79 | 251 | adas | Then $z \neq 0$ holds. Moreover we had $\exists ! y^\safe . A_g(\vec u , \vec x , x , y)$. So we deduce that |
80 | 251 | adas | $\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 |
81 | 251 | adas | $\exists y^\safe . (A_g (\vec u ,\vec x , p z , y) \cand y=_2 0)$, we deduce |
82 | 251 | adas | $\ \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 |
83 | 251 | adas | $A_f(\vec u ; \vec x , z)$ is proven. |
84 | 251 | adas | |
85 | 251 | adas | 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. |
86 | 251 | adas | |
87 | 251 | adas | So we have proven $\exists z^\safe . A_f(\vec u ; \vec x , z)$, and unicity can be easily verified. |
88 | 251 | adas | |
89 | 251 | adas | \paragraph*{Predicative recursion on notation} |
90 | 251 | adas | |
91 | 251 | adas | \anupam{Assume access to the following predicates (makes completeness easier, soundness will be okay): |
92 | 251 | adas | \begin{itemize} |
93 | 251 | adas | % \item $\pair x y z $ . ``$z$ is the sequence that appends $y$ to the sequence $x$'' |
94 | 251 | adas | \item $\pair x y z$. ``$z$ is the sequence that prepends $x$ to the sequence $y$'' |
95 | 251 | adas | \item $\beta (i; x ,y)$. ``The $i$th element of the sequence $x$ is $y$.'' |
96 | 251 | adas | \end{itemize} |
97 | 251 | adas | } |
98 | 251 | adas | \patrick{I also assume access to the following predicates: |
99 | 251 | adas | \begin{itemize} |
100 | 251 | adas | % \item $\zerobit (u,k)$ (resp. $\onebit(u,k)$). " The $k$th bit of $u$ is 0 (resp. 1)" |
101 | 251 | adas | % \item $\pref(k,x,y)$. "The prefix of $x$ (as a binary string) of length $k$ is $y$" |
102 | 251 | adas | \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$. |
103 | 251 | adas | \end{itemize}} |
104 | 251 | adas | In the following we will use the predicates $\zerobit (u,k)$, $\onebit(u,k)$, $\pref(k,x,y)$ which have been defined in Sect. \ref{sect:graphsbasicfunctions}. |
105 | 251 | adas | |
106 | 251 | adas | Suppose that $f$ is defined by predicative recursion on notation: |
107 | 251 | adas | \[ |
108 | 251 | adas | \begin{array}{rcl} |
109 | 251 | adas | f(0 , \vec u ; \vec x) & \dfn & g(\vec u ; \vec x) \\ |
110 | 251 | adas | f(\succ i u, \vec u ; \vec x) & \dfn & h_i( u , \vec u ; \vec x , f(u , \vec u ; \vec x)) |
111 | 251 | adas | \end{array} |
112 | 251 | adas | \] |
113 | 251 | adas | |
114 | 251 | adas | \anupam{using $\beta(i,x,y)$ predicate for sequences: ``$i$th element of $x$ is $y$''. Provably total in $\arith^1$.} |
115 | 251 | adas | |
116 | 251 | adas | 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$. |
117 | 251 | adas | We define $A_f (u ,\vec u ; \vec x , y)$ as, |
118 | 251 | adas | \[ |
119 | 251 | adas | \exists w^\safe . \left( |
120 | 251 | adas | \begin{array}{ll} |
121 | 251 | adas | & |
122 | 251 | adas | %Seq(z) \cand |
123 | 251 | adas | \exists^{\safe} y_0 . ( A_g (\vec u , \vec x , y_0) \cand \beta(0, w , y_0) ) \cand \beta(|u|, w,y ) \\ |
124 | 251 | adas | %\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}) )\\ |
125 | 251 | adas | \cand & \forall^{\normal} k < |u| . \exists^{\safe} 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}) ) |
126 | 251 | adas | \end{array} |
127 | 251 | adas | \right) |
128 | 251 | adas | \] |
129 | 251 | adas | where |
130 | 251 | adas | \[ |
131 | 251 | adas | B (u , \vec u ; \vec x , y_k , y_{k+1}) = \left( |
132 | 251 | adas | \begin{array}{ll} |
133 | 251 | adas | & \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}) )\\ |
134 | 251 | adas | \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}) ) |
135 | 251 | adas | \end{array} |
136 | 251 | adas | \right) |
137 | 251 | adas | \] |
138 | 251 | adas | |
139 | 251 | adas | %which is $\Sigma^\safe_i$ by inspection, and indeed defines the graph of $f$. |
140 | 251 | adas | |
141 | 251 | adas | To show totality, let $\vec u \in \normal, \vec x \in \safe$ and proceed by induction on $u \in \normal$. |
142 | 251 | adas | The base case, when $u=0$, is immediate from the totality of $A_g$, so for the inductive case we need to show: |
143 | 251 | adas | \[ |
144 | 251 | adas | \exists y^\safe . A_f (u , \vec u ; \vec x , y) |
145 | 251 | adas | \quad \seqar \quad |
146 | 251 | adas | \exists z^\safe . A_f (s_i u, \vec u ; \vec x , z) |
147 | 251 | adas | \] |
148 | 251 | adas | |
149 | 251 | adas | So let us assume $\exists y^\safe . A_f (u , \vec u ; \vec x , y) $. Then there exists $w$ such that $\safe(w)$ and |
150 | 251 | adas | $A_f (u , \vec u ; \vec x , w) $. |
151 | 251 | adas | |
152 | 251 | adas | 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 |
153 | 251 | adas | $\addtosequence(w,z,w')$. Observe also that we have $\pref(|u|,s_i u,u)$ |
154 | 251 | adas | |
155 | 251 | adas | So we have, for $k=|u|$: |
156 | 251 | adas | |
157 | 251 | adas | $$ \beta (k, w', y) \cand \beta (k+1 ,w', z) \cand B (u , \vec u ; \vec x , y , z).$$ |
158 | 251 | adas | |
159 | 251 | adas | and we can conclude that |
160 | 251 | adas | \[ |
161 | 251 | adas | \exists w'^\safe . \left( |
162 | 251 | adas | \begin{array}{ll} |
163 | 251 | adas | & |
164 | 251 | adas | %Seq(z) \cand |
165 | 251 | adas | \exists y_0 . ( A_g (\vec u , \vec x , y_0) \cand \beta(0, w' , y_0) ) \cand \beta(|u|+1, w',z ) \\ |
166 | 251 | adas | \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}) ) |
167 | 251 | adas | \end{array} |
168 | 251 | adas | \right) |
169 | 251 | adas | \] |
170 | 251 | adas | 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, |
171 | 251 | adas | \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. |
172 | 251 | adas | |
173 | 251 | adas | \anupam{here need to `add' element to the computation sequence. Need to do this earlier in the paper.} |
174 | 251 | adas | |
175 | 251 | adas | \anupam{for inductive cases, need $u\neq 0$ for $\succ 0$ case.} |
176 | 251 | adas | |
177 | 251 | adas | \paragraph*{Safe composition} |
178 | 251 | adas | Now suppose that $f$ is defined by safe composition: |
179 | 251 | adas | \[ |
180 | 251 | adas | f(\vec u ; \vec x) \quad \dfn \quad g( \vec h(\vec u;) ; \vec h' (\vec u ; \vec x) ) |
181 | 251 | adas | \] |
182 | 251 | adas | |
183 | 251 | adas | 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. |
184 | 251 | adas | In particular, by Raising, we have that $\forall \vec u^\normal . \exists v^\normal . A_{h_i} (\vec u , v)$. |
185 | 251 | adas | |
186 | 251 | adas | We define $A_f (\vec u , \vec x , z)$ defining the graph of $f$ as follows: |
187 | 251 | adas | \[ |
188 | 251 | adas | \exists \vec v^\normal . \exists \vec y^\safe . |
189 | 251 | adas | \left( |
190 | 251 | adas | \bigwedge\limits_i A_{h_i} (\vec u , v_i) |
191 | 251 | adas | \wedge |
192 | 251 | adas | \bigwedge\limits_j A_{h_j'} (\vec u ; \vec x , y_j) |
193 | 251 | adas | \wedge |
194 | 251 | adas | A_g ( \vec v , \vec y , z ) |
195 | 251 | adas | \right) |
196 | 251 | adas | \] |
197 | 251 | adas | The provable totality of $A_f$ follows from simple first-order reasoning, mostly cuts and basic quantifier manipulations. |
198 | 251 | adas | |
199 | 251 | adas | \todo{elaborate} |
200 | 251 | adas | |
201 | 251 | adas | The proof of Thm \ref{thm:completeness} is thus completed. |