Révision 123

CSL16/final-version/introduction.tex (revision 123)
1
\section{Introduction}
2
%\anupam{i put all the notes/suggestions at the end, before references.}
3
 
4
  \emph{Free-cut elimination}\footnote{Also known as \emph{anchored} or \emph{directed} completeness, \emph{partial} cut-elimination or \emph{weak} cut-elimination in other works.} is a normalisation procedure on formal proofs in systems including nonlogical rules, e.g.\ the axioms and induction rules in arithmetic, introduced in \cite{Takeuti87}. It yields proofs in a form where, essentially, each cut step has at least one of its cut formulas principal for a nonlogical step. It is an important tool for proving witnessing theorems in first-order theories, and in particular it has been extensively used in \emph{bounded arithmetic} for proving complexity bounds on representable functions, by way of the \textit{witness function method} \cite{Buss86book}. 
5
  
6
   Linear logic \cite{Girard87} can be seen as a decomposition of both intuitionistic and classical logic, based on a careful analysis of duplication and erasure of formulas in proofs (i.e.\ the structural rules), and has been particularly useful in proofs-as-programs correspondences, proof search \cite{Andreoli92} and logic programming \cite{Miller04}. By controlling  structural rules with designated modalities, the \textit{exponentials}, linear logic has allowed for a fine study of complexity bounds in the Curry-Howard interpretation, leading to variants with polynomial-time complexity \cite{GirardSS92:bounded-ll} \cite{Girard98} \cite{Lafont04}. 
7
%   However most of this work has been done for 'purely logical' linear logic, or at least for variants with full cut elimination procedure. 
8
   
9
    In this work we explore how the finer granularity of linear logic can be used to control complexity in \emph{first-order theories}, restricting the provably convergent functions rather than the typable terms as in the propositional setting.
10
%     aim at exploring in which way the complementary techniques of free-cut elimination and linear logic can be combined to analyze properties of first-order theories in which structural rules play a critical r\^ole. 
11
    We believe this to be of general interest, and in particular to understand the effect of substructural restrictions on nonlogical rules, e.g.\ induction, in mathematical theories. Some related works exist, in particular the na\"ive set theories of Girard and Terui \cite{Girard94:lll} \cite{Terui04}, but overall it seems that the first-order proof theory of linear logic is still rather undeveloped; in particular, to our knowledge, there seems to be no general form of free-cut elimination available in the literature (although special cases occur in \cite{LincolnMSS92} and \cite{Baelde12}). Thus our first contribution, in Sect.~\ref{sect:free-cut-elim}, will be to provide general sufficient conditions on nonlogical axioms and rules for a first-order linear logic system to admit free-cut elimination.
12
    
13
    \newcommand{\FP}{\mathbf{FP}}
14
    
15
    We illustrate the usefulness of such a result by proving a witnessing theorem for a fragment of arithmetic in linear logic, showing that the provably convergent functions are precisely the polynomial-time computable functions (Sects.~\ref{sect:bc-convergence} and \ref{sect:wfm}), henceforth denoted $\FP$. Our starting point is an axiomatisation based on a modal logic due to Bellantoni and Hofmann \cite{BelHof:02}, called $\mathcal{A}_2^1$, already known to characterise $\FP$.
16
%    In this system ,following Leivant \cite{Leivant94:intrinsic-theories} functions are defined by first-order equational specifications. 
17
%    The main result of $\mathcal{A}_2^1$ is then that the provably total functions are exactly the polynomial time class. 
18
    This approach, and that of \cite{Leivant94:found-delin-ptime} before, differs from the bounded arithmetic approach in that it does not employ bounds on quantifiers, but rather restricts nonlogical rules by substructural features of the modality \cite{BelHof:02} or by a \emph{ramification} of formulas  \cite{Leivant94:intrinsic-theories}. The proof technique employed in both cases is a realisability argument, for which \cite{Leivant94:found-delin-ptime} operates directly in intuitionistic logic, whereas \cite{BelHof:02} obtains a result for a classical logic via a double-negation translation, relying on a higher-type generalisation of \emph{safe recursion}
19
%     which is applied to an intuitionistic version of the theory. In  \cite{BelHof:02} the target language of the realizability argument is a higher-order language \cite{Hofmann00}, SLR, based on safe recursion 
20
     \cite{BellantoniCook92}. 
21
%     In a second step the result is extended to the classical variant $\mathcal{A}_2^1$ by using the Friedman A translation.
22
    
23
    We show that Buss' witness function method can be employed to extract functions directly for classical systems similar to $\mathcal{A}_2^1$ based in linear logic, by taking advantage of free-cut elimination. The De Morgan normal form available in classical (linear) logic means that the functions we extract remain at ground type, based on the usual safe recursive programs of \cite{BellantoniCook92}. A similar proof method was used by Cantini in \cite{Cantini02}, who uses combinatory terms as the model of computation as opposed to the equational specifications in this work.\footnote{This turns out to be important due to the handling of right-contraction steps in the witnessing argument.}
24
   
25
     Our result holds for an apparently weaker theory than $\mathcal{A}_2^1$, with induction restricted to positive existential formulas in a way similar to Leivant's $\mathit{RT}_0$ system in \cite{Leivant94:intrinsic-theories} (see also \cite{Marion01}), but the precise relationship between the two logical settings is unclear.
26
%
27
%   Our result holds for an apparently weaker theory than $\mathcal{A}_2^1$, with induction restricted to positive existential formulas in a way similar to Leivant's $\mathit{RT}_0$ system in \cite{Leivant94:intrinsic-theories}, but the precise relationship between the two logical settings is unclear.
28
%    We illustrate in the same time the relationship between  $\mathcal{A}_2^1$ and linear logic, which was hinted but not investigated in the original paper  \cite{BelHof:02}.  
29
We conclude in Sect.~\ref{sect:conclusions} with a survey of related work and some avenues for further applications of the free-cut elimination result. 
30

  
31
%More detailed proofs of the various results herein can be found in the appendices, Sects.~\ref{sect:app-preliminaries}-\ref{sect:app-wfm}.
32
   
33
This is a version of the extended abstract \cite{BaiDas} with appendices containing further proof details in the appendices, Sects.~\ref{sect:app-preliminaries}-\ref{sect:app-wfm}. 
34
%Everything else remains the same, with the exception of this paragraph.
CSL16/final-version/bc.tex (revision 123)
1

  
2
\section{Bellantoni-Cook characterisation of polynomial-time functions}
3

  
4
We recall the Bellantoni-Cook  algebra BC of functions defined by \emph{safe} (or \emph{predicative}) recursion on notation \cite{BellantoniCook92}. These will be employed for proving both the completeness   (all polynomial time functions are provably convergent) and the soundness result (all provably total functions are polynomial time) of $\arith$. We consider function symbols $f$ over the domain  $\Word$ with sorted arguments $(\vec u ; \vec x)$, where the inputs $\vec u$ are called \textit{normal} and $\vec x$ are called \textit{safe}. 
5
%Each symbol is given with an arity $m$ and a number $n\leq m$ of normal arguments, and will be denoted as $f(\vec{u};\vec{x})$ where $\vec{u}$ (resp. $\vec{x}$) are the normal (resp. safe) arguments.
6
%We say that an expression is well-sorted if the arities of function symbols in it is respected.
7

  
8
%\patrick{Note that below I used the terminology 'BC programs', to distinguish them from 'functions' in the extensional sense, which I find clearer. But if you prefer to keep 'BC functions' it is all right for me.}
9
\begin{definition}
10
	[BC programs]
11
	BC is the set of functions generated as follows:
12
	%	\paragraph{Initial functions}
13
%	The initial functions are:
14
	\begin{enumerate}
15
		\item The constant functions $\epsilon^k$ which takes $k$ arguments and outputs $\epsilon \in \Word$.
16
		\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 \Word$ and $1 \leq k \leq m+n$.
17
		\item The successor functions $\succ_i ( ; x) := xi$ for $i = 0,1$.
18
		\item The predecessor function $\pred (; x) := \begin{cases}
19
		\epsilon &  \mbox{ if }  x = \epsilon \\
20
		x' &  \mbox{ if }  x = x'i
21
		\end{cases}$.
22
		\item The conditional function 
23
		\[
24
%\begin{array}{rcl}
25
%C (; \epsilon, y_\epsilon , y_0, y_1  ) & = & y_\epsilon \\
26
%C(; x0 , y_\epsilon , y_0, y_1) & = & y_0 \\
27
%C(; x1 , y_\epsilon , y_0, y_1) & = & y_1 
28
%\end{array}
29
C (; \epsilon, y_\epsilon , y_0, y_1  ) := y_\epsilon 
30
\quad
31
C(; x0 , y_\epsilon , y_0, y_1) := y_0 
32
\quad
33
C(; x1 , y_\epsilon , y_0, y_1) := y_1 
34
\]
35
%		$\cond (;x,y,z) := \begin{cases}
36
%		y & \mbox{ if } x=x' 0 \\
37
%		z & \text{otherwise}
38
%		\end{cases}$.
39
	\end{enumerate}
40
	
41
%	One considers the following closure schemes:
42
	\begin{enumerate}
43
	\setcounter{enumi}{5}
44
	\item Predicative recursion on notation (PRN). If $g, h_0, h_1 $ are in BC then so is $f$ defined by,
45
	\[
46
	\begin{array}{rcl}
47
	f(0, \vec v ; \vec x) & := & g(\vec v ; \vec x) \\
48
	f (\succ_i u , \vec v ; \vec x ) & := & h_i ( u , \vec v ; \vec x , f (u , \vec v ; \vec x) )
49
	\end{array}
50
	\]
51
	for $i = 0,1$,  so long as the expressions are well-formed. % (i.e.\ in number/sort of arguments).
52
	\item Safe composition. If $g, \vec h, \vec h'$ are in BC then so is $f$ defined by,
