Révision 32

CSL16/feas-arith-wfm.tex (revision 32)
280 280
\vlinf{\rigrul{\exists}}{}{\Gamma \seqar \Delta, \exists x . A(x)}{ \Gamma \seqar \Delta, A(t)}
281 281
&
282 282
\vlinf{\rigrul{\forall}}{}{\Gamma \seqar \Delta, \forall x . A(x)}{ \Gamma \seqar \Delta, A(a) } \\
283
\noalign{\bigskip}
284
 \vliinf{mix}{}{\Gamma, \Sigma \seqar \Delta , \Pi}{ \Gamma \seqar \Delta}{\Sigma \seqar \Pi} &&&
283
%\noalign{\bigskip}
284
% \vliinf{mix}{}{\Gamma, \Sigma \seqar \Delta , \Pi}{ \Gamma \seqar \Delta}{\Sigma \seqar \Pi} &&&
285 285
\end{array}
286 286
\end{array}
287 287
\]
288 288
where $p$ atomic, $i \in \{ 1,2 \}$ and the eigenvariable $a$ does not occur free in $\Gamma$ or $\Delta$.
289 289
\end{definition}
290
 Note that this system is \textit{affine} in the sense that it includes general weakening rules $\rigrul{\wk}$ and  $\lefrul{\wk}$, while in linear logic   $\rigrul{\wk}$ (resp. $\lefrul{\wk}$) is restricted to formulas of the form $?A$ (resp. $!A$). The rule $mix$ is included so that this system admits cut elimination. In the following though, by linear logic we will mean affine linear logic.
290
 Note that this system is \textit{affine} in the sense that it includes general weakening rules $\rigrul{\wk}$ and  $\lefrul{\wk}$, while in linear logic   $\rigrul{\wk}$ (resp. $\lefrul{\wk}$) is restricted to formulas of the form $?A$ (resp. $!A$). %The rule $mix$ is included so that this system admits cut elimination. 
291
  In the following though, by linear logic we will mean affine linear logic.
291 292
 
292 293
  We will consider extensions of linear logic with a \textit{theory}  $\mathcal T$ consisting in a finite set of additional axioms and rules, depicted as:
293 294

  
......
300 301
 where in rule (R), $I$ is a finite set (indicating the number of premises) and we assume the following conditions:
301 302
 \begin{enumerate}
302 303
 \item  We have:$$ FV(\Sigma_i, \Delta_i) \cap FV(!\Gamma, ? \Pi)= FV(\Sigma_i, \Delta_i) \cap FV(\Sigma', \Delta')= \emptyset $$
303
 \item $ \Sigma', \Delta'$ does not contain any formula of the shape $!A$ or $?A$. 
304
 \item $ \Sigma'$ (resp. $\Delta'$) does not contain any formula of the shape $?A$ (resp. $!A$).  
305
 %  \item $ \Sigma', \Delta'$ does not contain any formula of the shape $!A$ or $?A$. 
304 306
 \end{enumerate}
305 307
  
