Statistiques
| Révision :

root / CSL17 / sequence-coding.tex @ 219

Historique | Voir | Annoter | Télécharger (5,08 ko)

1 165 adas
\section{A safe encoding of sequences and computations}
2 165 adas
3 165 adas
Before we can prove the completeness result for our theory, we need to address an apparent problem with usual first-order encodings of computations.
4 165 adas
Recalling the polychecking lemma, we notice that for usual encodings of sequences of natural numbers it is not possible to `decode' sequences as a safe input.
5 165 adas
Otherwise phrased, we would like to implement G\"odel's beta functions with the sorting $\beta (i;x)$, returning the $i$th element of the sequence encoded by $x$.
6 165 adas
However, for $x$ to be safe here, we must only require $\poly (i)$ rightmost bits of $x$ to determine a finite number of rightmost bits of $\beta(i;x)$.
7 165 adas
If $x$ is construed as a concatenation of its elements, with distinguished delimiters, or similarly, accessing the $i$th element cannot have this property since we do not have any information about previously occurring elements, which may be very large.
8 165 adas
9 165 adas
In bounded arithmetic this problem is avoided due to the fact that we know in advance that computations can be polynomially bounded both in length and size of elements, since we are in PH by Parikh's theorem.
10 165 adas
Due to the polymax bounded property we actually have a similar situation here, although we would naturally prefer to avoid introducing explicit bounds, favouring that all complexity control is managed by safety and normality of arguments.
11 165 adas
12 165 adas
The answer is to use a slightly modified encoding of sequences, based on a simple (and well known) idea.
13 165 adas
For the sake of example, if we wanted to simply pair two arguments safely, we could just interleave their bits and satisfy the polychecking lemma, regardless of the size of the two arguments.
14 165 adas
This is naturally scalable to any $k$-tuple of arguments, all safe.
15 165 adas
16 165 adas
For an arbitrary sequence we cannot use quite the same technique since length is not determined in advance.
17 165 adas
However, by using a slightly more asymmetric encoding we can still access all required bits in quadratic modulus rather than linear, appealing to a `zig-zag' technique.
18 165 adas
19 193 adas
\anupam{Every number is an infinite ultimately 0 sequence.}
20 193 adas
21 193 adas
22 193 adas
\begin{definition}
23 193 adas
[Sequence (de)coding]
24 193 adas
We define the function $\beta\bit (i,j;x,b)$, intuitively meaning ``the $j$th bit of the $i$th element of $x$ is $b$'' as $\bit \left( \frac{1}{2} (i+j)(i+j+1) +i ; x , b \right)$.
25 194 adas
26 194 adas
We now define \emph{length-bounded $\beta$ function} $\beta(i,l;x,b)$ as:
27 194 adas
\[
28 194 adas
\forall j \leq l . \bigvee\limits_{b=0,1} ( \beta\bit (i,j;x,b) \cand \bit (j;y,b) )
29 194 adas
\]
30 194 adas
\end{definition}
31 194 adas
32 194 adas
Our aim is to construct sequences formed from old sequences and new elements.
33 194 adas
Namely we want the following result, which says that, given a number $x$ and a sequence $y$, there is another sequence $z$ formed from prepending $x$ to $y$:
34 194 adas
\begin{proposition}
35 194 adas
	[In $\arith$]
36 194 adas
	$$
37 194 adas
	\forall x^\safe, y^\safe. \exists z^\safe . \forall i^\normal\leq k, j^\normal\leq l .
38 194 adas
	\left(
39 194 adas
	\begin{array}{rl}
40 194 adas
	& \bigwedge\limits_{b=0,1} (\bit(j;x,b) \cimp \beta (0,j;z,b) ) \\
41 194 adas
	\cand & i>0 \cimp \bigwedge\limits_{b=0,1} (\beta(i-1, j;y,b) \cimp \beta(i,j;z,b) )
42 194 adas
	\end{array}
43 194 adas
	\right)
44 194 adas
	$$
