Statistiques
| Révision :

root / CSL17 / tech-report / appendix-soundness.tex @ 251

Historique | Voir | Annoter | Télécharger (8,07 ko)

1 251 adas
\section{Proof of soundness}
2 251 adas
3 251 adas
\begin{definition}
4 251 adas
	[Length bounded characteristic functions]
5 251 adas
	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.
6 251 adas
	%	If $A$ is a $\Pi_{i}$ formula then:
7 251 adas
	\[
8 251 adas
	\begin{array}{rcl}
9 251 adas
	\charfn{\vec u ; \vec x}{s\leq t} (l, \vec u ; \vec x) & \dfn & \leqfn(l;s,t) \\
10 251 adas
	\smallskip
11 251 adas
	%	\charfn{}{s=t} (l, \vec u ; \vec x) & \dfn & \eq(l;s,t) \\
12 251 adas
	%	\smallskip
13 251 adas
	\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)) \\
14 251 adas
	\smallskip
15 251 adas
	\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) ) \\
16 251 adas
	\smallskip
17 251 adas
	\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) )
18 251 adas
	%	\end{array}
19 251 adas
	%	\quad
20 251 adas
	%	\begin{array}{rcl}
21 251 adas
	\\	\smallskip
22 251 adas
	\charfn{\vec u ; \vec x}{\exists x^\safe . A(x)} (l, \vec u ;\vec x) & \dfn & \begin{cases}
23 251 adas
	1 & \exists x^\safe . \charfn{}{A(x)} (l, \vec u ;\vec x , x) = 1 \\
24 251 adas
	0 & \text{otherwise}
25 251 adas
	\end{cases} \\
26 251 adas
	\smallskip
27 251 adas
	\charfn{\vec u ; \vec x}{\forall x^\safe . A(x)} (l, \vec u ;\vec x ) & \dfn &
28 251 adas
	\begin{cases}
29 251 adas
	0 & \exists x^\sigma. \charfn{\vec u ; \vec x}{ A(x)} (l, \vec u; \vec x , x) = 0 \\
30 251 adas
	1 & \text{otherwise}
31 251 adas
	\end{cases}
32 251 adas
	\end{array}
33 251 adas
	\]
34 251 adas
\end{definition}
35 251 adas
36 251 adas
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 w')$, with $\vec w'$ in place of $\vec f( \cdots )$, which is a slight abuse of notation: we assume that LHS and RHS are clear from context.
37 251 adas
38 251 adas
\begin{proof}
39 251 adas
	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$.
40 251 adas
	We define the function $f$ inductively, by considering the various final rules of $\pi$.
41 251 adas
42 251 adas
43 251 adas
	\paragraph*{Negation}
44 251 adas
	Can assume only on atomic formulae, so no effect.
45 251 adas
46 251 adas
	\paragraph*{Logical rules}
47 251 adas
	Pairing, depairing. Need length-boundedness.
48 251 adas
49 251 adas
	If we have a left conjunction step:
50 251 adas
	\[
51 251 adas
	\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}
52 251 adas
	\]
53 251 adas
	By inductive hypothesis we have functions $\vec f (\vec u ; \vec x , w_A , w_B , \vec w)$ such that,
54 251 adas
	\[
55 251 adas
	\Wit{\vec u ; \vec x}{\Gamma} (l, \vec u ; \vec x , w_A , w_B , \vec w)
56 251 adas
	\quad \implies \quad
57 251 adas
	\Wit{\vec u ; \vec x}{\Delta} (l, \vec u ; \vec x , \vec f ( (\vec u ; \vec x) \mode l , (w_A , w_B , \vec w) \mode p(l) ))
58 251 adas
	\]
59 251 adas
	for some polynomial $p$.
60 251 adas
	%
61 251 adas
	We define $\vec f^\pi (\vec u ; \vec x , w , \vec w) \dfn \vec f (\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)$.
62 251 adas
63 251 adas
64 251 adas
	Right disjunction step:
65 251 adas
	\[
66 251 adas
	\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 }
67 251 adas
	\]
68 251 adas
	$\vec f^\pi_\Delta$ remains the same as that of premiss.
69 251 adas
	Let $f_A, f_B$ be the functions corresponding to $A$ and $B$ in the premiss, so that:
70 251 adas
	\[
71 251 adas
	\Wit{\vec u ; \vec x}{\Gamma} (l, \vec u ; \vec x , \vec w)
72 251 adas
	\quad \implies \quad
73 251 adas
	\Wit{\vec u ; \vec x}{\Delta} (l, \vec u ; \vec x , f_C ( (\vec u ; \vec x) \mode l , \vec w \mode p(l) ))
74 251 adas
	\]
75 251 adas
	for $C = A,B$ and for some $p$, such that $f_A , f_B$ are bounded by $q(l)$ (again by IH).
76 251 adas
	We 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))}$.
77 251 adas
	\paragraph*{Quantifiers}
78 251 adas
	\anupam{Do $\exists$-right and $\forall$-right, left rules are symmetric.}
79 251 adas
80 251 adas
81 251 adas
82 251 adas
	Sharply bounded quantifiers are generalised versions of logical rules.
83 251 adas
	\[
84 251 adas
	\vlinf{|\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)  }
85 251 adas
	\]
