Index: CSL16/feas-arith-wfm.tex
===================================================================
--- CSL16/feas-arith-wfm.tex	(revision 26)
+++ CSL16/feas-arith-wfm.tex	(revision 27)
@@ -849,7 +849,7 @@
 				\witness{\vec a}{A \land B} ( \vec w^1 , \vec w^2, \vec b ) & := &  \witness{\vec a}{A} (\vec w^1 , \vec b) \cand \witness{\vec a}{B} (\vec w^2 , \vec b) & 
 				%			\text{for $\star \in \{ \land, \lor, \laand , \laor\}$.} 
 				\\
-		\witness{\vec a}{\exists x . A(x)} (w, \vec w , \vec b) & := & \witness{\vec{a}, a}{A(a)}(\vec w , \vec b, w ) & \\
+		\witness{\vec a}{\exists x^\nat . A(x)} ( w, \vec w  , \vec b) & := & \witness{\vec{a}, a}{A(a)}(\vec w , \vec b, w ) & \\
 		\end{array}
 		\]
 		where $|\vec w^1| = |\type (A)|$ and $|\vec w^2| = |\type (B)| $.
@@ -872,7 +872,7 @@
 	[Translation]
 	We give a translation of free-cut free $\Sigma^\nat_1$-$\pind$ 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)|$ and:
 	\[
-	\witness{\vec a}{\bigotimes \Gamma} (\vec w , \vec a) \implies \witness{\vec a}{\bigparr \Delta } (\vec f(\vec w , \vec a), \vec a)
+	\witness{\vec a}{\bigotimes \Gamma} (\vec w , \vec b) \implies \witness{\vec a}{\bigparr \Delta } (\vec f(\vec w , \vec b), \vec b)
 	\]
 	
 	\anupam{to consider: do we need parameters $\vec a$ in argument of $f$? Or does $\nat$ predicate take care of this?}
@@ -975,8 +975,56 @@
 
 \anupam{commented stuff on additives. To remark later perhaps.}
 