45 194 adas
\end{proposition}
46 194 adas
47 194 adas
To prove this we will need two lemmata.
48 194 adas
The first says we can construct a sequence whose $0$th element is $x$ and every other element is $0$.
49 194 adas
50 194 adas
\begin{lemma}
51 194 adas
[In $\arith$]
52 194 adas
$\forall l . \exists z . (\beta (0,|l| ; z , x) \cand \forall i \leq |k| . \beta(i,|l|;z,0) )$.
53 194 adas
\end{lemma}
54 194 adas
\begin{proof}
55 194 adas
	Length induction on $l$.
56 194 adas
\end{proof}
57 194 adas
58 194 adas
The second says we can prepend $0$ to any sequence:
59 194 adas
60 194 adas
\begin{lemma}
61 194 adas
	[In $\arith$]
62 194 adas
	$\forall x . \exists z . ( \beta(0,|l|;z,0) \cand \forall i\in (0,|k|] . \exists y . (\beta (i, |l| ; z,y) \cand \beta(i-1,|l|;x,y) )   )$
63 194 adas
\end{lemma}
64 194 adas
\begin{proof}
65 194 adas
	Length induction on $l$.
66 219 adas
\end{proof}
67 219 adas
68 219 adas
69 219 adas
\subsection{Summary}
70 219 adas
Assume the existence of a simple pairing function for elements of fixed size: $\pair{k,l}{x}{y}$ denotes the pair $(x \mode k , y \mode l )$.
71 219 adas
An appropriate such function would `interleave' $x$ and $y$, adding delimiters as necessary.
72 219 adas
We assume that $|\pair{k,l}{x}{y}| = k+O(l)$ and $\pair{k,l}{x}{y}$ satisfies the polychecking lemma.
73 219 adas
74 219 adas
We will simply write $\pair{l}{x}{y}$ for $\pair{l,l}{x}{y}$.
75 219 adas
76 219 adas
\begin{lemma}
77 219 adas
	[Creating sequences]
78 219 adas
	\label{lem:sequence-creation}
79 219 adas
	Given a function $f(u , \vec u ; \vec x)$ there is a $\bc(f)$ function $F(l, u , \vec u ; \vec x)$ such that:
80 219 adas
	\[
81 219 adas
	F(l,u,\vec u ; \vec x)
82 219 adas
	\quad = \quad
83 219 adas
	\langle f(0, \vec u ; \vec x) \mode l , f(1, \vec u ; \vec x) \mode l , \dots , f(|u|, \vec u ; \vec x) \mode l \rangle
84 219 adas
	\]
85 219 adas
\end{lemma}
86 219 adas
\begin{proof}
87 219 adas
	We simply define $F$ by safe recursion from $f$:
88 219 adas
	\[
89 219 adas
	\begin{array}{rcl}
90 219 adas
	F(l,0, \vec u ; \vec x) & \dfn & \langle ; f(0) \mode l \rangle \\
91 219 adas
	F(l, \succ i u , \vec u ; \vec x ) & \dfn & \pair{O(|u| l) , l}{F(l, u , \vec u ; \vec x)}{f( |\succ i u| , \vec u ; \vec x )}
92 219 adas
	\end{array}
93 219 adas
	\]
94 219 adas
	where the constants for $O(|u|l)$ are sufficiently large.
95 219 adas
\end{proof}
96 219 adas
97 219 adas
\begin{lemma}
98 219 adas
[Decoding sequences]
99 219 adas
We can define $\beta(l,i;x)$ as $(i\text{th element of x}) \mode l$.
100 219 adas
\end{lemma}
101 219 adas
\begin{proof}
102 219 adas
First define $\beta (j,i;x)$ as $j$th bit of $i$th element of $x$, then use similar idea to above, by a recursion on $j$.
103 219 adas
\end{proof}
104 219 adas
105 219 adas
Notice that $\beta (l,i;x)$ satisfies the polychecking lemma.
106 219 adas
107 219 adas
We define