root / CSL17 / tech-report / soundness.tex @ 268
Historique | Voir | Annoter | Télécharger (20,24 ko)
1 |
\section{Soundness} |
---|---|
2 |
\label{sect:soundness} |
3 |
In this section we show that the representable functions of our theories $\arith^i$ are in $\fphi i$ (`soundness'). |
4 |
The main result is the following: |
5 |
|
6 |
\begin{theorem} |
7 |
\label{thm:soundness} |
8 |
If $\arith^i$ proves $\forall \vec u^\normal . \exists y^\safe . A(\vec u ; y)$ then there is a $\mubci{i-1}$ program $f(\vec u ; )$ such that $\Nat \models A(\vec u ; f(\vec u ; ))$. |
9 |
\end{theorem} |
10 |
|
11 |
|
12 |
|
13 |
The 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, Lemma~\ref{lem:polychecking}. |
14 |
For this we will use \emph{length-bounded} witnessing argument, borrowing a similar idea from Bellantoni's work \cite{Bellantoni95}. |
15 |
|
16 |
|
17 |
\begin{definition} |
18 |
[Length bounded (in)equality] |
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 define \emph{length-bounded inequality} as: |
31 |
\[ |
32 |
\begin{array}{rcl} |
33 |
\leqfn (0 ; x ,y) & \dfn & \cond(; \bit (0;x), 1, \bit (0;y) ) \\ |
34 |
\leqfn (\succ i l ; x,y) & \dfn & \orfn ( ; \cond(;\bit (\succ i l ; x) , \bit(\succ i l ; y),0 ) , \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 |
Notice that $\leqfn (l; x,y) = 1$ just if $x \mode l \leq y \mode l$. |
40 |
We can also define $\eq( l; x,y)$ as $\andfn (;\leqfn(l;x,y),\leqfn(l;y,x))$. |
41 |
|
42 |
%\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.} |
43 |
% |
44 |
%Notice that $\eq$ is a polymax bounded polyomial checking function on its normal input, and so can be added to $\mubc$ without problems. |
45 |
|
46 |
|
47 |
In the presence of a compatible sorting, we may easily define functions that \emph{evaluate} safe formulae in $\mubc$: |
48 |
|
49 |
|
50 |
\begin{definition} |
51 |
[Length bounded characteristic functions] |
52 |
We define $\mubci{}$ programs $\charfn{}{A} (l , \vec u; \vec x)$, parametrised by a formula $A$ and a compatible typing $(\vec u ; \vec x)$ of its varables, as follows. |
53 |
% If $A$ is a $\Pi_{i}$ formula then: |
54 |
\[ |
55 |
\begin{array}{rcl} |
56 |
\charfn{\vec u ; \vec x}{s\leq t} (l, \vec u ; \vec x) & \dfn & \leqfn(l;s,t) \\ |
57 |
\smallskip |
58 |
% \charfn{}{s=t} (l, \vec u ; \vec x) & \dfn & \eq(l;s,t) \\ |
59 |
% \smallskip |
60 |
\charfn{\vec u ; \vec x}{\neg A} (l, \vec u ; \vec x) & \dfn & \notfn (;\charfn{\vec u ; \vec x}{A}(l , \vec u ; \vec x)) \\ |
61 |
\smallskip |
62 |
\charfn{\vec u ; \vec x}{A\cor B} (l, \vec u ; \vec x ) & \dfn & \orfn(; \charfn{\vec u ; \vec x}{A} (l, \vec u ; \vec x , w), \charfn{\vec u ; \vec x}{B} (\vec u ;\vec x) ) \\ |
63 |
\smallskip |
64 |
\charfn{\vec u ; \vec x}{A\cand B} (l, \vec u ; \vec x ) & \dfn & \andfn(; \charfn{\vec u ; \vec x}{A} (l, \vec u ; \vec x , w), \charfn{\vec u ; \vec x}{B} (\vec u ;\vec x) ) |
65 |
% \end{array} |
66 |
% \quad |
67 |
% \begin{array}{rcl} |
68 |
\\ \smallskip |
69 |
\charfn{\vec u ; \vec x}{\exists x^\safe . A(x)} (l, \vec u ;\vec x) & \dfn & \begin{cases} |
70 |
1 & \exists x^\safe . \charfn{}{A(x)} (l, \vec u ;\vec x , x) = 1 \\ |
71 |
0 & \text{otherwise} |
72 |
\end{cases} \\ |
73 |
\smallskip |
74 |
\charfn{\vec u ; \vec x}{\forall x^\safe . A(x)} (l, \vec u ;\vec x ) & \dfn & |
75 |
\begin{cases} |
76 |
0 & \exists x^\sigma. \charfn{\vec u ; \vec x}{ A(x)} (l, \vec u; \vec x , x) = 0 \\ |
77 |
1 & \text{otherwise} |
78 |
\end{cases} |
79 |
\end{array} |
80 |
\] |
81 |
\end{definition} |
82 |
|
83 |
|
84 |
\begin{proposition} |
85 |
Given a $\Sigma^\safe_i$ formula $A$ and compatible sorting $(\vec u; \vec x)$ of its variables, |
86 |
$\charfn{\vec u ;\vec x}{A} (l, \vec u ; \vec x)$ is in $\mubci{i}$ and computes the characteristic function of $A (\vec u \mode l ; \vec x \mode l)$. |
87 |
\end{proposition} |
88 |
|
89 |
|
90 |
|
91 |
We will use the programs $\charfn{}{}$ in the witness functions we define below. |
92 |
Let us write $\charfn{}{i}$ to denote the class of functions $\charfn{}{A}$ for $A \in \Sigma^\safe_{i}$. |
93 |
For the notion of bounding polynomial below we are a little informal with bounds, using `big-oh' notation, since it will suffice just to be `sufficiently large'. |
94 |
Notice that, while we refer to $b_A(l), p(l)$ etc.\ below as a `polynomial', we really mean a \emph{quasipolynomial} (which may also contain $\smsh$), i.e.\ a polynomial in the \emph{length} of $l$, as a slight abuse of notation. |
95 |
|
96 |
|
97 |
\begin{definition} |
98 |
[Length bounded witness function] |
99 |
For a $\Sigma^\safe_{i}$ formula $A$ with a compatible sorting $(\vec u ; \vec x)$, we define the \emph{length-bounded witness function} $\wit{\vec u ; \vec x}{A} (l, \vec u ; \vec x , w)$ in $\bc (\charfn{}{i-1})$ and its \emph{bounding polynomial} $b_A (l)$ as follows: |
100 |
\begin{itemize} |
101 |
\item If $A$ is $\Pi^\safe_{i-1}$ then $\wit{\vec u ; \vec x}{A} (l, \vec u ; \vec x , w) \dfn \charfn{\vec u ; \vec x}{A} (l, \vec u ; \vec x )$ and we set $b_A (l) = 1$. |
102 |
\item If $A$ is $B \cor C$ then we may set $|b_A| = O(|b_B| + |b_C|)$ and define $ \wit{\vec u ; \vec x}{A} (l, \vec u ;\vec x , w) \dfn \orfn ( ; \wit{\vec u ; \vec x}{B} (l, \vec u ; \vec x , \beta (b_B (l) , 0 ; w ) ) , \wit{\vec u ; \vec x}{C} (l, \vec u ; \vec x , \beta (b_C (l) , 0 ; w ) ) )$. |
103 |
% \[ |
104 |
% \wit{\vec u ; \vec x}{A} (l, \vec u ;\vec x , w) |
105 |
% \quad \dfn \quad |
106 |
% \orfn ( ; \wit{\vec u ; \vec x}{B} (l, \vec u ; \vec x , \beta (b_B (l) , 0 ; w ) ) , \wit{\vec u ; \vec x}{C} (l, \vec u ; \vec x , \beta (b_C (l) , 0 ; w ) ) ) |
107 |
% \] |
108 |
% and we may set $b_A = O(b_B + b_C)$. |
109 |
\item Similarly if $A $ is $B \cand C$, but with $\andfn$ in place of $\orfn$. |
110 |
% \item If $A$ is $B \cand C$ then |
111 |
% \[ |
112 |
% \wit{\vec u ; \vec x}{A} (l, \vec u ;\vec x , w) |
113 |
% \quad \dfn \quad |
114 |
% \andfn ( ; \wit{\vec u ; \vec x}{B} (l, \vec u ; \vec x , \beta (b_B (l) , 0 ; w ) ) , \wit{\vec u ; \vec x}{C} (l, \vec u ; \vec x , \beta (b_C (l) , 0 ; w ) ) ) |
115 |
% \] |
116 |
% and we may set $b_A = O(b_B + b_C)$. |
117 |
\item If $A$ is $\forall u \leq |t(\vec u;)| . B(u)$ we appeal to sharply bounded closure, Lemma~\ref{lem:sharply-bounded-recursion}, to define |
118 |
\( |
119 |
\wit{\vec u ; \vec x}{A} |
120 |
\dfn |
121 |
\forall u \leq |t|. |
122 |
\wit{u, \vec u ; \vec x}{B(u)} (l, u, \vec u ; \vec x , \beta( b_{B(t)} (l) , u ; w ) ) |
123 |
\) |
124 |
%appealing to Lemma~\ref{lem:sharply-bounded-recursion}, |
125 |
and |
126 |
we set |
127 |
$|b_A| = O(|b_{B(t)}|^2 )$. |
128 |
\item Similarly if $A$ is $\exists u^\normal \leq |t(\vec u;)|. A'(u)$, but with $\exists u \leq |t|$ in place of $\forall u \leq |t|$. |
129 |
\item If $A$ is $\exists x^\safe . B(x) $ then |
130 |
\( |
131 |
\wit{\vec u ; \vec x}{A} |
132 |
\dfn |
133 |
\wit{\vec u ; \vec x , x}{B(x)} ( l, \vec u ; \vec x , \beta( b_{B} (l) , 0;w ) , \beta (q(l) , 1 ;w )) |
134 |
\) |
135 |
where $q$ is obtained by the polychecking and bounded minimisation properties,\footnote{Here let us assume that $q$ is formulated as a corresponding quasipolynomial in $l$ as opposed to a polynomial in $|l|$, as in Lemma~\ref{lem:bounded-minimisation}.} Lemmas~\ref{lem:polychecking} and \ref{lem:bounded-minimisation}, for $\wit{\vec u ; \vec x , x}{B(x)}$. |
136 |
We may set $|b_A| = O(|b_B | + |q|)$. |
137 |
\end{itemize} |
138 |
% \[ |
139 |
% \begin{array}{rcl} |
140 |
% \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$} \\ |
141 |
% \smallskip |
142 |
% \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) ) \\ |
143 |
% \smallskip |
144 |
% \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) ) \\ |
145 |
% \smallskip |
146 |
% \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 ) |
147 |
% \\ |
148 |
% \smallskip |
149 |
% \wit{\vec u ; \vec x}{\forall u \leq |t(\vec u;)| . A(x)} (l , \vec u ; \vec x, w) & \dfn & |
150 |
% \forall u \leq |t(\vec u;)| . \wit{u , \vec u ; \vec x}{A(u)} (l, u , \vec u ; \vec x, \beta(u;w) ) |
151 |
% \end{array} |
152 |
% \] |
153 |
% \anupam{need length bounding for sharply bounded quantifiers} |
154 |
\end{definition} |
155 |
|
156 |
|
157 |
From Lemmas~\ref{lem:polychecking} and \ref{lem:bounded-minimisation} we have: |
158 |
\begin{proposition} |
159 |
\label{prop:wit-rfn} |
160 |
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. |
161 |
Conversely, if $A (\vec u \mode l ; \vec x \mode l)$ is true then there is some $w \leq b_A(l)$ such that $\wit{\vec u ; \vec x}{A} (l, \vec u ; \vec x,w) =1$. |
162 |
\end{proposition} |
163 |
|
164 |
|
165 |
In order to prove Thm.~\ref{thm:soundness} we need the following lemma, essentially giving an interpretation of $\arith^i$ proofs into $\mubci{i-1}$. |
166 |
|
167 |
|
168 |
\begin{lemma} |
169 |
[Proof interpretation] |
170 |
\label{lem:proof-interp} |
171 |
From a typed-variable normal form $\arith^i$ proof $\pi$ of a $\Sigma^\safe_i$ sequent $\normal(\vec u), \safe(\vec x) , \Gamma \seqar \Delta$ |
172 |
there are $\bc (\charfn{}{i-1})$ functions $ f^\pi_B (\vec u ; \vec x , \vec w)$ for $B\in\Delta$ such that |
173 |
% such that, for any $l, \vec u ; \vec x , w$, we have: |
174 |
\[ |
175 |
% \vec a^\nu = \vec u , |
176 |
% \vec b^\sigma = \vec u, |
177 |
% \bigwedge\limits_{A \in \Gamma} \wit{\vec u ; \vec x}{ A} (l, \vec u ; \vec x , w_A) =1 |
178 |
% \ \implies \ |
179 |
% \bigvee\limits_{B\in \Delta} \wit{\vec u ; \vec x}{B} (l, \vec u ; \vec x , f^\pi_B((\vec u ; \vec x )\mode l, \vec w \mode p(l))) = 1 |
180 |
\begin{array}{rl} |
181 |
& \bigwedge\limits_{A \in \Gamma} \wit{\vec u ; \vec x}{ A} (l, \vec u ; \vec x , w_A |
182 |
%\mode b_A(l) |
183 |
) =1 \\ |
184 |
\noalign{\medskip} |
185 |
\implies & \bigvee\limits_{B\in \Delta} \wit{\vec u ; \vec x}{B} (l, \vec u ; \vec x , f^\pi_B(l, |
186 |
( |
187 |
\vec u ; \vec x |
188 |
) \mode l |
189 |
, \vec w \mode p^\pi(l))) = 1 |
190 |
\end{array} |
191 |
\] |
192 |
for some polynomial $p^\pi$. |
193 |
% \anupam{Need $\vec w \mode p(l)$ for some $p$.} |
194 |
% \anupam{$l$ may occur freely in the programs $f^\pi_B$} |
195 |
\end{lemma} |
196 |
|
197 |
|
198 |
|
199 |
For the implication above, let us simply refer to the LHS as $\Wit{\vec u ; \vec x}{\Gamma} (l , \vec u ; \vec x , \vec w)$ and the RHS as $\Wit{\vec u ; \vec x}{ \Delta} (l, \vec u ; \vec x , \vec f^\pi ( |
200 |
l,( |
201 |
\vec u ; \vec x |
202 |
)\mode l |
203 |
, \vec w \mode p^\pi(l)) )$, which is a slight abuse of notation: we assume that LHS and RHS are clear from context. |
204 |
Also let us call $p^\pi$ the \emph{modulus} of $f^\pi$ with respect to $l$. |
205 |
|
206 |
\begin{proof}[Proof sketch] |
207 |
Since the proof is in typed variable normal form we have that each line of the proof is of the same form, i.e.\ $\normal (\vec u), \safe (\vec x) , \Gamma \seqar \Delta$ over free variables $\vec u ; \vec x$. |
208 |
We define the function $f^\pi$ inductively, by considering the various final rules of $\pi$. |
209 |
|
210 |
|
211 |
\paragraph*{Negation} |
212 |
Suppose $\pi$ ends with a right negation step: |
213 |
\[ |
214 |
\vlinf{\rigrul{\cnot}}{}{\normal (\vec u) , \safe (\vec x) , \Gamma \seqar \cnot A , \Delta }{\normal (\vec u) , \safe (\vec x) , \Gamma , A\seqar \Delta} |
215 |
\] |
216 |
Notice that, since $\pi$ is in De Morgan form, we have that $A$ is atomic ($s\leq t$) and so, in particular, $\Pi^\safe_{i-1}$. |
217 |
So we can simply set the witness for both $A$ and $\cnot A$ to $0$. |
218 |
Namely, if $\vec f (l,\vec u ; \vec x , \vec w , w )$ is obtained by the inductive hypothesis, then we may set $f^\pi_B (l, \vec u ; \vec x , \vec w) \dfn f_B (l,\vec u ;\vec x , \vec w , 0)$ for $B\in \Delta$, and $f^\pi_A (\vec u ; \vec x , \vec w) \dfn 0$. |
219 |
The modulus $p^\pi$ remains the same as that of the inductive hypothesis. |
220 |
|
221 |
Left negation is similar, relying on a dummy argument. |
222 |
|
223 |
\paragraph*{Logical rules} |
224 |
% Pairing, depairing. Need length-boundedness. |
225 |
Suppose $\pi$ ends with a |
226 |
left conjunction step: |
227 |
\[ |
228 |
\vlinf{\lefrul{\cand}}{}{ \normal (\vec u ), \safe (\vec x) , A\cand B , \Gamma \seqar \Delta }{ \normal (\vec u ), \safe (\vec x) , A, B , \Gamma \seqar \Delta} |
229 |
\] |
230 |
By inductive hypothesis we have functions $\vec f (l,\vec u ; \vec x , w_A , w_B , \vec w)$ such that, |
231 |
\[ |
232 |
\Wit{\vec u ; \vec x}{\Gamma} (l, \vec u ; \vec x , w_A , w_B , \vec w) |
233 |
\quad \implies \quad |
234 |
\Wit{\vec u ; \vec x}{\Delta} (l, \vec u ; \vec x , \vec f ( |
235 |
l, ( |
236 |
\vec u ; \vec x |
237 |
) \mode l |
238 |
, (w_A , w_B , \vec w) \mode p(l) )) |
239 |
\] |
240 |
for some polynomial $p$. |
241 |
% |
242 |
We define $\vec f^\pi (l,\vec u ; \vec x , w , \vec w) \dfn \vec f (l,\vec u ; \vec x , \beta (p(l),0; w) , \beta(p(l),1;w),\vec w )$ and, by the bounding polynomial for pairing, it suffices to set $|p^\pi| = O(|p|)$. |
243 |
|
244 |
Suppose $\pi$ ends with a right disjunction step: |
245 |
\[ |
246 |
\vlinf{\rigrul{\cor}}{}{ \normal (\vec u ), \safe (\vec x) , \Gamma \seqar \Delta , A \cor B}{ \normal (\vec u ), \safe (\vec x) , \Gamma \seqar \Delta, A, B } |
247 |
\] |
248 |
$\vec f^\pi_\Delta$ remains the same as that of premiss. |
249 |
Let $\vec f , f_A, f_B$ be obtained by the inductive hypothesis so that: |
250 |
\[ |
251 |
\Wit{\vec u ; \vec x}{\Gamma} (l, \vec u ; \vec x , \vec w) |
252 |
\quad \implies \quad |
253 |
\Wit{\vec u ; \vec x}{\Delta} (l, \vec u ; \vec x , (\vec f , f_A , f_B) ( |
254 |
l,( |
255 |
\vec u ; \vec x |
256 |
) \mode l |
257 |
, \vec w \mode p(l) )) |
258 |
\] |
259 |
$\vec f^\pi_\Delta$ is defined the same as $\vec f$. |
260 |
Let $q(l)$ be an upper bound for $f_A , f_B$ and define $f^\pi_{A\cor B} (\vec u ; \vec x, \vec w) \dfn \pair{q(l)}{f_A ((\vec u ; \vec x, \vec w))}{f_B ((\vec u ; \vec x, \vec w))}$. |
261 |
$p^\pi$ is obtained from $p$, $q$ and the bounding polynomial for pairing. |
262 |
|
263 |
The other logical cases use a similar argument. |
264 |
|
265 |
|
266 |
\paragraph*{Quantifiers} |
267 |
Sharply bounded quantifier steps use a similar argument to the logical rules above, only requiring a larger modulus. |
268 |
|
269 |
|
270 |
% If $\pi$ ends with a sharply bounded quantifier step, then we use a similar argument to that for logical rules. |
271 |
% For instance, suppose $\pi$ ends with a $\rigrul{|\forall|}$: |
272 |
% \[ |
273 |
% \vlinf{\rigrul{|\forall|}}{}{\normal (\vec u) , \safe (\vec x) , \Gamma \seqar \Delta , \forall u^\normal \leq |t(\vec u;)| . A(u) }{ \normal(u) , \normal (\vec u) , \safe (\vec x) , u \leq |t(\vec u;)| , \Gamma \seqar \Delta, A(u) } |
274 |
% \] |
275 |
% By the inductive hypothesis we have functions $\vec f(u , \vec u ; \vec x , w , \vec w)$ such that: |
276 |
% \[ |
277 |
% \Wit{u ,\vec u ; \vec x}{\lhs} ( u , \vec u ;\vec x , w , \vec w ) |
278 |
% \quad \implies \quad |
279 |
% \Wit{u , \vec u ; \vec x}{\rhs} (u, \vec u ; \vec x , \vec f ((\vec u ; \vec x) \mode l , \vec w \mode p(l) ) ) |
280 |
% \] |
281 |
% with $|f|\leq q(|l|)$. |
282 |
% |
283 |
% By Lemma~\ref{lem:sequence-creation}, we have a function $F (l , u , \vec u ; \vec x , w , \vec w) $ such that.... |
284 |
% |
285 |
% We set $f^\pi_{\forall u^\normal \leq t . A} (\vec u ; \vec x , \vec w) \dfn F(q(|l|), t(\vec u;), \vec u ; \vec x , 0, \vec w )$. |
286 |
% |
287 |
% \anupam{Do $\exists$-right and $\forall$-right, left rules are symmetric.} |
288 |
|
289 |
Suppose $\pi$ ends with a right existential step:\footnote{ Here we assume the variables of $t$ are amongst $(\vec u ; \vec x)$, since we are in typed variable normal form.} |
290 |
\[ |
291 |
\vlinf{\rigrul{\exists}}{}{\normal(\vec u ) , \safe (\vec x) , \Gamma \seqar \Delta , \exists x . A(x)}{\normal(\vec u ) , \safe (\vec x) , \Gamma \seqar \Delta , A(t (\vec u ; \vec x))} |
292 |
\] |
293 |
By the inductive hypothesis we have functions $\vec f , f$ such that: |
294 |
\[ |
295 |
\Wit{\vec u ;\vec x}{\Gamma} ( l , \vec u ; \vec x , \vec w ) |
296 |
\quad \implies \quad |
297 |
\Wit{\vec u ; \vec x}{\Delta, A(t)} ( l, \vec u ; \vec x , (\vec f , f) (l, (\vec u ; \vec x) \mode l , \vec w \mode p(l) ) ) |
298 |
\] |
299 |
We let $\vec f^\pi_\Delta \dfn \vec f$ and define $f^\pi_{\exists x . A } ( l, \vec u ; \vec x , \vec w ) \dfn \pair{p(l) + t(\vec l ; \vec l)}{f(l, \vec u ; \vec x , \vec w)}{t(\vec u ; \vec x)}$. |
300 |
$p^\pi$ is hence obtained from $t$, $p$ and the bounding polynomial for pairing. |
301 |
|
302 |
Other quantifier steps are routine. |
303 |
|
304 |
\paragraph*{Contraction} |
305 |
Left contraction simply duplicates an argument,\footnote{We ignore here the cases when contraction is on a $\normal (u) $ or $\safe (x)$ formula, treating these formulae form as forming a set rather than a multiset.} whereas right contraction requires a conditional on a $\Sigma^\safe_i$ formula. |
306 |
This is the reason why we need to the witness function encoded itself into $\mubc$ rather than simply using a predicate. |
307 |
Suppose $\pi$ ends with a right contraction step: |
308 |
\[ |
309 |
\vlinf{\cntr}{}{\normal (\vec u) , \safe (\vec x) , \Gamma \seqar \Delta , A }{\normal (\vec u) , \safe (\vec x) , \Gamma \seqar \Delta , A , A} |
310 |
\] |
311 |
By the inductive hypothesis we have functions $\vec f_\Delta , f_0, f_1$ corresponding to the RHS $\Delta , A ,A$. |
312 |
We may define $\vec f^\pi_\Delta = \vec f_\Delta$ and: |
313 |
\[ |
314 |
f^\pi_A (l, \vec u ; \vec x , \vec w ) |
315 |
\quad \dfn \quad |
316 |
\cond (; \wit{\vec u ; \vec x}{A} ( l , \vec u ; \vec x , f_0(l,\vec u ; \vec x , \vec w) ) , f_1(l,\vec u ; \vec x , \vec w) , f_0(\vec u ; \vec x , \vec w) ) |
317 |
\] |
318 |
|
319 |
|
320 |
% \anupam{For $\normal (\vec u), \safe (\vec x)$ in antecedent, we always consider as a set, so do not display explicitly contraction rules. } |
321 |
\paragraph*{Induction} |
322 |
Suppose $\pi$ ends with a polynomial induction step: |
323 |
\[ |
324 |
\vlinf{\pind}{}{ \normal (\vec u), \safe (\vec x) , \Gamma, A(0) \seqar A(t(\vec u ;)) , \Delta}{ \left\{\normal (u) , \normal (\vec u) , \safe (\vec x) , \Gamma, A(u) \seqar A(\succ i u ) , \Delta \right\}_{i=0,1} } |
325 |
\] |
326 |
% \anupam{need to say in normal form part that can assume induction of this form} |
327 |
For simplicity we will assume $\Delta $ is empty.\footnote{Note that a proof can always be put into this form by the right disjunction rules. The criterion on logical complexity for typed variable normal form proofs is preserved due to free-cut freeness.} |
328 |
% |
329 |
Now, by the inductive hypothesis, we have functions $h_i$ such that: |
330 |
\[ |
331 |
\Wit{u , \vec u ; \vec x}{\Gamma, A(0)} (l , u , \vec u ; \vec x , \vec w , w) |
332 |
\quad \implies \quad |
333 |
\Wit{u , \vec u ; \vec x}{A(\succ i u)} (l , u , \vec u ; \vec x , h_i (l,(u , \vec u ; \vec x ) \mode l , (\vec w , w) \mode p(l) ) ) |
334 |
\] |
335 |
First let us define $ f$ by safe recursion as follows: |
336 |
\[ |
337 |
\begin{array}{rcl} |
338 |
f (l,0 , \vec u ; \vec x, \vec w, w ) & \dfn & w\\ |
339 |
f(l, \succ i u , \vec u ; \vec x , \vec w, w) & \dfn & |
340 |
h_i (l,u , \vec u ; \vec x , \vec w , f(l,u , \vec u ; \vec x , \vec w , w )) |
341 |
\end{array} |
342 |
\] |
343 |
% where $\vec w$ corresponds to $\Gamma $ and $w$ corresponds to $A(0)$. |
344 |
% \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.} |
345 |
Now we let $f^\pi (\vec u ; \vec x , \vec w) \dfn f(t(\vec u ; ) , \vec u ; \vec x , \vec w)$. |
346 |
It suffices to let $|p^\pi| = O(|p|^2)$. |
347 |
|
348 |
\paragraph*{Cut} |
349 |
If $\pi$ ends with a cut on an induction formula, which is $\Sigma^\safe_i$, then $f^\pi$ is obtained from the inductive hypothesis by simply substituting already defined functions into a safe position. |
350 |
The other possibility is that $\pi$ ends with a `raisecut': |
351 |
\[ |
352 |
\vliinf{\rais\cut}{}{\normal (\vec u ) , \normal (\vec v) , \safe (\vec x) ,\Gamma \seqar \Delta }{ \normal (\vec u) \seqar \exists x^\safe . A(x) }{ \normal (u) , \normal (\vec v) , \safe (\vec x) , A(u), \Gamma \seqar \Delta } |
353 |
\] |
354 |
In this case, by the inductive hypothesis, we have functions $f(l,\vec u ; )$ from the left premiss and $\vec g (l,u, \vec v ; \vec x , w , \vec w )$ from the right premiss, so we may define: |
355 |
\[ |
356 |
\vec f^\pi ( l , \vec u , \vec v ; \vec x , \vec w ) |
357 |
\quad \dfn \quad |
358 |
\vec g ( l, \beta (1 ; f(l,\vec u ;) ) , \vec v ; \vec x , \beta(0;f(l,\vec u ;)) , \vec w ) |
359 |
\] |
360 |
Again, $p^\pi$ is obtained from $p$ and the bounding polynomial for pairing. |
361 |
\end{proof} |
362 |
|
363 |
|
364 |
|
365 |
|
366 |
|
367 |
|
368 |
Now we can prove the soundness result: |
369 |
|
370 |
\begin{proof} |
371 |
[Proof sketch of Thm.~\ref{thm:soundness} from Lemma~\ref{lem:proof-interp}] |
372 |
Suppose $\arith^i \proves \forall \vec u^\normal . \exists x^\safe . A(\vec u ; x)$. By inversion and Thm.~\ref{thm:normal-form} there is a $\arith^i$ proof $\pi$ of $\normal (\vec u ) \seqar \exists x^\safe. A(\vec u ; x )$ in typed variable normal form. |
373 |
By Lemma~\ref{lem:proof-interp}, we have a $\mubci{i-1}$ function $f^\pi$ with $\wit{\vec u ;}{\exists x^\safe . A} (l, \vec u ; f^\pi(l,\vec u \mode l;)) =1$. |
374 |
By the definition of $\wit{}{}$ and Prop.~\ref{prop:wit-rfn} we have that $\exists x . A(\vec u \mode l; x)$ is true just if $A(\vec u \mode l ; \beta (q(l), 1 ; f(l, \vec u \mode l;) ))$ is true, where $q(l)$ is an upper bound for $f^\pi (l, \vec u \mode l ; )$. |
375 |
Now, since all $\vec u$ are normal, we may simply set $l$ to have a longer length than all of these arguments, so the function $f(\vec u;) \dfn \beta (q(\sum \vec u), 1 ; f(\vec u \mode \sum \vec u;) ))$ indeed witnesses the required existential. |
376 |
\end{proof} |