Index: CSL16/wfm.tex
===================================================================
--- CSL16/wfm.tex	(revision 63)
+++ CSL16/wfm.tex	(revision 64)
@@ -50,6 +50,7 @@
 			%	\type (\forall x^N . A) & := & \Nat \to \type(A)
 			\end{array}
 			\]
+			For a sorted tuple $(\vec u ; \vec x)$ we write $|(\vec u ; \vec x)|$ to denote its length, i.e.\ $|\vec u| + |\vec x|$.
 			%	where $\nu$ designates that the inputs are normal.
 		\end{definition}
 		
@@ -66,65 +67,81 @@
 		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.
 		
 	
-		Let us fix a particular convergence statement for an equational specification $\eqspec$. 
+		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}. 
 		
+		Our crucial use of free-cut elimination is in the following result, which yields strong regularity properties:
 		
+		\begin{proposition}
+			[Freedom]
+	A free-cut free $\closure{\eqspec} \cup \arith $ sequent proof of $\word (\vec x) \seqar \word (f (\vec x) )$ is:
+	\begin{enumerate}
+		\item Free of any negation symbols.
+		\item Free of any $\forall$ symbols.
+		\item Free of any $?$ symbols.
+	\end{enumerate}
+		\end{proposition}
+		
+		
+		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.
+		
 		\begin{definition}
 			[Translation]
-			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)|$.
+			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)|$.
 			
 			
 			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.
 			
-			If $\pi$ is simply an axiom, we construct $\vec f^\pi$ as follows:
+			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.}
+			The other initial steps of $\arith$ are translated as follows:
 			\[
 			\begin{array}{ccc}
-			\vlinf{\natcntr}{}{\nat(t) \seqar \nat(t) \land \nat(t) }{}
-			& : &
-			( \id (;x) , \id (;x) )
-			\\
-			\vlinf{\nat_\epsilon}{}{\seqar \nat (\epsilon)}{}
-			& : &
-			\epsilon
-			\\ 
-			\vlinf{\nat_0}{}{\nat(t) \seqar \nat(\succ_0 t)}{}
-			& : &
+%			\vlinf{\nat_\epsilon}{}{\seqar \nat (\epsilon)}{}
+%			& : &
+%			\epsilon
+%			\\ 
+			\vlinf{\genzer}{}{\word(t) \seqar \word(\succ_0 t)}{}
+			& \quad :\quad  &
 			\succ_0 ( ;x) 
 			\\
-			\vlinf{\nat_1}{}{\nat(t) \seqar \nat(\succ_1 t)}{}
-			& : & 
+			\vlinf{\genone}{}{\word(t) \seqar \word(\succ_1 t)}{}
+			& \quad : \quad & 
 			\succ_1 (; x)
 			\\
-			\vlinf{\epsilon^0}{}{ \nat (t)  , \epsilon = \succ_0 t \seqar }{} 
-			& : &
-			\epsilon
+%			\vlinf{\epsilon^0}{}{ \nat (t)  , \epsilon = \succ_0 t \seqar }{} 
+%			& : &
+%			\epsilon
+%			\\
+%			\vlinf{\epsilon^1}{}{ \nat (t)  , \epsilon = \succ_1 t \seqar }{}
+%			& : &
+%			\epsilon
+%			\\
+%			\vlinf{\succ_0}{}{\nat (s) , \nat (t)  , \succ_0 s = \succ_0 t\seqar s = t }{}
+%			& : &
+%			\epsilon
+%			\\
+%			\vlinf{\succ_1}{}{\nat (s) , \nat (t)  , \succ_1 s = \succ_1 t\seqar s = t }{}
+%			& : &
+%			\epsilon
+%			\\
+%			\vlinf{\inj}{}{\nat(t), \succ_0 t = \succ_1 t \seqar}{}
+%			& : &
+%			\epsilon
+%			\\
+			\vlinf{\surj}{}{\word (t) \seqar t = \epsilon \laor \exists y^\word . t = \succ_0 y \laor \exists y^\word. t = \succ_1 y }{}
+			&\quad : \quad  &
+			( \epsilon , \pred (  ;x) , \pred (;x ) )
 			\\
-			\vlinf{\epsilon^1}{}{ \nat (t)  , \epsilon = \succ_1 t \seqar }{}
-			& : &
-			\epsilon
-			\\
-			\vlinf{\succ_0}{}{\nat (s) , \nat (t)  , \succ_0 s = \succ_0 t\seqar s = t }{}
-			& : &
-			\epsilon
-			\\
-			\vlinf{\succ_1}{}{\nat (s) , \nat (t)  , \succ_1 s = \succ_1 t\seqar s = t }{}
-			& : &
-			\epsilon
-			\\
-			\vlinf{\inj}{}{\nat(t), \succ_0 t = \succ_1 t \seqar}{}
-			& : &
-			\epsilon
-			\\
-			\vlinf{\surj}{}{\nat (t) \seqar t = \epsilon , \exists y^\nat . t = \succ_0 y , \exists y^\nat . t = \succ_1 y }{}
-			&: &
-			( \epsilon , \pred (  ;x) , \pred (;x ) )
+				\vlinf{\wordcntr}{}{\word(t) \seqar \word(t) \land \word(t) }{}
+				& \quad  : \quad &
+				( \id (;x) , \id (;x) )
 			\end{array}
 			\]
+			Finally an $\closure{\eqspec}$ initial step is also translated simply to $\epsilon$.
 			
-			\anupam{axioms which are true and contain no computational information currently interpreted as constant $\epsilon$. Check this/typing again to make sure plays nice.}
-			\anupam{check $\surj$.}
+		
 			
 			
+			Now we consider the inductive cases.
 			Suppose $\pi$ ends with a $\rigrul{\land}$ step:
 			\[
 			\vlderivation{
Index: CSL16/arithmetic.tex
===================================================================
--- CSL16/arithmetic.tex	(revision 63)
+++ CSL16/arithmetic.tex	(revision 64)
@@ -204,6 +204,15 @@
 	\forall \vec x^\word . \word (f (\vec x) )
 	\]
 	\end{definition}
+	
+	
+\begin{proposition}
+	\label{prop:eq-spec-model}
+	For every equational specification $\eqspec$, its universal closure has a model.
+\end{proposition}
+\begin{proof}
+	\todo{Proof. Also, need to specify that model extends $\Word$?}
+\end{proof}
 
 	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.
 %	\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,11 +221,12 @@
 	
 	Let us write $\closure{\eqspec}$ for the closure of a specification $\eqspec$ under substitution of terms.
 	
-	\begin{proposition}
+	\begin{lemma}
+		\label{lemma:spec-norm-form}
 	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) )$.
-	\end{proposition}
+	\end{lemma}
 	\begin{proof}
-		\todo{}
+		\todo{Use deduction theorem and invertibility of $\forall$-right rule.}
 	\end{proof}	
 	
 	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.
