Révision 64

CSL16/wfm.tex (revision 64)
50 50
			%	\type (\forall x^N . A) & := & \Nat \to \type(A)
51 51
			\end{array}
52 52
			\]
53
			For a sorted tuple $(\vec u ; \vec x)$ we write $|(\vec u ; \vec x)|$ to denote its length, i.e.\ $|\vec u| + |\vec x|$.
53 54
			%	where $\nu$ designates that the inputs are normal.
54 55
		\end{definition}
55 56
		
......
66 67
		This sorted tuple corresponds to the input variables, normal and safe, for the BC programs that we will define. It becomes important here that we are considering proofs of a convergence statement, since a free-cut free $\arith$-proof of a convergence statement cannot contain any $\lor$ symbols in the scope of a $!$. This could cause an issue in the above definition since we do not in general have the equivalence $!(A \lor B) \equiv !A \lor !B$. On the other hand, the equivalence $!(A\land B) \equiv !A \land !B$ follows since we are in the affine setting.
67 68
		
68 69
	
69
		Let us fix a particular convergence statement for an equational specification $\eqspec$. 
70
		Let us fix a particular equational specification $\eqspec(f)$. Rather than directly considering $\arith$-proofs of $\conv ( f , \eqspec )$, we will consider a $\closure{\eqspec} \cup \arith $ sequent proof of $\word (\vec x) \seqar \word (f (\vec x) )$, under Lemma~\ref{lemma:spec-norm-form}. 
70 71
		
72
		Our crucial use of free-cut elimination is in the following result, which yields strong regularity properties:
71 73
		
74
		\begin{proposition}
75
			[Freedom]
76
	A free-cut free $\closure{\eqspec} \cup \arith $ sequent proof of $\word (\vec x) \seqar \word (f (\vec x) )$ is:
77
	\begin{enumerate}
78
		\item Free of any negation symbols.
79
		\item Free of any $\forall$ symbols.
80
		\item Free of any $?$ symbols.
81
	\end{enumerate}
82
		\end{proposition}
83
		
84
		
85
		For this reason we can assume that $\type$ is well-defined for all formulae occurring in a free-cut free proof of convergence, and so we can proceed with the translation from proofs to BC programs.
86
		
72 87
		\begin{definition}
73 88
			[Translation]
74
			We give a translation of free-cut free $\Sigma^\nat_1$-$\pind \cup \Phi$ proofs $\pi$ of sequents $\Gamma(\vec a) \seqar \Delta(\vec a)$ to BC-programs for a vector of functions $\vec f^\pi$ with argument of type $\type \left(\bigotimes\Gamma\right)$ such that $|\vec f^\pi | = | \type\left(\bigparr\Delta\right)|$.
89
			We give a translation from a free-cut free $\closure{\eqspec}$ proof $\pi$, containing no $\bot,?,\forall$ symbols, of a sequent $\Gamma \seqar \Delta$, to BC programs for a vector of functions $\vec f^\pi$ with argument of type $\type \left(\bigotimes\Gamma\right)$ such that $|\vec f^\pi | = | \type\left(\bigparr\Delta\right)|$.
75 90
			
76 91
			
77 92
			The translation is by induction on the size of a free-cut free proof, so we proceed by analysis of the final step of a proof.
78 93
			
79
			If $\pi$ is simply an axiom, we construct $\vec f^\pi$ as follows:
94
			First we consider the base cases. If $\pi$ is an instance of the initial rules $\geneps, \sepeps^0 , \sepeps^1, \sepzer, \sepone$ or $\inj$ then $\vec f^\pi$ is simply the constant function $\epsilon$ (possibly with dummy inputs as required by $\type$).\footnote{This is because proofs of equality can be seen to carry no computational content.}
95
			The other initial steps of $\arith$ are translated as follows:
