Révision 23 CSL16/feas-arith-wfm.tex

feas-arith-wfm.tex (revision 23)
684 684
\subsection{Bellantoni-Cook programs}
685 685
We first recall the notion of safe recursion on notation from BC. TODO
686 686

  
687
\anupam{Do we need simultaneous PRN? cf.\ Bellantoni's thesis.}
688

  
689
\todo{reformulate below for binary words, not natural numbers?}
690

  
691
\begin{definition}
692
	[BC functions]
693
	BC is the set of functions generated by the following initial functions and closure schemes.
694
	
695
%	\paragraph{Initial functions}
696
	There are the following initial functions:
697
	\begin{enumerate}
698
		\item The constant function $0$ which takes no arguments and outputs $0 \in \Nat$.
699
		\item The projection functions $\pi^{m,n}_k ( x_1 , \dots , x_m ; x_{m+1} , \dots, x_{m+n} )  := x_k$ for $n,m \in \Nat$ and $1 \leq k \leq m+n$.
700
		\item The successor functions $\succ_i ( ; x) := xi$ for $i = 0,1$.
701
		\item The predecessor function $\pred (; x) := \begin{cases}
702
		0 & x = 0 \\
703
		x' & x = x'i
704
		\end{cases}$.
705
		\item The conditional function $\cond (;x,y,z) := \begin{cases}
706
		y & x \mod{2} = 0 \\
707
		z & \text{otherwise}
708
		\end{cases}$.
709
	\end{enumerate}
710
	
711
	There are the following closure properties.
712
	\begin{enumerate}
713
	\setcounter{enumi}{5}
714
	\item Predicative recursion on notation. If $g, h_0, h_1 $ are in BC then so is the function $f$ defined by,
715
	\[
716
	\begin{array}{rcl}
717
	f(0, \vec v ; \vec x) & := & g(\vec v ; \vec x) \\
718
	f (\succ_i u , \vec v ; \vec x ) & := & h_i ( u , \vec v ; \vec x , f (u , \vec v ; \vec x) )
719
	\end{array}
720
	\]
721
	for $i = 0,1$, so long as the expressions are well-formed (i.e.\ in number/sort of arguments).
722
	\item Safe composition. If $g, \vec h, \vec h'$ are in BC then so is $f$ defined by,
723
	\[
724
	f (\vec u ; \vec x) \quad := \quad g ( \vec h(\vec u ; ) ; \vec h' (\vec u ; \vec x) )
725
	\]
726
	so long as the expression is well-formed.
727
	\end{enumerate}
728
	\end{definition}
729

  
730

  
731

  
687 732
\subsection{Convergence in arithmetic}
688 733
\begin{theorem}
689 734
	[Convergence]
......
804 849
	\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.}
805 850
	
806 851
	\subsection{The translation}
807
	Need witness predicate so that we know what is being preserved.
808 852

  
809 853
\begin{definition}
810 854
	[Translation]
811
	We give a translation of proofs $\pi$ of sequents $\Gamma(\vec a) \seqar \Delta(\vec a)$ to BC-programs for a vector of functions $\vec f^\pi : \type(\bigotimes\Gamma) \times \Nat^{|\vec a|} \to \type(\bigparr\Delta)$ such that:
855
	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:
812 856
	\[
813 857
	\witness{\vec a}{\bigotimes \Gamma} (\vec w , \vec a) \implies \witness{\vec a}{\bigparr \Delta } (\vec f(\vec w , \vec a), \vec a)
814 858
	\]
815
	We will be explicit about normal and safe inputs when necessary, for the most part we will simply rearrange inputs into lists $(\vec x; \vec a)$ as in BC framework.
816 859
	
860
	\anupam{to consider: do we need parameters $\vec a$ in argument of $f$? Or does $\nat$ predicate take care of this?}
861
	
862
%	We will be explicit about normal and safe inputs when necessary, for the most part we will simply rearrange inputs into lists $(\vec u; \vec a)$ as in BC framework.
863
	
817 864
	We often suppress the parameters $\vec a$ when it is not important.	
818 865
	
819 866
	\anupam{Is this implication provable in Bellantoni's version of PV based on BC?}
......
822 869
	
823 870

  
824 871
	
872
	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.
873
	
874
	Suppose $\pi$ ends with a $\rigrul{\land}$ step:
825 875
	\[
826 876
	\vlderivation{
827 877
		\vliin{\land}{}{ \Gamma, \Sigma \seqar \Delta, \Pi, A\land B }{
......
831 881
			}
832 882
		}
833 883
	\]
834
	
835
	So we have $\vec f^{1} (\vec x ; \vec a)$ and $\vec f^2 (\vec y ; \vec b)$ for $\pi_1 $ and $\pi_2$ respectively, by the inductive hypothesis. We simply construct $\vec f^\pi$ by rearranging these functions:
884
	By the inductive hypothesis let us suppose we have functions $\vec g (\vec u; \vec x)$ and $\vec h (\vec v ; \vec y)$ from $\pi_1$ and $\pi_2$ respectively, where $\type\left( \bigotimes\Gamma \right) = (\vec u; \vec x)$ and $\type \left( \bigotimes \Sigma \right) = (\vec v ; \vec y)$. Let us write $\vec g = (\vec g^\Delta , \vec g^A)$ and $\vec h = (\vec h^\Pi , \vec h^B)$, to denote the $\Delta$ and $A$ parts of $\vec g$ and the $\Pi$ and $B$ parts of $\vec h$.
885
%	So we have $\vec f^{1} (\vec x ; \vec a)$ and $\vec f^2 (\vec y ; \vec b)$ for $\pi_1 $ and $\pi_2$ respectively, by the inductive hypothesis. 
886
	We simply construct $\vec f^\pi$ by rearranging these tuples of functions:
836 887
	\[
837
	\vec f^\pi (\vec x , \vec y ; \vec a , \vec b) \quad := \quad ( f^1_1 (\vec x ; \vec a) , \dots , f^1_{|\Delta|} (\vec x ; \vec a) , f^2_1 (\vec y; \vec b) , \dots , f^2_{|\Pi|} (\vec y ; \vec b) , f^1_{|\Delta|+1} (\vec x ; \vec a ) , f^2_{|\Pi|+1} (\vec y ; \vec b)
888
	\vec f^\pi (\vec u , \vec v ; \vec x , \vec y)
889
	\quad := \quad
890
	\left(
891
	\vec g^\Delta (\vec u ; \vec x) , \vec h^\Pi (\vec v ; \vec y)  , \vec g^A (\vec u ; \vec x) , \vec h^B (\vec v ; \vec y)
892
	\right)
838 893
	\] 
839 894
	
840
	\anupam{bad notation since need to include free variables of sequent too. (also of theory.) Reconsider.}
895
	We will continue with a similar notational convention as above in the remainder of this argument.
841 896
	
897
%	\anupam{bad notation since need to include free variables of sequent too. (also of theory.) Reconsider.}
898
	
899
	The case when $\pi$ ends with a $\lefrul{\lor}$ step is analogous to the $\rigrul{\land}$ case above.
900
	
901
	If $\pi$ consists of a subproof $\pi'$ ending with a $\lefrul{\land}$ or $\rigrul{\lor}$-step, then $\vec f^\pi$ is exactly $\vec f^{\pi'}$.
902
	
903
	Suppose $\pi$ ends with a $\lefrul{\cntr}$ step,
842 904
	\[
843 905
	\vlderivation{
844 906
		\vlin{\lefrul{\cntr}}{}{ !A , \Gamma \seqar \Delta }{
......
846 908
			}
847 909
		}
848 910
	\]
849
	Have $\vec f' (x_1 , x_2 , \vec y ; \vec a)$ for $\pi'$. Define
911
	so we have functions $\vec f ( \vec u^1, \vec u^2 , \vec v ; \vec x)$ with $\vec u^1$ and $\vec u^2$ corresponding to the two copies of $!A$ in the conclusion of $\pi'$, respectively, and $\type (\Gamma) = (\vec v; \vec x)$. (Recall that the typing corresponding to $!$ means that all inputs for each $!A$ are normal). We define $\vec f^\pi$ as expected, duplicating the arguments for $!A$:
850 912
	\[
851
	\vec f (x_1 , \vec y ; \vec a) \quad := \quad \vec f'(x_1 , x_1 , \vec y ; \vec a)
913
	\vec f^\pi (\vec u , \vec v ; \vec x)
914
	\quad := \quad
915
	\vec f (\vec u, \vec u , \vec v ; \vec x)
852 916
	\]
853
	\[
854
	\vlderivation{
855
	\vlin{\rigrul{\cntr}}{}{\Gamma \seqar \Delta, ?A}{
856
	\vltr{\pi'}{  \Gamma \seqar \Delta, ?A, ?A}{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
857
	}
858
	}
859
	\]
860
	(need test function against witness predicate?)
917
	(Notice that this is obtainable in BC by a trivial instance of safe composition.)
861 918
	
862
	\anupam{problem: how to test even equality of two terms? Maybe treat $?$ as $!$ on left?}
863 919
	
864
	\anupam{Not a problem by free-cut elimination! Can assume there are no $?$ in the proof! Is this equivalent to treaing $?$ as $!$ on left?}
920
%	cntr right
921
%	\[
922
%	\vlderivation{
923
%	\vlin{\rigrul{\cntr}}{}{\Gamma \seqar \Delta, ?A}{
924
%	\vltr{\pi'}{  \Gamma \seqar \Delta, ?A, ?A}{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
925
%	}
926
%	}
927
%	\]
928
%	(need test function against witness predicate?)
929
%	
930
%	\anupam{problem: how to test even equality of two terms? Maybe treat $?$ as $!$ on left?}
931
%	
932
%	\anupam{Not a problem by free-cut elimination! Can assume there are no $?$ in the proof! Is this equivalent to treaing $?$ as $!$ on left?}
933
%	
934
%	\anupam{Yes I think so. We can work in a left-sided calculus. only problem is for induction. But this can never be a problem for modalities since induction formulae are modality-free.}
935
%	
936
%	\anupam{this is actually the main point.}
937

  
938
For $\rigrul{\cntr}$, notice that no $?$-symbol occurs in a convergence statement, an initial step or an induction formula, so a free-cut free proof is free of $\rigrul{\cntr}$-steps.
939

  
940
\anupam{This is important, so expand on this here or in a remark before/after.}
865 941
	
866
	\anupam{Yes I think so. We can work in a left-sided calculus. only problem is for induction. But this can never be a problem for modalities since induction formulae are modality-free.}
867 942
	
868
	\anupam{this is actually the main point.}
869
	
870
	
871
	\[
872
	\vlderivation{
873
	\vliin{\rigrul{\laand}}{}{\Gamma \seqar \Delta, A \laand B}{
874
	\vltr{\pi_1}{  \Gamma \seqar \Delta, A}{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
875
	}{
876
	\vltr{\pi_2}{  \Gamma \seqar \Delta, B}{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
877
	}
878
	}
879
	\]
880
	
881
	Suppose we have $\vec f^i (\vec x , \vec a ; \vec y , \vec b)$ from $\pi_i$.
882
	
883
	\anupam{problem: does this require many tests, just like for contraction? Can we isolate a different complexity class? e.g.\ PH or Grzegorzyck?}
884
	\anupam{skip this case and consider later.}
943
%	\[
944
%	\vlderivation{
945
%	\vliin{\rigrul{\laand}}{}{\Gamma \seqar \Delta, A \laand B}{
946
%	\vltr{\pi_1}{  \Gamma \seqar \Delta, A}{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
947
%	}{
948
%	\vltr{\pi_2}{  \Gamma \seqar \Delta, B}{\vlhy{\quad }}{\vlhy{ }}{\vlhy{\quad }}
949
%	}
950
%	}
951
%	\]
952
%	
953
%	Suppose we have $\vec f^i (\vec x , \vec a ; \vec y , \vec b)$ from $\pi_i$.
954
%	
955
%	\anupam{problem: does this require many tests, just like for contraction? Can we isolate a different complexity class? e.g.\ PH or Grzegorzyck?}
956
%	\anupam{skip this case and consider later.}
957

  
958
\anupam{commented stuff on additives. To remark later perhaps.}
959

  
885 960
\[
886 961
\vlderivation{
887 962
\vliin{\cut}{}{\Gamma , \Sigma \seqar \Delta , \Pi}{

Formats disponibles : Unified diff