root / CSL17 / soundness.tex @ 211
Historique | Voir | Annoter | Télécharger (8,07 ko)
1 |
\section{Soundness} |
---|---|
2 |
\label{sect:soundness} |
3 |
|
4 |
The main result of this section is the following: |
5 |
|
6 |
\begin{theorem} |
7 |
\label{thm:soundness} |
8 |
If $\arith^i$ proves $\forall \vec u^\normal . \forall \vec x^\safe . \exists y^\safe . A(\vec u ; \vec x , y)$ then there is a $\mubci{i-1}$ program $f(\vec u ; \vec x)$ such that $\Nat \models A(\vec u ; \vec x , f(\vec u ; \vec x))$. |
9 |
\end{theorem} |
10 |
|
11 |
|
12 |
|
13 |
The main problem for soundness is that we have predicates, for example equality, that take safe arguments in our theory but do not formally satisfy the polychecking lemma for $\mubc$ functions. |
14 |
For this we will use length-bounded witnessing, borrowing a similar idea from Bellantoni's previous work \cite{Bellantoni95}. |
15 |
|
16 |
|
17 |
\begin{definition} |
18 |
[Length bounded basic functions] |
19 |
We define \emph{length-bounded equality}, $\eq(l;x,y)$ as the characteristic function of the predicate: |
20 |
\[ |
21 |
x \mode l = y \mode l |
22 |
\] |
23 |
which is definable by safe recursion on $l$: |
24 |
\[ |
25 |
\begin{array}{rcl} |
26 |
\eq (0 ; x,y) & \dfn & \equivfn (;\bit (0;x),\bit(0;y) ) \\ |
27 |
\eq (\succ i l; x,y) & \dfn & \cond (; \eq ( u;x,y ) , 0, \equivfn (; \bit (\succ i u ; x ) , \bit (\succ i l ; y )) ) |
28 |
\end{array} |
29 |
\] |
30 |
We also define length-bounded inequality as: |
31 |
\[ |
32 |
\begin{array}{rcl} |
33 |
\leqfn (0 ; x ,y) & \dfn & \cimp (; \bit (0;x), \bit (0;y) ) \\ |
34 |
\leqfn (\succ i l ; x,y) & \dfn & \orfn ( ; <(\bit (\succ i l ; x) , \bit(\succ i l ; y) ) , \andfn (; \equivfn (\bit (\succ i l ; x) , \bit(\succ i l ; y)) , \leqfn (l;x,y ) ) ) |
35 |
\end{array} |
36 |
\] |
37 |
\end{definition} |
38 |
|
39 |
\anupam{Do we need the general form of length-boundedness? E.g. the $*$ functions from Bellantoni's paper? Put above if necessary. Otherwise just add sequence manipulation functions as necessary.} |
40 |
|
41 |
Notice that $\eq$ is a polymax bounded polyomial checking function on its normal input, and so can be added to $\mubc$ without problems. |
42 |
|
43 |
\begin{definition} |
44 |
[Length bounded characteristic functions] |
45 |
We define $\mubci{}$ programs $\charfn{}{A} (l , \vec u; \vec x)$, parametrised by a formula $A(\vec u ; \vec x)$, as follows. |
46 |
% If $A$ is a $\Pi_{i}$ formula then: |
47 |
\[ |
48 |
\begin{array}{rcl} |
49 |
\charfn{}{s\leq t} (l, \vec u ; \vec x) & \dfn & \leqfn(l;s,t) \\ |
50 |
\smallskip |
51 |
\charfn{}{s=t} (l, \vec u ; \vec x) & \dfn & \eq(l;s,t) \\ |
52 |
\smallskip |
53 |
\charfn{}{\neg A} (l, \vec u ; \vec x) & \dfn & \neg (;\charfn{}{A}(l , \vec u ; \vec x)) \\ |
54 |
\smallskip |
55 |
\charfn{}{A\cor B} (l, \vec u ; \vec x ) & \dfn & \cor (; \charfn{}{A} (l, \vec u ; \vec x , w), \charfn{}{B} (\vec u ;\vec x) ) \\ |
56 |
\smallskip |
57 |
\charfn{}{A\cand B} (l, \vec u ; \vec x ) & \dfn & \cand(; \charfn{}{A} (l, \vec u ; \vec x , w), \charfn{}{B} (\vec u ;\vec x) ) \\ |
58 |
\smallskip |
59 |
\charfn{}{\exists x^\safe . A(x)} (l, \vec u ;\vec x) & \dfn & \begin{cases} |
60 |
1 & \exists x^\safe . \charfn{}{A(x)} (l, \vec u ;\vec x , x) = 1 \\ |
61 |
0 & \text{otherwise} |
62 |
\end{cases} \\ |
63 |
\smallskip |
64 |
\charfn{}{\forall x^\safe . A(x)} (l, \vec u ;\vec x ) & \dfn & |
65 |
\begin{cases} |
66 |
0 & \exists x^\sigma. \charfn{}{ A(x)} (l, \vec u; \vec x , x) = 0 \\ |
67 |
1 & \text{otherwise} |
68 |
\end{cases} |
69 |
\end{array} |
70 |
\] |
71 |
\end{definition} |
72 |
|
73 |
|
74 |
\begin{proposition} |
75 |
$\charfn{}{A} (l, \vec u ; \vec x)$ is the characteristic function of $A (\vec u \mode l ; \vec x \mode l)$. |
76 |
\end{proposition} |
77 |
|
78 |
\begin{definition} |
79 |
[Length bounded witness function] |
80 |
We now define $\Wit{\vec u ; \vec x}{A} (l , \vec u ; \vec x)$ for a $\Sigma_{i+1}$-formula $A$ with free variables amongst $\vec u; \vec x$. |
81 |
\[ |
82 |
\begin{array}{rcl} |
83 |
\Wit{\vec u ; \vec x}{A} (l, \vec u ; \vec x , w) & \dfn & \charfn{}{A} (l, \vec u ; \vec x) \text{ if $A$ is $\Pi_i$} \\ |
84 |
\smallskip |
85 |
\Wit{\vec u ; \vec x}{A \cor B} (l,\vec u ; \vec x , \vec w^A , \vec w^B) & \dfn & \cor ( ; \Wit{\vec u ; \vec x}{A} (l,\vec u ; \vec x , \vec w^A) ,\Wit{\vec u ; \vec x}{B} (l,\vec u ; \vec x , \vec w^B) ) \\ |
86 |
\smallskip |
87 |
\Wit{\vec u ; \vec x}{A \cand B} (l,\vec u ; \vec x , \vec w^A , \vec w^B) & \dfn & \cand ( ; \Wit{\vec u ; \vec x}{A} (l,\vec u ; \vec x , \vec w^A) ,\Wit{\vec u ; \vec x}{B} (l,\vec u ; \vec x , \vec w^B) ) \\ |
88 |
\smallskip |
89 |
\Wit{\vec u ; \vec x}{\exists x^\safe . A(x)} (l,\vec u ; \vec x , \vec w , w) & \dfn & \Wit{\vec u ; \vec x , x}{A(x)} ( l,\vec u ; \vec x , w , \vec w ) |
90 |
\\ |
91 |
\smallskip |
92 |
\Wit{\vec u ; \vec x}{\forall u \leq |t(\vec u;)| . A(x)} (l , \vec u ; \vec x, w) & \dfn & |
93 |
\forall u \leq |t(\vec u;)| . \Wit{u , \vec u ; \vec x}{A(u)} (l, u , \vec u ; \vec x, \beta(u;w) ) |
94 |
\end{array} |
95 |
\] |
96 |
\end{definition} |
97 |
|
98 |
\anupam{may as well use a single witness variable since need it for sharply bounded quantifiers anyway.} |
99 |
|
100 |
\anupam{sharply bounded case obtained by sharply bounded lemma} |
101 |
|
102 |
|
103 |
\begin{proposition} |
104 |
If, for some $w$, $\wit{\vec u ; \vec x}{A} (l, \vec u ; \vec x,w) =1$, then $A (\vec u \mode l ; \vec x \mode l)$ is true. |
105 |
\anupam{check statement, need proof-theoretic version?} |
106 |
\end{proposition} |
107 |
|
108 |
In order to prove Thm.~\ref{thm:soundness} we need the following lemma: |
109 |
|
110 |
|
111 |
\begin{lemma} |
112 |
[Proof interpretation] |
113 |
\label{lem:proof-interp} |
114 |
For any $\arith^i$ proof of a $\Sigma^\safe_i$ sequent $\Gamma \seqar \Delta$, there is a $\mubci{i-1}$ function $f$ such that, for any $l, \vec u , \vec x , w$, we have: |
115 |
\[ |
116 |
\wit{\vec u ; \vec x}{ \wedge \Gamma } (l, \vec u ; \vec x , w) |
117 |
\quad \leq \quad |
118 |
\wit{\vec u ; \vec x}{\vee \Delta} (l, \vec u ; \vec x , f(l, \vec u ; \vec x , w)) |
119 |
\] |
120 |
\anupam{maybe want $f(\vec u \mode l ; \vec x \mode l , w)$} |
121 |
\anupam{Also, perhaps split for formulae of $\Gamma$, to avoid lots of (de)coding} |
122 |
\end{lemma} |
123 |
\begin{proof} |
124 |
We assume the proof, say $\pi$, is in integer positive free-cut free form, by the results from the previous section. |
125 |
This means that the predicate $\charfn{\vec u ; \vec x}{A}$ is defined for each formula $A(\vec u ; \vec x)$ occurring in a proof, so the theorem is well-stated. |
126 |
We define the function $f$ inductively, by considering the various final rules of $\pi$. |
127 |
|
128 |
\paragraph*{Negation} |
129 |
Can assume only on atomic formulae, so no effect. |
130 |
\paragraph*{Quantifiers} |
131 |
\anupam{Do $\exists$-right and $\forall$-right, left rules are symmetric.} |
132 |
|
133 |
\paragraph*{Contraction} |
134 |
Left contraction simply duplicates an argument, whereas right contraction requires a conditional on a $\Sigma^\safe_i$ formula. |
135 |
|
136 |
\paragraph*{Induction} |
137 |
Corresponds to safe recursion on notation. |
138 |
Suppose final step is: |
139 |
\[ |
140 |
\vlinf{\pind}{}{\Gamma , \normal (t) , A(0) \seqar A(t) , \Delta}{ \left\{\Gamma , \normal (u) , A(u) \seqar A(\succ i u ) , \Delta \right\}_{i=0,1} } |
141 |
\] |
142 |
For simplicity we will assume $\Delta $ is empty, which we can always do by Prop.~\todo{DO THIS!} |
143 |
|
144 |
Now, by the inductive hypothesis, we have functions $h_i$ such that: |
145 |
\[ |
146 |
\wit{u , \vec u ; \vec x}{LHS} (l , u , \vec u ; \vec x , w) =1 |
147 |
\quad \implies \quad |
148 |
\wit{u , \vec u ; \vec x}{RHS} (l , u , \vec u ; \vec x , h_i (u \mode l , \vec u \mode l ; \vec x \mode l) ) =1 |
149 |
\] |
150 |
We define $ f$ as follows: |
151 |
\[ |
152 |
\begin{array}{rcl} |
153 |
f (0 , \vec u ; \vec x, \vec w^\Gamma , w^{\normal (t)} , w^{A(0)}) & \dfn & w^{A(0)} \\ |
154 |
f( \succ i u , \vec u ; \vec x , \vec w^\Gamma , w^{\normal (t)} , w^{A(0)}) & \dfn & |
155 |
h_i (u , \vec u ; \vec x , \vec w^\Gamma w^{\normal (?)}, f(u , \vec u ; \vec x , \vec w )) |
156 |
\end{array} |
157 |
\] |
158 |
\anupam{Must check above, could be problems in recursive case.} |
159 |
\anupam{Wait, should $\normal (t)$ have a witness? Also there is a problem like Patrick said for formulae like: $\forall x^\safe . \exists y^\safe. (\normal (z) \cor \cnot \normal (z))$, where $z$ is $y$ or otherwise.} |
160 |
\end{proof} |
161 |
|
162 |
We are now ready to prove the soundness theorem. |
163 |
|
164 |
\begin{proof} |
165 |
[Proof of Thm.~\ref{thm:soundness} from Lemma~\ref{lem:proof-interp}] |
166 |
(watch out for dependence on $l$, try do without) |
167 |
|
168 |
Suppose $\arith^i \proves \forall \vec u^\normal . \exists x^\normal . A(\vec u ; x)$. Then by raising, inversion, free-variable normal forms, we have a proof of, |
169 |
\[ |
170 |
\normal (\vec u ) \seqar \exists x^\normal . A(\vec u , x ;) |
171 |
\] |
172 |
whence, by Lemma~\ref{lem:proof-interp}, we have a $\mubci{i-1}$ function $f$ such that: |
173 |
\[ |
174 |
\vec u \mode l = \vec a \mode l |
175 |
\quad \implies \quad |
176 |
\wit{\vec u ; }{A} ( l , \vec u , f(\vec u \mode l;) ) =1 |
177 |
\] |
178 |
|
179 |
Now it suffices to choose an $l$ bigger that both all the $\vec u$ and $f(\vec u)$, which is a polynomial in $\vec u$ by the polymax bounding lemma. |
180 |
\end{proof} |
181 |
|