306 308
  \patrick{Anupam: note that I had to strengthen the conditions for the rules (R). Condition (1) is needed 
......
320 322
   Let us give an example of a possible rule (R) of a theory $\mathcal T$:
321 323
   
322 324
   \[
323
	\vlinf{(ind)}{(x \notin \FV(\Gamma, \Delta))}{ !\Gamma , A(0) \seqar A(t) , ?\Delta }{ !\Gamma , A(x) \seqar A(s x ), ?\Delta }
325
	\vlinf{(ind)}{(x \notin \FV(\Gamma, \Delta))}{ !\Gamma , N(t), A(0) \seqar A(t) , ?\Delta }{ !\Gamma , A(x) \seqar A(s x ), ?\Delta }
324 326
	\]
325 327

  
328
So here we have $I=\{1\}$ (one premise), $\Sigma_1=A(x)$, $\Delta_1= A(s x )$, $\Sigma'= N(t), A(0)$, $\Delta'= A(t)$. So conditions 1 and 2 are satisfied provided $x\notin FV(!\Gamma, ?\Pi)$ and $x\notin FV(t)$. 
326 329
%\[
327 330
%	\vliinf{}{(x \notin \FV(\Gamma, \Delta))}{ !\Gamma , A(\epsilon) \seqar A(t) , ?\Delta }{ !\Gamma , A(x) \seqar A(s_0 x ), ?\Delta }{ !\Gamma, A(x) \seqar A( s_1 x ) , ?\Delta}
328 331
%	\]
......
615 618
      
616 619
      If one of the premises is an axiom $\lefrul{\bot}$, $\id$ or $\rigrul{\bot}$, then $\pi$ can be rewritten to a suitable proof $\pi'$ by removing $c$ and the axiom rule. Otherwise both premises introduce the same connective, either  $\land$, $\lor$, $\laor$, $\laand$, $\forall$ or $\exists$. In each case a specific rewriting rule replaces the cut $c$ with one cut of strictly lower degree. See the Appendix.
617 620
      
618
      \item \textbf{weakening sub-case}: the remaining case is when one of the premises of $c$ is a $wk$ rule and the other one is a rule distinct from $cntr$, $\rigrul{?}$ or $\lefrul{!}$. W.l.o.g. assume that the left premise of $c$ is conclusion of $\lefrul{\wk}$. If the right premise is conclusion of say rule $\rigrul{\land}$ on a formula $A_1\land A_2$, then $c$ is replaced by two cuts $c_i$ ($i=1,2$) on a formula $A_i$ obtained (on the left) by a $\lefrul{\wk}$ rule. These two cuts are of strictly lower degree than $c$, so we are done. We proceed in a similar way in the cases of rules introducing connectives $\lor$, $\laand$, $\laor$, $\forall$, $\exists$. Now,there remains the case where the right premise is a $\rigrul{\wk}$: then the cut can be eliminated by erasing the two $wk$ rules and using instead a $mix$ rule. In this case also the degree has decreased.
621
      \item \textbf{weakening sub-case}: the remaining case is when one of the premises of $c$ is a $wk$ rule and the other one is a rule distinct from $cntr$, $\rigrul{?}$ or $\lefrul{!}$. W.l.o.g. assume that the left premise of $c$ is conclusion of $\lefrul{\wk}$, with principal formula $A$. If the right premise is conclusion of say rule $\rigrul{\land}$ on the formula $A=A_1\land A_2$, then $c$ is replaced by two cuts $c_i$ ($i=1,2$) on a formula $A_i$ obtained (on the left) by a $\lefrul{\wk}$ rule. These two cuts are of strictly lower degree than $c$, so we are done. We proceed in a similar way in the cases of rules introducing connectives $\lor$, $\laand$, $\laor$, $\forall$, $\exists$. Now, there remains the case where the right premise is a $\rigrul{\wk}$: then the cut can be eliminated by keeping only the l.h.s. proof $\pi_1$, removing the last cut $c$ and last    $\rigrul{\wk}$ rule    on $A$, and by adding enough
622
        $\rigrul{\wk}$, $\lefrul{\wk}$ rules to introduce all the new formulas in the final sequent. 
623

  
619 624
      
620
      \patrick{Display the rewriting step here}.
621
      
622 625
     \end{itemize}
623 626
     
624 627
      
......
722 725

  
723 726
CHECK THESE!
724 727

  
728
\todo{prove that free-cut elimination can be done with these rules}
729

  
725 730
\todo{Also include rules for contraction and weakening.}
726 731

  
727 732
\section{Convergence of Bellantoni-Cook programs}
......
862 867
	\type (A \lor B)  & : = & (\vec u , \vec v ; \vec x , \vec y) & \text{if $\type (A) = (\vec u ; \vec x)$ and $\type (B) = (\vec v ; \vec y)$.} \\
863 868
		\type (A \land B)  & : = & (\vec u , \vec v ; \vec x , \vec y) & \text{if $\type (A) = (\vec u ; \vec x)$ and $\type (B) = (\vec v ; \vec y)$.} \\
864 869
	\type (! A) & : = & (\vec u , \vec x ;) & \text{if $\type (A) = (\vec u ; \vec x)$.} \\
865
	\type (\exists x^N . A) & := & (\vec u ; \vec x , y) & \text{if $\type(A) = (\vec u ; \vec x)$.} \\
870
	\type (\exists x^N . A) & := & \Nat \times \type (A) & \\
866 871
%	\type (\forall x^N . A) & := & \Nat \to \type(A)
867 872
	\end{array}
868 873
	\]
874
	where $\nu$ designates that the inputs are normal.
869 875
	\end{definition}
870 876
	
