root / CSL17 / appendix-completeness.tex @ 226
Historique | Voir | Annoter | Télécharger (9,14 ko)
1 | 224 | pbaillot | \section{Proof of completeness}\label{appendix:completeness} |
---|---|---|---|
2 | 223 | adas | |
3 | 223 | adas | The rest of this section is devoted to a proof of this theorem. |
4 | 223 | adas | We proceed by structural induction on a $\mubc^{i-1} $ program, dealing with each case in the proceeding paragraphs. |
5 | 223 | adas | |
6 | 223 | 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 | 223 | adas | \paragraph*{Predicative minimisation} |
8 | 226 | pbaillot | 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 | 223 | 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 | 223 | adas | \[ |
11 | 223 | 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 | 223 | adas | \] |
13 | 223 | adas | Let us define $A_f(\vec u ; \vec x , z)$ as: |
14 | 223 | adas | \[ |
15 | 223 | adas | \begin{array}{rl} |
16 | 223 | adas | &\left( |
17 | 223 | adas | z=0 \ \cand \ \forall x^\safe , y^\safe . (A_g (\vec u , \vec x , x, y) \cimp y=_2 1) |
18 | 223 | adas | \right) \\ |
19 | 223 | adas | \cor & \left( |
20 | 223 | adas | \begin{array}{ll} |
21 | 223 | adas | z\neq 0 |
22 | 223 | adas | & \cand\ \forall y^\safe . (A_g (\vec u , \vec x , p z , y) \cimp y=_2 0 ) \\ |
23 | 223 | adas | & \cand\ \forall x^\safe < p z . \forall y^\safe . (A_g (\vec u , \vec x , x , y) \cimp y=_2 1) |
24 | 223 | adas | \end{array} |
25 | 223 | adas | \right) |
26 | 223 | adas | \end{array} |
27 | 223 | adas | \] |
28 | 223 | 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 | 223 | adas | In particular this means $A_f$ is $\Sigma^{\safe}_i$. |
30 | 223 | adas | |
31 | 223 | 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 | 223 | adas | |
33 | 223 | adas | \begin{lemma} |
34 | 223 | adas | [Minimisation] |
35 | 223 | adas | $\arith^i \proves \cmin{\Sigma^\safe_{i-1}}$. |
36 | 223 | adas | \end{lemma} |
37 | 223 | adas | % see Thm 20 p. 58 in Buss' book. |
38 | 223 | adas | %\begin{proof} |
39 | 223 | adas | %\end{proof} |
40 | 223 | adas | This Lemma is proved by using the same method as for the proof of the analogous result in the bounded arithmetic $S_2^{i+1}$ (see \cite{Buss86book}, Thm 20, p. 58). |
41 | 223 | adas | |
42 | 223 | adas | \patrick{Examining it superficially, I think indeed the proof of Buss can be adapted to our setting. But we should probably look again at that with more scrutiny.} |
43 | 223 | adas | |
44 | 223 | adas | Now, working in $\arith^i$, let $\vec u \in \normal , \vec x \in \safe$ and let us prove: |
45 | 223 | adas | \[ |
46 | 223 | adas | \exists !z^\safe . A_f(\vec u ; \vec x , z) |
47 | 223 | adas | \] |
48 | 223 | adas | Suppose that $\exists x^\safe , y^\safe . (A_g (\vec u ,\vec x , x , y) \cand y=_2 0)$. |
49 | 223 | 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$. |
50 | 223 | adas | %\todo{verify $z\neq 0$ disjunct.} |
51 | 223 | adas | Then $z \neq 0$ holds. Moreover we had $\exists ! y^\safe . A_g(\vec u , \vec x , x , y)$. So we deduce that |
52 | 223 | 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 |
53 | 223 | adas | $\exists y^\safe . (A_g (\vec u ,\vec x , p z , y) \cand y=_2 0)$, we deduce |
54 | 223 | 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 |
55 | 223 | adas | $A_f(\vec u ; \vec x , z)$ is proven. |
56 | 223 | adas | |
57 | 223 | 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. |
58 | 223 | adas | |
59 | 223 | adas | So we have proven $\exists z^\safe . A_f(\vec u ; \vec x , z)$, and unicity can be easily verified. |
60 | 223 | adas | |
61 | 223 | adas | \paragraph*{Predicative recursion on notation} |
62 | 223 | adas | |
63 | 223 | adas | \anupam{Assume access to the following predicates (makes completeness easier, soundness will be okay): |
64 | 223 | adas | \begin{itemize} |
65 | 223 | adas | % \item $\pair x y z $ . ``$z$ is the sequence that appends $y$ to the sequence $x$'' |
66 | 223 | adas | \item $\pair x y z$. ``$z$ is the sequence that prepends $x$ to the sequence $y$'' |
67 | 223 | adas | \item $\beta (i; x ,y)$. ``The $i$th element of the sequence $x$ is $y$.'' |
68 | 223 | adas | \end{itemize} |
69 | 223 | adas | } |
70 | 223 | adas | \patrick{I also assume access to the following predicates: |
71 | 223 | adas | \begin{itemize} |
72 | 223 | adas | % \item $\zerobit (u,k)$ (resp. $\onebit(u,k)$). " The $k$th bit of $u$ is 0 (resp. 1)" |
73 | 223 | adas | % \item $\pref(k,x,y)$. "The prefix of $x$ (as a binary string) of length $k$ is $y$" |
74 | 223 | 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$. |
75 | 223 | adas | \end{itemize}} |
76 | 223 | 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}. |
77 | 223 | adas | |
78 | 223 | adas | Suppose that $f$ is defined by predicative recursion on notation: |
79 | 223 | adas | \[ |
80 | 223 | adas | \begin{array}{rcl} |
81 | 223 | adas | f(0 , \vec u ; \vec x) & \dfn & g(\vec u ; \vec x) \\ |
82 | 223 | adas | f(\succ i u, \vec u ; \vec x) & \dfn & h_i( u , \vec u ; \vec x , f(u , \vec u ; \vec x)) |
83 | 223 | adas | \end{array} |
84 | 223 | adas | \] |
85 | 223 | adas | |
86 | 223 | adas | \anupam{using $\beta(i,x,y)$ predicate for sequences: ``$i$th element of $x$ is $y$''. Provably total in $\arith^1$.} |
87 | 223 | adas | |
88 | 223 | 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$. |
89 | 223 | adas | We define $A_f (u ,\vec u ; \vec x , y)$ as, |
90 | 223 | adas | \[ |
91 | 223 | adas | \exists w^\safe . \left( |
92 | 223 | adas | \begin{array}{ll} |
93 | 223 | adas | & |
94 | 223 | adas | %Seq(z) \cand |
95 | 223 | adas | \exists^{\safe} y_0 . ( A_g (\vec u , \vec x , y_0) \cand \beta(0, w , y_0) ) \cand \beta(|u|, w,y ) \\ |
96 | 223 | 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}) )\\ |
97 | 223 | 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}) ) |
98 | 223 | adas | \end{array} |
99 | 223 | adas | \right) |
100 | 223 | adas | \] |
101 | 223 | adas | where |
102 | 223 | adas | \[ |
103 | 223 | adas | B (u , \vec u ; \vec x , y_k , y_{k+1}) = \left( |
104 | 223 | adas | \begin{array}{ll} |
105 | 223 | 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}) )\\ |
106 | 223 | 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}) ) |
107 | 223 | adas | \end{array} |
108 | 223 | adas | \right) |
109 | 223 | adas | \] |
110 | 223 | adas | |
111 | 223 | adas | %which is $\Sigma^\safe_i$ by inspection, and indeed defines the graph of $f$. |
112 | 223 | adas | |
113 | 223 | adas | To show totality, let $\vec u \in \normal, \vec x \in \safe$ and proceed by induction on $u \in \normal$. |
114 | 223 | adas | The base case, when $u=0$, is immediate from the totality of $A_g$, so for the inductive case we need to show: |
115 | 223 | adas | \[ |
116 | 223 | adas | \exists y^\safe . A_f (u , \vec u ; \vec x , y) |
117 | 223 | adas | \quad \seqar \quad |
118 | 223 | adas | \exists z^\safe . A_f (s_i u, \vec u ; \vec x , z) |
119 | 223 | adas | \] |
120 | 223 | adas | |
121 | 223 | 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 |
122 | 223 | adas | $A_f (u , \vec u ; \vec x , w) $. |
123 | 223 | adas | |
124 | 223 | 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 |
125 | 223 | adas | $\addtosequence(w,z,w')$. Observe also that we have $\pref(|u|,s_i u,u)$ |
126 | 223 | adas | |
127 | 223 | adas | So we have, for $k=|u|$: |
128 | 223 | adas | |
129 | 223 | adas | $$ \beta (k, w', y) \cand \beta (k+1 ,w', z) \cand B (u , \vec u ; \vec x , y , z).$$ |
130 | 223 | adas | |
131 | 223 | adas | and we can conclude that |
132 | 223 | adas | \[ |
133 | 223 | adas | \exists w'^\safe . \left( |
134 | 223 | adas | \begin{array}{ll} |
135 | 223 | adas | & |
136 | 223 | adas | %Seq(z) \cand |
137 | 223 | adas | \exists y_0 . ( A_g (\vec u , \vec x , y_0) \cand \beta(0, w' , y_0) ) \cand \beta(|u|+1, w',z ) \\ |
138 | 223 | 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}) ) |
139 | 223 | adas | \end{array} |
140 | 223 | adas | \right) |
141 | 223 | adas | \] |
142 | 223 | 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, |
143 | 223 | 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. |
144 | 223 | adas | |
145 | 223 | adas | \anupam{here need to `add' element to the computation sequence. Need to do this earlier in the paper.} |
146 | 223 | adas | |
147 | 223 | adas | \anupam{for inductive cases, need $u\neq 0$ for $\succ 0$ case.} |
148 | 223 | adas | |
149 | 223 | adas | \paragraph*{Safe composition} |
150 | 223 | adas | Now suppose that $f$ is defined by safe composition: |
151 | 223 | adas | \[ |
152 | 223 | adas | f(\vec u ; \vec x) \quad \dfn \quad g( \vec h(\vec u;) ; \vec h' (\vec u ; \vec x) ) |
153 | 223 | adas | \] |
154 | 223 | adas | |
155 | 223 | 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. |
156 | 223 | adas | In particular, by Raising, we have that $\forall \vec u^\normal . \exists v^\normal . A_{h_i} (\vec u , v)$. |
157 | 223 | adas | |
158 | 223 | adas | We define $A_f (\vec u , \vec x , z)$ defining the graph of $f$ as follows: |
159 | 223 | adas | \[ |
160 | 223 | adas | \exists \vec v^\normal . \exists \vec y^\safe . |
161 | 223 | adas | \left( |
162 | 223 | adas | \bigwedge\limits_i A_{h_i} (\vec u , v_i) |
163 | 223 | adas | \wedge |
164 | 223 | adas | \bigwedge\limits_j A_{h_j'} (\vec u ; \vec x , y_j) |
165 | 223 | adas | \wedge |
166 | 223 | adas | A_g ( \vec v , \vec y , z ) |
167 | 223 | adas | \right) |
168 | 223 | adas | \] |
169 | 223 | adas | The provable totality of $A_f$ follows from simple first-order reasoning, mostly cuts and basic quantifier manipulations. |
170 | 223 | adas | |
171 | 223 | adas | \todo{elaborate} |
172 | 223 | adas | |
173 | 223 | adas | The proof of Thm \ref{thm:completeness} is thus completed. |