80 96
			\[
81 97
			\begin{array}{ccc}
82
			\vlinf{\natcntr}{}{\nat(t) \seqar \nat(t) \land \nat(t) }{}
83
			& : &
84
			( \id (;x) , \id (;x) )
85
			\\
86
			\vlinf{\nat_\epsilon}{}{\seqar \nat (\epsilon)}{}
87
			& : &
88
			\epsilon
89
			\\ 
90
			\vlinf{\nat_0}{}{\nat(t) \seqar \nat(\succ_0 t)}{}
91
			& : &
98
%			\vlinf{\nat_\epsilon}{}{\seqar \nat (\epsilon)}{}
99
%			& : &
100
%			\epsilon
101
%			\\ 
102
			\vlinf{\genzer}{}{\word(t) \seqar \word(\succ_0 t)}{}
103
			& \quad :\quad  &
92 104
			\succ_0 ( ;x) 
93 105
			\\
94
			\vlinf{\nat_1}{}{\nat(t) \seqar \nat(\succ_1 t)}{}
95
			& : & 
106
			\vlinf{\genone}{}{\word(t) \seqar \word(\succ_1 t)}{}
107
			& \quad : \quad & 
96 108
			\succ_1 (; x)
97 109
			\\
98
			\vlinf{\epsilon^0}{}{ \nat (t)  , \epsilon = \succ_0 t \seqar }{} 
99
			& : &
100
			\epsilon
110
%			\vlinf{\epsilon^0}{}{ \nat (t)  , \epsilon = \succ_0 t \seqar }{} 
111
%			& : &
112
%			\epsilon
113
%			\\
114
%			\vlinf{\epsilon^1}{}{ \nat (t)  , \epsilon = \succ_1 t \seqar }{}
115
%			& : &
116
%			\epsilon
117
%			\\
118
%			\vlinf{\succ_0}{}{\nat (s) , \nat (t)  , \succ_0 s = \succ_0 t\seqar s = t }{}
119
%			& : &
120
%			\epsilon
121
%			\\
122
%			\vlinf{\succ_1}{}{\nat (s) , \nat (t)  , \succ_1 s = \succ_1 t\seqar s = t }{}
123
%			& : &
124
%			\epsilon
125
%			\\
126
%			\vlinf{\inj}{}{\nat(t), \succ_0 t = \succ_1 t \seqar}{}
127
%			& : &
128
%			\epsilon
129
%			\\
130
			\vlinf{\surj}{}{\word (t) \seqar t = \epsilon \laor \exists y^\word . t = \succ_0 y \laor \exists y^\word. t = \succ_1 y }{}
131
			&\quad : \quad  &
132
			( \epsilon , \pred (  ;x) , \pred (;x ) )
101 133
			\\
102
			\vlinf{\epsilon^1}{}{ \nat (t)  , \epsilon = \succ_1 t \seqar }{}
103
			& : &
104
			\epsilon
105
			\\
106
			\vlinf{\succ_0}{}{\nat (s) , \nat (t)  , \succ_0 s = \succ_0 t\seqar s = t }{}
107
			& : &
108
			\epsilon
109
			\\
110
			\vlinf{\succ_1}{}{\nat (s) , \nat (t)  , \succ_1 s = \succ_1 t\seqar s = t }{}
111
			& : &
112
			\epsilon
113
			\\
114
			\vlinf{\inj}{}{\nat(t), \succ_0 t = \succ_1 t \seqar}{}
115
			& : &
116
			\epsilon
117
			\\
118
			\vlinf{\surj}{}{\nat (t) \seqar t = \epsilon , \exists y^\nat . t = \succ_0 y , \exists y^\nat . t = \succ_1 y }{}
119
			&: &
120
			( \epsilon , \pred (  ;x) , \pred (;x ) )
134
				\vlinf{\wordcntr}{}{\word(t) \seqar \word(t) \land \word(t) }{}
135
				& \quad  : \quad &
136
				( \id (;x) , \id (;x) )
121 137
			\end{array}
122 138
			\]
139
			Finally an $\closure{\eqspec}$ initial step is also translated simply to $\epsilon$.
123 140
			
124
			\anupam{axioms which are true and contain no computational information currently interpreted as constant $\epsilon$. Check this/typing again to make sure plays nice.}
125
			\anupam{check $\surj$.}
141
		
126 142
			
127 143
			
144
			Now we consider the inductive cases.
128 145
			Suppose $\pi$ ends with a $\rigrul{\land}$ step:
129 146
			\[
130 147
			\vlderivation{
CSL16/arithmetic.tex (revision 64)
204 204
	\forall \vec x^\word . \word (f (\vec x) )
205 205
	\]
206 206
	\end{definition}
207
	
208
	
209
\begin{proposition}
210
	\label{prop:eq-spec-model}
211
	For every equational specification $\eqspec$, its universal closure has a model.
212
\end{proposition}
213
\begin{proof}
214
	\todo{Proof. Also, need to specify that model extends $\Word$?}
215
\end{proof}
207 216

  
208 217
	One issue is that a convergence statement contains universal quantifiers, which is problematic for the extraction of functions by the witness function method later on.
209 218
%	\footnote{Intuitively universal quantifiers can be interpreted by type 1 functions. From here, in an intuitionistic setting, a $\forall$-right step can be directly realised, but in the classical setting the presence of side-formulae on the right can cause issues for constructivity.}
......
212 221
	
213 222
	Let us write $\closure{\eqspec}$ for the closure of a specification $\eqspec$ under substitution of terms.
214 223
	
215
	\begin{proposition}
224
	\begin{lemma}
225
		\label{lemma:spec-norm-form}
216 226
	For any system $\system$, we have that $\system$ proves $\conv (f , \eqspec)$ if and only if $\system \cup \closure{\eqspec}$ proves $\word (\vec a) \seqar \word ( f (\vec a) )$.
217
	\end{proposition}
227
	\end{lemma}
218 228
	\begin{proof}
219
		\todo{}
229
		\todo{Use deduction theorem and invertibility of $\forall$-right rule.}
220 230
	\end{proof}	
221 231
	
222 232
	Notice that the initial rules from $ \closure{\eqspec}$ and the conclusion $\word (\vec a) \seqar \word ( f (\vec a) )$ of a convergence proof in this form are free of negation and universal quantifiers.

Formats disponibles : Unified diff