86 251 adas
	By the inductive hypothesis we have functions $\vec f(u , \vec u ; \vec x , w , \vec w)$ such that:
87 251 adas
	\[
88 251 adas
	\Wit{u ,\vec u ; \vec x}{\lhs} ( u , \vec u ;\vec x , w , \vec w )
89 251 adas
	\quad \implies \quad
90 251 adas
	\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) ) )
91 251 adas
	\]
92 251 adas
	with $|f|\leq q(|l|)$.
93 251 adas
94 251 adas
	By Lemma~\ref{lem:sequence-creation}, we have a function $F (l , u , \vec u ; \vec x , w , \vec w) $ such that....
95 251 adas
96 251 adas
	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  )$.
97 251 adas
98 251 adas
99 251 adas
	Right existential:
100 251 adas
	\[
101 251 adas
	\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)}
102 251 adas
	\]
103 251 adas
	Here we assume the variables of $t$ are amongst $(\vec u ; \vec x)$, since we are in typed variable normal form.
104 251 adas
105 251 adas
106 251 adas
	\paragraph*{Contraction}
107 251 adas
	Left contraction simply duplicates an argument, whereas right contraction requires a conditional on a $\Sigma^\safe_i$ formula.
108 251 adas
109 251 adas
	\[
110 251 adas
	\vlinf{\cntr}{}{\normal (\vec u) , \safe (\vec x) , \Gamma \seqar \Delta , A }{\normal (\vec u) , \safe (\vec x) , \Gamma \seqar \Delta , A , A}
111 251 adas
	\]
112 251 adas
113 251 adas
	$\vec f^\pi_\Delta$ remains the same as that of premiss. Let $f_0 ,f_1$ correspond to the two copies of $A$ in the premiss.
114 251 adas
	We define:
115 251 adas
	\[
116 251 adas
	f^\pi_A ( \vec u ; \vec x , \vec w  )
117 251 adas
	\quad \dfn \quad
118 251 adas
	\cond (; \wit{\vec u ; \vec x}{A} ( l , \vec u ; \vec x , f_0(\vec u ; \vec x , \vec w) ) , f_1(\vec u ; \vec x , \vec w) , f_0(\vec u ; \vec x , \vec w)  )
119 251 adas
	\]
120 251 adas
121 251 adas
122 251 adas
	\anupam{For $\normal (\vec u), \safe (\vec x)$ in antecedent, we always consider as a set, so do not display explicitly contraction rules. }
123 251 adas
	\paragraph*{Induction}
124 251 adas
	Corresponds to safe recursion on notation.
125 251 adas
	Suppose final step is (wlog):
126 251 adas
	\[
127 251 adas
	\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} }
128 251 adas
	\]
129 251 adas
	\anupam{need to say in normal form part that can assume induction of this form}
130 251 adas
	For simplicity we will assume $\Delta $ is empty, which we can always do by Prop.~\todo{DO THIS!}
131 251 adas
132 251 adas
	Now, by the inductive hypothesis, we have functions $h_i$ such that:
133 251 adas
	\[
134 251 adas
	\Wit{u , \vec u ; \vec x}{\Gamma, A(0)} (l , u , \vec u ; \vec x ,  \vec w)
135 251 adas
	\quad \implies \quad
136 251 adas
	\Wit{u , \vec u ; \vec x}{A(\succ i u)} (l , u , \vec u ; \vec x ,  h_i ((u , \vec u) \mode l ; \vec x \mode l , \vec w) )
137 251 adas
	\]
138 251 adas
	First let us define $ f$ as follows:
139 251 adas
	\[
140 251 adas
	\begin{array}{rcl}
141 251 adas
	f (0 , \vec u ; \vec x, \vec w,  w ) & \dfn &  w\\
142 251 adas
	f( \succ i u , \vec u ; \vec x , \vec w, w) & \dfn &
143 251 adas
	h_i (u , \vec u ; \vec x , \vec w , f(u , \vec u ; \vec x , \vec w , w ))
144 251 adas
	\end{array}
145 251 adas
	\]
146 251 adas
	where $\vec w$ corresponds to $\Gamma $ and $w$ corresponds to $A(0)$.
147 251 adas
	\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.}
148 251 adas
149 251 adas
	Now we let $f^\pi (\vec u ; \vec x , \vec w) \dfn f(t(\vec u ; ) , \vec u ; \vec x , \vec w)$.
150 251 adas
151 251 adas
	\paragraph*{Cut}
152 251 adas
	If it is a cut on an induction formula, which is safe, then it just corresponds to a safe composition since everything is substituted into a safe position.
153 251 adas
	Otherwise it is a `raisecut':
154 251 adas
	\[
155 251 adas
	\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 }
156 251 adas
	\]
157 251 adas
	In this case we have functions $f(\vec u ; )$ and $\vec g (u, \vec v ; \vec x , w , \vec w )$, in which case we construct $\vec f^\pi$ as:
158 251 adas
	\[
159 251 adas
	\vec f^\pi ( \vec u , \vec v ; \vec x , \vec w )
160 251 adas
	\quad \dfn \quad
161 251 adas
	\vec g ( \beta (1 ; f(\vec u ;) ) , \vec v ; \vec x , \beta(0;f(\vec u ;)) , \vec w )
162 251 adas
	\]
163 251 adas
	\end{proof}