53
	\[
54
	f (\vec u ; \vec x) \quad := \quad g ( \vec h(\vec u ; ) ; \vec h' (\vec u ; \vec x) )
55
	\]
56
	so long as the expression is well-formed.
57
	\end{enumerate}
58
	\end{definition}
59
%Note that the  programs of this class can be defined by equational specifications in a natural way, and in the following we will thus silently identify a BC program with the corresponding equational specification.
60

  
61
We will implicitly identify a BC function with the equational specification it induces.
62
The main property of BC programs is:
63
\begin{theorem}[\cite{BellantoniCook92}]
64
The class of functions representable by BC programs is $\FP$.
65
\end{theorem}	
66
Actually this property remains true if one replaces the PRN scheme by the following more general simultaneous PRN scheme \cite{BellantoniThesis}:
67

  
68
$(f^j)_{1\leq j\leq n}$ are defined by simultaneous PRN scheme  from $(g^j)_{1\leq j\leq n}$, $(h^j_0, h^j_1)_{1\leq j\leq n}$ if for $1\leq j\leq n$ we have:
69
	\[
70
	\begin{array}{rcl}
71
	f^j(0, \vec v ; \vec x) & := & g^j(\vec v ; \vec x) \\
72
	f^j(\succ_i u , \vec v ; \vec x ) & := & h^j_i ( u , \vec v ; \vec x , \vec{f} (u , \vec v ; \vec x) )
73
	\end{array}
74
	\]
75
	for $i = 0,1$,  so long as the expressions are well-formed.
76

  
77
%\anupam{simultaneous recursion?}
78

  
79
%\anupam{also identity, hereditarily safe, expressions, etc.}
80

  
81
%\anupam{we implicitly associate a BC program with its equational specification} 
82

  
83
Consider a well-formed expression $t$ built from function symbols and variables. We say that a variable $y$ occurs \textit{hereditarily safe} in $t$ if, for every subexpression $f(\vec{r}; \vec{s})$ of $t$, the terms in $\vec{r}$ do not contain $y$.
84
For instance $y$ occurs hereditarily safe in $f(u;y,g(v;y))$, but not in $f(g(v;y);x)$.
85
\begin{proposition}
86
[Properties of BC programs]
87
\label{prop:bc-properties}
88
We have the following properties:
89
\begin{enumerate}
90
\item The identity function is in BC.
91
\item Let $t$ be a well-formed expression built from BC functions and variables, denote its free variables as $\{u_1,\dots, u_n,x_1,\dots, x_k\}$, and assume for each $1\leq i\leq k$, $x_i$ is hereditarily safe in $t$. Then the function $f(u_1,\dots, u_n; x_1,\dots, x_k):=t$ is in BC.
92
\item If $f$ is a BC function, then the function $g(\vec{u},v;\vec{x})$ defined as $f(\vec{u};v,\vec{x})$
93
is also a BC program.
94
\end{enumerate}
95

  
96
%\begin{proposition}
97
%[Properties of BC programs]
98
%\label{prop:bc-properties}
99
%We have the following properties:
100
%\begin{enumerate}
101
%\item Hereditarily safe expressions over BC programs are BC definable.
102
%\item Can pass safe input to normal input.
103
%\end{enumerate}
104
\end{proposition}
CSL16/final-version/macros.tex (revision 123)
1

  
2

  
3
%\newtheorem{theorem}{Theorem}    %% Patrick: added for 'article' class version
4
%\newtheorem{maintheorem}[theorem]{Main Theorem}
5
%\newtheorem{observation}[theorem]{Observation}
6
%\newtheorem{corollary}[theorem]{Corollary}
7
%\newtheorem{lemma}[theorem]{Lemma}
8
\newtheorem{proposition}[theorem]{Proposition}
9
%\newtheorem{conjecture}[theorem]{Conjecture}
10
%
11
%\theoremstyle{definition}
12
%\newtheorem{definition}[theorem]{Definition}
13
%\newtheorem{example}[theorem]{Example}
14
%\newtheorem{notation}[theorem]{Notation}
15
%\newtheorem{convention}[theorem]{Convention}
16
%\newtheorem{remark}[theorem]{Remark}
17
%\newtheorem{discussion}[theorem]{Discussion}
18

  
19
\newcommand{\todo}[1]{{\color{red}{\textbf{Todo:} #1}}}
20
\newcommand{\anupam}[1]{{\color{orange}{\textbf{Anupam:} #1}}}
21
\newcommand{\patrick}[1]{{\color{blue}{\textbf{Patrick:} #1}}}
22

  
23
\newcommand{\IH}{\mathit{IH}}
24

  
25
\newcommand{\defined}{:=}
26
	
27
	\newcommand{\LL}{\it{LL}}
28
	\vllineartrue
29
	
30
	
31
	\newcommand{\FV}{\mathit{FV}}
32
	
33
	
34
	%specification
35
	
36
	\newcommand{\eqspec}{\mathcal E}
37
	\newcommand{\closure}[1]{\overline{#1}}
38
	
39
	\newcommand{\conv}{\mathit{Conv}}
40
	
41
	% theories
42
	\newcommand{\theory}{\mathcal T}
43
	\newcommand{\system}{\mathcal S}
44

  
45
	
46
	%terms
47
	\newcommand{\pred}{p}
48
	\newcommand{\cond}{C}
49
	\renewcommand{\succ}{\mathsf{s}}
50
	\renewcommand{\epsilon}{\varepsilon}
51
	
52
	% linear connectives
53
	
54
	\newcommand{\limp}{\multimap}
55
	\renewcommand{\land}{\otimes}
56
	\newcommand{\laand}{\&}
57
	\newcommand{\laor}{\oplus}
58
	\renewcommand{\lor}{\vlpa}
59
	\renewcommand{\lnot}[1]{{#1^{\perp}}}
60
	\newcommand{\lnotnot}[1]{#1^{\perp \perp}}
61
	
62
	% classical connectives
63
	
64
	\newcommand{\cimp}{\rightarrow}
65
	\newcommand{\cand}{\wedge}
66
	\newcommand{\cor}{\vee}
67
	\newcommand{\cnot}{\neg}
68
	
69
	
70
	\newcommand{\Ax}{\mathit{(Ax)}}
71
	\newcommand{\Rl}{\mathit{(Rl)}}
72
	
73
	\newcommand{\MELL}{\mathit{MELL}}
74
	\newcommand{\MEAL}{\mathit{MELLW}}
75
	\newcommand{\MELLW}{\mathit{MELL(W)}}
76
	
77
	\newcommand{\Aonetwo}{\mathcal{A}^1_2}
78
	\newcommand{\logic}{\mathit{L}_{\mathcal A} }
79
	
80
	% predicates
81
	\newcommand{\nat}{N}
82
	\newcommand{\word}{W}
83
	
84
	\newcommand{\Nat}{\mathbb{N}}
85
	\newcommand{\Word}{\mathbb{W}}
86
	
87
	%axioms
88
	\newcommand{\wk}{\mathit{wk}}
89
	\newcommand{\impl}{\cimp\text{-}\mathit{l}}
90
	\newcommand{\impcomm}{\mathit{com}}
91
	\newcommand{\conint}{\cand\text{-}\mathit{i}}
92
	\newcommand{\conel}{\cand\text{-}\mathit{e}}
93
	\newcommand{\negclass}{\cnot}
94
	
95
	%equality
96
	\newcommand{\refl}{\mathit{ref}}
97
	\newcommand{\symm}{\mathit{sym}}
98
	\newcommand{\trans}{\mathit{trans}}
99
	\newcommand{\subst}{\mathit{sub}}
100
	
101
	%rules
102
	\newcommand{\inv}[1]{#1\text{-inv}}
103
	
104
	\renewcommand{\mp}{\mathit{mp}}
105
	\newcommand{\gen}{\mathit{gen}}
106
	\newcommand{\inst}{\mathit{ins}}
107
	\newcommand{\id}{\it{id}}
108
	\newcommand{\cut}{\it{cut}}
109
	\newcommand{\multicut}{\it{mcut}}
110
	\newcommand{\indr}{\mathit{PIND}}
111
	\newcommand{\nec}{\mathit{nec}}
112
	\newcommand{\tax}{\mathit{T}}
113
	\newcommand{\four}{\mathit{4}}
114
	\newcommand{\kax}{\mathit{K}}
115
	\newcommand{\cntr}{\mathit{cntr}}
116
	
117
	\newcommand{\lefrul}[1]{#1\text{-}\mathit{l}}
118
	\newcommand{\rigrul}[1]{#1\text{-}\mathit{r}}
119
	
120
	%consequence relations
121
	\newcommand{\admits}{\vDash}
122
	\newcommand{\seqar}{\vdash}
123
	\newcommand{\proves}{\vdash_e}
124
	
125
	%induction
126
	\newcommand{\ind}{\mathit{PIND}}
127
	\newcommand{\pind}{\mathit{PIND}}
128
	\newcommand{\cax}[2]{#1\text{-}#2}
129

  
130
	\newcommand{\sigone}{\Sigma^{\word^+}_1 }
131
	\newcommand{\sigzer}{\Sigma^{\word^+}_0}
132
	\newcommand{\bharith}{\mathcal A^1_2}
133
	\newcommand{\arith}{I\sigone}
134
	
135
	
136

  
137
          % sizes
138
          \newcommand{\height}[1]{\mathit{h}(#1)}
CSL16/final-version/main.tex (revision 123)
1
%\documentclass[a4paper]{article}
2
\documentclass[a4paper,UKenglish]{lipics-v2016}
3
%This is a template for producing LIPIcs articles. 
4
%See lipics-manual.pdf for further information.
5
%for A4 paper format use option "a4paper", for US-letter use option "letterpaper"
6
%for british hyphenation rules use option "UKenglish", for american hyphenation rules use option "USenglish"
7
% for section-numbered lemmas etc., use "numberwithinsect"
8
 
9
\usepackage{microtype}%if unwanted, comment out or use option "draft"
10

  
11
%\graphicspath{{./graphics/}}%helpful if your graphic files are in another directory
12

  
13
\bibliographystyle{plainurl}% the recommended bibstyle
14

  
15

  
16

  
17

  
18
\usepackage[lutzsyntax]{virginialake}
19
\usepackage{amsmath}
20
\usepackage{amssymb}
21
\usepackage{amsthm}
22
\usepackage{times}
23
%\usepackage{sans}
24
\usepackage{cmll}
25
\usepackage{bm}
26

  
27
\input{macros}
28

  
29
\begin{document}
30

  
31
% Author macros::begin %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
32
\title{Free-cut elimination in linear logic and an application to a feasible arithmetic\footnote{
33
This work was supported by by the ANR Project ELICA ANR-14-CE25-0005 and by the LABEX MILYON (ANR-10-LABX-0070) of Universit\'e de Lyon, within the program "Investissements d'Avenir" (ANR-11-IDEX-
34
0007) operated by the French National Research Agency (ANR).}
35
}
36
%\titlerunning{A Sample LIPIcs Article} %optional, in case that the title is too long; the running title should fit into the top page column
37

  
38
%% Please provide for each author the \author and \affil macro, even when authors have the same affiliation, i.e. for each author there needs to be the  \author and \affil macros
39
\author{Patrick Baillot}
40
\author{Anupam Das}
41
\affil{Univ Lyon, CNRS, ENS de Lyon, UCB Lyon 1, LIP
42
%	\\
43
%	\texttt{open@dummyuniversity.org}
44
	}
45
%\affil[1]{Dummy University Computing Laboratory, Address/City, Country\\
46
%  \texttt{open@dummyuniversity.org}}
47
%\affil[2]{Department of Informatics, Dummy College, Address/City, Country\\
48
%  \texttt{access@dummycollege.org}}
49
\authorrunning{P.\ Baillot and A.\ Das} %mandatory. First: Use abbreviated first/middle names. Second (only in severe cases): Use first author plus 'et. al.'
50

  
51
\Copyright{Patrick Baillot and Anupam Das}%mandatory, please use full first names. LIPIcs license is "CC-BY";  http://creativecommons.org/licenses/by/3.0/
52

  
53
%\subjclass{Dummy classification -- please refer to \url{http://www.acm.org/about/class/ccs98-html}}% mandatory: Please choose ACM 1998 classifications from http://www.acm.org/about/class/ccs98-html . E.g., cite as "F.1.1 Models of Computation". 
54
%\keywords{Dummy keyword -- please provide 1--5 keywords}% mandatory: Please provide 1-5 keywords
55
%% Author macros::end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
56

  
57
%Editor-only macros:: begin (do not touch as author)%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
58
%\EventEditors{John Q. Open and Joan R. Acces}
59
%\EventNoEds{2}
60
%\EventLongTitle{42nd Conference on Very Important Topics (CVIT 2016)}
61
%\EventShortTitle{CVIT 2016}
62
%\EventAcronym{CVIT}
63
%\EventYear{2016}
64
%\EventDate{December 24--27, 2016}
65
%\EventLocation{Little Whinging, United Kingdom}
66
%\EventLogo{}
67
%\SeriesVolume{42}
68
%\ArticleNo{23}
69
% Editor-only macros::end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
70

  
71
\maketitle
72

  
73
\begin{abstract}
74
We prove a general form of `free-cut elimination' for first-order theories in linear logic, yielding normal forms of proofs where cuts are anchored to nonlogical steps. To demonstrate the usefulness of this result, we consider a version of arithmetic in linear logic, based on a previous axiomatisation by Bellantoni and Hofmann. We prove a witnessing theorem for a fragment of this arithmetic via the `witness function method', showing that the provably convergent functions are precisely the polynomial-time functions. The programs extracted are implemented in the framework of `safe' recursive functions, due to Bellantoni and Cook, where the ! modality of linear logic corresponds to normal inputs of a safe recursive program. 
75
%We conclude with some comments for further applications of the free-cut elimination result. 
76
 \end{abstract}
77

  
78

  
79

  
80
\input{introduction}
81

  
82
\input{preliminaries}
83

  
84
\input{free-cut-elim}
85

  
86
\input{arithmetic}
87

  
88
\input{bc}
89

  
90
\input{bc-convergence}
91

  
92
\input{wfm}
93

  
94
\input{further-work}
95

  
96
\input{conclusions}
97

  
98
\bibliographystyle{plain}
99
\bibliography{biblio}
100

  
101
%\newpage
102
%
103
%\input{appendix}
104

  
105
\end{document}
CSL16/final-version/virginialake.sty (revision 123)
1
% VirginiaLake LaTeX macros by Alessio Guglielmi
2
%
3
% Many thanks to Ross Moore (Macquarie University) for suggestions leading 
4
% to \vlupdate
5

  
6
\NeedsTeXFormat{LaTeX2e}%
7
\ProvidesPackage{virginialake}[2015/08/30 v3.0]
8
\newif\ifvirginialakeusesxy
9
        \virginialakeusesxytrue
10
\DeclareOption{noxy}{\virginialakeusesxyfalse}%
11
\newif\ifvirginialakegoodsyntax
12
        \virginialakegoodsyntaxfalse
13
\DeclareOption{goodsyntax}{\virginialakegoodsyntaxtrue}%
14
\newif\ifvirginialakelutzsyntax
15
        \virginialakelutzsyntaxfalse
16
\DeclareOption{lutzsyntax}{\virginialakelutzsyntaxtrue}%
17
\ProcessOptions
18
\@ifclassloaded{beamer}%
19
               {\RequirePackage{etex}}%
20
               {}%
21
\let\circledS\undefined\RequirePackage{amssymb}%
22
\RequirePackage{stmaryrd}%
23
\RequirePackage{ifthen}%
24
\RequirePackage{ifpdf}%
25
\RequirePackage{etoolbox}%
26
\newif\ifvirginialakepdflatex\ifpdf\virginialakepdflatextrue\else
27
                                   \virginialakepdflatexfalse\fi
28
\@ifpackageloaded{fp-basic}%
29
                 {\relax}%
30
                 {\RequirePackage{fp-basic}\FPmessagesfalse}%
31
\@ifpackageloaded{xcolor}%
32
                 {\relax}%
33
                 {\RequirePackage[usenames]{xcolor}}%
34
\ifvirginialakeusesxy
35
    \ifvirginialakepdflatex
36
       \RequirePackage[line,arrow,curve,frame,color,crayon,pdf]{xy}%
37
       \newxycolor{afbackground}{0 0 0 0.12 cmyk}%
38
       \makeatletter\renewcommand\xywarning@[1]{\relax}\catcode`@=11
39
       \W@{}%
40
       \W@{VirginiaLake Warning: Xy-pic warnings are suppressed in PDF mode.}%
41
       \W@{}%
42
    \else
43
       \RequirePackage[line,arrow,curve,frame,color,crayon,ps,dvips]{xy}%
44
       \newxycolor@{afbackground}{0 0 0 0.12}{cmyk}{}{}%
45
   \fi
46
\fi
47
\newif\ifetex
48
\AtBeginDocument{\@ifpackageloaded{etex}{\etextrue}{\etexfalse}}%
49

  
50
%----------------------------------------------------------------------- IFMTARG
51
% Code from ifmtarg.sty, reproduced below with permission - A.G.
52
%
53
% ifmtarg.sty
54
%
55
% Provides an if-then-else command for an empty macro argument
56
% (empty = zero or more spaces only)
57
% Use as \@ifmtarg{arg1}{Code for arg1 empty}{Code for arg1 not empty}%
58
%
59
% author: Peter Wilson (CUA)
60
%         (now at peter.r.wilson@boeing.com)
61
% Copyright Peter Wilson, 1996
62
% Copyright Peter Wilson and Donald Arseneau, 2000
63
% Released under the LaTeX Project Public License
64
%
65
%% Commands by Donald Arseneau
66
\begingroup
67
\catcode`\Q=3
68
\long\gdef\@ifmtarg#1{\@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil}%
69
\long\gdef\@xifmtarg#1#2Q#3#4#5\@nil{#4}%
70
\long\gdef\@ifnotmtarg#1{\@xifmtarg#1QQ\@firstofone\@gobble\@nil}%
71
\endgroup
72
%---------------------------------------------------------------- END OF IFMTARG
73

  
74
%------------------------------------------------------------ MACROS FOR SYMBOLS
75

  
76
  \newcommand\one{{\mathsf 1}}%
77
  \newcommand\zer{{\mathsf 0}}%
78
  \newcommand\fff{{\mathsf f}}%
79
  \newcommand\ttt{{\mathsf t}}%
80
  \newcommand\sw {{\mathsf s}}%
81
  \newcommand\me {{\mathsf m}}%
82
  \newcommand\iD {{\mathsf i}{\downarrow}}%
83
  \newcommand\iU {{\mathsf i}{  \uparrow}}%
84
  \newcommand\cD {{\mathsf c}{\downarrow}}%
85
  \newcommand\cU {{\mathsf c}{  \uparrow}}%
86
  \newcommand\wD {{\mathsf w}{\downarrow}}%
87
  \newcommand\wU {{\mathsf w}{  \uparrow}}%
88
  \newcommand\qD {{\mathsf q}{\downarrow}}%
89
  \newcommand\qU {{\mathsf q}{  \uparrow}}%
90
  \newcommand\BV {{\mathsf {BV}}}%
91
  \newcommand\SBV{{\mathsf{SBV}}}%
92
  \newcommand\KS {{\mathsf {KS}}}%
93
  \newcommand\SKS{{\mathsf{SKS}}}%
94

  
95
%---------------------------------------------------------------- END OF SYMBOLS
96

  
97
%------------------------------------------------ MACROS FOR FORMULAE/STRUCTURES
98

  
99
\newif\ifvlsmallops\vlsmallopsfalse
100

  
101
\newcommand\vlbin[1]{\ifvlsmallops\mathchoice
102
      {\mathbin{\raise.2ex \hbox{$\scriptstyle      #1$}}}%
103
      {\mathbin{\raise.2ex \hbox{$\scriptstyle      #1$}}}%
104
      {\mathbin{\raise.12ex\hbox{$\scriptscriptstyle#1$}}}%
105
      {\mathbin{           \hbox{$\scriptscriptstyle#1$}}}\else\mathbin{#1}\fi}%
106

  
107
\newif\ifvllinear\vllinearfalse
108

  
109
\newcommand{\vlor}{\ifvllinear\vlbin\varoplus\else\vlbin\vee\fi}%
110

  
111
\newcommand{\vlan}{\ifvllinear\vlbin\binampersand\else\vlbin\wedge\fi}%
112

  
113
\newcommand{\vlpa}{\vlbin\bindnasrepma}%
114

  
115
\newcommand{\vlte}{\vlbin\varotimes}%
116

  
117
\newcommand{\vlse}{\vlbin\triangleleft}%
118

  
119
\newcommand{\vlim}{\vlbin\to}%
120

  
121
\newcommand{\vlli}{\vlbin\multimap}%
122

  
123
\newcommand{\vlmi}{\vlbin\leftarrow}%
124

  
125
\newcommand{\vldi}{\vlbin\leftrightarrow}%
126

  
127
\newcommand{\vlne}{\vlbin\neg}%
128

  
129
\newcommand{\vljm}{\vlbin\supset}%
130

  
131
\newcommand{\vlmj}{\vlbin\subset}%
132

  
133
\newcommand{\vlgoodsyntax}{%
134
   \def\vlleftparbracket   {\ifvirginialakesmallbrackets[\else
135
                                       \mathopen{}\left [\fi}%
136
   \def\vlrightparbracket  {\ifvirginialakesmallbrackets]\else
137
                                                  \right]\mathclose{}\fi}%
138
   \let\vlleftparbracketex \vlleftparbracket
139
   \let\vlrightparbracketex\vlrightparbracket
140
   \let\vlleftparbracketcn \vlleftparbracket
141
   \let\vlrightparbracketcn\vlrightparbracket
142
   \def\vlleftcopbracket   {\ifvirginialakesmallbrackets(\else
143
                                       \mathopen{}\left (\fi}%
144
   \def\vlrightcopbracket  {\ifvirginialakesmallbrackets)\else
145
                                                  \right)\mathclose{}\fi}%
146
   \let\vlleftcopbracketex \vlleftcopbracket
147
   \let\vlrightcopbracketex\vlrightcopbracket
148
   \let\vlleftcopbracketcn \vlleftcopbracket
149
   \let\vlrightcopbracketcn\vlrightcopbracket
150
   \def\vlleftseqbracket   {\ifvirginialakesmallbrackets\langle\else
151
                                        \mathopen{}\left\langle\fi}%
152
   \def\vlrightseqbracket  {\ifvirginialakesmallbrackets\rangle\else
153
                                                  \right\rangle\mathclose{}\fi}%
154
   \let\vlleftseqbracketex \vlleftseqbracket
155
   \let\vlrightseqbracketex\vlrightseqbracket
156
   \let\vlleftseqbracketcn \vlleftseqbracket
157
   \let\vlrightseqbracketcn\vlrightseqbracket
158
   \def\vldsaaux{\ifx\vlxspacetmp\vldsa\vlx\vlx\vlx\togglexspacefalse\else
159
                  \iftogglexspace\vlx\else\togglexspacetrue\fi\fi}%
160
   \def\vldsa{\futurelet\vlxspacetmp\vldsaaux}%
161
   \def\vlcsaaux{\ifx\vlxspacetmp\vlcsa\vlx\vlx\vlx\togglexspacefalse\else
162
                  \iftogglexspace\vlx\else\togglexspacetrue\fi\fi}%
163
   \def\vlcsa{\futurelet\vlxspacetmp\vlcsaaux}%
164
   \def\vldsmaux{\ifx\vlxspacetmp\vldsm\vlx\vlx\vlx\togglexspacefalse\else
165
                  \iftogglexspace\vlx\else\togglexspacetrue\fi\fi}%
166
   \def\vldsm{\futurelet\vlxspacetmp\vldsmaux}%
167
   \def\vlcsmaux{\ifx\vlxspacetmp\vlcsm\vlx\vlx\vlx\togglexspacefalse\else
168
                  \iftogglexspace\vlx\else\togglexspacetrue\fi\fi}%
169
   \def\vlcsm{\futurelet\vlxspacetmp\vlcsmaux}%
170
   \def\vlnsmaux{\ifx\vlxspacetmp\vlnsm\vlx\vlx\vlx\togglexspacefalse\else
171
                  \iftogglexspace\vlx\else\togglexspacetrue\fi\fi}%
172
   \def\vlnsm{\futurelet\vlxspacetmp\vlnsmaux}%
173
   \let\vldots=\dots}%
174

  
175
\newcommand{\vlx}{\;}%
176

  
177
\newif\iftogglexspace\togglexspacetrue
178

  
179
\newcommand{\vlsetoperators}{%
180
   \def\vldsaaux{\ifx\vlxspacetmp\vldsa\vlx\vlor\vlx\togglexspacefalse\else
181
                  \iftogglexspace\vlor\else\togglexspacetrue\fi\fi}%
182
   \def\vldsa{\futurelet\vlxspacetmp\vldsaaux}%
183
   \def\vlcsaaux{\ifx\vlxspacetmp\vlcsa\vlx\vlan\vlx\togglexspacefalse\else
184
                  \iftogglexspace\vlan\else\togglexspacetrue\fi\fi}%
185
   \def\vlcsa{\futurelet\vlxspacetmp\vlcsaaux}%
186
   \def\vldsmaux{\ifx\vlxspacetmp\vldsm\vlx\vlpa\vlx\togglexspacefalse\else
187
                  \iftogglexspace\vlpa\else\togglexspacetrue\fi\fi}%
188
   \def\vldsm{\futurelet\vlxspacetmp\vldsmaux}%
189
   \def\vlcsmaux{\ifx\vlxspacetmp\vlcsm\vlx\vlte\vlx\togglexspacefalse\else
190
                  \iftogglexspace\vlte\else\togglexspacetrue\fi\fi}%
191
   \def\vlcsm{\futurelet\vlxspacetmp\vlcsmaux}%
192
   \def\vlnsmaux{\ifx\vlxspacetmp\vlnsm\vlx\vlse\vlx\togglexspacefalse\else
193
                  \iftogglexspace\vlse\else\togglexspacetrue\fi\fi}%
194
   \def\vlnsm{\futurelet\vlxspacetmp\vlnsmaux}%
195
   \let\vldots=\cdots}%
196

  
197
\newcommand{\vllutzsyntax}{%
198
   \def\vlleftparbracket   {\ifvirginialakesmallbrackets[\else
199
                                       \mathopen{}\left [\fi}%
200
   \def\vlrightparbracket  {\ifvirginialakesmallbrackets]\else
201
                                                  \right]\mathclose{}\fi}%
202
   \let\vlleftparbracketex \relax
203
   \let\vlrightparbracketex\relax
204
   \let\vlleftparbracketcn \{
205
   \let\vlrightparbracketcn\}%
206
   \def\vlleftcopbracket   {\ifvirginialakesmallbrackets(\else
207
                                       \mathopen{}\left (\fi}%
208
   \def\vlrightcopbracket  {\ifvirginialakesmallbrackets)\else
209
                                                  \right)\mathclose{}\fi}%
210
   \let\vlleftcopbracketex \relax
211
   \let\vlrightcopbracketex\relax
212
   \let\vlleftcopbracketcn \{
213
   \let\vlrightcopbracketcn\}%
214
   \def\vlleftseqbracket   {\ifvirginialakesmallbrackets\langle\else
215
                                        \mathopen{}\left\langle\fi}%
216
   \def\vlrightseqbracket  {\ifvirginialakesmallbrackets\rangle\else
217
                                                  \right\rangle\mathclose{}\fi}%
218
   \let\vlleftseqbracketex \relax
219
   \let\vlrightseqbracketex\relax
220
   \let\vlleftseqbracketcn \{
221
   \let\vlrightseqbracketcn\}%
222
   \vlsetoperators
223
   \vlsmallopstrue}%
224

  
225
\newcommand{\vlnogoodsyntax}{%
226
   \def\vlleftparbracket   {\ifvirginialakesmallbrackets(\else
227
                                       \mathopen{}\left (\fi}%
228
   \def\vlrightparbracket  {\ifvirginialakesmallbrackets)\else
229
                                                  \right)\mathclose{}\fi}%
230
   \let\vlleftparbracketex \relax
231
   \let\vlrightparbracketex\relax
232
   \let\vlleftparbracketcn \{
233
   \let\vlrightparbracketcn\}%
234
   \let\vlleftcopbracket   \vlleftparbracket
235
   \let\vlrightcopbracket  \vlrightparbracket
236
   \let\vlleftcopbracketex \relax
237
   \let\vlrightcopbracketex\relax
238
   \let\vlleftcopbracketcn \{
239
   \let\vlrightcopbracketcn\}%
240
   \let\vlleftseqbracket   \vlleftparbracket
241
   \let\vlrightseqbracket  \vlrightparbracket
242
   \let\vlleftseqbracketex \relax
243
   \let\vlrightseqbracketex\relax
244
   \let\vlleftseqbracketcn \{
245
   \let\vlrightseqbracketcn\}%
246
   \vlsetoperators}%
247

  
248
\ifvirginialakegoodsyntax
249
   \vlgoodsyntax
250
\else
251
   \ifvirginialakelutzsyntax
252
      \vllutzsyntax
253
   \else
254
      \vlnogoodsyntax
255
   \fi
256
\fi
257

  
258
\newif\ifvirginialakesmallbrackets\virginialakesmallbracketsfalse
259

  
260
\newcommand{\vlsmallbrackets}{\virginialakesmallbracketstrue}%
261

  
262
\newcommand{\vlnosmallbrackets}{\virginialakesmallbracketsfalse}%
263

  
264
\newcommand{\vlprepstructuresaux}{\catcode`.=\active
265
                                  \catcode`;=\active
266
                                  \catcode`[=\active
267
                                  \catcode`]=\active
268
                                  \catcode`(=\active
269
                                  \catcode`)=\active
270
                                  \catcode`<=\active
271
                                  \catcode`>=\active
272
                                  \catcode`-=\active}%
273

  
274
\newcommand{\lt}{<}%
275
\newcommand{\gt}{>}%
276

  
277
\let\vldot  .
278
\let\vlscol ;
279
\let\vlsqbrl[
280
\let\vlsqbrr]
281
\let\vlrobrl(
282
\let\vlrobrr)
283
\let\vlanbrl<
284
\let\vlanbrr>
285
\let\vlminus-
286

  
287
\newif\ifvirginialakestructuressyntax\virginialakestructuressyntaxtrue
288

  
289
\newcommand{\vlnostructuressyntax}{\virginialakestructuressyntaxfalse}%
290

  
291
\newcommand{\vlgobble}[1]{}%
292

  
293
{%--------------------------------------
294
\vlprepstructuresaux
295

  
296
\gdef\vlnos{\let.\vldot
297
            \let;\vlscol
298
            \let[\vlsqbrl
299
            \let]\vlsqbrr
300
            \let(\vlrobrl
301
            \let)\vlrobrr
302
            \let<\vlanbrl
303
            \let>\vlanbrr
304
            \let-\vlminus}%
305

  
306
\gdef\vlprepstructures{\ifvirginialakestructuressyntax
307
                          \vlprepstructuresaux\vlnos\fi}%
308

  
309
\gdef\vlparopen  {\vlleftparbracket  \bgroup\catcode`.=\active\let.\vldsa
310
                                            \catcode`;=\active\let;\vldsm
311
                                            \catcode`]=\active\let]\vlparclose}%
312

  
313
\gdef\vlparopenex{\vlleftparbracketex\bgroup\catcode`.=\active\let.\vldsa
314
                                            \catcode`;=\active\let;\vldsm\vlsbr
315
                                          \catcode`]=\active\let]\vlparcloseex}%
316

  
317
\gdef\vlparopencn{\vlleftparbracketcn\bgroup\catcode`.=\active\let.\vldsa
318
                                            \catcode`;=\active\let;\vldsm\vlsbr
319
                                          \catcode`]=\active\let]\vlparclosecn}%
320

  
321
\gdef\vlcopopen  {\vlleftcopbracket  \bgroup\catcode`.=\active\let.\vlcsa
322
                                            \catcode`;=\active\let;\vlcsm
323
                                            \catcode`)=\active\let)\vlcopclose}%
324

  
325
\gdef\vlcopopenex{\vlleftcopbracketex\bgroup\catcode`.=\active\let.\vlcsa
326
                                            \catcode`;=\active\let;\vlcsm\vlsbr
327
                                          \catcode`)=\active\let)\vlcopcloseex}%
328

  
329
\gdef\vlcopopencn{\vlleftcopbracketcn\bgroup\catcode`.=\active\let.\vlcsa
330
                                            \catcode`;=\active\let;\vlcsm\vlsbr
331
                                          \catcode`)=\active\let)\vlcopclosecn}%
332

  
333
\gdef\vlseqopen  {\vlleftseqbracket  \bgroup\catcode`;=\active\let;\vlnsm
334
                                            \catcode`>=\active\let>\vlseqclose}%
335

  
336
\gdef\vlseqopenex{\vlleftseqbracketex\bgroup\catcode`;=\active\let;\vlnsm\vlsbr
337
                                          \catcode`>=\active\let>\vlseqcloseex}%
338

  
339
\gdef\vlseqopencn{\vlleftseqbracketcn\bgroup\catcode`;=\active\let;\vlnsm\vlsbr
340
                                          \catcode`>=\active\let>\vlseqclosecn}%
341

  
342
\gdef\vls  {\catcode`[=\active\let[\vlparopenex
343
            \catcode`(=\active\let(\vlcopopenex
344
            \catcode`<=\active\let<\vlseqopenex
345
            \catcode`-=\active\let-\bar
346
            \odframefirstfalse
347
            \odbackgroundfirstfalse}%
348

  
349
\gdef\vlsbr{\catcode`[=\active\let[\vlparopen
350
            \catcode`(=\active\let(\vlcopopen
351
            \catcode`<=\active\let<\vlseqopen
352
            \catcode`-=\active\let-\bar
353
            \odframefirstfalse
354
            \odbackgroundfirstfalse}%
355

  
356
\gdef\vlscn{\catcode`[=\active\let[\vlparopencn
357
            \catcode`(=\active\let(\vlcopopencn
358
            \catcode`<=\active\let<\vlseqopencn
359
            \catcode`-=\active\let-\bar
360
            \odframefirstfalse
361
            \odbackgroundfirstfalse}%
362

  
363
\gdef\vlupdate #1{
364
   \expandafter\let\csname\expandafter\vlgobble\string #1vltemp\endcsname #1
365
   \def #1{\bgroup\vlprepstructures
366
     \csname\expandafter\vlgobble\string #1vlaux\endcsname}%
367
   \expandafter\def\csname\expandafter\vlgobble\string #1vlaux\endcsname ##1{%
368
      \csname\expandafter\vlgobble\string #1vltemp\endcsname{##1}\egroup}}%
369
}%--------------------------------------
370

  
371
\newcommand{\vlparclose  }{\egroup\vlrightparbracket  }%
372

  
373
\newcommand{\vlparcloseex}{\egroup\vlrightparbracketex}%
374

  
375
\newcommand{\vlparclosecn}{\egroup\vlrightparbracketcn}%
376

  
377
\newcommand{\vlcopclose  }{\egroup\vlrightcopbracket  }%
378

  
379
\newcommand{\vlcopcloseex}{\egroup\vlrightcopbracketex}%
380

  
381
\newcommand{\vlcopclosecn}{\egroup\vlrightcopbracketcn}%
382

  
383
\newcommand{\vlseqclose  }{\egroup\vlrightseqbracket  }%
384

  
385
\newcommand{\vlseqcloseex}{\egroup\vlrightseqbracketex}%
386

  
387
\newcommand{\vlseqclosecn}{\egroup\vlrightseqbracketcn}%
388

  
389
\newcommand{\vlhole}{\{\kern.3em\}}%
390

  
391
\newcommand{\vlstore}{\bgroup\vlprepstructures\afterassignment\egroup
392
                      \global\def\vlread}%
393

  
394
%----------------------------------------- END OF MACROS FOR FORMULAE/STRUCTURES
395

  
396
%-------------------------------------------------------- MACROS FOR DERIVATIONS
397
%
398
%                                                   +-------+--------+-------+
399
%                                                   |  dcl  |  dcc   |  dcr  |
400
%                                                   +-------+--------+-------+
401
%                                                       +---+        +---+
402
%                                                       | l |--------| m |
403
%                                                       +---+        +---+
404
%                                                             +----+
405
%                                                             | dc |
406
%                                                             +----+
407
%                                                   <---dl--->      <---dr--->
408
%
409

  
410
\newdimen\dercldim                                % dcl
411
\newdimen\derccdim                                % dcc
412
\newdimen\dercrdim                                % dcr
413
\newdimen\derdim                                  % d
414
\newdimen\derdldim                                % ddl
415
\newdimen\derdrdim                                % ddr
416
\newbox\derboxtwo                                 % b2
417
\newbox\derboxthree                               % b3
418
\newbox\derboxfour                                % b4
419
\newdimen\derquad
420
\newdimen\deropen
421
\newbox\stembox
422

  
423
\newcount\vlsavederboxonec
424
%\newcount\vlsavederdimc
425
\newcount\vldummycount
426

  
427
% THE FOLLOWING IS VERY DANGEROUS: WE ARE CREATING A 'VIRTUAL MEMORY MANAGER'
428
% FOR \derboxone, \derldim, \dercdim AND \derrdim, IN PARTICULAR BY USING
429
% \count11 AND \count14. ETEX MIGHT INTERFERE WITH THIS STUFF. START FROM 
430
% HERE IF YOU SEE SOMETHING ODD SUCH AS DUPLICATION OR MISPLACEMENT OF BOXES IN 
431
% DERIVATIONS
432

  
433
\newcommand{\vlderivationinitaux}{%
434
   \newbox\derboxone                              % b1
435
   \setbox\derboxone=\hbox{}%
436
   \vlsavederboxonec=\derboxone
437
%   \vlsavederdimc=\count11\advance\vlsavederdimc by1%
438
   \newdimen\derldim                              % dl
439
   \newdimen\dercdim                              % dc
440
   \newdimen\derrdim}%                            % dr
441

  
442
\newcommand{\vlderivationinit}{\bgroup
443
   \vlprepstructures\vlderivationinitaux}%
444

  
445
\newcommand{\vlderivationterm}{\egroup
446
   \global\chardef\derboxone=\vlsavederboxonec
447
   \ifetex
448
      \ifnum\count264>256
449
         \global\advance\count264 by-1
450
      \else
451
         \global\advance\count14 by-1
452
      \fi
453
   \else\global\advance\count14 by-1
454
   \fi
455
   \ifetex
456
      \ifnum\count261>258
457
         \global\advance\count261 by-3
458
      \else
459
         \ifnum\count261>257
460
            \global\advance\count261 by-2
461
            \global\advance\count11  by-1
462
         \else
463
            \ifnum\count261>256
464
               \global\advance\count261 by-1
465
               \global\advance\count11  by-2
466
            \else
467
               \global\advance\count11 by-3
468
            \fi
469
         \fi
470
      \fi
471
   \else\global\advance\count11 by-3
472
   \fi
473
%   \global\dimendef\derldim=\vlsavederdimc
474
%   \global\advance\vlsavederdimc by1%
475
%   \global\dimendef\dercdim=\vlsavederdimc
476
%   \global\advance\vlsavederdimc by1%
477
%   \global\dimendef\derrdim=\vlsavederdimc
478
%   \global\advance\vlsavederdimc by-2
479
   }%
480

  
481
\newcommand{\vlderivationaux}[1]{#1\vcenter{\box\derboxone}\vlderivationterm}%
482

  
483
\newcommand{\vlderivation}{\vlderivationinit\vlderivationaux}%
484

  
485
\newcommand{\vlhyaux}[1]{\global\setbox\derboxone=\hbox{#1}%
486
   \global\derldim=0pt%                           % dl=0
487
   \global\dercdim=\wd\derboxone                  % dc=wd(b1)
488
   \global\derrdim=0pt%                           % dr=0
489
   }%
490

  
491
\newbox\vlhybox
492
\newcommand{\vlhy}[1]{\global\setbox\vlhybox=\hbox{\strut$#1$}%
493
   \vlhyaux{\box\vlhybox}}%
494

  
495
\newcommand{\vlstemaux}{\dercldim=\derldim
496
                        \derccdim=\dercdim
497
                        \dercrdim=\derrdim}%
498

  
499
\newcommand{\vldaux}[6]{\setbox\derboxtwo=\hbox{\unhbox\derboxone}%
500
                                                  % b2=b1
501
   \setbox\derboxthree=\hbox{$#1$}%               % b3; l=wd(b3)
502
   \setbox\derboxfour =\hbox{$#2$}%               % b4; m=wd(b4)
503
   #3                                             % dl=0, dc=wd(b1), dr=0
504
   \derdim=\dercdim\advance\derdim by-\derccdim\divide\derdim by2%
505
                                                  % d=(dc-dcc)/2
506
   \global\derldim=\dercldim\global\advance\derldim by-\derdim
507
                                                  % dl=dcl-d
508
   \global\derrdim=\dercrdim\global\advance\derrdim by-\derdim
509
                                                  % dr=dcr-d
510
   \deropen=\fontdimen5\textfont2\divide\deropen by3%
511
   \setbox\derboxone=\hbox{\vbox{\offinterlineskip
512
         \hbox{\ifdim\derldim<0pt\kern-\derldim\fi
513
               \box\derboxtwo
514
               \ifdim\derrdim<0pt\kern-\derrdim\fi}%
515
         #4%
516
         \hbox{\ifdim\dercldim>\derldim
517
                  \ifdim\derldim>0pt\kern\derldim\fi
518
                  \else\kern\dercldim\fi
519
               \hbox to0pt{\hss\copy\derboxthree}%
520
               \vbox{\ifdim\derccdim>\dercdim\hsize=\derccdim
521
                                        \else\hsize=\dercdim \fi
522
                    #5}%
523
               \hbox to0pt{\copy\derboxfour\hss}%
524
               \ifdim\dercrdim>\derrdim
525
                  \ifdim\derrdim>0pt\kern\derrdim\fi
526
                  \else\kern\dercrdim\fi}%
527
         #6%
528
         \hbox{\ifdim\derldim>0pt\kern\derldim\fi
529
               \box\derboxone
530
               \ifdim\derrdim>0pt\kern\derrdim\fi}}}%
531
   \ifdim\derldim<0pt\global\derldim=0pt\fi       % dl=max(dl,0)
532
   \ifdim\derrdim<0pt\global\derrdim=0pt\fi       % dr=max(dr,0)
533
   \derdldim=\wd\derboxthree\advance\derdldim by-\dercldim
534
                                                  % ddl=l-dcl
535
   \derdrdim=\wd\derboxfour \advance\derdrdim by-\dercrdim
536
                                                  % ddr=m-dcr
537
   \ifdim\derdim<0pt%
538
      \ifdim\derdldim<0pt%
539
         \derdldim=0pt%                           % d<0, ddl<0 -> ddl=0
540
      \fi
541
      \ifdim\derdrdim<0pt%
542
         \derdrdim=0pt%                           % d<0, ddr<0 -> ddr=0
543
      \fi
544
   \else
545
      \ifdim\derldim>0pt%
546
         \ifdim\derdldim>-\derdim
547
            \advance\derdldim by\derdim           % d>=0, dl>0, ddl+d>0 -> 
548
         \else                                    %                    ddl=ddl+d
549
            \derdldim=0pt%                        % d>=0, dl>0, ddl+d<=0 ->
550
         \fi                                      %                        ddl=0
551
      \else
552
         \advance\derdldim by\dercldim            % d>=0, dl=0 -> ddl=ddl+dcl
553
      \fi
554
      \ifdim\derrdim>0pt%
555
         \ifdim\derdrdim>-\derdim
556
            \advance\derdrdim by\derdim           % d>=0, dr>0, ddr+d>0 -> 
557
         \else                                    %                    ddr=ddr+d
558
            \derdrdim=0pt%                        % d>=0, dr>0, ddr+d<=0 ->
559
         \fi                                      %                        ddr=0
560
      \else
561
         \advance\derdrdim by\dercrdim            % d>=0, dr=0 -> ddr=ddr+dcr
562
      \fi
563
   \fi
564
   \global\setbox\derboxone=\hbox
565
      {\kern\derdldim\unhbox\derboxone\kern\derdrdim}%
566
   \global\advance\derldim by\derdldim            % dl=dl+ddl
567
   \global\advance\derrdim by\derdrdim            % dr=dr+ddr
568
   }%
569

  
570
\newcommand{\vlstemraux }[4]{{#4}\vlstemaux\vldaux
571
   {\scriptstyle #1}%
572
   {\scriptstyle #2}%
573
   {\vlhyaux{#3}}%
574
   {\kern-\deropen\kern-\ht\strutbox\kern-\dp\strutbox}%
575
   {\hbox{$\vcenter{\vbox{\offinterlineskip
576
                    \hbox{$\copy\stembox$}}}$}}%
577
   {\kern-\deropen}}%
578

  
579
\newcommand{\vlstemrraux}[4]{{#4}\vlstemaux\vldaux
580
   {\scriptstyle #1}%
581
   {\scriptstyle #2}%
582
   {\vlhy{#3}}%
583
   {\kern\deropen}%
584
   {\hbox{\hfil}}%
585
   {\kern\deropen}}%
586

  
587
\newif\ifvlsmallleftlabels\vlsmallleftlabelstrue
588

  
589
\newcommand{\vlnosmallleftlabels}{\vlsmallleftlabelsfalse}%
590

  
591
\newcommand{\vlsmallleftlabels}{\vlsmallleftlabelstrue}%
592

  
593
\newcommand{\vlleftlabel }[1]{\@ifnotmtarg{#1}{\ifvlsmallleftlabels
594
                               \scriptstyle\fi #1\;}\relax}%
595

  
596
\newcommand{\vlrightlabel}[1]{\@ifnotmtarg{#1}{\;#1}\relax}%
597

  
598
\newdimen\vlstemheight\vlstemheight=8pt%
599

  
600
\newcommand{\vlvruler}{\hbox{\vrule width .6pt height \vlstemheightc sp
601
                             \kern1.2pt
602
                             \vrule width .6pt height \vlstemheightc sp}}%
603

  
604
\newcount\vlstemheightc
605

  
606
\newcommand{\vldf}[5]{\vldummycount=\vlstemheight
607
                      \FPmul\vlstemheightc{\the\vldummycount}{#5}%
608
   \setbox\stembox=\vbox to \vlstemheightc sp{\vlvruler}%
609
   \vlstemrraux{                }{                 }{#3              }  {%
610
   \vlstemraux {\vlleftlabel{#1}}{\vlrightlabel{#2}}{\kern\wd\stembox} {%
611
   \vlstemrraux{                }{                 }{\kern\wd\stembox}{%
612
   #4                                                                 }}}}%
613

  
614
\newcommand{\vlde}[4]{\vldf{#1}{#2}{#3}{#4}1}%
615

  
616
\newcommand{\vldd}[4]{\vldf{#1}{#2}{#3}{#4}2}%
617

  
618
\newcommand{\vlpf}[4]{\vldf{#1}{#2}{#3}%
619
   {\vlhyaux{\vbox to0pt{\vss\kern3pt\hrule width4.2pt\vss}}}{#4}}%
620

  
621
\newcommand{\vlpr}[3]{\vlpf{#1}{#2}{#3}1}%
622

  
623
\newcommand{\vlpd}[3]{\vlpf{#1}{#2}{#3}2}%
624

  
625
\newcommand{\vlproofaux}[4]{\vlderivationaux{\vlpf{#2}{#3}{#4}{#1}}}%
626

  
627
\newcommand{\vlproof }{\vlderivationinit\vlproofaux1}%
628

  
629
\newcommand{\vlproofd}{\vlderivationinit\vlproofaux2}%
630

  
631
\newcommand{\vlderaux}[5]{\vlderivationaux{\vldf{#2}{#3}{#4}{\vlhy{#5}}{#1}}}%
632

  
633
\newcommand{\vlder }{\vlderivationinit\vlderaux1}%
634

  
635
\newcommand{\vlderd}{\vlderivationinit\vlderaux2}%
636

  
637
\newcommand{\vlhruler}{\vfill\hbox to\hsize{\hrulefill}\vfill}%
638

  
639
\newcommand{\vlhhruler}{\vfill
640
                        \hbox to\hsize{\hrulefill}%
641
                        \kern1pt
642
                        \hbox to\hsize{\hrulefill}%
643
                        \vfill}%
644

  
645
\newcommand{\vlhdotter}{\vfill
646
   \hbox to\hsize{\cleaders\vbox to0pt{\vss
647
       \hbox{\kern-.35pt$.$\kern-.35pt}\vss}\hskip\hsize}\vfill}%
648

  
649
\newcommand{\vldsinaux}[3]{\vldaux
650
   {\smash{\ifvlsmallleftlabels\lower\fontdimen22\scriptfont2%
651
                          \else\lower\fontdimen22\textfont2\fi
652
                                       \hbox{$\vlleftlabel {#1}$}}}%
653
   {\smash{\lower\fontdimen22\textfont2\hbox{$\vlrightlabel{#2}$}}}%
654
   {\vlhy{#3}}%
655
   {\kern\deropen}%
656
   {\vbox to.4pt{\vlhruler}}%
657
   {\kern\deropen}}%
658

  
659
\newcommand{\vldsidaux}[3]{\vldaux
660
   {\smash{\ifvlsmallleftlabels\lower\fontdimen22\scriptfont2%
661
                          \else\lower\fontdimen22\textfont2\fi
662
                                       \hbox{$\vlleftlabel {#1}$}}}%
663
   {\smash{\lower\fontdimen22\textfont2\hbox{$\vlrightlabel{#2}$}}}%
664
   {\vlhy{#3}}%
665
   {\kern\deropen}%
666
   {\vbox to.4pt{\vlhdotter}}%
667
   {\kern\deropen}}%
668

  
669
\newdimen\vldsiqdimenleft
670
\newdimen\vldsiqdimenright
671

  
672
\newcommand{\vldsiqaux}[3]{\ifvlsmallleftlabels
673
                                \vldsiqdimenleft=\fontdimen22\scriptfont2%
674
                           \else\vldsiqdimenleft=\fontdimen22\textfont2\fi
675
                           \advance\vldsiqdimenleft  by-.7pt%
676
                           \vldsiqdimenright=\fontdimen22\textfont2%
677
                           \advance\vldsiqdimenright by-.7pt%
678
   \vldaux
679
   {\smash{\lower\vldsiqdimenleft \hbox{$\vlleftlabel {#1}$}}}%
680
   {\smash{\lower\vldsiqdimenright\hbox{$\vlrightlabel{#2}$}}}%
681
   {\vlhy{#3}}%
682
   {\kern\deropen\kern-.7pt}%
683
   {\vbox to1.8pt{\vlhhruler}}%
684
   {\kern\deropen\kern-.7pt}}%
685

  
686
\newbox\derboxin
687
\newdimen\derboxinwidth
688

  
689
\newcommand{\vliaux}[2]{#2%
690
   \dercldim=\derldim
691
   \derccdim=\dercdim
692
   \dercrdim=\derrdim
693
   \setbox\derboxin=\hbox{$#1$}%
694
   \derboxinwidth=1em\advance\derboxinwidth by-\wd\derboxin
695
   \ifdim\derboxinwidth>0pt\divide\derboxinwidth by2\else\derboxinwidth=0pt\fi}%
696

  
697
\newcommand{\vlin}[4]{\vliaux{#3}{#4}%
698
   \vldsinaux{#1}{#2}{\kern\derboxinwidth\box\derboxin\kern\derboxinwidth}}%
699

  
700
\newcommand{\vlid}[4]{\vliaux{#3}{#4}%
701
   \vldsidaux{#1}{#2}{\kern\derboxinwidth\box\derboxin\kern\derboxinwidth}}%
702

  
703
\newcommand{\vliq}[4]{\vliaux{#3}{#4}%
704
   \vldsiqaux{#1}{#2}{\kern\derboxinwidth\box\derboxin\kern\derboxinwidth}}%
705

  
706
\newcommand{\vliiaux}[2]{\derquad=\fontdimen6\textfont2%
707
   {#1}%
708
           \dercldim  =\derldim
709
           \derccdim  =\dercdim
710
   \setbox\derboxtwo=\hbox{\unhbox\derboxone\kern\derquad}%
711
   \advance\derccdim by\derrdim
712
   \advance\derccdim by\derquad
713
   {#2}%
714
   \setbox\derboxone=\hbox{\unhbox\derboxtwo\unhbox\derboxone}%
715
   \advance\derccdim by\derldim
716
   \advance\derccdim by\dercdim
717
           \dercrdim  =\derrdim}%
718

  
719
\newcommand{\vliin}[5]{\vliiaux{#4}{#5}\vldsinaux{#1}{#2}{#3}}%
720

  
721
\newcommand{\vliid}[5]{\vliiaux{#4}{#5}\vldsidaux{#1}{#2}{#3}}%
722

  
723
\newcommand{\vliiq}[5]{\vliiaux{#4}{#5}\vldsiqaux{#1}{#2}{#3}}%
724

  
725
\newcommand{\vldsauxx}{\setbox\derboxtwo=\hbox
726
   {\unhbox\derboxtwo\unhbox\derboxone\kern\derquad}%
727
   \advance\derccdim by\derldim
728
   \advance\derccdim by\dercdim
729
   \advance\derccdim by\derrdim
730
   \advance\derccdim by\derquad}%
731

  
732
\newcommand{\vldsiiiaux}[3]{\derquad=\fontdimen6\textfont2%
733
   {#1}%
734
           \dercldim  =\derldim
735
           \derccdim  =\dercdim
736
   \setbox\derboxtwo=\hbox{\unhbox\derboxone\kern\derquad}%
737
   \advance\derccdim by\derrdim
738
   \advance\derccdim by\derquad
739
   {#2}\vldsauxx
740
   {#3}%
741
   \setbox\derboxone=\hbox{\unhbox\derboxtwo\unhbox\derboxone}%
742
   \advance\derccdim by\derldim
743
   \advance\derccdim by\dercdim
744
           \dercrdim  =\derrdim}%
745

  
746
\newcommand{\vliiin}[6]{\vldsiiiaux{#4}{#5}{#6}\vldsinaux{#1}{#2}{#3}}%
747

  
748
\newcommand{\vliiid}[6]{\vldsiiiaux{#4}{#5}{#6}\vldsidaux{#1}{#2}{#3}}%
749

  
750
\newcommand{\vliiiq}[6]{\vldsiiiaux{#4}{#5}{#6}\vldsiqaux{#1}{#2}{#3}}%
751

  
752
\newcommand{\vldsiiiiaux}[4]{\derquad=\fontdimen6\textfont2%
753
   {#1}%
754
           \dercldim  =\derldim
755
           \derccdim  =\dercdim
756
   \setbox\derboxtwo=\hbox{\unhbox\derboxone\kern\derquad}%
757
   \advance\derccdim by\derrdim
758
   \advance\derccdim by\derquad
759
   {#2}\vldsauxx
760
   {#3}\vldsauxx
761
   {#4}%
762
   \setbox\derboxone=\hbox{\unhbox\derboxtwo\unhbox\derboxone}%
763
   \advance\derccdim by\derldim
764
   \advance\derccdim by\dercdim
765
           \dercrdim  =\derrdim}%
766

  
767
\newcommand{\vliiiin}[7]{\vldsiiiiaux{#4}{#5}{#6}{#7}\vldsinaux{#1}{#2}{#3}}%
768

  
769
\newcommand{\vliiiid}[7]{\vldsiiiiaux{#4}{#5}{#6}{#7}\vldsidaux{#1}{#2}{#3}}%
770

  
771
\newcommand{\vliiiiq}[7]{\vldsiiiiaux{#4}{#5}{#6}{#7}\vldsiqaux{#1}{#2}{#3}}%
772

  
773
\newcommand{\vldsiiiiiaux}[5]{\derquad=\fontdimen6\textfont2%
774
   {#1}%
775
           \dercldim  =\derldim
776
           \derccdim  =\dercdim
777
   \setbox\derboxtwo=\hbox{\unhbox\derboxone\kern\derquad}%
778
   \advance\derccdim by\derrdim
779
   \advance\derccdim by\derquad
780
   {#2}\vldsauxx
781
   {#3}\vldsauxx
782
   {#4}\vldsauxx
783
   {#5}%
784
   \setbox\derboxone=\hbox{\unhbox\derboxtwo\unhbox\derboxone}%
785
   \advance\derccdim by\derldim
786
   \advance\derccdim by\dercdim
787
           \dercrdim  =\derrdim}%
788

  
789
\newcommand{\vliiiiin}[8]{\vldsiiiiiaux{#4}{#5}{#6}{#7}{#8}%
790
                          \vldsinaux{#1}{#2}{#3}}%
791

  
792
\newcommand{\vliiiiid}[8]{\vldsiiiiiaux{#4}{#5}{#6}{#7}{#8}%
793
                          \vldsidaux{#1}{#2}{#3}}%
794

  
795
\newcommand{\vliiiiiq}[8]{\vldsiiiiiaux{#4}{#5}{#6}{#7}{#8}%
796
                          \vldsiqaux{#1}{#2}{#3}}%
797

  
798
\newcommand{\vldsiiiiiiaux}[6]{\derquad=\fontdimen6\textfont2%
799
   {#1}%
800
           \dercldim  =\derldim
801
           \derccdim  =\dercdim
802
   \setbox\derboxtwo=\hbox{\unhbox\derboxone\kern\derquad}%
803
   \advance\derccdim by\derrdim
804
   \advance\derccdim by\derquad
805
   {#2}\vldsauxx
806
   {#3}\vldsauxx
807
   {#4}\vldsauxx
808
   {#5}\vldsauxx
809
   {#6}%
810
   \setbox\derboxone=\hbox{\unhbox\derboxtwo\unhbox\derboxone}%
811
   \advance\derccdim by\derldim
812
   \advance\derccdim by\dercdim
813
           \dercrdim  =\derrdim}%
814

  
815
\newcommand{\vliiiiiin}[9]{\vldsiiiiiiaux{#4}{#5}{#6}{#7}{#8}{#9}%
816
                           \vldsinaux{#1}{#2}{#3}}%
817

  
818
\newcommand{\vliiiiiid}[9]{\vldsiiiiiiaux{#4}{#5}{#6}{#7}{#8}{#9}%
819
                           \vldsidaux{#1}{#2}{#3}}%
820

  
821
\newcommand{\vliiiiiiq}[9]{\vldsiiiiiiaux{#4}{#5}{#6}{#7}{#8}{#9}%
822
                           \vldsiqaux{#1}{#2}{#3}}%
823

  
824
\newcommand{\vlinfaux     }[4]{\vlderivationaux{\vlin  {#1}{#2}{#3}%
825
                                                                {\vlhy{#4}}}}%
826

  
827
\newcommand{\vliqfaux     }[4]{\vlderivationaux{\vliq  {#1}{#2}{#3}%
828
                                                                {\vlhy{#4}}}}%
829

  
830
\newcommand{\vlindaux     }[4]{\vlderivationaux{\vlid  {#1}{#2}{#3}%
831
                                                                {\vlhy{#4}}}}%
832

  
833
\newcommand{\vliinfaux    }[5]{\vlderivationaux{\vliin {#1}{#2}{#3}%
834
                                                                {\vlhy{#4}}%
835
                                                                {\vlhy{#5}}}}%
836

  
837
\newcommand{\vliidfaux    }[5]{\vlderivationaux{\vliid {#1}{#2}{#3}%
838
                                                                {\vlhy{#4}}%
839
                                                                {\vlhy{#5}}}}%
840

  
841
\newcommand{\vliiqfaux    }[5]{\vlderivationaux{\vliiq {#1}{#2}{#3}%
842
                                                                {\vlhy{#4}}%
843
                                                                {\vlhy{#5}}}}%
844

  
845
\newcommand{\vliiinfaux   }[6]{\vlderivationaux{\vliiin{#1}{#2}{#3}%
846
                                                                {\vlhy{#4}}%
847
                                                                {\vlhy{#5}}%
848
                                                                {\vlhy{#6}}}}%
849

  
850
\newcommand{\vliiidfaux   }[6]{\vlderivationaux{\vliiid{#1}{#2}{#3}%
851
                                                                {\vlhy{#4}}%
852
                                                                {\vlhy{#5}}%
853
                                                                {\vlhy{#6}}}}%
854

  
855
\newcommand{\vliiiqfaux   }[6]{\vlderivationaux{\vliiiq{#1}{#2}{#3}%
856
                                                                {\vlhy{#4}}%
857
                                                                {\vlhy{#5}}%
858
                                                                {\vlhy{#6}}}}%
859

  
860
\newcommand{\vliiiinfaux  }[7]{\vlderivationaux{\vliiiin{#1}{#2}{#3}%
861
                                                                {\vlhy{#4}}%
862
                                                                {\vlhy{#5}}%
863
                                                                {\vlhy{#6}}%
864
                                                                {\vlhy{#7}}}}%
865

  
866
\newcommand{\vliiiidfaux  }[7]{\vlderivationaux{\vliiiid{#1}{#2}{#3}%
867
                                                                {\vlhy{#4}}%
868
                                                                {\vlhy{#5}}%
869
                                                                {\vlhy{#6}}%
870
                                                                {\vlhy{#7}}}}%
871

  
872
\newcommand{\vliiiiqfaux  }[7]{\vlderivationaux{\vliiiiq{#1}{#2}{#3}%
873
                                                                {\vlhy{#4}}%
874
                                                                {\vlhy{#5}}%
875
                                                                {\vlhy{#6}}%
876
                                                                {\vlhy{#7}}}}%
877

  
878
\newcommand{\vliiiiinfaux }[8]{\vlderivationaux{\vliiiiin{#1}{#2}{#3}%
879
                                                                {\vlhy{#4}}%
880
                                                                {\vlhy{#5}}%
881
                                                                {\vlhy{#6}}%
882
                                                                {\vlhy{#7}}%
883
                                                                {\vlhy{#8}}}}%
884

  
885
\newcommand{\vliiiiidfaux }[8]{\vlderivationaux{\vliiiiid{#1}{#2}{#3}%
886
                                                                {\vlhy{#4}}%
887
                                                                {\vlhy{#5}}%
888
                                                                {\vlhy{#6}}%
889
                                                                {\vlhy{#7}}%
890
                                                                {\vlhy{#8}}}}%
891

  
892
\newcommand{\vliiiiiqfaux }[8]{\vlderivationaux{\vliiiiiq{#1}{#2}{#3}%
893
                                                                {\vlhy{#4}}%
894
                                                                {\vlhy{#5}}%
895
                                                                {\vlhy{#6}}%
896
                                                                {\vlhy{#7}}%
897
                                                                {\vlhy{#8}}}}%
898

  
899
\newcommand{\vliiiiiinfaux}[9]{\vlderivationaux{\vliiiiiin{#1}{#2}{#3}%
900
                                                                {\vlhy{#4}}%
901
                                                                {\vlhy{#5}}%
902
                                                                {\vlhy{#6}}%
903
                                                                {\vlhy{#7}}%
904
                                                                {\vlhy{#8}}%
905
                                                                {\vlhy{#9}}}}%
906

  
907
\newcommand{\vliiiiiidfaux}[9]{\vlderivationaux{\vliiiiiid{#1}{#2}{#3}%
908
                                                                {\vlhy{#4}}%
909
                                                                {\vlhy{#5}}%
910
                                                                {\vlhy{#6}}%
911
                                                                {\vlhy{#7}}%
912
                                                                {\vlhy{#8}}%
913
                                                                {\vlhy{#9}}}}%
914

  
915
\newcommand{\vliiiiiiqfaux}[9]{\vlderivationaux{\vliiiiiiq{#1}{#2}{#3}%
916
                                                                {\vlhy{#4}}%
917
                                                                {\vlhy{#5}}%
918
                                                                {\vlhy{#6}}%
919
                                                                {\vlhy{#7}}%
920
                                                                {\vlhy{#8}}%
921
                                                                {\vlhy{#9}}}}%
922

  
923
\newcommand{\vlinf     }{\vlderivationinit\vlinfaux     }%
924

  
925
\newcommand{\vlidf     }{\vlderivationinit\vlindaux     }%
926

  
927
\newcommand{\vliqf     }{\vlderivationinit\vliqfaux     }%
928

  
929
\newcommand{\vliinf    }{\vlderivationinit\vliinfaux    }%
930

  
931
\newcommand{\vliidf    }{\vlderivationinit\vliidfaux    }%
932

  
933
\newcommand{\vliiqf    }{\vlderivationinit\vliiqfaux    }%
934

  
935
\newcommand{\vliiinf   }{\vlderivationinit\vliiinfaux   }%
936

  
937
\newcommand{\vliiidf   }{\vlderivationinit\vliiidfaux   }%
938

  
939
\newcommand{\vliiiqf   }{\vlderivationinit\vliiiqfaux   }%
940

  
941
\newcommand{\vliiiinf  }{\vlderivationinit\vliiiinfaux  }%
942

  
943
\newcommand{\vliiiidf  }{\vlderivationinit\vliiiidfaux  }%
944

  
945
\newcommand{\vliiiiqf  }{\vlderivationinit\vliiiiqfaux  }%
946

  
947
\newcommand{\vliiiiinf }{\vlderivationinit\vliiiiinfaux }%
948

  
949
\newcommand{\vliiiiidf }{\vlderivationinit\vliiiiidfaux }%
950

  
951
\newcommand{\vliiiiiqf }{\vlderivationinit\vliiiiiqfaux }%
952

  
953
\newcommand{\vliiiiiinf}{\vlderivationinit\vliiiiiinfaux}%
954

  
955
\newcommand{\vliiiiiidf}{\vlderivationinit\vliiiiiidfaux}%
956

  
957
\newcommand{\vliiiiiiqf}{\vlderivationinit\vliiiiiiqfaux}%
958

  
959
\catcode`@=12
960
\newcommand{\vltrauxx}[5]{\vldaux
961
   {#1}%
962
   {#2}%
963
   {\vlhy{#3}}%
964
   {}%
965
   {\hbox{$\vcenter{\xy
966
          0;<\hsize,0pt>:<0pt,#4\hsize>::
967
          (-0.5,0.5);(0.5,0.5)**\crv{(0.1,0.6)&(-0.1,0.4)};
968
          (0,0)**@{-};(-0.5,0.5)**@{-};
969
          (0,0.273)*{\scriptstyle #5\strut}%
970
          \endxy}$}}%
971
   {\kern\deropen}}%
972
\catcode`\@=11
973

  
974
\newcommand{\vltraux}[3]{\vltrauxx{}{}{#2}{#3}{#1}}%
975

  
976
\newcount\vltrindc
977
\newdimen\vltrindd
978

  
979
\newcommand{\vltrlaux}[5]{\ifdim\derccdim>\dercdim\vldummycount=\derccdim
980
                             \else\vldummycount=\dercdim
981
                             \fi
982
                          \FPmul\vltrindc{\the\vldummycount}{0.25}%
983
                          \vltrindd=\vltrindc sp
984
                          \advance\vltrindd by-10pt%
985
   \vltrauxx{\scriptstyle #2\strut\kern-\vltrindd}%
986
            {\kern-\vltrindd\scriptstyle #3\strut}{#4}{#5}{#1}}%
987

  
988
\newcommand{\vltrauxxx}[2]{{#2}\vlstemaux\vldaux
989
   {}%
990
   {}%
991
   {\vlhy{#1}}%
992
   {\kern-\ht\strutbox\kern-\dp\strutbox}%
993
   {}%
994
   {}}%
995

  
996
\newcommand{\vltrf }[6]{\vltrauxxx{#2}%
997
                        {\vldsiiiaux{#3}{#4}{#5}\vltraux{#1}{}{#6}}}%
998

  
999
\newcommand{\vltrlf}[8]{\vltrauxxx{#4}%
1000
                        {\vldsiiiaux{#5}{#6}{#7}\vltrlaux{#1}{#2}{#3}{}{#8}}}%
1001

  
1002
\newcommand{\vltr }[5]{\vltrf{#1}{#2}{#3}{#4}{#5}1}%
1003

  
1004
\newcommand{\vltrl}[7]{\vltrlf{#1}{#2}{#3}{#4}{#5}{#6}{#7}1}%
1005

  
1006
\newcommand{\vltreeder }[5]{\vlderivation{\vltr{#1}{#2}{\vlhy{#3}}%
1007
                                                       {\vlhy{#4}}%
1008
                                                       {\vlhy{#5}}}}%
1009

  
1010
\newcommand{\vltreederl}[7]{\vlderivation{\vltrl{#1}{#2}{#3}{#4}{\vlhy{#5}}%
1011
                                                                {\vlhy{#6}}%
1012
                                                                {\vlhy{#7}}}}%
1013

  
1014
\newcommand{\vlvdots}{\vbox to12pt{\vfil\hbox{$\smash\vdots$}}}%
1015

  
1016
%------------------------------------------------- END OF MACROS FOR DERIVATIONS
1017

  
1018
%----------------------------------------------------- MACROS FOR OPEN DEDUCTION
1019

  
1020
\newif\ifodframe          \odframetrue
1021
\newif\ifodframefirst     \odframefirsttrue
1022
\newif\ifodbackground     \odbackgroundfalse
1023
\newif\ifodbackgroundfirst\odbackgroundfirsttrue
1024

  
1025
\newcount\odback
1026
\newcount\odframe
1027

  
1028
\newcommand{\odboxed}[1]{%
1029
   \ifnum\odback=0
1030
      \ifnum\odframe=0
1031
         \hbox{$\vcenter{%
1032
         \vbox{\kern\fboxrule
1033
         \hbox{\kern\fboxrule$#1$%
1034
               \kern\fboxrule}%
1035
               \kern\fboxrule}%
1036
         }$}%
1037
      \else
1038
         \colorlet{currentcolor}{.}%
1039
         {\color{currentcolor!\the\odframe}\fbox{\color{currentcolor}$#1$}}%
1040
      \fi
1041
   \else
1042
      \colorlet{currentcolor}{.}%
1043
      \fcolorbox{currentcolor!\the\odframe}{currentcolor!\the\odback}{$#1$}%
1044
   \fi}%
1045

  
1046
\newcommand\odbox[1]{\odframe=100\setlength{\fboxsep}{2pt}%
1047
                                 \setlength{\fboxrule}{.25pt}\odboxed{#1}}%
1048

  
1049
\newcommand{\odsetframes}{\ifodbackground\ifodbackgroundfirst
1050
                                                   \odbackgroundfirstfalse
1051
                                                   \odback =0%
1052
                                                   \setlength{\fboxsep}{0pt}%
1053
                                                   \odframe=0%
1054
                                         \else\advance\odback by5%
1055
                                              \odframe=\odback
1056
                                              \ifodframe\odframe=100%
1057
                                              \setlength{\fboxsep}{2pt}%
1058
                                              \setlength{\fboxrule}{.25pt}%
1059
                                              \fi
1060
                                         \fi
1061
                          \else\setlength{\fboxsep}{0pt}%
1062
                          \fi
1063
                          \ifodframe\ifodframefirst\odframefirstfalse
1064
                                                   \odframe=0%
1065
                                    \else          \odframe=100%
1066
                                                   \setlength{\fboxsep}{2pt}%
1067
                                                   \setlength{\fboxrule}{.25pt}%
1068
                                    \fi
1069
                          \else     \odframe=0%
1070
                          \fi}%
1071

  
1072
\newcommand{\odderivationinit}{\bgroup
1073
   \odsetframes
1074
   \vlprepstructures\vlderivationinitaux}%                            % dr
1075

  
1076
\newcommand{\odderivationaux}[1]{#1\odboxed
1077
                                 {\vcenter{\copy\derboxone}}\vlderivationterm}%
1078

  
1079
\newcommand{\od        }   {\odderivationinit\odderivationaux}%
1080

  
1081
\newcommand{\odp       }[3]{\vlpr{#1}{#3}{\vls #2}}%
1082

  
1083
\newcommand{\odP       }[3]{\vlpd{#1}{#3}{\vls #2}}%
1084

  
1085
\newcommand{\odpx      }[4]{\vlpf{#1}{#3}{\vls #2}{#4}}%
1086

  
1087
\newcommand{\odproofaux}[4]{\odderivationaux{\vlpf{#2}{#4}{\vls #3}{#1}}}%
1088

  
1089
\newcommand{\odr       }   {\odderivationinit\odproofaux1}%
1090

  
1091
\newcommand{\odR       }   {\odderivationinit\odproofaux2}%
1092

  
1093
\newcommand{\odd       }[4]{\vldf{#2}{#4}{\vls #3}{\vls #1}1}%
... Ce différentiel a été tronqué car il excède la taille maximale pouvant être affichée.

Formats disponibles : Unified diff