871 877

  
......
880 886
	\newcommand{\witness}[2]{\mathit{Witness}^{#1}_{#2}}
881 887
	\begin{definition}
882 888
		[Witness predicate]
883
		We define the following `witness' predicate for $\Sigma^\nat_1$-formulae $A$ with free variables amongst $\vec a$:
889
		We define the following formula:
884 890
		\[
885 891
		\begin{array}{rcll}
886
		\witness{\vec a}{A} (w, \vec b) & := & w = t(\vec b) & \text{if $A(\vec a)$ is $\nat (t(\vec a))$.} \\
887
			\witness{\vec a}{A} (w, \vec b) & := & s(\vec b) = t(\vec b) & \text{if $A(\vec a)$ is $s(\vec a) = t (\vec b)$.} \\
888
			\witness{\vec a}{A \lor B} ( \vec w^1 , \vec w^2, \vec b ) & := &  \witness{\vec a}{A} (\vec w^1 , \vec b) \cor \witness{\vec a}{B} (\vec w^2 , \vec b) & 
889
%			\text{for $\star \in \{ \land, \lor, \laand , \laor\}$.} 
890
			\\
891
				\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) & 
892
				%			\text{for $\star \in \{ \land, \lor, \laand , \laor\}$.} 
893
				\\
894
		\witness{\vec a}{\exists x^\nat . A(x)} ( w, \vec w  , \vec b) & := & \witness{\vec{a}, a}{A(a)}(\vec w , \vec b, w ) & \\
892
		\witness{\vec a}{A} (w, \vec a) & := & A(\vec a) & \text{for $A$ quantifier-free.} \\
893
		\witness{\vec a}{\exists x . A} (w, \vec w , \vec a) & := & \witness{\vec{a}, a}{A(a)}(\vec w , \vec a, w ) & \\
894
		\witness{\vec a}{A \star B} ( \vec w^1 , \vec w^2 ) & := &  \witness{\vec a}{A} (\vec w^1) \star \witness{\vec a}{B} (\vec w^2) & \text{for $\star \in \{ \land, \lor, \laand , \laor\}$.} \\
895 895
		\end{array}
896 896
		\]
897
		where $|\vec w^1| = |\type (A)|$ and $|\vec w^2| = |\type (B)| $.
898 897
	\end{definition}
899
%	\todo{problem: what about complexity of checking equality? }
898
	\todo{problem: what about complexity of checking equality? }
900 899
	
901
\todo{Reformulate above later if necessary.}
900
	\todo{What about $\nat (t)$? What does it mean? Replace with true?}
902 901
	
903
%	\todo{What about $\nat (t)$? What does it mean? Replace with true?}
902
	\todo{either use the witness predicate above, or use realizability predicate at meta-level and a model theory, like BH.}
904 903
	
905
%	\todo{either use the witness predicate above, or use realizability predicate at meta-level and a model theory, like BH.}
904
	\anupam{Need to check above properly. $N(t)$ should be witnessed by the value of $t $ in the model. For equality of terms the witness should not do anything.}
906 905
	
907
%	\anupam{Need to check above properly. $N(t)$ should be witnessed by the value of $t $ in the model. For equality of terms the witness should not do anything.}
908
	
909
	\anupam{to consider/remark: formally, is witness predicate checked in model or some logical theory?}
910
	
911 906
	\subsection{The translation}
912 907

  
913 908
\begin{definition}
914 909
	[Translation]
915 910
	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:
916 911
	\[
917
	\witness{\vec a}{\bigotimes \Gamma} (\vec w , \vec b) \implies \witness{\vec a}{\bigparr \Delta } (\vec f(\vec w , \vec b), \vec b)
912
	\witness{\vec a}{\bigotimes \Gamma} (\vec w , \vec a) \implies \witness{\vec a}{\bigparr \Delta } (\vec f(\vec w , \vec a), \vec a)
918 913
	\]
919 914
	
920 915
	\anupam{to consider: do we need parameters $\vec a$ in argument of $f$? Or does $\nat$ predicate take care of this?}
......
925 920
	
926 921
	\anupam{Is this implication provable in Bellantoni's version of PV based on BC?}
927 922
	
928
%	\anupam{for moment try ignore decoration on right? what about negation?}
923
	\anupam{for moment try ignore decoration on right? what about negation?}
929 924
	
930 925

  
931 926
	
......
1017 1012

  
1018 1013
\anupam{commented stuff on additives. To remark later perhaps.}
1019 1014

  
1020

  
1021

  
1022
Suppose $\pi$ ends with a $\rigrul{\exists}$ step,
1023 1015
\[
1024 1016
\vlderivation{
1025
	\vlin{\rigrul{\exists}}{}{ \Gamma, \nat(t) \seqar \Delta , \exists x^\nat . A(x) }{
1026
		\vltr{\pi'}{ \Gamma \seqar \Delta , A(t) }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
1027
	}
1017
\vliin{\cut}{}{\Gamma , \Sigma \seqar \Delta , \Pi}{
1018
\vltr{\pi_1}{ \Gamma \seqar \Delta, A }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
1019
}{
1020
\vltr{\pi_2}{\Sigma , A \seqar \Pi}{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
1028 1021
}
1022
}
1023
	\]
1024
	
1025
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$. 
1026

  
1027
Let us write:
1028
\[
1029
\begin{array}{rcl}
1030
\vec f^1 & = & ( \vec f^1_i )^{|\Delta|+1}_{i=1} \\
1031
\vec f^2 & = & ( \vec f^2_i )^{|\Pi|}_{i=1}
1032
\end{array}
1029 1033
\]
1030
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:
1034
to denote the parts of $\vec f^i$ corresponding to formulae in their sequents.
1035

  
1036

  
1037
We define:
1031 1038
\[
1032
\vec f^\pi (\vec u ; \vec x , y)
1039
\vec f (\vec w , \vec y ; \vec x , \vec z)
1033 1040
\quad := \quad
1034
\left( \vec f^\Delta (\vec u ; \vec x) , \id (;y), \vec{ f}^{A(t)} (\vec u; \vec x)  \right)
1041
(
1042
( \vec f^1_i (\vec w ; \vec x) )_{i \leq |\Delta|}
1043
,
1044
\vec f^2 ( \vec y ; \vec z , \vec f^1_{|\Delta| +1 } (\vec w ; \vec x) )
1045
)
1035 1046
\]
1036
(The identity function on $y$ is defined from successor, predecessor and safe composition).
1037 1047

  
1048
Notice that all safe inputs are hereditarily right of a $;$, and so these terms are definable by safe composition and projection.
1038 1049

  
1039
%Suppose we have functions $\vec f^X (\vec x ; \vec y)$ from $\pi'$ for $X = \Delta$ or $ X=A$. 
1040
%\[
1041
%\vec f(\vec x ; \vec y , z) \quad := \quad ( \vec f^\Delta (\vec x ; \vec y)   ,  z , \vec f^A ( \vec x ; \vec y ) )
1042
%\]
1050
\todo{another case for $!\nat(x)$ cut formula.}
1043 1051

  
1052
\anupam{should work for arbitrary $!$-cuts due to principal case for $!$}
1044 1053

  
1045
Suppose $\pi$ ends with a $\lefrul{\exists}$ step:
1054

  
1055
Right existential:
1046 1056
\[
1047 1057
\vlderivation{
1048
	\vlin{\lefrul{\exists}}{}{ \Gamma, \exists x^N . A(x) \seqar \Delta }{
1049
		\vltr{\pi'(a)}{ \Gamma , A(a),  N(a) \seqar \Delta  }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
1050
	}
1058
\vlin{\rigrul{\exists}}{}{ \Gamma, \nat(t) \seqar \Delta , \exists x^\nat . A(x) }{
1059
\vltr{\pi'}{ \Gamma \seqar \Delta , A(t) }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
1051 1060
}
1061
}
1052 1062
\]
1053
%
1054
%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:
1055
%\[
1056
%\vec f ( \vec u , \vec v ;  )
1057
%\]
1063
Suppose we have functions $\vec f^X (\vec x ; \vec y)$ from $\pi'$ for $X = \Delta$ or $ X=A$. 
1064
\[
1065
\vec f(\vec x ; \vec y , z) \quad := \quad ( \vec f^\Delta (\vec x ; \vec y)   ,  z , \vec f^A ( \vec x ; \vec y ) )
1066
\]
1058 1067

  
1059
\anupam{should just be same? Consider variable naming, just in case.}
1060
\anupam{This is probably where the consideration for free variables is.}
1061 1068

  
1062
%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:
1063
%\[
1064
%\vec f ( \vec v , \vec w ; \vec x , y , \vec z )
1065
%\]
1066

  
1067

  
1068
Suppose $\pi$ ends with a $\cut$ step:
1069
Left existential:
1069 1070
\[
1070 1071
\vlderivation{
1071
\vliin{\cut}{}{\Gamma , \Sigma \seqar \Delta , \Pi}{
1072
\vltr{\pi_1}{ \Gamma \seqar \Delta, A }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
1073
}{
1074
\vltr{\pi_2}{\Sigma , A \seqar \Pi}{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
1072
\vlin{\lefrul{\exists}}{}{ \Gamma, \exists x^N . A(x) \seqar \Delta }{
1073
\vltr{\pi'(a)}{ \Gamma,  N(a) , A(a) \seqar \Delta  }{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
1075 1074
}
1076 1075
}
1077
	\]
1078
	
1079
We have two cases. First, if $A$ is free of modalities, then $\type (A)$ consists of only safe inputs. Therefore we have functions $\vec g (\vec u; \vec x)$ and $\vec h (\vec v ; \vec y, \vec z)$ from $\pi_1$ and $\pi_2 $ respectively, such that $\type(\Gamma) = (\vec u ; \vec x)$, $\type(\Sigma) = (\vec v ; \vec y )$ and $\type (A) = (;\vec z)$. Let us write $\vec g = (\vec g^\Delta , \vec g^A)$ as before, and we define $\vec f^\pi$ as follows:
1076
\]
1080 1077

  
1078
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:
1081 1079
\[
1082
\vec f^\pi ( \vec u , \vec v ; \vec x, \vec y)
1083
\quad := \quad
1084
\left(
1085
\vec g^\Delta (\vec u ; \vec x) 
1086
,
1087
\vec h ( \vec v ; \vec y , \vec g^A ( \vec u ; \vec x ) )
1088
\right)
1080
\vec f ( \vec u , \vec v ;  )
1089 1081
\]
1090
(Notice that all safe inputs are hereditarily safe in these expressions, so they are definable by safe composition and projection).
1091 1082

  
1083
\anupam{should just be same, no? To consider.}
1092 1084

  
1085
%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:
1086
%\[
1087
%\vec f ( \vec v , \vec w ; \vec x , y , \vec z )
1088
%\]
1093 1089

  
1090
\todo{finish}
1094 1091

  
1095
In the other case, where $A$ may be modal, it must be of the form $!\nat (t)$ 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 conclusion of an induction step, whence such a formula has the form $!\nat (t)$. By free-cut elimination we can also assume that this cut formula is principal on \emph{both} sides, i.e.\ $\pi$ is of the form:
1096

  
1097
\todo{finish this case}
1098

  
1099

  
1100

  
1101
Suppose $\pi$ ends with a $\lefrul{!}$ step:
1092
!:
1102 1093
\[
1103 1094
\vlderivation{
1104 1095
\vlin{!}{}{\Gamma, !A \seqar \Delta}{
......
1106 1097
}
1107 1098
}
1108 1099
\]
1109
\todo{finish this case, just passing a safe input to a normal input.}
1100
\anupam{Again, use free-cut elimination to get rid of this case. We know $!$-ed formulae in advance, so just fix those as normal inputs in advance.}
1110 1101

  
1111 1102

  
1112
Suppose $\pi$ ends with a $\rigrul{!}$ step:
1113

  
1114
\todo{finish this case, should not change function at all, but maybe there is a consideration.}
1115

  
1116
Suppose $\pi$ ends with a $\lefrul{\wk}$ step:
1117

  
1118
\todo{finish this case, just add a dummy input.}
1119

  
1120
Suppose $\pi$ ends with a $\rigrul{\wk}$ step:
1121

  
1122
\todo{finish this case, just add a dummy function.}
1123

  
1124

  
1125

  
1126
Suppose $\pi$ ends with a $\pind$ step. For the same reason as $\rigrul{\cntr}$ we can assume there are no $?$ formulae and so no side formulae on the right. Thus a $\pi$ has the following form:
1103
Induction: (can assume no side-formulae on right for same reason as no contraction.)
1127 1104
\[
1128 1105
\vlderivation{
1129 1106
\vliin{\ind}{}{ !\Gamma , !\nat (t) ,  A(\epsilon) \seqar A(t) }{
......
1134 1111
}
1135 1112
\]
1136 1113

  
1137
By the inductive hypothesis we have functions:
1138

  
1139 1114
Suppose we have functions $\vec f^i (\vec x , y ; \vec u)$ from proofs $\pi_i$ where $\vec x $ corresponds to $!\Gamma$, $y$ corresponds to $!N(a)$ and $\vec u$ corresponds to $A(a)$.
1140 1115

  
1141 1116

  

Formats disponibles : Unified diff