Révision 20
| CSL16/feas-arith-wfm.tex (revision 20) | ||
|---|---|---|
| 54 | 54 |
|
| 55 | 55 |
|
| 56 | 56 |
%terms |
| 57 |
\newcommand{\cond}{C}
|
|
| 58 |
\newcommand{\pred}{p}
|
|
| 59 | 57 |
\renewcommand{\succ}{s}
|
| 60 | 58 |
\renewcommand{\epsilon}{\varepsilon}
|
| 61 | 59 |
|
| ... | ... | |
| 305 | 303 |
\patrick{Anupam: note that I had to strengthen the conditions for the rules (R). Condition (1) is needed
|
| 306 | 304 |
to be able to commute a cut with (R), in the case where this cut is with a principal formula of a ($\rigrul{!}$) rule.
|
| 307 | 305 |
|
| 308 |
Condition (2) is a sufficient condition to avoid the following situation: cut between an active formula in say $\Delta'$ in the conclusion of an (R) rule (left premise), and a context formula in $!\Gamma$ in the conclusion of another (R) rule (right premise). Indeed this is not an anchored cut in our sense, but we cannot eliminate it in general (because we cannot commute the cut with (R) up the right premise).
|
|
| 306 |
Condition (2) is a sufficient condition to avoid the following situation: cut between a principal formula in say $\Delta'$ in the conclusion of an (R) rule (left premise), and a context formula in $!\Gamma$ in the conclusion of another (R) rule (right premise). Indeed this is not an anchored cut in our sense, but we cannot eliminate it in general (because we cannot commute the cut with (R) up the right premise).
|
|
| 309 | 307 |
} |
| 310 | 308 |
|
| 311 | 309 |
% \textit{for any $i\in I$, formulas in $\Sigma_i, \Delta_i$ do not share any free variable with $\Gamma, \Pi$.}
|
| ... | ... | |
| 330 | 328 |
A proof in such a system will be called a \textit{ $\mathcal T$-proof}, or just \textit{proof} when there is no risk of confusion.
|
| 331 | 329 |
The rules of Def. \ref{def:LLsequentcalculus} are called \textit{logical rules} while the rules (ax) and (R) of $\mathcal T$ are called \textit{non-logical}.
|
| 332 | 330 |
|
| 333 |
As usual rules come with a notion of \textit{active formulas}, which are a subset of the rules in the conclusion, e.g.:
|
|
| 331 |
As usual rules come with a notion of \textit{principal formulas}, which are a subset of the rules in the conclusion, e.g.:
|
|
| 334 | 332 |
$A \lor B$ in rule $\lefrul{\lor}$ (and similarly for all rules for connectives); $?A$ in rule $\rigrul{\cntr}$; all conclusion formulas in axiom rules;
|
| 335 | 333 |
$\Sigma', \Delta'$ in rule (R). |
| 336 | 334 |
|
| ... | ... | |
| 339 | 337 |
% \begin{definition}\label{def:anchoredcut}
|
| 340 | 338 |
% An instance of cut rule in a $\mathcal T$-proof is an \textit{anchored cut} if its cut-formulas $A$ in the two premises are both principal for their rule, and at least one of these rules is non-logical.
|
| 341 | 339 |
% \end{definition}
|
| 342 |
Our first idea would be to consider as anchored a cut whose cut-formulas $A$ in the two premises are both principal for their rule, and at least one of these rules is non-logical. Now, the problem with this tentative definition is that a rule (R) of $\mathcal T$ can contain several active formulas (in $\Sigma'$, $\Delta'$) and so we would like to allow an anchored cut on each of these active formulas. See as example Fig. \ref{Fig:twosuccessiveanchorcuts}. Therefore we consider a more general definition:
|
|
| 340 |
Our first idea would be to consider as anchored a cut whose cut-formulas $A$ in the two premises are both principal for their rule, and at least one of these rules is non-logical. Now, the problem with this tentative definition is that a rule (R) of $\mathcal T$ can contain several principal formulas (in $\Sigma'$, $\Delta'$) and so we would like to allow an anchored cut on each of these principal formulas. See as example Fig. \ref{Fig:twosuccessiveanchorcuts}. Therefore we consider a more general definition:
|
|
| 343 | 341 |
% \begin{figure}
|
| 344 | 342 |
% \[ |
| 345 | 343 |
% \vlderivation{
|
| ... | ... | |
| 360 | 358 |
\begin{definition}\label{def:anchoredcut}
|
| 361 | 359 |
We define in a mutual inductive way the notion of \textit{hereditarily principal formula} and \textit{anchored cut} in a $\mathcal T$-proof :
|
| 362 | 360 |
\begin{itemize}
|
| 363 |
\item A formula $A$ in a sequent $\Gamma \seqar \Delta$ is \textit{hereditarily principal} for a rule (S), if either the sequent is conclusion of the rule (S) and $A$ is active in it, or
|
|
| 361 |
\item A formula $A$ in a sequent $\Gamma \seqar \Delta$ is \textit{hereditarily principal} for a rule (S), if either the sequent is conclusion of the rule (S) and $A$ is principal in it, or
|
|
| 364 | 362 |
the sequent is conclusion of an anchored cut, and the direct ancestor of $A$ in one of the two premises is hereditarily principal for the rule (S). |
| 365 | 363 |
\item An instance of cut rule is an \textit{anchored cut} if its cut-formulas $A$ in the two premises are both hereditarily principal for a rule, and at least one of these rules is non-logical.
|
| 366 | 364 |
\end{itemize}
|
| 367 | 365 |
\end{definition}
|
| 368 |
So for instance a cut on an (active) formula $A \lor B$ between a rule $\rigrul{\lor}$ and a rule (R) (where $A \lor B$ occurs in $\Sigma'$) is anchored, while a cut between
|
|
| 366 |
So for instance a cut on a (principal) formula $A \lor B$ between a rule $\rigrul{\lor}$ and a rule (R) (where $A \lor B$ occurs in $\Sigma'$) is anchored, while a cut between
|
|
| 369 | 367 |
a rule $\rigrul{\lor}$ and a rule $\lefrul{\lor}$ is not.
|
| 370 | 368 |
|
| 371 | 369 |
Now we can state the main result of this section: |
| ... | ... | |
| 412 | 410 |
\begin{itemize}
|
| 413 | 411 |
\item Consider first the situation where $(S_1)$ is not one of the rules $(\rigrul{!})$, $(\lefrul{?})$, $(R)$.
|
| 414 | 412 |
|
| 415 |
In this case the commutation of $c$ with $(S_1)$ can be done in the usual way. Let us handle as an example the case where $(S_1)=\rigrul{\laand}$.
|
|
| 413 |
In this case the commutation of $c$ with $(S_1)$ can be done in the usual way. Let us handle as an example the case where $(S_1)=(\rigrul{\laand})$.
|
|
| 416 | 414 |
Observe that here $c$ is replaced by two cuts $c_1$ and $c_2$. Call $\pi_i$ the sub-derivation of last rule $c_i$, for $i=1,2$. As for $i=1, 2$ we have |
| 417 | 415 |
$\deg{\pi_i}\leq \deg{\pi}$ and $\height{\pi_i}< \height{\pi}$ we can apply the induction hypothesis, and reduce $\pi_i$ to a proof $\pi'_i$ of same conclusion and with
|
| 418 | 416 |
$\deg{\pi'_i}\leq \deg{\pi_i}$. Therefore $\pi'_i$ has non-anchored cuts of degree strictly lower than $\deg(c)$, and thus by replacing $\pi_i$ by $\pi'_i$ for $i=1, 2$ we obtain a proof $\pi'$ such that $\deg{\pi'}<\deg{\pi}$.
|
| ... | ... | |
| 636 | 634 |
\subsection{$\nat$-hierarchy}
|
| 637 | 635 |
|
| 638 | 636 |
\begin{definition}
|
| 639 |
Let us define the quantifiers $\exists x^\nat . A$ and $\forall x^\nat . A$ as $\exists x . (\nat(x) \land A)$ and $\forall x . (\nat (x) \limp A) $ respectively. |
|
| 637 |
|
|
| 638 |
\todo{replace N with nat.}
|
|
| 639 |
|
|
| 640 |
Let us define the quantifiers $\exists x^N . A$ and $\forall x^N . A$ as $\exists x . (N(x) \land A)$ and $\forall x . (N(x) \limp A) $ respectively. |
|
| 640 | 641 |
|
| 641 |
We define $\Sigma^N_0 = \Pi^N_0 $ as the class of formulae that are free of quantifiers. For $i> 0$ we define $\Sigma^\nat_i$ and $\Pi^\nat_i$ as follows:
|
|
| 642 |
We define $\Sigma^N_0 = \Pi^N_0 $ as the class of formulae that are free of quantifiers. For $i\geq 0$ we define:
|
|
| 642 | 643 |
\begin{itemize}
|
| 643 |
\item If $A \in \Sigma^\nat_{i-1} \cup \Pi^\nat_{i-1}$ then $A \in \Sigma^\nat_i$ and $A \in \Pi^\nat_i$.
|
|
| 644 |
\item If $A \in \Sigma^\nat_i$ then $\exists x^\nat . A \in \Sigma^\nat_i$. |
|
| 645 |
\item If $A \in \Pi^\nat_i$ then $\forall x^\nat . A \in \Pi^\nat_i$. |
|
| 646 |
\item If $A,B \in \Sigma^\nat_i$ then $A \lor B$ and $A\land B \in \Sigma^\nat_i$. |
|
| 647 |
\item If $A,B \in \Pi^\nat_i$ then $A \lor B$ and $A\land B \in \Pi^\nat_i$. |
|
| 644 |
\item $\Sigma^N_{i+1}$ is the class of formulae $\exists x^N . A$ where $A \in \Pi^N_i$.
|
|
| 645 |
\item $\Pi^N_{i+1}$ is the class of formulae $\forall x^N . A$ where $A \in \Sigma^N_i$.
|
|
| 646 |
\item ($\Delta^N_i$ is the class $\Sigma^N_i \cap \Pi^N_i$.) |
|
| 648 | 647 |
\end{itemize}
|
| 649 | 648 |
\end{definition}
|
| 650 | 649 |
|
| 650 |
\todo{allow closure under positive Boolean operations?}
|
|
| 651 | 651 |
|
| 652 | 652 |
\todo{What about prenexing rules? Should not change provably total functions!}
|
| 653 | 653 |
|
| ... | ... | |
| 668 | 668 |
\end{array}
|
| 669 | 669 |
\] |
| 670 | 670 |
|
| 671 |
CHECK THESE! |
|
| 671 | 672 |
|
| 673 |
\todo{Also include rules for contraction and weakening.}
|
|
| 674 |
|
|
| 672 | 675 |
\section{Convergence of Bellantoni-Cook programs}
|
| 673 | 676 |
|
| 674 | 677 |
\subsection{Bellantoni-Cook programs}
|
| 675 |
We first recall the notion of safe recursion on notation from BC. |
|
| 678 |
We first recall the notion of safe recursion on notation from BC. TODO
|
|
| 676 | 679 |
|
| 677 |
\todo{reformulate below for binary words, not natural numbers?}
|
|
| 678 |
|
|
| 679 |
\begin{definition}
|
|
| 680 |
[BC functions] |
|
| 681 |
BC is the set of functions generated by the following initial functions and closure schemes. |
|
| 682 |
|
|
| 683 |
% \paragraph{Initial functions}
|
|
| 684 |
There are the following initial functions: |
|
| 685 |
\begin{enumerate}
|
|
| 686 |
\item The constant function $0$ which takes no arguments and outputs $0 \in \Nat$. |
|
| 687 |
\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$.
|
|
| 688 |
\item The successor functions $\succ_i ( ; x) := xi$ for $i = 0,1$. |
|
| 689 |
\item The predecessor function $\pred (; x) := \begin{cases}
|
|
| 690 |
0 & x = 0 \\ |
|
| 691 |
x' & x = x'i |
|
| 692 |
\end{cases}$.
|
|
| 693 |
\item The conditional function $\cond (;x,y,z) := \begin{cases}
|
|
| 694 |
y & x \mod{2} = 0 \\
|
|
| 695 |
z & \text{otherwise}
|
|
| 696 |
\end{cases}$.
|
|
| 697 |
\end{enumerate}
|
|
| 698 |
|
|
| 699 |
There are the following closure properties. |
|
| 700 |
\begin{enumerate}
|
|
| 701 |
\setcounter{enumi}{5}
|
|
| 702 |
\item Predicative recursion on notation. If $g, h_0, h_1 $ are in BC then so is the function $f$ defined by, |
|
| 703 |
\[ |
|
| 704 |
\begin{array}{rcl}
|
|
| 705 |
f(0, \vec v ; \vec x) & := & g(\vec v ; \vec x) \\ |
|
| 706 |
f (\succ_i u , \vec v ; \vec x ) & := & h_i ( u , \vec v ; \vec x , f (u , \vec v ; \vec x) ) |
|
| 707 |
\end{array}
|
|
| 708 |
\] |
|
| 709 |
for $i = 0,1$, so long as the expressions are well-formed (i.e.\ in number/sort of arguments). |
|
| 710 |
\item Safe composition. If $g, \vec h, \vec h'$ are in BC then so is $f$ defined by, |
|
| 711 |
\[ |
|
| 712 |
f (\vec u ; \vec x) \quad := \quad g ( \vec h(\vec u ; ) ; \vec h' (\vec u ; \vec x) ) |
|
| 713 |
\] |
|
| 714 |
so long as the expression is well-formed. |
|
| 715 |
\end{enumerate}
|
|
| 716 |
\end{definition}
|
|
| 717 |
|
|
| 718 |
|
|
| 719 |
|
|
| 720 | 680 |
\subsection{Convergence in arithmetic}
|
| 721 | 681 |
\begin{theorem}
|
| 722 | 682 |
[Convergence] |
| 723 |
If $\Phi(f)$ is an equational specification corresponding to a BC-program defining $f$, then $\cax{\Sigma^N_1}{\pind} \proves \ !\Phi(f) \limp \forall \vec{x}^{!N} . N(f(\vec x))$.
|
|
| 683 |
If $\Phi(f)$ is an equational specification corresponding to a BC-program defining $f()$, then $\cax{\Sigma^N_1}{\pind} \proves \ !\Phi(f) \limp \forall \vec{x}^{!N} . N(f(\vec x))$.
|
|
| 724 | 684 |
\end{theorem}
|
| 725 | 685 |
\begin{proof}
|
| 726 | 686 |
We show by induction on the structure of a BC-program for $f(\vec x ; \vec y)$ that: |
| ... | ... | |
| 789 | 749 |
|
| 790 | 750 |
\todo{say some more here}
|
| 791 | 751 |
|
| 792 |
\todo{compare with applicative theories}
|
|
| 793 |
|
|
| 794 |
\anupam{in particular, need to point out that this argument is actually something in between, since usually the WFM requires programs to be defined by formulae, not equational specifications.}
|
|
| 795 |
|
|
| 796 | 752 |
\newcommand{\type}{\mathtt{t}}
|
| 797 | 753 |
\newcommand{\norm}{\nu}
|
| 798 | 754 |
\newcommand{\safe}{\sigma}
|
| 799 | 755 |
|
| 800 |
\subsection{Witness/realisability predicate}
|
|
| 756 |
\subsection{Typing}
|
|
| 801 | 757 |
|
| 802 | 758 |
\begin{definition}
|
| 803 |
[Typing]
|
|
| 804 |
To each $\Sigma^\nat_1$-formula $A$ we associate a sorted tuple of variables $\type (A)$, intended to range over $\Nat$, as follows:
|
|
| 759 |
[Types]
|
|
| 760 |
To each formula we associate a tuple type as follows:
|
|
| 805 | 761 |
\[ |
| 806 | 762 |
\begin{array}{rcll}
|
| 807 |
\type (\nat (t)) & := & (;x^{\nat (t)} ) & \\
|
|
| 808 |
\type(s = t) & := & ( ; x^{s = t}) & \\
|
|
| 809 |
\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)$.} \\
|
|
| 810 |
\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)$.} \\
|
|
| 811 |
\type (! A) & : = & ( \vec u ,\vec x ; ) & \text{if $\type(A) = (\vec u ; \vec x )$.} \\
|
|
| 812 |
\type (\exists x^\nat . A) & := & (\vec u ; \vec x , y) & \text{if $\type (A) = (\vec u ; \vec x)$.}
|
|
| 763 |
\type (\nat (t)) & := & \Nat & \\ |
|
| 764 |
\type(s = t) & := & \Nat & \\ |
|
| 765 |
\type (A \star B) & : = & \type (A) \times \type (B) & \text{for $\star \in \{ \lor, \land, \laor, \laand \} $.} \\
|
|
| 766 |
\type (! A) & : = & \type_\norm (A) & \\ |
|
| 767 |
\type (\exists x^N . A) & := & \Nat \times \type (A) & \\ |
|
| 813 | 768 |
% \type (\forall x^N . A) & := & \Nat \to \type(A) |
| 814 | 769 |
\end{array}
|
| 815 | 770 |
\] |
| 816 |
% where $\nu$ designates that the inputs are normal.
|
|
| 771 |
where $\nu$ designates that the inputs are normal. |
|
| 817 | 772 |
\end{definition}
|
| 818 | 773 |
|
| 774 |
\todo{compatibility with safety. To consider.}
|
|
| 819 | 775 |
|
| 820 |
\anupam{need to account for normality and safety somewhere. Attempting inlined and leaving types without this decoration.}
|
|
| 821 | 776 |
|
| 822 |
\begin{remark}
|
|
| 823 |
[Distribution of $!$] |
|
| 824 |
There is a potential issue that the $!$ contains $\lor$ symbols in its scope, whence we do not in general have $!(A \lor B) \cong !A \lor !B$. However this will not be a problem here by inspection of a convergence statement: there are no $\lor$ symbols in the scope of a $!$. Therefore, after free-cut elimination, no formula in the proof will have this property either. |
|
| 825 |
|
|
| 826 |
On the other hand, since we are working in affine logic, we do in general have $!(A \land B) \cong !A \land !B$. |
|
| 827 |
\end{remark}
|
|
| 828 | 777 |
|
| 829 | 778 |
|
| 830 | 779 |
\newcommand{\witness}[2]{\mathit{Witness}^{#1}_{#2}}
|
| 831 | 780 |
\begin{definition}
|
| 832 | 781 |
[Witness predicate] |
| 833 |
We define the predicate $\witness{\vec a}{A} (\vec x , \vec b)$ for a $\Sigma^\nat_1$-formula $A(\vec a)$, such that $|\vec b| = |\vec a |$ and $|\vec x | = |\type (A)|$, as follows:
|
|
| 782 |
We define the following formula:
|
|
| 834 | 783 |
\[ |
| 835 | 784 |
\begin{array}{rcll}
|
| 836 |
\witness{\vec a}{A} (x, \vec b) & := & A(\vec b) & \text{$A(\vec a)$ is $s(\vec a) = t(\vec a)$.} \\
|
|
| 837 |
\witness{\vec a}{A} (x, \vec b) & := & x = t(\vec b) & \text{$A(\vec{a})$ is $\nat(t(\vec a))$.} \\
|
|
| 838 |
\witness{\vec a}{A \land B} ( \vec x^1 , \vec x^2 , \vec b ) & := & \witness{\vec a}{A} (\vec x^1 , \vec b) \cand \witness{\vec a}{B} (\vec x^2 , \vec b) & \\
|
|
| 839 |
\witness{\vec a}{A \lor B} ( \vec x^1 , \vec x^2 , \vec b ) & := & \witness{\vec a}{A} (\vec x^1 , \vec b) \cor \witness{\vec a}{B} (\vec x^2 , \vec b) & \\
|
|
| 840 |
\witness{\vec a}{\exists x^\nat . A} (x, \vec x , \vec b) & := & \witness{\vec{a}, a}{A(a)}(\vec x, \vec b, x ) & \\
|
|
| 785 |
\witness{\vec a}{A} (w, \vec a) & := & A(\vec a) & \text{for $A$ quantifier-free.} \\
|
|
| 786 |
\witness{\vec a}{\exists x . A} (w, \vec w , \vec a) & := & \witness{\vec{a}, a}{A(a)}(\vec w , \vec a, w ) & \\
|
|
| 787 |
\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\}$.} \\
|
|
| 841 | 788 |
\end{array}
|
| 842 | 789 |
\] |
| 843 | 790 |
\end{definition}
|
| 791 |
\todo{problem: what about complexity of checking equality? }
|
|
| 844 | 792 |
|
| 793 |
\todo{What about $\nat (t)$? What does it mean? Replace with true?}
|
|
| 845 | 794 |
|
| 846 | 795 |
\todo{either use the witness predicate above, or use realizability predicate at meta-level and a model theory, like BH.}
|
| 847 | 796 |
|
| 797 |
\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.}
|
|
| 848 | 798 |
|
| 849 | 799 |
\subsection{The translation}
|
| 850 | 800 |
Need witness predicate so that we know what is being preserved. |
| 851 | 801 |
|
| 852 | 802 |
\begin{definition}
|
| 853 | 803 |
[Translation] |
| 854 |
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 : \type \left(\bigotimes\Gamma\right) \to \type\left(\bigparr\Delta\right)$ such that:
|
|
| 804 |
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 | 805 |
\[ |
| 856 | 806 |
\witness{\vec a}{\bigotimes \Gamma} (\vec w , \vec a) \implies \witness{\vec a}{\bigparr \Delta } (\vec f(\vec w , \vec a), \vec a)
|
| 857 | 807 |
\] |
| ... | ... | |
| 863 | 813 |
|
| 864 | 814 |
\anupam{for moment try ignore decoration on right? what about negation?}
|
| 865 | 815 |
|
| 866 |
\todo{Consider these points at end, this should just be a choice of implementation.}
|
|
| 816 |
|
|
| 867 | 817 |
|
| 868 | 818 |
\[ |
| 869 | 819 |
\vlderivation{
|
Formats disponibles : Unified diff