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