+
+
+Suppose $\pi$ ends with a $\rigrul{\exists}$ step,
 \[
 \vlderivation{
+	\vlin{\rigrul{\exists}}{}{ \Gamma, \nat(t) \seqar \Delta , \exists x^\nat . A(x) }{
+		\vltr{\pi'}{ \Gamma \seqar \Delta , A(t) }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
+	}
+}
+\]
+so by the inductive hypothesis we have functions $\vec f^\Delta , \vec f^{A(t)}$ with arguments $(\vec u ; \vec x )= \type(\bigotimes \Gamma)$. We define $\vec f^\pi$ as follows:
+\[
+\vec f^\pi (\vec u ; \vec x , y)
+\quad := \quad
+\left( \vec f^\Delta (\vec u ; \vec x) , \id (;y), \vec{ f}^{A(t)} (\vec u; \vec x)  \right)
+\]
+(The identity function on $y$ is defined from successor, predecessor and safe composition).
+
+
+%Suppose we have functions $\vec f^X (\vec x ; \vec y)$ from $\pi'$ for $X = \Delta$ or $ X=A$. 
+%\[
+%\vec f(\vec x ; \vec y , z) \quad := \quad ( \vec f^\Delta (\vec x ; \vec y)   ,  z , \vec f^A ( \vec x ; \vec y ) )
+%\]
+
+
+Suppose $\pi$ ends with a $\lefrul{\exists}$ step:
+\[
+\vlderivation{
+	\vlin{\lefrul{\exists}}{}{ \Gamma, \exists x^N . A(x) \seqar \Delta }{
+		\vltr{\pi'(a)}{ \Gamma , A(a),  N(a) \seqar \Delta  }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
+	}
+}
+\]
+%
+%Suppose we have functions $\vec f' (\vec u , \vec v ; x , \vec y , \vec z)$ from $\pi'$ with $(\vec u ; \vec x )$ corresponding to $\Gamma$, $(;x)$ corresponding to $N(a)$ and $(\vec v ; \vec z)$ corresponding to $A(a)$. We define:
+%\[
+%\vec f ( \vec u , \vec v ;  )
+%\]
+
+\anupam{should just be same? Consider variable naming, just in case.}
+
+%Suppose we have functions $\vec g (\vec v  , \vec w ; \vec x , y , \vec z)$ where $(\vec v ; \vec x) $ corresponds to $\Gamma$, $y$ corresponds to $\nat(a)$ and $(\vec w ; \vec z) $ corresponds to $A(a)$. Then we define:
+%\[
+%\vec f ( \vec v , \vec w ; \vec x , y , \vec z )
+%\]
+
+
+Cut:
+\[
+\vlderivation{
 \vliin{\cut}{}{\Gamma , \Sigma \seqar \Delta , \Pi}{
 \vltr{\pi_1}{ \Gamma \seqar \Delta, A }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
 }{
@@ -985,7 +1033,7 @@
 }
 	\]
 	
-We can assume that $A$ in the conclusion of $\pi_2$ is free of modalities, since one of the $A$s must be directly descended from an induction formula, and so consists of only safe inputs. Therefore we have functions $\vec f^1 (\vec w; \vec x)$ and $\vec f^2 (\vec y ; \vec z , \vec u)$ for $\pi_1$ and $\pi_2 $ respectively (free variable parameters are suppressed), with $\vec u$ corresponding to the (safe) inputs for $A$. 
+We have two cases. First, if $A$ is free of modalities, then $\type (A)$ consists of only safe inputs. Therefore we have functions $\vec f^1 (\vec w; \vec x)$ and $\vec f^2 (\vec y ; \vec z , \vec u)$ for $\pi_1$ and $\pi_2 $ respectively (free variable parameters are suppressed), with $\vec u$ corresponding to the (safe) inputs for $A$. 
 
 Let us write:
 \[
@@ -1010,48 +1058,11 @@
 
 Notice that all safe inputs are hereditarily right of a $;$, and so these terms are definable by safe composition and projection.
 
-\todo{another case for $!\nat(x)$ cut formula.}
 
-\anupam{should work for arbitrary $!$-cuts due to principal case for $!$}
+In the other case, where $A$ may be modal, it must be of the form $!\nat (x)$ since it is a cut formula, and so must directly descend from an induction step or axiom. The only such occurrence of a modality is in the induction step for a formula of the form $!\nat (x)$.
 
 
-Right existential:
-\[
-\vlderivation{
-\vlin{\rigrul{\exists}}{}{ \Gamma, \nat(t) \seqar \Delta , \exists x^\nat . A(x) }{
-\vltr{\pi'}{ \Gamma \seqar \Delta , A(t) }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
-}
-}
-\]
-Suppose we have functions $\vec f^X (\vec x ; \vec y)$ from $\pi'$ for $X = \Delta$ or $ X=A$. 
-\[
-\vec f(\vec x ; \vec y , z) \quad := \quad ( \vec f^\Delta (\vec x ; \vec y)   ,  z , \vec f^A ( \vec x ; \vec y ) )
-\]
 
-
-Left existential:
-\[
-\vlderivation{
-\vlin{\lefrul{\exists}}{}{ \Gamma, \exists x^N . A(x) \seqar \Delta }{
-\vltr{\pi'(a)}{ \Gamma,  N(a) , A(a) \seqar \Delta  }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
-}
-}
-\]
-
-Suppose we have functions $\vec f' (\vec u , \vec v ; x , \vec y , \vec z)$ from $\pi'$ with $(\vec u ; \vec x )$ corresponding to $\Gamma$, $(;x)$ corresponding to $N(a)$ and $(\vec v ; \vec z)$ corresponding to $A(a)$. We define:
-\[
-\vec f ( \vec u , \vec v ;  )
-\]
-
-\anupam{should just be same, no? To consider.}
-
-%Suppose we have functions $\vec g (\vec v  , \vec w ; \vec x , y , \vec z)$ where $(\vec v ; \vec x) $ corresponds to $\Gamma$, $y$ corresponds to $\nat(a)$ and $(\vec w ; \vec z) $ corresponds to $A(a)$. Then we define:
-%\[
-%\vec f ( \vec v , \vec w ; \vec x , y , \vec z )
-%\]
-
-\todo{finish}
-
 !:
 \[
 \vlderivation{
