root / CSL17 / tech-report / appendix-completeness.tex @ 252
Historique | Voir | Annoter | Télécharger (11 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 | 251 | 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).
|
| 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 | 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:
|
| 64 | 251 | adas | $$(A(a) \cand a \neq 0 ) \cimp \exists x^{\safe } \leq a.B(a,|a|,x).$$
|
| 65 | 251 | adas | \patrick{Anupam, is it a valid instance of LIND? I think it is.}
|
| 66 | 251 | adas | |
| 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 | % \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.}
|
| 72 | 251 | adas | |
| 73 | 251 | adas | Now, working in $\arith^i$, let $\vec u \in \normal , \vec x \in \safe$ and let us prove: |
| 74 | 251 | adas | \[ |
| 75 | 251 | adas | \exists !z^\safe . A_f(\vec u ; \vec x , z) |
| 76 | 251 | adas | \] |
| 77 | 251 | adas | Suppose that $\exists x^\safe , y^\safe . (A_g (\vec u ,\vec x , x , y) \cand y=_2 0)$. |
| 78 | 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$. |
| 79 | 251 | adas | %\todo{verify $z\neq 0$ disjunct.}
|
| 80 | 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 |
| 81 | 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 |
| 82 | 251 | adas | $\exists y^\safe . (A_g (\vec u ,\vec x , p z , y) \cand y=_2 0)$, we deduce |
| 83 | 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 |
| 84 | 251 | adas | $A_f(\vec u ; \vec x , z)$ is proven. |
| 85 | 251 | adas | |
| 86 | 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. |
| 87 | 251 | adas | |
| 88 | 251 | adas | So we have proven $\exists z^\safe . A_f(\vec u ; \vec x , z)$, and unicity can be easily verified. |
| 89 | 251 | adas | |
| 90 | 251 | adas | \paragraph*{Predicative recursion on notation}
|
| 91 | 251 | adas | |
| 92 | 251 | adas | \anupam{Assume access to the following predicates (makes completeness easier, soundness will be okay):
|
| 93 | 251 | adas | \begin{itemize}
|
| 94 | 251 | adas | % \item $\pair x y z $ . ``$z$ is the sequence that appends $y$ to the sequence $x$'' |
| 95 | 251 | adas | \item $\pair x y z$. ``$z$ is the sequence that prepends $x$ to the sequence $y$'' |
| 96 | 251 | adas | \item $\beta (i; x ,y)$. ``The $i$th element of the sequence $x$ is $y$.'' |
| 97 | 251 | adas | \end{itemize}
|
| 98 | 251 | adas | } |
| 99 | 251 | adas | \patrick{I also assume access to the following predicates:
|
| 100 | 251 | adas | \begin{itemize}
|
| 101 | 251 | adas | % \item $\zerobit (u,k)$ (resp. $\onebit(u,k)$). " The $k$th bit of $u$ is 0 (resp. 1)" |
| 102 | 251 | adas | % \item $\pref(k,x,y)$. "The prefix of $x$ (as a binary string) of length $k$ is $y$" |
| 103 | 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$. |
| 104 | 251 | adas | \end{itemize}}
|
| 105 | 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}.
|
| 106 | 251 | adas | |
| 107 | 251 | adas | Suppose that $f$ is defined by predicative recursion on notation: |
| 108 | 251 | adas | \[ |
| 109 | 251 | adas | \begin{array}{rcl}
|
| 110 | 251 | adas | f(0 , \vec u ; \vec x) & \dfn & g(\vec u ; \vec x) \\ |
| 111 | 251 | adas | f(\succ i u, \vec u ; \vec x) & \dfn & h_i( u , \vec u ; \vec x , f(u , \vec u ; \vec x)) |
| 112 | 251 | adas | \end{array}
|
| 113 | 251 | adas | \] |
| 114 | 251 | adas | |
| 115 | 251 | adas | \anupam{using $\beta(i,x,y)$ predicate for sequences: ``$i$th element of $x$ is $y$''. Provably total in $\arith^1$.}
|
| 116 | 251 | adas | |
| 117 | 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$.
|
| 118 | 251 | adas | We define $A_f (u ,\vec u ; \vec x , y)$ as, |
| 119 | 251 | adas | \[ |
| 120 | 251 | adas | \exists w^\safe . \left( |
| 121 | 251 | adas | \begin{array}{ll}
|
| 122 | 251 | adas | & |
| 123 | 251 | adas | %Seq(z) \cand |
| 124 | 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 ) \\
|
| 125 | 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}) )\\
|
| 126 | 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}) )
|
| 127 | 251 | adas | \end{array}
|
| 128 | 251 | adas | \right) |
| 129 | 251 | adas | \] |
| 130 | 251 | adas | where |
| 131 | 251 | adas | \[ |
| 132 | 251 | adas | B (u , \vec u ; \vec x , y_k , y_{k+1}) = \left(
|
| 133 | 251 | adas | \begin{array}{ll}
|
| 134 | 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}) )\\
|
| 135 | 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}) )
|
| 136 | 251 | adas | \end{array}
|
| 137 | 251 | adas | \right) |
| 138 | 251 | adas | \] |
| 139 | 251 | adas | |
| 140 | 251 | adas | %which is $\Sigma^\safe_i$ by inspection, and indeed defines the graph of $f$. |
| 141 | 251 | adas | |
| 142 | 251 | adas | To show totality, let $\vec u \in \normal, \vec x \in \safe$ and proceed by induction on $u \in \normal$. |
| 143 | 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: |
| 144 | 251 | adas | \[ |
| 145 | 251 | adas | \exists y^\safe . A_f (u , \vec u ; \vec x , y) |
| 146 | 251 | adas | \quad \seqar \quad |
| 147 | 251 | adas | \exists z^\safe . A_f (s_i u, \vec u ; \vec x , z) |
| 148 | 251 | adas | \] |
| 149 | 251 | adas | |
| 150 | 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 |
| 151 | 251 | adas | $A_f (u , \vec u ; \vec x , w) $. |
| 152 | 251 | adas | |
| 153 | 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
|
| 154 | 251 | adas | $\addtosequence(w,z,w')$. Observe also that we have $\pref(|u|,s_i u,u)$ |
| 155 | 251 | adas | |
| 156 | 251 | adas | So we have, for $k=|u|$: |
| 157 | 251 | adas | |
| 158 | 251 | adas | $$ \beta (k, w', y) \cand \beta (k+1 ,w', z) \cand B (u , \vec u ; \vec x , y , z).$$ |
| 159 | 251 | adas | |
| 160 | 251 | adas | and we can conclude that |
| 161 | 251 | adas | \[ |
| 162 | 251 | adas | \exists w'^\safe . \left( |
| 163 | 251 | adas | \begin{array}{ll}
|
| 164 | 251 | adas | & |
| 165 | 251 | adas | %Seq(z) \cand |
| 166 | 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 ) \\ |
| 167 | 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}) )
|
| 168 | 251 | adas | \end{array}
|
| 169 | 251 | adas | \right) |
| 170 | 251 | adas | \] |
| 171 | 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,
|
| 172 | 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.
|
| 173 | 251 | adas | |
| 174 | 251 | adas | \anupam{here need to `add' element to the computation sequence. Need to do this earlier in the paper.}
|
| 175 | 251 | adas | |
| 176 | 251 | adas | \anupam{for inductive cases, need $u\neq 0$ for $\succ 0$ case.}
|
| 177 | 251 | adas | |
| 178 | 251 | adas | \paragraph*{Safe composition}
|
| 179 | 251 | adas | Now suppose that $f$ is defined by safe composition: |
| 180 | 251 | adas | \[ |
| 181 | 251 | adas | f(\vec u ; \vec x) \quad \dfn \quad g( \vec h(\vec u;) ; \vec h' (\vec u ; \vec x) ) |
| 182 | 251 | adas | \] |
| 183 | 251 | adas | |
| 184 | 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.
|
| 185 | 251 | adas | In particular, by Raising, we have that $\forall \vec u^\normal . \exists v^\normal . A_{h_i} (\vec u , v)$.
|
| 186 | 251 | adas | |
| 187 | 251 | adas | We define $A_f (\vec u , \vec x , z)$ defining the graph of $f$ as follows: |
| 188 | 251 | adas | \[ |
| 189 | 251 | adas | \exists \vec v^\normal . \exists \vec y^\safe . |
| 190 | 251 | adas | \left( |
| 191 | 251 | adas | \bigwedge\limits_i A_{h_i} (\vec u , v_i)
|
| 192 | 251 | adas | \wedge |
| 193 | 251 | adas | \bigwedge\limits_j A_{h_j'} (\vec u ; \vec x , y_j)
|
| 194 | 251 | adas | \wedge |
| 195 | 251 | adas | A_g ( \vec v , \vec y , z ) |
| 196 | 251 | adas | \right) |
| 197 | 251 | adas | \] |
| 198 | 251 | adas | The provable totality of $A_f$ follows from simple first-order reasoning, mostly cuts and basic quantifier manipulations. |
| 199 | 251 | adas | |
| 200 | 251 | adas | \todo{elaborate}
|
| 201 | 251 | adas | |
| 202 | 251 | adas | The proof of Thm \ref{thm:completeness} is thus completed. |