SIGACT News Logic Column 15
Riccardo Pucella
Boston
MA 02115 USA
logic-coalgcorr.tex

\documentclass[11pt]{article}

\usepackage{SIGACTNews}

%
%
%

\newcommand{\COLUMNsplit}{\vskip 2em\hrule \vskip 3em}

\newcommand{\COLUMNguest}[2]{%
%
%
%
  \begin{center}%
%
   {\LARGE\bf #1 \par}%
    \vskip 1.5em%
    {\Large
      \lineskip .75em%
      \begin{tabular}[t]{c}%
        #2
      \end{tabular}\par}%
    \vskip 1.5em%
  \end{center}%
  \par}


%
%
%

\lefthyphenmin=2
\righthyphenmin=3


%

\usepackage[german, english]{babel}
\usepackage[all]{xy}
%
\usepackage{bbm}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
%
%
%
%
\usepackage[dvips]{graphicx}

\newcommand{\npskip}{\vspace{-\parskip}}
\newenvironment{npenumerate}{\npskip\begin{enumerate}}{\end{enumerate}}

\newcommand{\mmskip}{\par\medskip\vspace{-\parskip}}
\newcommand{\pskip}{\par\vspace{2ex plus 0.5ex minus 0.2ex}\vspace{-\parskip}\noindent}
\newcommand{\sskip}{\par\smallskip\vspace{-\parskip}\noindent}
\newcommand{\nskip}{\par\vspace{-\parskip}\noindent}

%
\renewcommand{\phi}{\varphi} 

%
\newcommand{\imp}{\ensuremath{\rightarrow}}
\newcommand{\biimp}{\ensuremath{\leftrightarrow}}
\newcommand{\et}{\ensuremath{\wedge}} %
\newcommand{\Et}{\ensuremath{\bigwedge}} %
\newcommand{\ou}{\ensuremath{\vee}} %
\newcommand{\Ou}{\ensuremath{\bigvee}} %
\newcommand{\fa}{\ensuremath{\forall}}
\newcommand{\ex}{\ensuremath{\exists}}
%
%


%
\newcommand{\deriv}{\ensuremath{\mathrel{\vdash}}}
%
  %
\newcommand{\notmodels}{\ensuremath{\mathrel{\mathpalette\notmodelss\models}}}
  \newcommand{\notmodelss}[2]{\ooalign{$\hfil#1\mkern1mu/\hfil$\crcr$#1#2$}}
  %
\newcommand{\modelsb}{\ensuremath{\mathrel{\mathpalette\modelsbb\models}}}
\newcommand{\modelsbb}[2]{\ooalign{$\hfil#1\mkern3mu\models\hfil$\crcr$#1#2$}}
\newcommand{\modelsbp}{\modelsb}

%
\newcommand{\oif}{\ensuremath{\;\Rightarrow\;}} %
\newcommand{\si}{\ensuremath{\;\Leftarrow\;}} %
\newcommand{\ssi}{\ensuremath{\;\Leftrightarrow\;}} %
\newcommand{\y}{\ensuremath{\;\&\;}} %
%
\newcommand{\Oif}{\ensuremath{\:\;\Longrightarrow\;\:}} %
%
\newcommand{\Ssi}{\ensuremath{\;\;\Longleftrightarrow\;\;}} %


%
%
%
%
%


%
%
%
%
%
%

\newcommand{\sem}[1]{[\![#1]\!]}














\newcommand{\too}{\longrightarrow}
\newcommand{\inv}{{^{-1}}}
\newcommand{\dotrel}{\mathrel{.}}
\newcommand{\st}{\mathrel{.}} %
\newcommand{\eps}{\varepsilon}
\newcommand{\Real}{\mathbb{R}}


%
%
\newcommand{\bbtwo}{\mathbbm{2}}

\newcommand{\bbA}{\mathbb{A}}
\newcommand{\bbB}{\mathbb{B}}
\newcommand{\bbF}{\mathbb{F}}
\newcommand{\bbG}{\mathbb{G}}
\newcommand{\bbN}{\mathbb{N}}
\newcommand{\bbQ}{\mathbb{Q}}
\newcommand{\bbR}{\mathbb{R}}
\newcommand{\bbX}{\mathbb{X}}
\newcommand{\bbY}{\mathbb{Y}}
\newcommand{\bbZ}{\mathbb{Z}}

%
%
%
%
%
%
%
%
%
%
%

%
\newcommand{\acal}{\mathcal{ A}} 
\newcommand{\bcal}{\mathcal{ B}} 
\newcommand{\ccal}{\mathcal{ C}} 
\newcommand{\dcal}{\mathcal{ D}} 
\newcommand{\ecal}{\mathcal{ E}} 
\newcommand{\fcal}{\mathcal{ F}}
\newcommand{\gcal}{\mathcal{ G}} 
\newcommand{\hcal}{\mathcal{ H}} 
\newcommand{\ical}{\mathcal{ I}} 
\newcommand{\jcal}{{\mathcal J}}
\newcommand{\kcal}{{\mathcal K}}
\newcommand{\lcal}{\mathcal{ L}} 
\newcommand{\mcal}{\mathcal{ M}} 
\newcommand{\ncal}{\mathcal{ N}} 
\newcommand{\ocal}{\mathcal{ O}} 
\newcommand{\pcal}{\mathcal{ P}} 
\newcommand{\qcal}{\mathcal{ Q}} 
\newcommand{\rcal}{\mathcal{ R}} 
\newcommand{\scal}{\mathcal{ S}} 
\newcommand{\tcal}{\mathcal{ T}} 
\newcommand{\ucal}{\mathcal{ U}} 
\newcommand{\vcal}{\mathcal{ V}} 
\newcommand{\wcal}{\mathcal{ W}} 
\newcommand{\xcal}{\mathcal{ X}} 
\newcommand{\ycal}{\mathcal{ Y}} 
\newcommand{\zcal}{\mathcal{ Z}} 


%
\newcommand{\Asf}{\mathsf{A}}
\newcommand{\Bsf}{\mathsf{B}}
\newcommand{\Csf}{\mathsf{C}}
\newcommand{\Dsf}{\mathsf{D}}
\newcommand{\Esf}{\mathsf{E}}
\newcommand{\Fsf}{\mathsf{F}}
\newcommand{\Gsf}{\mathsf{G}}
\newcommand{\Ksf}{\mathsf{K}}
\newcommand{\Psf}{\mathsf{P}}
\newcommand{\Ssf}{\mathsf{S}}
\newcommand{\Tsf}{\mathsf{T}}
\newcommand{\Xsf}{\mathsf{X}}
\newcommand{\Zsf}{\mathsf{Z}}

\newcommand{\esf}{\mathsf{e}}
\newcommand{\isf}{\mathsf{i}}
\newcommand{\ssf}{\mathsf{s}}
\newcommand{\tsf}{\mathsf{t}}



\newcommand{\Rrel}{\mathrel{R}}

%

\newcommand{\Poset}{\mathsf{Poset}}

%
\newtheorem{theorem}{Theorem}[section]
\newtheorem{theorem-conj}{Theorem (Conjecture)}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{lemma-conj}[theorem]{Lemma (Conjecture)}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem*{claim}{Claim}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{question}[theorem]{Question}
\newtheorem{problem}[theorem]{Problem}
\newtheorem{exml}[theorem]{Example (Modal Logic)}
\newtheorem{remark}[theorem]{Remark}
\newtheorem{notation}[theorem]{Notation}
\newtheorem{observation}[theorem]{Observation}

\theoremstyle{remark}
\newtheorem*{rmk}{Remark}
\newtheorem{smexercise}[theorem]{Exercise}



\newcommand{\emphdef}[1]{\textbf{#1}}

%
%
%
%
%
\newcommand{\id}{\mathrm{id}}
\newcommand{\iso}{\cong}
\newcommand{\op}{{^{\mathrm{op}}}}

\newcommand{\Set}{\mathsf{Set}}
\newcommand{\Rel}{\mathsf{Rel}}
\newcommand{\Sob}{\mathsf{Sob}}
\newcommand{\Top}{\mathsf{Top}}
\newcommand{\Frm}{\mathsf{Frm}}
\newcommand{\BA}{\mathsf{BA}}
\newcommand{\CABA}{\mathsf{CABA}}
\newcommand{\DL}{\mathsf{DL}}
\newcommand{\CDL}{\mathsf{CDL}}
\newcommand{\Stone}{\mathsf{Stone}}
\newcommand{\Spec}{\mathsf{Spec}}


\newcommand{\Alg}{\mathsf{Alg}}
\newcommand{\SAlg}{\mathsf{SAlg}}
\newcommand{\MAlg}{\mathsf{MAlg}}
\newcommand{\Coalg}{\mathsf{Coalg}} %

\newcommand{\Id}{\mathit{Id}}
\newcommand{\Pow}{\mathit{\pcal}}

\newcommand{\Powkappa}{{\Pow_\kappa}}
\newcommand{\Powne}{{\Pow_\mathit{ne}}}
\newcommand{\pow}{\mathcal{ P}\hspace{-1.5pt}}
\newcommand{\powk}{\pow_\kappa}
\newcommand{\powf}{\pow_\omega}
\newcommand{\Powfin}{\pow_{\hspace{-3pt}\omega}}


%
%
%
%
 

%
%
%
%
\theoremstyle{remark}
\newtheorem{smtheorem}[theorem]{Theorem}

%
%
%
%
%
%

\theoremstyle{definition}
\newtheorem{defn}[theorem]{Definition}


\newcommand{\adj}{\mathrel{\dashv}}
\newcommand{\emp}{\emptyset}

%
\newcommand{\Proj}{\mathsf{Proj}}
%
\newcommand{\lrule}{/}
\newcommand{\succs}{s}
\newcommand{\Beh}{\mathit{Beh}}

%
\newcommand{\incl}{\hookrightarrow}


%

\renewcommand{\rho}{\varrho}
\renewcommand{\ker}{\mathop{\mathrm{Ker}}}
\newcommand{\Land}{\Et}
\newcommand{\ind}{\hspace{1em}}

\newcommand{\zet}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\nat}{\mathbb{N}}
\newcommand{\onebb}{\mathbbm{1}}


%

\newcommand{\fp}{{{\mathit{fp}}}}
\newcommand{\sfp}{{{\mathit{sfp}}}}
\newcommand{\free}{{{\mathit{free}}}}
\newcommand{\colim}{\mathrm{colim}}


\newcommand{\ins}{\mathit{in}}

\newcommand{\sDiamond}{\mbox{$\Diamond\hspace{-1.9ex}\Diamond\hspace{0.2ex$}}} 
\newcommand{\sBox}{\mbox{$\Box\hspace{-1.45ex}\Box$}} 

\newcommand{\rules}[2]{\mbox{$\frac%
                      {\mbox{\normalsize \rule[-5pt]{0pt}{14pt} $#1$}} 
                      {\mbox{\normalsize \rule[0pt]{0pt}{10pt}$#2$}}$}} 


\newcommand{\pt}{\mathit{Pt}}

\newcommand{\fca}{{\tilde P}} %
\newcommand{\fac}{{\tilde S}} %


\newcommand{\interderiv}{{\dashv\hspace{-.5pt}\vdash}}
\newcommand{\OFrm}{\mathsf{OFrm}}

\newcommand{\Var}{\mathit{Var}}
\newcommand{\Prop}{\mathsf{Prop}}
\newcommand{\PropTVar}{{\Prop(\Var)}}
%
%
%
%
 \newcommand{\PropTempty}{{\Prop_{\emptyset}}}

\newcommand{\Propvar}{\Var}

\renewcommand{\Asf}{A}
\renewcommand{\Bsf}{B}
\renewcommand{\Xsf}{X}
\renewcommand{\bbtwo}{2}


%

\title{SIGACT News Logic Column 15}
\author{Riccardo Pucella\\
Northeastern University\\
Boston, MA 02115 USA\\
riccardo@ccs.neu.edu}
\date{}



\begin{document}

\SIGACTmaketitle


Some comments about the last Logic Column, on nominal logic. 
Pierre Lescanne points out that the terminology ``de Bruijn levels''
was introduced in the paper \emph{Explicit Substitutions with de
  Bruijn's Levels}, by Pierre Lescanne and Jocelyne Rouyer-Degli,
presented at the 1995 RTA conference. 
He also points out that Stoy diagrams were probably invented by Stoy,
but appear in work by Bourbaki as early as 1939 (published in 1954).
Merci, Pierre.

That article also initiated what is bound to be an interesting
discussion. 
The critique of higher-order abstract syntax in that article prompted
Karl Crary and Robert Harper to prepare a response to the leveled
criticisms. 
The response should appear in an upcoming Column.

In this issue, Alexander Kurz describes recent work on the topic of
specifying properties of transition systems. It turns out that by
giving a suitably abstract description of transition systems as
coalgebras, we can derive logics for capturing properties of these
transition systems in a rather elegant way. I will let you read the
details below.

I am always looking for contributions. If you have any suggestion
concerning the content of the Logic Column, or if you would like to
contribute by writing a column yourself, feel free to get in touch
with me. 

\COLUMNsplit


\COLUMNguest{Coalgebras and Their Logics\footnote{\copyright{} Alexander Kurz, 2006.}}
   {Alexander Kurz\\ University of Leicester, UK}

\section{Introduction}

Transition systems pervade much of computer science. This article
outlines the beginnings of a general theory of specification languages
for transition systems. More specifically, transition systems are
generalised to coalgebras. %
Specification languages together with their proof systems, in the
following called (logical or modal) calculi, are presented by the
associated classes of algebras (e.g., classical propositional logic by
Boolean algebras). Stone duality
%
will be used to relate the logics and their coalgebraic semantics.
The relationship between these notions can be summarised as
\begin{equation}\label{picture}
\xymatrix{\textrm{systems} \ar@{-}[r] & \textrm{coalgebras}\\
  \textrm{logic} \ar@{..}[u] \ar@{-}[r] & \textrm{algebras}
  \ar@{-}[u]_{\textrm{Stone duality}} }
\end{equation}

\medskip\noindent Let us have a closer look at the role of Stone
duality, which relates the class $\acal$ of algebras of a
propositional logic to the class $\xcal$ representing the carriers of
the transition systems (i.e., coalgebras). The duality is provided by two
operations $P$ and $S$
\begin{equation}
\label{eins}
\xymatrix{
  {\ \xcal} \ar@/^/[r]^{P} & {\acal \ } \ar@/^/[l]^{S} ,
   }
\end{equation}
%
where $P$ maps a carrier $X$ to its propositional theory and $S$ maps
an algebra $A$ to its `canonical model' ($PX$ and $SA$ are also
called the \emph{dual} of $X$ and $A$, respectively; the reason
for the terminology will become clear later).  The situation in
Diagram~\ref{eins} describes a perfect match of logic and semantics if
both models and theories can be reconstructed (up to isomorphism) from
their dual, formally, if $X\iso SPX$ and $A\iso PSA$ for all
$X\in\xcal$ and $A\in\acal$.

\medskip\noindent As we will explain below, the type of a class of
coalgebras is an operation $T:\xcal\to\xcal$.  This suggests that, in
the same way as a logic for $\xcal$ is given by the algebras in
$\acal$, a logic for $T$-coalgebras is given by the algebras for the
corresponding operation $L$ on $\acal$.
%
%
%
%
%
%
%
The Stone duality~(\ref{eins}) then lifts to $L$-algebras and
$T$-coalgebras
\begin{equation}\label{drei}
\xymatrix{
  {\Coalg(T)} \ar@/^/[r]^{\fca} \ar[d]
  & {\Alg(L)\ } \ar@/^/[l]^{\fac} \ar[d]\\
  {\ \cal X} \ar@(dl,ul)[]^{T} \ar@/^/[r]^{P}
   & {\acal\ } \ar@/^/[l]^{S} \ar@(dr,ur)[]_{L} 
  \\
}
\end{equation}
The logical interpretation of the upper duality is that the logic
corresponding to $\Alg(L)$ is (strongly) complete and characterises
bisimilarity wrt the transition system $\Coalg(T)$.
%
This will be explained in Section~\ref{sec:lc}.
Section~\ref{sec:sd} discusses one example of the dualities in
Diagram~\ref{eins} in detail and briefly sketches the more general
picture. The remainder of the introduction is devoted to a more
detailed exposition of the ideas above. Section~\ref{sec:outlook}
summarises what can be gained from this approach and outlines some
research directions. Definitions of the few notions from category
theory we need are collected in an appendix.




\subsection{Systems as Coalgebras} 
In its simplest form, a transition system
consists of a set $X$ and a relation $R\subseteq X\times X$. Denoting
by $\pcal$ the operation mapping a set to its powerset, a transition
system can equivalently be described by a map
%
\[
X\stackrel{\xi}{\too} \pcal X
\]
%
where $\xi(x)=\{y | xRy\}$ is the set of successors of $x$. 
%
The structure $(X,\xi)$ is a $\pcal$-\emph{coalgebra}.

\medskip\noindent This description of transition systems is very
flexible. Table~\ref{table:coalgebras} gives some examples of
$T$-coalgebras $(X,\xi)$ for suitable mappings $T:\Set\to\Set$. The
set $C$ appearing in some functors is a constant parameter denoting an
input or output alphabet.
\begin{table}
\renewcommand{\arraystretch}{1.4}
\begin{center}
\begin{tabular}{|l|l|l|}
  \hline
   & $T X$ & $X\stackrel{\xi}{\too} TX$\\
  \hline
  \hline
  1. & $C\times X$ & streams over $C$\\
  \hline
  2. & $C\times X + 1$ & finite or infinite lists over $C$\\
  \hline
  3. & $2\times X^C$ & deterministic automaton with input alphabet $C$\\
  \hline
  4. & $\pcal(C\times X)\iso(\pcal X)^C$ & $C$-labelled transition system\\
  \hline
  5. & $(1+ \dcal X)^C $ & probabilistic transition systems \\
  \hline
  6. & $2^{2^X}$ & predicate transformer\\
  \hline
\end{tabular}
\end{center}
\caption{Examples of Coalgebras}\label{table:coalgebras}
\end{table}
%
The models we have in mind are often systems with a distinguished
initial state (which we also call \emph{pointed} coalgebras or
\emph{processes}).  (1) A coalgebra $ X\to C\times X$ with specified
initial state $x_0$ is a process outputting the infinite stream
$(\mathit{head}(x_0),\mathit{head}(\mathit{tail}(x_0)),\ldots)$ of
elements of $C$, where $\mathit{head}:X\to C$ and $\mathit{tail}:X\to
X$ refer to the two components of $ X\to C\times X$. (2) Here 1
denotes a one-element set, which allows a process to stop; hence, in
addition to streams, one now also allows behaviours given by finite
lists.  (3) The 2 in $2\times X^C$ denotes a two-element set and the
$X\to 2$ part of the coalgebra expresses whether a state is accepting
or not; $X^C$ denotes the set of functions from $C$ to $X$ and $X\to
X^C$ calculates the successor state from a current state and an input
from $C$.  (4) Comparing with (1) and (3), $\pcal(C\times X)$ suggests
to think of the labels in $C$ as outputs and $(\pcal X)^C$ of the
labels as inputs, but both are isomorphic. (5) The
distribution functor $\dcal X$ maps $X$ to the set of discrete
probability distributions.
%
%
%
  (6) Coalgebras $X\to2^{2^X}$ are (in bijective correspondence to)
  predicate transformers $2^X\to 2^X$.

%
\paragraph{Bisimilarity } The crucial observation that makes the
coalgebraic point of view useful is that all of these type
constructors $T$ are functors and that, therefore, $T$-coalgebras come
equipped with a canonical notion of behavioural equivalence or
bisimilarity.

\medskip\noindent Let us explain this important point in more detail.
To say that an operation $T:\Set\to\Set$ is a functor means that $T$
is not only defined on sets but also on functions, mapping $f:X\to Y$
to $Tf:TX\to TY$.  Moreover, $T$ is required to preserve identities
$\id_X:X\to X$, and composition, $T(f\circ g)=Tf\circ Tg$. This allows
us to define a morphism of coalgebras $(X,\xi)\to(Y,\nu)$ as a map
$f:X\to Y$ such that $Tf\circ\xi = \nu\circ f$:
%
\begin{equation}\label{def:morphism}
\xymatrix{
X \ar[r]^{\xi}\ar[d]_{f} & TX \ar[d]^{Tf}\\
Y \ar[r]^{\nu} & TY
}
\end{equation}
%
Coalgebraic \emph{bisimilarity}\label{def-bisim}, or \emph{behavioural
  equivalence}, denoted $\simeq$, is now the smallest equivalence
relation that is invariant under all morphisms: Define $\simeq$ to be
the smallest equivalence relation containing all pairs $x\simeq f(x)$
where $f$ ranges over coalgebra morphisms and $x$ over the domain of
$f$.\footnote{This definition is equivalent to the following one. Two
  states $x,y$ in two coalgebras are bisimilar iff there are two
  coalgebra morphisms $f,g$ such that $f(x)=g(y)$.}


\medskip\noindent Coming back to our introductory example, $\pcal$ is
a functor if we let $\pcal f:\pcal X\to \pcal Y$ map a subset of $X$
to its direct image under $f$. It is now an instructive exercise to
show that coalgebraic bisimilarity agrees with the standard notion of
bisimilarity for (unlabelled) transition systems. For this, one shows
that a map is a coalgebra morphism iff its graph is a bisimulation
between the two transition systems.

\medskip\noindent In examples of Table~\ref{table:coalgebras} we have
the following.  (1,2) Two processes are bisimilar iff their outputs
are the same. (3) Two states are bisimilar iff they accept the same
language. (4) Here coalgebraic bisimilarity is the one known from
modal logic or process algebra and similarly for (5) and (6).

\paragraph{Final Coalgebras } It is often possible to characterise
bisimilarity by a single coalgebra, the so-called final coalgebra.
Formally, a coalgebra is \emph{final} if from any other coalgebra
there is a unique morphism into the final coalgebras. It follows that
two states in two coalgebras are bisimilar iff they are identified by
the unique morphisms into the final coalgebra.  In other words, the
final coalgebra, if it exists, provides a canonical representative for
each class of bisimilar states.

\medskip\noindent In many cases, apart from characterising
bisimilarity, final coalgebras are interesting objects in their own
right. Recognising these structures as final coalgebras allows to
reason about them, sometimes to great advantage, using coinduction
instead of induction. We will not pursue this issue any further here
but only mention some examples. In Table~\ref{table:coalgebras} the
final coalgebra is in (1) the coalgebra of streams over $C$, in (2)
the coalgebra of finite and infinite lists over $C$, in (3) the
coalgebra of all languages (with successors given by language
derivative). In our leading example of $\pcal$-coalgebras the final
coalgebra is the universe of non-well founded sets.




%
\subsection{Modal Logic} 
Let us now turn to logics for coalgebras. One would want such logics
to respect bisimilarity, that is, formulae should not distinguish
bisimilar states. We call such logics modal because it can be argued
that invariance under bisimilarity is the main feature of modal logic.
For example, a theorem of van Benthem states that modal logic is
precisely the fragment of first order logic that is invariant under
bisimilarity. Moreover, either by strengthening the logic allowing for
infinite conjunctions or be restricting the semantics to finitely
branching transition systems, modal logic characterises bisimilarity
in the sense that for each two non-bisimilar states there is a formula
distinguishing them. 

\medskip\noindent Let us first look at the usual modal logic for
unlabelled transition systems, ie,  $\pcal$-coalgebras.  It consists of
classical propositional logic extended by one unary operator $\Box$.
The interpretation of $\Box$ is that of a restricted universal
quantifier, more precisely, $\Box\phi$ holds in state $x$ iff $\phi$
holds in all successors of $x$. We write this as
%
\begin{equation}\label{sem-box-0}
  \sem{\Box \phi}_{(X,R)} = \{ x \mid xRy \oif
  y\in\sem{\phi}_{(X,R)} \} 
\end{equation}
%
  Having seen a logic for $\pcal$-coalgebras, can we generalise this
  to arbitrary functors $T$?

  \medskip\noindent Note first that, semantically, a modal operator
  transforms predicates into predicates. So we could say that a modal
  operator is a suitable operation
%
\[2^X\to 2^X\]
%
where $2^X$ denotes again the set of functions $X\to 2$, or
equivalently, the set of subsets of $X$. 
%
%
But we also want to capture that $\Box$ says something about the
immediate successors of a state, that is, about a single transition
step.  We therefore identify (one-step) modalities $\Box$ for $T$ with
so-called \emph{predicate liftings}\footnote{`Predicate lifting' because
  $\sBox$ lifts a predicate on $X$ to a predicate on $TX$.}
%
\begin{equation}\label{pred-lift}
  \sBox_X: 2^X\to 2^{TX}
\end{equation}
%
which give the semantics of a modal operator $\Box$ wrt a coalgebra
$(X,\xi)$ via
%
\begin{equation}
\xymatrix{
2^X & \ar[l]_{\xi^{-1}} 2^{TX} & 2^X \ar[l]_{\ \sBox_X}\\
}
\end{equation}
%
that is, dropping the subscripts,
%
\begin{equation}\label{sem-box}
  \sem{\Box\phi} = \xi^{-1}\circ \sBox{\sem{\phi}}.
\end{equation}
%
To recover (\ref{sem-box-0}) as a special case of (\ref{sem-box}), one
defines the corresponding predicate lifting as $\sBox Y = \{
Z\subseteq X \mid Z\subseteq Y\}$ for $Y\in 2^X$.


\medskip\noindent How do we guarantee that modal logics for coalgebras
given by predicate liftings are invariant under bisimilarity?  Simply
by requiring that predicate liftings $\sBox_X: 2^X\to 2^{TX}$
%
are natural transformations. Spelling out the definition of a natural
transformation this means that in the following diagram the right-hand
square commutes (for all $f:X\to Y$)
%
\begin{equation}\label{equ:nat}
  \xymatrix@C=60pt{
    2^X & \ar[l]_{\xi^{-1}} 2^{TX} & 2^X \ar[l]_{\ \ \sBox_X} \\
    2^Y \ar[u]_{f\inv} & 
      \ar[l]_{\nu^{-1}} 2^{TY} \ar[u]_{(Tf)\inv} & 
      2^Y \ar[l]_{\ \ \sBox_Y} \ar[u]_{{f}\inv}
  }
\end{equation}
%
If, moreover, $f:(X,\xi)\to (Y,\nu)$ is a coalgebra morphism, then
also the left-hand square commutes and, therefore, the outer rectangle
as well.  The proof of invariance of the logic under bisimilarity
(p.~\pageref{def-bisim}) is now a routine induction on the structure
of the formulae, where the case of modal operators $\Box$ is taken
care of by Diagram (\ref{equ:nat}).





\subsection{Logics as Algebras}
After having explained the basic notions of coalgebras and their
logics, in the remainder of the article, I will sketch a deeper
analysis of the situation.
%
It is based on the insight that logics for coalgebras are in fact
algebras and, moreover, that a logic perfectly captures the
coalgebras if the algebras and coalgebras are related by Stone
duality.


\medskip\noindent Observe that the modal logics discussed above come
in two stages. First, for any coalgebra $(X,\xi)$ we have the Boolean
algebra $2^X$, which corresponds to propositional logic. This logic is
then extended by modal operators $2^X\to 2^X$. Traditionally, these
algebras, called Boolean algebras with operators or modal algebras,
are thought of as given by a carrier $A$ plus boolean operators
$\bot,\neg,\et,\ou$ plus (possibly more than one) modal operator
$\Box$.
%
For example, the modal logic for $\pcal$-coalgebras can be given by
one unary modal operator $\Box$ that preserves top (true) and
conjunction
%
\begin{equation}\label{K}
\Box\top=\top \quad \quad \quad \quad \Box(a\et b) = \Box a \et \Box b \end{equation}
%
This example shows clearly the relationship between algebras and modal
calculi. On the one hand, (\ref{K}) is the equational definition of
the class of modal algebras. On the other hand, (\ref{K}) plus
equational logic provides a calculus for modal logic.  Since modal
logics are more commonly given by Hilbert calculi, we indicate briefly
that both calculi are equivalent in a rather straightforward way.

\medskip\noindent The usual Hilbert calculus of the modal logic for
$\pcal$-coalgebras, denoted \textbf{K}, has as axioms all
propositional tautologies and $\Box(p\imp q)\imp(\Box p\imp \Box q)$;
rules are modus ponens, substitution, and necessitation `from $\phi$
derive $\Box\phi$'. To compare \textbf{K} with the equational calculus
given by (\ref{K}), we write $\vdash_{\textbf{K}}\phi$ and
$\vdash_{\textsf{EL}}\phi=\psi$ for formulae derivable in \textbf{K}
and equations derivable in equational logic. One then shows that
$\vdash_{\textbf{K}}\phi \ssi {\vdash_{\textsf{EL}}\phi=\top}$ and
$\vdash_{\textsf{EL}}\phi=\psi \ssi
{\vdash_{\textbf{K}}\phi\biimp\psi}$. For example, the necessitation
rule is simulated on the equational side by the congruence rule of
equational logic and the first of the axioms~(\ref{K}).
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%

\medskip\noindent Up to now we have only seen standard material from
modal logic. It will now be shown that modal algebras are algebras for
a functor. Since algebras for a functor are, in a precise sense, dual
to coalgebras this will allow us to relate modal algebras (and hence
modal calculi) in a uniform way to their coalgebraic semantics.
%


\medskip\noindent We start by observing that the two-stage process of
building a modal algebra can be made more explicit by saying that a
modal algebra is a Boolean algebra $\Asf$ with a finite-meet
preserving map $\Box: \Asf\rightharpoonup \Asf$. From a technical
point of view, it is inconvenient that $\Asf$ is a Boolean algebra but
$\Box$ is only a meet-semi-lattice morphism, which does not preserve
all of the Boolean structure. This is easily rectified: Modal algebras
are in one-to-one correspondence to algebras for the functor $L$ where
\begin{equation}\label{equ:def-L}
\textrm{$L\Asf$ is  the free Boolean algebra over $\Asf$
considered as a meet-semi-lattice.}
\end{equation}
This means that $L\Asf$ is determined by the property that for each
finite-meet preserving function $\Asf\rightharpoonup\Bsf$ there is a
unique Boolean algebra morphism $L\Asf\to\Bsf$ such that
\begin{equation}
\xymatrix{
L\Asf \ar[r] & \Bsf \\
\Asf \ar@^{->}[u] \ar@^{->}[ur] &
}
\end{equation}
commutes. It follows that Boolean algebra morphisms $L\Asf\to\Asf$
are in one-to-one correspondence with semi-lattice morphisms
$\Asf\rightharpoonup\Asf$. 

\medskip\noindent $L\Asf\to\Asf$ is an \emph{algebra for the functor}
$L$. This notion of an algebra for a functor dualises the notion of a
coalgebra, the arrows going in opposite directions: into the carrier
for algebras and out of the carrier for coalgebras (the appendix gives
a more formal statement of this duality).


\medskip\noindent Let us summarise the relationship between logics and
algebras in our example. Boolean algebras correspond to classical
propositional logic. A functor $L$ specifies an extension of
propositional logic with modal operators. The algebras for this modal
logic are the algebras for the functor $L$.
%
\renewcommand{\arraystretch}{1.4}\label{table:L}
\begin{center}
\begin{tabular}[h]{|l|l|}
  \hline
  class $\BA$ of Boolean algebras & classical propositional logic\\
  \hline
  functor $L:\BA\to\BA$ & modal operators + axioms \\
  \hline
  class $\Alg(L)$ of modal algebras & modal logic\\
  \hline
\end{tabular}
\end{center}
%



\subsection{Relating Algebras and Coalgebras via Stone Duality}

We have explained so far the two horizontal lines of the
picture~(\ref{picture}), namely systems as coalgebras and logics as
algebras. We now come to Stone duality, relating the two. 
%
%
%


%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%
%

%
%
%
%

\medskip\noindent We start by remarking that finitary modal logic does
not describe $\pcal$-coalgebras perfectly in the following sense.
First, finitary logics cannot characterise bisimilarity, that is, they
are not strong enough to distinguish all non-bisimilar states.
Furthermore, there are consistent modal logics that are incomplete in
the sense that there are no $\pcal$-coalgebras satisfying
them.\footnote{This phenomenon appears if the proposition letters of
  the modal axioms are interpreted as ranging over all subsets of the
  carrier of the model (Kripke frame semantics). It does not happen if
  proposition letters receive a fixed interpretation (Kripke model
  semantics).}  There are two ways to rectify this mismatch.

\medskip\noindent The first is based on the observation that $2^X$ is
not only a Boolean algebra but also has infinitary intersections, or
algebraically speaking, $2^X$ is a complete atomic Boolean
algebra.
%
%
This suggests that a perfect description of transition system requires
infinitary propositional logic. This is well-known in process algebra:
For infinitely branching transition systems Hennessy-Milner logic only
characterises bisimilarity if one allows infinite conjunctions.

\medskip\noindent Alternatively, instead of strengthening the logic by
infinitary constructs, one can modify the semantics to take the weaker
expressivity of the logic into account: One equips transition systems
with a notion of `admissible' or `observable' predicate.  For this,
one usually lets carriers consist not of sets but topological spaces
$(X,\ocal X)$.  The topology $\ocal X$ is a subset of $2^X$ encoding
which predicates on $X$ can be expressed by the logic.\footnote{For
  example, consider the modal logic \textbf{K} and a $\pcal$-coalgebra
  that is a tree with initial state $x_0$ having branches of any
  bounded length and one infinite branch. The subset of states
  reachable in bounded branches is not admissible. This corresponds to
  the fact that having an infinite branch is not expressible in the
  finitary logic \textbf{K}.}



\medskip\noindent In the first case, the algebras in
Diagram~\ref{eins} are complete atomic Boolean algebras, so
Diagram~\ref{eins} becomes
%
\begin{equation*}
\xymatrix{
  {\ \Set} \ar@/^/[r]^{P} & {\CABA \ } \ar@/^/[l]^{S} ,
   }
\end{equation*}
%
where $PX=2^X$ and $S$ maps an algebra to its set of
atoms.\footnote{$a$ is an atom if $\bot<a$ and $\bot<b\le a\oif b=a$.}

\medskip\noindent In the second case, the algebras are Boolean
algebras. The corresponding spaces are known as Stone spaces and
Diagram~\ref{eins} becomes
%
\begin{equation*}
\xymatrix{
  {\ \Stone} \ar@/^/[r]^{P} & {\BA \ } \ar@/^/[l]^{S} .
   }
\end{equation*}
Both diagrams are dual equivalences, so from an abstract point of view
they share exactly the same (or rather dual) properties. But the
categories on the right-hand side are categories of algebras that come
with an equational logic. Lifting such a basic duality to a duality of
coalgebras and modal algebras, as indicated in Diagram~\ref{drei},
will provide modal logics for coalgebras.




\subsection{Notes}

{%

  \noindent References to Stone duality will be given in the next
  section. The standard reference for systems and coalgebras is
  Rutten~\cite{rutten:uc-j}. The duality of algebras/coalgebras and
  induction/coinduction are explained in detail in the tutorial by
  Jacobs and Rutten~\cite{jaco-rutt:tutorial}. Further introductions
  are provided by the course notes of Gumm~\cite{gumm:uc},
  Pattinson~\cite{pattinson:nasslli}, and Kurz~\cite{kurz:esslli01}
  and the forthcoming book by Jacobs~\cite{jacobs:intro-coalg}. 


\medskip\noindent\textbf{Coalgebras } 
Motivated by Milner's CCS (4 in Table~\ref{table:coalgebras}), Aczel
\cite{aczel:nwfs} introduced the idea of coalgebras for a functor $T$
as a generalisation of transition systems.  He also made three crucial
observations: (1) coalgebras come with a canonical notion of
bisimilarity; (2) this notion generalises the notion from computer
science and modal logic; (3) any `domain equation' $X\cong TX$ has a
canonical solution (in sets or classes), namely the final coalgebra,
which is fully abstract wrt behavioural equivalence.

\medskip\noindent This idea of a type of dynamic systems being
represented by a functor $T$ and an individual system being an
$T$-coalgebra, led Rutten \cite{rutten:uc-j} to the theory of
universal coalgebra which, parameterised by $T$, applies in a
\emph{uniform} way to a large class of different types of systems.  In
particular, final semantics and the associated proof %
principle of coinduction (which are dual to initial algebra semantics
and induction) find their natural place here.

\medskip\noindent The following references provide details on the
examples in Table~\ref{table:coalgebras}. Stream coalgebras have been
studied by Rutten in a number of papers, see e.g. \cite{rutten:tcs05}.
For the example of deterministic automata as coalgebras see
Rutten~\cite{rutten:automata}.  Probabilistic transition system as
coalgebras go back to Rutten and de
Vink~\cite{vink-rutt:prob-bisim-j}. Coalgebras for the double
contravariant powerset functor are investigated in Kupke and
Hansen~\cite{hans-kupk:cmcs04}.

\medskip\noindent 
The idea of systems as coalgebras and the paradigm of final
semantics---together with its associated
principles of coinduction%
%
%
---has been applied to such different topics as, for example, automata
theory \cite{rutten:automata}, combinatorics \cite{rutten:counting},
control theory \cite{kome-schu:dec-sup-con}, denotational semantics of
$\pi$-calculus \cite{FMS96,Sta96}, process calculi and
GSOS-formats
\cite{turi-plot:os,bartels:diss,%
  klin:diss}, probabilistic transition
systems~\cite{bsv:cmcs03-j,cirs-patt:concur04,moss-vigl:cmcs04-j},
%
component-based software development
\cite{arba-rutt:comp-conn,barbosa:components}, and the solution of
recursive program schemes~\cite{mili-moss:rec}.  Modelling classes in
object-oriented programming as coalgebras \cite{reichel:oo,jacobs:oo}
led to new verification tools (LOOP-Tool \cite{berg-jaco:loop}, CCSL
\cite{rtj:ccsl}, \textsc{CoCasl} \cite{mrrs:cocasl}) which also
incorporate reasoning with modal logics based on the research on
coalgebras and modal logic described below.



\medskip\noindent\textbf{Coalgebras and Modal Logic } For background
on modal logic the reader is referred to Blackburn, de Rijke,
Venema~\cite{brv:ml} (Thm~2.68 shows that modal logic is the
bisimulation invariant fragment of first-order logic, Chapter~5 is on
modal algebras, Thm~4.49 gives an example of an incomplete modal
logic). Further material can be found in Venema~\cite{venema:ac}.
Modal algebras as algebras for a functor and their duality to
coalgebras for a functor was first presented in
Abramsky~\cite{abramsky:bctcs88}.

\medskip\noindent Research into coalgebras and modal logic started
with Moss \cite{moss:cl}.  The logic of \cite{moss:cl} is
uniform\footnote{The restrictions are that $T$ is on $\Set$ and has to
  preserve weak pullbacks.}  in the functor $T$, but it does not
provide the linguistic means to decompose the structure of $T$ which
is needed to allow for a flexible specification language. To address
this issue, \cite{kurz:cmcs98-j,roessiger:ml98-j} (independently)
proposed to restrict attention to specific classes of functors and
presented a suitable, but ad hoc, modal logic.  This work was
generalised by Jacobs \cite{jacobs:many-sorted}.  Pattinson showed
that these languages with their ad hoc modalities arise from modal
operators given by predicate liftings.  He gives conditions under
which logics given by predicate liftings are sound and complete
\cite{pattinson:cml-j} and expressive \cite{pattinson:expressive-j}.
Schr{\"o}der~\cite{schroeder:fossacs05} and Klin~\cite{klin:calco05}
show that for any finitary functor $T$ on $\Set$ there is a modal
logic given by predicate liftings that characterises bisimilarity.

\medskip\noindent 
%
From a semantical point of view, modal logic can be considered as dual
to equational logic \cite{kurz:aiml98,kurz:diss}.
\cite{kurz-rosi:cmcs02-j} goes further and shows that coalgebras can
be specified---in the same (or dual) way as algebras---by operations
and equations; moreover, the dual of the algebraic operations turn out
to be bisimilarity preserving predicate transformers, that is, modal
formulae. The results following from this approach work for all
functors but the logics need to be strong enough to express all
possible behaviours.  This needs, in general, infinite conjunctions in
the logics. To study finitary logics, Jacobs \cite{jacobs:many-sorted}
covers some ground towards a duality for coalgebras/generalised BAOs
and
%
%
Goldblatt \cite{goldblatt:obs-ultraproducts}
%
develops a notion of ultrapower for coalgebras. Both approaches are
restricted again to specific classes of functors. In this paper we
argue that, based on Stone duality, it is possible to develop a
uniform account.



}%

\section{Stone Duality}\label{sec:sd}

We will treat Stone duality for Boolean algebras as an illustrative
example and then remark on how it generalises to other cases.

\subsection{The Representation Theorem for Boolean Algebras}
\label{sec:sd:rep-thm}

\medskip The axioms of a Boolean algebra relating $\bot, \neg,
\wedge,\vee$ are the abstract essence of the set-theoretic operations
of empty set, complement, intersection and union.  But how can one show
that the axioms of Boolean algebra are indeed complete? We have to
exhibit, for each non-derivable equation, an algebra of subsets
violating that equation. 

\medskip\noindent Suppose $\phi=\psi$ is not derivable from the axioms
of Boolean algebra. By completeness of equational logic, there is a
Boolean algebra $\Asf$ such that $\Asf\notmodels\phi=\psi$. To
conclude that there is a Boolean algebra of subsets (a field of sets)
that refutes $\phi=\psi$ it is enough to find a set $S\Asf$ and an
injective Boolean algebra morphism
\[\Asf \to PS\Asf 
\]
where $P$ denotes here the operation mapping a set to the Boolean
algebra of its subsets. Indeed, if $\Asf\notmodels\phi=\psi$, then by
injectivity $PS\Asf\notmodels\phi=\psi$, yielding a counterexample for
$\phi=\psi$ in an algebra where all the Boolean operations are
interpreted by their set-theoretic counterparts.

\medskip\noindent How does one get the points of the space $S\Asf$? 
%
%
%
%
%
%
Similarly to defining real numbers as certain collections of
intervals, a point will be a certain collection of elements of $\Asf$,
or, equivalently, a function $A\to 2$. Which of these functions should
be points? Observing that $2$ is not only a set, but also a Boolean
algebra $\bbtwo$, we define
%
$S \Asf = \BA(\Asf,\bbtwo)$
%
where the notation $\BA(\Asf,\Bsf)$ denotes the set of Boolean algebra
morphisms $\Asf\to\Bsf$.  Detailing the definition of an algebra
morphism, it is straightforward to verify that the requirement that
$p:\Asf\to 2$ be an algebra morphism says that $p$ is a maximal and
consistent collection of elements of $A$.  With the canonical map
$\Asf\to PS\Asf$, we can now state Stone's representation theorem
for Boolean algebras.
%
Note that with the definition below, the statement that a point $p$
satisfies the predicate $a$ expresses itself as $p\in\hat a$.
%
\begin{theorem}\label{thm:rep-BA}
The map
 \begin{align}
   \hat{(\cdot)}: \Asf & \too P S \Asf\\
   a & \ \mapsto \ \hat a = \{ p \in S \Asf \mid p(a)=1\} \label{equ:def-hat}
 \end{align}
 is an injective Boolean algebra morphism.
\end{theorem}


\subsection{Stone Duality for Boolean Algebras}
\label{sec:sd:duality}

%
%
%

%
%
%
%


%
The representation theorem works by associating a space to an algebra
(via $S$) and then, vice versa, an algebra to a space (via $P$).
What precisely are the spaces that correspond to algebras?


\medskip\noindent In a first instance, we can say that a space
$(X,\Asf)$ consists of a set $X$ and a Boolean algebra of subsets
$\Asf\subseteq 2^X$ such that (1) any two different points in $X$ are
separated by elements of $\Asf$ and (2) $(X,\Asf)$ is compact, that
is, every collection $\ccal$ of elements of $\Asf$ with the finite
intersection property \footnote{$\ccal$ has the finite-intersection
  property if all finite subset of $\ccal$ have non-empty
  intersection.} has non-empty intersection.  The two properties
capture that the points of the space are determined by the algebra in
the following sense. (1) says that there are not more points than can
be separated by predicates and (2) that there are enough points
to realise every consistent collection of predicates from $\Asf$.

\medskip\noindent Further, one notices that a space $(X,\Asf)$ can be
considered as the topological space $(X,\ocal X)$ with $\ocal X$ being
the topology generated by $\Asf$, that is, the closure of $\Asf$ under
arbitrary unions. One recovers the Boolean algebra $\Asf$ from $\ocal
X$ as the collection of all compact opens. Since in a compact
Hausdorff space a subset is compact iff it is closed, one can replace compact open by clopen (which is brief for closed and open). To summarise:

\begin{definition}
  A Stone space is a topological space that (1) is $T_0$, (2)
  compact, and (3) the clopens are a basis for the topology.
\end{definition}

\noindent Stone spaces with continuous maps form the category $\Stone$.
From the representation theorem and the definition of $\Stone$ we
obtain two operations $S$ and $P$
%
\[
\xymatrix{
\Stone \ar@/^/[r]^{P}& \BA\ar@/^/[l]^{S}
}
\]
%
where $S\Asf$ is the topological space with points $\BA(\Asf,\bbtwo)$
and the topology generated by $\{\hat a\mid a\in \Asf\}$ as in
(\ref{equ:def-hat}); $PX=\Stone(X,2)$ is now the Boolean algebra of
clopens (instead of the full powerset).  We speak of a duality here
because both operations are functors that act on morphism by reversing
the arrows, namely, mapping a morphism $f$ to inverse image $f\inv$.
Moreover, $\Stone$ and $\BA$ are dually equivalent, that is we have
isomorphisms
\begin{align}
\Asf & \iso PS\Asf \label{A} \\
X & \iso SPX \label{X}
\end{align}
(\ref{X}) is injective because $X$ is $T_0$ and surjective
because $X$ is compact. (\ref{A}) is surjective by construction and
injective by the Representation Theorem~\ref{thm:rep-BA}.  To
summarise:

\begin{theorem}
  The categories $\BA$ and $\Stone$ are dually equivalent.
\end{theorem}

\noindent From our presentation, one could get the impression that
topologies come in here accidentally and the logical content of the
duality is completely contained in the representation theorem. I would
reply the following.  First, Stone spaces arise here from logical
considerations but they are of independent interest. A well-known
example is the Cantor middle-third space. In fact, all complete
ultrametric spaces are Stone spaces. Second, the dual equivalence is
nice to have; for example, we then have that the dual of an initial
algebra is the final coalgebra; this will be used in the next section
to show that that modal logics characterise bisimilarity.  Third,
topologies often have an interesting computational perspective arising
from the idea that observable properties are closed under arbitrary
unions but not intersections
\cite{smyth:handbook,vickers:tvl,escardo:st}.  Finally, the
topological perspective suggests and unifies many generalisations,
some of which we briefly review now.



\subsection{A Sketch of the  General Picture}
\label{sec:sd:general}

The variations of Stone duality relevant for the present purposes fit
the following picture. We start with a class $\acal$ of distributive
lattices and $\xcal$ of topological spaces (assumed to be $T_0$).
Think of algebras $A\in\acal$ as propositional theories and of spaces
$X\in\xcal$ as models of propositional theories with the opens (or
compact opens for finitary logics) interpreting the propositions.
There is an operation $P:\xcal\to\acal$, mapping a space to its
algebra of predicates. And an operation $S:\acal\to\xcal$ mapping an
algebra to its `canonical model'.
\begin{equation}\label{equ:basic}
\xymatrix{ 
  {\ \xcal} \ar@/^/[r]^{P} & {\acal \ } \ar@/^/[l]^{S}. 
   } 
\end{equation}
Moreover, in the examples of the table below, $PX=\xcal(X,2)$ and
$SA=\acal(A,2)$ where 2 denotes the appropriate two-element
topological space or two-element algebra.  We speak of a duality,
since $P$ and $S$ work contravariantly on morphisms, mapping a
morphism (that is, algebra morphism or continuous map) $f$ to $f\inv$.
Moreover, there are morphisms
%
\[ \rho_\Asf: \Asf\to PS\Asf \quad\quad\quad\quad \sigma_\Xsf: \Xsf\to SP\Xsf \]
%
and (\ref{equ:basic}) is a dual equivalence if they are bijective.
Logically, this means the following. As we have explained in
Section~\ref{sec:sd:rep-thm}, $\rho_\Asf$ injective means completeness
(and it will, in general, be surjective by definition of $S$ and $P$).
$\sigma_\Xsf$ is injective means, together with $\Xsf$ being $T_0$,
that the logic is expressive in the sense that different points are
separated by some predicate. If $\sigma_\Xsf$ is not surjective, then
$SPX$ has points not available in $X$; thus the logic is not strong
enough to make these additional points inconsistent.

\medskip\noindent We conclude with a table of some relevant examples.

\renewcommand{\arraystretch}{1.4}
\begin{center}
\begin{tabular}{|l|l|l|l|}
  \hline
  $\xcal$ & $\acal$ & spaces/algebras & propositional logic \\
  \hline
  \hline
  $\Set$ & $\CABA$ & sets/complete atomic Boolean algebras & infinitary classical \\
  \hline
 $\Stone$ & $\BA$ & Stone spaces/Boolean algebras & classical \\
  \hline
 $\Spec$ & $\DL$ & spectral spaces/bounded distributive lattices & negation free \\
  \hline
 $\Poset$ & $\CDL$ & posets/complete distributive lattices  & infinitary negation free \\
  \hline
 $\Sob$ & $\Frm$ & sober spaces/frames   & geometric \\
  \hline
\end{tabular}
\end{center}

\noindent In the two last examples, $\rho_\Asf$ is injective for free
algebras $\Asf$ but not for all algebras. Logically, this corresponds
to having completeness but not strong completeness. This also happens
for propositional logic with countable conjunctions. 



\subsection{Notes}

{%

  Three introductory textbooks on Stone duality are
  Vickers~\cite{vickers:tvl}, Davey and Priestley \cite{dave-prie:lo},
  Brink and Rewitzky~\cite{brin-rewi:ps}.
%
%
%
%
%
%
%

  \medskip\noindent Stone duality was introduced by Stone
  \cite{stone:ba, stone:dl}. The main reference for Stone duality is
  Johnstone's book on Stone Spaces \cite{johnstone:stone-spaces} which
  also provides detailed historical information. The handbook article
  \cite{abra-jung:dt} covers the topic from the point of view of
  domain theory. Both texts also provide many more examples of Stone
  dualities. Topological dualities beyond sober spaces, e.g., for
  completely distributive lattices and posets, are treated by
  Bonsangue et al~\cite{bjk:tzero,bonsangue:diss}. The representation
  theorem for propositional logic with countable conjunctions can be
  found in Karp~\cite{karp:infinite}. For applications of complete
  ultrametric spaces to control flow semantics see de Bakker and de
  Vink~\cite{bakk-vink:cfs}. 
}




\section{Logics of Coalgebras}\label{sec:lc}


The previous section discussed dual equivalences (\ref{equ:basic})
%
%
%
%
%
between categories $\xcal$ of topological spaces and categories
$\acal$ of distributive lattices.
%
%
In this section, we extend this picture to $T$-coalgebras. Starting
with a diagram as in (\ref{equ:basic}) and a functor $T$ on $\xcal$,
we dualise $T$ to a functor $L$ on $\acal$. The duality of
$\xcal$/$\acal$ and $T/L$ lifts to a duality of coalgebras and
algebras.
\begin{equation}\label{diag:XA}
\xymatrix{
  {\Coalg(T)} \ar@/^/[r]^{\fca} \ar[d]
  & {\Alg(L)\ } \ar@/^/[l]^{\fac} \ar[d]\\
  {\ \cal X} \ar@(dl,ul)[]^{T} \ar@/^/[r]^{P}
   & {\acal\ } \ar@/^/[l]^{S} \ar@(dr,ur)[]_{L} 
  \\
}
\end{equation}
And in the same way as the duality of $\xcal$ and $\acal$ describes a
logic for $\xcal$, so the duality of $\Coalg(T)$ and $\Alg(L)$
describes a logic for $T$-coalgebras. 


\subsection{Abstract Logics: Using the Duality}\label{sec:lc:abstract}

\medskip\noindent Given a duality as in (\ref{equ:basic}) and a
functor $T$ on $\xcal$, then $PTS$ is the dual of $T$ on $\acal$. In
fact, we will need a bit more liberty and say that $L$ is dual to $T$
if $L$ is isomorphic to $PTS$. Or, equivalently, $L$ is
\emph{dual} to $T$ if there is a natural isomorphism
%
\begin{equation}\label{delta}
\delta_X: LPX\to PTX
\end{equation}
%
Using $\delta$ we can associate to a $T$-coalgebra $(X,\xi)$ its dual
$L$-algebra
\begin{gather*}
  \fca(X,\xi) \ = \    LPX\stackrel{\delta_X}{\too} PTX \stackrel{P\xi}{\too} PX\end{gather*}
and similarly for $S$.
%
%

\medskip\noindent In algebraic logic, logics are described by
operations and equations, and then properties of a logic are studied
by investigating the variety of the algebras for the given operations
and equations. A basic construction is that of the Lindenbaum algebra.
Given a logic $L$, the Lindenbaum algebra $A_L$ is obtained from
quotienting the set of all terms by the smallest congruence derived
from the equations.  Thus, the elements of the Lindenbaum algebra
$A_L$ can be seen as `abstract propositions', or propositions up to
interderivability.  Among all algebras in the variety, the Lindenbaum
algebra is determined by the following property: for any algebra $A$
there is a unique morphism $A_L\to A$, that is, $A_L$ is the initial
algebra.  We turn this into a definition. 

\begin{defn}\label{def:L-logic}
  Denote by $A_L$ the initial $L$-algebra. The elements of $A_L$ are
  called propositions.  The semantics $\sem{\phi}_{(X,\xi)}$ of a
  proposition $\phi$ wrt a coalgebra $(X,\xi)\in\Coalg(T)$ is given by
  the image of $\phi$ under
%
  \[ A_L\too \tilde P (X,\xi) \]   
%
  We write $\Coalg(T)\models (\phi=\psi)$ if for all coalgebras
  $(X,\xi)$ the equation $\phi=\psi$ is satisfied in $\tilde P (X,\xi)$.
\end{defn}

\noindent We remark that Theorem~\ref{thm:present-fun} will explain
precisely in what sense the initial $L$-algebra is a Lindenbaum
algebra.

\begin{theorem}%
\label{thm:invariance}
Propositions are invariant under bisimilarity.
\end{theorem}

\begin{proof}
  Recalling the definition of bisimilarity (p.~\pageref{def-bisim}), we
  have to show, given a coalgebra morphism
  $f:(X,\xi)\to(X',\xi')$ 
  and $x\in X$, that
%
  $x\in\sem{\phi}_{(X,\xi)} \ssi f(x)\in\sem{\phi}_{(X',\xi')}$.
  This follows directly from the fact that the diagram
  \[
  \xymatrix@R=1pc{
    & \fca(X,\xi)\\
    A_L \ar [ur]^{\sem{-}_{(X,\xi)}\ } 
                    \ar [dr]_{\sem{-}_{(X',\xi')}} 
                    & \\
    & \fca(X',\xi')\ar[uu]_{\fca f = Pf = f^{-1}}
  }
  \]
 commutes due to $A_L$ being initial.
\end{proof}

\noindent The essence of completeness wrt to the coalgebraic semantics is: 

\begin{theorem}%
\label{thm:equivalence} 
${\Alg(L)} \models (\phi = \psi) \ \ssi\ {\Coalg(T)}\models (\phi=\psi)$.
\end{theorem}

\begin{proof}
  `$\oif$' (soundness) is immediate from the definitions. `$\si$'
  (completeness) works as in Theorem~\ref{thm:rep-BA}. Suppose
  $A_L\notmodels\phi=\psi$. By injectivity of $A_L\to \tilde P\tilde
  SA_L$ we have $\tilde P\tilde SA_L\notmodels\phi=\psi$. That is, the
  coalgebra $\tilde SA_L$ does not satisfy $\phi=\psi$.
\end{proof}

\noindent We remark that, as apparent from the proof, it is the
representation of the initial (or, more generally, free algebras)
which gives completeness. Since we have a dual equivalence, all
algebras can be represented and we obtain strong completeness
(completeness wrt a set of assumptions).

\begin{theorem}\label{thm:expressive}
  The logic characterises bisimilarity. 
\end{theorem}

\begin{proof}
  Without loss of generality, let us assume that $x,x'$ are two
  different elements of the final coalgebra $\tilde SA_L$. The two
  points can be distinguished by a proposition since $ A_L\to\tilde
  P\tilde SA_L$ is surjective and $\tilde SA_L$ is a $T_0$-space.
\end{proof}

\medskip\noindent To summarise, we have seen how to obtain a logic
that perfectly describes $T$-coalgebras: Just consider as formulae the
elements of the initial $L$-algebra\footnote{If $T:\Set\to\Set$ is
  powerset, then the initial $L$-algebra does not exist for reasons of
  size. But one can still define a class of formulae using the initial
  algebra sequence of $L$. We ignore this slight complication for the
  purposes of exposition.}  where $L$ is the dual of $T$. We called
this logic abstract since it is not explicitly built from modal
operators and axioms. The next subsection explains that modal
operators and axioms are presentations of the functor $L$.




\subsection{Concrete Logics: Presenting Algebras and Functors}
\label{sec:lc:present}

Ultimately, we are interested in relating logical calculi to
transition systems. We have motivated to consider transition systems
as coalgebras and used Stone duality to dualise coalgebras to
algebras. The particular benefit obtained from using Stone duality is
that the algebras thus obtained correspond to logical calculi.  Let us
take a closer look again at the guiding ideas, which have been:

\renewcommand{\arraystretch}{1.4}
\begin{center}
\begin{tabular}[h]{|l|l|}
  \hline
  category of algebras $\acal$ & propositional logic\\
  \hline
  algebra $A$ in $\acal$ & propositional theory \\
  \hline
  functor $L:\acal\to\acal$ & operations and equations for $T$-coalgebras\\
  \hline
  category $\Alg(L)$ & modal logic for $T$-coalgebras\\
  \hline
\end{tabular}
\end{center}

\noindent These correspondences are justified as follows. The
categories $\acal$ obtained from Stone duality can be presented by a
signature $\Sigma$ of operations and equations $E$ in the sense that
$\acal$ is (isomorphic to) the class $\Alg(\Sigma,E)$ of algebras for
the signature $\Sigma$ satisfying $E$. The presentation $\langle
\Sigma,E\rangle$ gives a logical calculus, via equational logic.
%
%
%
%
%
%
An algebra $A\in\acal$ has a presentation $\langle G,R\rangle$ by
generators and relations if $A$ is isomorphic to the quotient of the
free algebra over $G$ by the smallest congruence containing $R$. In
our context, this means that $A$ is the propositional theory given by
variables $G$ and additional axioms $R$, see the example below.
%
%
%
%

\medskip\noindent\textbf{Presenting functors } We emphasised above the
point of view that a propositional logic is a presentation of a
category of algebras. Similarly, it is a presentation of $L$ that
gives rise to the modal operators and its axioms.

\medskip\noindent\emph{Example. } The functor $L:\BA\to\BA$ for
$\pcal$-coalgebras from (\ref{equ:def-L}) is presented by the unary
operator $\Box$ and the equations ($\ref{K}$) in the following sense.
For each $A\in\BA$, the algebra $LA$ is presented by generators
$\{\Box a\mid a\in A\}$ and by relations
$\{(\Box\top,\top)\}\cup\{(\Box(a\et b),\Box a\et \Box b)\mid a,b\in
A\}$.

\medskip\noindent It is not a coincidence that the equations in this
example are of a special format: Roughly speaking, they do not allow
nesting of modal operators. Such terms are called terms of rank~1:

\begin{definition}
  Assume $\acal\iso\Alg(\Sigma,E)$ and a signature $\Sigma'$ (with
  operation symbols disjoint from $\Sigma$). A term in
  $\Sigma+\Sigma'$ is of rank~1 (wrt $\Sigma'$) if it is of the form
  $t(\Box_i(s_{ij}))$ where $t$ is an $n$-ary term in $\Sigma$ and the
  $\Box_i$, $0\le i < n$, are $m_i$-ary operations in $\Sigma'$ and
  the $s_{ij}$, $0\le j<m_i$ are terms in $\Sigma$. An equation $t=s$
  is of rank~1 if both terms are.
\end{definition}

\noindent In our example, the equations~(\ref{K}) are of rank~1. In
particular: $\top$ is a term of rank~1, because $\top$ is a 0-ary term
in the signature $\Sigma$ of Boolean algebras; $\Box(a\et b)$ is a
term of the form $t(\Box(s))$ where $t$ is a variable and $s$ is $a\et
b$. Terms like $\Box a \imp a$ and $\Box a \imp\Box\Box a$ are not of
rank~1. We can now define what it means to present a functor by
operations and equations.

\begin{definition}
  Assume $\acal\iso\Alg(\Sigma_\acal,E_\acal)$, a signature $\Sigma_L$
  and a set of equations $E_L$ that are of rank~1 (wrt $\Sigma_L$).
  $\langle \Sigma_L, E_L\rangle$ is a presentation of
  $L:\acal\to\acal$ if the algebras $LA$ are presented by $\langle
  G_A, R_A\rangle$ where $G_A=\{\sigma(a_i)\mid \sigma\in\Sigma_L,
  a_i\in A\}$ and $R_A$ consists of all substitution instances of
  equations in $E_\acal\cup E_L$ obtained by replacing variables with
  elements from $A$.
\end{definition}

\medskip\noindent Generalising the example above, it now follows that
logics given by predicate liftings correspond to functors
$L:\BA\to\BA$. Indeed, if $\Sigma$ is a collection of predicate
liftings (with arities possibly $>1$), then $\langle
\Sigma,\emptyset\rangle$ presents some functor $L$. Moreover, it is
not hard to see that the two semantics of the modal operators given by
(\ref{sem-box}) and Definition~\ref{def:L-logic} coincide. This also
means that, conversely, any presentation of a functor corresponds to a
collection of predicate liftings (given by $\Sigma_L$) plus some
additional axioms. 

\medskip\noindent The next theorem links the abstract logics from the
previous section with concrete logical calculi. In particular, it
shows that the Lindenbaum algebra of the logic given by operations
$\Sigma_\acal+\Sigma_L$ and equations $E_\acal+E_L$ is the initial
$L$-algebra. The proof that every $L$-algebra satisfies the equations
$E_L$ requires the restriction to rank~1.


\begin{theorem}\label{thm:present-fun}
  Assume $\acal\iso\Alg(\Sigma_\acal,E_\acal)$ and $L:\acal\to\acal$.
  If $L$ has a presentation $\langle \Sigma_L, E_L\rangle$ then
  $\Alg(L)\iso\Alg(\Sigma_\acal+\Sigma_L, E_\acal+E_L)$.
\end{theorem}

\medskip\noindent The theorem can be read in two directions. First,
starting with $T$, we find a presentation for $L$ and obtain
completeness results for modal calculi. Of course, finding a good such
presentation for a functor is usually not straightforward. It is
therefore of interest to know whether arbitrary functors $L$ do have a
presentation. This question has recently received a positive answer
for finitary functors on Boolean algebras and sifted colimits
preserving functors on arbitrary varieties.
%
%
%
I expect that these results can be extended to show
that modal calculi exist for all functors $T$ on $\Set$ and related
categories.

\medskip\noindent Second, one can take a logical calculus and study
the corresponding presented functor. For example, the infinitary
version of the modal calculus $\textbf{K}$ presents the dual
$L:\CABA\to\CABA$ of $\pcal:\Set\to\Set$. We obtain the theorem
mentioned in the introduction that infinitary modal logic
characterises bisimilarity.  Moreover, we also get a strong
completeness result for the infinitary version of the modal calculus
$\textbf{K}$. For $\textbf{K}$ itself we obtain the corresponding
results for the powerspace (also known as Plotkin power domain or
hyperspace) on $\Stone$. Similarly, any modal logic of rank~1 is
expressive and strongly complete for some functor of Stone spaces
(also this may not be intended semantics). This methodology can be
applied to all functors in Table~\ref{table:coalgebras} as
presentations of their duals are known, with the possible exception of
the functors for probabilistic transition systems which deserve some
further attention.


\subsection{Notes}

{%

  \medskip\noindent The application of Stone duality to modal logic
  goes back to J\'onsson and
  Tarski~\cite{jons-tars:bao1,jons-tars:bao2} and then
  Goldblatt~\cite{goldblatt:meta-76}. The idea of relating type
  constructors on algebras (see the $L$ above) and topological spaces
  (see the $T$ above) is from Abramsky's Domain Theory in Logical Form
  \cite{abramsky:dtlf,abramsky:deb}. Compared to
  \cite{abramsky:dtlf,abramsky:deb}, the models we are interested in
  are not only solutions to recursive domain equations (final
  coalgebras) but any coalgebras; moreover, their base category need
  not be a domain but can be a more general topological space.
  Compared to \cite{goldblatt:meta-76}, we use the duality of algebras
  and coalgebras to lift the Stone duality from Boolean logic to modal
  logic. Our functors $L$ (or their presentations) are closely related
  to C\^{\i}rstea's language and proof system constructors
  \cite{cirstea:cmcs03}.

  \medskip\noindent \cite{kkv:cmcs03-j} studies coalgebras over Stone
  spaces to show that they capture the descriptive general frames from
  modal logic and to present a different view on Jacobs many-sorted
  coalgebraic modal logic~\cite{jacobs:many-sorted};
  \cite{palmigiano:cmcs03-j} applies this approach to give a
  coalgebraic analysis of positive modal logic;
  \cite{bons-kurz:fossacs05} proposes to study logics for coalgebras
  via the dual functor and shows that powerspace can be treated in a
  uniform way for different categories of topological spaces;
  \cite{bons-kurz:fossacs06} introduces the notion of a functor
  presented by operations and equations; \cite{kkp:cmcs04} shows that
  logics given by predicate liftings can be described by functors
  $L:\BA\to\BA$; \cite{kkp:calco05} studies the relationship between
  Stone-coalgebras and Set-coalgebras.

}


\section{Outlook}\label{sec:outlook}

The aim of this exposition was to give a principled explanation of 
coalgebras and their logics. It cannot be denied that it took us some
work in Section~\ref{sec:sd} to set up the necessary machinery. On the
other hand, we got paid back with short and easy proofs of
Theorems~\ref{thm:equivalence} and \ref{thm:expressive}. Notice that
these proofs of completeness and expressiveness do not involve any
syntax. The interface between syntax and semantics, so to speak, is
provided by the notion of a presentation of a functor. This provides
an interesting way to reason about different modal logics in a uniform
and syntax independent way.

\medskip\noindent One of the benefits of setting up the theory of
coalgebras and their logics in a way uniform in the functor is
compositionality. For example, given presentations for $L_1$ and
$L_2$, one obtains a presentation of the composition $L_1 L_2$. This
allows us to not only build new types of coalgebras from old ones, but
to do the same for their associated logics (as done already in
Abramsky~\cite{abramsky:dtlf}). The power of this approach is
exemplified by \cite{bons-kurz:pi-log} which derives a logic for
$\pi$-calculus: Using known results and compositionality, a
presentation for the functor of $\pi$-calculus is not difficult to
find and we can then apply the general results.


\medskip\noindent Let us conclude with some further topics.


\medskip\noindent\textbf{The modal logic of a functor } Our original
question has been the following. If universal coalgebra is a general
theory of systems as proposed by Rutten~\cite{rutten:uc-j}, then what
are the logics for coalgebras? More specifically, can the theory of
logics for $T$-coalgebras be developed uniformly in the functor $T$?
The insight alone that, semantically, modal logic is dual to
equational logic \cite{kurz:diss} does not give a handle on relating
coalgebras and their modal calculi. As shown here, this is where Stone
duality comes in. The solution to the original problem of associating
a logic to a functor $T$ now looks in close reach: It will be shown
that, under appropriate conditions, the dual of a functor $T$ has a
presentation, which then provides a strongly complete modal logic
characterising bisimilarity.  This should also allow to generalise
Moss's original work \cite{moss:cl} and provide his logic with a complete
calculus.


\medskip\noindent\textbf{Relating different Stone dualities }
Topology-based models arise either, as in this article, to capture the
expressivity of logics weaker than infinitary classical logic, or in
situations, as in domain theory, where a natural notion of observable
predicate is given. In both cases, it would be interesting to be able
to treat the topology as a parameter. This would allow us to compare
similar models based on different categories of spaces and to study
logics which involve two different Stone dualities, e.g., the ones for
$\BA$ and $\Set$. Ongoing work is based on the idea to consider both
dualities as arising from different completions of one and the same
simpler duality.


\medskip\noindent\textbf{Logics with name binding } The work on the
logic of $\pi$-calculus \cite{bons-kurz:pi-log} suggests that also
other logics with name binding and quantifiers can be usefully treated
in the presented framework. This needs still to be worked out. 


\medskip\noindent\textbf{Coalgebraic modal model theory } In order to
better appreciate the relationship between modal logic and coalgebras,
it would be good to understand in how far known results in modal logic
can be extended to coalgebras. Some work in this direction has been
done on the J\'onsson-Tarski-theorem and ultrafilter extensions
\cite{kkp:calco05}.  There are also new questions brought to modal
logic from coalgebra, for example, how to best deal with infinite
parameters $C$ in Table~\ref{table:coalgebras}, see Friggens and
Goldblatt~\cite{frig-gold:polynomial}.

\medskip\noindent\textbf{Going beyond rank~1 } The original motivation
in using Stone dualities was to understand logics of coalgebras for a
functor $T$. We have seen that a logic for $T$ only needs axioms of
rank~1.  From this point of view, rank~1 is no restriction.  And, of
course, we can deal with axioms of rank $>1$ in a trivial way: axioms
of rank~1 determine a functor $T$ and hence a category $\Coalg(T)$,
whereas the other axioms specify a subcategory of $\Coalg(T)$. So the
question really is whether axioms not of rank~1 can be treated in a
\emph{uniform coalgebraic} way.

\medskip\noindent\textbf{Fixed-point logic } It is straightforward to
extend a basic logic derived from $T$ by fixed-points as in
$\mu$-calculus. But it is not clear at all whether a Stone duality
based approach can help in better understanding fixed-point logics.
Venema~\cite{venema:coalg-aut} and Kupke and
Venema~\cite{kupk-vene:lics05} introduce the notion of coalgebraic
fixed point logic and show that $\mu$-calculus interpreted over
different data structures such as words and trees can be treated
uniformly in a coalgebraic framework.


\appendix\section{Some Notions of Category Theory}

A \emph{category} $\ccal$ consists of a class of objects and has, for
any two objects $A,B$, a set $\ccal(A,B)$ of arrows (or morphisms)
from $A$ to $B$. Furthermore, arrows $f:A\to B, g:B\to C$ have a
composition $g\circ f$ and for each object $A$ there is an identity
arrow $\id_A$.  Examples: The category $\Set$ with sets as objects and
functions as arrows; $\BA$ with Boolean algebras and their
homomorphisms; further, $\Coalg(T)$ and $\Alg(L)$.

\medskip\noindent An \emph{isomorphism} is an arrow $f:A\to B$ for
which there is a $g:B\to A$ with $f\circ g=\id_B, g\circ f=\id_A$.

\medskip\noindent A \emph{covariant functor} between two categories
$F:\ccal\to\dcal$ maps objects to objects and arrows $f:A\to B$ to
$Ff:FA\to FB$, preserving identities and composition. Examples: the
functors $T$ and $L$. 

\medskip\noindent For each category $\ccal$ we have the \emph{dual
  category} $\ccal\op$ obtained from reversing the arrows. Example:
Each functor $F:\ccal\to\ccal$ gives rise to a functor
$F\op:\ccal\op\to\ccal\op$; the duality of algebras and coalgebras can
now be stated as $\Alg(F\op)=\Coalg(F)\op$.

\medskip\noindent A \emph{contravariant functor} $F:\ccal\to\dcal$ is
a covariant functor $\ccal\op\to\dcal$ or, equivalently,
$\ccal\to\dcal\op$, that is, it reverses the direction of the arrows.
Example: $2^-:\Set\to\BA$ maps $f:X\to Y$ to $2^f=f\inv:2^Y\to 2^X$.

\medskip\noindent Given functors $F,G:\ccal\to\dcal$, a \emph{natural
  transformation} $\tau:F\to G$ consists of maps $\tau_A:FA\to GA$,
$A$ in $\ccal$, such that for all $f:A\to A'$ we have
$Gf\circ\tau_A=\tau_{A'}\circ f$.  Example: the predicate
liftings~(\ref{pred-lift}). 

\medskip\noindent Given two functors $F:\ccal\to\dcal$ and
$G:\dcal\to\ccal$, we say that $\ccal$ and $\dcal$ are
\emph{equivalent} if there are natural isomorphisms $\tau_C:C\to
GFC$ and $\sigma_D:D\to FGD$.  $\ccal$ and $\dcal$ are \emph{dually
  equivalent} if $\ccal\op$ and $\dcal$ are equivalent.





%
%

\begin{thebibliography}{10}

\bibitem{abramsky:bctcs88}
S.~Abramsky.
\newblock {A Cook's Tour of the Finitary Non-Well-Founded Sets}.
\newblock Invited Lecture at BCTCS 1988.

\bibitem{abramsky:deb}
S.~Abramsky.
\newblock A domain equation for bisimulation.
\newblock {\em Information and Computation}, 92, 1991.

\bibitem{abramsky:dtlf}
S.~Abramsky.
\newblock Domain theory in logical form.
\newblock {\em Annals of Pure and Applied Logic}, 51, 1991.

\bibitem{abra-jung:dt}
S.~Abramsky and A.~Jung.
\newblock Domain theory.
\newblock In {\em Handbook of Logic in Computer Science}. OUP, 1994.

\bibitem{aczel:nwfs}
P.~Aczel.
\newblock {\em Non-Well-Founded Sets}.
\newblock CSLI, Stanford, 1988.

\bibitem{arba-rutt:comp-conn}
F.~Arbab and J.~Rutten.
\newblock A coinductive calculus of component connectors.
\newblock In {\em WADT'02}, LNCS 2755, 2003.

\bibitem{barbosa:components}
L.~Barbosa.
\newblock Towards a calculus of software components.
\newblock {\em J.~Univ.\ Comp.\ Sci.}, 9, 2003.

\bibitem{bartels:diss}
F.~Bartels.
\newblock {\em On Generalised Coinduction and Probabilistic Specification
  Formats}.
\newblock PhD thesis, Vrije Universiteit Amsterdam, 2004.

\bibitem{bsv:cmcs03-j}
F.~Bartels, A.~Sokolova, and E.~de~Vink.
\newblock A hierarchy of probabilistic system types.
\newblock {\em Theoret.\ Comput. Sci.}, 327, 2004.

\bibitem{brv:ml}
P.~Blackburn, M.~de~Rijke, and Y.~Venema.
\newblock {\em Modal Logic}.
\newblock CUP, 2001.

\bibitem{bjk:tzero}
M.~Bonsangue, B.~Jacobs, and J.~N. Kok.
\newblock Duality beyond sober spaces: Topological spaces and observation
  frames.
\newblock {\em Theoret.\ Comput.\ Sci.}, 151, 1995.

\bibitem{bons-kurz:fossacs05}
M.~Bonsangue and A.~Kurz.
\newblock Duality for logics of transition systems.
\newblock In {\em FoSSaCS'05}, LNCS 3441, 2005.

\bibitem{bons-kurz:pi-log}
M.~Bonsangue and A.~Kurz.
\newblock Pi-calculus in logical form.
\newblock Draft, 2006.

\bibitem{bons-kurz:fossacs06}
M.~Bonsangue and A.~Kurz.
\newblock Presenting functors by operations and equations.
\newblock In {\em FoSSaCS'06}, LNCS 3921, 2006.

\bibitem{bonsangue:diss}
M.~M. Bonsangue.
\newblock {\em Topological Dualities in Semantics}.
\newblock PhD thesis, Vrije Universiteit Amsterdam, 1996.

\bibitem{brin-rewi:ps}
C.~Brink and I.~M. Rewitzky.
\newblock {\em A Paradigm for Program Semantics: Power Structures and Duality}.
\newblock Cambridge University Press, 2001.

\bibitem{cirstea:cmcs03}
C.~C{\^\i}rstea.
\newblock On expressivity and compositionality in logics for coalgebras.
\newblock In {\em CMCS'03}, ENTCS, 2003.

\bibitem{cirs-patt:concur04}
C.~C{\^\i}rstea and D.~Pattinson.
\newblock Modular construction of modal logics.
\newblock In {\em CONCUR'04}, LNCS 3170, 2004.

\bibitem{dave-prie:lo}
B.~A. Davey and H.~A. Priestley.
\newblock {\em Introduction to Lattices and Order}.
\newblock Cambridge University Press, 1990.

\bibitem{bakk-vink:cfs}
J.~de~Bakker and E.~de~Vink.
\newblock {\em Control Flow Semantics}.
\newblock MIT Press, 1996.

\bibitem{vink-rutt:prob-bisim-j}
E.~de~Vink and J.~Rutten.
\newblock Bisimulation for probabilistic transition systems: A coalgebraic
  approach.
\newblock {\em Theoret.\ Comput.\ Sci.}, 221, 1999.

\bibitem{escardo:st}
M.~Escard\'o.
\newblock Synthetic topology of data types and classical spaces.
\newblock {\em ENTCS}, 87, 2004.

\bibitem{FMS96}
M.~Fiore, E.~Moggi, and D.~Sangiorgi.
\newblock A fully-abstract model for the $\pi$-calculus.
\newblock In {\em LICS 96}, 1996.

\bibitem{frig-gold:polynomial}
D.~Friggens and R.~Goldblatt.
\newblock A modal proof theory for final polynomial coalgebras.
\newblock {\em Theoret.\ Comput.\ Sci}.
\newblock To appear.

\bibitem{goldblatt:meta-76}
R.~Goldblatt.
\newblock Metamathematics of modal logic {I}.
\newblock {\em Reports on Mathematical Logic}, 6, 1976.

\bibitem{goldblatt:obs-ultraproducts}
R.~Goldblatt.
\newblock Observational ultraproducts of polynomial coalgebras.
\newblock {\em Ann.\ Pure Appl.\ Logic}, 123, 2003.

\bibitem{gumm:uc}
H.~P. Gumm.
\newblock Elements of the general theory of coalgebras.
\newblock LUATCS'99, 1999.

\bibitem{hans-kupk:cmcs04}
H.~Hansen and C.~Kupke.
\newblock A coalgebraic perspective on monotone modal logic.
\newblock In {\em CMCS'04}, ENTCS 106, 2004.

\bibitem{jacobs:intro-coalg}
B.~Jacobs.
\newblock {\em Introduction to Coalgebra. Towards Mathematics of States and
  Observations}.
\newblock In preparation, draft electronically available.

\bibitem{jacobs:oo}
B.~Jacobs.
\newblock Objects and classes, co-algebraically.
\newblock In {\em Object-Orientation with Parallelism and Persistence}. Kluwer,
  1996.

\bibitem{jacobs:many-sorted}
B.~Jacobs.
\newblock Many-sorted coalgebraic modal logic: a model-theoretic study.
\newblock {\em Theor.\ Inform.\ Appl.}, 35, 2001.

\bibitem{jaco-rutt:tutorial}
B.~Jacobs and J.~Rutten.
\newblock A tutorial on (co)algebras and (co)induction.
\newblock {\em EATCS Bulletin}, 62, 1997.

\bibitem{johnstone:stone-spaces}
P.~Johnstone.
\newblock {\em Stone Spaces}.
\newblock Cambridge University Press, 1982.

\bibitem{jons-tars:bao1}
B.~J{\'o}nsson and A.~Tarski.
\newblock Boolean algebras with operators, part 1.
\newblock {\em Amer.\ J.\ Math.}, 73, 1951.

\bibitem{jons-tars:bao2}
B.~J{\'o}nsson and A.~Tarski.
\newblock Boolean algebras with operators, part 2.
\newblock {\em American Journal of Mathematics}, 74, 1952.

\bibitem{karp:infinite}
C.~Karp.
\newblock {\em Languages with Expressions of Infinite Length}.
\newblock North-Holland, 1964.

\bibitem{klin:diss}
B.~Klin.
\newblock {\em An Abstract Coalgebraic Approach to Process Equivalence for
  Well-Behaved Operational Semantics}.
\newblock PhD thesis, University of Aarhus, 2004.

\bibitem{klin:calco05}
B.~Klin.
\newblock The least fibred lifting and the expressivity of coalgebraic modal
  logic.
\newblock In {\em CALCO'05}, 2005.

\bibitem{kome-schu:dec-sup-con}
J.~Komenda and J.~van Schuppen.
\newblock Decentralized supervisory control with coalgebra.
\newblock In {\em ECC'03}, 2003.

\bibitem{kkp:cmcs04}
C.~Kupke, A.~Kurz, and D.~Pattinson.
\newblock Algebraic semantics for coalgebraic logics.
\newblock In {\em CMCS'04}, ENTCS 106, 2004.

\bibitem{kkp:calco05}
C.~Kupke, A.~Kurz, and D.~Pattinson.
\newblock Ultrafilter extensions of coalgebras.
\newblock In {\em CALCO'05}, LNCS 3629, 2005.

\bibitem{kkv:cmcs03-j}
C.~Kupke, A.~Kurz, and Y.~Venema.
\newblock Stone coalgebras.
\newblock {\em Theoret.\ Comput.\ Sci.}, 327, 2004.

\bibitem{kupk-vene:lics05}
C.~Kupke and Y.~Venema.
\newblock Closure properties of coalgebra automata.
\newblock In {\em LICS'05}, 2005.

\bibitem{kurz:diss}
A.~Kurz.
\newblock {\em {Logics for Coalgebras and Applications to Computer Science}}.
\newblock PhD thesis, {LMU}, 2000.

\bibitem{kurz:aiml98}
A.~Kurz.
\newblock A co-variety-theorem for modal logic.
\newblock In {\em Advances in Modal Logic 2}. CSLI, 2001.

\bibitem{kurz:esslli01}
A.~Kurz.
\newblock {\em Coalgebras and Modal Logic - {C}ourse Notes for {ESSLLI} 2001}.
\newblock University of Helsinki, 2001.

\bibitem{kurz:cmcs98-j}
A.~Kurz.
\newblock Specifying coalgebras with modal logic.
\newblock {\em Theoret.\ Comput.\ Sci.}, 260, 2001.

\bibitem{kurz-rosi:cmcs02-j}
A.~Kurz and J.~Rosick{\'y}.
\newblock Operations and equations for coalgebras.
\newblock {\em Math.\ Structures Comput.\ Sci.}, 15, 2005.

\bibitem{mili-moss:rec}
S.~Milius and L.~Moss.
\newblock The category theoretic solution of recursive program schemes.
\newblock 2006.
\newblock Draft.

\bibitem{moss:cl}
L.~Moss.
\newblock Coalgebraic logic.
\newblock {\em Annals of Pure and Applied Logic}, 96, 1999.

\bibitem{moss-vigl:cmcs04-j}
L.~Moss and I.~Viglizzo.
\newblock Final coalgebras for functors on measurable spaces.
\newblock {\em Inform. and Comput.}
\newblock To appear.

\bibitem{mrrs:cocasl}
T.~Mossakowski, H.~Reichel, M.~Roggenbach, and L.~Schr{\"o}der.
\newblock Algebraic-coalgebraic specification in {CoCASL}.
\newblock In {\em WADT'02}, LNCS 2755, 2003.

\bibitem{palmigiano:cmcs03-j}
A.~Palmigiano.
\newblock A coalgebraic view on positive modal logic.
\newblock {\em Theoret.\ Comput.\ Sci.}, 327, 2004.

\bibitem{pattinson:cml-j}
D.~Pattinson.
\newblock Coalgebraic modal logic: Soundness, completeness and decidability of
  local consequence.
\newblock {\em Theoret.\ Comput.\ Sci.}, 309, 2003.

\bibitem{pattinson:nasslli}
D.~Pattinson.
\newblock An introduction to the theory of coalgebras, 2003.
\newblock {C}ourse Notes for {NASSLLI} 2003.

\bibitem{pattinson:expressive-j}
D.~Pattinson.
\newblock Expressive logics for coalgebras via terminal sequence induction.
\newblock {\em Notre Dame Journal of Formal Logic}, 45, 2004.

\bibitem{reichel:oo}
H.~Reichel.
\newblock An approach to object semantics based on terminal co-algebras.
\newblock {\em Math.\ Structures Comput.\ Sci.}, 5, 1995.

\bibitem{roessiger:ml98-j}
M.~R{\"o}{\ss}iger.
\newblock From modal logic to terminal coalgebras.
\newblock {\em Theoret.\ Comput.\ Sci.}, 260, 2001.

\bibitem{rtj:ccsl}
J.~Rothe, H.~Tews, and B.~Jacobs.
\newblock The coalgebraic class specification language {CCSL}.
\newblock {\em J.~Univ.\ Comp.\ Sci.}, 7, 2001.

\bibitem{rutten:automata}
J.~Rutten.
\newblock Automata and coinduction - an exercise in coalgebra.
\newblock In {\em CONCUR'98}, LNCS 1466, 1998.

\bibitem{rutten:uc-j}
J.~Rutten.
\newblock Universal coalgebra: {A} theory of systems.
\newblock {\em Theoret.\ Comput.\ Sci.}, 249, 2000.

\bibitem{rutten:counting}
J.~Rutten.
\newblock Coinductive counting with weighted automata.
\newblock {\em J.\ Autom.\ Lang.\ Comb.}, 8, 2003.

\bibitem{rutten:tcs05}
J.~Rutten.
\newblock A tutorial on coinductive stream calculus and signal flow graphs.
\newblock {\em Theoret.\ Comput.\ Sci.}, 343, 2005.

\bibitem{schroeder:fossacs05}
L.~Schr\"oder.
\newblock Expressivity of {C}oalgebraic {M}odal {L}ogic: {T}he {L}imits and
  {B}eyond.
\newblock In {\em FoSSaCS'05}, LNCS 3441, 2005.

\bibitem{smyth:handbook}
M.~Smyth.
\newblock Topology.
\newblock In {\em Handbook of Logic in Computer Science}. OUP, 1993.

\bibitem{Sta96}
I.~Stark.
\newblock A fully-abstract domain model for the $\pi$-calculus.
\newblock In {\em LICS 96}, 1996.

\bibitem{stone:ba}
M.~H. Stone.
\newblock The theory of representations for boolean algebras.
\newblock {\em Trans. Amer. Math. Soc}, 40, 1936.

\bibitem{stone:dl}
M.~H. Stone.
\newblock Topological representation of distributive lattices and {B}rouwerian
  lattices.
\newblock {\em \v Casopis p\v est.\ mat. fys.}, 67, 1937.

\bibitem{turi-plot:os}
D.~Turi and G.~Plotkin.
\newblock Towards a mathematical operational semantics.
\newblock In {\em LICS'97}, 1997.

\bibitem{berg-jaco:loop}
J.~van~den Berg and B.~Jacobs.
\newblock The loop compiler for java and jml.
\newblock In {\em TACAS'01}, LNCS 2031, 2001.

\bibitem{venema:coalg-aut}
Y.~Venema.
\newblock Automata and fixed point logics: a coalgebraic perspective.
\newblock {\em Inform. and Comput.}
\newblock To appear.

\bibitem{venema:ac}
Y.~Venema.
\newblock {\em Handbook of Modal Logic}, chapter Algebras and Coalgebras.
\newblock To appear. Electronically available.

\bibitem{vickers:tvl}
S.~J. Vickers.
\newblock {\em Topology Via Logic}.
\newblock CUP, 1989.

\end{thebibliography}


\end{document}


xy.tex
%% xy.tex from $Id: xy.doc,v 3.7 1999/02/16 15:12:50 krisrose Exp $
%%
%% Basic Xy-pictures: Xy-pic bootstrap and kernel macros.
%% Copyright (c) 1991-1999 Kristoffer H. Rose <krisrose@ens-lyon.fr>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% Copyright (c) 1991-1999 Kristoffer H. Rose <krisrose@ens-lyon.fr>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, write to the Free Software Foundation, Inc.,
%% 675 Mass Ave, Cambridge, MA 02139, USA.
%%
\ifx\xyloaded\undefined\else\message{not reloaded}\endinput\fi
\let\xyloaded=\relax
\message{Bootstrap\string'ing\string:}
{\catcode96 12\catcode`\#6\catcode`\.12\catcode`\:12\catcode`\'12\catcode`\@11
\ifx\xywarnifdefined\undefined\else \immediate\write16{}%
 \immediate\write16{Xy-pic Warning: \string\xywarnifdefined\space redefined.}%
 \immediate\write16{}\fi
\gdef\xywarnifdefined#1{\ifx#1\undefined\else \immediate\write16{}%
 \immediate\write16{Xy-pic Warning: `\string#1' redefined.}%
 \immediate\write16{}\fi}
\xywarnifdefined\xydef@ \gdef\xydef@#1{\xywarnifdefined#1\gdef#1}
\xywarnifdefined\xylet@ \gdef\xylet@#1{\xywarnifdefined#1\global\let#1}
\xywarnifdefined\xynew@
 \gdef\xynew@#1#2{\xywarnifdefined#2\csname new#1\endcsname#2}}
\message{catcodes\string,}
\xywarnifdefined\xyuncatcodes
\xywarnifdefined\xyreuncatcodes \def\xyreuncatcodes{\edef\xyuncatcodes{%
 \catcode92 0 \catcode123 1 \catcode125 2 \catcode37 14
 \catcode 9 \the\catcode 9 \catcode10 \the\catcode10 \catcode12 \the\catcode12
 \catcode35 \the\catcode35 \catcode36 \the\catcode36 \catcode38 \the\catcode38 
 \catcode43 \the\catcode43 \catcode45 \the\catcode45 \catcode46 \the\catcode46 
 \catcode47 \the\catcode47 
 \catcode60 \the\catcode60 \catcode61 \the\catcode61 \catcode62 \the\catcode62 
 \catcode64 \the\catcode64 \catcode96 \the\catcode96
 \newlinechar \the\newlinechar \endlinechar \the\endlinechar }}
\xyreuncatcodes
\xywarnifdefined\xycatcodes \def\xycatcodes{%
 \catcode 9 10
 \catcode 35 6 \catcode 36 3 \catcode 38 4
 \catcode 43 12 \catcode 45 12 \catcode 46 12 \catcode 47 12
 \catcode 60 12 \catcode 61 12 \catcode 62 12
 \catcode 64 11 \catcode 96 12 }
\xycatcodes
\message{docmode,}
{\catcode`\|0 \xywarnifdefined|DOCMODE
\gdef|DOCMODE#1{\ifx(#1\relax \xycatcodes \expandafter\ignorespaces
 \else \skipspecials@ \expandafter\docm@\fi}%
\xywarnifdefined\skipspecials@
\gdef\skipspecials@{%
 \catcode`\\12 \catcode`\{12 \catcode`\}12 \catcode`\#12 \catcode`\%12
 \catcode`\^^L12 \endlinechar`\^^J }%
\catcode`\/=12 \lccode`\/`\\%
\lccode`\D`\D \lccode`\O`\O \lccode`\C`\C \lccode`\M`\M \lccode`\E`\E
\lowercase{%
\xywarnifdefined\docm@ \gdef\docm@{\docm@i}%
\xywarnifdefined\docm@i \gdef\docm@i#1^^J{\docm@ii#1/DOCMODE\docm@iii}%
\xywarnifdefined\docm@ii
 \gdef\docm@ii#1/DOCMODE{\def\next@{#1}\futurelet\next\docm@iii}%
\xywarnifdefined\docm@iii \gdef\docm@iii#1\docm@iii{%
 \ifx\next\docm@iii \let\next\next@ \docecho@ \let\next@\docm@
 \else\ifx\next@\empty \let\next@\docfinish@
 \else \edef\next@{\noexpand\docm@iv\next@/DOCMODE#1\noexpand\docm@iv}%
 \fi\fi \next@}%
\xywarnifdefined\docm@iv
 \gdef\docm@iv#1/DOCMODE\docm@iv{\def\next{#1}\docecho@ \docm@}}%
\xywarnifdefined\docecho@ \global\let\docecho@\relax
\xywarnifdefined\docfinish@ \gdef\docfinish@{\xyuncatcodes|DOCMODE\next}}
\xydef@\xydefcsname@#1{\DN@{#1}\DNii@##1{%
 \ifx ##1\relax\else \xywarning@{\string`\string##1\string' redefined}\fi
 \def##1}%
 \expandafter\nextii@\csname\codeof\next@\endcsname}
\xydef@\xyletcsnamecsname@#1#2{\def\1{#1}\def\2{#2}\DN@##1##2{%
 \ifx ##1\relax\else \xywarning@{`\string##1\string' redefined}\fi
 \let##1=##2}%
 \expandafter\expandafter\expandafter\next@
 \expandafter\csname\expandafter\codeof\expandafter\1\expandafter\endcsname
 \csname\codeof\2\endcsname}
\xywarnifdefined\codeof
\xywarnifdefined\codeof@
{\catcode`\:=12
 \gdef\codeof#1{\expandafter\codeof@\meaning#1<-:}
 \gdef\codeof@#1:->#2<-:{#2}}
\xywarnifdefined\addAT@
\xywarnifdefined\addHASH@
\xywarnifdefined\addDOLL@
\xywarnifdefined\addAND@
\xywarnifdefined\addRQ@
\xywarnifdefined\addPLUS@
\xywarnifdefined\addDASH@
\xywarnifdefined\addDOT@
\xywarnifdefined\addLT@
\xywarnifdefined\addEQ@
\xywarnifdefined\addGT@
\xywarnifdefined\addLQ@
\xydef@\xymakeADD@#1#2 #3 {\ifnum\catcode#3=6 \def#1##1{##1#2#2}%
 \else \def#1##1{##1#2}\fi}
\xydef@\xyrecat@{\xymakeADD@\addAT@}
\xydef@\xyrecat{\xyrecat@}
\xydef@\xyresetcatcodes{\def\xyrecat{\xyrecat@}\xyreuncatcodes
 \input xyrecat \relax \xyuncatcodes}
\xyuncatcodes \xyresetcatcodes \xycatcodes
\xydef@\testAND@{{\aftergroup\ifx 
 \addAND@\ifx\next\addFalse@\else\addTrue@\fi}}
\xydef@\addFalse@{\aftergroup\iffalse}
\xydef@\addTrue@{\aftergroup\iftrue}
\input xyidioms
\xydef@\stripRCS$#1${\stripRCS@#1: @@ @@@}
\xydef@\stripRCS@#1: #2@ #3@@@{%
 \ifx @#2\string?\else\ifx :#2\else\stripRCS@@#2\fi\fi}
\xydef@\stripRCS@@#1 #2: @{#1}
\edef\next{\stripRCS$Revision: 3.7 $}
\xylet@\xyversion=\next
\edef\next{\stripRCS$Date: 1999/02/16 15:12:50 $}
\xylet@\xydate=\next
\xydef@\Xygreet@{%
 \W@{}%
 \W@{ Xy-pic version \xyversion\space<\xydate>}%
 \W@{ Copyright (c) 1991-1998 by Kristoffer H. Rose <krisrose@ens-lyon.fr>}%
 \W@{ Xy-pic is free software: see the User\string's Guide for details.}%
 \W@{}}
\Xygreet@
\expandafter\everyjob\expandafter{\the\everyjob\Xygreet@}
\message{Loading kernel:}
\xydef@\Xy{\leavevmode
 \hbox{\kern-.1em X\kern-.3em\lower.4ex\hbox{Y\kern-.15em}}}
\message{messages;}
\xywarnifdefined\thelineno@
\ifx\inputlineno\undefined \edef\thelineno@{\string?}
\else \def\thelineno@{\the\inputlineno}\fi
\xydef@\xytracelineno@{ \string[\jobname:\thelineno@\string]}
\xydef@\xywarning@#1{{\newlinechar=10
 \W@{}\W@{Xy-pic Warning: #1\xytracelineno@.}\W@{}}}
\xydef@\xyerror@#1#2{\if\inxy@\xy@{ERROR #1}{}\fi
 {\def\2{#2}\newlinechar=10
 \ifx\2\empty \errhelp{See the Xy-pic manual for further information.}%
 \else \errhelp{#2}\fi
 \errmessage{Xy-pic error: #1}}}
\xydef@\xybug@#1{{\newlinechar=10
 \errhelp{This is a bug in Xy-pic and should not happen!^^J%
If it did then please send a bug report with the offending Xy-pic code^^J%
to the author of Xy-pic, krisrose@ens-lyon.fr.}%
 \errmessage{Xy-pic BUG: #1 -- notify krisrose@ens-lyon.fr.}}}
\message{fonts;}
\xydef@\xyfont@#1{\ifx#1\undefined \DN@{\global\font#1}\expandafter\next@
 \else \xywarning@{Using previously loaded \string#1\space font}\fi}
\xyfont@\xydashfont=xydash10
\xydef@\xydashl@{\fontdimen6\xydashfont}
\xydef@\xydashh@{\fontdimen5\xydashfont}
\xydef@\xydashw@{\fontdimen8\xydashfont}
\xyfont@\xyatipfont=xyatip10
\xyfont@\xybtipfont=xybtip10
\xyfont@\xybsqlfont=xybsql10
\xydef@\xybsqll@{\fontdimen6\xybsqlfont}
\xydef@\xybsqlh@{\fontdimen5\xybsqlfont}
\xydef@\xybsqlw@{\fontdimen8\xybsqlfont}
\xyfont@\xycircfont=xycirc10
\message{allocations:}
\message{state,}
\xynew@{dimen}\X@c
\xynew@{dimen}\Y@c
\xynew@{dimen}\U@c
\xynew@{dimen}\D@c
\xynew@{dimen}\L@c
\xynew@{dimen}\R@c
\xynew@{toks}\Edge@c
\xynew@{dimen}\X@p
\xynew@{dimen}\Y@p
\xynew@{dimen}\U@p
\xynew@{dimen}\D@p
\xynew@{dimen}\L@p
\xynew@{dimen}\R@p
\xynew@{toks}\Edge@p
\xynew@{dimen}\X@origin \X@origin=\z@
\xynew@{dimen}\Y@origin \X@origin=\z@
\xynew@{dimen}\X@xbase \X@xbase=1mm
\xynew@{dimen}\Y@xbase \Y@xbase=\z@
\xynew@{dimen}\X@ybase \X@ybase=\z@
\xynew@{dimen}\Y@ybase \Y@ybase=1mm
\xynew@{dimen}\X@min
\xynew@{dimen}\Y@min
\xynew@{dimen}\X@max
\xynew@{dimen}\Y@max
\xynew@{box}\lastobjectbox@
\xynew@{box}\zerodotbox@
\setbox\zerodotbox@=\hbox{\dimen@=.5\xydashw@
 \kern-\dimen@ \vrule width\xydashw@ height\dimen@ depth\dimen@}
\wd\zerodotbox@=\z@ \ht\zerodotbox@=\z@ \dp\zerodotbox@=\z@
\xynew@{dimen}\almostz@ \almostz@=50sp
\xydef@\zz@#1{\ifdim#1<\z@-\fi#1<\almostz@\relax}
\xynew@{if}\iftmp@
\message{direction,}
\xynew@{dimen}\d@X
\xynew@{dimen}\d@Y
\xydef@\sd@X{}
\xydef@\sd@Y{}
\xynew@{count}\K@ \K@=1024
\xynew@{count}\KK@ \KK@=32
\xynew@{count}\Direction
\xynew@{dimen}\K@dXdY
\xynew@{dimen}\K@dYdX
\xydef@\cosDirection{}
\xydef@\sinDirection{}
\xywarnifdefined\DirectionChar
\xywarnifdefined\SemiDirectionChar
\xynew@{read}\xyread@
\xynew@{write}\xywrite@
\xynew@{count}\csp@
\xynew@{dimen}\quotPTK@
\message{utility macros;}
\xydef@\addtotoks@#1{\toks@=\expandafter{\the\toks@#1}}
\xydef@\xyinputorelse@#1#2{%
 \expandafter\let\expandafter\next@\csname#1loaded\endcsname
 \ifx\next@\empty \else
 \DN@{\xyinputorelse@@{#1}{\xyinputorelse@@{#1.doc}{#2}}}%
 \fi \next@}
\xydef@\xyinputorelse@@#1#2{\openin\xyread@=#1
 \ifeof\xyread@ \DN@{#2}\else \DN@{\closein\xyread@\input#1 }\fi \next@}
\global\csp@=\z@
\xydef@\enter@#1{\global\advance\csp@\@ne
 \expandafter\xdef\csname cs@\number\csp@\endcsname{#1}\ignorespaces}
\xydef@\nter@#1{\global\advance\csp@\@ne
 \expandafter\gdef\csname cs@\number\csp@\endcsname{#1}\ignorespaces}
\xydef@\dontleave@{\csname cs@\number\csp@\endcsname}
\xydef@\unenter@{\global\advance\csp@\m@ne}
\xydef@\leave@{\expandafter\unenter@\csname cs@\number\csp@\endcsname}
\quotPTK@=\p@ \divide\quotPTK@\K@
\xylet@\quotsign@@=\empty
\xywarnifdefined\removePT@
{\catcode`p=12 \catcode`t=12 \gdef\removePT@#1pt{#1}}
\xydef@\quotient@#1#2#3{\A@=#2\relax \B@=#3\relax
 \ifdim\A@<\z@\def\quotsign@@{-}\else\def\quotsign@@{+}\fi
 \ifdim\quotsign@@\A@<15pt \multiply\A@\K@
 \else\ifdim\quotsign@@\A@<511pt \multiply\A@\KK@
 \advance\B@\ifdim\B@<\z@-\fi 16sp \divide\B@\KK@
 \else
 \advance\B@\ifdim\B@<\z@-\fi 512sp \divide\B@\K@
 \fi\fi
 \ifdim\ifdim\B@<\z@-\fi\B@<\quotPTK@ \xywarning@{division overflow}%
 \else \advance\A@.5\B@ \divide\A@\B@ \fi
 \multiply\A@\quotPTK@ \edef#1{\expandafter\removePT@\the\A@}}
\xydef@\quotient@@#1#2#3{\A@=#2\relax \B@=#3\relax \multiply\A@\KK@
 \advance\B@\ifdim\B@<\z@-\fi 128sp \divide\B@\KK@ \divide\B@ 8
 \ifdim\B@=\z@\else \advance\A@.5\B@ \divide\A@\B@ \fi
 \B@=.125\quotPTK@ \multiply\A@\B@ \edef#1{\expandafter\removePT@\the\A@}}
\xydef@\loop@#1\repeat@{\def\body@{#1}\iterate@}\xylet@\repeat@=\fi
\xydef@\iterate@{\body@\expandafter\iterate@\else\fi}
\xydef@\xyinitial@#1#2{\DN@{#1}%
 \xyerror@{command used out of context: \codeof\next@}{}}
\xylet@\xy@=\xyinitial@
\xylet@\oxy@=\xy@
\xydef@\change@oxy@#1{\let\oxy@=#1\relax
}
\xydef@\inxy@{T\ifx\xy@\xyinitial@ F\else T\fi}
\xydef@\xyxy@@ix@{\begingroup
 \xyuncatcodes\afterassignment\endgroup\global\toks9=}
\xydef@\xy@@{\xy@{}}
\xydef@\plainxy@{\let\xy@=\xyxy@ \change@oxy@\xy@ \let\xy@@ix@=\xyxy@@ix@}
\message{pictures: \string\xy,}
\xydef@\xy{\ifmmode\expandafter\xymath@\else\expandafter\xynomath@\fi}
\xydef@\xymath@{\hbox\bgroup \dimen@=\the\fontdimen22\textfont\tw@ \xyinside@}
\xydef@\xynomath@{\hbox\bgroup \dimen@=\z@ \xyinside@}
\xydef@\xyinside@{%
 \saveXyStyle@ \aftergroup\xycheck@end
 \setboxz@h\bgroup
 \plainxy@
 \X@c=\z@ \Y@c=\z@ \czeroEdge@
 \X@p=\z@ \Y@p=\z@ \U@p=\z@ \D@p=\z@ \L@p=\z@ \R@p=\z@ \Edge@p={\zeroEdge}%
 \X@min=\hsize \X@max=-\hsize \Y@min=\hsize \Y@max=-\hsize
 \mathsurround=\z@
 \expandafter\POS\everyxy@@}
\xydef@\czeroEdge@{\U@c=\z@ \D@c=\U@c \L@c=\U@c \R@c=\U@c \Edge@c={\zeroEdge}}
\xydef@\xyxy@#1#2{#2}
\xywarnifdefined\everyxy
\expandafter\def\addEQ@\everyxy#1{\def\everyxy@@{#1}\ignorespaces}
\xylet@\everyxy@@=\empty
\xydef@\endxy{\if\inxy@\else\xyerror@{Unexpected \string\endxy}{}\fi
 \relax
 \dimen@=\Y@max \advance\dimen@-\Y@min
 \ifdim\dimen@<\z@ \dimen@=\z@ \Y@min=\z@ \Y@max=\z@ \fi
 \dimen@=\X@max \advance\dimen@-\X@min
 \ifdim\dimen@<\z@ \dimen@=\z@ \X@min=\z@ \X@max=\z@ \fi
 \edef\tmp@{\egroup
 \setboxz@h{\kern-\the\X@min\boxz@}%
 \ht\z@=\the\Y@max \dp\z@=-\the\Y@min \wdz@=\the\dimen@
 \noexpand\maybeunraise@ \raise\dimen@\boxz@
 \noexpand\recoverXyStyle@ \egroup \noexpand\xy@end
 \U@c=\the\Y@max \D@c=-\the\Y@min \L@c=-\the\X@min \R@c=\the\X@max}\tmp@}
\xydef@\maybeunraise@{\if\inxy@\else \dimen@ii=\dp\z@
 \ifdim\dimen@ii<\z@ \advance\dimen@\dimen@ii \fi\fi}
\xydef@\xycheck@end{\xyFN@\xycheck@end@}
\xydef@\xycheck@end@{\ifx\next\xy@end\DN@\xy@end{}\else\DN@{\xy@end}\fi\next@}
\xydef@\xy@end{%
 \xyerror@{An \string\xy\space environment is not closed correctly.}%
 {I expected \string\endxy. You probably have an umatched {} grouping.}}
\message{positions,}
\xydef@\POS{\afterPOS{}}
\xydef@\afterPOS#1{%
 \DN@##1{\def\afterPOS@{\def\afterPOS@{##1}#1}}%
 \expandafter\next@\expandafter{\afterPOS@}%
 \afterCOORD{\xyFN@\POS@}}
\xylet@\afterPOS@=\empty
\xydef@\afterCOORD#1{%
 \DN@##1{\def\afterCOORD@{\def\afterCOORD@{##1}#1}}%
 \expandafter\next@\expandafter{\afterCOORD@}%
 \afterVECTORorEMPTY{\xy@@\czeroEdge@ \afterCOORD@}{\xyFN@\COORD@}}
\xylet@\afterCOORD@=\empty
\xydef@\afterVECTORorEMPTY#1#2{%
 \DN@##1{\def\afterVECTOR@{\def\afterVECTOR@{##1}%
 \ifVECTORempty@\DN@{#2}\else\DN@{#1}\fi \next@}}%
 \expandafter\next@\expandafter{\afterVECTOR@}%
 \xyFN@\VECTOR@}
\xynew@{if}\ifVECTORempty@
\xylet@\afterVECTOR@=\empty
\xydef@\xyVECTOR@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\VECTOR@}%
 \else \ifcat A\noexpand\next \let\next@=\VECTOR@letter
 \else \let\next@=\VECTOR@other \fi\fi \next@}
\xylet@\VECTOR@=\xyVECTOR@
\def\notrelaxorelse@#1#2{\ifx#1\relax \expandafter#2\else\expandafter#1\fi}
\xydef@\VECTOR@letter{%
 \ifx a\next \expandafter\VECTOR@a \else \expandafter\CORNER@ \fi}
\xydef@\VECTOR@a a(#1){\xy@{a(#1)}{\vfromcartesianangle@{#1}}%
 \VECTORempty@false \afterVECTOR@}
\xydef@\CORNER@{%
 \xy@{}{\A@=-.5\L@c \advance\A@.5\R@c \B@=-.5\D@c \advance\B@.5\U@c
 \let\nextii@=\zeroit@}%
 \VECTORempty@true\CORNER@i}
\xydef@\zeroit@#1{#1=\z@}
\xydef@\CORNER@i{%
 \ifx D\next \DN@ D{\xy@{D}{\Y@c=-\D@c \nextii@\X@c \B@=\Y@c}\CORNER@ii}%
 \else\ifx U\next \DN@ U{\xy@{U}{\Y@c= \U@c \nextii@\X@c \B@=\Y@c}\CORNER@ii}%
 \else\ifx L\next \DN@ L{\xy@{L}{\X@c=-\L@c \nextii@\Y@c \A@=\X@c}\CORNER@ii}%
 \else\ifx R\next \DN@ R{\xy@{R}{\X@c= \R@c \nextii@\Y@c \A@=\X@c}\CORNER@ii}%
 \else\ifx C\next \DN@ C{\xy@{C}{\X@c= \A@ \Y@c= \B@}\CORNER@ii}%
 \else\ifx E\next \DN@ E{\xy@{E}{%
 \A@=\X@c \B@=\Y@c \the\Edge@c\z@ \advance\X@c-\A@ \advance\Y@c-\B@}%
 \CORNER@ii}%
 \else\ifx P\next \DN@ P{\xy@{P}{%
 \A@=\X@c \B@=\Y@c \the\Edge@c\thr@@ \advance\X@c-\A@ \advance\Y@c-\B@}%
 \CORNER@ii}%
 \else\ifx (\next
 \DN@(##1){\xy@{(##1)}{\X@c=##1\X@c \Y@c=##1\Y@c}\afterVECTOR@}%
 \else \let\next@=\afterVECTOR@
 \fi\fi\fi\fi\fi\fi\fi\fi \next@}
\xydef@\CORNER@ii{\xy@@{\let\nextii@=\eat@}%
 \VECTORempty@false \xyFN@\CORNER@i}
\xydef@\VECTOR@other{%
 \addLT@\ifx \next
 \addGT@{\addLT@\DN@##1}{\xy@{<##1>}{\vfromabsolute@{##1}}%
 \VECTORempty@false\afterVECTOR@}%
 \else\ifx (\next
 \DN@({\xyFN@\VECTOR@other@open}%
 \else\ifx /\next
 \DN@/##1/{\xy@@ix@{{##1}}%
 \xy@{/##1/}{\expandafter\vfromslide@\the\toks9 }%
 \VECTORempty@false\afterVECTOR@}%
 \else\ifx 0\next
 \DN@ 0{\xy@{0}{\X@c=\z@ \Y@c=\z@}\VECTORempty@false\afterVECTOR@}%
 \else
 \DN@{\VECTORempty@true\afterVECTOR@}%
 \fi\fi\fi\fi \next@}
\xydef@\VECTOR@other@open{%
 \ifx *\next \DN@{\VECTORempty@true \xyFN@\afterVECTOR@(}%
 \else
 \DN@##1){\xy@{(##1)}{\vfromcartesian@{##1}}\VECTORempty@false\afterVECTOR@}%
 \fi \next@}
\xydef@\xyCOORD@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\COORD@}%
 \else \ifcat A\noexpand\next \let\next@=\xyCOORD@letter
 \else \let\next@=\xyCOORD@other \fi\fi \next@}
\xylet@\COORD@=\xyCOORD@
\xydef@\xyCOORD@letter{%
 \ifx c\next
 \DN@ c{\xy@{c}{}\afterCOORD@}%
 \else\ifx p\next
 \DN@ p{\xy@{p}\cfromp@ \afterCOORD@}%
 \else\ifx x\next
 \DN@ x{\xy@{x}{\R@c=\X@xbase \U@c=\Y@xbase \intersect@}\afterCOORD@}%
 \else\ifx y\next
 \DN@ y{\xy@{y}{\R@c=\X@ybase \U@c=\Y@ybase \intersect@}\afterCOORD@}%
 \else\ifx s\next
 \DN@ s##1{\xy@{s{##1}}{\cfroms@{##1}}\afterCOORD@}%
 \else \let\next@=\afterCOORD@ \fi\fi\fi\fi\fi \next@}
\xydef@\xyCOORD@other{%
 \ifx "\next
 \DN@"##1"{\xy@{"##1"}{\cfromid@{##1}}\afterCOORD@}%
 \else\ifx \bgroup\next
 \DN@##1{\xy@{{##1}}{\enter@{\pfromthep@\basefromthebase@}}%
 \silencexy@ \POS##1\relax \unsilencexy@ \xy@@\leave@ \afterCOORD@}%
 \else\ifx (\next
 \DN@({\xyFN@\xyCOORD@other@open}%
 \else \let\next@=\afterCOORD@ \fi\fi\fi \next@}
\xynew@{if}\ifsilentxy@
\xydef@\silencexy@{%
 \ifsilentxy@ \nter@{}%
 \else \nter@{\silentxy@false \let\xy@=\unsilent@@xy@}
 \silentxy@true \let\unsilent@@xy@=\xy@ \def\xy@##1##2{\unsilent@@xy@{}{##2}}%
 \fi}
\xydef@\unsilencexy@{\leave@}
\xydef@\xyCOORD@other@open{%
 \ifx *\next
 \DN@*##1*){\xy@{(*}{\enter@{\pfromthep@\basefromthebase@}}%
 \POS##1\relax \xy@{*)}\leave@ \afterCOORD@}%
 \else \DN@{\xyFN@\afterCOORD@(}%
 \fi \next@}
\xydef@\xyPOS@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\POS@}%
 \else\addPLUS@\ifx \next
 \addPLUS@\DN@{\xy@+{\enter@\cplusthec@}%
 \afterCOORD{\xy@@\leave@ \xyFN@\POS@}}%
 \else\addDASH@\ifx \next
 \addDASH@\DN@{\xy@-{\enter@\cplusthec@}%
 \afterCOORD{\xy@@{\X@c=-\X@c \Y@c=-\Y@c\leave@}\xyFN@\POS@}}%
 \else\ifx !\next
 \DN@ !{\xy@!{\enter@\cskewthec@}\afterCOORD{\xy@@\leave@ \xyFN@\POS@}}%
 \else\addDOT@\ifx \next
 \addDOT@\DN@{\xy@.{\enter@\cmergethec@}%
 \afterCOORD{\xy@@\leave@ \xyFN@\POS@}}%
 \else\ifx ,\next
 \DN@ ,{\xy@,{\comma@@}\afterCOORD{\xyFN@\POS@}}%
 \else\ifx ;\next
 \DN@ ;{\xy@;{\swap@}\afterCOORD{\xyFN@\POS@}}%
 \else\ifx :\next
 \DN@ :{\xyFN@\POS@colon}%
 \else\addEQ@\ifx \next
 \addEQ@\DN@{\xyFN@\saveid@}%
 \else\ifx *\next
 \DN@ *{\xyFN@\POS@star}%
 \else \ifx ?\next
 \DN@?{\xy@?{}\afterPLACE{\xyFN@\POS@}}%
 \else \addAT@\ifx \next
 \addAT@\DN@{\xyFN@\STACK@}%
 \else
 \let\next@=\afterPOS@
 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next@}
\xylet@\comma@@=\relax
\xylet@\POS@=\xyPOS@
\xydef@\POS@colon{\DNii@{\afterCOORD{\xyFN@\POS@}}%
 \ifx :\next \xy@{::}{\setbase@@\X@c\Y@c}\DN@:{\nextii@}%
 \else \xy@:{\setbase@\X@p\Y@p\X@c\Y@c}\let\next@=\nextii@ \fi
 \next@}
\xydef@\POS@star{%
 \ifx *\next
 \DN@*##1##{\nextii@{##1}}%
 \DNii@##1##2{\xy@@ix@{{##1}{##2}}%
 \xy@{**##1{##2}}{\expandafter\connect@\the\toks9 }\xyFN@\POS@}%
 \else
 \DN@##1##{\nextii@{##1}}%
 \DNii@##1##2{\xy@@ix@{{##1}{##2}}%
 \xy@{*##1{##2}}{\expandafter\drop@\the\toks9 }\xyFN@\POS@}%
 \fi
 \next@}
\xydef@\cfromp@{\X@c=\X@p \Y@c=\Y@p \U@c=\U@p \D@c=\D@p \L@c=\L@p \R@c=\R@p
 \Edge@c=\expandafter{\the\Edge@p}}
\xydef@\pfromc@{\X@p=\X@c \Y@p=\Y@c \U@p=\U@c \D@p=\D@c \L@p=\L@c \R@p=\R@c
 \Edge@p=\expandafter{\the\Edge@c}}
\xydef@\swapdimen@#1#2{\dimen@=#1\relax #1=#2\relax #2=\dimen@}
\xynew@{toks}\swaptoks@@
\xydef@\swap@{\swapdimen@\X@c\X@p \swapdimen@\Y@c\Y@p
 \swapdimen@\U@c\U@p\swapdimen@\D@c\D@p \swapdimen@\L@c\L@p\swapdimen@\R@c\R@p
 \swaptoks@@=\Edge@c \Edge@c=\Edge@p \Edge@p=\swaptoks@@}
\xydef@\vfromabsolute@#1{\vfromabsolute@@#1,@}
\xydef@\vfromabsolute@@#1,#2@{\X@c=#1\relax
 \DN@{#2}\ifx\next@\empty \Y@c=\X@c
 \else \DN@##1,{\Y@c=##1}\next@#2\relax \fi
}
\xydef@\cfromthec@{\X@c=\the\X@c \Y@c=\the\Y@c
 \U@c=\the\U@c \D@c=\the\D@c \L@c=\the\L@c \R@c=\the\R@c
 \Edge@c={\expandafter\noexpand\the\Edge@c}}
\xydef@\cfromthep@{\X@c=\the\X@p \Y@c=\the\Y@p
 \U@c=\the\U@p \D@c=\the\D@p \L@c=\the\L@p \R@c=\the\R@p
 \Edge@c={\expandafter\noexpand\the\Edge@p}}
\xydef@\pfromthep@{\X@p=\the\X@p \Y@p=\the\Y@p
 \U@p=\the\U@p \D@p=\the\D@p \L@p=\the\L@p \R@p=\the\R@p
 \Edge@p={\expandafter\noexpand\the\Edge@p}}
\xydef@\pfromthec@{\X@p=\the\X@c \Y@p=\the\Y@c
 \U@p=\the\U@c \D@p=\the\D@c \L@p=\the\L@c \R@p=\the\R@c
 \Edge@p={\expandafter\noexpand\the\Edge@c}}
\xydef@\cplusthec@{\advance\X@c\the\X@c \advance\Y@c\the\Y@c}
\xydef@\cskewthec@{%
 \noexpand\cskew@{\the\Y@c}{\the\X@c}{\the\D@c}{\the\U@c}{\the\L@c}{\the\R@c}}
\xydef@\cskew@#1#2#3#4#5#6{%
 \D@c=#3\advance\D@c \Y@c \ifdim\D@c<\z@ \D@c=\z@ \fi
 \U@c=#4\advance\U@c-\Y@c \ifdim\U@c<\z@ \U@c=\z@ \fi
 \advance\Y@c#1%
 \L@c=#5\advance\L@c \X@c \ifdim\L@c<\z@ \L@c=\z@ \fi
 \R@c=#6\advance\R@c-\X@c \ifdim\R@c<\z@ \R@c=\z@ \fi
 \advance\X@c#2%
 \Edge@c={\rectangleEdge}}
\xydef@\cmergethec@{%
 \noexpand\cmerge@{\the\Y@c}{\the\X@c}{\the\D@c}{\the\U@c}{\the\L@c}{\the\R@c}}
\xydef@\cmerge@#1#2#3#4#5#6{\the\Edge@c4%
 \A@=#2\advance\A@-\X@c \B@=#1\advance\B@-\Y@c
 \dimen@=#5\advance\L@c \A@ \ifdim\L@c<\dimen@ \L@c=\dimen@ \fi
 \dimen@=#6\advance\R@c-\A@ \ifdim\R@c<\dimen@ \R@c=\dimen@ \fi
 \dimen@=#3\advance\D@c \B@ \ifdim\D@c<\dimen@ \D@c=\dimen@ \fi
 \dimen@=#4\advance\U@c-\B@ \ifdim\U@c<\dimen@ \U@c=\dimen@ \fi
 \advance\X@c\A@ \advance\Y@c\B@}
\xydef@\halfroottwo{.70710678}
\xydef@\partroottwo{.29289322}
\xydef@\halfrootthree{.8660254}
\xydef@\vfromcartesian@#1{\vfromcartesian@@#1@}
\xydef@\vfromcartesian@@#1,#2@{%
 \X@c=\X@origin \advance\X@c#1\X@xbase \advance\X@c#2\X@ybase
 \Y@c=\Y@origin \advance\Y@c#1\Y@xbase \advance\Y@c#2\Y@ybase}
\xydef@\setbase@#1#2#3#4{%
 \X@origin=#1\relax \Y@origin=#2\relax
 \X@xbase=#3\relax \advance\X@xbase-\X@origin
 \Y@xbase=#4\relax \advance\Y@xbase-\Y@origin
 \X@ybase=-\Y@xbase \Y@ybase=\X@xbase}
\xydef@\setbase@@#1#2{%
 \X@ybase=#1\relax \advance\X@ybase-\X@origin
 \Y@ybase=#2\relax \advance\Y@ybase-\Y@origin}
\xydef@\basefromthebase@{\X@origin=\the\X@origin \Y@origin=\the\Y@origin
 \X@xbase=\the\X@xbase \Y@xbase=\the\Y@xbase
 \X@ybase=\the\X@ybase \Y@ybase=\the\Y@ybase}
\xydef@\vfromcartesianangle@#1{\enter@\basefromthebase@ \R@=#1\p@
 \B@=360\p@
 \loop@ \ifdim\R@<\z@ \advance\R@\B@ \repeat@
 \loop@ \ifdim\R@>\B@ \advance\R@-\B@ \repeat@
 \ifdim\R@<.5\B@\else \R@=-\R@ \advance\R@\B@
 \X@ybase=-\X@ybase \Y@ybase=-\Y@ybase \fi
 \B@=180\p@
 \ifdim\R@<.5\B@\else \R@=-\R@ \advance\R@\B@
 \X@xbase=-\X@xbase \Y@xbase=-\Y@xbase \fi
 \B@=90\p@
 \ifdim\R@<.5\B@ \let\nextiii@=\literal@
 \else \R@=-\R@ \advance\R@\B@ \def\nextiii@##1,##2@{##2,##1@}\fi
 \dimen@=\z@ \DN@{1,0@}%
 \dimen@ii=45\p@ \DNii@{.70710678,.70710678@}%
 \chooseangleinterval@
 {\chooseangleinterval@
 {\chooseangleinterval@
 {\chooseangleinterval@
 {\chooseangleinterval@
 {}%
 {4.090909}{.99677570,.08023846@}%
 {}}%
 {6}{.99452190,.10452846@}%
 {\chooseangleinterval@
 {}%
 {8.181818}{.98982144,.14231484@}%
 {}}}%
 {10}{.98480775,.17364818@}%
 {\chooseangleinterval@
 {}%
 {12.857143}{.97492791,.22252093@}%
 {}}}%
 {15}{.96592583,.25881905@}%
 {\chooseangleinterval@
 {\chooseangleinterval@
 {}%
 {16.363636}{.95949297,.28173256@}%
 {}}%
 {18}{.95105652,.30901699@}%
 {\chooseangleinterval@
 {}%
 {20}{.93969262,.34202014@}%
 {}}}}%
 {22.5}{.92387953,.38268343@}%
 {\chooseangleinterval@
 {\chooseangleinterval@
 {\chooseangleinterval@
 {}%
 {24.545455}{.90963200,.41541501@}%
 {}}%
 {25.714286}{.90096887,.43388374@}%
 {}}%
 {30}{.86602540,.5@}%
 {\chooseangleinterval@
 {\chooseangleinterval@
 {}%
 {32.727273}{.84125353,.54064082@}%
 {}}%
 {36}{.80901699,.58778525@}%
 {\chooseangleinterval@
 {\chooseangleinterval@
 {}%
 {38.571429}{.78183148,.62348980@}%
 {}}%
 {40.909091}{.75574957,.65486073@}%
 {\chooseangleinterval@
 {}%
 {40}{.76604444,.64278761@}%
 {}}}}}%
 \A@=\R@ \advance\A@-\dimen@
 \ifdim\ifdim\A@<\z@-\fi\A@<.01\p@ \edef\next@{\expandafter\nextiii@\next@}%
 \else \B@=\dimen@ii \advance\B@-\R@ 
 \ifdim\A@<\B@ \dimen@=\toradians@\A@
 \edef\next@{\next@ \expandafter\removePT@\the\dimen@ @}%
 \else \dimen@=-\toradians@\B@
 \edef\next@{\nextii@ \expandafter\removePT@\the\dimen@ @}%
 \fi
 \expandafter\interpolatepoint@\next@
 \edef\next@{\expandafter\nextiii@\next@}%
 \fi 
 \expandafter\vfromcartesian@@\next@
 \leave@}
\xydef@\chooseangleinterval@#1#2#3#4{%
 \B@=#2\p@ \def\next{#3}%
 \ifdim\R@<\B@ \dimen@ii=\B@ \let\nextii@=\next #1%
 \else \dimen@=\B@ \let\next@=\next \ifdim\B@<\R@ #4\fi\fi}
\xydef@\interpolateinterval@#1,#2@#3,#4@{%
 \A@=#1\p@ \dimen@=#3\p@ \advance\dimen@-\A@ \advance\A@\next\dimen@
 \B@=#2\p@ \dimen@=#4\p@ \advance\dimen@-\B@ \advance\B@\next\dimen@
 \edef\next@{\expandafter\removePT@\the\A@,\expandafter\removePT@\the\B@ @}}
\xydef@\toradians@{0.01745329}
\xydef@\interpolatepoint@#1,#2@#3@{%
 \A@=#1\p@ \dimen@ii=#3\A@ \dimen@ii=-.5\dimen@ii \advance\A@#3\dimen@ii
 \dimen@=-#2\p@ \advance\A@#3\dimen@
 \B@=#2\p@ \dimen@ii=#3\B@ \dimen@ii=-.5\dimen@ii \advance\B@#3\dimen@ii
 \dimen@=#1\p@ \advance\B@#3\dimen@
 \edef\next@{\expandafter\removePT@\the\A@,\expandafter\removePT@\the\B@ @}}
\xydef@\drop@#1#2{%
 \global\setbox\lastobjectbox@=\object#1{#2}%
 \ifHidden@ \dimen@=\X@c \advance\dimen@-\L@c \else
 \dimen@=\Y@c \advance\dimen@ \U@c \ifdim\Y@max<\dimen@ \Y@max=\dimen@ \fi
 \dimen@=\Y@c \advance\dimen@-\D@c \ifdim\dimen@<\Y@min \Y@min=\dimen@ \fi
 \dimen@=\X@c \advance\dimen@ \R@c \ifdim\X@max<\dimen@ \X@max=\dimen@ \fi
 \dimen@=\X@c \advance\dimen@-\L@c \ifdim\dimen@<\X@min \X@min=\dimen@ \fi
 \fi
 \ifInvisible@\else
 \setboxz@h{\kern\dimen@ \raise\Y@c\box\lastobjectbox@}%
 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ {\Drop@@}\fi}
\xydef@\connect@#1#2{\setupDirection@ \enter@{\cfromthec@}%
 \global\setbox\lastobjectbox@=\object#1{#2}\leave@
 \Connect@@}
\xydef@\preconnect@#1#2{\setupDirection@ \enter@{\cfromthec@}%
 \global\setbox\lastobjectbox@=\object#1{#2}\leave@ \connectStore@
 \ifInvisible@ \Connect@@ \else \Invisible@true\Connect@@\Invisible@false \fi}
\xynew@{box}\connectobjectbox@@
\xylet@\connectDrop@@=\empty
\xylet@\connectpreXY@style@=\empty
\xylet@\connectpostXY@style@=\empty
\xylet@\connectRest@@=\empty
\xydef@\connectStore@{%
 \global\setbox\connectobjectbox@@=\copy\lastobjectbox@
 \let\connectDrop@@=\Drop@@
 \let\connectpreXY@style@ =\preXY@style@ 
 \let\connectpostXY@style@=\postXY@style@
 \xdef\connectRest@@{%
 \def\noexpand\Upness@{\Upness@}%
 \def\noexpand\Leftness@{\Leftness@}%
 \ifInvisible@ \noexpand\Invisible@true \else \noexpand\Invisible@false \fi
 \ifHidden@ \noexpand\Hidden@true \else \noexpand\Hidden@false \fi}}
\xydef@\connectRestore@{%
 \ifvbox\connectobjectbox@@
 \setbox\lastobjectbox@=\copy\voidb@x
 \else
 \global\setbox\lastobjectbox@=\copy\connectobjectbox@@
 \fi
 \let\Drop@@=\connectDrop@@
 \global\let\preXY@style@ =\connectpreXY@style@ 
 \global\let\postXY@style@=\connectpostXY@style@
 \connectRest@@}
\xydef@\afterPLACE#1{%
 \DN@##1{\def\afterPLACE@{\xy@@\leave@ \def\afterPLACE@{##1}#1}}%
 \expandafter\next@\expandafter{\afterPLACE@}%
 \def\PLACEf@{{.5}}%
 \xy@@{\enter@{\pfromthep@}%
 \Creset@@ \def\PLACEf@{{.5}}%
 \let\PLACEedgep@@=\PLACEedgep@ \let\PLACEedgec@@=\PLACEedgec@}%
 \xyFN@\PLACE@}
\xydef@\PLACEf@{}
\xydef@\PLACEedgep@@{}
\xydef@\PLACEedgec@@{}
\xydef@\PLACEedgep@{\Cshavep@@ \def\PLACEedgep@@{\Cslidep@@\jot}}
\xydef@\PLACEedgec@{\Cshavec@@ \def\PLACEedgec@@{\Cslidec@@{-\jot}}}
\xylet@\afterPLACE@=\empty
\xydef@\PLACE@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\PLACE@}%
 \else\addLT@\ifx \next
 \addLT@\DN@{\addLT@\xy@{\def\PLACEf@{{0}}\PLACEedgep@@}\xyFN@\PLACE@}%
 \else\addGT@\ifx \next
 \addGT@\DN@{\addGT@\xy@{\def\PLACEf@{{1}}\PLACEedgec@@}\xyFN@\PLACE@}%
 \else\ifx (\next
 \DN@(##1){\def\PLACEf@{{##1}}\xy@{(##1)}{\def\PLACEf@{{##1}}}\xyFN@\PLACE@}%
 \else\ifx !\next
 \DN@!{\xyFN@\PLACE@intercept}%
 \else
 \DN@{\xy@@{\expandafter\Calong@@\PLACEf@ \czeroEdge@}\PLACE@@}%
 \fi\fi\fi\fi\fi \next@}
\xydef@\PLACE@intercept{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\PLACE@intercept}%
 \else\ifx \bgroup\next
 \DN@##1{\xy@{!{##1}}{}\PLACE@intercept@{##1}}%
 \else\ifx (\next
 \DN@(*##1*){\xy@{!(*##1*)}{}\PLACE@intercept@{##1}}%
 \else \DN@{\xyerror@{{<pos>} expected after ! in <place>}{}}%
 \fi\fi\fi \next@}
\xydef@\PLACE@intercept@#1{%
 \xy@@{\enter@{\pfromthep@\basefromthebase@}\begingroup}%
 \xy@@ix@{#1}\xy@@{\plainxy@ \expandafter\POS\the\toks9\relax
 \edef\next@{\endgroup
 \X@c =\the\X@c \Y@c=\the\Y@c \X@p=\the\X@p \Y@p=\the\Y@p}%
 \next@ \Cintercept@@ \leave@}%
 \PLACE@@}
\xydef@\PLACE@@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\PLACE@@}%
 \else\ifx /\next \DN@/##1/{\xy@{/##1/}{\Cslidec@@{##1}}\afterPLACE@}%
 \else \let\next@=\afterPLACE@
 \fi\fi \next@}
\xydef@\intersect@{%
 \d@X=\X@c \advance\d@X-\X@p \d@Y=\Y@c \advance\d@Y-\Y@p
 \A@=\X@c \advance\A@-\X@origin \B@=\Y@c \advance\B@-\Y@origin
 \edef\next@{\expandafter\removePT@\the\R@c}%
 \edef\nextii@{\expandafter\removePT@\the\U@c}%
 \D@c=\next@\d@Y \advance\D@c-\nextii@\d@X \divide\D@c\KK@
 \L@c=\next@\B@ \advance\L@c-\nextii@\A@ \divide\L@c\KK@
 \ifdim\D@c=\z@\zeroDivide@\else \quotient@\next@\L@c\D@c \fi
 \advance\X@c-\next@\d@X \advance\Y@c-\next@\d@Y
 \czeroEdge@}
\xydef@\zeroDivide@@{\zeroDivide@message{\intersect@}{treated as 0}\DN@{0}}
\xydef@\zeroDivide@message#1#2{\xywarning@{division by 0 in \string#1, #2}}
\xylet@\zeroDivide@=\zeroDivide@@
\xydef@\zeroDivideLimit@@{\ifdim\L@c=\z@ \DN@{0}%
 \else\ifdim\L@c<\z@\DN@{-\zeroDivide@Limit}%
 \else\DN@{\zeroDivide@Limit}\fi\fi
 \zeroDivide@message{\intersect@}{replaced by \zeroDivide@Limit}}
\xydef@\zeroDivideLimit@#1{\edef\zeroDivide@Limit{#1}%
 \let\zeroDivide@=\zeroDivideLimit@@}
\xylet@\zeroDivideLimit=\zeroDivideLimit@
\xydef@\vfromslide@#1{\enter@\DirectionfromtheDirection@ \begingroup
 \plainxy@\afterDIRECTIONorEMPTY\vfromslide@i\vfromslide@i#1@}
\xydef@\vfromslide@i#1@{\DN@{#1}%
 \edef\next{\endgroup
 \ifx\next@\empty \dimen@=.5pc \else \dimen@=#1\relax \fi
 \X@c=\cosDirection\dimen@ \Y@c=\sinDirection\dimen@}\next
 \leave@}
\xydef@\s@bot{-1}
\xydef@\s@top{-1}
\xydef@\cfroms@#1{\tests@{#1}\runs@\outofranges@}
\xydef@\tests@#1#2#3{\DN@{#3}%
 \count@=\s@top \advance\count@-#1\relax
 \ifnum\count@>\s@bot\relax \ifnum\count@>\s@top\else\DN@{#2}\fi\fi
 \next@}
\xydef@\runs@{\csname S@\the\count@\endcsname}
\xydef@\outofranges@{\count@=\s@top \advance\count@-\s@bot
 \xyerror@{stack index out of range (should be 0..\the\count@)}{}}
\xydef@\STACK@{%
 \addPLUS@\ifx\next
 \addPLUS@\DN@{\xy@{@+}{}\afterCOORD{\xy@@\spushc@ \xyFN@\POS@}}%
 \else\addDASH@\ifx\next
 \addDASH@\DN@{\xy@{@-}{}\afterCOORD{\xy@@\spop@ \xyFN@\POS@}}%
 \else \ifx i\next \DN@ i{\xy@{@i}\sinit@ \xyFN@\POS@}%
 \else \ifx (\next \DN@ ({\xy@{@(}\senter@ \xyFN@\POS@}%
 \else \ifx )\next \DN@ ){\xy@{@)}\sleave@ \xyFN@\POS@}%
 \else\addEQ@\ifx\next \addEQ@\DN@{\STACK@load}%
 \else\addAT@\ifx\next \addAT@\DN@{\xy@{@@}{}\smap@}%
 \else \DN@##1{\xyerror@{illegal stack command ##1}{}\afterCOORD{\xyFN@\POS@}}%
 \fi\fi\fi\fi\fi\fi\fi \next@}
\xydef@\STACK@load{\xy@{@=}{%
 \if\sempty@\else \xywarning@{loading on top of non-empty stack}\sinit@ \fi
 \let\comma@@=\spushc@}%
 \afterCOORD{\xy@@{\spushc@ \let\comma@@=\relax}\xyFN@\POS@}}
\xydef@\spushc@{%
 \count@=\s@top \advance\count@\@ne \edef\s@top{\the\count@}%
 \expandafter\edef\csname S@\s@top\endcsname{\cfromthec@}}
\xydef@\spushid@#1{\DNii@{#1}\edef\nextii@{\codeof\nextii@}%
 \expandafter\let\expandafter\next@\csname Q@\nextii@\endcsname
 \ifx\next@\relax \xyerror@{<pos> \string"\nextii@\string" not defined}{}%
 \else
 \count@=\s@top \advance\count@\@ne \edef\s@top{\the\count@}%
 \DNii@##1{\expandafter\def\csname S@\s@top\endcsname{##1}}%
 \expandafter\nextii@\expandafter{\next@}%
 \fi}
\xydef@\idfroms@#1#2{%
 \tests@{#2}{\DN@{\idfromxy@{#1}}%
 \expandafter\expandafter\expandafter\next@
 \expandafter\expandafter\expandafter{\csname S@\the\count@\endcsname}%
 }\outofranges@}
\xydef@\spop@{\count@=\s@top
 \ifnum\count@>\s@bot \advance\count@\m@ne \edef\s@top{\the\count@}%
 \else \xyerror@{nothing to pop from stack}{}\fi}
\xydef@\sinit@{\edef\s@top{\s@bot}}
\xydef@\senter@{%
 \count@=\s@top \advance\count@\@ne
 \expandafter\edef\csname S@\the\count@\endcsname{\s@bot}%
 \edef\s@bot{\the\count@}\edef\s@top{\the\count@}}
\xydef@\sleave@{%
 \ifnum\s@bot=\s@top\else \xywarning@{leaving non-empty stack}\sinit@ \fi
 \ifnum\s@bot>\m@ne \edef\s@bot{\csname S@\s@top\endcsname}%
 \count@=\s@top \advance\count@\m@ne \edef\s@top{\the\count@}%
 \edef\sbot{\the\count@}\fi}
\xydef@\sempty@{\ifnum\s@top=\s@bot TT\else TF\fi}
\xydef@\xytotoks@#1#2{\addtotoks@{#2}}
\xydef@\xytotoks@@toksix@#1{\addtotoks@{\toks9={#1}}}
\xydef@\smap@{%
 \begingroup \toks@={}\let\xy@=\xytotoks@ \change@oxy@\xy@
 \let\xy@@ix@=\xytotoks@@toksix@
 \afterCOORD{\expandafter\endgroup
 \expandafter\smapxy@@\expandafter{\the\toks@}\xyFN@\POS@}}
\xydef@\smapxy@@#1{\xy@@{\edef\smapp@@{\s@bot}\smapxy@i{#1}}}
\xylet@\smapp@@=\empty
\xydef@\smapxy@i#1{%
 \ifnum\smapp@@<\s@top
 \count@=\smapp@@ \advance\count@\@ne \edef\smapp@@{\the\count@}%
 \DN@{\csname S@\smapp@@\endcsname #1\relax \smapxy@i{#1}}%
 \else \let\next@=\relax
 \fi \next@}
\xydef@\saveid@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\saveid@}%
 \else \ifx "\next\DN@"##1"{\xy@{="##1"}{\idfromc@{##1}}\xyFN@\POS@}%
 \else \ifx :\next\DN@:##1"##2"{\xy@{=:"##2"}{\idfrombase@{##2}}\xyFN@\POS@}%
 \else\addAT@\ifx\next
 \addAT@\DN@"##1"{\xy@{=@"##1"}{\idfromstack@{##1}}\xyFN@\POS@}%
 \else \ifx s\next
 \DN@ s##1"##2"{\xy@{=s##1"##2"}{\idfroms@{##2}{##1}}\xyFN@\POS@}%
 \else\addEQ@\ifx\next \let\saveid@COORD@@=\saveid@COORDii
 \addEQ@\DN@{\xyFN@\saveid@COORD}%
 \else \let\saveid@COORD@@=\saveid@COORDi \let\next@=\saveid@COORD
 \fi\fi\fi\fi\fi\fi \next@}
\xylet@\saveid@COORD@@=\relax
\xydef@\idfromc@#1{\DN@{#1}%
 \expandafter\edef\csname Q@\codeof\next@\endcsname{\cfromthec@}}
\xydef@\idfrombase@#1{\DN@{#1}%
 \expandafter\edef\csname Q@\codeof\next@\endcsname{\basefromthebase@}}
\xydef@\idfromstack@#1{%
 \toks@={\if\sempty@\else
 \xywarning@{loading on top of non-empty stack}\sinit@ \fi}%
 \count@=\s@bot \advance\count@\@ne
 \ifnum\count@>\s@top\else
 \loop@
 \expandafter\let\expandafter\next@\csname S@\the\count@\endcsname
 \expandafter\addtotoks@\expandafter{\next@}%
 \ifnum\count@<\s@top \advance\count@\@ne \addtotoks@{\spushc@}\repeat@
 \fi
 \DN@{#1}\edef\next@##1{%
 \def\expandafter\noexpand\csname Q@\codeof\next@\endcsname{##1}}%
 \expandafter\next@\expandafter{\the\toks@}}
\xydef@\saveid@COORD{%
 \begingroup \toks@={}\let\xy@=\xytotoks@ \change@oxy@\xy@
 \let\xy@@ix@=\xytotoks@@toksix@
 \afterCOORD{\expandafter\saveid@COORDi\expandafter{\the\toks@}}}
\xydef@\saveid@COORDi#1#2"#3"{\endgroup \xy@@{\idfromxy@{#3}{#1}}\xyFN@\POS@}
\xydef@\saveid@COORDii#1#2"#3"{\endgroup \xy@@{\idfromcxy@{#3}{#1}}\xyFN@\POS@}
\xydef@\idfromxy@#1#2{\DN@{#1}%
 \expandafter\def\csname Q@\codeof\next@\endcsname{#2}}
\xydef@\idfromcxy@#1#2{\DN@{#1}%
 \expandafter\edef\csname Q@\codeof\next@\endcsname{\cfromthec@#2}}
\xydef@\cfromid@#1{\DNii@{#1}\edef\nextii@{\codeof\nextii@}%
 \expandafter\let\expandafter\next@\csname Q@\nextii@\endcsname
 \ifx\next@\relax \xyerror@{<pos> \string"\nextii@\string" not defined}{}%
 \else \expandafter\next@\fi}
\message{objects,}
\xydef@\OBJECT@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\OBJECT@}%
 \else\ifcat A\noexpand\next \let\next@=\OBJECT@letter
 \else \let\next@=\OBJECT@other \fi\fi \next@}
\xydef@\OBJECT@letter{%
 \ifx i\next \DN@ i{\addtotoks@\Invisible@true \xyFN@\OBJECT@}%
 \else\ifx h\next\DN@ h{\addtotoks@\Hidden@true \xyFN@\OBJECT@}%
 \else\ifx o\next\DN@ o{\xywarning@{Obsolete o modifier used}\OBJECT@shape{o}}%
 \else\ifx x\next\DN@ x{\xywarning@{Obsolete x modifier used}\OBJECT@shape{}}%
 \else\ifx @\next\DN@ @##1##{%
\xywarning@{Impossible @ (letter) should not be here!!}
 \OBJECT@@{\dir##1}}%
 \else \let\next@=\OBJECT@direction
 \fi\fi\fi\fi\fi \next@}
\xydef@\OBJECT@other{%
 \ifx !\next \DN@!{\OBJECT@shift}%
 \else\addPLUS@\ifx \next \DN@{\OBJECT@change}%
 \else\addDASH@\ifx \next \DN@{\OBJECT@change}%
 \else\addEQ@\ifx \next \DN@{\OBJECT@set}%
 \else\ifx [\next
 \DN@[##1]{\xy@{[##1]}{\OBJECT@shape{##1}}}%
 \else\ifx ^\next \let\next@=\OBJECT@direction
 \else\ifx _\next \let\next@=\OBJECT@direction
 \else\ifx :\next \let\next@=\OBJECT@direction
 \else\ifx ?\next
 \DN@ ?{\xywarning@{\string? modifier used}\xyFN@\OBJECT@direction}%
 \else\ifx (\next
 \let\next@=\OBJECT@direction
 \else\addAT@\ifx\next \addAT@\DN@##1##{\OBJECT@@{\dir##1}}%
 \else \DN@##1##{\OBJECT@@{##1}}%
 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next@}
\xydef@\prevEdge@@{\zeroEdge}
\xydef@\OBJECT@@#1#2{%
 \expandafter\def\expandafter\prevEdge@@\expandafter{\the\Edge@c}%
 \expandafter\Edge@c\expandafter{\objectEdge}%
 \Invisible@false\Hidden@false
 \def\Leftness@{.5}\def\Upness@{.5}%
 \gdef\preXY@style@{}\gdef\postXY@style@{}%
 \def\Drop@@{\styledboxz@}\def\Connect@@{\straight@\relax}%
 \DN@{#1}\ifx\next@\empty \DNii@{#2}%
 \ifx\nextii@\empty \DN@{\hbox\bgroup\no@}\else \let\next@=\objectbox \fi\fi
 \setbox\z@=\next@{#2}\L@c=\Leftness@\wdz@ \R@c=\wdz@ \advance\R@c-\L@c
 \D@c=\dp\z@ \advance\D@c\ht\z@ \U@c=\Upness@\D@c \advance\D@c-\U@c
 \R@p=\z@ \L@p=\L@c \U@p=\U@c \advance\U@p-\ht\z@ \D@p=-\U@p
 \the\toks@\toks@={}\setboxz@h{\kern\R@p \raise\U@p\boxz@}%
 \checkZeroEdge@
 \dimen@=\L@c \advance\dimen@\R@c \wdz@=\dimen@ \ht\z@=\U@c \dp\z@=\D@c \boxz@
 \OBJECT@x}
\xydef@\adjustLR@{%
 \ifdim\zz@\wdz@ \L@c=\z@ \R@c=\z@ \dimen@=\Leftness@\p@
 \ifdim\dimen@<\z@ \L@c=\dimen@ \R@c=-\L@c
 \else\ifdim\dimen@>\p@ \L@c=\dimen@ \advance\L@c-\p@ \R@c=-\L@c \fi\fi
 \else \L@c=\Leftness@\wdz@ \R@c=\wdz@ \advance\R@c-\L@c \fi}
\xydef@\adjustUD@{\dimen@=\ht\z@ \advance\dimen@\dp\z@
 \ifdim\zz@\dimen@ \U@c=\z@ \D@c=\z@ \dimen@=\Upness@\p@
 \ifdim\dimen@<\z@ \U@c=\dimen@ \D@c=-\L@c
 \else\ifdim\dimen@>\p@ \U@c=\dimen@ \advance\U@c-\p@ \D@c=-\L@c \fi\fi
 \else \D@c=\dimen@ \U@c=\Upness@\dimen@ \advance\D@c-\U@c \fi}
\def\checkZeroEdge@{%
 \DN@{}%
 \ifdim\zz@\L@c \ifdim\zz@\R@c \ifdim\zz@\U@c \ifdim\zz@\D@c
 \DN@{\Edge@c={\zeroEdge}}\fi\fi\fi\fi
 \next@}
\xydef@\OBJECT@x{\toks@={\egroup\def\Drop@@}%
 \expandafter\addtotoks@\expandafter{\expandafter{\Drop@@}\def\Connect@@}%
 \expandafter\addtotoks@\expandafter{\expandafter{\Connect@@}}%
 \edef\tmp@{\D@c=\the\D@c \U@c=\the\U@c \L@c=\the\L@c \R@c=\the\R@c
 \Edge@c={\expandafter\noexpand\the\Edge@c}%
 \ifInvisible@\noexpand\Invisible@true\else\noexpand\Invisible@false\fi
 \ifHidden@\noexpand\Hidden@true\else\noexpand\Hidden@false\fi
 \def\noexpand\Leftness@{\Leftness@}\def\noexpand\Upness@{\Upness@}}%
 \expandafter\addtotoks@\expandafter{\tmp@}\the\toks@}
\xynew@{if}\ifInvisible@
\xynew@{if}\ifHidden@
\xydef@\Leftness@{}
\xydef@\Upness@{}
\xydef@\Drop@@{\styledboxz@}
\xydef@\Connect@@{}
\xydef@\objectbox#1{\hbox{$\m@th\objectstyle{#1}$}}
\xylet@\objectstyle=\textstyle
\xydef@\object{\hbox\bgroup\resetStyle@\object@}
\xydef@\object@{%
 \edef\next@{={\DirectionfromtheDirection@}}\expandafter\toks@\next@
 \plainxy@ \xyFN@\OBJECT@}
\xydef@\composite#1#{\hbox\bgroup\composite@{#1}}
\xydef@\composite@#1#2{%
 \DN@{#1}\ifx\next@\empty\else\xywarning@{no variants of
 \string\composite\space allowed}\fi
 \global\setbox9=\hbox\bgroup
 \D@p=-\maxdimen \U@p=-\maxdimen \L@p=-\maxdimen \R@p=-\maxdimen
 \xyFN@\composite@i#2@}
\xydef@\composite@i{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\composite@i}%
 \else\ifx *\next \DN@ *{\xyFN@\composite@i}%
 \else\ifx @\next \DN@ @{\composite@x}%
 \xyerror@{<composite> object expected}{}\czeroEdge@
 \else \DN@{\composite@ii}\fi\fi\fi \next@}
\xydef@\composite@ii#1#{\composite@iii{#1}}
\xydef@\composite@iii#1#2{%
 \setbox\z@=\object#1{#2}%
 \ifInvisible@ \setboxz@h{}\else
 \setboxz@h{\kern-\L@c \boxz@}\ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ {\Drop@@}\fi
 \ifHidden@\else
 \ifdim\U@p<\U@c \U@p=\U@c \fi \ifdim\D@p<\D@c \D@p=\D@c \fi
 \ifdim\R@p<\R@c \R@p=\R@c \fi \ifdim\L@p<\L@c \L@p=\L@c \fi
 \fi
 \xyFN@\composite@iv}
\xydef@\composite@iv{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\composite@iv}%
 \else \ifx @\next \DN@ @{\composite@x}%
 \else \let\next@=\composite@i \fi\fi \next@}
\xydef@\composite@x{%
 \edef\tmp@{\egroup
 \D@c=\the\D@p \U@c=\the\U@p \L@c=\the\L@p \R@c=\the\R@p}\tmp@
 \setboxz@h{\kern\L@c\box9}\ht\z@=\U@c \dp\z@=\D@c
 \dimen@=\L@c \advance\dimen@\R@c \wdz@=\dimen@
 \Edge@c={\rectangleEdge}\computeLeftUpness@ \boxz@
 \OBJECT@x}
\xydef@\computeLeftUpness@{%
 \dimen@=\L@c \advance\dimen@\R@c
 \ifdim\zz@\dimen@ \def\Connect@@{\straight@{\dottedSpread@\jot}}%
 \ifdim\zz@\L@c\else
 \DN@{\zeroEdge}\expandafter\DNii@\expandafter{\the\Edge@c}%
 \ifx\next@\nextii@\Edge@c={\rectangleEdge}\fi\fi
 \else \quotient@\Leftness@\L@c\dimen@ \fi
 \dimen@=\U@c \advance\dimen@\D@c 
 \ifdim\zz@\dimen@ \def\Connect@@{\straight@{\dottedSpread@\jot}}%
 \ifdim\zz@\U@c\else
 \DN@{\zeroEdge}\expandafter\DNii@\expandafter{\the\Edge@c}%
 \ifx\next@\nextii@\Edge@c={\rectangleEdge}\fi\fi
 \else \quotient@\Upness@\U@c\dimen@ \fi}
\xydef@\xybox#1{\xy#1\endxy \Edge@c={\rectangleEdge}\computeLeftUpness@}
\xydef@\OBJECT@shift{%
 \let\xy@=\xytotoks@ \afterVECTORorEMPTY
 {\OBJECT@shift@}%
 {\addtotoks@{\X@c=-\L@c \advance\X@c\R@p \advance\X@c\L@p \Y@c=\U@p}%
 \OBJECT@shift@}}
\xydef@\OBJECT@shift@{%
 \addtotoks@{\advance\U@p-\Y@c
 \advance\L@c\X@c \advance\R@c-\X@c \advance\D@c\Y@c \advance\U@c-\Y@c
 \computeLeftUpness@}%
 \let\xy@=\oxy@ \xyFN@\OBJECT@}
\xylet@\objectmargin@=\jot
\xylet@\objectwidth@=\z@
\xylet@\objectheight@=\z@
\xydef@\objectmargin{\afterADDOP{\Addop@@\objectmargin@}}
\xydef@\objectwidth{\afterADDOP{\Addop@@\objectwidth@}}
\xydef@\objectheight{\afterADDOP{\Addop@@\objectheight@}}
\xydef@\OBJECT@change{%
 \afterADDOP{%
 \addEQ@\ifx \next
 \addtotoks@{\X@c=\D@c \advance\X@c\U@c \Y@c=\L@c \advance\Y@c\R@c}%
 \else
 \addtotoks@{\X@c=\objectmargin@ \advance\X@c\X@c \Y@c=\X@c}%
 \fi
 \let\xy@=\xytotoks@ 
 \afterVECTORorEMPTY\OBJECT@change@\OBJECT@change@}}
\xydef@\OBJECT@set{%
 \afterADDOP{%
 \let\xy@=\xytotoks@ \afterVECTORorEMPTY\OBJECT@change@
 {\addtotoks@{\X@c=\objectwidth@ \Y@c=\objectheight@}\OBJECT@change@}}}
\xydef@\OBJECT@change@{%
 \addtotoks@{\advance\R@c\L@c \advance\R@p-\L@c \let\tmp@=\R@c}%
 \expandafter\addtotoks@\expandafter{\Addop@@\tmp@\X@c\R@c=\tmp@
 \L@c=\Leftness@\R@c \advance\R@p\L@c \advance\R@c-\L@c}%
 \addtotoks@{\advance\D@c\U@c \let\tmp@=\D@c}%
 \expandafter\addtotoks@\expandafter{\Addop@@\tmp@\Y@c\D@c=\tmp@
 \U@c=\Upness@\D@c \advance\D@c-\U@c}%
 \let\xy@=\oxy@ \xyFN@\OBJECT@}
\xydef@\afterADDOP#1{\def\afterADDOP@{#1}\xyFN@\ADDOP@}
\xylet@\afterADDOP@=\empty
\xydef@\ADDOP@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\ADDOP@}%
 \else\addPLUS@\ifx \next \addPLUS@\DN@{\xyFN@\ADDOP@plus}%
 \else\addDASH@\ifx \next \addDASH@\DN@{\xyFN@\ADDOP@minus}%
 \else\addEQ@\ifx \next
 \addEQ@\DN@{\def\Addop@@{\Addop@0+=}\afterADDOP@}%
 \else
 \DN@{\def\Addop@@{\Addop@0+=}\afterADDOP@}%
 \fi\fi\fi\fi \next@}
\xydef@\ADDOP@plus{%
 \addEQ@\ifx \next
 \addEQ@\DN@{\def\Addop@@{\Addop@0+<}\afterADDOP@}%
 \else
 \DN@{\def\Addop@@{\Addop@1+=}\afterADDOP@}%
 \fi \next@}
\xydef@\ADDOP@minus{%
 \addEQ@\ifx \next
 \addEQ@\DN@{\def\Addop@@{\Addop@0+>}\afterADDOP@}%
 \else
 \DN@{\def\Addop@@{\Addop@1-=}\afterADDOP@}%
 \fi \next@}
\xydef@\Addop@#1#2#3#4#5{%
 \dimen@=#4\relax \edef#4{\the\dimen@}%
 \dimen@=#1\dimen@ \advance\dimen@#2#5\relax
 \ifdim\dimen@#3#4\else \edef#4{\the\dimen@}\fi
 \ifx\xy@\xyinitial@\else \DN@##1{\xy@@{\edef#4{##1}\checkZeroEdge@}}%
 \expandafter\next@\expandafter{#4}\fi}
\xydef@\objectEdge{\rectangleEdge}
\xydefcsname@{shape [r]}{\advance\U@p\D@c \centerobject@
 \ifdim\L@c>\D@c
 \advance\R@c\L@c \L@c=.5\U@c \advance\L@c.5\D@c \advance\R@c-\L@c \fi
 \advance\U@p-\D@c}
\xydefcsname@{shape [l]}{\advance\U@p\D@c \centerobject@
 \ifdim\L@c>\D@c
 \advance\L@c\R@c \R@c=.5\U@c \advance\R@c.5\D@c \advance\L@c-\R@c \fi
 \advance\U@p-\D@c}
\xydefcsname@{shape [u]}{\advance\U@p\D@c \centerobject@
 \ifdim\D@c>\L@c
 \advance\U@c\D@c \D@c=.5\L@c \advance\D@c.5\R@c \advance\U@c-\D@c \fi
 \advance\U@p-\D@c}
\xydefcsname@{shape [d]}{\advance\U@p\D@c \centerobject@
 \ifdim\D@c>\L@c
 \advance\D@c\U@c \U@c=.5\L@c \advance\U@c.5\R@c \advance\D@c-\U@c \fi
 \advance\U@p-\D@c}
\xydefcsname@{shape [c]}{\advance\U@p\D@c \centerobject@ \advance\U@p-\D@c}
\xydef@\centerobject@{%
 \advance\D@c\U@c \D@c=.5\D@c \U@c=\D@c \advance\L@c\R@c \L@c=.5\L@c \R@c=\L@c}
\xydef@\OBJECT@shape#1{\DN@{shape [#1]}%
 \expandafter\let\expandafter\nextii@\csname\codeof\next@\endcsname
 \ifx\nextii@\relax\DN@{style [#1]}%
 \expandafter\let\expandafter\nextii@\csname\codeof\next@\endcsname
 \ifx\nextii@\relax \DN@{\OBJECT@shapei[#1]}%
 \else\DN@{\nextii@\xyFN@\OBJECT@}\fi
 \else \expandafter\addtotoks@\expandafter{\nextii@}%
 \DN@{\xyFN@\OBJECT@}%
 \fi \next@}
\xydefcsname@{shape []}{\the\Edge@c5\relax}%
\xydefcsname@{shape [Outer]}{\the\Edge@c5\relax}%
\xydefcsname@{shape [Inner]}{\the\Edge@c4\relax}%
\xydefcsname@{shape [o]}{\Edge@c={\circleEdge}\the\Edge@c5\relax 
 \Edge@c={\circleEdge}\def\prevEdge@@{\circleEdge}}
\xydefcsname@{shape [.]}{\czeroEdge@}
\def\OBJECT@shapei[#1#2]{\DN@{shape [#1...]}%
 \expandafter\let\expandafter\next\csname\codeof\next@\endcsname
 \ifx\next\relax\DN@{*stylechar@#1@}%
 \expandafter\let\expandafter\next\csname\codeof\next@\endcsname
 \ifx\next\relax\DNii@{shape [#1#2]}%
 \xywarning@{illegal [<shape>] ignored: \codeof\nextii@\space not defined}%
 \DN@{\xyFN@\OBJECT@}%
 \else% Delete this: \expandafter\addtotoks@\expandafter{\next{#2}}%
 \DN@{\next{#2}\xyFN@\OBJECT@}%
 \fi
 \else
\expandafter\addtotoks@\expandafter{\next{#2}}\DN@{\next{#2}\xyFN@\OBJECT@}%
 \fi \next@}
\xydef@\preXY@style@{}
\xydef@\postXY@style@{}
\xydef@\resetStyle@{\gdef\preXY@style@{}\gdef\postXY@style@{}}
\xynew@{toks}{\styletoks@}
\xydef@\addtostyletoks@#1{%
 \expandafter\styletoks@\expandafter{\the\styletoks@#1}}
\xydef@\styledboxz@{%
 \xypre@Style@@
 \boxz@
 \xypost@Style@@}
\xydef@\xypre@Style@{\styletoks@={}\saveXyStyle@\preXY@style@
 \expandafter\DN@\expandafter{\the\styletoks@}%
 \ifx\next@\empty \DN@{\let\xypre@Style@@=\relax 
 \let\xypost@Style@@=\relax \xypre@skipStyle@}%
 \else
 \let\xypre@Style@@=\relax \let\xypost@Style@@=\xypost@Style@
 \DN@{\expandafter\xydoprestyles@\expandafter{\the\styletoks@}}%
 \fi \next@ }
\xydef@\xypost@Style@{\styletoks@={}\postXY@style@
 \expandafter\xydopoststyles@\expandafter{\the\styletoks@}%
 \let\xypost@Style@@=\relax \let\xypre@Style@@=\xypre@Style@ }
\xydef@\xypre@skipStyle@#1\xypost@Style@@{#1\relax 
 \let\xypre@Style@@=\xypre@Style@ }
\xydef@\xydoprestyles@@{\literal@}
\xydef@\xydopoststyles@@{\literal@}
\xylet@\xydoprestyles@=\xydoprestyles@@
\xylet@\xydopoststyles@=\xydopoststyles@@
\xydef@\modXYstyle@{%
 \ifx\xy@style@\empty\resetStyle@\fi \checkXyStyle@
 \expandafter\expandafter\expandafter\DN@
 \expandafter\expandafter\expandafter{\preXYstyle@@}%
 \ifx\next@\empty\else\DN@{\modXYstyle@@}\fi \next@ }
\xydef@\modXYstyle@@{%
 \DN@##1{\expandafter\def\expandafter\tmp@\expandafter{##1}}%
 \expandafter\next@\expandafter{\preStyle@@}%
 \DN@##1{\expandafter\gdef\expandafter\preXY@style@\expandafter{%
 \preXY@style@ ##1}}\expandafter\next@\expandafter{\tmp@}%
 \DN@##1{\expandafter\def\expandafter\tmp@\expandafter{##1}}%
 \expandafter\next@\expandafter{\postStyle@@}%
 \DN@##1{\expandafter\gdef\expandafter\postXY@style@\expandafter{%
 \tmp@ ##1}}\expandafter\next@\expandafter{\postXY@style@}}
\xydef@\xy@style@{}
\xydef@\checkXyStyle@{\ifx\xy@style@\empty\resetStyle@\fi
 \let\xy@style@=\relax}
\xydef@\preStyle@@{}
\xydef@\postStyle@@{}
\xydef@\preXYstyle@@{\relax}
\xydef@\loadxystyle@{%
 \let\xypre@Style@@=\xypre@Style@ \def\preXYstyle@@{\preStyle@@}}
\loadxystyle@
\xydef@\Unloadstyle@{%
 \let\xypre@Style@@=\relax \let\xypost@Style@@=\relax
 \def\preXYstyle@@{\relax}}
\xydefcsname@{shape [=...]}#1{\checkXyStyle@ \addtotoks@{\xynamestyle@{#1}}}
\xydef@\xynamestyle@#1{\checkXyStyle@
 \expandafter\DNii@\expandafter{\csname shape [#1]\endcsname}%
 \expandafter\ifx\nextii@\relax
 \else\xywarning@{Redefining style [#1]}\fi
 \expandafter\xynamestyle@@\csname shape [#1]\endcsname }
\xydef@\xynamestyle@@#1{%
 \expandafter\def\expandafter\tmp@\expandafter{\preXY@style@}%
 \DN@##1{\def\tmp@{\checkXyStyle@\gdef\preXY@style@{##1}}}%
 \expandafter\next@\expandafter{\preXY@style@}%
 \DN@##1{\expandafter\gdef\expandafter#1\expandafter{\tmp@
 \gdef\postXY@style@{##1}}}%
 \expandafter\next@\expandafter{\postXY@style@}\DN@{}}
\xydef@\prevXypreStyle@@{}
\xydef@\prevXypostStyle@@{}
\xydef@\saveXyStyle@{\expandafter
 \def\expandafter\prevXypreStyle@@\expandafter{\preXY@style@}%
 \expandafter\def\expandafter\prevXypostStyle@@\expandafter{%
 \postXY@style@}}
\xydef@\recoverXyStyle@{\expandafter
 \gdef\expandafter\preXY@style@\expandafter{\prevXypreStyle@@}%
 \expandafter\gdef\expandafter\postXY@style@\expandafter{%
 \prevXypostStyle@@}}
\xydef@\newxystyle#1#2#3{%
 \DN@{#3}\ifx\next@\empty 
 \xydefcsname@{shape [#1]}{\csname xyshape@#1@\endcsname}%
 \else \expandafter\def\csname shape [#1]\endcsname{%
 \csname xyshape@#1@\endcsname}\fi
 \DN@{#2}\ifx\next@\empty
 \expandafter\def\csname xyshape@#1@\endcsname{%
 \xyundefinedStyle@{#1}{}@@}%
 \else \expandafter\def\csname xyshape@#1@\endcsname{#2}\fi}
\xydef@\xyundefinedStyle@#1#2@@{%
 \xywarning@{style #1 not defined, nothing to apply}}
\xydef@\applyFIFOstyle@#1#2#3#4{\bgroup
 \styletoks@={\egroup\gdef\preXY@style@}%
 \expandafter\toks@\expandafter{\preXY@style@}%
 \expandafter\addtotoks@\expandafter{\expandafter#1\expandafter{#2}}%
 \expandafter\addtostyletoks@\expandafter{\expandafter{\the\toks@}%
 \gdef\postXY@style@}%
 \expandafter\toks@\expandafter{\expandafter#3\expandafter{#4}}%
 \expandafter\addtotoks@\expandafter{\postXY@style@}%
 \expandafter\addtostyletoks@\expandafter{\expandafter{\the\toks@}}%
 \the\styletoks@ }
\xydef@\applyLIFOstyle@#1#2#3#4{\bgroup
 \styletoks@={\egroup\gdef\preXY@style@}%
 \expandafter\toks@\expandafter{\expandafter#1\expandafter{#2}}%
 \expandafter\addtotoks@\expandafter{\preXY@style@}%
 \expandafter\addtostyletoks@\expandafter{\expandafter{\the\toks@}%
 \gdef\postXY@style@}%
 \expandafter\toks@\expandafter{\postXY@style@}%
 \expandafter\addtotoks@\expandafter{\expandafter#3\expandafter{#4}}%
 \expandafter\addtostyletoks@\expandafter{\expandafter{\the\toks@}}%
 \the\styletoks@ }
\xydef@\OBJECT@direction{\afterDIRECTIONorEMPTY{%
 \edef\next@{{\DirectionfromtheDirection@}}\expandafter\addtotoks@\next@
 \xyFN@\OBJECT@}%
 {\xyFN@\OBJECT@}}
\xydef@\afterDIRECTIONorEMPTY#1#2{%
 \DN@##1{\def\afterDIRECTION@{\def\afterDIRECTION@{##1}%
 \ifDIRECTIONempty@\DN@{#2}\else\DN@{#1}\fi \next@}}%
 \expandafter\next@\expandafter{\afterDIRECTION@}%
 \xyFN@\DIRECTION@}
\xylet@\afterDIRECTION@=\empty
\xynew@{if}\ifDIRECTIONempty@
\xydef@\DIRECTION@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\DIRECTION@}%
 \else\ifx v\next \DN@ v{\DIRECTION@v}%
 \else\ifx \bgroup\next \let\next@=\DIRECTION@group
 \else\ifx (\next \DN@({\xyFN@\DIRECTION@open}%
 \else
 \DN@{\count@=8
 \afterDIAG{\ifnum\count@=8 \DN@{\DIRECTIONempty@true \xyFN@\DIRECTION@i}%
 \else \DN@{\xy@@{\dimen@=\xydashl@}\Directionfromdiag@}\fi \next@}}%
 \fi\fi\fi\fi \next@}
\xydef@\DIRECTION@open{%
 \ifx *\next \DN@*##1*){\DIRECTION@group{##1}}%
 \else \DN@{\xyerror@{(* <pos> *) expected}{} \xyFN@\DIRECTION@i}%
 \fi \next@}
\def\afterDIAG#1{\def\afterDIAG@{#1}\xyFN@\DIAG@}
\xydef@\DIAG@{%
 \ifx d\next \DN@ d{\count@=1 \xyFN@\DIAG@@}%
 \else\ifx r\next \DN@ r{\count@=3 \xyFN@\DIAG@@}%
 \else\ifx u\next \DN@ u{\count@=5 \xyFN@\DIAG@@}%
 \else\ifx l\next \DN@ l{\count@=7 \xyFN@\DIAG@@}%
 \else \let\next@=\afterDIAG@
 \fi\fi\fi\fi \next@}
\xydef@\DIAG@@{\ifcase\count@ \or
 \DIAG@@@ l0r2\or\or \DIAG@@@ d2u4\or\or \DIAG@@@ r4l6\or\or \DIAG@@@ u6d0%
 \else\xybug@{impossible <diag> number}\fi
 \next@}
\xydef@\DIAG@@@#1#2#3#4{%
 \ifx #1\next \count@=#2\DN@#1{\afterDIAG@}%
 \else \ifx #3\next \count@=#4\DN@#3{\afterDIAG@}%
 \else \let\next@=\afterDIAG@ \fi\fi}
\xydef@\Directionfromdiag@{\ifcase\count@
 \xy@@{\dlDirection@\dimen@}%
 \or \xy@@{\dDirection@\dimen@}%
 \or \xy@@{\drDirection@\dimen@}%
 \or \xy@@{\rDirection@\dimen@}%
 \or \xy@@{\urDirection@\dimen@}%
 \or \xy@@{\uDirection@\dimen@}%
 \or \xy@@{\ulDirection@\dimen@}%
 \or \xy@@{\lDirection@\dimen@}%
 \or
 \else\xybug@{impossible <diag>}\fi
 \DIRECTIONempty@false \xyFN@\DIRECTION@i}
\xydef@\DIRECTION@v{%
 \xy@{v}{\enter@{\cfromthec@ \X@origin=\the\X@origin \Y@origin=\the\Y@origin
 \X@p=\the\X@p \Y@p=\the\Y@p}%
 \X@origin=\z@ \Y@origin=\z@}%
 \afterVECTORorEMPTY
 {\xy@@{\X@p=\z@ \Y@p=\z@ \setupDirection@ \leave@}%
 \DIRECTIONempty@false \xyFN@\DIRECTION@i}%
 {\xy@@\leave@ \xyerror@{<vector> expected after v}{}%
 \DIRECTIONempty@false \xyFN@\DIRECTION@i}}
\xydef@\DIRECTION@group#1{%
 \xy@@{\begingroup}\xy@@ix@{#1}\xy@@{\plainxy@\expandafter\POS\the\toks9\relax
 \setupDirection@\edef\next@{\endgroup \DirectionfromtheDirection@}\next@}%
 \DIRECTIONempty@false \xyFN@\DIRECTION@i}
\xydef@\DIRECTION@i{%
 \ifx ^\next \DN@ ^{\xy@^{\aboveDirection@\xydashl@}%
 \DIRECTIONempty@false \xyFN@\DIRECTION@i}%
 \else\ifx _\next \DN@ _{\xy@_{\belowDirection@\xydashl@}%
 \DIRECTIONempty@false \xyFN@\DIRECTION@i}%
 \else\ifx :\next \DN@ :{%
 \xy@{:}{\enter@{\cfromthec@ \basefromthebase@ \X@p=\the\X@p \Y@p=\the\Y@p}%
 \X@origin=\z@ \Y@origin=\z@
 \X@xbase=\cosDirection\xydashl@ \Y@xbase=\sinDirection\xydashl@
 \X@ybase=-\Y@xbase \Y@ybase=\X@xbase}%
 \afterVECTORorEMPTY
 {\xy@@{\X@p=\z@ \Y@p=\z@ \setupDirection@ \leave@}%
 \DIRECTIONempty@false \xyFN@\DIRECTION@i}%
 {\xy@@\leave@ \xyerror@{<vector> expected after :}{}%
 \DIRECTIONempty@false \xyFN@\DIRECTION@i}}%
 \else
 \let\next@=\afterDIRECTION@
 \fi\fi\fi \next@}
\message{decorations;}
\xydef@\drop#1#{\DN@##1{\xy@@ix@{{#1}{##1}}%
 \xy@{\drop#1{##1}}{\expandafter\drop@\the\toks9 }\ignorespaces}\next@}
\xydef@\connect#1#{\DN@##1{\xy@@ix@{{#1}{##1}}%
 \xy@{\connect#1{##1}}{\expandafter\connect@\the\toks9 }\ignorespaces}\next@}
\xydef@\preconnect#1#{\DN@##1{\xy@@ix@{{#1}{##1}}%
 \xy@{\connect#1{##1}}{\expandafter\preconnect@\the\toks9 }\ignorespaces}\next@}
\xydef@\save{\relax\saveC}
\xydef@\saveC{\xy@\save\save@ \POS}
\xydef@\save@{\enter@{\cfromthec@ \pfromthep@ \basefromthebase@}}
\xydef@\restore{\xy@\restore\leave@ \ignorespaces}
\xydef@\xyecho{%
 \xy@\xyecho{\let\xy@=\xyecho@ \message{\string\xyecho}}\POS}
\xydef@\xyecho@#1#2{{\def\1{#1}\ifx\1\empty\else\message{\codeof\1}\fi}%
 \oxy@{#1}{#2}}
\xydef@\xyverbose{%
 \xy@\xyverbose{\let\xy@=\xyverbose@
 \W@{Xy: \string\xyverbose\xytracelineno@}}\POS}
\xydef@\xyverbose@#1#2{%
 {\def\1{#1}\ifx\1\empty\else\W@{Xy: \codeof\1\xytracelineno@}\fi}%
 \oxy@{#1}{#2}}
\xydef@\xytracing{%
 \xy@\xytracing{\let\xy@=\xytracing@
 \W@{Xy TRACE: \string\xytracing\xytracelineno@}\xystatus@:}\POS}
\xydef@\xytracing@#1#2{{\def\1{#1}\def\2{#2}%
 \W@{Xy TRACE: \codeof\1 {\codeof\2}\xytracelineno@}}\oxy@{#1}{#2}\xystatus@:}
\xydef@\xystatus@#1{\xystatus@cp{#1}%
 \W@{#1 d=<\the\d@X,\the\d@Y>
 Direction=\the\Direction=\string(\cosDirection,\sinDirection\string)}%
 \W@{#1 base=<\the\X@origin,\the\Y@origin>+%
 <\the\X@xbase,\the\Y@xbase>x+<\the\X@ybase,\the\Y@ybase>y}%
 \W@{#1 min/max=<\the\X@min,\the\Y@min>/<\the\X@max,\the\Y@max>
 S=\the\csp@}}
\xydef@\xystatus@cp#1{%
 \W@{#1 c=<\the\X@c,\the\Y@c> \expandafter\string\the\Edge@c
 \string[\the\L@c+\the\R@c,\the\D@c+\the\U@c\string]
 \ifInvisible@ I\fi\ifHidden@ H\fi}%
 \W@{#1 p=<\the\X@p,\the\Y@p> \expandafter\string\the\Edge@p
 \string[\the\L@p+\the\R@p,\the\D@p+\the\U@p\string]}}
\xydef@\xystatus@c#1{%
 \W@{#1<\the\X@c,\the\Y@c> \expandafter\string\the\Edge@c
 \string[\the\L@c+\the\R@c,\the\D@c+\the\U@c\string]}}
\xydef@\xyquiet{\xy@\xyquiet{\let\xy@=\oxy@}}
\xydef@\xyignore#1{\xy@\xyignore{\xyignore@{#1}}\ignorespaces}
\xydef@\xyignore@#1{{\let\xy@=\xyeat@ \change@oxy@\xy@ \POS#1\relax}}
\xydef@\xyeat@#1#2{}
\xydef@\xycompile@@{\jobname-}
\xydef@\xycompileno@@{0}
\xydef@\CompilePrefix#1{%
 \def\xycompile@@{#1}\xdef\xycompile@@{\codeof\xycompile@@}%
 \xdef\xycompileno@@{0}}
\xydef@\xycompile{%
 \count@=\xycompileno@@ \advance\count@\@ne
 \xdef\xycompileno@@{\ifnum10>\count@ 0\fi \the\count@}%
 \edef\next{\noexpand\xycompileto{\xycompile@@\xycompileno@@}}\next}
\xylet@\compilename@@=\empty
\xylet@\xyrecompile@@=\relax
\xydef@\xycompileto#1#2{%
 \if\inxy@ \DN@{\xy@@{\nter@{}}}%
 \else \DN@{\xy \xy@@{\nter@{\endxy}}}\fi \next@
 \ifxysaving@ \xyerror@{Compilations can not be nested}{}\fi
 \DN@{#1}\edef\compilename@@{\codeof\next@}\DNii@{#2}%
 \def\xyrecompile@@{recompiling TRUNCATED}%
 \expandafter\xyinputorelse@@\expandafter{\compilename@@.xyc}%
 {\def\xyrecompile@@{compiling to}}%
 \ifx\xyrecompile@@\relax \else \expandafter\xyrecompile@ \fi
 \xy@@\leave@ \ignorespaces}
\xydef@\xyrecompile@{%
 \message{(\xyrecompile@@\space\string`\compilename@@.xyc\string'}%
 \DN@{\immediate\openout\xywrite@=}\expandafter\next@\compilename@@.xyc
 \immediate\write\xywrite@{%
 \string\xycompiled{\compilename@@}%
 {\the\year/\the\month/\the\day\string:\the\time\xytracelineno@}%
 {Xy-pic \xyversion}\xycomment@}%
 \immediate\write\xywrite@{{\codeof\nextii@}\relax}%
 {\xysaving@ \expandafter\POS\nextii@ \relax}%
 \immediate\write\xywrite@{\string\xyendcompiled}%
 \immediate\closeout\xywrite@ \message{done)}%
 \expandafter\input\compilename@@.xyc
 \outlines@@\writeoutline@\writeoutline@}
\xydef@\xysaving@{\let\xy@=\xysave@ \change@oxy@\xy@
 \let\xy@@ix@=\xysave@@toksix@ \xysaving@true}
\xynew@{if}\ifxysaving@ \xysaving@false
\xydef@\xysave@#1#2{{\DN@{{#1}{#2}}%
 \immediate\write\xywrite@{\string\xy@\codeof\next@\xycomment@}}}
\xydef@\xysave@@toksix@#1{{\DN@{{#1}}%
 \immediate\write\xywrite@{\string\xy@@ix@\codeof\next@\relax}}}
\xywarnifdefined\xycomment@
{\catcode`\%=12 \catcode`\(=1 \catcode`\)=2 \gdef\xycomment@(%)}
\xydef@\xycompiled#1#2#3#4{\DN@{#1}\edef\next@{\codeof\next@}%
 \ifx\next@\compilename@@\else
 \xywarning@{This file does not contain the result of
 \string\xycompileto{\compilename@@}{...}^^J%
 but of \string\xycompileto{\next@}}\fi
 \edef\next{Xy-pic \xyversion}\DN@{#3}\ifx\next\next@
 \DN@{#4}\ifx\next@\nextii@ \xycatcodes \outlines@@\relax\readoutline@
 \else \def\xyrecompile@@{recompiling to}\endinput \fi
 \else \def\xyrecompile@@{Xy-pic version change - recompiling}\endinput \fi}
\xydef@\xyendcompiled{\let\xyrecompile@@=\relax \xyuncatcodes\endinput}
\xydef@\CompileFixPoint#1{%
 \expandafter\ifx\csname#1FIX@@\endcsname\relax
 \expandafter\xdef\csname#1FIX@@\endcsname{\xycompileno@@}%
 \else
 \xdef\xycompileno@@{\csname#1FIX@@\endcsname}\fi}
\xydef@\outlines@no#1#2{}
\xydef@\outlines@make#1#2{#1}
\xydef@\outlines@only#1#2{#2}
\xylet@\outlines@@=\outlines@no
\xylet@\writeoutline@@=\relax
\xylet@\readoutline@@=\relax
\xydef@\MakeOutlines{\let\outlines@@=\outlines@make}
\xydef@\OnlyOutlines{\xywarning@{Compiled pictures only shown as outlines}%
 \let\outlines@@=\outlines@only}
\xydef@\ShowOutlines{\let\readoutline@@=\typesetoutline@}
\xydef@\NoOutlines{\let\outlines@@=\outlines@no}
\xydef@\writeoutline@{%
 \DN@{\immediate\openout\xywrite@=}\expandafter\next@\compilename@@.xyd
 \immediate\write\xywrite@{\xycomment@\space\compilename@@.xyd}
 \immediate\write\xywrite@{%
 \string\X@min=\the\X@min \string\X@max=\the\X@max
 \string\Y@min=\the\Y@min \string\Y@max=\the\Y@max \string\relax}%
 \writeoutline@@
 \immediate\closeout\xywrite@}
\xynew@{if}\ifoutlineread@
\xydef@\readoutline@{\outlineread@true
 \expandafter\xyinputorelse@@\expandafter{\compilename@@.xyd}%
 {\def\xyrecompile@@{outline missing - recompiling to}\outlineread@false}%
 \ifoutlineread@ \readoutline@@
 \writeoutline@\expandafter\xyendcompiled\fi}
\xydef@\typesetoutline@{%
 \xy@@{\czeroEdge@ \U@p=\z@ \D@p=\z@ \L@p=\z@ \R@p=\z@ \Edge@p={\zeroEdge}%
 \X@p=\X@min \Y@p=\Y@min \X@c=\X@min \Y@c=\Y@max \connect@\dir{.}%
 \X@p=\X@c \Y@p=\Y@c \X@c=\X@max \Y@c=\Y@max \connect@\dir{.}%
 \X@p=\X@c \Y@p=\Y@c \X@c=\X@max \Y@c=\Y@min \connect@\dir{.}%
 \X@p=\X@c \Y@p=\Y@c \X@c=\X@min \Y@c=\Y@min \connect@\dir{.}}}
\message{kernel objects:}
\message{directionals,}
\xydef@\dir{\hbox\bgroup\xyFN@\dir@i}
\xydef@\dir@i{\ifx *\next \DN@*{\resetStyle@\object@}%
 \else \let\next@=\dir@ii \fi \next@}
\xydef@\dir@ii#1#{\dir@{#1}}
\xydef@\dir@#1#2{\DN@{dir#1{#2}}%
 \expandafter\let\expandafter\next\csname\codeof\next@\endcsname
 \ifx\next\relax \DN@{dir{#2}}%
 \expandafter\let\expandafter\next\csname\codeof\next@\endcsname
 \ifx\next\relax \DN@{\dir#1{#2}}%
 \xyerror@{illegal <dir>: \codeof\next@\space not defined}{}%
 \let\next=\no@ \fi\fi \next}
\xydefcsname@{dir{}}{\no@}
\xyletcsnamecsname@{dir0{}}{dir{}}
\xyletcsnamecsname@{dir1{}}{dir{}}
\xyletcsnamecsname@{dir^{}}{dir{}}
\xyletcsnamecsname@{dir_{}}{dir{}}
\xyletcsnamecsname@{dir2{}}{dir{}}
\xyletcsnamecsname@{dir3{}}{dir{}}
\xyletcsnamecsname@{dir{ }}{dir{}}
\xydef@\no@{\egroup \czeroEdge@
 \def\Leftness@{.5}\def\Upness@{.5}%
 \def\Drop@@{\setbox\z@=\copy\voidb@x}\def\Connect@@{\no@@}}
\xydefcsname@{dir1{-}}{\line@}
\xydefcsname@{dir2{-}}{\line@ \double@\xydashh@}
\xydefcsname@{dir3{-}}{\line@ \triple@\xydashh@}
\xyletcsnamecsname@{dir0{-}}{dir{}}
\xyletcsnamecsname@{dir{-}}{dir1{-}}
\xyletcsnamecsname@{dir{=}}{dir2{-}}
\xydef@\line@{\dimen@=\sd@Y\sinDirection\xydashl@
 \ifnum\SemiDirectionChar<31 \D@c=\z@ \U@c=\dimen@ \DN@{\d@Y<\z@}%
 \else\ifnum\SemiDirectionChar<64 \D@c=\dimen@ \U@c=\z@ \DN@{\z@<\d@Y}%
 \else\ifnum\SemiDirectionChar<96 \D@c=\dimen@ \U@c=\z@ \DN@{\d@X<\z@}%
 \else \D@c=\z@ \U@c=\dimen@ \DN@{\d@X<\z@}\fi\fi\fi
 \setboxz@h{\line@@}\ht\z@=\U@c \dp\z@=\D@c
 \L@c=\z@ \R@c=\wdz@
 \ifdim\next@ \dimen@=\R@c \R@c=\L@c \L@c=\dimen@
 \dimen@=\U@c \U@c=\D@c \D@c=\dimen@ \advance\dimen@-\U@c
 \lower\dimen@\boxz@
 \else \boxz@ \fi
 \edef\tmp@{\egroup \U@c=\the\U@c \D@c=\the\D@c \L@c=\the\L@c \R@c=\the\R@c}%
 \tmp@
 \Edge@c={\rectangleEdge}%
 \ifdim\z@<\U@c \def\Upness@{1}\else \def\Upness@{0}\fi
 \ifdim\z@<\L@c \def\Leftness@{1}\else \def\Leftness@{0}\fi
 \def\Drop@@{\styledboxz@}\def\Connect@@{\solid@}}
\xydef@\line@@{{\xydashfont\SemiDirectionChar\/}}
\xydef@\solid@{%
 \checkXy@rules@\solidhrule@\solidvrule@{\straight@\solidSpread@}}
\xydef@\checkXy@rules@#1#2#3{%
 \dimen@=\Y@c \advance\dimen@-\Y@p
 \ifjusthvtest@.05pt>\ifdim\dimen@<\z@-\fi\dimen@ \DN@{#1}%
 \else \dimen@=\X@c \advance\dimen@-\X@p
 \ifjusthvtest@.05pt>\ifdim\dimen@<\z@-\fi\dimen@ \DN@{#2}%
 \else \DN@{#3}\fi\fi \next@}
\xydef@\solidSpread@{\ifnum\z@<\count@@ \advance\count@@\@ne \fi}
\xylet@\ifjusthvtest@=\ifdim
\xydef@\NoRules{\let\ifjusthvtest@=\iffalse}
\xydef@\UseRules{\let\ifjusthvtest@=\ifdim}
\xydef@\solidvrule@{\no@@ \solidvrule@typeset \ifHidden@\else\noinsert@\fi
 \solidvrule@pre}
\xydef@\solidvrule@pre{%
 \def\Cbreak@@{%
 \connectRestore@ \swap@\lastbreak@@\swap@
 \solidvrule@typeset \edef\lastbreak@@{\cfromthec@}\Creset@@}%
 \def\Clast@@{%
 \connectRestore@ \Creset@@\swap@\lastbreak@@\swap@
 \solidvrule@typeset \Creset@@ \edef\lastbreak@@{\cfromthep@}}%
}
\xydef@\solidvrule@typeset{%
 \ifInvisible@ \let\next@=\relax \else \let\next@=\solidvrule@typeset@ \fi
 \checkoverlap@@ \next@}
\xydef@\solidvrule@typeset@{{%
 \advance\X@c\X@p \X@c=.5\X@c \X@p=\X@c
 \advance\X@c-.5\xydashw@ \advance\X@p.5\xydashw@
 \ifdim\Y@c<\Y@p \advance\Y@c\U@c \advance\Y@p-\D@p
 \else \swapdimen@\Y@c\Y@p \advance\Y@c\U@p \advance\Y@p-\D@c \fi
 \Droprule@}}
\xydef@\solidhrule@{\no@@ \solidhrule@typeset \ifHidden@\else\noinsert@\fi
 \solidhrule@pre}
\xydef@\solidhrule@pre{%
 \def\Cbreak@@{%
 \connectRestore@ \swap@\lastbreak@@\swap@
 \solidhrule@typeset \edef\lastbreak@@{\cfromthec@}\Creset@@}%
 \def\Clast@@{%
 \connectRestore@ \Creset@@\swap@\lastbreak@@\swap@
 \solidhrule@typeset \Creset@@ \edef\lastbreak@@{\cfromthep@}}%
}
\xydef@\solidhrule@typeset{%
 \ifInvisible@ \let\next@=\relax \else \let\next@=\solidhrule@typeset@ \fi
 \checkoverlap@@ \next@}
\xydef@\solidhrule@typeset@{{%
 \ifdim\X@c<\X@p \advance\X@c\R@c \advance\X@p-\L@p
 \else \swapdimen@\X@c\X@p \advance\X@c\R@p \advance\X@p-\L@c \fi
 \advance\Y@c\Y@p \Y@c=.5\Y@c \Y@p=\Y@c
 \advance\Y@c-.5\xydashw@ \advance\Y@p.5\xydashw@
 \Droprule@}}
\xydef@\Droprule@{\advance\X@p-\X@c
 \setboxz@h{\kern\X@c \vrule width\X@p depth-\Y@c height\Y@p}%
 \ht\z@=\z@ \wd\z@=\z@ \dp\z@=\z@ \Drop@@}
\xydef@\zerodot{\copy\zerodotbox@}
\xydefcsname@{dir1{.}}{\point@}
\xydefcsname@{dir2{.}}{\point@ \double@\xydashh@}
\xydefcsname@{dir3{.}}{\point@ \triple@\xydashh@}
\xyletcsnamecsname@{dir0{.}}{dir{}}
\xyletcsnamecsname@{dir{.}}{dir1{.}}
\xyletcsnamecsname@{dir{:}}{dir2{.}}
\xydef@\point@{\pointlike@\zerodot\p@}
\xydef@\pointlike@#1#2{%
 \setboxz@h{#1}\wdz@=\z@ \ht\z@=\z@ \dp\z@=\z@ \boxz@\egroup
 \def\Leftness@{.5}\def\Upness@{.5}\ctipEdge@
 \def\Drop@@{\styledboxz@}\def\Connect@@{\straight@{\dottedSpread@{#2}}}}
\xydef@\dottedSpread@#1{%
 \dimen@=#1\relax \DN@{\A@=2\A@ \B@=2\B@ \dottedSpread@i}%
 \A@=\sd@X\cosDirection\dimen@ \B@=\sd@Y\sinDirection\dimen@
 \dimen@=\A@ \advance\dimen@\B@
 \dimen@ii=\sd@X\d@X \advance\dimen@ii\sd@Y\d@Y
 \ifdim\dimen@>\dimen@ii \DN@{\count@@=\z@}\fi
 \next@}
\xydef@\dottedSpread@i{%
 \global\setbox8=\hbox to\A@{\hss
 \kern.5\A@\box\lastobjectbox@\kern.5\A@\hss}\dp8=.5\B@ \ht8=.5\B@
 \advance\d@X\sd@X\A@ \advance\d@Y\sd@Y\B@
 \advance\X@c\sd@X.5\A@ \advance\Y@c\sd@Y.5\B@
 \ifdim\sd@Y\d@Y<\sd@X\d@X \dimen@=\sd@X\d@X
 \ifdim\zz@\A@\else \divide\dimen@\A@ \fi \count@@=\dimen@
 \else \dimen@=\sd@Y\d@Y
 \ifdim\zz@\B@\else \divide\dimen@\B@ \fi \count@@=\dimen@
 \fi \advance\count@@\@ne}
\xydefcsname@{dir1{~}}{\squiggle@}
\xydefcsname@{dir2{~}}{\squiggle@ \double@\xybsqlh@}
\xydefcsname@{dir3{~}}{\squiggle@ \triple@\xybsqlh@}
\xyletcsnamecsname@{dir0{~}}{dir{}}
\xyletcsnamecsname@{dir{~}}{dir1{~}}
\xydef@\squiggle@{\xybsqlfont
 \dimen@=\sd@X\cosDirection\xybsqll@ \advance\dimen@.1\p@
 \dimen@ii=\sd@Y\sinDirection\xybsqll@
 \kern\dimen@\squiggle@@
 \edef\tmp@{\egroup \U@c=\the\dimen@ii \L@c=\the\dimen@}\tmp@
 \wdz@=2\L@c \R@c=\L@c \ht\z@=\U@c \D@c=\U@c \dp\z@=\U@c
 \Edge@c={\rectangleEdge}%
 \def\Leftness@{.5}\def\Upness@{.5}%
 \def\Drop@@{\styledboxz@}\def\Connect@@{\straight@\squiggledSpread@}}
\xydef@\squiggle@@{\DirectionChar \count@=\DirectionChar
 \advance\count@-64 \ifnum\count@<\z@ \advance\count@128 \fi \char\count@}
\xydef@\squiggledSpread@{%
 \dimen@=\d@X \advance\dimen@-\sd@X\count@@\A@ \advance\dimen@\sd@X.3\p@
 \advance\X@c-.5\dimen@ \advance\d@X-\dimen@
 \dimen@=\d@Y \advance\dimen@-\sd@Y\count@@\B@ \advance\dimen@\sd@Y.3\p@
 \advance\Y@c-.5\dimen@ \advance\d@Y-\dimen@}
\xydef@\double@#1{\edef\Drop@@{\dimen@=#1\relax
 \dimen@=.5\dimen@ \A@=-\sinDirection\dimen@ \B@=\cosDirection\dimen@
 \setboxz@h{\setbox2=\hbox{\kern\A@\raise\B@\copy\z@}%
 \dp2=\z@ \ht2=\z@ \wd2=\z@ \box2
 \setbox2=\hbox{\kern-\A@\raise-\B@ \noexpand\boxz@}%
 \dp2=\z@ \ht2=\z@ \wd2=\z@ \box2 }%
 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \noexpand\styledboxz@}}
\xydef@\triple@#1{\edef\Drop@@{\dimen@=#1\relax
 \A@=-\sinDirection\dimen@ \B@=\cosDirection\dimen@
 \setboxz@h{\setbox2=\hbox{\kern\A@\raise\B@\copy\z@}%
 \dp2=\z@ \ht2=\z@ \wd2=\z@ \box2
 \setbox2=\hbox{\kern-\A@\raise-\B@\copy\z@}%
 \dp2=\z@ \ht2=\z@ \wd2=\z@ \box2
 \dp\z@=\z@ \ht\z@=\z@ \wdz@=\z@ \noexpand\boxz@}%
 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \noexpand\styledboxz@}}
\xydefcsname@{dir1{--}}{\dash@}
\xydefcsname@{dir2{--}}{\dash@ \double@\xydashh@}
\xydefcsname@{dir3{--}}{\dash@ \triple@\xydashh@}
\xyletcsnamecsname@{dir0{--}}{dir{}}
\xyletcsnamecsname@{dir{--}}{dir1{--}}
\xyletcsnamecsname@{dir{==}}{dir2{--}}
\xydef@\dash@{\line@ \wdz@=2\wdz@ \ht\z@=2\ht\z@ \dp\z@=2\dp\z@
 \multiply\D@c\tw@ \multiply\U@c\tw@ \multiply\L@c\tw@ \multiply\R@c\tw@
 \def\Connect@@{\straight@\dashedSpread@}}
\xydef@\dashedSpread@{\ifnum\z@<\count@@ \advance\count@@\@ne \fi
 \advance\d@X\sd@X.5\A@ \advance\d@Y\sd@Y.5\B@
 \ifdim\z@<\d@X \advance\X@c.5\A@ \fi \advance\Y@c\sd@Y.5\B@}
\xydefcsname@{dir1{~~}}{\dashsquiggle@}
\xydefcsname@{dir2{~~}}{\dashsquiggle@ \double@\xybsqlh@}
\xydefcsname@{dir3{~~}}{\dashsquiggle@ \triple@\xybsqlh@}
\xyletcsnamecsname@{dir0{~~}}{dir{}}
\xyletcsnamecsname@{dir{~~}}{dir1{~~}}
\xydef@\dashsquiggle@{\squiggle@
 \multiply\D@c\tw@ \multiply\U@c\tw@ \multiply\L@c\tw@ \multiply\R@c\tw@
 \dimen@=\L@c \advance\dimen@\R@c \wdz@=\dimen@ \ht\z@=\U@c \dp\z@=\D@c
 \def\Connect@@{\straight@\dashsquiggledSpread@}}
\xydef@\dashsquiggledSpread@{\ifnum\z@<\count@@ \advance\count@@\@ne \fi
 \advance\X@c.5\A@ \advance\d@X.5\A@ \advance\Y@c.25\B@ \advance\d@Y.5\B@}
\xyletcsnamecsname@{dir1{..}}{dir{.}}
\xyletcsnamecsname@{dir2{..}}{dir2{.}}
\xyletcsnamecsname@{dir3{..}}{dir3{.}}
\xyletcsnamecsname@{dir{..}}{dir1{.}}
\xyletcsnamecsname@{dir{::}}{dir2{.}}
\xylet@\ctipEdge@=\czeroEdge@
\xydefcsname@{dir1{>}}{\tip@}
\xydefcsname@{dir^{>}}{\atip@}
\xydefcsname@{dir_{>}}{\btip@}
\xyletcsnamecsname@{dir0{>}}{dir{}}
\xyletcsnamecsname@{dir{>}}{dir1{>}}
\xydefcsname@{dir1{<}}{\reverseDirection@\tip@}
\xydefcsname@{dir^{<}}{\reverseDirection@\btip@}
\xydefcsname@{dir_{<}}{\reverseDirection@\atip@}
\xyletcsnamecsname@{dir0{<}}{dir{}}
\xyletcsnamecsname@{dir{<}}{dir1{<}}
\xydef@\tip@{\tip@x\tip@@}
\xydef@\atip@{\tip@x\atip@@}
\xydef@\btip@{\tip@x\btip@@}
\xydef@\tip@x#1{#1\egroup
 \ctipEdge@
 \def\Leftness@{.5}\def\Upness@{.5}%
 \def\Drop@@{\styledboxz@}\def\Connect@@{\straight@{\dottedSpread@\jot}}}
\xydef@\tip@@{\atip@@\btip@@}
\xydef@\atip@@{\xyatipfont\DirectionChar}
\xydef@\btip@@{\xybtipfont\DirectionChar}
\xydefcsname@{dir2{>}}{\Tip@}
\xydefcsname@{dir2{<}}{\reverseDirection@\Tip@}
\xydef@\Tip@{\kern2.5pt \vrule height2.5pt depth2.5pt width\z@
 \Tip@@ \kern2.5pt \egroup
 \U@c=2.5pt \D@c=2.5pt \L@c=2.5pt \R@c=2.5pt \Edge@c={\circleEdge}%
 \def\Leftness@{.5}\def\Upness@{.5}%
 \def\Drop@@{\styledboxz@}\def\Connect@@{\straight@{\dottedSpread@\jot}}}
\xydef@\Tip@@{\count@=\DirectionChar
 \advance\count@-4 \ifnum\count@<\z@ \advance\count@128 \fi
 \xyatipfont\char\count@
 \advance\count@ 8 \ifnum127<\count@ \advance\count@-128 \fi
 \xybtipfont\char\count@}
\xydefcsname@{dir3{>}}{\Ttip@}
\xydefcsname@{dir3{<}}{\composite@{}{:(-1,0)\dir3{>}}}
\xydef@\Ttip@{\kern3.2pt \vrule height3.2pt depth3.2pt width\z@
 \Ttip@@ \kern3.2pt \egroup
 \U@c=3.2pt \D@c=3.2pt \L@c=3.2pt \R@c=3.2pt \Edge@c={\circleEdge}%
 \def\Leftness@{.5}\def\Upness@{.5}%
 \def\Drop@@{\styledboxz@}\def\Connect@@{\straight@{\dottedSpread@\jot}}}
\xydef@\Ttip@@{%
 \setboxz@h\bgroup\reverseDirection@\line@ \wdz@=\z@ \ht\z@=\z@ \dp\z@=\z@
 \kern-\L@c \boxz@ \kern\L@c
 {\vDirection@(1,-.31)\xydashl@ \xyatipfont\char\DirectionChar}%
 {\vDirection@(1,+.31)\xydashl@ \xybtipfont\char\DirectionChar}}
\xydefcsname@{dir1{|}}{\stopper@}
\xydefcsname@{dir^{|}}{\aboveDirection@\xydashl@
 \shiftdir@\line@\z@ \pointlike@{}\xydashh@}
\xydefcsname@{dir_{|}}{\belowDirection@\xydashl@
 \shiftdir@\line@\z@ \pointlike@{}\xydashh@}
\xydefcsname@{dir2{|}}{\stopper@ \double@\xydashh@}
\xydefcsname@{dir3{|}}{\stopper@ \double@{2\xydashh@}}
\xyletcsnamecsname@{dir0{|}}{dir{}}
\xyletcsnamecsname@{dir{|}}{dir1{|}}
\xydef@\stopper@{\tip@x\stopper@@}
\xydef@\stopper@@{\setboxz@h{\count@=\SemiDirectionChar \advance\count@64
 \ifnum127<\count@ \advance\count@-128 \fi \xydashfont\char\count@\/}%
 \setboxz@h{\kern-.5\wdz@ \dimen@=\sd@Y\cosDirection\xydashl@ 
 \ifnum\SemiDirectionChar=95 \dimen@=\sd@X\sd@Y\dimen@ \fi
 \raise.5\dimen@\boxz@}%
 \wdz@=\z@ \ht\z@=\z@ \dp\z@=\z@ \boxz@}
\xydefcsname@{dir1{(}}{\hook@}
\xydefcsname@{dir^{(}}{\ahook@}
\xydefcsname@{dir_{(}}{\bhook@}
\xyletcsnamecsname@{dir0{(}}{dir{}}
\xyletcsnamecsname@{dir{(}}{dir1{(}}
\xydefcsname@{dir1{)}}{\reverseDirection@\hook@}
\xydefcsname@{dir^{)}}{\reverseDirection@\bhook@}
\xydefcsname@{dir_{)}}{\reverseDirection@\ahook@}
\xyletcsnamecsname@{dir0{)}}{dir{}}
\xyletcsnamecsname@{dir{)}}{dir1{)}}
\xydef@\hook@{\tip@x\hook@@}
\xydef@\hook@@{\setboxz@h{\xybsqlfont
 \vDirection@(1,-1){.707107\xybsqll@}%
 \hbox{\DirectionChar
 \kern-\d@Y\raise\d@X\hbox{\count@=\DirectionChar \advance\count@-32
 \ifnum\count@<\z@ \advance\count@128 \fi \char\count@}}}%
 \wdz@=\z@ \ht\z@=\z@ \dp\z@=\z@ \boxz@}
\xydef@\ahook@{\tip@x\ahook@@}
\xydef@\ahook@@{\setboxz@h{\xybsqlfont
 \vDirection@(1,-1){.707107\xybsqll@}\kern-\d@X
 \lower\d@Y\hbox{\DirectionChar
 \kern-\d@Y\raise\d@X\hbox{\count@=\DirectionChar \advance\count@-32
 \ifnum\count@<\z@ \advance\count@128 \fi \char\count@}}}%
 \wdz@=\z@ \ht\z@=\z@ \dp\z@=\z@ \boxz@}
\xydef@\bhook@{\tip@x\bhook@@}
\xydef@\bhook@@{\setboxz@h{\xybsqlfont
 \vDirection@(-1,-1){.707107\xybsqll@}\DirectionChar
 \kern\d@X\raise\d@Y\hbox{\count@=\DirectionChar \advance\count@-96
 \ifnum\count@<\z@ \advance\count@128 \fi \char\count@}}%
 \wdz@=\z@ \ht\z@=\z@ \dp\z@=\z@ \boxz@}
\xydefcsname@{dir^{'}}{\reverseDirection@\bturn@}
\xydefcsname@{dir_{'}}{\reverseDirection@\aturn@}
\xydefcsname@{dir^{`}}{\aturn@}
\xydefcsname@{dir_{`}}{\bturn@}
\xydef@\aturn@{\tip@x\aturn@@}
\xydef@\aturn@@{\setboxz@h{\xybsqlfont
 \vDirection@(1,-1){.707107\xybsqll@}\kern-\d@X
 \lower\d@Y\hbox{\DirectionChar}}%
 \wdz@=\z@ \ht\z@=\z@ \dp\z@=\z@ \boxz@}
\xydef@\bturn@{\tip@x\bturn@@}
\xydef@\bturn@@{\setboxz@h{\xybsqlfont
 \vDirection@(-1,-1){.707107\xybsqll@}\DirectionChar}%
 \wdz@=\z@ \ht\z@=\z@ \dp\z@=\z@ \boxz@}
\xydef@\newdir#1#{\newdir@{#1}}
\xydef@\newdir@#1#2#3{\xydefcsname@{dir#1{#2}}{\composite@{}{#3}}}
\xydef@\shiftdir@#1#2{%
 \setbox\z@=\hbox\bgroup#1\relax
 \setboxz@h{\dimen@ii=#2\relax
 \dimen@=-\cosDirection\dimen@ii \advance\dimen@-\L@c
 \kern\dimen@ \lower\sinDirection\dimen@ii\boxz@}%
 \wdz@\z@ \ht\z@=\z@ \dp\z@=\z@ \boxz@}
\xylet@\tipjot@=\jot
\xydefcsname@{dir1{>>}}{\shiftdir@\tip@\tipjot@ \tip@}
\xydefcsname@{dir^{>>}}{\shiftdir@\atip@\tipjot@ \atip@}
\xydefcsname@{dir_{>>}}{\shiftdir@\btip@\tipjot@ \btip@}
\xydefcsname@{dir2{>>}}{\composite@{}{h!/\tipjot@/\dir2{>}*\dir2{>}}}
\xydefcsname@{dir3{>>}}{\composite@{}{h!/\tipjot@/\dir3{>}*\dir3{>}}}
\xyletcsnamecsname@{dir0{>>}}{dir{}}
\xyletcsnamecsname@{dir{>>}}{dir1{>>}}
\xydefcsname@{dir1{<<}}{\reverseDirection@ \shiftdir@\tip@\tipjot@ \tip@}
\xydefcsname@{dir^{<<}}{\reverseDirection@ \shiftdir@\btip@\tipjot@ \btip@}
\xydefcsname@{dir_{<<}}{\reverseDirection@ \shiftdir@\atip@\tipjot@ \atip@}
\xydefcsname@{dir2{<<}}{\composite@{}{h!/-\tipjot@/\dir2{<}*\dir2{<}}}
\xydefcsname@{dir3{<<}}{\composite@{}{h!/-\tipjot@/\dir3{<}*\dir3{<}}}
\xyletcsnamecsname@{dir0{<<}}{dir{}}
\xyletcsnamecsname@{dir{<<}}{dir1{<<}}
\xydefcsname@{dir1{||}}{\shiftdir@\stopper@\xydashh@ \shiftdir@\stopper@\z@
 \pointlike@{}\jot}
\xydefcsname@{dir^{||}}{\shiftdir@{\aboveDirection@\xydashl@\line@}\xydashh@
 \shiftdir@{\aboveDirection@\xydashl@\line@}\z@ \pointlike@{}\jot}
\xydefcsname@{dir_{||}}{\shiftdir@{\belowDirection@\xydashl@\line@}\xydashh@
 \shiftdir@{\belowDirection@\xydashl@\line@}\z@ \pointlike@{}\jot}
\xydefcsname@{dir2{||}}{\shiftdir@\stopper@\xydashh@ \shiftdir@\stopper@\z@
 \pointlike@{}\jot \double@\xydashh@}
\xydefcsname@{dir3{||}}{\shiftdir@\stopper@\xydashh@ \shiftdir@\stopper@\z@
 \pointlike@{}\jot \double@{2\xydashh@}}
\xyletcsnamecsname@{dir0{||}}{dir{}}
\xyletcsnamecsname@{dir{||}}{dir1{||}}
\xydefcsname@{dir1{>|}}{\shiftdir@\stopper@\z@ \tip@}
\xydefcsname@{dir2{>|}}{\composite@{}{\dir2{>}*\dir2{|}}}
\xydefcsname@{dir3{>|}}{\composite@{}{\dir3{>}*\dir3{|}}}
\xyletcsnamecsname@{dir0{>|}}{dir{}}
\xyletcsnamecsname@{dir{>|}}{dir1{>|}}
\xydefcsname@{dir1{>>|}}{\shiftdir@\stopper@\z@ \shiftdir@\tip@\tipjot@ \tip@}
\xydefcsname@{dir2{>>|}}{\composite@{}{h!/\tipjot@/\dir2{>}*\dir2{>}*\dir2{|}}}
\xydefcsname@{dir3{>>|}}{\composite@{}{h!/\tipjot@/\dir3{>}*\dir3{>}*\dir3{|}}}
\xyletcsnamecsname@{dir0{>>|}}{dir{}}
\xyletcsnamecsname@{dir{>>|}}{dir1{>>|}}
\xydefcsname@{dir1{|<}}{\reverseDirection@ \shiftdir@\stopper@\z@ \tip@}
\xydefcsname@{dir2{|<}}{\reverseDirection@ \shiftdir@\stopper@\z@ \Tip@}
\xydefcsname@{dir3{|<}}{\reverseDirection@ \shiftdir@\stopper@\z@ \Ttip@}
\xyletcsnamecsname@{dir0{|<}}{dir{}}
\xyletcsnamecsname@{dir{|<}}{dir1{|<}}
\xydefcsname@{dir1{|<<}}{\reverseDirection@
 \shiftdir@\stopper@\z@ \shiftdir@\tip@\tipjot@ \tip@}
\xydefcsname@{dir2{|<<}}{%
 \composite@{}{h!/-\tipjot@/\dir2{<}*\dir2{<}*\dir2{|}}}
\xydefcsname@{dir3{|<<}}{%
 \composite@{}{h!/-\tipjot@/\dir3{<}*\dir3{<}*\dir3{|}}}
\xyletcsnamecsname@{dir0{|<<}}{dir{}}
\xyletcsnamecsname@{dir{|<<}}{dir1{|<<}}
\xydefcsname@{dir1{|-}}{\shiftdir@\stopper@\z@
 \shiftdir@\line@\z@ \pointlike@{}\jot}
\xydefcsname@{dir^{|-}}{\shiftdir@{\aboveDirection@\xydashl@ \line@}\z@
 \shiftdir@\line@\z@ \pointlike@{}\jot}
\xydefcsname@{dir_{|-}}{\shiftdir@{\belowDirection@\xydashl@ \line@}\z@
 \shiftdir@\line@\z@ \pointlike@{}\jot}
\xydefcsname@{dir2{|-}}{\shiftdir@\stopper@\z@
 \shiftdir@\line@\z@ \pointlike@{}\jot \double@\xydashh@}
\xydefcsname@{dir3{|-}}{\shiftdir@\stopper@\z@
 \shiftdir@\line@\z@ \pointlike@{}\jot \triple@\xydashh@}
\xyletcsnamecsname@{dir0{|-}}{dir{}}
\xyletcsnamecsname@{dir{|-}}{dir1{|-}}
\xyletcsnamecsname@{dir{|=}}{dir2{|-}}
\xydefcsname@{dir{+}}{%
 \DN@##1{\composite@{}{##10\dir{|}*!C##10\dir{-}}}\addEQ@\next@}
\xyletcsnamecsname@{dir0{+}}{dir{}}
\xydefcsname@{dir{x}}{\vDirection@(1,1)\jot
 \DN@##1{\composite@{}{##10\dir{|}*!C##10\dir{-}}}\addEQ@\next@}
\xyletcsnamecsname@{dir0{x}}{dir{}}
\xydefcsname@{dir{/}}{\vDirection@(1,-.3)\jot \stopper@}
\xyletcsnamecsname@{dir0{/}}{dir{}}
\xydefcsname@{dir{//}}{\vDirection@(1,-.3)\jot
 \shiftdir@\stopper@\xydashh@ \stopper@}
\xyletcsnamecsname@{dir0{//}}{dir{}}
\xydefcsname@{dir{*}}{\solidpoint@}
\xydef@\solidpoint@{%
 \pointlike@{\kern-1.8pt\lower1.8pt\hbox{$\scriptstyle\bullet$}}\jot}
\xyletcsnamecsname@{dir0{*}}{dir{}}
\xydefcsname@{dir{o}}{\hollowpoint@}
\xydef@\hollowpoint@{%
 \pointlike@{\kern-1.8pt\lower1.8pt\hbox{$\scriptstyle\circ$}}\jot}
\xyletcsnamecsname@{dir0{o}}{dir{}}
\message{circles,}
\xydef@\cir#1#{\hbox\bgroup
 \afterVECTORorEMPTY{\xy@@{\R@=\X@c}\cir@}{\xy@@{\R@=\R@c}\cir@}#1@}
\xydef@\cir@#1@#2{%
 \DN@{#1}\ifx\next@\empty\else \xyerror@{illegal circle <radius>: must be
 <vector> or <empty>}{}\fi
 \afterCIRorDIAG{\xyFN@\cir@cir}{\xyFN@\cir@diag}#2@}
\xydef@\cir@cir{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\cir@cir}%
 \else \ifx @\next \DN@ @{\cir@i}%
 \else \xyerror@{illegal <cir>: must have form <diag><orient><diag> or
 <empty>}{}%
 \fi\fi \next@}
\xydef@\cir@diag{%
 \DN@{\xyerror@{illegal <cir>: must have form <diag><orient><diag> or
 <empty>}{}}%
 \ifx @\next \ifnum\count@=8
 \DN@ @{\def\CIRin@@{0}\def\CIRorient@@{\CIRfull@}\def\CIRout@@{7}\cir@i}%
 \fi\fi \next@}
\xydef@\cir@i{%
 \ifnum\CIRin@@=8 \xyerror@{incomplete <cir> specification}{%
The <cir> you specified as <diag><orient><diag> is not sufficiently specific.}%
 \def\CIRin@@{0}\fi
 \ifdim\R@<.5\p@ \R@=\z@ \zerodot
 \else \CIRorient@@ \cirbuild@ \fi
 \L@c=\R@ \R@c=\R@ \D@c=\R@ \U@c=\R@ \def\Leftness@{.5}\def\Upness@{.5}%
 \def\Drop@@{\styledboxz@}\def\Connect@@{\straight@\relax}%
 \Edge@c={\circleEdge}\OBJECT@x}
\xydef@\CIRin@@{3}
\xydef@\CIRout@@{3}
\xylet@\CIRorient@@=\empty
\xydef@\afterCIRorDIAG#1#2{\def\afterCIR@{#1}\def\afterCIRDIAG@{#2}\xyFN@\CIR@}
\xylet@\afterCIR@=\empty
\xylet@\afterCIRDIAG@=\empty
\xydef@\CIR@{\count@=8 \afterDIAG{\edef\CIRin@@{\the\count@}\xyFN@\CIR@@}}
\xydef@\CIR@@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\CIR@@}%
 \else\ifx ^\next
 \DN@ ^{\def\CIRorient@@{\CIRacw@}%
 \afterDIAG{\edef\CIRout@@{\the\count@}\afterCIR@}}%
 \else\ifx _\next
 \DN@_{\def\CIRorient@@{\CIRcw@}%
 \afterDIAG{\edef\CIRout@@{\the\count@}\afterCIR@}}%
 \else
 \DN@{\def\CIRorient@@{\relax}\afterCIRDIAG@}%
 \fi\fi\fi \next@}
\xylet@\CIRtest@@=\relax
\xydef@\CIRlo@@{0}
\xydef@\CIRhi@@{0}
\xydef@\CIRfull@{\def\CIRtest@@##1##2{##2}}
\xydef@\cirbuild@{\cirrestrict@@ \multiply\count@8
 \circhar@0\circhar@7\kern\dimen@
 \circhar@1\circhar@6\kern\dimen@
 \circhar@2\circhar@5\kern\dimen@
 \circhar@3\circhar@4\kern\dimen@}
\xydef@\circhar@#1{%
 \setboxz@h{\circhar@@{#1}}\dimen@=\wdz@ \wdz@=\z@ \ht\z@=\R@ \dp\z@=\R@
 \CIRtest@@#1{\styledboxz@}\setbox\z@=\copy\voidb@x}
\xydef@\circhar@@#1{{\xycircfont \advance\count@#1\relax \char\count@}}
\xydef@\cirrestrict@@{\begingroup \dimen@=\R@
 \setboxz@h{\xycircfont\char\z@\char\@ne}\A@=\wdz@
 \ifdim\R@<8\A@ \count@=\dimen@ \divide\count@\A@ \advance\count@\m@ne
 \else\ifdim\R@<16\A@ \count@=\dimen@
 \dimen@=2\A@ \divide\count@\dimen@ \advance\count@3
 \else\ifdim\R@<32\A@ \count@=\dimen@
 \dimen@=4\A@ \divide\count@\dimen@ \advance\count@7
 \else \count@=15 \fi\fi\fi
 \R@=\A@
 \ifnum\count@<8 \multiply\R@\count@ \advance\R@\A@
 \else\ifnum\count@<12 \multiply\R@\count@ \multiply\R@\tw@ \advance\R@-6\A@
 \else\ifnum\count@<16 \multiply\R@\count@ \multiply\R@ 4 \advance\R@-28\A@
 \else \multiply\R@ 32 \fi\fi\fi
 \edef\@tmp{\endgroup \R@=\the\R@ \count@=\the\count@}\@tmp}
\xydef@\CIRacw@{\count@@=\CIRin@@ \count@=\CIRout@@
 \ifnum\count@=8 \count@=\count@@
 \ifnum\count@<6 \advance\count@\tw@ \else \advance\count@-6 \fi \fi
 \ifnum\count@@<\@ne \advance\count@@7 \else \advance\count@@\m@ne \fi
 \ifnum\count@<\@ne \advance\count@7 \else \advance\count@\m@ne \fi
 \ifnum\count@@>\count@ \let\CIRtest@@=\CIRtest@outside
 \edef\CIRlo@@{\the\count@}\edef\CIRhi@@{\the\count@@}%
 \else \let\CIRtest@@=\CIRtest@inside
 \edef\CIRlo@@{\the\count@@}\edef\CIRhi@@{\the\count@}%
 \fi}
\xydef@\CIRcw@{\count@@=\CIRin@@ \count@=\CIRout@@
 \ifnum\count@=8 \count@=\count@@
 \ifnum\count@>\@ne \advance\count@-\tw@ \else \advance\count@6 \fi \fi
 \ifnum\count@@<5 \advance\count@@\thr@@ \else \advance\count@@-5 \fi
 \ifnum\count@<5 \advance\count@\thr@@ \else \advance\count@-5 \fi
 \ifnum\count@@<\count@ \let\CIRtest@@=\CIRtest@outside
 \edef\CIRlo@@{\the\count@@}\edef\CIRhi@@{\the\count@}%
 \else \let\CIRtest@@=\CIRtest@inside
 \edef\CIRlo@@{\the\count@}\edef\CIRhi@@{\the\count@@}%
 \fi}
\xydef@\CIRtest@inside#1#2{\let\next@=\relax
 \ifnum\CIRlo@@>#1\else \ifnum#1<\CIRhi@@\DN@{#2}\fi\fi \next@}
\xydef@\CIRtest@outside#1#2{\let\next@=\relax
 \ifnum\CIRlo@@>#1\DN@{#2}\else \ifnum#1<\CIRhi@@\else\DN@{#2}\fi\fi \next@}
\message{text;}
\xydef@\txt{\hbox\bgroup \xyFN@\txt@}
\xydef@\txt@{%
 \addLT@\ifx\next \addGT@{\addLT@\DN@##1}{\A@=##1\txt@i}%
 \else \DN@{\A@=\maxdimen \txt@i}\fi \next@}
\xydef@\txt@i#1#{%
 \setboxz@h{#1\mathstrut}\dimen@=\ht\z@ \advance\dimen@\dp\z@
 \baselineskip=1.1\dimen@ \lineskip=.2\dimen@ \lineskiplimit=\lineskip
 \def\txtline@@##1{\txtline@{#1}{##1}}\object@\txt@ii}
\xylet@\txtline@@=\eat@
\xydef@\txtline@#1#2{\relax\setboxz@h{#1{\ignorespaces #2\unskip}}%
 \ifdim\A@<\wdz@ \setboxz@h{\hsize=\A@
 \leftskip=0pt plus4em \rightskip=\leftskip
 \parfillskip=0pt \parindent=0pt
 \spaceskip=.3333em \xspaceskip=.5em
 \pretolerance=9999 \tolerance=9999
 \hyphenpenalty=9999 \exhyphenpenalty=9999
 \vbox{#1\noindent\ignorespaces #2\unskip}}%
 \else\ifdim\A@<\maxdimen\setboxz@h to\A@{\hfil\boxz@\hfil}\fi\fi
 \boxz@}
\xydef@\txt@ii#1{\vbox{%
 \let\\=\cr
 \tabskip=\z@skip \halign{\relax\hfil\txtline@@{##}\hfil\cr\leavevmode#1\crcr}}}
\message{options;}
\xylet@\xyoption@@=\relax
\xydef@\xyoption#1{\DN@{#1}\edef\next@{\codeof\next@}%
 \csname xyeveryrequest@\next@ @\endcsname
 \xyinputorelse@{xy#1}{\xyoption@truncated#1@@@@@@@@@,#1@}%
 \def\xyoption@@{#1}\edef\xyoption@@{\codeof\xyoption@@}
 \expandafter\let\expandafter\next@\csname xy\xyoption@@ version\endcsname
 \expandafter\let\csname xy\xyoption@@ loaded\endcsname=\next@
 \runxywith@ \ignorespaces}
\xydef@\xyoption@truncated#1#2#3#4#5#6#7@#8,#9@{%
 \DN@{#7}\ifx\next@\empty \DN@##1##2{##2}\else\let\next@=\xyinputorelse@ \fi
 \next@{xy#1#2#3#4#5#6}%
 {\DN@{#1#2#3#4#5#6}\edef\next@{\codeof\next@}%
 \xyerror@{No `\next@' option}{%
Your \xyoption{#9} request could not be granted: the required^^J%
file `xy#9.tex' could not be located. Please make sure that it is^^J%
properly installed before continuing.}}}
\xydef@\xyrequire#1{\DN@{#1}\edef\next@{\codeof\next@}%
 \csname xyeveryrequest@\next@ @\endcsname
 \expandafter\let\expandafter\next@\csname xy\codeof\next@ loaded\endcsname
 \ifx \next@\relax \DN@{\xyoption{#1}}\else \DN@{\ignorespaces}\fi \next@}
\xylet@\xywith@@=\empty
\xydef@\runxywith@{\let\xywithdo@@=\xywithtest@ \xywith@@}
\xydef@\xywithoption#1#2{\DN@{#1}\edef\next@{\codeof\next@}%
 \expandafter\let\expandafter\nextii@\csname xy\next@ loaded\endcsname
 \ifx \nextii@\relax
 \expandafter\def\expandafter\xywith@@\expandafter{\xywith@@ 
 \xywithdo@@{#1}{#2}}%
 \else \expandafter\xywithrun@\expandafter{\next@}{#2}\fi}
\xydef@\xywithtest@#1#2{\DN@{#1}\edef\next@{\codeof\next@}%
 \ifx\next@\xyoption@@ \expandafter\xywithrun@\expandafter{\next@}{#2}\fi}
\xydef@\xywithrun@#1#2{\csname xyeverywithoption@#1@\endcsname #2}
\xydef@\xyevery@#1#2#3{\DN@{#2}\edef\next@{\codeof\next@}%
 \expandafter\ifx\csname xyevery#1@\next@ @\endcsname\relax
 \expandafter\let\csname xyevery#1@\next@ @\endcsname=\empty \fi
 \DNii@##1{\expandafter\def\expandafter##1\expandafter{##1#3}}%
 \expandafter\nextii@\csname xyevery#1@\next@ @\endcsname}
\xydef@\xyeveryrequest{\xyevery@{request}}
\xydef@\xyeverywithoption{\xyevery@{withoption}}
\xydef@\xyprovide#1#2#3#4#5#6{%
 \def\xyoption@@{#1}\edef\xyoption@@{\codeof\xyoption@@}\edef\next@{#3}%
 \message{ Xy-pic option: #2 v.\next@}%
 \expandafter\let\expandafter\nextii@\csname xy\xyoption@@ loaded\endcsname
 \ifx \next@\nextii@ \message{not reloaded}\endinput
 \else
 \ifx \nextii@\relax\else \xyerror@{Option `\xyoption@@' version mismatch}{%
You previously loaded, or the format has preloaded, a different version^^J%
of this option. Just continue to try to load this version instead (and^^J%
be prepared for a lot of warnings about redefinitions).}%
 \fi
 \expandafter\let\csname xy\xyoption@@ version\endcsname=\next@
 \expandafter\let\expandafter\xyenddocmode@\csname DOCMODE\endcsname
 \expandafter\let\csname DOCMODE\endcsname\xyprovidedocmode@
 \xycatcodes
 \fi \ignorespaces}
\xydef@\xyendinput{\expandafter\let\csname DOCMODE\endcsname=\xyenddocmode@
 \message{loaded}\xyuncatcodes\endinput}
\expandafter\xylet@\expandafter\xyprovidedocmode@\csname DOCMODE\endcsname
\xylet@\xyenddocmode@=\relax
\xydef@\xydriversloaded@@{\do{unload}}
\xylet@\xydriversselected@@=\empty
\xylet@\xydriver@unload@support@@=\empty
\xydef@\selectdriver@#1{\DN@{#1}\edef\next@{\codeof\next@}%
 \expandafter\selectdriver@@\expandafter{\next@}}
\xydef@\selectdriver@single#1{\xysetup@@{\def\xydriversselected@@{\do{#1}}%
 \xyLoadDrivers@}\let\selectdriver@@=\changedriver@single}
\xydef@\changedriver@single#1{\xysetup@@{\def\xydriversselected@@{\do{#1}}%
 \xyReloadDrivers@}}
\xydef@\selectdriver@multiple#1{\expandafter\xysetup@@\expandafter{%
 \expandafter\def\expandafter\xydriversselected@@\expandafter{%
 \xydriversselected@@ \do{#1}}%
 \let\do=\activatedriver@ \xydriversselected@@}}
\xydef@\UseSingleDriver{\let\selectdriver@@=\selectdriver@single}
\xydef@\MultipleDrivers{\let\selectdriver@@=\selectdriver@multiple}
\xydef@\xyLoadDrivers@{\let\do=\activatedriver@ \xydriversselected@@}
\xydef@\xyReloadDrivers@{\activatedriver@{unload}\xyLoadDrivers@}
\xylet@\xyReloadDrivers=\xyReloadDrivers@
\xydef@\activatedriver@#1{%
 \let\doii=\activatedriversupport@ \csname xydriver@#1@support@@\endcsname}
\xydef@\activatedriversupport@#1#2{%
 \expandafter\ifx\csname xy#1loaded\endcsname\relax\DN@{}%
 \else\DN@{#2}\fi \next@}
\UseSingleDriver
\xydef@\xyselectoptionsupport@{\let\do=\activatedriver@ \xydriversselected@@}
\xydef@\xyShowDrivers{{\W@{Loaded:}\let\do=\doShow \xydriversloaded@@
 \let\next@=\empty
 \def\do##1{\ifx\next@\empty \DN@{##1}%
 \else \expandafter\DN@\expandafter{\next@, ##1}\fi}%
 \xydriversselected@@\W@{Selected: \next@.}}}
\def\doShow#1{\let\next@=\empty
 \def\doii##1##2{\ifx\next@\empty \DN@{##1}%
 \else \expandafter\DN@\expandafter{\next@, ##1}\fi}%
 \csname xydriver@#1@support@@\endcsname
 \W@{ <driver> #1 supports \next@.}}
\xydef@\newdriver#1{%
 \def\nextiii@##1{%
 \expandafter\def\expandafter\xydriversloaded@@
 \expandafter{\xydriversloaded@@\do{##1}}%
 \expandafter\let\csname xydriver@\xyoption@@ @support@@\endcsname=\empty}%
 \def\do##1{\DNii@{##1}\ifx\xyoption@@\nextii@ \let\nextiii@=\eat@ \fi}%
 \xydriversloaded@@ \expandafter\nextiii@\expandafter{\xyoption@@}%
 #1\relax
 \DN@##1{\xywithoption{##1}{%
 \selectdriver@{##1}\xyeveryrequest{##1}{\selectdriver@{##1}}}}%
 \expandafter\next@\expandafter{\xyoption@@}\ignorespaces}
\xydef@\xyaddsupport{\expandafter\xyadddriversupport@\expandafter{\xyoption@@}}
\xydef@\xyaddunsupport{\xyadddriversupport@{unload}}
\xydef@\xyadddriversupport@#1#2#3{%
 \DNii@{#1}\edef\nextii@{\codeof\nextii@}%
 \def\nextiii@{#2}\edef\nextiii@{\codeof\nextiii@}%
\def\next{\xybug@{<driver> \nextii@\space not loaded}}%
\def\do##1{\DN@{##1}\edef\next@{\codeof\next@}%
 \ifx\next@\nextii@ \let\next=\relax \fi}\xydriversloaded@@ \next
\def\next{\xybug@{<driver> \nextii@\space already supports \nextiii@}}%
\def\doii##1##2{\DN@{##1}\edef\next@{\codeof\next@}%
 \ifx\next@\nextiii@ \let\next=\relax \fi}\xydriversloaded@@ \next
 \DN@##1##2{\ifx##1\relax \let##1=\empty \fi
 \expandafter\def\expandafter##1\expandafter{##1\doii{##2}{#3}}}%
 \expandafter\expandafter\expandafter\next@
 \expandafter\expandafter\csname xydriver@\nextii@ @support@@\endcsname
 \expandafter{\nextiii@}%
 \DN@##1{\expandafter\xyeverywithoption\expandafter{\nextiii@}{%
 \xytestforsupport@{##1}}}%
 \expandafter\next@\expandafter{\nextii@}\xydriversloaded@@
 \ignorespaces}
\xydef@\xytestforsupport@#1{\def\do##1{\DN@{##1}\DNii@{#1}%
 \ifx\next@\nextii@ \expandafter\xyselectoptionsupport@ \fi}}
\xynew@{if}\ifunsupportwarnings@
\xydef@\xyunsupportwarning@#1#2{{%
 \DN@{#1}\edef\next@{\codeof\next@}
 \expandafter\ifx\csname xywarn@unload@\next@ @\endcsname\relax
 \expandafter\gdef\csname xywarn@unload@\next@ @\endcsname{}%
 \ifunsupportwarnings@ \xyclosedown@@\xyunsupportwarnings@@ \fi
 \global\unsupportwarnings@true
 \expandafter\gdef\expandafter\xyunsupportwarnings@@\expandafter{%
 \xyunsupportwarnings@@ \W@{ #2.}}%
 \W@{}%
 \W@{Xy-pic Warning: `\next@' reproduction is NOT EXACT\xytracelineno@:}%
 \W@{ #2.}%
 \W@{}%
 \fi}}
\xydef@\xyunsupportwarnings@@{\W@{}%
 \W@{Xy-pic Warning: The produced DVI file is NOT EXACT:}}
\xynew@{if}\ifsupportwarnings@
\xydef@\xysupportwarning@#1#2{{%
 \DN@{#1}\edef\next@{\codeof\next@}\DNii@{#2}\edef\nextii@{\codeof\nextii@}%
 \expandafter\ifx\csname xywarn@\next@ @\nextii@ @\endcsname\relax
 \expandafter\gdef\csname xywarn@\next@ @\nextii@ @\endcsname{}%
 \ifsupportwarnings@ \xyclosedown@@\xysupportwarnings@@ \fi
 \global\supportwarnings@true
 \expandafter\gdef\expandafter\xysupportwarnings@@\expandafter{%
 \xysupportwarnings@@ \driverextensioncomplain@{#1}{#2}}%
 \W@{}%
 \W@{Xy-pic Warning: The produced DVI file is NOT PORTABLE\xytracelineno@:}%
 \driverextensioncomplain@{#1}{#2}%
 \W@{}%
 \fi}}
\xydef@\xysupportwarnings@@{%
 \W@{Xy-pic Warning: The produced DVI file is NOT PORTABLE:}}
\xydef@\driverextensioncomplain@#1#2{%
 \DN@{#1}\edef\next@{\codeof\next@}\DNii@{#2}\edef\nextii@{\codeof\nextii@}%
 \W@{ It contains <driver> `\next@' \string\special s for the `\nextii@'
 extension.}}
\xydef@\dvimessage@#1#2{\xysupportwarning@{#1}{#2}}
\xynew@{if}\ifxydrivernoloads@
\xydef@\xydrivernoload@#1{\xyerror@{Could not load xy#1.tex}{}%
 \xydrivernoloads@true}
\xydef@\xydriverfail@#1{\xyerror@{Sorry, #1 not supported.}{}}
\xydef@\xyunload@#1{\xywarning@{Unloading #1.}}
\message{algorithms: directions,}
\xydef@\DirectionfromtheDirection@{\noexpand\Direction=\the\Direction
 \noexpand\d@X=\the\d@X \noexpand\d@Y=\the\d@Y
 \def\noexpand\sd@X{\sd@X}\def\noexpand\sd@Y{\sd@Y}%
 \noexpand\K@dXdY=\the\K@dXdY \noexpand\K@dYdX=\the\K@dYdX
 \chardef\noexpand\DirectionChar=\the\DirectionChar
 \chardef\noexpand\SemiDirectionChar=\the\SemiDirectionChar
 \def\noexpand\cosDirection{\cosDirection}%
 \def\noexpand\sinDirection{\sinDirection}%
 \noexpand\resetupDirection@}
\xydef@\Directiontest@@#1#2{#2}
\xydef@\setupDirection@{%
 \d@X=\X@c\advance\d@X-\X@p \d@Y=\Y@c\advance\d@Y-\Y@p
 \Directiontest@@\relax\setupDirection@i}
\xydef@\setupDirection@i{\DN@{\setupDirection@ii}%
 \ifdim\d@X=\d@Y
 \ifdim\zz@\d@Y \DN@{}%
 \else\ifdim\d@X<\z@ \DN@{\dlDirection@{-1.4142\d@X}}%
 \else \DN@{\urDirection@{1.4142\d@X}}\fi\fi
 \else\ifdim\d@X<\d@Y
 \ifdim\zz@\d@X \DN@{\uDirection@\d@Y}%
 \else\ifdim\zz@\d@Y \DN@{\lDirection@{-\d@X}}%
 \else\ifdim-\d@X=\d@Y \DN@{\ulDirection@{-1.4142\d@X}}\fi\fi\fi
 \else
 \ifdim\zz@\d@X \DN@{\dDirection@{-\d@Y}}%
 \else\ifdim\zz@\d@Y \DN@{\rDirection@\d@X}%
 \else\ifdim\d@X=-\d@Y \DN@{\drDirection@{1.4142\d@X}}\fi\fi\fi
 \fi\fi \next@}
\xydef@\dlDirection@{\Direction=\z@
 \def\cosDirection{-.7071}\def\sinDirection{-.7071}\def\sd@X{-}\def\sd@Y{-}%
 \chardef\DirectionChar=127\relax\chardef\SemiDirectionChar=127\relax
 \K@dXdY=1\K@ \K@dYdX=1\K@ \fixedDirection@}
\xydef@\dDirection@{\Direction=\K@
 \def\cosDirection{0}\def\sinDirection{-1}\def\sd@Y{-}%
 \edef\sd@X{\ifdim\X@c<\X@p-\else+\fi}%
 \chardef\DirectionChar=15\relax\chardef\SemiDirectionChar=31\relax
 \K@dXdY=\z@ \K@dYdX=\KK@\K@ \fixedDirection@}
\xydef@\drDirection@{\dimen@ii=2\K@ \Direction=\dimen@ii
 \def\cosDirection{+.7071}\def\sinDirection{-.7071}\def\sd@X{+}\def\sd@Y{-}%
 \chardef\DirectionChar=31\relax\chardef\SemiDirectionChar=63\relax
 \K@dXdY=-1\K@ \K@dYdX=-1\K@ \fixedDirection@}
\xydef@\rDirection@{\dimen@ii=3\K@ \Direction=\dimen@ii
 \def\cosDirection{+1}\def\sinDirection{0}\def\sd@X{+}%
 \edef\sd@Y{\ifdim\Y@c<\Y@p-\else+\fi}%
 \chardef\DirectionChar=47\relax\chardef\SemiDirectionChar=95\relax
 \K@dXdY=\KK@\K@ \K@dYdX=\z@ \fixedDirection@}
\xydef@\urDirection@{\dimen@ii=4\K@ \Direction=\dimen@ii
 \def\cosDirection{+.7071}\def\sinDirection{+.7071}\def\sd@X{+}\def\sd@Y{+}%
 \chardef\DirectionChar=63\relax\chardef\SemiDirectionChar=127\relax
 \K@dXdY=1\K@ \K@dYdX=1\K@ \fixedDirection@}
\xydef@\uDirection@{\dimen@ii=-3\K@ \Direction=\dimen@ii
 \def\cosDirection{0}\def\sinDirection{+1}\def\sd@Y{+}%
 \edef\sd@X{\ifdim\X@c<\X@p-\else+\fi}%
 \chardef\DirectionChar=79\relax\chardef\SemiDirectionChar=31\relax
 \K@dXdY=\z@ \K@dYdX=\KK@\K@ \fixedDirection@}
\xydef@\ulDirection@{\dimen@ii=-2\K@ \Direction=\dimen@ii
 \def\cosDirection{-.7071}\def\sinDirection{+.7071}\def\sd@X{-}\def\sd@Y{+}%
 \chardef\DirectionChar=95\relax\chardef\SemiDirectionChar=63\relax
 \K@dXdY=-1\K@ \K@dYdX=-1\K@ \fixedDirection@}
\xydef@\lDirection@{\Direction=-\K@
 \def\cosDirection{-1}\def\sinDirection{0}\def\sd@X{-}%
 \edef\sd@Y{\ifdim\Y@c<\Y@p-\else+\fi}%
 \chardef\DirectionChar=111\relax\chardef\SemiDirectionChar=95\relax
 \K@dXdY=\KK@\K@ \K@dYdX=\z@ \fixedDirection@}
\xydef@\fixedDirection@#1{\dimen@ii=#1\relax
 \d@X=\cosDirection\dimen@ii \d@Y=\sinDirection\dimen@ii
 \resetupDirection@}
\xydef@\setupDirection@ii{%
 \ifdim\d@X<\z@ \def\sd@X{-}\else \def\sd@X{+}\fi
 \ifdim\d@Y<\z@ \def\sd@Y{-}\else \def\sd@Y{+}\fi
 \K@dXdY=\sd@X\d@X \ifdim\K@dXdY<500pt \multiply\K@dXdY\KK@ \fi
 \dimen@=\sd@Y\d@Y
 \advance\dimen@\ifdim\dimen@<\z@-\fi.5\KK@ \divide\dimen@\KK@
 \ifdim\dimen@=\z@\else
 \advance\K@dXdY by.5\dimen@\relax \divide\K@dXdY\dimen@
 \fi \K@dXdY=\sd@X\sd@Y\K@dXdY
 \K@dYdX=\sd@Y\d@Y \ifdim\K@dYdX<500pt \multiply\K@dYdX\KK@ \fi
 \dimen@=\sd@X\d@X
 \advance\dimen@\ifdim\dimen@<\z@-\fi.5\KK@ \divide\dimen@\KK@
 \ifdim\dimen@=\z@\else
 \advance\K@dYdX by.5\dimen@\relax \divide\K@dYdX\dimen@
 \fi \K@dYdX=\sd@X\sd@Y\K@dYdX
 \Direction=\maxdimen
 \ifnum\K@dXdY<-\K@ \else \ifnum\K@<\K@dXdY \else
 \ifdim \d@Y<\z@
 \Direction=\K@ \advance\Direction-\K@dXdY
 \else
 \Direction=\K@ \multiply\Direction-\thr@@ \advance\Direction-\K@dXdY
 \fi\fi\fi
 \ifnum-\K@<\K@dYdX \ifnum\K@dYdX<\K@
 \ifdim \d@X<\z@
 \Direction=-\K@ \advance\Direction\K@dYdX
 \else
 \Direction=\K@ \multiply\Direction\thr@@ \advance\Direction\K@dYdX
 \fi\fi\fi
 \ifnum\Direction=\maxdimen
 \Direction=\K@dYdX \advance\Direction-\K@dXdY 
 \advance\Direction\ifnum\Direction<\z@-\fi\@ne \divide\Direction\tw@ 
 \ifnum\K@dXdY<\z@ \advance\Direction\K@ \advance\Direction\K@
 \else \advance\Direction-\K@ \advance\Direction-\K@ \fi
 \fi
 \imposeDirection@i
 \resetupDirection@
 }
\xydef@\imposeDirection@{\count@@=\Direction 
 \loop@\ifnum\count@@>4096 \advance\count@@-8192 \repeat@
 \loop@\ifnum\count@@<-4096 \advance\count@@8192 \repeat@
 \def\sd@X{+}\ifnum\count@@<\K@ \relax
 \ifnum\count@@>-3072 \def\sd@X{-}\fi\fi
 \def\sd@Y{+}\ifnum\count@@<3072 \relax
 \ifnum\count@@>-\K@ \relax\def\sd@Y{-}\fi\fi
 \imposeDirection@i
 \d@X=\cosDirection\xydashl@ \d@Y=\sinDirection\xydashl@
 \resetupDirection@}
\xydef@\imposeDirection@i{%
 \count@@=\K@ \multiply\count@@ by8 \advance\count@@\Direction
 \count@=\count@@ \advance\count@\KK@ \divide\count@64 \advance\count@\m@ne
 \loop@\ifnum127<\count@ \advance\count@-128 \repeat@
 \chardef\DirectionChar\count@
 \advance\count@@16 \divide\count@@\KK@ \advance\count@@\m@ne
 \loop@\ifnum127<\count@@ \advance\count@@-128 \repeat@
 \chardef\SemiDirectionChar\count@@
 \setbox8=\hbox{\xydashfont\SemiDirectionChar\/}%
 \quotient@@\cosDirection{\sd@X\wd8}\xydashl@
 \setbox8=\hbox{\xydashfont\count@=\SemiDirectionChar\advance\count@-64
 \ifnum\count@<\z@ \advance\count@128 \fi \char\count@\/}%
 \quotient@@\sinDirection{\sd@Y\wd8}\xydashl@}
\xydef@\getxyDirection@#1{\xy@@\bgroup\xy@@ix@{#1}%
 \xy@@{\expandafter\POS\the\toks9\relax\setupDirection@
 \edef\next@{\egroup \Direction=\the\Direction}\next@ \imposeDirection@ }}
\xydef@\reverseDirection@{%
 \d@X=-\d@X \d@Y=-\d@Y
 \ifdim\d@X<\z@ \def\sd@X{-}\else \def\sd@X{+}\fi
 \ifdim\d@Y<\z@ \def\sd@Y{-}\else \def\sd@Y{+}\fi
 \dimen@=4\K@ \ifnum\Direction<\z@ \advance\Direction\dimen@
 \else \advance\Direction-\dimen@ \fi
 \count@=\DirectionChar \ifnum\count@<64 \advance\count@64
 \else \advance\count@-64 \fi \chardef\DirectionChar=\count@
 \edef\cosDirection{\if-\cosDirection\else-\cosDirection\fi}%
 \edef\sinDirection{\if-\sinDirection\else-\sinDirection\fi}%
 \resetupDirection@}
\xydef@\aboveDirection@#1{%
 \dimen@=\d@X \d@X=-\d@Y \d@Y=\dimen@
 \dimen@=\K@dXdY \K@dXdY=-\K@dYdX \K@dYdX=-\dimen@
 \ifdim\d@X<\z@ \def\sd@X{-}\else \def\sd@X{+}\fi
 \ifdim\d@Y<\z@ \def\sd@Y{-}\else \def\sd@Y{+}\fi
 \dimen@=2\K@ \ifdim 1\Direction<\dimen@\else \dimen@=-6\K@ \fi
 \advance\Direction\dimen@
 \count@=\DirectionChar \ifnum\count@<96 \advance\count@32
 \else \advance\count@-96 \fi \chardef\DirectionChar=\count@
 \count@=\SemiDirectionChar \ifnum\count@<64 \advance\count@64
 \else \advance\count@-64 \fi \chardef\SemiDirectionChar=\count@
 \let\tmp@=\cosDirection
 \edef\cosDirection{\if-\sinDirection\else-\sinDirection\fi}%
 \let\sinDirection=\tmp@
 \dimen@=#1\relax \d@X=\cosDirection\dimen@ \d@Y=\sinDirection\dimen@
 \resetupDirection@}
\xydef@\belowDirection@#1{%
 \dimen@=\d@X \d@X=\d@Y \d@Y=-\dimen@
 \dimen@=\K@dXdY \K@dXdY=-\K@dYdX \K@dYdX=-\dimen@
 \ifdim\d@X<\z@ \def\sd@X{-}\else \def\sd@X{+}\fi
 \ifdim\d@Y<\z@ \def\sd@Y{-}\else \def\sd@Y{+}\fi
 \dimen@=-2\K@\ifdim 1\Direction<\dimen@\dimen@=6\K@\fi
 \advance\Direction\dimen@
 \count@=\DirectionChar \ifnum\count@<32 \advance\count@96
 \else \advance\count@-32 \fi \chardef\DirectionChar=\count@
 \count@=\SemiDirectionChar \ifnum\count@<64 \advance\count@64
 \else \advance\count@-64 \fi \chardef\SemiDirectionChar=\count@
 \let\tmp@=\sinDirection
 \edef\sinDirection{\if-\cosDirection\else-\cosDirection\fi}%
 \let\cosDirection=\tmp@
 \dimen@=#1\relax \d@X=\cosDirection\dimen@ \d@Y=\sinDirection\dimen@
 \resetupDirection@}
\xydef@\vDirection@(#1,#2)#3{\dimen@ii=#3\relax
 \dimen@=#1\dimen@ii \dimen@ii=#2\dimen@ii
 \d@X=\cosDirection\dimen@ \advance\d@X-\sinDirection\dimen@ii
 \d@Y=\sinDirection\dimen@ \advance\d@Y \cosDirection\dimen@ii
 \X@p=\X@c \advance\X@p-\d@X \Y@p=\Y@c \advance\Y@p-\d@Y
 \setupDirection@\ignorespaces}
\xydef@\resetDirection@{%
 \d@X=\X@c\advance\d@X-\X@p \d@Y=\Y@c\advance\d@Y-\Y@p
 \let\next@=\resetupDirection@
 \ifdim\sd@X\d@X<\z@ \let\next@=\setupDirection@i \fi
 \ifdim\sd@Y\d@Y<\z@ \let\next@=\setupDirection@i \fi
 \next@}
\xydef@\resetupDirection@{%
 \edef\Directiontest@@##1##2{\noexpand\DN@{##2}%
 \noexpand\ifdim\noexpand\d@X=\the\d@X\relax
 \noexpand\ifdim\noexpand\d@Y=\the\d@Y\relax \noexpand\DN@{##1}%
 \noexpand\fi\noexpand\fi \noexpand\next@}}
\xydef@\unsetupDirection@{\def\Directiontest@@##1##2{##2}}
\uDirection@\xydashl@
\message{edges,}
\xynew@{if}\ifInside@
\xydef@\zeroEdge#1{%
 \ifcase#1\relax \or \Inside@false \or \dimen@=\z@
 \or \else \Edge@c={\rectangleEdge}\fi}
\xydef@\circleEdge#1{\ifcase#1\expandafter\circleEdge@
 \or \expandafter\circleUnder@ \or \dimen@=\R@c
 \or \expandafter\circleProp@ \or \expandafter\circleInner@
 \else \expandafter\circleOuter@ \fi}
\xydef@\circleEdge@{\DN@{\ellipseEdge@}%
 \ifdim\R@c=\L@c\relax \ifdim\U@c=\D@c\relax
 \ifdim\R@c=\U@c\DN@{\circlecentredEdge@}%
 \else\DN@{\ellipsecentredEdge@}\fi
 \fi\fi \next@}
\xydef@\circleProp@{\DN@{\reverseDirection@\ellipseEdge@}%
 \ifdim\R@c=\L@c\relax \ifdim\U@c=\D@c\relax
 \ifdim\R@c=\U@c\DN@{\reverseDirection@\circlecentredEdge@}%
 \else\DN@{\reverseDirection@\ellipsecentredEdge@}\fi
 \fi\fi \next@}
\xydef@\circleUnder@{\Inside@false
 \ifdim\X@p=\X@c \relax \ifdim\Y@p=\Y@c \Inside@true \fi \fi 
 \ifInside@ \else \expandafter \circleCentre@ \fi}
\xydef@\circleCentre@{{%
 \ifdim\L@c=\R@c \relax\else
 \dimen@=\R@c\advance\dimen@-\L@c \divide\dimen@\tw@
 \advance\X@c\dimen@ \advance\R@c-\dimen@ \fi
 \d@X=\X@c \advance\d@X-\X@p \d@X=\ifdim\d@X<\z@-\fi\d@X
 \ifdim\U@c=\D@c\relax \else
 \dimen@=\U@c\advance\dimen@-\D@c \divide\dimen@\tw@
 \advance\Y@c\dimen@ \advance\U@c-\dimen@ \fi
 \d@Y=\Y@c \advance\d@Y-\Y@p \d@Y=\ifdim\d@Y<\z@-\fi\d@Y
 \DN@{}\ifdim\d@X>\R@c \relax \else \ifdim\d@Y>\U@c \relax 
 \else \ifdim\U@c=\R@c \DN@{\circlecentredUnder@}%
 \else \DN@{\ellipsecentredUnder@}\fi
 \fi\fi \next@}}
\xydef@\circleInner@{\DN@{\ellipseInner@}%
 \ifdim\R@c=\L@c\relax \ifdim\U@c=\D@c\relax
 \ifdim\R@c=\U@c\DN@{\circlecentredInner@}%
 \else\DN@{\ellipsecentredInner@}\fi
 \fi\fi \next@}
\xydef@\circleOuter@{\DN@{\ellipseOuter@}%
 \ifdim\R@c=\L@c\relax \ifdim\U@c=\D@c\relax
 \ifdim\R@c=\U@c\DN@{\circlecentredOuter@}%
 \else\DN@{\ellipsecentredOuter@}\fi
 \fi\fi \next@}
\xydef@\circlecentredEdge@{%
 \dimen@=-\cosDirection\R@c \advance\X@c\dimen@
 \dimen@=-\sinDirection\R@c \advance\Y@c\dimen@}
\xydef@\circlecentredUnder@{%
 \loop\ifdim\R@c>100\p@ \circlescale@ \repeat
 \edef\tmp@{\expandafter\removePT@\the\R@c}\dimen@=\tmp@\R@c 
 \edef\tmp@{\expandafter\removePT@\the\d@X}\advance\dimen@-\tmp@\d@X
 \edef\tmp@{\expandafter\removePT@\the\d@Y}\advance\dimen@-\tmp@\d@Y
 \ifdim\dimen@>\z@ \aftergroup\Inside@true \fi}
%%\xydef@\circlescale@{\divide\R@c\KK@ \divide\d@X\KK@ \divide\d@Y\KK@ }
\xydef@\circlescale@{\divide\R@c\KK@ \divide\d@X\KK@ \divide\d@Y\KK@ }
\xydef@\circlecentredInner@{%
 \L@c=\sd@X\cosDirection\R@c \D@c=\sd@Y\sinDirection\R@c
 \R@c=\L@c \U@c=\D@c \Edge@c={\rectangleEdge}}
\xydef@\circlecentredOuter@{%
 \L@c=\R@c \D@c=\R@c \U@c=\D@c \Edge@c={\rectangleEdge}}
\xydef@\ellipsecentredEdge@{\bgroup \X@p=\X@c \Y@p=\Y@c 
 \ifdim\U@c>\R@c
 \X@c=\cosDirection\U@c \Y@c=\sinDirection\U@c
 \quotient@\tmp@\U@c\R@c \X@c=\tmp@\X@c \R@c=\U@c 
 \else
 \X@c=\cosDirection\R@c \Y@c=\sinDirection\R@c
 \quotient@\tmp@\R@c\U@c \Y@c=\tmp@\Y@c 
 \fi
 \advance\X@c\X@p \advance\Y@c\Y@p 
 \setupDirection@ \X@c=\X@p \Y@c=\Y@p \circlecentredEdge@
 \d@X=\X@c \advance\d@X-\X@p \d@Y=\Y@c \advance\d@Y-\Y@p 
 \ifdim\U@c>\L@c \quotient@\tmp@\L@c\U@c \d@X=\tmp@\d@X
 \else \quotient@\tmp@\U@c\R@c \d@Y =\tmp@\d@Y \fi
 \X@c=\X@p \advance\X@c\d@X \Y@c=\Y@p \advance\Y@c\d@Y 
 \edef\next@{\egroup \X@c=\the\X@c \Y@c=\the\Y@c}\next@ }%
\xydef@\ellipsecentredUnder@{%
 \ifdim\R@c>64\p@ \circlescale@ \divide\U@c\KK@ 
 \else \ifdim\U@c>64\p@ \circlescale@ \divide\U@c\KK@ \fi\fi
 \edef\tmp@{\expandafter\removePT@\the\R@c}\d@Y=\tmp@\d@Y 
 \edef\tmp@{\expandafter\removePT@\the\U@c}\d@X=\tmp@\d@X 
 \R@c=\tmp@\R@c \circlecentredUnder@ }
\xydef@\ellipsecentredOuter@{\Edge@c={\rectangleEdge}}
\xydef@\ellipsecentredInner@{%
 \bgroup \X@p=\X@c \Y@p=\Y@c \ellipsecentredEdge@
 \advance\X@c-\X@p \L@c=\ifdim\X@c<\z@-\fi\X@c
 \advance\Y@c-\Y@p \D@c=\ifdim\Y@c<\z@-\fi\Y@c
 \edef\next@{\egroup \L@c=\the\L@c \D@c=\the\D@c}\next@
 \R@c=\L@c \U@c=\D@c \Edge@c={\rectangleEdge}}
\xydef@\ellipseEdge@{\bgroup
 \A@=\R@c \B@=\U@c
 \ifdim\R@c=\L@c \d@X=\z@ 
 \else \d@X=.5\R@c \advance\d@X-.5\L@c 
 \advance\A@\L@c \divide\A@\tw@ \fi
 \ifdim\U@c=\D@c \d@Y=\z@ 
 \else \d@Y=.5\U@c \advance\d@Y-.5\D@c 
 \advance\B@\D@c \divide\B@\tw@ \fi
 \bgroup
 \L@c=\A@ \U@c=\B@
 \R@p=\U@c \advance\R@p\L@c \multiply\R@p\tw@
 \ifdim\B@<\A@ \quotient@\tmp@\U@c\L@c \R@c=\tmp@\p@ \D@c=\p@
 \quotient@\tmp@\R@p\L@c \R@p=\tmp@\p@
 \else
 \ifdim\A@<\B@ \quotient@\tmp@\L@c\U@c \D@c=\tmp@\p@ \R@c=\p@
 \quotient@\tmp@\R@p\U@c \R@p=\tmp@\p@
 \else
 \R@c=\p@ \D@c=\p@ \quotient@\tmp@\R@p\U@c \R@p=\tmp@\p@
 \fi\fi
 \quotient@\sd@X\d@X\L@c \d@X=\sd@X\p@
 \quotient@\sd@Y\d@Y\U@c \d@Y=\sd@Y\p@
 \loop
 \bgroup \U@p=-\p@ \D@p=\z@
 \ifdim\R@c<\p@
 \edef\tmp@{\expandafter\removePT@\the\R@c}\dimen@=\tmp@\R@p 
 \advance\d@X\cosDirection\dimen@
 \else \advance\d@X\cosDirection\R@p \fi
 \edef\sd@X{\expandafter\removePT@\the\d@X}%
 \advance\U@p\sd@X\d@X
 \ifdim\R@c<\p@
 \edef\tmp@{\expandafter\removePT@\the\R@c}\dimen@=\tmp@\d@X 
 \advance\D@p\cosDirection\dimen@
 \else \advance\D@p\cosDirection\d@X \fi
 \ifdim\D@c<\p@
 \edef\tmp@{\expandafter\removePT@\the\D@c}\dimen@=\tmp@\R@p 
 \advance\d@Y\sinDirection\dimen@
 \else \advance\d@Y\sinDirection\R@p \fi
 \edef\sd@Y{\expandafter\removePT@\the\d@Y}%
 \advance\U@p\sd@Y\d@Y
 \ifdim\D@c<\p@
 \edef\tmp@{\expandafter\removePT@\the\D@c}\dimen@=\tmp@\d@Y 
 \advance\D@p\sinDirection\dimen@
 \else \advance\D@p\sinDirection\d@Y \fi
 \multiply\D@p\tw@ 
 \dimen@=\ifdim\U@p<\z@-\fi\U@p 
 \ifdim\dimen@<.01\p@ \U@p=\z@ 
 \else
 \quotient@\tmp@\U@p\D@p \U@p=\tmp@\p@
 \ifdim\U@p<\z@\xywarning@{poor convergence}\U@p=\z@
 \else \advance\R@p-\U@p \U@p=\ifdim\U@p<\z@-\fi\U@p 
 \fi \fi
 \edef\next@{\egroup \R@p=\the\R@p \U@p=\the\U@p \D@p=\the\D@p}\next@
 \ifdim\U@p>\z@ \repeat
 \edef\next@{\egroup \dimen@=\the\R@p}\next@
 \edef\tmp@{\expandafter\removePT@\the\dimen@}%
 \ifdim\B@<\A@ \dimen@=\tmp@\B@ \else \dimen@=\tmp@\A@ \fi
 \dimen@=-\dimen@
 \advance\X@c\cosDirection\dimen@
 \advance\Y@c\sinDirection\dimen@
 \edef\next@{\egroup \X@c=\the\X@c \Y@c=\the\Y@c}\next@ }%
\xydef@\ellipseOuter@{\Edge@c={\rectangleEdge}}
\xydef@\ellipseInner@{%
 \bgroup \X@p=\X@c \Y@p=\Y@c \ellipseEdge@
 \d@X=\X@c\advance\d@X-\X@p
 \ifdim\d@X>\z@ \R@p=\d@X \L@p=\R@p
 \ifdim\L@c=\R@c\else\advance\L@p\L@c \advance\L@p-\R@c \fi
 \else \L@p=-\d@X \R@p=\L@p
 \ifdim\L@c=\R@c \else\advance\R@p\R@c \advance\R@p-\L@c \fi
 \fi
 \d@Y=\Y@c\advance\d@Y-\Y@p
 \ifdim\d@Y>\z@ \U@p=\d@Y \D@p=\U@p
 \ifdim\D@c=\U@c\else\advance\D@p\D@c \advance\D@p-\U@c \fi
 \else \D@p=-\d@Y \U@p=\D@p
 \ifdim\D@c=\U@c\else\advance\U@p\U@c \advance\U@p-\D@c \fi
 \fi
 \edef\next@{\egroup
 \L@c=\the\L@p \D@c=\the\D@p \R@c=\the\R@p \U@c=\the\U@p}%
 \next@ \Edge@c={\rectangleEdge}}
\xydef@\rectangleEdge#1{\ifcase#1\expandafter\rectangleEdge@
 \or \expandafter\rectangleUnder@ \or \expandafter\rectangleDist@
 \or \expandafter\rectangleProp@
 \else \relax \fi}
\xydef@\rectangleEdge@{%
 \ifdim\d@Y<-.05\p@ \rectangleEdge@i
 \else\ifdim\d@Y<.05\p@ \rectangleEdge@ii
 \else \rectangleEdge@iii\fi\fi
 \resetupDirection@}
\xydef@\rectangleEdge@i{%
 \ifdim\d@X<-.05\p@
 \settomin@\X@c+\R@c\U@c\d@X\d@Y \settomin@\Y@c+\U@c\R@c\d@Y\d@X%1a
 \else\ifdim\d@X<.05\p@ \advance\Y@c\U@c
 \else \settomin@\X@c-\L@c\U@c\d@X\d@Y \settomin@\Y@c+\U@c\L@c\d@Y\d@X
 \fi\fi}
\xydef@\rectangleEdge@ii{%
 \ifdim\d@X<-.05\p@ \advance\X@c\R@c
 \else\ifdim\d@X<.05\p@
 \else \advance\X@c-\L@c
 \fi\fi}
\xydef@\rectangleEdge@iii{%
 \ifdim\d@X<-.05\p@
 \settomin@\X@c+\R@c\D@c\d@X\d@Y \settomin@\Y@c-\D@c\R@c\d@Y\d@X%3a
 \else\ifdim\d@X<.05\p@ \advance\Y@c-\D@c
 \else \settomin@\X@c-\L@c\D@c\d@X\d@Y \settomin@\Y@c-\D@c\L@c\d@Y\d@X
 \fi\fi}
\xydef@\settomin@#1#2#3#4#5#6{%
 \edef\nextii@{\A@=\the\A@ \B@=\the\B@}\quotient@\next@{#5}{#6}\nextii@
 \dimen@=\sd@X\sd@Y\next@#4\relax
 \ifdim#3<\dimen@ \dimen@=#3\fi \advance#1#2\dimen@}
\xydef@\rectangleUnder@{\Inside@false
 \ifdim\X@p=\X@c \ifdim\Y@p=\Y@c \Inside@true \fi\fi 
 \ifInside@ \else
 \dimen@=\X@p \advance\dimen@-\X@c 
 \ifdim \dimen@>-\L@c \relax \ifdim\dimen@<\R@c 
 \dimen@=\Y@p \advance\dimen@-\Y@c 
 \ifdim \dimen@>-\D@c \relax \ifdim\dimen@<\U@c 
 \Inside@true 
 \fi\fi\fi\fi\fi }
\xydef@\rectangleDist@{\let\next@=\rectangleDist@i
 \ifdim\d@X<-.05\p@ \dimen@=\R@c
 \else\ifdim\d@X<.05\p@ \dimen@=\z@ \DN@{\dimen@=\dimen@ii}%
 \else \dimen@=\L@c \fi\fi
 \ifdim\d@Y<-.05\p@ \dimen@ii=\U@c
 \else\ifdim\d@Y<.05\p@ \DN@{}%
 \else \dimen@ii=\D@c \fi\fi
 \next@}
\xydef@\rectangleDist@i{%
 \begingroup \quotient@\next\p@{\sd@X\cosDirection\p@}%
 \edef\next{\endgroup \dimen@=\next\dimen@}\next
 \begingroup \quotient@\next\p@{\sd@Y\sinDirection\p@}%
 \edef\next{\endgroup \dimen@ii=\the\dimen@ii}\next
 \ifdim\dimen@ii<\dimen@ \dimen@=\dimen@ii \fi}
\xydef@\rectangleProp@{%
 \enter@{\A@=\the\A@ \B@=\the\B@ \DirectionfromtheDirection@}%
 \reverseDirection@
 \dimen@=1\Direction \count@=\K@ \multiply\count@\tw@
 \ifnum \Direction>\count@
 \DN@{0}%
 \advance\dimen@-2\K@ \quotient@\nextii@{\dimen@}{2\K@}%
 \else\ifnum \Direction>\z@
 \dimen@=-\dimen@ \advance\dimen@2\K@ \quotient@\next@{\dimen@}{2\K@}%
 \DNii@{0}%
 \else\ifnum \Direction>-\count@
 \DN@{1}%
 \quotient@\nextii@{-\dimen@}{2\K@}%
 \else
 \advance\dimen@4\K@ \quotient@\next@{\dimen@}{2\K@}%
 \DNii@{1}%
 \fi\fi\fi
 \advance\X@c-\L@c \dimen@=\L@c \advance\dimen@\R@c 
 \ifdim\dimen@=\z@ \advance\X@c 2\L@c \else \advance\X@c\next@\dimen@ \fi
 \advance\Y@c+\U@c \dimen@=\D@c \advance\dimen@\U@c 
 \ifdim\dimen@=\z@ \advance\Y@c-2\U@c \advance\Y@c\Upness@\U@c
 \else \advance\Y@c-\nextii@\dimen@ \fi
 \leave@}
\message{connections;}
\xydef@\Creset@@{}
\xydef@\Cshavep@@{\noCshavep@@}
\xydef@\Cshavec@@{\noCshavec@@}
\xydef@\Cslidep@@{\noCslidep@@}
\xydef@\Cslidec@@{\noCslidec@@}
\xydef@\Calong@@{\noCalong@@}
\xydef@\Cintercept@@{\noCintercept@@}
\xydef@\Cbreak@@{\noCbreak@@}
\xydef@\Clast@@{\noClast@@}
\xylet@\lastbreak@@=\empty
\xydef@\noCshavep@@{\setupDirection@
 \enter@{\cfromthec@ \DirectionfromtheDirection@}%
 \reverseDirection@ \cfromp@ \the\Edge@c\z@
 \pfromc@ \leave@ \resetDirection@}
\xydef@\noCshavec@@{\setupDirection@ \the\Edge@c\z@ \resetDirection@}
\xydef@\noCslidep@@#1{\dimen@=#1\relax
 \advance\X@p\cosDirection\dimen@ \advance\Y@p\sinDirection\dimen@
 \resetDirection@}
\xydef@\noCslidec@@#1{\dimen@=#1\relax
 \advance\X@c\cosDirection\dimen@ \advance\Y@c\sinDirection\dimen@
 \resetDirection@}
\xydef@\noCalong@@#1{%
 \d@X=#1\d@X \d@Y=#1\d@Y \X@c=\X@p \Y@c=\Y@p \advance\X@c\d@X \advance\Y@c\d@Y
 \resetupDirection@}
\xydef@\noCintercept@@{\enter@{\pfromthep@}%
 \begingroup\Creset@@ \edef\tmp@{\endgroup
 \X@origin=\the\X@p \Y@origin=\the\Y@p \R@c=\the\d@X \U@c=\the\d@Y}\tmp@
 \loop@\dimen@=\ifdim\R@c<\z@-\fi\R@c \advance\dimen@\ifdim\U@c<\z@-\fi\U@c
 \ifdim\dimen@>10\p@ \advance\R@c \ifdim\R@c<\z@-\fi 16sp \divide\R@c\KK@ 
 \advance\U@c \ifdim\U@c<\z@-\fi 16sp \divide\U@c\KK@ \repeat@
 \intersect@ \leave@}
\xydef@\noCbreak@@{\edef\lastbreak@@{\cfromthec@}}
\xydef@\noClast@@{\Creset@@ \edef\lastbreak@@{\cfromthep@}}
\xydef@\no@@{\setupDirection@ \edef\lastbreak@@{\cfromthep@}%
 \enter@{\cfromthec@\pfromthep@\DirectionfromtheDirection@}%
 \edef\Creset@@{\cfromthec@ \pfromthep@ \DirectionfromtheDirection@}%
 \edef\next@{{\sd@X}{\sd@Y}}\expandafter\straightcheckoverlap@\next@
 \setupDirection@ \the\Edge@c\z@
 \swap@\reverseDirection@\the\Edge@c\z@\swap@\reverseDirection@
 \resetDirection@
 \edef\Cshavep@@{\DirectionfromtheDirection@
 \pfromthep@\noexpand\resetDirection@}%
 \edef\Cshavec@@{\DirectionfromtheDirection@
 \cfromthec@\noexpand\resetDirection@}%
 \leave@
 \def\Cslidep@@{\noCslidep@@}\def\Cslidec@@{\noCslidec@@}%
 \def\Calong@@{\noCalong@@}\def\Cintercept@@{\noCintercept@@}%
 \def\Cbreak@@{\noCbreak@@}\def\Clast@@{\noClast@@}\noinsert@}
\xydef@\noinsert@{\ifHidden@\else
 \ifdim\Y@c>\Y@max \Y@max=\Y@c \fi \ifdim\Y@p>\Y@max \Y@max=\Y@p \fi
 \ifdim\Y@c<\Y@min \Y@min=\Y@c \fi \ifdim\Y@p<\Y@min \Y@min=\Y@p \fi
 \ifdim\X@c>\X@max \X@max=\X@c \fi \ifdim\X@p>\X@max \X@max=\X@p \fi
 \ifdim\X@c<\X@min \X@min=\X@c \fi \ifdim\X@p<\X@min \X@min=\X@p \fi
 \fi}
\xydef@\Spread@@{}
\xydef@\checkoverlap@@{}
\xydef@\straight@#1{\setupDirection@ \def\Spread@@{#1}%
 \edef\Creset@@{\cfromthec@ \pfromthep@ \DirectionfromtheDirection@}%
 \edef\lastbreak@@{\cfromthep@}%
 \edef\next@{{\sd@X}{\sd@Y}}\expandafter\straightcheckoverlap@\next@
 \setupDirection@ \the\Edge@c\z@
 \swap@\reverseDirection@\the\Edge@c\z@\swap@\reverseDirection@
 \resetDirection@
 \edef\Cshavep@@{\DirectionfromtheDirection@
 \pfromthep@\noexpand\resetDirection@}%
 \edef\Cshavec@@{\DirectionfromtheDirection@
 \cfromthec@\noexpand\resetDirection@}%
 \noinsert@
 \straight@typeset
 \def\Cbreak@@{\straightCbreak@}\def\Clast@@{\straightClast@}%
 \def\Cslidep@@{\noCslidep@@}\def\Cslidec@@{\noCslidec@@}%
 \def\Calong@@{\noCalong@@}\def\Cintercept@@{\noCintercept@@}%
 \Creset@@}
\xydef@\straightcheckoverlap@#1#2{\def\checkoverlap@@{%
 \ifdim#1\X@p>#1\X@c \let\next@=\relax \fi
 \ifdim#2\Y@p>#2\Y@c \let\next@=\relax \fi}}
\xydef@\straight@typeset{%
 \ifInvisible@ \let\next@=\relax
 \else\ifdim 1\Direction<-2\K@ \DN@{\straightv@}%
 \else\ifdim 1\Direction<\z@ \DN@{\straighth@}%
 \else\ifdim 1\Direction<2\K@ \DN@{\straightv@}%
 \else \DN@{\straighth@}%
 \fi\fi\fi\fi \checkoverlap@@ \next@}
\xylet@\nextbreak@@=\empty
\xydef@\straightCbreak@{\connectRestore@
 \edef\nextbreak@@{\cfromthec@}%
 \Creset@@ \swap@ \the\Edge@c4\enter@{\cmergethec@}\lastbreak@@ \leave@
 \swap@ \the\Edge@c4\enter@{\cmergethec@}\nextbreak@@ \leave@
 \setupDirection@
 \the\Edge@c\z@
 \swap@ \reverseDirection@ \the\Edge@c\z@ \swap@ \reverseDirection@
 \resetDirection@ \noinsert@ \straight@typeset
 \Creset@@ \let\lastbreak@@=\nextbreak@@}
\xydef@\straightClast@{\connectRestore@
 \Creset@@ \swap@ \the\Edge@c4\enter@{\cmergethec@}\lastbreak@@ \leave@
 \swap@
 \setupDirection@
 \the\Edge@c\z@
 \swap@\reverseDirection@ \the\Edge@c\z@ \swap@\reverseDirection@
 \resetDirection@ \noinsert@ \straight@typeset
 \Creset@@ \edef\lastbreak@@{\cfromthep@}}
\xydef@\straighth@{\setbox\z@=\hbox{%
 \setbox8=\copy\lastobjectbox@
 \A@=\wd8\relax \B@=\dp8\relax \advance\B@\ht8\relax
 \ifdim \A@=\z@ \count@@=\m@ne
 \else \dimen@=\sd@X\d@X \divide\dimen@\A@ \count@@=\dimen@ \fi
 \Spread@@
 \ifdim\d@X>\z@ \advance\X@c-\wd8\relax\fi
 \dimen@=-\sd@X\wd8\relax
 \multiply\dimen@\K@dYdX \divide\dimen@\K@
 \ifdim\d@X>\z@ \advance\Y@c\dimen@ \advance\Y@c-\Leftness@\dimen@
 \else \advance\Y@c\Leftness@\dimen@ \fi
 \dimen@=\wd8\relax \A@=\sd@X\d@X \advance\A@-\dimen@
 \B@=\sd@X\dimen@ \multiply\B@\K@dYdX \divide\B@\K@
 \advance\B@-\d@Y \B@=\sd@Y\B@
 \count@=\count@@ \advance\count@\m@ne
 \ifnum\z@<\count@ \divide\A@\count@ \divide\B@\count@ \fi
 \A@=-\sd@X\A@ \B@=\sd@Y\B@ \wd8=\A@
 \kern\X@c \count@=\z@
 \loop@\ifnum\count@<\count@@ \advance\count@\@ne
 \raise\Y@c\copy8\relax \advance\Y@c\B@ \repeat@}%
 \ht\z@=\z@ \wd\z@=\z@ \dp\z@=\z@ {\Drop@@}}
\xydef@\straightv@{\setbox\z@=\vtop{%
 \setbox8=\copy\lastobjectbox@
 \A@=\wd8\relax \B@=\dp8\relax \advance\B@\ht8\relax
 \ifdim \B@=\z@ \count@@=\m@ne
 \else \dimen@=\sd@Y\d@Y \divide\dimen@\B@ \count@@=\dimen@ \fi
 \Spread@@
 \dimen@=\dp8\relax \advance\dimen@\ht8\relax
 \B@=\sd@Y\d@Y \advance\B@-\dimen@
 \A@=\sd@Y\dimen@ \multiply\A@\K@dXdY \divide\A@\K@ \advance\A@-\d@X
 \A@=\sd@X\A@ \count@=\count@@ \advance\count@\m@ne
 \ifnum\z@<\count@ \divide\B@\count@ \divide\A@\count@ \fi
 \B@=\sd@Y\B@ \A@=\sd@X\A@ \ht8=\B@ \dp8=\z@
 \ifdim\d@Y<\z@ 
 \advance\Y@c\dimen@ \advance\Y@c\Upness@\B@
 \else
 \advance\dimen@\Upness@\B@ \advance\Y@c-\dimen@ \advance\Y@c\B@
 \fi
 \advance\Y@c\B@ 
 \ifdim\d@X<\z@ \else \advance\X@c-\wd8\relax \fi
 \null \kern-\Y@c \count@=\z@
 \loop@\ifnum\count@<\count@@ \advance\count@\@ne
 \nointerlineskip \moveright\X@c\copy8\relax \advance\X@c\A@
 \repeat@}%
 \ht\z@=\z@ \wd\z@=\z@ \dp\z@=\z@ {\Drop@@}}
\message{ Xy-pic loaded}\xyuncatcodes \endinput

xyall.tex
%% xyall.tex from $Id: xyall.doc,v 3.3 1996/12/19 03:31:56 krisrose Exp $
%%
%% Xy-pic ``All features'' option.
%% Copyright (c) 1993-1996 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% See the companion README and INSTALL files for further information.
%% Copyright (c) 1991-1996 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, write to the Free Software Foundation, Inc.,
%% 675 Mass Ave, Cambridge, MA 02139, USA.
%%
\ifx\xyloaded\undefined \input xy \fi
\xyprovide{all}{All features}{\stripRCS$Revision: 3.3 $}%
 {Kristoffer H.~Rose}{krisrose@brics.dk}%
 {BRICS/Computer Science, University of Aarhus, Ny Munkegade, building 540,
 DK--8000 Aarhus~C}
\xyrequire{curve}
\xyrequire{frame}
\xyrequire{cmtip}
\xyrequire{line}
\xyrequire{rotate}
\xyrequire{color}
\xyrequire{matrix}
\xyrequire{arrow}
\xyrequire{graph}
\xyendinput

xyarrow.tex
%% xyarrow.tex from $Id: xyarrow.doc,v 3.5 1997/05/28 13:05:01 krisrose Exp $
%%
%% Xy-pic ``Arrows and Paths'' feature.
%% Copyright (c) 1991-1997 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% See the companion README and INSTALL files for further information.
%% Copyright (c) 1991-1997 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, write to the Free Software Foundation, Inc.,
%% 675 Mass Ave, Cambridge, MA 02139, USA.
%%
\ifx\xyloaded\undefined \input xy \fi
\xyprovide{arrow}{Arrow and Path feature}{\stripRCS$Revision: 3.5 $}%
 {Kristoffer H.~Rose}{krisrose@brics.dk}%
 {BRICS/Computer Science, University of Aarhus, Ny Munkegade, building 540,
 DK--8000 Aarhus~C}
\message{path,}
\xydef@\PATH{\afterPATH{}}
\xylet@\afterPATH@=\empty
\xydef@\afterPATH#1{\save
 \DN@##1{\def\afterPATH@{\restore \def\afterPATH@{##1}#1}}%
 \expandafter\next@\expandafter{\afterPATH@}%
 \let\PATHfail@@=\empty
 \let\PATHbefore@@=\empty
 \let\PATHafter@@=\empty
 \let\PATHlabelsevery@@=\empty
 \let\PATHlabelsnext@@=\empty
 \let\PATHlabelslast@@=\empty
 \xy@{\afterPATH{#1}}{\def\PATHslide@@{\z@}}%
 \def\PATHcontinue@@{\xyFN@\PATH@}%
 \xyFN@\PATH@}
\xynew@{if}\ifPATHsingle@
\xydef@\PATH@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\PATH@}%
 \else\ifPATHsingle@ \let\next@=\PATH@single
 \else \let\next@=\PATH@normal \fi\fi \next@}
\xydef@\PATH@normal{%
 \ifx ~\next \DN@ ~{\xyFN@\PATHsetting@}%
 \else \addRQ@\ifx \next \addRQ@\DN@{\xy@'{}\xyFN@\PATHstraight@}%
 \else \addLQ@\ifx \next \addLQ@\DN@{\xy@`{}\xyFN@\PATHturn@}%
 \else\ifx \PATHfail@@\PATH@x \DN@{\xyFN@\PATHfinal@}%
 \else
 \DNii@{\let\PATHfail@@=\PATH@x \xyFN@\PATH@}%
 \DN@{\expandafter\nextii@\PATHfail@@}%
 \fi\fi\fi\fi \next@}
\xylet@\PATHfail@@=\empty
\xylet@\PATHbefore@@=\empty
\xylet@\PATHafter@@=\empty
\xylet@\PATHlabelsevery@@=\empty
\xylet@\PATHlabelsnext@@=\empty
\xylet@\PATHlabelslast@@=\empty
\xydef@\PATHsetting@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\PATHsetting@}%
 \else\ifx \bgroup\next
 \DN@##1{\xy@{~{##1}}{}\def\PATHfail@@{##1}\xyFN@\PATH@}%
 \else \addEQ@\ifx \next
 \addEQ@\DN@##1{\xy@{~={##1}}{}\def\PATHbefore@@{##1}\xyFN@\PATH@}%
 \else \addLT@\ifx \next
 \addLT@\DN@##1{\xy@{~<{##1}}{}\def\PATHlabelsnext@@{##1}\xyFN@\PATH@}%
 \else \addGT@\ifx \next
 \addGT@\DN@##1{\xy@{~>{##1}}{}\def\PATHlabelslast@@{##1}\xyFN@\PATH@}%
 \else \addPLUS@\ifx \next
 \addPLUS@\DN@##1{\xy@{~+{##1}}{}\def\PATHlabelsevery@@{##1}\xyFN@\PATH@}%
 \else \ifx /\next
 \DN@/##1{\xy@{~/{##1}}{}\def\PATHafter@@{##1}\xyFN@\PATH@}%
 \else \addDASH@\ifx \next
 \xywarning@{Obsolete `-' PATH <action> translated to `='.}%
 \addDASH@\DN@##1{\xy@{~-{##1}}{}\def\PATHbefore@@{##1}\xyFN@\PATH@}%
 \else
 \xyerror@{Unknown \string~ setting: \meaning\next}%
 {See the Xy-pic arrow feature documentation for help.}%
 \fi\fi\fi\fi\fi\fi\fi\fi \next@}
\xylet@\PATHinit@@=\empty
\xylet@\PATHextra@@=\empty
\xylet@\PATHpost@@=\empty
\xylet@\PATHcontinue@@=\empty
\xydef@\PATHstraight@{%
 \def\PATHinit@@{\PATHinitstraight@}%
 \let\PATHextra@@=\empty
 \let\PATHpost@@=\empty
 \let\PATHlabelsextra@@=\relax
 \xy@@\pfromc@ \PATHafterPOS{\xyFN@\PATHsegment@}}
\xydef@\PATHfinal@{%
 \def\PATHinit@@{\PATHinitstraight@}%
 \def\PATHextra@@{\let\PATHcontinue@@=\afterPATH@}%
 \let\PATHpost@@=\empty
 \let\PATHlabelsextra@@=\PATHlabelsextralast@
 \xy@@\pfromc@ \PATHafterPOS{\xyFN@\PATHsegment@}}
\xydef@\PATHlabelsextralast@{\let\PATHlabelsextra@@=\relax
 \expandafter\xyFN@\expandafter\PATHlabels@\PATHlabelslast@@}
\xydef@\PATHinitstraight@{\xy@@{\setupDirection@ \dimen@=\PATHslide@@
 \dimen@ii=-\sinDirection\dimen@
 \ifPATHomitslide@@\else\advance\X@p\dimen@ii\fi \advance\X@c\dimen@ii
 \dimen@ii= \cosDirection\dimen@
 \ifPATHomitslide@@\else\advance\Y@p\dimen@ii\fi \advance\Y@c\dimen@ii
 \PATHomitslide@@false \resetupDirection@}}
\xydef@\PATHslide@@{\z@}
\xynew@{if}\ifPATHomitslide@@
\xydef@\PATHsegment@{%
 \addLT@\ifx\next
 \addGT@{\addLT@\DN@##1}{%
 \xy@{<##1>}{\dimen@=##1\relax \edef\PATHslide@@{\the\dimen@}}%
 \xyFN@\PATHsegment@@}%
 \else \let\next@=\PATHsegment@@
 \fi \next@}
\xydef@\PATHsegment@@{\PATHinit@@ \addEQ@\PATHaction@\PATHbefore@@ \PATHextra@@
 \expandafter\toks@\expandafter{\PATHlabelsnext@@}\let\PATHlabelsnext@@=\empty
 \expandafter\addtotoks@\expandafter{\PATHlabelsevery@@}%
 \expandafter\def\expandafter\PATHlabels@@\expandafter{\the\toks@}%
 \toks@={}\expandafter\xyFN@\expandafter\PATHlabels@\PATHlabels@@}
\xylet@\PATHlabelit@@=\empty
\xydef@\PATHlabels@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\PATHlabels@}%
 \else \ifx ^\next 
 \DN@##1{\xy@^{}\let\PATHlabelit@@=\PATHlabelabove@@
 \DNii@{}\xyFN@\PATHanchor@}%
 \else \ifx _\next
 \DN@##1{\xy@_{}\let\PATHlabelit@@=\PATHlabelbelow@@
 \DNii@{}\xyFN@\PATHanchor@}%
 \else \ifx |\next
 \DN@##1{\xy@|{}\let\PATHlabelit@@=\PATHlabelbreak@
 \DNii@{}\xyFN@\PATHanchor@}%
 \else \let\next@=\PATHfinishsegments@ \fi\fi\fi\fi \next@}
\xydef@\PATHanchor@{\begingroup \toks@={}\PATHanchor@i}
\xydef@\PATHanchor@i{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\PATHanchor@i}%
 \else\addDASH@\ifx \next
 \addDASH@\DN@{\expandafter\addtotoks@\expandafter{\PATHanchor@toks}%
 \xyFN@\PATHanchor@i}%
 \else
 \DNii@##1{\endgroup\afterPLACE{\xyFN@\PATHit@}##1}%
 \DN@{\expandafter\nextii@\expandafter{\the\toks@}}%
 \fi\fi \next@}
{\xyuncatcodes \gdef\next{<>(.5)}}
\xylet@\PATHanchor@toks=\next
\xylet@\PATHitshapes@@=\empty
\xydef@\PATHit@{\let\PATHitshape@@=\empty \xyFN@\PATHit@i}
\xydef@\PATHit@i{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\PATHit@i}%
 \else \ifx *\next \DN@*##1##{\PATHlabelit@@{!C##1}}%
 \else \addAT@\ifx\next \addAT@\DN@##1##{\PATHlabelit@@{\dir##1}}%
 \else \ifx [\next \DN@[##1]{%
 \expandafter\def\expandafter\PATHitshape@@\expandafter{\PATHitshape@@[##1]}%
 \xyFN@\PATHit@i}%
 \else \DN@{\PATHlabelit@@{}}%
 \fi\fi\fi\fi \next@}
\xydef@\PATHfinishsegments@{%
 \ifx\PATHlabelsextra@@\relax \expandafter\PATHfinishsegments@i
 \else
 \expandafter\PATHlabelsextra@@ \fi}
\xydef@\PATHfinishsegments@i{%
 \xy@@{\Clast@@}\the\toks@ \toks@={}%
 \xy@@\setupDirection@
 \PATHpost@@ \PATHaction@/\PATHafter@@
 \PATHcontinue@@}
\xydef@\PATHaction@default#1#2{\xy@{PATHaction#1{#2}}{}\POS#2\relax}
\xylet@\PATHaction=\PATHaction@default
\xydef@\PATHaction@#1#2{\expandafter\PATHaction\expandafter#1\expandafter{#2}}
\xylet@\PATHafterPOS@default=\afterPOS
\xylet@\PATHafterPOS=\PATHafterPOS@default
\xydef@\PATHlastout@@{3}
\xydef@\PATHturn@{\afterCIRorDIAG\PATHturn@cir\PATHturn@diag}
\xydef@\PATHturn@cir{\toks@={\xy@@{%
 \count@=\CIRin@@ \ifnum\count@<4\else\advance\count@-4\fi
 \count@@=\CIRout@@ \ifnum\count@@<4\else\advance\count@@-4\fi
 \ifnum\count@=\count@@ \xyerror@{<turn> cannot be half or full}{%
You asked for a <turn>ed segment with parallel in- and out-direction.^^J%
This is not allowed because it is not possible to position it uniquely.}\fi}}%
 \edef\next@{{\CIRin@@}{\expandafter\noexpand\CIRorient@@}{\CIRout@@}}%
 \expandafter\PATHturn@i\next@}
\xydef@\PATHturn@diag{\toks@={\xy@@{%
 \setupDirection@ \count@=\CIRin@@ \dimen@=\xydashl@ \ABfromdiag@
 \ifdim \sinDirection\A@>\cosDirection\B@ \def\CIRorient@@{\CIRacw@}%
 \advance\count@\ifnum\count@<6 \tw@ \else -6\fi
 \else \def\CIRorient@@{\CIRcw@}%
 \advance\count@\ifnum\count@>\@ne -\tw@ \else 6\fi
 \fi
 \edef\CIRout@@{\the\count@}}}%
 \edef\next@{{\CIRin@@}{}{}}%
 \expandafter\PATHturn@i\next@}
\xylet@\PATHpostpos@@=\empty
\xydef@\PATHturn@i#1#2#3{%
 \DN@##1{\def\PATHinit@@{\xy@@{%
 \def\CIRin@@{#1}\def\CIRorient@@{#2}\def\CIRout@@{#3}%
 \ifnum\CIRin@@=8 \let\CIRin@@=\PATHlastout@@ \fi
 \R@=\turnradius@
 ##1\relax}%
 \xy@@{\count@=\CIRin@@
 \ifPATHomitslide@@ \dimen@=-\PATHslide@@
 \ABfromdiag@ \advance\X@p-\B@ \advance\Y@p\A@ \fi
 \enter@{\pfromthep@ \basefromthebase@}}%
 \xy@@{\dimen@=\expandafter\ifx\CIRorient@@\CIRcw@-\fi\R@
 \ABfromdiag@ \advance\X@p-\B@ \advance\Y@p\A@
 \X@origin=\X@p \Y@origin=\Y@p}%
 \xy@@{\dimen@=\xydashl@ \ABfromdiag@ \R@c=\A@ \U@c=\B@
 \count@=\CIRout@@
 \dimen@=\expandafter\ifx\CIRorient@@\CIRcw@-\fi\R@
 \ABfromdiag@ \advance\X@c-\B@ \advance\Y@c\A@
 \dimen@=\xydashl@ \X@p=\X@c \Y@p=\Y@c
 \ABfromdiag@ \advance\X@p-\A@ \advance\Y@p-\B@
 \intersect@
 \count@=\CIRin@@ \dimen@=\p@ \ABfromdiag@}%
 \xy@@{\edef\next@{\expandafter\removePT@\the\A@}%
 \edef\nextii@{\expandafter\removePT@\the\B@}%
 \A@=\X@c \advance\A@-\X@origin \B@=\Y@c \advance\B@-\Y@origin
 \ifdim \next@\A@<-\nextii@\B@
 \dontleave@ \cfromp@
 \count@=\CIRin@@ \advance\count@\ifnum\count@<4 +4\else -4\fi
 \dimen@=\xydashl@ \Directionfromdiag@
 \the\Edge@c\z@
 \count@=\CIRin@@ \dimen@=\expandafter\ifx\CIRorient@@\CIRcw@-\fi\R@
 \ABfromdiag@ \advance\X@c-\B@ \advance\Y@c\A@
 \dimen@=5sp \ABfromdiag@ \advance\X@c\A@ \advance\Y@c\B@
 \fi
 \dimen@ii=\expandafter\ifx\CIRorient@@\CIRacw@-\fi\PATHslide@@
 \advance\R@\dimen@ii
 \drop@\literal@{\hbox\bgroup\cir@i}}%
 \xy@@{\X@p=\X@c \Y@p=\Y@c
 \count@=\CIRout@@
 \dimen@=\expandafter\ifx\CIRorient@@\CIRacw@-\fi\R@c
 \ABfromdiag@ \advance\X@p-\B@ \advance\Y@p\A@
 \edef\PATHpostpos@@{\X@c=\the\X@p \Y@c=\the\Y@p \noexpand\czeroEdge@
 \noexpand\PATHomitslide@@true}}%
 \xy@@{\count@=\CIRin@@
 \dimen@=\expandafter\ifx\CIRorient@@\CIRacw@-\fi\R@c
 \ABfromdiag@ \advance\X@c-\B@ \advance\Y@c\A@ \czeroEdge@}%
 \xy@@{\leave@
 \count@=\CIRin@@ \dimen@=\PATHslide@@
 \ABfromdiag@ \advance\X@p-\B@ \advance\Y@p\A@
 \edef\PATHlastout@@{\CIRout@@}%
 \count@=\CIRout@@ \dimen@=\xydashl@ \Directionfromdiag@}}}%
 \expandafter\next@\expandafter{\the\toks@}\toks@={}%
 \let\PATHextra@@=\empty
 \def\PATHpost@@{\xy@@\PATHpostpos@@}%
 \let\PATHlabelsextra@@=\relax
 \xyFN@\PATHturn@ii}
\xydef@\PATHturn@ii{%
 \ifx /\next
 \DN@ /{\afterassignment\nextii@\dimen@=}%
 \DNii@{%
 \edef\next@{\noexpand\xy@@{\edef\noexpand\turnradius@{\the\dimen@}}}\next@
 \xy@@\pfromc@ \PATHafterPOS{\xyFN@\PATHsegment@}}%
 \else \DN@{\xy@@\pfromc@ \PATHafterPOS{\xyFN@\PATHsegment@}}\fi
 \next@}
\xydef@\ABfromdiag@{\ifcase\count@\relax
 \A@=-.7071\dimen@ \B@=-.7071\dimen@ \or \A@=\z@ \B@=-\dimen@
 \or \A@=+.7071\dimen@ \B@=-.7071\dimen@ \or \A@=\dimen@ \B@=\z@
 \or \A@=+.7071\dimen@ \B@=+.7071\dimen@ \or \A@=\z@ \B@=+\dimen@
 \or \A@=-.7071\dimen@ \B@=+.7071\dimen@ \or \A@=-\dimen@ \B@=\z@
 \else\xybug@{impossible <diag>?}\fi}
\xydef@\turnradius@{10pt}
\xydef@\turnradius{\afterADDOP{\Addop@@\turnradius@}}
\xydef@\PATHlabelabove@#1#2{\droplabel@\belowDirection@{#1}{#2}%
 \let\afteraliases@@=\empty \xyFN@\PATHlabelalias@}
\xydef@\PATHlabelbelow@#1#2{\droplabel@\aboveDirection@{#1}{#2}%
 \let\afteraliases@@=\empty \xyFN@\PATHlabelalias@}
\xylet@\PATHlabelabove@@=\PATHlabelabove@
\xylet@\PATHlabelbelow@@=\PATHlabelbelow@
\xydef@\droplabel@#1#2#3{\xy@@{\enter@\DirectionfromtheDirection@}%
 \DN@{#2}\ifx\next@\empty
 \expandafter\xy@@ix@\expandafter{\PATHitshape@@\labelbox{#3}}%
 \else \expandafter\xy@@ix@\expandafter{\PATHitshape@@#2{#3}}\fi
 \xy@@{\setbox\z@=\expandafter\object\the\toks9
 \advance\L@c\labelmargin@ \advance\R@c\labelmargin@
 \advance\D@c\labelmargin@ \advance\U@c\labelmargin@ 
 \setboxz@h{\kern\labelmargin@\boxz@\kern\labelmargin@}%
 \A@=\X@c \B@=\Y@c #1\xydashl@ \the\Edge@c\thr@@ 
 \advance\A@-\X@c \advance\B@-\Y@c \advance\X@c 2\A@ \advance\Y@c 2\B@
 \ht\z@=\U@c \dp\z@=\D@c \dimen@=\L@c \advance\dimen@\R@c \wd\z@=\dimen@ 
 \setbox\lastobjectbox@=\hbox{\X@c=\L@c \Y@c=\z@ \Drop@@}%
 \drop@{\box\lastobjectbox@}{}%
 \leave@}}
\xydef@\PATHlabelbreak@#1#2{%
 \DN@{#1}\ifx\next@\empty \drop\labelbox{#2}\else \drop#1{#2}\fi
 \def\afteraliases@@{\xy@@\Cbreak@@}\xyFN@\PATHlabelalias@}
\xylet@\labelmargin@=\objectmargin@
\xydef@\labelmargin{\afterADDOP{\Addop@@\labelmargin@}}
\xydef@\hole{\hbox{\dimen@=\objectmargin@ \kern2\dimen@
 \vrule height\dimen@ depth\dimen@ width\z@}}
\xylet@\labelstyle=\scriptstyle
\xydef@\labelbox#1{\hbox{$\m@th\labelstyle{#1}$}}
\xydef@\PATHlabelalias@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\PATHlabelalias@}%
 \else \addEQ@\ifx \next
 \addEQ@\DN@"##1"{\savealias@{##1}\xyFN@\PATHlabelalias@}%
 \else \DN@{\afteraliases@@\PATHlabels@}\fi\fi \next@}
\xylet@\afteraliases@@=\empty
\xydef@\savealias@#1{\xy@@{\enter@\cfromthec@
 \advance\X@c-\L@c \advance\L@c\R@c \L@c=.5\L@c \R@c=\L@c \advance\X@c\L@c 
 \advance\Y@c-\D@c \advance\D@c\U@c \D@c=.5\D@c \U@c=\D@c \advance\Y@c\D@c 
 \idfromc@{#1}\leave@}}
\message{\string\ar,}
\xylet@\arvariant@@=\empty
\xylet@\arstemprefix@@=\empty
\xylet@\artail@@=\empty
\xylet@\arstem@@=\empty
\xylet@\arhead@@=\empty
\xylet@\armodifiers@@=\empty
\xylet@\arlabels@@=\empty
\xylet@\arafterPOS@@=\empty
\xylet@\arinit@@=\empty
\xylet@\arexit@@=\empty
\xylet@\arcomponent@@=\relax
\xylet@\arcomponenttype@@=\relax
\xylet@\afterar@@=\relax
\xydef@\ar{\relax\arSAFE}
\xydef@\arSAFE{%
 \let\arvariant@@=\empty
 \def\arstemprefix@@{\dir}%
 \edef\artail@@{\arvariant@@{}}%
 \edef\arstem@@{\arvariant@@{-}}%
 \edef\arhead@@{\arvariant@@{>}}%
 \def\armodifiers@@{}%
 \def\arafterPOS@@{}%
 \def\arlabels@@{}%
 \def\arinit@@{}%
 \def\arexit@@{}%
 \let\PATHlabelabove@@=\PATHlabelabove@
 \let\PATHlabelbelow@@=\PATHlabelbelow@
 \xyFN@\ar@}
\xydef@\ar@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\ar@}%
 \else \addAT@\ifx\next \addAT@\DN@{\xyFN@\ar@form}%
 \else\ifx |\next
 \DN@ |{\ar@anchor|}%
 \else\ifx ^\next
 \DN@ ^{\ar@anchor^}%
 \else\ifx _\next
 \DN@ _{\ar@anchor_}%
 \else \let\next@=\ar@x \fi\fi\fi\fi\fi \next@}
\xydef@\addtoarinit@#1{%
 \expandafter\def\expandafter\arinit@@\expandafter{\arinit@@ #1}}
\xydef@\addtoarlabels@#1{%
 \expandafter\def\expandafter\arlabels@@\expandafter{\arlabels@@ #1}}
\xydef@\ar@anchor#1{\begingroup
 \def\PATHlabelit@@##1##2{%
 \DN@{##1}\ifx\next@\empty
 \DN@####1{\expandafter\endgroup\expandafter\addtoarlabels@
 \expandafter{\the\toks@####1{##2}}\xyFN@\ar@}%
 \else
 \DN@####1{\expandafter\endgroup\expandafter\addtoarlabels@
 \expandafter{\the\toks@*!C####1##1{##2}}\xyFN@\ar@}\fi
 \expandafter\next@\expandafter{\PATHitshape@@}}%
 \toks@={#1}%
 \def\xy@##1##2{\addtotoks@{##1}}\change@oxy@\xy@ \let\xy@@ix@=\eat@
 \DNii@{}\xyFN@\PATHanchor@}
\xydef@\ar@form{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\ar@form}%
 \else\ifx ^\next \DN@ ^{\xyFN@\ar@style}\edef\arvariant@@{\string^}%
 \else\ifx _\next \DN@ _{\xyFN@\ar@style}\edef\arvariant@@{\string_}%
 \else\ifx 0\next \DN@ 0{\xyFN@\ar@style}\def\arvariant@@{0}%
 \else\ifx 1\next \DN@ 1{\xyFN@\ar@style}\def\arvariant@@{1}%
 \else\ifx 2\next \DN@ 2{\xyFN@\ar@style}\def\arvariant@@{2}%
 \else\ifx 3\next \DN@ 3{\xyFN@\ar@style}\def\arvariant@@{3}%
 \else\ifx \bgroup\next \let\next@=\ar@style
 \else\ifx [\next \DN@[##1]{\ar@modifiers{[##1]}}%
 \else\ifx *\next \DN@ *{\ar@modifiers}%
 \else\addLT@\ifx\next \let\next@=\ar@slide
 \else\ifx /\next \let\next@=\ar@curveslash
 \else\ifx (\next \let\next@=\ar@curveinout
 \else\addRQ@\ifx\next \addRQ@\DN@{\ar@curve@}%
 \else\addLQ@\ifx\next \addLQ@\DN@{\xyFN@\ar@curve}%
 \else\addDASH@\ifx\next \addDASH@\DN@{\defarstem@-\xyFN@\ar@}%
 \else\addEQ@\ifx\next \addEQ@\DN@{\def\arvariant@@{2}\defarstem@-\xyFN@\ar@}%
 \else\addDOT@\ifx\next \addDOT@\DN@{\defarstem@.\xyFN@\ar@}%
 \else\ifx :\next \DN@:{\def\arvariant@@{2}\defarstem@.\xyFN@\ar@}%
 \else\ifx ~\next \DN@~{\defarstem@~\xyFN@\ar@}%
 \else\ifx !\next \DN@!{\dasharstem@\xyFN@\ar@}%
 \else\ifx ?\next \DN@?{\ar@upsidedown\xyFN@\ar@}%
 \else \let\next@=\ar@error
 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next@}
\xydef@\defarstem@#1{\edef\arstem@@{\arvariant@@{\string#1}}%
 \DNii@##1##{\next@}%
 \edef\next@##1{\def\noexpand\artail@@{\arvariant@@{##1}}}%
 \expandafter\nextii@\artail@@
 \edef\next@##1{\def\noexpand\arhead@@{\arvariant@@{##1}}}%
 \expandafter\nextii@\arhead@@}
\xydef@\dasharstem@{%
 \DN@##1##{\nextii@{##1}}\DNii@##1##2{\def\arstem@@{##1{##2##2}}}%
 \expandafter\next@\arstem@@}
\xydef@\ar@error#1{\xyerror@{Illegal <form>ation (\meaning\next)}{}%
 \xyFN@\ar@}
\xydef@\ar@style{%
 \ifx \bgroup\next \def\artail@@{{}}%
 \edef\arstem@@{\arvariant@@{-}}\edef\arhead@@{\arvariant@@{>}}%
 \expandafter\ar@i
 \else \resetvariant@\artail@@ \resetvariant@\arstem@@ \resetvariant@\arhead@@
 \expandafter\xyFN@\expandafter\ar@ \fi}
\xydef@\resetvariant@#1{%
 \DN@##1##{\DN@{##1}\ifx\next@\empty
 \DN@{\expandafter\nextii@\expandafter{\arvariant@@}}%
 \else \DN@{\nextii@{##1}}\fi \next@}%
 \DNii@##1##2{\def#1{##1{##2}}}%
 \expandafter\next@#1}
\xydef@\ar@i#1{\DN@{#1}%
 \ifx\next@\empty \edef\arstem@@{\arvariant@@{}}\edef\arhead@@{\arvariant@@{}}%
 \DN@{\xyFN@\ar@}%
 \else
 \let\arcomponent@@=\ar@ii \let\arcomponenttype@@=\artip@
 \DN@{\xyFN@\arcomponent@#1$}%
 \fi \next@}
\xydef@\ar@ii{\ifx $\next \let\next@=\ar@iv
 \else \expandafter\def\expandafter\artail@@\expandafter{\the\toks@}%
 \let\arcomponent@@=\ar@iii \let\arcomponenttype@@=\arconn@
 \DN@{\xyFN@\arcomponent@}\fi \next@}
\xydef@\ar@iii{%
 \expandafter\def\expandafter\arstem@@\expandafter{\the\toks@}%
 \resetvariant@\artail@@
 \let\arcomponent@@=\ar@iv \let\arcomponenttype@@=\artip@
 \xyFN@\arcomponent@}
\xydef@\ar@iv{%
 \expandafter\def\expandafter\arhead@@\expandafter{\the\toks@}%
 \ifx $\next \DN@ ${\xyFN@\ar@}%
 \else \xyerror@{illegal <arrow>: \meaning\next\space not valid}{}\fi \next@}
\xydef@\ar@x{%
 \let\arsavedPATHafterPOS@@=\PATHafterPOS \let\PATHafterPOS=\arafterPOS@
 \toks@={\ar@PATH}%
 \expandafter\addtotoks@\expandafter{\expandafter{\artail@@}}%
 \expandafter\addtotoks@\expandafter{\expandafter{\arstem@@}}%
 \expandafter\addtotoks@\expandafter{\expandafter{\arstemprefix@@}}%
 \expandafter\addtotoks@\expandafter{\expandafter{\arhead@@}}%
 \expandafter\addtotoks@\expandafter{\expandafter{\armodifiers@@}}%
 \expandafter\addtotoks@\expandafter{\expandafter{\arinit@@}}%
 \expandafter\addtotoks@\expandafter{\expandafter{\arexit@@}}%
 \expandafter\addtotoks@\expandafter{\expandafter{\arlabels@@}}%
 \addtotoks@{\afterar@@}%
 \expandafter\DNii@\expandafter{\the\toks@}\toks@={}%
 \nextii@}
{\xyuncatcodes \gdef\next#1#2#3#4#5#6#7#8#9{%
 \def\next{%
 \afterPATH{#9}%
 ~={#6\preconnect#5#3#2}%
 ~/{#7}%
 ~<{|<*h#5\dir#1}%
 ~>{|>*h#5\dir#4}%
 ~+{#8}%
 }%
 \next}}
\xylet@\ar@PATH=\next
\xydef@\arafterPOS@#1{%
 \arsavedPATHafterPOS@@{\let\PATHafterPOS=\arsavedPATHafterPOS@@
 \DN@{#1}\expandafter\next@\arafterPOS@@}}%
\xylet@\arsavedPATHafterPOS@@=\relax
\xydef@\arcomponent@{%
 \ifx ^\next \toks@ii={^}\DN@ ^{\xyFN@\arcomponent@i}%
 \else\ifx _\next \toks@ii={_}\DN@ _{\xyFN@\arcomponent@i}%
 \else\ifx 1\next \toks@ii={1}\DN@ 1{\xyFN@\arcomponent@i}%
 \else\ifx 2\next \toks@ii={2}\DN@ 2{\xyFN@\arcomponent@i}%
 \else\ifx 3\next \toks@ii={3}\DN@ 3{\xyFN@\arcomponent@i}%
 \else\ifx \bgroup\next \expandafter\toks@ii\expandafter{\arvariant@@}%
 \let\next@=\arcomponent@i
 \else\ifx *\next \DN@*##1##{\arcomponent@ii{##1}}%
 \else \expandafter\toks@ii\expandafter{\arvariant@@}\toks@={}%
 \let\next@=\arcomponenttype@@
 \fi\fi\fi\fi\fi\fi\fi
 \next@}
\xydef@\arcomponent@i#1{\toks@={#1}\arcomponent@x}
\xydef@\arcomponent@ii#1#2{\toks@={*#1{#2}}\xyFN@\arcomponent@@}
\xydef@\artip@{%
 \addGT@\ifx\next \addGT@\addtotoks@ \addGT@\DN@{\xyFN@\artip@}%
 \else\addLT@\ifx\next \addLT@\addtotoks@ \addLT@\DN@{\xyFN@\artip@}%
 \else\ifx (\next \addtotoks@(\DN@({\xyFN@\artip@}%
 \else\ifx )\next \addtotoks@)\DN@){\xyFN@\artip@}%
 \else\ifx |\next \addtotoks@|\DN@|{\xyFN@\artip@}%
 \else\addLQ@\ifx\next \addLQ@\addtotoks@ \addLQ@\DN@{\xyFN@\artip@}%
 \else\addRQ@\ifx\next \addRQ@\addtotoks@ \addRQ@\DN@{\xyFN@\artip@}%
 \else\addPLUS@\ifx \next \addPLUS@\addtotoks@ \addPLUS@\DN@{\xyFN@\artip@}%
 \else\ifx /\next \addtotoks@/\DN@/{\xyFN@\artip@}%
 \else\ifcat A\noexpand\next \DN@##1{\addtotoks@{##1}\xyFN@\artip@}%
 \else\ifx\space@\next \addtotoks@{ }\expandafter\DN@\space{\xyFN@\artip@}%
 \else \let\next@=\arcomponent@x
 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next@}
\xydef@\arconn@{%
 \addDASH@\ifx\next \addDASH@\addtotoks@ \addDASH@\DN@{\xyFN@\arconn@}%
 \else\addEQ@\ifx\next \addEQ@\addtotoks@ \addEQ@\DN@{\xyFN@\arconn@}%
 \ifx\arvariant@@\empty \def\arvariant@@{2}\fi
 \else\addDOT@\ifx\next \addDOT@\addtotoks@ \addDOT@\DN@{\xyFN@\arconn@}%
 \else\ifx :\next \addtotoks@:\DN@:{\xyFN@\arconn@}%
 \ifx\arvariant@@\empty \def\arvariant@@{2}\fi
 \else\ifx ~\next \addtotoks@~\DN@~{\xyFN@\arconn@}%
 \else \let\next@=\arcomponent@x
 \fi\fi\fi\fi\fi \next@}
\xydef@\arcomponent@x{%
 \DN@##1{\toks@=\expandafter{\the\toks@ii{##1}}}%
 \expandafter\next@\expandafter{\the\toks@}%
 \xyFN@\arcomponent@@}
\xydef@\ar@curveslash/#1/{\expandafter\ar@curve@\ar@slashing{#1}}
\xydef@\ar@slashing#1{{\xy@{**{} ?+/#1/+/#1/ @+c}{\setupDirection@
 \vfromslide@{#1}%
 \X@c=2\X@c \advance\X@c\X@p \advance\X@c.5\d@X
 \Y@c=2\Y@c \advance\Y@c\Y@p \advance\Y@c.5\d@Y
 \czeroEdge@
 \spushc@}}}
{\xyuncatcodes \catcode`\#=6
 \gdef\next(#1,#2){{+/#1 3pc/,p+/#2 3pc/}}}
\xylet@\ar@curveinout@=\next
\xydef@\ar@curveinout{\expandafter\ar@curve@load\ar@curveinout@}
\xydef@\ar@curve{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\ar@curve}%
 \else\ifx \bgroup\next \let\next@=\ar@curve@load
 \else\ifx "\next \DN@"##1"{\ar@curve@{"##1"}}%
 \else \xyerror@{@= <form> must be followed by \string"<id>\string" or
 {<control point list>}}{}%
 \fi\fi\fi \next@}
{\xyuncatcodes \gdef\next#1#2{\def#1##1{#2{;@={##1}}}}}
\next\ar@curve@load\ar@curve@
\xydef@\ar@curve@#1{\curve@check
 \setcurvearinit@{#1}\setcurvearexit@\arexit@@
 \def\arstemprefix@@{\crvi}\xyFN@\ar@}
{\xyuncatcodes \gdef\next#1{\save @(,#1\restore}}
\xylet@\setcurvearinit@i=\next
\xydef@\setcurvearinit@#1{%
 \expandafter\addtoarinit@\expandafter{\setcurvearinit@i{#1}}}
{\xyuncatcodes \gdef\next#1{\def#1{\POS @i @) }}}
\xylet@\setcurvearexit@=\next
\xydef@\curve@check{%
 \xyerror@{Forms @/.../, @(...), and @`{...}, only available when curve
 extension loaded}{}}
\xywithoption{curve}{\let\curve@check=\relax}
\xydef@\ar@modifiers#1{%
 \expandafter\def\expandafter\armodifiers@@\expandafter{\armodifiers@@#1}%
 \xyFN@\ar@}
{\xyuncatcodes \catcode`\#=6 \catcode`\@=11
 \gdef\next<#1>{\def\arafterPOS@@{<#1>}\xyFN@\ar@}}
\xylet@\ar@slide=\next
\xydef@\ar@upsidedown{\let\next=\PATHlabelabove@@
 \let\PATHlabelabove@@=\PATHlabelbelow@@ \let\PATHlabelbelow@@=\next}
\xyendinput

xycmtip.tex
%% xycmtip.tex from $Id: xycmtip.doc,v 3.3 1996/12/19 03:31:56 krisrose Exp $
%%
%% Xy-pic ``Computer Modern tips'' extension.
%% Copyright (c) 1992-1996 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% Copyright (c) 1991-1996 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, write to the Free Software Foundation, Inc.,
%% 675 Mass Ave, Cambridge, MA 02139, USA.
%%
\ifx\xyloaded\undefined \input xy \fi
\xyprovide{cmtip}{Computer Modern tip extension}{\stripRCS$Revision: 3.3 $}%
 {Kristoffer H.~Rose}{krisrose@brics.dk}%
 {BRICS/Computer Science, University of Aarhus, Ny Munkegade, building 540,
 DK--8000 Aarhus~C}
\xyrequire{tips}\xycatcodes
\xydef@\UseComputerModernTips{\SelectTips{cm}{10}\UseTips}
\xydef@\NoComputerModernTips{\NoTips}
\xyendinput

xycolor.tex
%% xycolor.tex from $Id: xycolor.doc,v 3.3 1996/12/19 03:50:08 ross Exp $
%%
%% Xy-pic ``Colour extension'' option.
%% Copyright (c) 1993-1996 Ross Moore <ross@mpce.mq.edu.au>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% See the companion README and INSTALL files for further information.
%% Copyright (c) 1991-1996 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, write to the Free Software Foundation, Inc.,
%% 675 Mass Ave, Cambridge, MA 02139, USA.
%%
\ifx\xyloaded\undefined \input xy \fi
\xyprovide{color}{Colour extension}{\stripRCS$Revision: 3.3 $}%
 {Ross Moore}{ross@mpce.mq.edu.au}%
 {Mathematics Department, Macquarie University, NSW~2109, Australia}
\xydef@\xycolorwarning@@{\xycolormessage@
 \gdef\xycolorwarning@{\xycolormessage@
 \xywarning@{...no further colour warnings will be given.}%
 \global\let\xycolorwarning@=\relax }}
\xylet@\xycolorwarning@=\xycolorwarning@@
\xydef@\xycolormessage@{%
 \xywarning@{Current driver does not support colour.}}%
\xydef@\xyNoColor@#1{}
\xylet@\xycolor@@=\xyNoColor@
\xydef@\xyNoColor@@#1#2{\xycolorwarning@}
\xydef@\xycolor@{\xycolor@@}
\xylet@\xylocalColor@=\xyNoColor@@
\xydef@\UnloadColor@{%
 \let\xylocalColor@=\xyNoColor@@
 \let\xycolor@@=\xyNoColor@
 \let\xycolorwarning@=\xycolorwarning@@ }
\xylet@\UnloadColor@@=\UnloadColor@
\xyaddunsupport{color}{\UnloadColor@@\relax}
\ifx\current@color\undefined \xydef@\xybasecolor@{}%
\else \def\xybasecolor@{\current@color}\fi
\xydef@\xystackcolor@{\bgroup \DN@##1##2{\egroup}%
 \ifInvisible@\else\ifHidden@\else\DNii@{\no@@}\ifx\nextii@\Connect@@ 
 \else\DN@{\xystackcolor@i}\fi\fi\fi \next@ } 
\xydef@\xystackcolor@i#1#2{\checkXyStyle@ 
 \DN@{#2}\ifx\next@\empty
 \def\tmp@##1{\DN@{\xycolor@push{#1}##1\xycolor@pop}}%
 \else\def\tmp@##1{\DN@{\xycolor@push{#2 #1}##1\xycolor@pop}}\fi
 \toks@={\egroup \let\xy@style@=\relax \def\Drop@@}%
 \expandafter\tmp@\expandafter{\Drop@@}%
 \expandafter\addtotoks@\expandafter{\expandafter{\next@}\def\Connect@@}%
 \expandafter\tmp@\expandafter{\Connect@@}%
 \expandafter\addtotoks@\expandafter{\expandafter{\next@}}%
 \the\toks@ }%
\xydef@\xycolor@push@@#1{\special{color push #1}}
\xydef@\xycolor@pop{\special{color pop}}
\xylet@\xycolor@push=\xycolor@push@@
\xydef@\newxycolor#1#2{\newxyColor{#1}{}{}{#2}{}}
\xydef@\newxyColor#1#2#3#4{\newxycolor@{#1}{#2}{#3}{#4}{}}
\xydef@\newxycolor@#1#2#3#4#5{%
 \expandafter\let\expandafter\next@\csname shape [#1]\endcsname
 \ifx\next@\relax
 \DN@{#4}\ifx\next@\empty
 \DN@{#2}\ifx\next@\empty
 \DN@{\newxystyle{#1}{\xylocalColor@{}{#3}\xycolor@{#3}}}%
 \else
 \DN@{\newxystyle{#1}{\xylocalColor@{#2}{#3}\xycolor@{#2 #3}}}%
 \fi
 \else\DN@{#2#3}\ifx\next@\empty
 \DN@{\newxystyle{#1}{\xylocalColor@{#4}{}\xycolor@{#4}}}%
 \else
 \DN@{\newxystyle{#1}{\xylocalColor@{#2}{#3}\xycolor@{#4}}}%
 \fi \fi 
 \else \def\tmp@{\relax}\DNii@{#5}%
 \ifx\nextii@\tmp@
 \DN@{#4}\ifx\next@\empty
 \DN@{#2}\ifx\next@\empty
 \DN@{\newxystyle{#1}{\xylocalColor@{}{#3}\xycolor@{#3}}}%
 \else
 \DN@{\newxystyle{#1}{\xylocalColor@{#2}{#3}\xycolor@{#2 #3}}}%
 \fi
 \else
 \DN@{#2#3}\ifx\next@\empty
 \DN@{\newxystyle{#1}{\xylocalColor@{#4}{}\xycolor@{#4}}}%
 \else
 \DN@{\newxystyle{#1}{\xylocalColor@{#2}{#3}\xycolor@{#4}}}%
 \fi \fi 
 \else\DN@{}\fi\fi \next@\relax}
\xydef@\xystandardcolors@{%
 \newxycolor@{black}{0. 0. 0.}{rgb}{}\relax
 \newxycolor@{white}{1. 1. 1.}{rgb}{}\relax
 \newxycolor@{gray}{.5}{gray}{}\relax
 \newxycolor@{grey}{.5}{gray}{}\relax
 \newxycolor@{red}{1. 0. 0.}{rgb}{}\relax
 \newxycolor@{green}{0. 1. 0.}{rgb}{}\relax
 \newxycolor@{blue}{0. 0. 1.}{rgb}{}\relax
 \newxycolor@{cyan}{0. 1. 1.}{rgb}{}\relax
 \newxycolor@{magenta}{1. 0. 1.}{rgb}{}\relax
 \newxycolor@{yellow}{1. 1. 0.}{rgb}{}\relax
 \xyuncatcodes }
\xydef@\UseCrayolaColors{\xyrequire{crayon}\xyuncatcodes}%
\xydef@\xyBEcolorcheck@{\ifx\xycolor@@\xyNoColor@\else
 \xywarning@{PostScript colour support should be OK.}\fi }%
\xywithoption{ps}{%
 \xyinputorelse@{xyps-c}{\xyerror@{Could not load xyps-c}{}}}%
 \xycatcodes
\xyendinput

xycurve.tex
%% xycurve.tex from $Id: xycurve.doc,v 3.7 1999/02/16 15:12:50 krisrose Exp $
%%
%% Xy-pic ``Curves and Splines'' extension.
%% Copyright (c) 1993-1997 Ross Moore <ross@mpce.mq.edu.au>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% See the companion README and INSTALL files for further information.
%% Copyright (c) 1991-1997 Kristoffer H. Rose <krisrose@ens-lyon.fr>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, write to the Free Software Foundation, Inc.,
%% 675 Mass Ave, Cambridge, MA 02139, USA.
%%
\ifx\xyloaded\undefined \input xy \fi
\xyprovide{curve}{Curve and Spline extension}{\stripRCS$Revision: 3.7 $}%
 {Ross Moore}{ross@mpce.mq.edu.au}%
 {Mathematics Department, Macquarie University, NSW~2109, Australia}
\message{curve,}
\xynew@{count}\crv@cnt@
\xydef@\xynumctrlpts@{\the\crv@cnt@}
\xynew@{toks}\crvpts@
\xydef@\setcurve@{%
 \edef\xysplineparams@{%
 \expandafter\noexpand\csname params@\endcsname}%
 \edef\xysplineedges@{%
 \expandafter\noexpand\csname edges@\endcsname}%
 \edef\xycrvcnt@{%
 \expandafter\noexpand\csname crvcnt@\endcsname}%
 \expandafter\edef\xycrvcnt@{\number\crv@cnt@}%
 \ifcase\crv@cnt@
 \expandafter\xycvxhull@\or
 \expandafter\xyquadbezier@\or
 \expandafter\xycubicbezier@\or
 \expandafter\xybspline@iii\or
 \expandafter\xybspline@iv\else
 \expandafter\xybspline@
 \fi}
\xydef@\curve{\connect\crv}
\xydef@\crv#1#{\hbox \bgroup \crvresetbreaks@ \initshape@
 \def\pure@crv{\crv@saveStyles@}\crv@{#1}}
\xydef@\crv@#1#2{%
 \DN@{#1}\ifx\empty\next@
 \DN@{\def\afterCURVEaction@{}\parsecurve@\xycurve@@}%
 \else\DN@{\parseCURVE@#1\parsecurve@\curveSTYLE@}\fi
 \next@ #2\@endcurve\endcrv@ }
\xydef@\curveSTYLE@{\xycurve@@}%
\xydef@\afterCURVEaction@{}%
\xydef@\@endcurve{}%
\xydef@\endcrv@@{\endcrv@\POS}%
\xydef@\pure@crv{\relax}
\xywarnifdefined\crv@normaltemplate
\xywarnifdefined\crv@othertemplate
\xywarnifdefined\crv@specialtemplate@@
{\xyuncatcodes \catcode`\@=11 \catcode`\#=6
 \gdef\crv@normaltemplate#1{{}{~**#1\xy@@crvaddstack@}}
 \gdef\crv@othertemplate#1{{}{~*=<2\jot>{}~**#1\xy@@crvaddstack@}}
 \gdef\crv@specialtemplate@@#1{{}{~**\dir{#1}\xy@@crvaddstack@}}
}
\xydef@\crvs#1#{\hbox \bgroup \def\pure@crv{\relax}\crvs@{#1}}%
\xydef@\crvi#1#{\hbox \bgroup \def\pure@crv{\relax}\invisbreaks@ \crvs@{#1}}%
\xydef@\crvs@#1{\DN@{\initshape@ \@crv@{#1}}%
 \def\crv@defaultshape{-}%
 \ifx\bstartPLACE@\relax \else
 \ifx\bstartPLACE@\empty \Invisible@true \else
\splinetrace@{bstartPLACE@=\bstartPLACE@, bendPLACE@=\bendPLACE@}%
 \DN@{\let\xy@@crvaddstack@=\xy@@samecurve@
 \let\saveshape@=\savesame@ 
 \let\savectrlptsnum@=\relax
 \let\startxycurve@=\recovercurve@ 
 \crv@cnt@=\xycrvptsnum@\relax \@crv@{#1}}%
 \fi \fi \next@ }
\xydef@\xy@@samecurve@{\xyFN@\checkendcurve@}
\xydef@\savesame@{\egroup }
\xydef@\recovercurve@{%
 \crv@cnt@=\xycrvptsnum@ \splinereset@ \recovercv@end
 \ifx\bendPLACE@\relax \def\bendPLACE@{1}\fi
 \ifdim\zz@\R@c \ifdim\zz@\L@c \ifdim\zz@\D@c \ifdim\zz@\U@c
 \Edge@c={\zeroEdge}\fi\fi\fi\fi
 \edef\cv@end{\cfromthec@}\edef\cv@start{\cfromthep@}}
\xydef@\recovercv@end{\count@=\ptsnum@\relax\advance\count@\@ne
 \edef\tmp@{\the\count@}\csname cv@\tmp@\endcsname}%
\xydef@\crvSTYLE@@{}
\expandafter\xydef@\expandafter\crv@defaultshape\expandafter{\addDASH@{}}
\xydef@\crv@noobject{\Invisible@true}
\xydef@\@crv@#1#2{\DN@{#1#2}%
 \ifx\next@\empty \edef\next@{\crv@defaultshape}%
 \ifx\bstartPLACE@\empty \xdef\crvSTYLE@@{{\crv@defaultshape}}\fi
 \else 
 \ifx\bstartPLACE@\empty \gdef\crvSTYLE@@{#1{#2}}\fi
 \fi
 \ifx\next@\empty \crv@noobject \DN@{\crv@{}{\xy@@crvaddstack@}}%
 \else\def\tmp@{-}\ifx\next@\tmp@ \DN@{\crv@{}{\xy@@crvaddstack@}}%
 \else\def\tmp@{=}\ifx\next@\tmp@ 
 \DN@{\expandafter\crv@\crv@normaltemplate{\dir{=}}}%
 \else\def\tmp@{2-}\ifx\next@\tmp@ 
 \DN@{\expandafter\crv@\crv@normaltemplate{\dir{2.}}}%
 \else\def\tmp@{3-}\ifx\next@\tmp@ 
 \DN@{\expandafter\crv@\crv@normaltemplate{\dir{3.}}}%
 \else\def\tmp@{--}\ifx\next@\tmp@
 \DN@{\expandafter\crv@\crv@specialtemplate@{--}}%
 \else\def\tmp@{==}\ifx\next@\tmp@ 
 \DN@{\expandafter\crv@\crv@normaltemplate{\dir2{--}}}%
 \else\def\tmp@{2--}\ifx\next@\tmp@ 
 \DN@{\expandafter\crv@\crv@normaltemplate{\dir2{--}}}%
 \else\def\tmp@{3--}\ifx\next@\tmp@ 
 \DN@{\expandafter\crv@\crv@normaltemplate{\dir3{--}}}%
 \else\def\tmp@{.}\ifx\next@\tmp@
 \DN@{\expandafter\crv@\crv@specialtemplate@{.}}%
 \else\def\tmp@{:}\ifx\next@\tmp@
 \DN@{\expandafter\crv@\crv@normaltemplate{\dir{:}}}%
 \else\def\tmp@{2.}\ifx\next@\tmp@
 \DN@{\expandafter\crv@\crv@normaltemplate{\dir{:}}}%
 \else\def\tmp@{..}\ifx\next@\tmp@
 \DN@{\expandafter\crv@\crv@specialtemplate@{.}}%
 \else
 \DN@{\expandafter\crv@\crv@othertemplate{\dir#1{#2}}}%
 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next@}
\xylet@\crv@specialtemplate@=\crv@specialtemplate@@
\xydef@\crv@special#1{}
\xydef@\parseCURVE@{\def\curveSTYLE@{\xycurve@@}\def\afterCURVEaction@{}%
 \xyFN@\parseCURVE@@}
\xydef@\parseCURVE@@{%
 \ifx\space@\next\expandafter\DN@\space{\xyFN@\parseCURVE@@}%
 \else\ifx ~\next \DN@ ~{\xy@~{}\xyFN@\setcurveSTYLE@@}%
 \else\ifx\parsecurve@\next\DN@{}%
 \else\ifcat\active\noexpand\next\DN@{\xyactive@Warning}%
 \else\ifcat a\noexpand\next\DN@##1{\xytilde@Warning\setcurveSTYLE@{##1}%
 \xyFN@\parseCURVE@@}%
 \else\DN@{}\fi\fi\fi\fi\fi \next@ }%
\xydef@\xyactive@Warning{\xywarning@{expandable control sequences should 
 not be here, results are unpredictable in diagrams.}}%
\xydef@\xytilde@Warning{Please use ~ to set curve style.}%
\xydef@\setcurveSTYLE@#1{\xyFN@\setcurveSTYLE@@#1}
\xydef@\setcurveSTYLE@@{%
 \ifx\next p\def\curveSTYLE@{\xyc@trlpts@@}%
 \DN@ p{\xyFN@\setafterCURVEaction@}%
 \else\ifx\next P\def\curveSTYLE@{\xyc@trlpts@}%
 \DN@ P{\xyFN@\setafterCURVEaction@}%
 \else\ifx\next l\def\curveSTYLE@{\xyc@vxhull@@}%
 \DN@ l{\xyFN@\setafterCURVEaction@}%
 \else\ifx\next L\def\curveSTYLE@{\xyc@vxhull@}%
 \DN@ L{\xyFN@\setafterCURVEaction@}%
 \else\ifx\next c\def\curveSTYLE@{\xycurve@@}%
 \DN@ c{\xyFN@\setafterCURVEaction@}%
 \else\ifx\next C\def\curveSTYLE@{\xycurve@@}%
 \DN@ C{\xyFN@\setafterCURVEaction@}%
 \else \DN@##1{\xywarning@{unknown curve style ##1}\xyFN@\parseCURVE@@}%
 \fi\fi\fi\fi\fi\fi \next@ }
\xydef@\setafterCURVEaction@{%
 \ifx\next~\DN@~{\xyFN@\setcurveSTYLE@@}%
 \else\ifcat a\noexpand\next\DN@{\setafterCURVEaction@@}%
 \else\DN@{\xyFN@\parseCURVE@@}%
 \fi\fi \next@}
\xydef@\setafterCURVEaction@@{%
 \ifx\next c\DN@ c{%
 \def\afterCURVEaction@{\noexpand\endcurve\noexpand\xy@curve@}%
 \xyFN@\parseCURVE@@ }%
 \else\ifx\next C\DN@ C{%
 \def\afterCURVEaction@{\noexpand\endcurve\noexpand\xy@curve@@}%
 \xyFN@\parseCURVE@@ }%
 \else \DN@##1{\xywarning@{unknown after-curve action ##1}%
 \xyFN@\parseCURVE@@ }%
 \fi\fi \next@ }
\xydef@\parsecurve@{\xyFN@\parsecurve@@}
\xydef@\parsecurve@@{%
 \ifx\space@\next\expandafter\DN@\space{\xyFN@\parsecurve@@}%
 \else\ifx\next\@endcurve\DN@\@endcurve{\checkafterCURVE@}%
 \else\ifcat\active\noexpand\next\DN@{\relax}%
 \else\DN@{\xycurve@@}\fi\fi\fi\next@}%
\xydef@\xycurve@{\begingroup\afterCURVE{\setcurve@\endgroup}\crvobjects@
 \startxycurve@\xycrvmods@}
\xydef@\xycurve@@{\afterCURVE{\setcurve@}\crvobjects@\startxycurve@
 \xycrvmods@}
\xydef@\xy@curve@{\xy@curve@@@{\splinedefaulttol@\crvobjects@}}
\xydef@\xy@curve@@{\xy@curve@@@{\resetcrvobjects@}}
\xydef@\xy@curve@@@#1{\ifx\cv@start\relax
 \DN@{\xywarning@{There is no curve to plot}}.
 \else\DN@{\begingroup\afterCURVE{\setcurve@\endgroup}#1\cv@end}%
 \fi \next@ }
\xydef@\crvobjects@{\def\xycrvdrop@{}\def\xycrvconn@{}}
\xydef@\resetcrvobjects@{\crvobjects@}
\xylet@\savecurve=\xycurve@@
\xylet@\samecurve=\xy@curve@
\xydef@\xycrvmods@{\xyFN@\xy@crvmods@}%
\xydef@\xy@crvmods@{%
 \ifx\space@\next\expandafter\DN@\space{\xyFN@\xy@crvmods@}%
 \else\ifx\next ~\DN@ ~{\xyFN@\xy@crvmods@@}%
 \else\DN@{\xy@crvmods@@@@}\fi\fi \next@}%
\xydef@\xy@crvmods@@@@{\xyFN@\checkendcurve@}%
\xydef@\xy@crvmods@@{%
 \ifx\space@\next\expandafter\DN@\space{\xyFN@\xy@crvmods@@}%
 \else\ifx\next *\DN@ *{\xyFN@\xy@@crvmods@}%
 \else\addAT@\ifx\next\addAT@\DN@{\xyFN@\xy@@crvaddstack}%
 \else\DN@{\xywarning@{badly-formed curve option}\xyFN@\xy@crvmods@}%
 \fi\fi\fi \next@}%
\xydef@\xy@@crvmods@{%
 \ifx\space@\next\expandafter\DN@\space{\xyFN@\xy@@crvmods@}%
 \else\ifx\next *\DN@ *{\xyFN@\xy@@crvmods@@}%
 \else\DN@{\xy@crv@mods@@}\fi\fi \next@}%
\xydef@\xy@crv@mods@@#1#{\DN@##1{\xy@crvmods@@@{#1}{##1}}\next@}%
\xydef@\xy@crvmods@@@#1#2{%
 \DN@{#1#2}\ifx\next@\empty \def\xycrvdrop@{ #1{\zerodot}}%
 \else \def\xycrvdrop@{ #1{#2}}\fi
 \xyFN@\xy@crvmods@ }%
\xydef@\xy@@crvmods@@#1#{\DN@##1{\xy@@crvmods@@@{#1}{##1}}\next@}%
\xydef@\xy@@crvmods@@@#1#2{\def\xycrvconn@{ #1{#2}}\xyFN@\xy@crvmods@ }%
\xydef@\checkendcurve@{%
 \ifx\space@\next\expandafter\DN@\space{\xyFN@\checkendcurve@}%
 \else\ifx\next\endcurve\DN@\endcurve{\clearsearchflag@\endxycurve@}%
 \else\ifx\next\@endcurve\DN@\@endcurve{\checkafterCURVE@}%
 \else\ifx\next\xy@@crvaddstack@\DN@{}%
 \else\ifx\next\endxy\DN@{\clearsearchflag@\sloppyendcrv@}%
 \else\testAND@\iffalse \DN@##1{\clearsearchflag@\searchnextpt@}%
 \else\ifx ~\next\DN@ ~{\xyFN@\checkcrvtilde@}%
 \else\ifx\next\relax\DN@\relax{\clearsearchflag@\searchnextpt@}%
 \else\ifx\next\\\DN@\\{\clearsearchflag@\searchnextpt@}%
 \else\ifx\searchflag@\relax
 \DN@{\setsearchflag@\searchnextpt@}%
 \else\DN@##1{\flagwarn@{##1}}\fi
 \fi\fi\fi\fi\fi\fi\fi\fi\fi \next@ }
\xydef@\searchnextpt@{\afterPOS{\xy@@\addtocrv@ \xyFN@\checkendcurve@}}
\xydef@\checkafterCURVE@{%
 \edef\tmp@{\noexpand\xyFN@\noexpand\checkendcurve@
 \afterCURVEaction@\noexpand\endcurve}\tmp@ }
\xylet@\searchflag@=\relax
\xydef@\setsearchflag@{\let\searchflag@=@}
\xydef@\clearsearchflag@{\let\searchflag@=\relax}
\xydef@\flagwarn@#1{%
 \ifx\next\@endcurve\DN@{\xyFN@\checkendcurve@\endcurve}%
 \else\setsearchflag@\DN@{\xyFN@\checkendcurve@}%
 \xywarning@{skipping invalid token \string#1\space in curve}%
 \fi \next@ }
\xydef@\sloppyendcrv@{%
\xywarning@{Please use \string\endcurve\space to end the curve.}\endxycurve@}
\xydef@\endcrv@{\saveshape@
 \Edge@c={\splineEdge}\Invisible@false\Hidden@false
 \edef\Drop@@{\noexpand\ifInvisible@ \setbox\z@=\copy\voidb@x
 \noexpand\else
 \noexpand\wdz@=\z@
 \noexpand\ht\z@=\z@ \noexpand\dp\z@=\z@
 \noexpand\splineDrop@
 \noexpand\fi }%
 \edef\Connect@@{%
 \noexpand\setbox\z@=\noexpand\box\lastobjectbox@
 \noexpand\wdz@=\z@
 \noexpand\ht\z@=\z@ \noexpand\dp\z@=\z@
 \expandafter\noexpand\pure@crv
 \noexpand\ifInvisible@ \noexpand\crv@saveStyles@ \noexpand\else 
 \noexpand\crv@getStyles@\noexpand\styledboxz@ \noexpand\fi
 \noexpand\ifHidden@\noexpand\else 
 \noexpand\ifx\noexpand\COORD@\noexpand\xymatrixCOORD@ \noexpand\else
 \noexpand\X@min=\the\X@min \noexpand\X@max=\the\X@max 
 \noexpand\Y@min=\the\Y@min \noexpand\Y@max=\the\Y@max
 \noexpand\fi \noexpand\fi
 \savecrvparams@ \noexpand\crvconnect@
 }%
 \wdz@=\z@
 \ht\z@=\z@ \dp\z@=\z@ }
\xydef@\crvXY@pre@{}
\xydef@\crvXY@post@{}
\xydef@\crv@saveStyles@{\def\xy@style@{}%
 \expandafter\def\expandafter\crvXY@pre@\expandafter{\preXY@style@}%
 \expandafter\def\expandafter\crvXY@post@\expandafter{\postXY@style@}}
\xydef@\crv@getStyles@{\def\xy@style@{}%
 \gdef\preXY@style@{\crvXY@pre@}\gdef\postXY@style@{\crvXY@post@}}
\xydef@\initshape@{\savescope@ 
 \ifdim\X@c>\X@p \X@min=\X@p \X@max=\X@c \else \X@max=\X@p \X@min=\X@c \fi
 \ifdim\Y@c>\Y@p \Y@min=\Y@p \Y@max=\Y@c \else \Y@max=\Y@p \Y@min=\Y@c \fi }
\xydef@\saveshape@{\savectrlptsnum@ 
 \R@c=\X@max \advance\R@c-\X@c \L@c=\X@c \advance\L@c-\X@min
 \U@c=\Y@max \advance\U@c-\Y@c \D@c=\Y@c \advance\D@c-\Y@min
 \edef\tmp@{\egroup \U@c=\the\U@c \D@c=\the\D@c \L@c=\the\L@c \R@c=\the\R@c
 \noexpand\ifdim\noexpand\X@min>\the\X@min\noexpand\X@min=\the\X@min\noexpand\fi
 \noexpand\ifdim\noexpand\Y@min>\the\Y@min\noexpand\Y@min=\the\Y@min\noexpand\fi
 \noexpand\ifdim\noexpand\X@max<\the\X@max\noexpand\X@max=\the\X@max\noexpand\fi
 \noexpand\ifdim\noexpand\Y@max<\the\Y@max\noexpand\Y@max=\the\Y@max\noexpand\fi
 \savecrvparams@ \def\noexpand\pure@crv{\expandafter\noexpand\pure@crv}}%
 \tmp@ }
\xydef@\savecrvparams@{\crvpts@={\the\crvpts@}%
 \noexpand\def\noexpand\crvconnect@{\expandafter\noexpand\crvconnect@}}%
\xydef@\splineEdge{\rectangleEdge}
\xydef@\xy@@crvaddstack{%
 \ifx\next ~\xywarning@{there should be a poslist here, \string~@ ignored}%
 \DN@{\xy@crvmods@}%
 \else\DN@{\xy@@crvaddstack@}\fi \next@}
\xydef@\xy@@crvaddstack@{\smapxy@@\addtocrv@ \xyFN@\checkendcurve@}
\xydef@\checkcrvtilde@{%
 \addAT@\ifx\next\addAT@\DN@{\xy@@crvaddstack@}%
 \else\xywarning@{invalid token after ~, ignored}%
 \DN@##1{\xyFN@\checkendcurve@}%
 \fi \next@ }
\xydef@\crvconnect@@{%
 \def\Creset@@{\crvreset@}%
 \def\Cshavep@@{\crvshavep@}%
 \def\Cshavec@@{\crvshavec@}%
 \def\Cslidep@@{\crvslidep@}%
 \def\Cslidec@@{\crvslidec@}%
 \def\Calong@@{\crvalong@}%
 \def\Cintercept@@{\crvintercept@}%
 \def\Cbreak@@{\crvbreak@}%
 \def\Clast@@{\crvlast@}%
}
\xydef@\straitconnect@{\crvconnect@@ 
 \let\crvreset@=\straitreset@
 \let\crvshavep@=\straitshavep@
 \let\crvshavec@=\straitshavec@
 \let\crvslidep@=\straitslidep@
 \let\crvslidec@=\straitslidec@
 \let\crvalong@=\straitalong@
 \let\crvintercept@=\straitintercept@
 \let\crvbreak@=\straitbreak@
 \let\crvlast@=\straitlast@
}
\xydef@\straitreset@{\the\crvpts@ 
 \edef\xycrvptsnum@{\csname ptsnum@\endcsname}%
 \def\segmentnum@{0}}
\xydef@\straitslidep@{\setupDirection@ii \noCslidep@@ }
\xydef@\straitslidec@{\setupDirection@ii \noCslidec@@ }
\xydef@\straitshavep@{%
 \expandafter\ifnum\xycrvptsnum@>\z@
 \def\segmentnum@{0}%
 \csname cv@1\endcsname 
 \resetDirection@ \setupDirection@ii 
 \fi \noCshavep@@ }
\xydef@\straitshavec@{%
 \expandafter\ifnum\xycrvptsnum@>\z@
 \expandafter\count@@\xycrvptsnum@\relax 
 \bgroup \csname cv@\number\count@@\endcsname 
 \edef\tmp@{\egroup \X@p=\the\X@c \Y@p=\the\Y@c}\tmp@ 
 \edef\segmentnum@{\xycrvptsnum@}%
 \resetDirection@ \setupDirection@ii 
 \fi \noCshavec@@ }
\xydef@\straitalong@#1{%
 \ifdim#1\p@<\z@ 
 \xywarning@{parameter value #1 is negative, using 0}%
 \cfromp@ \def\PLACEf@{{0}}%
 \else 
 \dimen@=#1\p@ \count@=\dimen@ \divide\count@\p@ 
 \expandafter\count@@\xycrvptsnum@\relax \advance\count@@\@ne
 \advance\dimen@\segmentnum@\p@ 
 \advance\count@\segmentnum@\relax 
 \def\segmentnum@{0}%
 \ifnum\count@@<\count@
 \xywarning@{parameter value #1 too large, using \the\count@@}%
 \count@=\count@@ \advance\count@\m@ne \edef\PLACEf@{{1}}%
 \else
 \advance\dimen@-\count@\p@ 
 \ifdim\zz@\dimen@\ifnum\count@>\z@
 \advance\count@\m@ne \advance\dimen@\p@ \fi\fi
 \edef\PLACEf@{{\expandafter\removePT@\the\dimen@}}%
 \fi
 \ifnum\count@=\z@\else \bgroup
 \csname cv@\number\count@\endcsname 
 \edef\tmp@{\egroup \X@p=\the\X@c \Y@p=\the\Y@c}\tmp@
 \fi
 \advance\count@\@ne
 \ifnum\count@<\count@@
\splinetrace@{find place \the\dimen@\space along straight segment 
 \the\count@}%
 \csname cv@\number\count@\endcsname
 \fi
 \d@X=\X@c \advance\d@X-\X@p \d@Y=\Y@c \advance\d@Y-\Y@p 
 \fi \expandafter\noCalong@@\PLACEf@ \czeroEdge@ }
\xydef@\straitintercept@{\noCintercept@@}
\xydef@\straitbreak@{\straightCbreak@@}
\xydef@\straitlast@{\straightClast@@}
\xydef@\splineconnect@{%
 \let\crvreset@=\splinereset@
 \let\crvshavep@=\splineshavep@
 \let\crvshavec@=\splineshavec@
 \let\crvslidep@=\splineslidep@
 \let\crvslidec@=\splineslidec@
 \let\crvalong@=\splinealong@
 \let\crvintercept@=\splineintercept@
 \let\crvbreak@=\splinebreak@
 \let\crvlast@=\splinelast@
}
\xydef@\splinereset@{\the\crvpts@ 
 \edef\xycrvptsnum@{\csname ptsnum@\endcsname}%
 \edef\xysplineparams@{%
 \expandafter\noexpand\csname params@\endcsname}%
 \edef\xysplineedges@{%
 \expandafter\noexpand\csname edges@\endcsname}%
 \def\segmentnum@{1}\def\splinecorrect@p{0}\def\splinecorrect@c{0}%
 \splinelength@=\z@ \def\splineplace@f{.5}%
}
\xydef@\splineshavep@{\begingroup 
 \edef\xysplineedges@{%
 \expandafter\noexpand\csname edges@\endcsname}%
 \expandafter\expandafter\expandafter\getsplineedges@safe\xysplineedges@ @@%
 \edef\tmp@{\noexpand\removePT@\the\dimen5}%
 \edef\tmp@{\endgroup 
 \noexpand\def\noexpand\splinecorrect@p{\tmp@}}\tmp@ 
 \setupDirection@ii }
\xydef@\splineshavec@{\begingroup 
 \edef\xysplineedges@{%
 \expandafter\noexpand\csname edges@\endcsname}%
 \expandafter\expandafter\expandafter\getsplineedges@safe\xysplineedges@ @@%
 \dimen@=-\dimen7\relax \advance\dimen@\p@
%% \getcrvsegsnum@ \advance\dimen@\count@\p@
 \edef\tmp@{\noexpand\removePT@\the\dimen@}%
 \edef\tmp@{\endgroup 
 \noexpand\def\noexpand\splinecorrect@c{\tmp@}}\tmp@ 
 \setupDirection@ii }
\xydef@\splineslidep@#1{\enter@{\pfromthep@}%
 \begingroup \splinealong@@{0}{#1}+\splineslidep@@@
 \setupDirection@ii \leave@ }%
\xydef@\splineslidep@@@{%
 \d@X=\dimen5 \d@Y=\dimen7 \edef\tmp@{\postfind@}\tmp@ \dimen@=\splineval@
 \expandafter\count@\xycrvptsnum@\relax
 \ifnum\count@>\tw@ \advance\count@\m@ne 
 \advance\dimen@\segmentnum@\p@ \advance\dimen@-\p@ 
 \fi 
 \edef\tmp@{\endgroup \endgroup
 \noexpand\def\noexpand\xysplineval@{\the\splineval@}%
 \noexpand\def\noexpand\splinecorrect@p{\expandafter\removePT@\the\dimen@}%
\splinetrace@{slide = \the\splinelength@}%
 \X@c=\dimen@i \Y@c=\dimen3
 \d@X=\the\d@X \d@Y=\the\d@Y
 \noexpand\def\noexpand\segmentnum@{\segmentnum@}}\tmp@ }
\xydef@\splineslidec@#1{\enter@{\pfromthep@}%
 \begingroup
 \expandafter\splinealong@@\PLACEf@{#1}+\splineslidec@@@
 \setupDirection@ii \leave@ }
\xydef@\splineslidec@@@{%
 \d@X=\dimen5 \d@Y=\dimen7 \edef\tmp@{\postfind@}\tmp@ \dimen@=\splineval@
 \expandafter\count@\xycrvptsnum@\relax
 \ifnum\count@>\tw@ \advance\count@\m@ne 
 \advance\dimen@\segmentnum@\p@ \advance\dimen@-\p@ 
 \dimen@=-\dimen@ \advance\dimen@\count@\p@
 \else \dimen@=-\dimen@ \advance\dimen@\p@ \fi
%% splinecorrect@c is probably wrong here!!
 \edef\tmp@{\endgroup \endgroup
 \noexpand\def\noexpand\xysplineval@{\the\splineval@}%
 \noexpand\def\noexpand\splinecorrect@c{\expandafter\removePT@\the\dimen@}%
\splinetrace@{slide = \the\splinelength@; correct@c=\noexpand\splinecorrect@c}%
 \X@c=\dimen@i \Y@c=\dimen3
 \d@X=\the\d@X \d@Y=\the\d@Y
 \noexpand\def\noexpand\segmentnum@{\segmentnum@}}\tmp@ }
\xydef@\checkslidemore@#1{%
 \dimen@ii=-#1\relax\ifdim\dimen@ii<\z@\multiply\dimen@ii\m@ne\fi
 \dimen@=-\splinelength@ \advance\dimen@\dimen@ii\relax 
 \ifdim\dimen@<\z@\dimen@ii=-\dimen@\else\dimen@ii=\dimen@\fi
 \ifdim\dimen@ii<.2\p@\DN@{\splineslidec@@ \leave@}%
 \else \splinetrace@{not found yet, \the\dimen@ii\space still to go}%
 \dimen@ii=#1\relax\ifdim\dimen@ii<\z@\multiply\dimen@\m@ne\fi
 \DN@{\expandafter\splineslidemore@\expandafter{\the\dimen@}}\fi 
 \next@}%
\xydef@\splineslidemore@#1{%
 \expandafter\count@\segmentnum@\relax
 \ifdim#1<\z@\advance\count@\m@ne\dimen@=\p@
 \else\advance\count@\@ne\dimen@=\z@\fi
 \ifnum\count@<\@ne
 \expandafter\splinesegment@\expandafter{\segmentnum@}%
 \DN@{\xywarning@{cannot slide beyond start of curve}%
 \spline@find{\z@}{\z@}{}\splineslidec@@ \leave@ }%
 \else \expandafter\count@@\xycrvptsnum@\relax\advance\count@@\m@ne
 \expandafter\ifnum\count@@<\count@\relax
 \expandafter\splinesegment@\expandafter{\segmentnum@}%
 \DN@{\xywarning@{cannot slide beyond end of curve}%
 \spline@find{\p@}{\z@}{}\splineslidec@@ \leave@ }%
 \else
 \edef\segmentnum@{\the\count@}%
 \expandafter\splinesegment@\expandafter{\segmentnum@}%
\splinetrace@{sliding onto segment \segmentnum@}%
 \expandafter\spline@find\expandafter{\the\dimen@}{#1}{}%
 \DN@{\checkslidemore@{#1}}%
 \fi\fi \next@ }
\xydef@\splineslidec@@{%
 \dimen@=\splineval@ \advance\dimen@\segmentnum@\p@\advance\dimen@-\p@ 
 \edef\tmp@{\endgroup 
 \noexpand\def\noexpand\xysplineval@{\the\dimen@}%
\splinetrace@{slide = \the\splinelength@}%
 \X@c=\the\dimen@i \Y@c=\the\dimen3 \d@X=\the\dimen5 \d@Y=\the\dimen7 \postfind@ 
 \noexpand\def\noexpand\segmentnum@{\segmentnum@}}\tmp@
 \setupDirection@ii}
\xydef@\splinealong@#1{\def\postfind@{}\splinealong@@{#1}\z@+%
 \splineslidec@@ 
 \dimen@=\xysplineval@\relax 
 \count@=\xycrvptsnum@\relax \ifnum\count@>\@ne \advance\count@\m@ne\fi
 \ifnum\count@>\@ne \dimen@nth\count@\dimen@
 \fi \edef\bthisPLACE@{\expandafter\removePT@\the\dimen@}%
\splinetrace@{bthisPLACE@=\bthisPLACE@}}%
\xydef@\splinealong@@#1#2#3{%
 \edef\tmp@{#1}\relax \dimen@ii\tmp@\p@ 
%% \getcrvsegsnum@
%% \dimen@=-\count@\p@ 
 \dimen@=-\p@
 \expandafter\advance\expandafter\dimen@\splinecorrect@p\p@
 \expandafter\advance\expandafter\dimen@\splinecorrect@c\p@
 \edef\tmp@{#1}\relax \dimen@=-\tmp@\dimen@ \relax
 \expandafter\advance\expandafter\dimen@\splinecorrect@p\p@
 \getcrvsegsnum@ \multiply \dimen@ by\count@\relax
\splinetrace@{actual:\the\dimen@; f:\the\dimen@ii; p:\splinecorrect@p, c:\splinecorrect@c}%
 \count@=\dimen@ \divide\count@\p@ \DN@{\relax}%
 \def\tmp@{\relax}\ifx\next@\tmp@
 \expandafter\ifnum\xycrvptsnum@<\count@
 \xywarning@{parameter value #1 too large}%
 \DNii@{\relax}\DN@{\begingroup}%
 \else
 \edef\xysplineval@{\the\dimen@}%
 \advance\dimen@-\count@\p@ 
 \ifdim\dimen@=\z@ 
\splinetrace@{find knot point \the\count@}%
 \ifnum\count@=\z@ \count@=\@ne \else \dimen@=\p@ \fi
 \else \advance\count@\@ne
\splinetrace@{find point \the\dimen@\space on spline segment \the\count@}%
 \fi 
 \edef\segmentnum@{\the\count@}%
 \edef\next@{\begingroup\noexpand\splinesegment@{\the\count@}}%
 \edef\nextii@{%
 \noexpand\spline@find{\the\dimen@}{#2}{}\noexpand\checksplinefind@{#2}}%
 \ifx>#3\relax 
 \edef\nextii@{%
 \noexpand\spline@find{\the\dimen@}{#2}#3\noexpand\checksplinefind@{#2}}%
 \else\ifx-#3\relax \ifdim\dimen@>\z@\relax \ifdim\dimen@<\p@
 \dimen@=-\dimen@ \advance\dimen@\p@
 \edef\nextii@{\noexpand\splinereverse@ 
 \noexpand\spline@find{\the\dimen@}{#2}{}\noexpand\checksplinefind@{#2}}%
 \fi\fi
 \else\ifx<#3\relax \ifdim\dimen@>\z@\relax \ifdim\dimen@<\p@
 \dimen@=-\dimen@ \advance\dimen@\p@
 \edef\nextii@{\noexpand\splinereverse@ 
 \noexpand\spline@find{\the\dimen@}{#2}#3\noexpand\checksplinefind@{#2}}%
 \fi\fi
 \fi\fi\fi
 \fi\fi \expandafter\next@\nextii@ }
\xydef@\checksplinefind@#1{%
 \dimen@ii=#1\relax \dimen@=\splinelength@
 \ifdim\dimen@ii=\z@\DN@{}%
 \else
 \ifdim\dimen@ii<\z@\advance\dimen@\dimen@ii
 \else\advance\dimen@-\dimen@ii\fi
 \ifdim\dimen@<\z@\multiply\dimen@\m@ne\fi
 \ifdim\dimen@<.2\p@\DN@{}%
 \else
 \count@=\segmentnum@\relax 
 \ifdim\dimen@ii<\z@\advance\dimen@ii\splinelength@
 \ifnum\count@>\@ne\advance\count@\m@ne
 \edef\next@{\noexpand\splinesegment@{\the\count@}%
 \noexpand\spline@find\p@{\the\dimen@ii}{}%
 \noexpand\checksplinefind@{\the\dimen@ii}}%
 \else
 \xywarning@{cannot slide \the\dimen@ii\space before start}%
 \DN@{\splinesegment@\@ne \spline@find\z@\z@{}}\fi
 \else\advance\dimen@ii-\splinelength@
 \count@@=\numcontrolpts 
 \ifnum\count@<\count@@ \advance\count@\@ne
 \edef\next@{\noexpand\splinesegment@{\the\count@}%
 \noexpand\spline@find\z@{\the\dimen@ii}{}%
 \noexpand\checksplinefind@{\the\dimen@ii}}%
 \else
 \xywarning@{cannot slide \the\dimen@ii\space beyond end}%
 \DN@{\splinesegment@{\the\count@@}\spline@find\p@\z@{}}\fi
 \fi
 \fi\fi \next@ }
\xydef@\resetbreaks@{%
 \let\bstartPLACE@=\relax \let\bthisPLACE@=\empty
 \let\bendPLACE@=\relax \let\bprevPLACE@=\relax}
\xydef@\invisbreaks@{\resetbreaks@ \let\bstartPLACE@=\empty}
\xydef@\crvresetbreaks@{\resetbreaks@ \let\bstartPLACE@=\relax }
\xydef@\initbreaks@{\xy@@{\ifx\bstartPLACE@\relax
 \def\bstartPLACE@{0}\def\bendPLACE@{1}\else
 \ifx\bstartPLACE@\empty\def\bstartPLACE@{0}\def\bendPLACE@{1}%
 \fi\fi}}
\xydef@\lastbreaks@{\ifx\bprevPLACE@\relax \def\bstartPLACE@{0}%
 \else \expandafter \bprevPLACE@ \fi 
 \let\bprevPLACE@\relax \let\bendPLACE@\relax}
\xylet@\bstartPLACE@\relax
\xylet@\bendPLACE@\relax
\xylet@\bprevPLACE@\relax
\xydef@\bthisPLACE@{1}
\xydef@\splinebreak@{%
\splinetrace@{***new break*** this:\bthisPLACE@ }%
 \ifx\bthisPLACE@\empty\def\bendPLACE@{1}%
 \else\edef\bendPLACE@{\bthisPLACE@}\let\bthisPLACE@\empty\fi
 \ifx\bprevPLACE@\relax\def\bstartPLACE@{0}\else\expandafter\bprevPLACE@\fi
 \edef\bprevPLACE@{\def\noexpand\bstartPLACE@{\bendPLACE@}\pfromthec@}%
\splinetrace@{splineBREAK: \bstartPLACE@ <> \bendPLACE@}%
 \edef\cv@brend{\cfromthec@}%
 \edef\cv@brstart{\cfromthep@}%
 \expandafter\connect\expandafter\crvs\crvSTYLE@@{}%
 \let\cv@brend=\relax
 \let\cv@brstart=\relax
\splinetrace@{**break done**}%
} 
\xydef@\splinelast@{\splinereset@ \lastbreaks@
\splinetrace@{splineLAST}%
 \edef\cv@brend{\cfromthec@}%
 \edef\cv@brstart{\cfromthep@}%
 \expandafter\connect\expandafter\crvs\crvSTYLE@@{}%
 \let\cv@brend=\relax
 \let\cv@brstart=\relax
\splinetrace@{**last done**}%
 \resetbreaks@}
\xydef@\splineNointercept@{\enter@{\pfromthep@}%
 \begingroup \splinereset@ \csname cv@0\endcsname \swap@ 
 \count@=\ptsnum@ \advance\count@\@ne \csname cv@\the\count@\endcsname 
 \edef\tmp@{\endgroup \X@origin=\the\X@p \Y@origin=\the\Y@p
 \R@c=\the\d@X \U@c=\the\d@Y}\tmp@
 \loop@
 \dimen@=\ifdim\R@c<\z@-\fi\R@c
 \advance\dimen@ \ifdim\U@c<\z@-\fi\U@c
 \ifdim\dimen@>10\p@
 \advance\R@c \ifdim\R@c<\z@-\fi 16sp \divide\R@c\KK@ 
 \advance\U@c \ifdim\U@c<\z@-\fi 16sp \divide\U@c\KK@
 \repeat@
 \intersect@ \leave@}
\xydef@\splineintercept@{\Hidden@true\Invisible@true\splineintercept@i}
\xydef@\splineintercept@i{\enter@{\pfromthep@}\begingroup 
 \R@p=\X@c \L@p=\X@p \d@X=\R@p \advance\d@X-\L@p
 \D@p=\Y@c \U@p=\Y@p \d@Y=\D@p \advance\d@Y-\U@p
 \dimen@nth\KK@\d@X \edef\sd@X{\expandafter\removePT@\the\d@X}%
 \dimen@nth\KK@\d@Y \edef\sd@Y{\expandafter\removePT@\the\d@Y}%
 \dimen@=\sd@Y\L@p \advance\dimen@-\sd@X\U@p 
 \edef\sideOffset@{\the\dimen@}\def\closestseg@{1}%
 \let\crvconnect@@=\relax \crvconnect@
 \let\spline@end=\splinef@end
 \def\spline@start{\bgroup \def\prevnext@{+-}%
 \def\splinerec@{\let\splinerec@=\splineIrec@ \splineinterceptTest@}%
 \def\splinedecast@{\let\splinedecast@=\splinedecast@@
 \def\splineadvance@{\splineIadvance@@}\splinedecast@@}%
 \def\splineadvance@{\intercepthull@}%
 \global\let\splinepoint=\splineIpt@@
 \global\let\splinegoal@=\splinef@pt
 \global\let\splinefinish@=\splinefinish@@}%
 \begingroup \splineIsegment@ 
 \splinesetparams@ \splined@@ \def\postfind@{}\splineIplace@
 \setupDirection@ii \leave@ }
\xydef@\splineIplace@{%
 \d@X=\dimen5 \d@Y=\dimen7 \dimen@=\splineval@
 \expandafter\count@\xycrvptsnum@\relax
 \ifnum\count@>\tw@ \advance\count@\m@ne
 \advance\dimen@\segmentnum@\p@ \advance\dimen@-\p@ 
 \dimen@nth\count@\dimen@
 \fi \edef\tmp@{\endgroup \endgroup
 \def\noexpand\PLACEf@{{\expandafter\removePT@\the\dimen@}}%
 \X@c=\dimen@i \Y@c=\dimen3
 \d@X=\the\d@X \d@Y=\the\d@Y }\tmp@
\splinetrace@{PLACE = \PLACEf@:(\the\X@c, \the\Y@c)}%
 \expandafter\edef\expandafter\bthisPLACE@\PLACEf@
 }
\xydef@\splineIrec@{\splineinterceptTest@ }
\xydef@\squineIpt@{\edef\tmp@{\endgroup
 \def\noexpand\prevnext@{\next}\begingroup}\tmp@ }
\xydef@\squineIadvance@{\edef\tmp@{\endgroup
 \def\noexpand\prevnext@{\next}\def\noexpand\howclose@{\howclose@}}%
 \tmp@ \splineadvance@@\begingroup}
\xydef@\cubicIpt@{\edef\tmp@{\endgroup
 \def\noexpand\prevnext@{\next}\begingroup}\tmp@ }
\xydef@\cubicIadvance@{\edef\tmp@{\egroup
 \def\noexpand\prevnext@{\next}\def\noexpand\howclose@{\howclose@}}%
 \tmp@ \splineadvance@@\bgroup}
\xydef@\splineIsegment@{\DN@{\splinesegment@\@ne}%
 \ifx\splinesegment@\squinesegment@\else
 \ifx\splinesegment@\cubicsegment@\else\DN@{\findIsegment@}%
 \fi\fi\next@}
\xydef@\findIsegment@{\expandafter\count@\xycrvptsnum@ \count@@\z@ 
 \loop@ \advance\count@@\@ne \bgroup 
 \expandafter\splinesegment@\expandafter{\the\count@@}%
 \xysidesofinterval@
 \findIsegment@i \repeat@ 
 \expandafter\dimen@\prevhowclose@ \relax
 \ifdim\dimen@=\z@ \edef\closestseg@{\the\count@@}\fi
 \expandafter\splinesegment@\expandafter{\closestseg@}}
\xydef@\findIsegment@i{%
 \expandafter\ifx\next \expandafter\findIsegment@ii
 \else\expandafter\findIsegment@x\fi \next@ }
\xydef@\findIsegment@ii{\expandafter\count@\xycrvptsnum@ \relax
 \advance\count@\m@ne \ifnum\count@>\segmentnum@\relax
 \expandafter\findIsegment@y\else\expandafter\findIsegment@x\fi}
\xydef@\findIsegment@x{%
 \edef\next@{\egroup\def\noexpand\next{\next}%
 \def\noexpand\prevhowclose@{\prevhowclose@}%
 \def\noexpand\closestseg@{\closestseg@}\noexpand\iffalse}}
\xydef@\findIsegment@y{%
 \edef\next@{\egroup\def\noexpand\next{\next}%
 \def\noexpand\prevhowclose@{\prevhowclose@}%
 \def\noexpand\closestseg@{\closestseg@}\noexpand\iftrue}}
\xydef@\xysidesofinterval@{\bgroup 
 \L@p=\sd@X\Y@p \advance\L@p-\sd@Y\X@p \advance\L@p\sideOffset@
 \U@p=\sd@X\Y@c \advance\U@p-\sd@Y\X@c \advance\U@p\sideOffset@
 \def\this@{}\ifdim\L@p>\almostz@ \ifdim\U@p>\almostz@ \def\next{++}\else
 \ifdim\U@p<-\almostz@ \def\next{+-}\else\def\next{+0}\def\this@{-}\fi\fi
 \else\ifdim\L@p<-\almostz@ \ifdim\U@p>\almostz@ \def\next{-+}\else
 \ifdim\U@p<-\almostz@ \def\next{--}\else\def\next{-0}\def\this@{+}\fi\fi
 \else \ifdim\U@p>\almostz@ \def\next{0+}\else
 \ifdim\U@p<-\almostz@ \def\next{0-}\else\def\next{00}\def\this@{+}\fi\fi
 \fi\fi
 \ifx\this@\empty
 \L@p=\ifdim\L@p<\z@-\fi\L@p \U@p=\ifdim\U@p<\z@-\fi\U@p 
 \ifdim\L@p<\U@p \edef\howclose@{\the\L@p}\def\this@{-}%
 \else \edef\howclose@{\the\U@p}\def\this@{+}\fi
 \else\def\howclose@{0.0pt}\fi 
\splinetrace@{\next:\this@:\howclose@;\the\splineval@:%
 (\the\X@p,\the\Y@p);(\the\X@c,\the\Y@c)}%
 \ifdim\howclose@<\prevhowclose@\relax 
 \edef\tmp@{\egroup\def\noexpand\this@{\this@}\def\noexpand\next{\next}%
 \def\noexpand\howclose@{\howclose@}\def\noexpand\prevhowclose@{\howclose@}%
 \def\noexpand\closestseg@{\segmentnum@}}%
\splinetrace@{closest yet: \howclose@, in segment \segmentnum@}%
 \else
 \edef\tmp@{\egroup\def\noexpand\this@{\this@}\def\noexpand\next{\next}%
 \def\noexpand\howclose@{\howclose@}}%
 \fi \tmp@ }
\xydef@\splineinterceptTest@{%
 \xysidesofinterval@ \DN@{\splineadvance@}%
 \DNii@{0.0pt}\ifx\howclose@\nextii@ \DN@{\splineclosest@}%
 \else\expandafter\ifx\next \expandafter\ifx\prevnext@
 \ifx\next\prevnext@\else\DN@{\X@c=\X@p \Y@c=\Y@p 
 \splinefinishf@}\fi\fi
 \else \DN@{\splinedecast@}\fi\fi 
 {\splinefar@false \splinenear@\X@p\X@c\Y@p\Y@c 
 \ifsplinefar@ \aftergroup\next@
 \else\aftergroup\splineclosest@
\splinetrace@{too close: (\the\X@p,\the\Y@p)::(\the\X@c,\the\Y@c)}%
 \fi}}
\xydef@\splineclosest@{%
 \expandafter\ifx\this@-\relax
 \X@c=\X@p \Y@c=\Y@p \global\advance\splineval@-\splinedepth@
 \fi \splinefinishf@ }%
\xydef@\squinetestcvxhull@{\begingroup
\splinetrace@{hull: closest in segment \closestseg@}%
 \expandafter\splinesegment@\ifx\undefined\closestseg@\@ne\else\closestseg@\fi
 \X@c=\L@c \Y@c=\U@c \xysidesofinterval@ 
 \expandafter\ifx\next \expandafter\splineoutsidehull@@
 \else \expandafter\splineinsidehull@\fi}
\xydef@\cubictestcvxhull@{\begingroup
 \expandafter\splinesegment@\ifx\undefined\closestseg@\@ne\else\closestseg@\fi
 \X@c=\L@c \Y@c=\U@c \xysidesofinterval@ 
 \expandafter\ifx\next \expandafter\cubictestcvxhull@i
 \else \expandafter\splineinsidehull@\fi}
\xydef@\cubictestcvxhull@i{%
 \X@c=\R@c \Y@c=\D@c \xysidesofinterval@ 
 \expandafter\ifx\next \expandafter\splineoutsidehull@@
 \else \expandafter\splineinsidehull@\fi}
\xydef@\xysidesofhull@{\bgroup 
 \L@p=\sd@X\Y@p \advance\L@p-\sd@Y\X@p \advance\L@p\sideOffset@
 \U@p=\sd@X\Y@c \advance\U@p-\sd@Y\X@c \advance\U@p\sideOffset@
 \L@p=\ifdim\L@p<\z@-\fi\L@p \U@p=\ifdim\U@p<\z@-\fi\U@p 
 \ifdim\L@p<\U@p \edef\howclose@{\the\L@p}\def\this@{-}%
 \else \edef\howclose@{\the\U@p}\def\this@{+}\fi
 \ifx\splinedecast@\squinedecast@ \D@c=\U@c \R@c=\L@c \fi
 \L@p=\sd@X\U@c \advance\L@p-\sd@Y\L@c \advance\L@p\sideOffset@
 \L@p=\ifdim\L@p<\z@-\fi\L@p 
 \expandafter\if\this@-%
 \ifdim\L@p<\prevhowclose@ \def\next{-+}\else \def\next{--}\fi
 \else
 \ifdim\L@p<\howclose@ \def\next{-+}\else 
 \U@p=\sd@X\D@c \advance\U@p-\sd@Y\R@c \advance\U@p\sideOffset@
 \U@p=\ifdim\U@p<\z@-\fi\U@p
 \ifdim\U@p<\howclose@ \def\next{+-}\else \def\next{++}\fi
 \fi\fi
 \edef\tmp@{\egroup\def\noexpand\this@{\this@}\def\noexpand\next{\next}%
 \def\noexpand\howclose@{\howclose@}}\tmp@ }
\def\PLACE@intercept@#1{%
 \xy@@{\enter@{\pfromthep@\basefromthebase@}\begingroup}%
 \xy@@ix@{#1}\xy@@{\plainxy@ \def\Creset@@{}%
 \expandafter\POS\the\toks9\relax
 \DNii@{\crvreset@}\ifx\nextii@\Creset@@ \edef\next@{\endgroup
 \def\noexpand\xyinterceptpts@{\the\crvpts@}%
 \X@c =\the\X@c \Y@c=\the\Y@c \X@p=\the\X@p \Y@p=\the\Y@p
 \noexpand\CCintercept@@ }%
 \else \edef\next@{\endgroup
 \X@c =\the\X@c \Y@c=\the\Y@c \X@p=\the\X@p \Y@p=\the\Y@p
 \noexpand\Cintercept@@ }%
 \fi \next@ \leave@}%
 \PLACE@@}
\xydef@\CCintercept@@{\splineSintercept@}
\xydef@\splineSintercept@{\enter@{\pfromthep@}\begingroup 
 \Creset@@ \edef\connect@pts{\cfromthec@ \pfromthep@}%
 \xyinterceptpts@ \splinereset@ \connect@pts \splineintercept@
 \edef\next@{\endgroup \cfromthec@ \DirectionfromtheDirection@ }%
 \next@ \let\xyinterceptpts@=\empty \leave@}
\xydef@\nointerceptwarning@{\let\nointerceptwarning@=\relax
 \xywarning@{perhaps no curve intersection, or many. }}
\xydef@\intercepthull@{\nointerceptwarning@ 
 \expandafter\def\expandafter\prevnext@\expandafter{\next}%
 \splinetestcvxhull@}
\xydef@\splinetestcvxhull@{\begingroup 
 \X@c=\L@c \Y@c=\U@c \splinetrace@{hull:}\xysidesofinterval@ 
 \expandafter\ifx\next \expandafter\splineoutsidehull@@
 \else \expandafter\splineinsidehull@\fi}
\xydef@\splineinsidehull@{\edef\tmp@{\endgroup 
 \def\noexpand\howcvxclose@{\howclose@}%
 \noexpand\interceptinsidehull@}\tmp@ }
\xydef@\interceptinsidehull@{\edef\prevhowclose@{\howclose@}%
 \splinedecast@@ }
{\xdef\next{\the\maxdimen}}
\xylet@\prevhowclose@=\next
\xydef@\splineoutsidehull@{\edef\tmp@{\endgroup
 \def\noexpand\howcvxclose@{\howclose@}%
 \noexpand\interceptoutsidehull@}\tmp@}
\xylet@\splineoutsidehull@@=\splineoutsidehull@
\xydef@\interceptoutsidehull@{\dimen@=\howcvxclose@ \relax
\splinetrace@{OUTSIDE HULL: \the\dimen@ : (\howclose@)(\prevhowclose@)}%
 \let\splinedecast@=\splinedecast@@
 \let\splinerec@\splineHnear@test
 \let\splineadvance@\splineIadvance@@
 \splinedecast@@ }
\xydef@\splineHnear@test{%
 \xysidesofhull@ \DN@{\splinedecast@}%
 \ifdim\howclose@<\prevhowclose@\edef\howclose@{\prevhowclose@}\fi
 \expandafter\if\this@-%
 \expandafter\ifx\next\DN@{\splineclosest@}\fi
 \else
 \expandafter\ifx\next\DN@{\splineadvance@}\fi
 \fi
 {\splinefar@false \splinenear@\X@p\X@c\Y@p\Y@c 
 \ifsplinefar@ \aftergroup\next@
 \else\aftergroup\splineclosest@
\splinetrace@{too close: (\the\X@p,\the\Y@p)::(\the\X@c,\the\Y@c)}%
 \fi}}
\xydef@\cubicoutsidehull@{\edef\tmp@{\endgroup
 \def\noexpand\howcvxclose@{\howclose@}}\tmp@
 \edef\prevhowcvxclose@{\howcvxclose@}\begingroup 
 \X@p=\R@c \Y@p=\D@c \splinetrace@{hullii:}\xysidesofinterval@ 
 \expandafter\ifx\next \expandafter\cubicoutsidehull@i
 \else \expandafter\cubicinsidehull@\fi} 
\xydef@\cubicinsidehull@{\edef\tmp@{\endgroup
 \def\noexpand\howclose@{\howclose@}}\tmp@
 \cubicoutsidehull@ii }
\xydef@\cubicoutsidehull@i{\edef\tmp@{\endgroup
 \def\noexpand\howcvxclose@{\howclose@}}\tmp@
 \dimen@=\prevhowcvxclose@\relax 
 \ifdim\dimen@<\howcvxclose@ \relax
 \edef\howcvxclose@{\the\dimen@}\expandafter\interceptoutsidehull@
 \else \expandafter\cubicoutsidehull@ii\fi }
\xydef@\cubicoutsidehull@ii{%
 \def\splineadvance@{\splineadvance@@}%
 \def\splinepoint\endgroup{\endgroup
 \global\let\splinepoint=\relax
 \def\splineadvance@{\intercepthull@}}%
 \splinedecast@@ }%
\xydef@\splineHadvance@{\futurelet\next@\splineHadvance@i}
\xydef@\splineHadvance@i{\ifx\next@\endgroup
 \expandafter\splineHadvance@x\else\expandafter\splineclosest@\fi}
\xydef@\splineHadvance@x{\edef\tmp@{\endgroup
 \def\noexpand\prevhowclose@{\prevhowclose@}%
 \def\noexpand\prevnext@{\next}\def\noexpand\howcvxclose@{\howclose@}}%
 \tmp@ \dimen@=\prevhowclose@ \relax
 \ifdim\dimen@<\howclose@ \relax \DN@{\splineclosest@\begingroup}%
 \else\ifdim\howcvxclose@=\dimen@\DN@{\splineclosest@\begingroup}%
 \else\DN@{\splineadvance@@\begingroup}\fi\fi \next@ }
\xydef@\xyclearcrv@{\cv@end\cv@restore\loop@
 \expandafter\let\csname cv@\number\crv@cnt@\endcsname\relax
 \ifnum\crv@cnt@>0\advance\crv@cnt@\m@ne\repeat@
 \let\cv@start=\relax \let\cv@end=\relax \let\cv@restore=\relax \POS}
\xylet@\clearcurve=\xyclearcrv@
\xylet@\numcontrolpts=\xynumctrlpts@
\xydef@\xycontrolpt@#1{{%
 \ifnum#1<\z@\aftergroup\cv@restore\aftergroup\cv@start
 \else
 \expandafter\count@\xycrvptsnum@\relax \advance\count@\@ne
 \ifnum#1>\count@ \ifx\cv@end\relax 
 \expandafter\aftergroup\csname cv@\number#1\endcsname
 \else\aftergroup\cv@end\fi
 \else 
 \expandafter\ifx\csname cv@\number#1\endcsname\relax
 \ifnum#1=\z@\aftergroup\cv@start\else\aftergroup\cv@end\fi
 \else\expandafter\aftergroup\csname cv@\number#1\endcsname
 \fi\fi\fi}}%
\xylet@\xycontrolpt=\xycontrolpt@
\xydef@\startxycurve@@{\crv@cnt@=\z@
 \edef\cv@start{\cfromthep@}%
 \ifdim\zz@\R@c \ifdim\zz@\L@c \ifdim\zz@\D@c \ifdim\zz@\U@c
 \Edge@c={\zeroEdge}\fi\fi\fi\fi
 \edef\cv@end{\cfromthec@}%
 \edef\cv@restore{\pfromthep@\basefromthebase@}}
\xylet@\startxycurve@=\startxycurve@@
\xylet@\cv@start=\relax
\xylet@\cv@end=\relax
\xylet@\cv@restore=\relax
\xydef@\readxycurve@{\startxycurve@\xycrvmods@}
\xylet@\readxycurve=\readxycurve@
\xydef@\addtocrv@{\advance\crv@cnt@\@ne 
 \edef\tmp@{%
 \expandafter\noexpand\csname cv@\number\crv@cnt@\endcsname}%
 \expandafter\edef\tmp@{\cfromthec@}%
 \edef\tmp@{\noexpand\addtocrvpts@{\noexpand\def
 \expandafter\noexpand\tmp@{\X@c=\the\X@c \Y@c=\the\Y@c }}}\tmp@
 \edef\xycrvptsnum@{\the\crv@cnt@}%
}
\xydef@\xycrvdrop@{ {\zerodot}}
\xydef@\xycrvconn@{}
\xydef@\xyc@trlpts@{\def\xycrvdrop@{ \dir{x}}\def\xycrvconn@{}%
 \afterCURVE{\savecrvobjects@\xyctrlpts@}\readxycurve@}
\xydef@\xyc@trlpts@@{%
 \afterCURVE{\savecrvobjects@\def\xycrvdrop@{ \dir{x}}%
 \def\xycrvconn@{}\xyctrlpts@}\readxycurve@}
\xydef@\xyc@vxhull@{\def\xycrvdrop@{ {}}%
 \edef\xycrvconn@{ \noexpand\dir{\addDASH@{}}}%
 \afterCURVE{\savecrvobjects@\xycvxhull@}\readxycurve@}
\xydef@\xyc@vxhull@@{%
 \afterCURVE{\savecrvobjects@\def\xycrvdrop@{ {}}%
 \edef\xycrvconn@{ \noexpand\dir{\addDASH@{}}}\xycvxhull@}\readxycurve@}
\xylet@\controlpts=\xyc@trlpts@
\xylet@\convexhull=\xyc@vxhull@
\xydef@\savecrvobjects@{\bgroup 
 \expandafter\toks@\expandafter{\xycrvdrop@}%
 \expandafter\toks@ii\expandafter{\xycrvconn@}%
 \edef\tmp@{\egroup\noexpand\def\noexpand\resetcrvobjects@{%
 \noexpand\def\noexpand\xycrvdrop@{\the\toks@}%
 \noexpand\def\noexpand\xycrvconn@{\the\toks@ii}%
 }}\tmp@}
\xydef@\afterCURVE#1{\def\afterCURVE@{#1}}
\xydef@\endxycurve@{\cv@end\savectrlptsnum@
 \expandafter\def\csname params@\endcsname{\the\crvpts@}%
 \cv@restore\afterCURVE@\POS}
\xylet@\endcurve=\endxycurve@
\xydef@\xyctrlpts@{\cv@end \cv@restore
 \def\crvconnect@{\straitconnect@}%
 \ifnum\crv@cnt@>\z@ 
 \count@@@=\@ne \DN@{\loop@\xycontrolpt@{\count@@@}\relax
 \expandafter\xycvxhulldrop@\xycrvdrop@
 \ifnum\crv@cnt@>\count@@@\advance\count@@@\@ne\repeat@ 
 \cv@end \cv@restore }%
 \else\DN@{\relax}\fi \next@ }
\xylet@\xyctrlpts=\xyctrlpts@
\xydef@\addtocrvpts@#1{\crvpts@=\expandafter{\the\crvpts@#1}}
\xydef@\savescope@{\crvpts@={}%
 \edef\tmp@{\expandafter\noexpand\csname cv@0\endcsname}%
 \edef\tmp@{\noexpand\addtocrvpts@{\noexpand\def
 \expandafter\noexpand\tmp@{\X@c=\the\X@p \Y@c=\the\Y@p}}}%
 \tmp@ }
\xydef@\savectrlptsnum@{%
 \advance\crv@cnt@\@ne \edef\tmp@{%
 \expandafter\noexpand\csname cv@\number\crv@cnt@\endcsname}%
 \edef\tmp@{\noexpand\addtocrvpts@{\noexpand\def
 \expandafter\noexpand\tmp@{\X@c=\the\X@c \Y@c=\the\Y@c}}}\tmp@
 \advance\crv@cnt@\m@ne 
 \edef\tmp@{\expandafter\noexpand\csname ptsnum@\endcsname}%
 \edef\tmp@{\noexpand\addtocrvpts@{%
 \noexpand\def\expandafter\noexpand\tmp@{\number\crv@cnt@}}}%
 \tmp@ }
\xydef@\xycvxhull@{\cv@end \cv@restore 
 \addtocrvpts@{\def\crvconnect@{\straitconnect@}}%
 \def\crvconnect@{\straitconnect@}%
 \ifnum\crv@cnt@>\z@ 
 \count@@@=\@ne\relax \DN@{\loop@\xycontrolpt@{\count@@@}\relax
 \expandafter\xycvxhulldrop@\xycrvdrop@
 {\expandafter\connect\xycrvconn@{}}\pfromc@
 \ifnum\crv@cnt@>\count@@@\relax \advance\count@@@\@ne\repeat@ 
 \cv@end }%
 \else
 \ifx\empty\xycrvconn@
 \edef\xycrvconn@{\noexpand!C\noexpand\dir{\addDASH@{}}}\fi
 \DN@{\relax}\fi \next@ 
 {{\expandafter\connect\xycrvconn@{}}}%
 \cv@end \cv@restore }
\xylet@\xycvxhull=\xycvxhull@
\xydef@\xycvxhulldrop@#1#{\drop@{#1}}
\xydef@\savespline@{%
\splinetrace@{savespline@:}%
 \edef\endspline@{\endgroup 
 \savesplineparams@ \savesplinerefs@
 \X@min=\the\X@min\relax \X@max=\the\X@max\relax
 \Y@min=\the\Y@min\relax \Y@max=\the\Y@max\relax
 \ifInvisible@\noexpand\Invisible@true
 \else\noexpand\Invisible@false\fi
 }\endspline@ 
 \edef\tmp@{\noexpand\addtocrvpts@{\savesplineparams@}}\tmp@
 \xycontrolpt@\z@ \cv@end }
\xydef@\savesplineparams@{%
 \noexpand\def\expandafter\noexpand\xysplineedges@{\xysplineedges@}}
\xydef@\savesplinerefs@{%
 \noexpand\def\noexpand\xysplineparams@{%
 \expandafter\noexpand\xysplineparams@}%
 \noexpand\def\noexpand\xysplineedges@{%
 \expandafter\noexpand\xysplineedges@}%
}
\xynew@{box}\splinebox@ 
\xynew@{dimen}\splineval@ 
\xynew@{dimen}\splinedepth@ 
\xynew@{dimen}\splinetol@ 
\xynew@{dimen}\splinelength@ 
\xynew@{if}\ifsplinefar@
\xynew@{if}\ifsplineplot@
\xydef@\splinetracing{\let\splinetrace@=\W@}
\xydef@\splineignore@#1{}
\xylet@\splinetrace@=\splineignore@
\xydef@\readsplineparams@{%
 \expandafter\expandafter\expandafter\getsplineparams@\xysplineparams@
 \expandafter\expandafter\expandafter\getsplineedges@safe\xysplineedges@ @@}
\xydef@\getsplineedges@safe#1@@{\DN@{#1}%
 \ifx\next@\empty \DN@{\getsplineedges@.0pt;0.0pt,0.0pt;0.0pt,}%
 \else \DN@{\getsplineedges@safe@#1@@}\fi \next@}
\xydef@\getsplineedges@safe@#1;#2,#3@@{\DN@{#3}%
\splinetrace@{getsplineedges@safe}%
 \ifx\next@\empty \DN@{\getsplineedges@#1;#2,0.0pt;0.0pt,}%
 \else \DN@{\getsplineedges@#1;#2,#3}\fi \next@}
\xydef@\getsplineedges@#1;#2,#3;#4,{%
 \global\dimen@i=#1\global\dimen5=#2\relax
 \dimen@=#3\multiply\dimen@\m@ne \advance\dimen@\splinelength@
 \global\dimen3=\dimen@
 \dimen@=#4\relax 
 \ifdim\dimen@>\p@ \xywarning@{edge out-of-range: \the\dimen@}%
 \count@=\dimen@ \divide\count@\p@
 \advance\dimen@-\count@\p@ \multiply\dimen@\m@ne
 \advance\dimen@ \count@\p@ \advance\dimen@\p@
\splinetrace@{\the\dimen@}%
 \else
 \multiply\dimen@\m@ne \advance\dimen@\p@
 \fi
 \global\dimen7=\dimen@ }
\xydef@\dimen@half{%
 \advance\dimen@ \ifdim\dimen@<\z@-\fi 1sp \divide\dimen@\tw@}
\xydef@\halve@dimen#1{\dimen@=#1\relax \dimen@half #1=\dimen@}
\xydef@\dimen@nth#1#2{\dimen@=#2\relax \dimen@ii=#1sp
 \advance\dimen@ \ifdim\dimen@<\z@-\fi.5\dimen@ii 
 \divide\dimen@ by#1\relax #2=\dimen@}
\xydef@\splinetolerance@#1{\dimen@=#1\relax
 \ifdim\dimen@>\z@ \splinetol@=\dimen@
 \else\splinetol@=.4\p@\fi}
\xylet@\splinedefaulttol@=\relax
\xydef@\splinetolerance#1{\splinetolerance@{#1}%
 \edef\splinedefaulttol@{\splinetol@=\the\splinetol@}}
\splinetolerance\z@
\xydef@\SloppyCurves{\splinetolerance{.8\p@}}
\xydef@\xylowtolerance@{\splinedefaulttol@
 \ifdim\splinetol@<\p@ \divide\splinetol@\tw@ \fi}
\xywarnifdefined\splinedrop@
\xydef@\setstdsplinedrop@{%
 \setbox\splinebox@=\hbox\bgroup
 \setboxz@h{\expandafter\object\xycrvdrop@{}}%
 \splinedefaulttol@ \dimen@=\wd\z@ \dimen@ii=\ht\z@ \advance\dimen@ii\dp\z@
 \ifdim\dimen@ii>\dimen@ \dimen@=\dimen@ii \fi \dimen@=1.4142\dimen@
 \ifdim\dimen@>\splinetol@ \splinetol@=\dimen@\else\dimen@=\splinetol@\fi
 \dimen@=.5\wd\z@ 
 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \kern-\dimen@ \Drop@@ \kern\dimen@
 \edef\tmp@{\egroup \splinetol@=\the\splinetol@
 \ifInvisible@\noexpand\Invisible@true
 \else\noexpand\Invisible@false\fi}\tmp@
 \edef\splinedefaulttol@{\splinetol@=\the\splinetol@}%
 \def\splinedrop@{\copy\splinebox@\splineextra@@}}
\xywarnifdefined\splineconn@
\xydef@\stdsplineconn@{{\setsplinedir@
 \setboxz@h\bgroup\expandafter\object\xycrvconn@{}%
 \edef\tmp@{\egroup\L@c=\the\L@c \R@c=\the\R@c \D@c=\the\D@c \U@c=\the\U@c
 \noexpand\def\noexpand\Drop@@}\expandafter\tmp@\expandafter{\Drop@@}%
 \setboxz@h{\kern-\L@c \boxz@}%
 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \Drop@@}}
\xydef@\setcrvobjects@{\setstdsplinedrop@ \def\splineconn@{\stdsplineconn@}}
\xylet@\splineextra@@=\relax
\xydef@\splinenear@#1#2#3#4{{\d@X=#1\advance\d@X-#2%
 \ifdim\d@X<\z@ \d@X=-\d@X\fi
 \ifdim\splinetol@<\d@X \aftergroup\splinefar@true
 \else \d@Y=#3\advance\d@Y-#4\ifdim\d@Y<\z@ \d@Y=-\d@Y\fi
 \ifdim\splinetol@<\d@Y\aftergroup\splinefar@true
 \else \xydist@\d@X\d@Y
 \ifdim\splinetol@<\dimen@ \aftergroup\splinefar@true
 \else 
 \ifdim\dimen@<.1\splinetol@\aftergroup\splinetooclose@\fi
 \fi\fi\fi}}
\xydef@\splineadvance@@{\global\advance\splineval@\splinedepth@}
\xydef@\splinetooclose@{\aftergroup\aftergroup\aftergroup\splinetooclose@@}
\xydef@\splinetooclose@@{\def\splineplotpt@{\relax}}
\xydef@\splinepoint@@{%
\splinetrace@{P@:(\the\X@c,\the\Y@c)::\the\splineval@;\the\splinedepth@}%
 {\splinetest@\ifsplineplot@\relax\else\aftergroup\splinecontinue\fi}}
\xydef@\splinepoint@{%
 {\splinetest@\ifsplineplot@\aftergroup\splinecontinue\fi}}
\xylet@\splinepoint=\splinepoint@
\xydef@\splinecontinue@{%
 \global\let\splinepoint=\splinepoint@@
 \global\let\splinecontinue=\splinecontinue@@}
\xydef@\splinecontinue@@{%
 \global\let\splinepoint=\splinepoint@
 \global\let\splinecontinue=\relax}
\xylet@\splinecontinue=\splinecontinue@
\xydef@\splineknotpoint@{{\X@p=\X@c \Y@p=\Y@c \cv@start 
 \the\Edge@c\@ne \ifInside@\else\aftergroup\splineknotpoint@@\fi}}%
\xydef@\splineknotpoint@@{{\X@p=\X@c \Y@p=\Y@c \cv@end 
 \the\Edge@c\@ne \ifInside@\else \aftergroup\splinepoint\fi}}%
\xylet@\firstsplinepoint@=\splineknotpoint@
\xylet@\lastsplinepoint@= \splineknotpoint@
\xydef@\splined@@@{%
\splinetrace@{finding end types}%
\splinetrace@{bstartPLACE@:\bstartPLACE@; bendPLACE@:\bendPLACE@}%
 \DN@{\splinescan@}\ifx\bstartPLACE@\empty
 \ifx\bendPLACE@\relax\def\bendPLACE@{1}\fi
 \else\ifx\bstartPLACE@\relax
 \else\ifx\bstartPLACE@\undefined
 \else 
 \DN@{\splinescanbreak@}\ifx\bendPLACE@\relax\def\bendPLACE@{1}\fi
 \DNii@{0}\ifx\bstartPLACE@\nextii@
 \DNii@{1}\ifx\bendPLACE@\nextii@\DN@{}%
 \fi\fi
 \fi\fi\fi \next@ }%
\xydef@\splineStarttest@{{\X@p=\X@c \Y@p=\Y@c \cv@start \the\Edge@c\@ne 
 \ifInside@\aftergroup\splineplot@false\else\aftergroup\splineplot@true\fi}}%
\xydef@\splineEndtest@{{\X@p=\X@c \Y@p=\Y@c \cv@end \the\Edge@c\@ne 
 \ifInside@\aftergroup\splineplot@false\else\aftergroup\splineplot@true\fi}}%
\xydef@\splineBreakStarttest@{{\X@p=\X@c \Y@p=\Y@c \cv@brstart \the\Edge@c\@ne 
 \ifInside@\aftergroup\splineplot@false\else\aftergroup\splineplot@true\fi}}%
\xydef@\splineBreakEndtest@{{\X@p=\X@c \Y@p=\Y@c \cv@brend \the\Edge@c\@ne 
 \ifInside@\aftergroup\splineplot@false\else\aftergroup\splineplot@true\fi}}%
\xylet@\splineStarttest=\splineStarttest@
\xylet@\splineEndtest=\splineEndtest@
\xydef@\splineSlowStarttest{{\X@p=\X@c \Y@p=\Y@c \cv@start \the\Edge@c\@ne 
 \ifInside@\aftergroup\splineplot@maybe@@\else\aftergroup\splineplot@true\fi}}%
\xydef@\splineSlowEndtest{{\X@p=\X@c \Y@p=\Y@c \cv@end \the\Edge@c\@ne 
 \ifInside@\aftergroup\splineplot@maybe@@\else\aftergroup\splineplot@true\fi}}%
\xydef@\splineplot@maybe{\splineplot@false}%
\xylet@\splineplot@maybe@@=\splineplot@maybe
\xydef@\splinescan@{\bgroup%
 \expandafter\def\xysplineedges@{\z@;\z@,\z@;\z@,}%
 \bgroup \cv@start 
 \expandafter\DN@\expandafter{\the\Edge@c}\DNii@{\zeroEdge}%
 \ifx\next@\nextii@ \gdef\splineedges@{\z@;\z@,}%
 \else\aftergroup\splinestartScan@\fi
 \egroup \relax
 \bgroup \cv@end 
 \expandafter\DN@\expandafter{\the\Edge@c}\DNii@{\zeroEdge}%
 \ifx\next@\nextii@ 
 \getcrvsegsnum@ \edef\segmentnum@{\the\count@}%
 \splineval@=\z@ \splineRecordEndValue@
 \else\aftergroup\splineendScan@\fi
 \egroup \egroup
 \expandafter\testsplineedges@\splineedges@;,@@%
 \expandafter\edef\xysplineedges@{\splineedges@}%
 \global\let\splineedges@=\relax
\splinetrace@{edge params: \xysplineedges@}}%
\xydef@\testsplineedges@#1;#2,#3;#4,#5@@{%
 \DN@{#5}\ifx\next@\empty
 \DNii@{#4}\ifx\nextii@\empty
 \xynoedgespline@{end}\def\splineedges@{#1;#2,\z@;\z@,}\fi
 \DNii@{#2}\ifx\nextii@\empty
 \xynoedgespline@{start}\def\splineedges@{\z@;\z@,\z@;\z@,}\fi
 \fi }
\xydef@\xynoedgespline@#1{\xywarning@{#1 edge of spline not found}}%
\xydef@\splinestartScan@{\bgroup
\splinetrace@{scan for start}%
 \global\let\splineadvance@=\splineadvance@@
 \let\spline@start=\splinefindStart@
 \let\spline@end=\spline@end@@
 \let\splinefinish@=\splinefinish@@
 \let\splinewhich=\relax
 \global\splinelength@=\z@
 \def\splinerec@{\let\splinerec@=\splineSrec@ \splinedecast@@}%
 \edef\splineedges@{}%
 \expandafter\let\xysplineedges@\relax
 \xylowtolerance@ \splined@@ 
 \ifx\splineedges@\empty\expandafter\splineslowScan@\fi
 \ifx\splineedges@\relax\expandafter\splinenostart@\fi
 \egroup }%
\xydef@\splineslowScan@{%
 \let\splineStarttest=\splineSlowStarttest 
 \let\splinescanStarttest=\relax 
 \def\splinerec@{\let\splinerec@=\splineSrec@ \splinedecast@@}%
 \splined@@ }
\xydef@\splineslowEnd@{%
 \global\let\splineEndtest=\splineSlowEndtest 
 \let\splinescanEndtest=\relax 
 \def\splinerec@{\let\splinerec@=\splineErec@ \splinedecast@@}%
 \splined@@ }
\xydef@\splinenostart@{%
 \def\segmentnum@{1}\splinelength@=\z@ \splineval@=\z@
 \xynoedgespline@{start}\splineRecordValue@ }
\xydef@\splineendScan@{\bgroup
 \bgroup
\splinetrace@{scan for end}%
 \global\let\splineadvance@=\splineadvance@@
 \let\spline@start=\splinefindEnd@
 \let\spline@end=\spline@end@@ 
 \let\splinefinish@=\splinefinish@@
 \let\splinewhich=\relax
 \global\splinelength@=\z@ 
 \global\let\splineEndtest=\splineEndtest@ 
 \def\splinerec@{\let\splinerec@=\splineErec@ \splinedecast@@}%
 \expandafter\def\expandafter\prevedges@\expandafter{\splineedges@}%
 \xylowtolerance@ \splined@@ 
 \ifx\splineedges@\prevedges@\expandafter\splineslowScan@\fi
 \egroup \egroup}
\xydef@\splinescanbreak@{%
\splinetrace@{SCANBREAK}%
 \gdef\breakedges@{}%
 \DN@{0}\ifx\next@\bstartPLACE@
 \DN@{\bgroup \def\tmp@####1;####2,####3;####4,{%
 \global\splineval@=####2\relax}%
 \expandafter\expandafter\expandafter\tmp@\xysplineedges@
 \def\segmentnum@{1}\splineRecordBreakValue@ \egroup}%
 \else
 \bgroup \cv@start 
 \expandafter\DN@\expandafter{\the\Edge@c}\DNii@{\zeroEdge}%
 \ifx\next@\nextii@ \aftergroup\splinezerostart
 \else\aftergroup\splinewidestart\fi
 \egroup 
 \fi \next@ 
 \DN@{1}\ifx\next@\bendPLACE@ 
 \DN@{\bgroup \def\tmp@####1;####2,####3;####4,{%
 \global\splineval@=####4\relax}%
 \expandafter\expandafter\expandafter\tmp@\xysplineedges@
%% \multiply\splineval@\m@ne \advance\splineval@\p@
%% \def\segmentnum@{1}
 \getcrvsegsnum@ \edef\segmentnum@{\the\count@}%
 \global\multiply\splineval@\count@ 
 \splineRecordEndBreakValue@ \egroup}%
 \else
 \bgroup \cv@end 
 \expandafter\DN@\expandafter{\the\Edge@c}\DNii@{\zeroEdge}%
 \ifx\next@\nextii@ \aftergroup\splinezeroend
 \else\aftergroup\splinewideend\fi
 \egroup 
 \fi \next@ 
 \expandafter\def\expandafter
 \xybreakedges@\expandafter{\breakedges@}%
 \global\let\breakedges@=\relax
\splinetrace@{break params: \xybreakedges@::\bstartPLACE@--\bendPLACE@}%
 \expandafter\let\xysplineedges@\xybreakedges@ }
\xydef@\getcrvsegsnum@{%
 \count@=\ptsnum@\relax \ifnum\count@>\@ne\advance\count@\m@ne\fi}
\xydef@\splinezerostart{\DN@{\bgroup 
\splinetrace@{splinezerostart:}%
 \dimen@=\bstartPLACE@\p@ 
 \global\splineval@=\dimen@ 
 \splineRecordBreakValue@ \egroup }}
\xydef@\splinezeroend{\DN@{\bgroup 
\splinetrace@{splinezeroend:}%
 \dimen@=\bendPLACE@\p@
 \multiply\dimen@\m@ne \advance\dimen@\p@
 \def\segmentnum@{0}\global\splineval@=\dimen@ 
 \splineRecordEndBreakValue@ \egroup }}
\xydef@\splinewidestart{\DN@{\bgroup 
 \splinetrace@{scan for start}%
 \let\splinefbcontinue@=\breakstartcontinue@
 \let\splinef@pt=\splinef@breakpt
 \let\splinef@end=\break@start
 \edef\tmp@{{\bstartPLACE@}}%
 \expandafter\splinealong@@\tmp@\z@>\endgroup\egroup }}
\xydef@\splinewideend{\DN@{\bgroup 
 \splinetrace@{scan for wide end}%
 \let\splinefbcontinue@=\breakendcontinue@
 \let\splinef@pt=\splinef@breakpt
 \let\splinef@end=\break@end
 \edef\tmp@{{\bendPLACE@}}%
 \expandafter\splinealong@@\tmp@\z@<\endgroup\egroup }}
\xydef@\splineSrec@{{%
\splinetrace@{v=\the\splineval@ + d=\the\splinedepth@ :
 (\the\X@p,\the\Y@p);(\the\X@c,\the\Y@c):Srec }%
 \splineStarttest
 \ifsplineplot@ 
 \ifdim\splinedepth@<.0001\p@ \aftergroup\splinefinish@
 \global\advance\splineval@ .5\splinedepth@
 \else\aftergroup\splinedecast@@ \fi
 \else \aftergroup\splineadvance@ \fi}}
\xydef@\splinefindStart@@{\bgroup \bgroup 
 \expandafter\expandafter\expandafter\getsplineparams@\xysplineparams@
 \global\let\splineadvance@=\splineadvance@@
 \global\let\splinepoint=\relax
 \let\splinegoal@=\splineRecordValue@ \global\dimen5=\z@ 
 {\X@c=\X@p \Y@c=\Y@p \splinescanStarttest }%
} 
\xydef@\splinefindStart@{%
 \expandafter\crv@cnt@\xycrvptsnum@\relax
 \ifnum\crv@cnt@>\tw@
 \crv@cnt@=\@ne \splineplot@false \splinesegment@{\crv@cnt@}%
 {\splineStarttest
 \ifsplineplot@\aftergroup\splineplot@true\fi}%
 \ifsplineplot@ \else \searchforStartsegment@ \fi 
 \splinesegment@{\crv@cnt@}%
\splinetrace@{start is in segment \segmentnum@}%
 \else \splinesegment@\@ne \fi
 \splineplot@false \splinefindStart@@
}
\xydef@\searchforStartsegment@{\splineplot@true\loop@ 
 \advance\crv@cnt@\@ne 
 \expandafter\count@\xycrvptsnum@\relax
 \ifnum\count@=\crv@cnt@\expandafter\splineplot@false
 \else 
 \splinesegment@{\crv@cnt@}{\splineStarttest
 \ifsplineplot@\aftergroup\splineplot@false
 \else\aftergroup\splineplot@true\fi }%
 \fi \ifsplineplot@\repeat@ 
}
\xydef@\splinefindEnd@@{\bgroup \bgroup
 \expandafter\expandafter\expandafter\getsplineparams@\xysplineparams@
\splinetrace@{params:\xysplineparams@}%
 \splinereverse@@
\splinetrace@{params:\xysplineparams@}%
 \global\let\splineadvance@=\splineadvance@@
 \global\let\splinepoint=\splinescanEndtest 
 \let\splinegoal@=\splineRecordEndValue@ \global\dimen5=\z@ 
 {\X@c=\X@p \Y@c=\Y@p \splinescanEndtest }%
}
\xydef@\splinereverse@@{\splinereverse@@@}
\xydef@\splinereverse@@@{%
 \def\postspline@{\d@X=-\d@X \d@Y=-\d@Y}%
 \dimen@ii=\X@c \X@c=\X@p \X@p=\dimen@ii 
 \dimen@ii=\Y@c \Y@c=\Y@p \Y@p=\dimen@ii 
 \global\dimen5=-\dimen5\relax 
 \global\advance\dimen5\splinelength@ }
\xydef@\postspline@{}
\xydef@\splineErec@{{%
 \dimen@=\splineval@ \advance\dimen@\splinedepth@
\splinetrace@{ER (\the\X@p,\the\Y@p);(\the\X@c,\the\Y@c);;;
\the\dimen@,\the\splinedepth@}%
 \splineEndtest
 \ifsplineplot@ 
 \ifdim\splinedepth@<.0001\p@ \aftergroup\splinefinish@
 \else\aftergroup\splinedecast@@ \fi
 \else \aftergroup\splineadvance@ \fi}}
\xydef@\splinefindEnd@{%
 \expandafter\crv@cnt@\xycrvptsnum@\relax 
 \ifnum\crv@cnt@>\tw@
 \advance\crv@cnt@\m@ne 
 \splineplot@false \splinesegment@{\crv@cnt@}%
 {\X@c=\X@p \Y@c=\Y@p \splineEndtest
 \ifsplineplot@\aftergroup\splineplot@true\fi }%
 \ifsplineplot@ 
 \else \searchforEndsegment@ \fi 
 \splinesegment@{\crv@cnt@}%
\splinetrace@{end is in segment: \segmentnum@ }%
 \else \splinesegment@\@ne \fi
 \splineplot@false\splinefindEnd@@
}
\xydef@\searchforEndsegment@{\splineplot@true\loop@ 
 \advance\crv@cnt@\m@ne 
 \ifnum\crv@cnt@=\z@\expandafter\splineplot@false
 \else 
 \splinesegment@{\crv@cnt@}{\X@c=\X@p \Y@c=\Y@p \splineEndtest
 \ifsplineplot@\aftergroup\splineplot@false
 \else\aftergroup\splineplot@true\fi}%
 \fi \ifsplineplot@\repeat@ 
}
\xydef@\splinescanStarttest{%
\splinetrace@{SST (\the\X@c,\the\Y@c); \the\splinelength@, \the\splineval@}%
 {\splineplot@false\splineStarttest
 \ifsplineplot@\expandafter\splinefinish@\fi}}
\xydef@\splinescanEndtest{%
\splinetrace@{SET (\the\X@c,\the\Y@c); \the\splinelength@, \the\splineval@}%
 {\splineplot@false\splineEndtest 
 \ifsplineplot@\expandafter\splinefinish@\fi}}
\xydef@\splineBrec@{{%
 \dimen@=\splineval@ \advance\dimen@\splinedepth@
\splinetrace@{BR (\the\X@p,\the\Y@p);(\the\X@c,\the\Y@c);;;
\the\dimen@,\the\splinedepth@}%
 \splineEndtest
 \ifsplineplot@ \aftergroup\splineadvance@ \else
 \ifdim\splinedepth@<.0001\p@ \aftergroup\splinefinish@
 \else\aftergroup\splinedecast@@ \fi \fi}}
\xydef@\splineBSrec@{{%
\splinetrace@{SR (\the\X@p,\the\Y@p);(\the\X@c,\the\Y@c);;;
\the\dimen@,\the\splinedepth@:SR}%
 \splineStarttest
 \ifsplineplot@ 
 \ifdim\splinedepth@<.0001\p@ \aftergroup\splinefinish@
 \global\advance\splineval@ .5\splinedepth@
 \else \advance\splineval@\splinedepth@
 \splinetest@ \advance\splineval@-\splinedepth@
 \ifsplineplot@\aftergroup\splineadvance@
 \else\aftergroup\splinedecast@@\fi
 \fi
 \else
 \global\advance\splineval@\splinedepth@
 \aftergroup\splinefinish@ \fi }}
\xydef@\splineBErec@{{%
 \dimen@=\splineval@ \advance\dimen@\splinedepth@
\splinetrace@{BE (\the\X@p,\the\Y@p);(\the\X@c,\the\Y@c);;;
 \the\dimen@,\the\splinedepth@}%
 \splineEndtest
 \ifsplineplot@ 
 \ifdim\splinedepth@<.0001\p@ \aftergroup\splinefinish@
 \global\advance\splineval@ .5\splinedepth@
 \else \advance\splineval@\splinedepth@
 \splinetest@ \advance\splineval@-\splinedepth@
 \ifsplineplot@\aftergroup\splineadvance@
 \else\aftergroup\splinedecast@@\fi
 \fi
 \else
 \ifdim\splinedepth@<\p@ \global\advance\splineval@\splinedepth@ \fi
 \aftergroup\splinefinish@ \fi }}
\xydef@\splinef@breakpt#1{%
 \ifdim\splineval@>\z@
\splinetrace@{found: val=\the\splineval@;(\the\X@c,\the\Y@c)}%
 \else
\splinetrace@{found: val=\the\splineval@;(\the\X@p,\the\Y@p)}%
 \fi \splinefbcontinue@ }
\xydef@\splinef@pt@@{%
 \ifdim\splineval@>\z@ 
\splinetrace@{found: val=\the\splineval@;c:(\the\X@c,\the\Y@c)}%
 \global\dimen@i=\X@c \global\dimen3=\Y@c 
 \else
\splinetrace@{found: val=\the\splineval@;p:(\the\X@p,\the\Y@p)}%
 \fi
 \setsplinedir@ \global\dimen5=\d@X \global\dimen7=\d@Y 
 \global\splineval@=\splineval@
 \aftergroup\splinefocus@ }
\xydef@\findbreakwarning@#1{%
 \xywarning@{#1 of break not found: bSTART=\bstartPLACE@, bEND=\bendPLACE@}%
 \DN@{#1}\def\DNii@{start}\ifx\next@\nextii@\splineRecordBreakValue@
 \else\splineRecordEndBreakValue@\fi\egroup}%
\xydef@\breakstartcontinue@{\bgroup \cv@start
 \expandafter\DN@\expandafter{\the\Edge@c}\DNii@{\zeroEdge}%
 \ifx\next@\nextii@ \aftergroup\breakstartfound@
 \else \aftergroup\breakstartcontinue@i\fi \egroup }%
\xydef@\breakstartcontinue@i{%
\splinetrace@{move to start edge, from (\the\X@c,\the\Y@c): val=\the\splineval@ }%
 \global\let\splineEndtest=\splineBreakStarttest@
 \global\let\splinetest@=\splineBreakStarttest@
 \gdef\splinerec@{\global\let\splinerec@=\splineSrec@ \splinedecast@@}%
 \global\let\splinepoint=\relax
 \global\let\spline@end=\checkfoundSbreak@ 
 \global\let\splinegoal@=\splineRecordSBreakValue@ 
 \global\let\splinefinish@=\splinefinish@@ }
\xydef@\breakstartfound@{%
\splinetrace@{found start edge, at (\the\X@c,\the\Y@c): val=\the\splineval@ }%
 \global\let\splinetest@=\splineStarttest
 \gdef\splinerec@{\splinegoal@ \global\let\splinerec@=\splinefinish@ }%
 \global\let\splinepoint=\relax
 \global\let\spline@end=\relax
 \global\let\splinegoal@=\splineRecordBreakValue@ 
 \global\let\splinefinish@=\splinefinish@@
 }
\xydef@\checkfoundSbreak@{%
 \ifnum\xycrvptsnum@<\thr@@\DN@{\findbreakwarning@{start}}%
 \else\DN@{\searchBreakSsegment@}\fi \next@ }%
\xydef@\searchBreakSsegment@{%
 \crv@cnt@=\segmentnum@ \DN@{}\count@=\crv@cnt@
 \DNii@{}\ifnum\splineval@=\z@ \ifnum\crv@cnt@=\@ne
 \ifnum\xycrvptsnum@=\@ne\count@=\z@\DNii@{\egroup}\fi
 \else \DN@{\egroup}\fi 
 \else \ifnum\splineval@=\m@ne 
 \else \advance\crv@cnt@\@ne \fi \fi
 \ifnum\crv@cnt@=\xycrvptsnum@\relax
 \ifnum\xycrvptsnum@>\tw@ \DNii@{\egroup}\fi
 \DN@{\expandafter\splineRecordBreakValue@\nextii@}%
 \else
 \DN@{\splinesegment@{\crv@cnt@}\splinesetparams@
 \splined@@ \egroup}%
 \fi \next@ }
\xydef@\checkfoundEbreak@{%
 \ifnum\xycrvptsnum@<\thr@@\DN@{\findbreakwarning@{end}}%
 \else\DN@{\searchBreakEsegment@}\fi \next@ }%
\xydef@\searchBreakEsegment@{%
 \crv@cnt@=\segmentnum@ \DN@{}\count@=\crv@cnt@
 \DNii@{}\ifnum\splineval@=\z@ \ifnum\crv@cnt@=\@ne
 \ifnum\xycrvptsnum@=\@ne\count@=\z@\DNii@{\egroup}\fi
 \else\DN@{\egroup}\fi
 \else \advance\crv@cnt@\m@ne \fi 
 \ifnum\count@=\z@
 \ifnum\xycrvptsnum@>\tw@ \splineval@=\m@ne\p@
 \DNii@{\egroup}\fi
 \DN@{\expandafter\splineRecordEndBreakValue@\nextii@}\else
 \DN@{\splinesegment@{\crv@cnt@}\splinereverse@
 \readsplineparams@ \splined@@ \egroup}%
 \fi \next@ }
\xydef@\break@start{\egroup \egroup 
\splinetrace@{scan for start}%
 \global\let\splineadvance@=\splineadvance@@
 \let\spline@start=\splinefindBStart@
 \let\spline@end=\egroup
 \let\splinefinish@=\splinefinish@@
 \let\splinewhich=\relax
 \global\let\splineadvance@=\splineadvance@@
 \global\let\splinepoint=\relax
 \let\splinegoal@=\splineRecordBreakValue@
 \global\dimen5=\z@ \global\splinelength@=\z@
 \let\splinerec@=\splineSrec@ 
 \def\breakedges@{}%
 \bgroup \bgroup \splined@@ }
\xydef@\splinefindBStart@{\bgroup
 \global\splineval@=\z@ \splinedepth@=.5\p@}
\xydef@\breakendcontinue@{\bgroup
 \edef\tmp@{\X@p = \the\X@c \Y@p=\the\Y@c}\cv@end\tmp@
 \expandafter\DN@\expandafter{\the\Edge@c}\DNii@{\zeroEdge}%
 \ifx\next@\nextii@ \aftergroup\breakendfound@
 \else\aftergroup\breakendcontinue@i\fi \egroup }%
\xydef@\breakendcontinue@i{%
\splinetrace@{move to end edge, from (\the\X@c,\the\Y@c): val=\the\splineval@ }%
 \global\let\splineEndtest=\splineBreakEndtest@
 \global\let\splinetest@=\splineBreakEndtest@
 \gdef\splinerec@{\global\let\splinerec@=\splineErec@\splinedecast@@}%
 \global\let\splinepoint=\relax
 \global\let\spline@end=\checkfoundEbreak@ 
 \global\let\splinegoal@=\splineRecordEBreakValue@ 
 \global\let\splinefinish@=\splinefinish@@ 
 \splinerec@ }
\xydef@\splineRecordEBreakValue@{%
\splinetrace@{\the\count@\space segments, \the\splineval@}%
 \splineRecordEndBreakValue@ }
\xydef@\splineRecordSBreakValue@{\getcrvsegsnum@
 \dimen@=\splineval@ 
 \advance\dimen@\segmentnum@\p@ \advance\dimen@-\p@
 \dimen@nth\count@\dimen@
 \global\splineval@=\dimen@ \def\segmentnum@{1}%
 \splineRecordBreakValue@ }
\xydef@\breakendfound@{%
\splinetrace@{found end edge, at (\the\X@c,\the\Y@c): val=\the\splineval@ }%
 \global\let\splinetest@=\splineEndtest
 \gdef\splinerec@{\splinegoal@ \global\let\splinerec@=\splinefinish@}%
 \global\let\splinepoint=\relax
 \global\let\spline@end=\relax
 \global\let\splinegoal@=\splineRecordEndBreakValue@ 
 \global\let\splinefinish@=\splinefinish@@ }
\xydef@\break@end{\egroup \egroup
 \global\let\splineadvance@=\splineadvance@@
 \let\spline@start=\splinefindBEnd@
 \let\spline@end=\egroup 
 \let\splinefinish@=\splinefinish@@
 \let\splinewhich=\relax
 \global\let\splineadvance@=\splineadvance@@
 \global\let\splinegoal@=\splineRecordEndBreakValue@
 \global\splinelength@=\z@ 
 \let\splinerec@=\splineErec@ 
 \global\let\splineEndtest=\splineEndtest@ 
 \bgroup \splined@@ }
\xydef@\splinefindBEnd@{\bgroup\bgroup 
 \splinereverse@ \readsplineparams@ 
 \global\splineval@=\z@ }
\xydef@\splineRecordValue@{%
 \ifx\unknown\segmentnum@\relax
 \else
 \getcrvsegsnum@ 
 \dimen@=\splineval@ \advance\dimen@ \segmentnum@\p@
 \advance\dimen@-\p@ \dimen@nth\count@\dimen@
 \global\splineval@=\dimen@
 \fi
 \xdef\splineedges@{\splineedges@\the\splinelength@;\the\splineval@,}%
\splinetrace@{found edge: \splineedges@}}
\xydef@\splineRecordEndValue@{%
 \ifx\unknown\segmentnum@\relax
 \else
 \getcrvsegsnum@
 \dimen@=\splineval@ \advance\dimen@ \count@\p@
 \advance\dimen@-\segmentnum@\p@ \dimen@nth\count@\dimen@
 \global\splineval@=\dimen@
 \fi
 \xdef\splineedges@{\splineedges@\the\splinelength@;\the\splineval@,}%
\splinetrace@{found edge: \splineedges@}}
\xydef@\splineRecordBreakValue@{%
 \ifx\unknown\segmentnum@\relax
 \else\expandafter\advance\expandafter\splineval@\segmentnum@\p@
 \count@=\segmentnum@\relax 
 \ifnum\count@>0 \advance\splineval@-\p@ \fi\fi
 \xdef\breakedges@{\breakedges@\the\splinelength@;\the\splineval@,}%
 \global\let\spline@end=\egroup
\splinetrace@{found break edge: \breakedges@}}
\xydef@\splineRecordEndBreakValue@{%
 \ifx\unknown\segmentnum@\relax 
 \else\count@=\segmentnum@\relax \ifnum\count@=\z@
 \else \getcrvsegsnum@ 
 \count@@=\count@ \advance\count@@-\segmentnum@\relax
 \dimen@=\splineval@ \advance\dimen@ \count@@\p@
 \dimen@nth\count@\dimen@
 \global\splineval@=\dimen@
 \fi\fi
 \ifdim\splineval@<\z@ \relax\splineval@=\z@ \fi
 \ifx\breakedges@\relax\relax\else\ifx\breakedges@\empty\else
 \ifdim\splineval@<\p@\relax \ifdim\splineval@>\z@ 
 \expandafter\testbreakedges@\breakedges@ @%
 \fi\fi\fi\fi
 \xdef\breakedges@{\breakedges@\the\splinelength@;\the\splineval@,}%
 \global\let\spline@end=\egroup
\splinetrace@{found break edge: \breakedges@}}
\xydef@\testbreakedges@#1;#2,#3@{\bgroup \dimen@=#2\relax
 \advance\dimen@\splineval@ \advance\dimen@-\p@
\splinetrace@{testbreak: #1;#2,#3@ \the\splineval@::\the\dimen@}%
 \DN@{\egroup}\ifdim\dimen@>\z@
 \edef\next@{\egroup\def\noexpand\breakedges@{#1;1pt,#3}}%
 \else\ifdim\zz@\dimen@ 
 \edef\next@{\egroup\def\noexpand\breakedges@{#1;1pt,#3}}%
 \fi \fi \next@ }
\xydef@\splineRecordBreakEValue{%
 \ifdim\splineval@>\z@
 \splineval@=-\splineval@ \advance\splineval@\p@ \fi
 \splineRecordBreakValue@ }%
\xydef@\xydist@#1#2{\ifdim#1>#2\relax
 \quotient@@\tmp@#2#1\expandafter\dimen@ii\tmp@#2\relax
 \ifdim\dimen@ii>.41422#1\relax
 \dimen@=1.060665#1\advance\dimen@ .353555\dimen@ii\relax
 \else \dimen@=#1\advance\dimen@.5\dimen@ii\fi
 \else 
 \quotient@@\tmp@#1#2\expandafter\dimen@ii\tmp@#1\relax
 \ifdim\dimen@ii>.41422#2\relax
 \dimen@=1.060665#2\advance\dimen@ .353555\dimen@ii\relax
 \else \dimen@=#2\advance\dimen@.5\dimen@ii\fi
 \fi}
\xydef@\splineDadvance@{\splineadvance@@
 \expandafter\splineDadvance@@\splineDadvance@@@}
\xydef@\splineDadvance@@#1#2#3#4{%
 {\d@X=#1\advance\d@X-#2\ifdim\d@X<\z@ \d@X=-\d@X\fi 
 \d@Y=#3\advance\d@Y-#4\ifdim\d@Y<\z@ \d@Y=-\d@Y\fi
 \xydist@\d@X\d@Y 
 \global\advance\splinelength@\dimen@ 
\splinetrace@{d=(\the\d@X,\the\d@Y): v=\the\splineval@: l=\the\splinelength@}%
}}
\xydef@\spline@end@{\lastsplinepoint@ \egroup \egroup
 \ht\z@=\z@ \dp\z@=\z@ \wdz@=\z@ \boxz@}%
\gdef\splinetest@{\splineplot@true}
\xydef@\spline@end@@{\egroup \egroup}
\xydef@\splinefrec@{{%
 \advance\splineval@\splinedepth@
\splinetrace@{F:(\the\X@p,\the\Y@p);(\the\X@c,\the\Y@c);;
\the\splineval@;\the\splinedepth@}%
 \ifdim\dimen5=\splineval@ \aftergroup\splinefinishf@ 
 \else \dimen@=\dimen5\advance\dimen@-\splineval@
 \ifdim\dimen@<\z@ \dimen@=-\dimen@ \fi
 \ifdim\dimen@<.0001\p@ \aftergroup\splinefinishf@
 \else
 \ifdim\dimen5<\splineval@\aftergroup\splinedecast@@
 \else \aftergroup\splineadvance@ 
 \fi\fi\fi}}
\xydef@\splinefinishf@{\global\advance\splineval@\splinedepth@
 \splinefinish@}%
\xydef@\spline@find#1#2#3{%
\splinetrace@{spline@find #1 #2 #3}%
 \readsplineparams@
 \global\let\splinefinish@=\splinefinish@@
 \global\let\splinegoal@=\splinef@pt 
 \global\let\splinepoint=\relax
 \dimen@=#1\relax\dimen@ii=#2\relax
 \ifdim\dimen@ii=\z@ \def\postfind@{}%
 \else\def\postfind@{}%
 \ifdim\dimen@ii<\z@ \splinereverse@ 
 \readsplineparams@ 
\splinetrace@{reverse orientation: (\the\X@p,\the\Y@p),(\the\X@c,\the\Y@c)}%
 \dimen@=#1\relax\dimen@ii=#2\relax
 \multiply\dimen@\m@ne \advance\dimen@\p@ \multiply\dimen@ii\m@ne
 \def\postfind@{\d@X=-\the\d@X \d@Y=-\the\d@Y \noexpand\reversesplineval@}%
 \fi\fi
 \expandafter\splinetrace@\expandafter{\xysplineparams@}%
 \edef\next@{\noexpand\spline@@find{\the\dimen@}{\the\dimen@ii}{#3}}%
 \next@ }
\xydef@\reversesplineval@{\splineval@=-\splineval@ \advance\splineval@\p@ }
\xydef@\spline@@find#1#2#3{%
\splinetrace@{spline@@find #1 #2 #3}%
 \let\splinerec@=\splinefrec@ 
 \global\let\splineadvance@=\splineadvance@@
 \dimen5=#1\relax
 \ifdim #2=\z@\relax
 \ifdim #1=\z@\relax \bgroup 
 \let\splined@@=\spline@@knot
 \global\splineval@=\m@ne\p@ 
 \else\ifdim #1=\p@\relax \bgroup
 \let\splined@@=\spline@@knot 
 \global\splineval@=\z@ 
 \else 
 \global\splineval@=\z@ 
 \global\let\splineadvance@=\splineadvance@@
 \DN@{#3}\ifx\next@\empty \setsplinetest@\splineval@>{#1}{}%
 {{\ifdim\splineval@=\dimen5\aftergroup\splineplot@false\fi}}%
 \else\DNii@{>}\ifx\next@\nextii@
 \setsplineundertest@\splineval@>{#1}{}{}%
 \let\splinerec@=\splineBSrec@ 
 \else\DNii@{<}\ifx\next@\nextii@
 \setsplineundertest@\splineval@>{#1}{}{}%
 \let\splinerec@=\splineBErec@ 
 \else\xywarning@{unknown find-mode: #3}\fi\fi\fi
 \fi\fi
 \else 
 \global\splineval@=\z@ 
 \def\splineslidetest@@{%
 \setsplinetest@\splinelength@<{#2}{}{}}%
 \let\splinefinish@=\splinefcontinue@
 \fi
 \let\spline@end=\splinef@end
 \let\splinepoint@=\relax
 \splinelength@=\z@ 
 \def\spline@start{\bgroup\xylowtolerance@}%
 \splined@@ }
\xydef@\spline@@knot{%
 \let\setsplinedir@=\setsplineknotdir@
 \splinesetparams@\spline@start
 \splinedepth@=\p@
 \global\dimen@i=\X@p \global\dimen3=\Y@p 
 \splinefinishf@ \spline@end \egroup }
\xydef@\splinefcontinue@{%
\splinetrace@{sliding... from (\the\X@c,\the\Y@c): val=\the\splineval@ }%
 \global\let\splinerec@=\splinerec@@
 \global\splinelength@=\z@
 \global\splineval@=\splineval@
 \global\let\splinepoint=\splinefindtest@
 \global\let\splinegoal@=\splinef@pt 
 \global\let\splineadvance@=\splineDadvance@
 \global\let\splinefinish@=\splinefinish@@ 
 \splineslidetest@@ 
 }
\xydef@\splinefindtest@{%
\splinetrace@{SFT (\the\X@c,\the\Y@c); \the\splinelength@, \the\splineval@}%
 {\splineplot@false\splinetest@ 
 \ifsplineplot@\expandafter\splinefinishf@\fi}}
\def\setsplineundertest@#1#2#3#4#5{%
\splinetrace@{setsplineundertest@: #1,#2,#3,#4,#5,}%
 \DNii@{\gdef\splinetest@}%
 \DN@##1\next{\def\tmp@{{\splineplot@false 
 \ifdim#1#2##1\relax #4\else\splineplot@true#5\fi }}}%
 \next@#3\relax\next
 \expandafter\nextii@\tmp@ }
\xydef@\splinef@end{\edef\tmp@{\egroup\splinelength@=\the\splinelength@}\tmp@}
\xydef@\splinef@pt{%
 \ifdim\splineval@>\z@ 
\splinetrace@{found: val=\the\splineval@;c:(\the\X@c,\the\Y@c)}%
 \global\dimen@i=\X@c \global\dimen3=\Y@c 
 \else
\splinetrace@{found: val=\the\splineval@;p:(\the\X@p,\the\Y@p)}%
 \fi
 \setsplinedir@ \global\dimen5=\d@X \global\dimen7=\d@Y 
 \global\splineval@=\splineval@
 \aftergroup\splinefocus@ }
\def\setsplinetest@#1#2#3#4#5{%
 \DNii@{\gdef\splinetest@}%
 \DN@##1\next{\def\tmp@{{\splineplot@false \ifdim#1#2##1\relax
 #4\else\splineplot@true#5\fi}}}%
 \next@#3\relax\next
 \expandafter\nextii@\tmp@ }%
\xydef@\splinefocus@{%
 \d@X=\dimen5\relax \d@Y=\dimen7\relax \setsplinedir@ }
\xydef@\splinesegment@#1{}
\xydef@\xyprecurve@{}
\xydef@\xypostcurve@{}
\xydef@\splineset@{%
\splinetrace@{splineset@:}%
 \ifx\bstartPLACE@\empty
 \DN@{\xyprecurve@ 
 \edef\tmp@{\egroup \X@max=\the\X@max \X@min=\the\X@min
 \Y@max=\the\Y@max \Y@min=\the\Y@min}\tmp@ \xypostcurve@ }%
 \else
 \DN@{\xyprecurve@ \xysplinespecialcases@
 \edef\tmp@{\egroup \X@max=\the\X@max \X@min=\the\X@min
 \Y@max=\the\Y@max \Y@min=\the\Y@min}\tmp@ \xypostcurve@ }%
 \fi
 \next@ }
\xydef@\xysplinespecialcases@{%
 \ifx\empty\xycrvdrop@ 
 \ifx\empty\xycrvconn@ \DN@{\splinesolid@}%
 \else \DN@{ \dir{-}}\ifx\next@\xycrvconn@ \DN@{\splinesolid@}%
 \else \DN@{ \dir 2{-}}\ifx\next@\xycrvconn@ \DN@{\splinedoubled@}%
 \else \DN@{ \dir{=}}\ifx\next@\xycrvconn@ \DN@{\splineribboned@}%
 \else \DN@{ \dir {2.}}\ifx\next@\xycrvconn@ \DN@{\splinedoubled@}%
 \else \DN@{ \dir 3{-}}\ifx\next@\xycrvconn@ \DN@{\splinetrebled@}%
 \else \DN@{ \dir {3.}}\ifx\next@\xycrvconn@ \DN@{\splinetrebled@}%
 \else \DN@{ \dir{--}}\ifx\next@\xycrvconn@ \DN@{\splinedashed@}%
 \else \DN@{ \dir{.}}\ifx\next@\xycrvconn@ \DN@{\splinedotted@}%
 \else \DN@{ \dir{:}}\ifx\next@\xycrvconn@ \DN@{\splinedbldotted@}%
 \else \ifdim\splinetol@>\z@ \else \splinedefaulttol@ \fi
 \DN@{\splineset@@}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
 \else
 \DN@{\splineset@@}%
 \fi \ifInvisible@\DN@{}\fi \next@ }
\xydef@\splinesolid@{\setbox\splinebox@=\zerodot \def\xycrvdrop@{ }%
 \def\xycrvconn@{}\splineset@@}
\xydef@\splinedoubled@{\splinedefaulttol@\def\xycrvdrop@{ }\def\splinedrop@{}%
 \def\xycrvconn@{!C\dir2{.}}\splineset@@}
\xydef@\splineribboned@{\splinedefaulttol@\def\xycrvdrop@{ }\def\splinedrop@{}%
 \def\xycrvconn@{!C\dir{:}}\splineset@@}
\xydef@\splinetrebled@{\splinedefaulttol@\def\xycrvdrop@{ }\def\splinedrop@{}%
 \def\xycrvconn@{!C\dir3{.}}\splineset@@}
\xydef@\splinedashed@{\splinetol@=1.5pc \def\xycrvdrop@{ }%
 \def\splinedrop@{}\edef\xycrvconn@{\noexpand!C\noexpand\dir{\addDASH@{}}}%
 \splineset@@}
\xydef@\splinedotted@{\setbox\splinebox@=\zerodot \def\xycrvdrop@{ }%
 \splinetol@=1.5\jot \def\xycrvconn@{}\splineset@@}
\xydef@\splinedbldotted@{\def\xycrvdrop@{ }\def\splinedrop@{}%
 \splinetol@=1.5\jot \def\xycrvconn@{!C\dir{:}}\splineset@@}
\xydef@\splineset@@{%
 \readsplineparams@
 \ifx\xycrvdrop@\empty \splinetol@=7.5\p@
 \def\splinedefaulttol@{\splinetol@=7.5\p@}\def\splinedrop@{}%
 \else\edef\splinedefaulttol@{\splinetol@=\the\splinetol@}\fi
 \ifx\xycrvconn@\empty \def\splineconn@{}\fi
\splinetrace@{set the curve: >\the\dimen5, <\the\dimen7}%
 \global\let\splineadvance@=\splineadvance@@
 \let\splinerec@=\splineTrec@
 \def\splineStarttest{\splinetest@}%
 \global\let\splinepoint=\relax
 \let\spline@start=\spline@start@
 \let\spline@end=\spline@end@
 \ifdim\dimen7=\p@ 
 \gdef\splinecontinue{\splinesetting@
 \global\let\splinetest@=\splineplot@true}%
 \else
 \ifdim\dimen7=\tw@\p@
%% \ifdim\bendPLACE@\p@=\z@ \emptyspline@ \else
 \ifdim\bendPLACE@\p@=\p@
 \fi
 \else
 \xdef\splinecontinue{\noexpand\setsplinetest@
 \splineval@>{\the\dimen7}{\noexpand\splinebreakcancel@}{}%
 \noexpand\splinesetting@ }%
 \fi\fi
 \ifdim\dimen7>\z@ \DN@{\splinesetting@\splinecontinue}%
 \ifdim\zz@{\dimen5}%
 \else 
 \edef\next@{\noexpand\setsplinetest@
 \splineval@<{\the\dimen5}{}%
 {\noexpand\expandafter\noexpand\splinecontinue}%
 \noexpand\splinesetting@ }%
 \fi
 \else\DN@{\dimen5=\p@}\fi
 \next@
 \ifdim\dimen5=\p@\DN@{}\else\DN@{\splined@@}\fi \next@ 
 }
\xydef@\emptyspline@{\xywarning@{empty curve subsegment}%
\splinetrace@{bstartPLACE@=\bstartPLACE@, bendPLACE@=\bendPLACE@, 
 empty segment}%
 \gdef\splinecontinue{\splinesetting@
 \global\let\splinetest@=\splineplot@false
 \global\dimen5=\z@ }}
\xydef@\splineTrec@{{%
 \advance\splineval@\splinedepth@
 \ifdim\dimen5=\splineval@
 \aftergroup\splinecontinue
 \else \dimen@=\dimen5\advance\dimen@-\splineval@
 \ifdim\dimen@<\z@ \dimen@=-\dimen@ \fi
 \ifdim\dimen@<.001\p@
 \aftergroup\splinecontinue
 \else
 \ifdim\dimen5<\splineval@\aftergroup\splinedecast@@
 \else \aftergroup\splineadvance@
 \fi\fi\fi}}
\xydef@\splinesetting@{\splinesetting@@}
\xydef@\splinesetting@@{%
\splinetrace@{splinesetting@@:}%
 \ifdim\splinedepth@=\z@ \splinedepth@=\p@ \fi
 \ifdim\splinedepth@=\p@
 \def\splinerec@{\global\let\splinerec@=\splinerec@@\splinedecast@@}%
 \else \global\let\splinerec@=\splinerec@@ \fi
 \gdef\splinepoint{\splineplotpt@}}
\xydef@\splineplotpt@{{\global\advance\dimen@i-\X@c 
 \splinetest@ \DN@{\splineglue@}\ifsplineplot@ 
 \DN@{\dosplineplotpt@}%
 \fi \next@ \global\dimen@i=\X@c \global\dimen3=\Y@c }}
\xydef@\splineglue@{\hglue-\dimen@i
\splinetrace@{N:(\the\X@c,\the\Y@c);;\the\dimen@i;\the\dimen3%
 ,\the\splinelength@,\the\splineval@,\the\splinedepth@}}
\xydef@\dosplineplotpt@{\ifdim\dimen@i<\z@
 \raise\Y@c\hbox to-\dimen@i{\hfill\splinedrop@}%
 \else \kern-\dimen@i\raise\Y@c\hbox{\splinedrop@}\fi
 \ifx\splineconn@\relax\else\raise\Y@c\hbox{%
 \setboxz@h{\splineconn@}\Drop@@}\fi
\splinetrace@{P:(\the\X@c,\the\Y@c);;\the\dimen@i;\the\dimen3
 ,\the\splinelength@,\the\splineval@,\the\splinedepth@}}
\xydef@\splinefinish@@{\postspline@ \splinegoal@ \splinecancel@ }
\xydef@\splinecancel@{%
 \global\let\splinerec@=\relax
 \global\let\splinepoint=\relax 
 \global\let\splinecontinue=\relax
 \global\let\splinedecast@=\relax
 }
\xydef@\splinebreakcancel@{\bsplinecancel@ \splinecancel@}
\xydef@\bsplinecancel@{\gdef\lastbspline@{\leave@\leave@}%
 \global\let\middlebspline@=\lastbspline@ }
\xydef@\splinegoal@{\ifdim\splineval@>\z@
 \global\dimen@i=\X@c \global\dimen3=\Y@c \fi
 \global\splineval@=\splineval@ \global\splinelength@=\splinelength@
 \splinesetdir@ }
\xylet@\splinefinish@\splinefinish@@
\xylet@\splinewhich\splineDwhich@
\xydef@\squinewhich@{%
 \ifdim\dimen5>\squinelength
 \d@X=\X@c \d@Y=\Y@c \advance\d@X-\L@c \advance\d@Y-\U@c 
 \advance\squineval-\squinedepth 
 \else \X@c=\X@p \Y@c=\Y@p \advance\squineval-\squinedepth
 \d@X=\L@c \d@Y=\U@c \advance\d@X-\X@p \advance\d@Y-\Y@p \fi
 \d@X=-\d@X \d@Y=-\d@Y
 \squinefinish}
\xydef@\squineDwhich@{%
 \ifdim\dimen5>\squinelength
 \d@X=\X@c \d@Y=\Y@c \advance\d@X-\L@c \advance\d@Y-\U@c 
 \else \X@c=\X@p \Y@c=\Y@p \advance\squineval-\squinedepth
 \d@X=\L@c \d@Y=\U@c \advance\d@X-\X@p \advance\d@Y-\Y@p \fi
 \d@X=-\d@X \d@Y=-\d@Y
 \squinefinish}
\xydef@\xyquadbezier@{%
 \global\let\splinerec@=\relax
 \addtocrvpts@{\def\crvconnect@{\squineconnect@}}%
 \xyquadmethods@ \let\splinesegment@=\squinesegment@
 \begingroup\setcrvobjects@ \xysplineparams@ \splined@@@
 \bgroup \setupsquine@ \squined@ \splineset@ \savespline@ }
\xydef@\xyquadmethods@{%
 \def\crvconnect@{\squineconnect@}%
 \def\splinereverse@@{\splinereverse@@@}%
 \let\getsplineparams@=\getsquineparams@
 \let\spline@start@=\squine@start@
 \let\splinedecast@@=\squinedecast@
 \let\splinerec@@=\squinerec@
 \let\splined@@=\squined@@
 \let\splineIpt@@=\squineIpt@
 \let\splineIadvance@@=\squineIadvance@
 \let\splineinfo@=\squineinfo@
 \let\setsplinedir@=\setsquinedir@
 \let\splinetestcvxhull@=\squinetestcvxhull@
 \let\setsplineknotdir@=\setsquineknotdir@
 \let\splinereverse@=\squinereverse@
 \let\splineDadvance@@@=\squineDadvance@@@
 \let\splinesetparams@=\squinesetparams@
 \let\splineplot@maybe@@=\squineplot@maybe
}
\xydef@\squineconnect@{\splineconnect@ \crvconnect@@ 
 \let\splinesegment@=\squinesegment@ }%
\xydef@\squinesegment@#1{\xyquadmethods@ \def\segmentnum@{1}%
 \setupsquine@ \squined@ }
\xydef@\setupsquine@{%
 \xycontrolpt@\z@ \X@p=\X@c \Y@p=\Y@c
 \xycontrolpt@\@ne \A@=\X@c \B@=\Y@c 
 \xycontrolpt@\tw@ 
 \ifdim \A@>\X@max
 \dimen@=\X@p\advance\dimen@\A@ \dimen@half
 \ifdim \dimen@>\X@max \X@max=\dimen@ \fi
 \dimen@=\X@c\advance\dimen@\A@ \dimen@half
 \ifdim \dimen@>\X@max \X@max=\dimen@ \fi
 \else \ifdim \A@<\X@min 
 \dimen@=\X@p\advance\dimen@\A@ \dimen@half
 \ifdim \dimen@<\X@min \X@min=\dimen@ \fi
 \dimen@=\X@c\advance\dimen@\A@ \dimen@half
 \ifdim \dimen@>\X@min \X@min=\dimen@ \fi
 \fi\fi
 \ifdim \B@>\Y@max 
 \dimen@=\Y@p\advance\dimen@\B@ \dimen@half
 \ifdim \dimen@>\Y@max \Y@max=\dimen@ \fi
 \dimen@=\Y@c\advance\dimen@\B@ \dimen@half
 \ifdim \dimen@>\Y@max \Y@max=\dimen@ \fi
 \else \ifdim \B@<\Y@min
 \dimen@=\Y@p\advance\dimen@\B@ \dimen@half
 \ifdim \dimen@<\Y@min \Y@min=\dimen@ \fi
 \dimen@=\Y@c\advance\dimen@\B@ \dimen@half
 \ifdim \dimen@>\Y@min \Y@min=\dimen@ \fi
 \fi\fi }
\xydef@\squinedecast@{\halve@dimen\splinedepth@
 \R@c=\L@c \advance\L@c\X@p \halve@dimen\L@c
 \advance\R@c\X@c \halve@dimen\R@c
 \A@=\L@c \advance\A@\R@c \halve@dimen\A@
 \D@c=\U@c \advance\U@c\Y@p \halve@dimen\U@c
 \advance\D@c\Y@c \halve@dimen\D@c
 \B@=\U@c \advance\B@\D@c \halve@dimen\B@
 \begingroup \X@c=\A@ \Y@c=\B@ \splinerec@ \endgroup
 \begingroup \X@c=\A@ \Y@c=\B@ \splinepoint \endgroup
 \X@p=\A@ \L@c=\R@c \Y@p=\B@ \U@c=\D@c \splinerec@}
\xydef@\squinerec@{{\splinefar@false \splinenear@\X@p\X@c\Y@p\Y@c 
 \ifsplinefar@ \aftergroup\squinedecast@ 
 \else \aftergroup\splineadvance@ \fi}}
\xydef@\squineDadvance@@@{\X@p\L@c\Y@p\D@c}
\xydef@\squineplot@maybe{{\X@p=\L@c \Y@p=\U@c \cv@start \the\Edge@c\@ne 
 \ifInside@\aftergroup\splineplot@false\else\aftergroup\splineplot@true\fi}}
\xydef@\setsquinedir@{%
 \d@X=\X@c \advance\d@X-\L@c \d@Y=\Y@c \advance\d@Y-\U@c 
 \dimen@=\ifdim\d@X<\z@-\fi\d@X \ifdim\dimen@<.02\p@
 \dimen@=\ifdim\d@Y<\z@-\fi\d@Y \ifdim\dimen@<.02\p@ 
 \d@X=\X@c \advance\d@X-\X@p \d@Y=\Y@c \advance\d@Y-\Y@p \fi\fi
 \ifdim\X@c=\X@p \ifdim\Y@c=\Y@p 
 \d@X=\L@c \advance\d@X-\X@p \d@Y=\U@c \advance\d@Y-\Y@p \fi\fi
 \setupDirection@ii } 
\xydef@\setsquineknotdir@{%
 \ifdim\zz@\splineval@ \expandafter \setsquinezerodir@
 \else\expandafter \setsquinedir@ \fi } 
\xydef@\setsquinezerodir@{%
 \d@X=\L@c \advance\d@X-\X@p \d@Y=\U@c \advance\d@Y-\Y@p 
 \ifdim\zz@\d@X \ifdim\zz@\d@Y 
 \d@X=\X@c \advance\d@X-\X@p \d@Y=\Y@c \advance\d@Y-\Y@p 
 \fi\fi \setupDirection@ii }
\xydef@\getsquineparams@#1,#2,#3,#4,#5,#6,#7,{%
 \splinelength@=#1\relax\X@p=#2\relax\Y@p=#3\relax
 \A@=#4\relax\B@=#5\relax\X@c=#6\relax\Y@c=#7\relax
}
\xydef@\squineinfo@{%
\expandafter\removePT@\the\X@c\space
\expandafter\removePT@\the\Y@c\space
\expandafter\removePT@\the\A@\space
\expandafter\removePT@\the\B@\space
\expandafter\removePT@\the\X@p\space
\expandafter\removePT@\the\Y@p\space
\expandafter\removePT@\the\dimen5\space\space
\expandafter\removePT@\the\dimen7\space
 }%
\xydef@\squinereverse@{\readsplineparams@
 \expandafter\edef\xysplineparams@{\the\splinelength@,%
 \the\X@c,\the\Y@c,\the\A@,\the\B@,\the\X@p,\the\Y@p,}}%
\xydef@\squine@start@{\setboxz@h\bgroup
 \global\splinelength@=\z@ \global\dimen@i=\z@ \global\dimen3=\z@
 \kern\X@p
 {\squinesetparams@ \X@c=\X@p \Y@c=\Y@p \firstsplinepoint@
 }\bgroup }
\xydef@\squinesetparams@{%
 \global\dimen@i=\X@p \global\dimen3=\Y@p 
 \L@c=\A@ \U@c=\B@ \R@c=\L@c \D@c=\U@c }%
\xydef@\squined@{%
 \expandafter\edef\xysplineparams@{%
 \the\z@,\the\X@p,\the\Y@p,\the\A@,\the\B@,\the\X@c,\the\Y@c,}}
\xydef@\squined@@{%
 \splinedepth@=\p@ 
 \global\splineval@=\z@ 
 \global\dimen@i=\X@p \global\dimen3=\Y@p
 \spline@start 
 \ifx\splinerec@\relax \let\splinerec@=\squinerec@\fi
 \L@c=\A@ \U@c=\B@ \R@c=\L@c \D@c=\U@c 
 \splinerec@ \spline@end }
\xydef@\xycubicbezier@{%
 \addtocrvpts@{\def\crvconnect@{\cubicconnect@}}%
 \xycubicmethods@ \let\splinesegment@=\cubicsegment@
 \begingroup \setcrvobjects@ \xysplineparams@ \splined@@@ 
 \bgroup \setupcubic@ \cubiced@ \splineset@ \savespline@ }
\xydef@\xycubicmethods@{%
 \def\crvconnect@{\cubicconnect@}%
 \def\splinereverse@@{\cubicreverse@@}%
 \let\getsplineparams@=\getcubicparams@
 \let\spline@start@=\cubic@start@
 \let\splinedecast@@=\cubicdecast@
 \let\splinerec@@=\cubicrec@
 \let\splined@@=\cubiced@@
 \let\splineIpt@@=\cubicIpt@
 \let\splineIadvance@@=\cubicIadvance@
 \let\splineoutsidehull@@=\cubicoutsidehull@
 \let\splinetestcvxhull@=\cubictestcvxhull@
 \let\splineinfo@=\cubicinfo@
 \let\setsplinedir@=\setcubicdir@
 \let\setsplineknotdir@=\setcubicknotdir@
 \let\splinereverse@=\cubicreverse@ 
 \let\splineDadvance@@@=\cubicDadvance@@@
 \let\splinesetparams@=\cubicsetparams@
 \let\splineplot@maybe@@=\cubicplot@maybe
 }
\xydef@\cubicconnect@{\splineconnect@ \crvconnect@@
 \let\splinesegment@=\cubicsegment@ }%
\xydef@\cubicsegment@#1{\xycubicmethods@ \def\segmentnum@{1}%
 \setupcubic@ \cubiced@ }
\xydef@\setupcubic@{%
 \xycontrolpt@\z@ \X@p=\X@c \Y@p=\Y@c
 \xycontrolpt@\@ne \A@=\X@c \B@=\Y@c 
 \xycontrolpt@\tw@ \global\dimen3=\X@c \global\dimen5=\Y@c
 \xycontrolpt@\thr@@ 
 \adjustmaxmin@ }
\xydef@\adjustmaxmin@{%
 \ifdim \A@>\X@max \dimen@=\A@ \advance\dimen@\X@p \dimen@half 
 \ifdim\dimen@>\X@max \X@max=\dimen@ \fi \else
 \ifdim \A@<\X@min \dimen@=\A@ \advance\dimen@\X@p \dimen@half 
 \ifdim\dimen@<\X@min \X@min=\dimen@ \fi \fi\fi
 \ifdim \B@>\Y@max \dimen@=\B@ \advance\dimen@\Y@p \dimen@half 
 \ifdim\dimen@>\Y@max \Y@max=\dimen@ \fi \else
 \ifdim \B@<\Y@min \dimen@=\B@ \advance\dimen@\Y@p \dimen@half 
 \ifdim\dimen@<\Y@min \Y@min=\dimen@ \fi \fi\fi
 \ifdim \dimen3>\X@max \dimen@=\dimen3\advance\dimen@\X@c \dimen@half 
 \ifdim\dimen@>\X@max \X@max=\dimen@ \fi \else
 \ifdim \dimen3<\X@min \dimen@=\dimen3\advance\dimen@\X@c \dimen@half 
 \ifdim\dimen@<\X@min \X@min=\dimen@ \fi \fi\fi
 \ifdim \dimen5>\Y@max \dimen@=\dimen5\advance\dimen@\Y@c \dimen@half 
 \ifdim\dimen@>\Y@max \Y@max=\dimen@ \fi \else
 \ifdim \dimen5<\Y@min \dimen@=\dimen5\advance\dimen@\Y@c \dimen@half 
 \ifdim\dimen@<\Y@min \Y@min=\dimen@ \fi \fi\fi
 \dimen@=\A@ \advance\dimen@\dimen3 \dimen@half
 \ifdim\dimen@>\X@max \X@max=\dimen@
 \else \ifdim\dimen@<\X@min \X@min=\dimen@ \fi\fi
 \dimen@=\B@ \advance\dimen@\dimen5 \dimen@half
 \ifdim\dimen@>\Y@max \Y@max=\dimen@
 \else \ifdim\dimen@<\Y@min \Y@min=\dimen@ \fi\fi
}
\xydef@\cubicdecast@{\halve@dimen\splinedepth@
 \A@=\L@c \advance\A@\R@c \halve@dimen\A@
 \advance\R@c\X@c \halve@dimen\R@c
 \B@=\U@c \advance\B@\D@c \halve@dimen\B@
 \advance\D@c\Y@c \halve@dimen\D@c
 \advance\L@c\X@p \halve@dimen\L@c
 \advance\U@c\Y@p \halve@dimen\U@c
 \begingroup 
 \X@c=\R@c \advance\X@c\L@c \halve@dimen\X@c
 \advance\X@c\A@ \halve@dimen\X@c
 \Y@c=\D@c \advance\Y@c\U@c \halve@dimen\Y@c
 \advance\Y@c\B@ \halve@dimen\Y@c
 \R@c=\L@c \advance\R@c\A@ \halve@dimen\R@c
 \D@c=\U@c \advance\D@c\B@ \halve@dimen\D@c
 \bgroup \splinerec@ 
 \egroup \splinepoint \endgroup 
 \X@p=\L@c \advance\X@p\R@c \halve@dimen\X@p
 \advance\X@p\A@ \halve@dimen\X@p
 \L@c=\R@c \advance\L@c\A@ \halve@dimen\L@c
 \Y@p=\U@c \advance\Y@p\D@c \halve@dimen\Y@p
 \advance\Y@p\B@ \halve@dimen\Y@p
 \U@c=\D@c \advance\U@c\B@ \halve@dimen\U@c
 \splinerec@ }
\xydef@\cubicrec@{{\splinefar@false \splinenear@\X@p\X@c\Y@p\Y@c 
 \ifsplinefar@ \aftergroup\cubicdecast@
 \else \aftergroup\splineadvance@ \fi}}
\xydef@\cubicDadvance@@@{\X@p\X@c\Y@p\Y@c}
\xydef@\cubicplot@maybe{{\X@p=\L@c \Y@p=\U@c \cv@start \the\Edge@c\@ne 
 \ifInside@\aftergroup\cubicplot@maybeii\else\aftergroup\splineplot@true\fi}}
\xydef@\cubicplot@maybeii{{\X@p=\R@c \Y@p=\D@c \cv@start \the\Edge@c\@ne 
 \ifInside@\aftergroup\splineplot@false\else\aftergroup\splineplot@true\fi}}
\xydef@\cubiced@@{%
 \splinedepth@=\p@ 
 \global\splineval@=\z@ 
 \spline@start 
 \global\dimen@i=\X@p \global\dimen3=\Y@p
 \splinerec@ \spline@end }
\xydef@\setcubicdir@{%
 \ifdim\splinedepth@<.001\p@\DN@{\cubiccoarsedir@}%
 \else\DN@{\cubicfinedir@}\fi \next@ }
\xydef@\cubicfinedir@{%
 \d@X=\X@c \advance\d@X-\R@c \d@Y=\Y@c \advance\d@Y-\D@c 
 \ifdim\zz@\d@X \ifdim\zz@\d@Y 
 \d@X=\X@c \advance\d@X-\L@c \d@Y=\Y@c \advance\d@Y-\U@c 
 \ifdim\zz@\d@X \ifdim\zz@\d@Y 
 \d@X=\X@c \advance\d@X-\X@p \d@Y=\Y@c \advance\d@Y-\Y@p 
 \fi\fi \fi\fi
 \setupDirection@ii 
\splinetrace@{dir:(\the\d@X,\the\d@Y),\the\Direction; depth:\the\splinedepth@}%
} 
\xydef@\cubiccoarsedir@{%
 \d@X=\X@c \advance\d@X-\X@p \d@Y=\Y@c \advance\d@Y-\Y@p \setupDirection@ii
 \global\dimen5=\d@X \global\dimen7=\d@Y
\splinetrace@{dir:(\the\d@X,\the\d@Y),\the\Direction; depth:\the\splinedepth@}%
}
\xydef@\setcubicknotdir@{%
 \ifdim\zz@\splineval@ \DN@{\setcubiczerodir@}%
 \else \DN@{\cubicfinedir@}\fi \next@ } 
\xydef@\setcubiczerodir@{%
 \d@X=\L@c \advance\d@X-\X@p \d@Y=\U@c \advance\d@Y-\Y@p 
 \ifdim\zz@\d@X \ifdim\zz@\d@Y 
 \d@X=\R@c \advance\d@X-\X@p \d@Y=\D@c \advance\d@Y-\Y@p 
 \ifdim\zz@\d@X \ifdim\zz@\d@Y 
 \d@X=\X@c \advance\d@X-\X@p \d@Y=\Y@c \advance\d@Y-\Y@p 
 \fi\fi \fi\fi \setupDirection@ii }
\xydef@\getcubicparams@#1,#2,#3,#4,#5,#6,#7,#8,#9,{%
 \splinelength@=#1\relax\X@p=#2\relax\Y@p=#3\relax\L@c=#4\relax
 \U@c=#5\relax\R@c=#6\relax\D@c=#7\relax\X@c=#8\relax\Y@c=#9\relax
}%
\xydef@\cubicinfo@{%
\expandafter\removePT@\the\X@p\space
\expandafter\removePT@\the\Y@p\space
\expandafter\removePT@\the\L@c\space
\expandafter\removePT@\the\U@c\space
\expandafter\removePT@\the\R@c\space
\expandafter\removePT@\the\D@c\space
\expandafter\removePT@\the\X@c\space
\expandafter\removePT@\the\Y@c\space
\expandafter\removePT@\the\dimen5\space\space
\expandafter\removePT@\the\dimen7\space
 }%
\xydef@\cubicreverse@{\readsplineparams@
 \expandafter\edef\xysplineparams@{\the\splinelength@,%
 \the\X@c,\the\Y@c,\the\R@c,\the\D@c,\the\L@c,\the\U@c,\the\X@p,\the\Y@p,}}%
\xydef@\cubicreverse@@{%
 \splinereverse@@@ 
 \dimen@ii=\L@c \L@c=\R@c \R@c=\dimen@ii 
 \dimen@ii=\U@c \U@c=\D@c \D@c=\dimen@ii }
\xydef@\cubic@start@{\setboxz@h\bgroup
 \global\splinelength@=\z@ \global\dimen@i=\z@ \global\dimen3=\z@
 \kern\X@p
 {\cubicsetparams@ \X@c=\X@p \Y@c=\Y@p \R@c=\X@c \D@c=\Y@c
 \firstsplinepoint@ }\bgroup 
}
\xydef@\cubicsetparams@{%
 \expandafter\expandafter\expandafter\getsplineparams@\xysplineparams@
 \global\dimen@i=\X@p \global\dimen3=\Y@p }
\xydef@\cubiced@{%
 \expandafter\edef\xysplineparams@{\the\z@,\the\X@p,\the\Y@p
 ,\the\A@,\the\B@,\the\dimen3,\the\dimen5,\the\X@c,\the\Y@c,}%
 }%
\xydef@\xybspline@iii{%
 \addtocrvpts@{\def\crvconnect@{\bsplineiiiconnect@}}%
 \def\crvconnect@{\bsplineiiiconnect@}\xybsplinemethods@ 
 \let\splinesegment@=\bsplinesegment@iii
 \begingroup\setcrvobjects@ \dobspline@ \savespline@ }
\xydef@\bsplineiiiconnect@{\splineconnect@ \crvconnect@@
 \let\splinesegment@=\bsplinesegment@iii }%
\xydef@\xybspline@iv{%
 \addtocrvpts@{\def\crvconnect@{\bsplineivconnect@}}%
 \def\crvconnect@{\bsplineivconnect@}\xybsplinemethods@
 \let\splinesegment@=\bsplinesegment@iv
 \begingroup\setcrvobjects@ \dobspline@ \savespline@ }
\xydef@\bsplineivconnect@{\splineconnect@ \crvconnect@@
 \let\splinesegment@=\bsplinesegment@iv }%
\xydef@\xybspline@{%
\splinetrace@{B-spline with \numcontrolpts\space control points.}%
 \addtocrvpts@{\def\crvconnect@{\bsplineconnect@}}%
 \def\crvconnect@{\bsplineconnect@}\xybsplinemethods@ 
 \let\splinesegment@=\bsplinesegment@ 
 \begingroup\setcrvobjects@
 \dobspline@ \savespline@ }
\xydef@\xybsplinemethods@{%
 \def\splinereverse@@{\cubicreverse@@}%
 \let\getsplineparams@=\getbsplineparams@
 \let\spline@start@=\cubic@start@
 \let\splinedecast@@=\cubicdecast@
 \let\splinerec@@=\cubicrec@
 \let\splineIpt@@=\cubicIpt@
 \let\splineIadvance@@=\cubicIadvance@
 \let\splined@@=\bsplined@@
 \let\splineinfo@=\cubicinfo@
 \let\setsplinedir@=\setcubicdir@
 \let\setsplineknotdir@=\setcubicknotdir@
 \let\splinereverse@=\cubicreverse@ 
 \let\splineDadvance@@@=\cubicDadvance@@@
 \let\splinesetparams@=\cubicsetparams@
 \global\let\lastbspline@=\lastbspline@@
 \global\let\middlebspline@=\middlebspline@@
}
\xydef@\bsplined@@{%
 \splinedepth@=\p@ 
 \global\splineval@=\z@ 
 \spline@start 
 \global\dimen@i=\X@p \global\dimen3=\Y@p
 \splinerec@ \spline@end }
\xydef@\bsplineconnect@{\splineconnect@ \crvconnect@@
 \let\splinesegment@=\bsplinesegment@ }%
\xydef@\getbsplineparams@{\getcubicparams@}
\xydef@\dobspline@{\xysplineparams@ \scanbspline@ \firstbspline@ }%
\xydef@\firstbspline@{%
 \enter@{\pfromthep@ \cfromthec@}\enter@{\cfromthec@}\bgroup
 \def\segmentnum@{1}\xycontrolpt@\z@ \X@p=\X@c \Y@p=\Y@c
\splinetrace@{0: \the\X@p, \the\Y@p}%
 \xycontrolpt@\@ne \A@=\X@c \B@=\Y@c 
\splinetrace@{1: \the\X@c, \the\Y@c}%
 \xycontrolpt@\tw@ 
\splinetrace@{2: \the\X@c, \the\Y@c}%
 \dimen@=\X@c \advance\dimen@\A@ \dimen@half
 \global\dimen3=\dimen@
 \dimen@=\Y@c \advance\dimen@\B@ \dimen@half
 \global\dimen5=\dimen@
 \xycontrolpt@{3}%
\splinetrace@{3: \the\X@c, \the\Y@c}%
 \expandafter\count@\xycrvcnt@\relax
 \ifnum\count@=3\relax 
 \advance\X@c-\A@ \dimen@nth4\X@c
 \advance\X@c\dimen3\relax
 \advance\Y@c-\B@ \dimen@nth4\Y@c
 \advance\Y@c\dimen5\relax
 \enter@{\X@p=\the\X@c \Y@p=\the\Y@c \crv@cnt@=\@ne\relax
 \noexpand\lastbspline@ }%
 \else 
 \advance\X@c 7\dimen3 \advance\X@c-2\A@ 
 \dimen@nth6\X@c
 \advance\Y@c 7\dimen5 \advance\Y@c-2\B@ 
 \dimen@nth6\Y@c
 \enter@{\X@p=\the\X@c \Y@p=\the\Y@c \crv@cnt@=\@ne\relax
 \noexpand\middlebspline@ }%
 \fi \adjustmaxmin@ \czeroEdge@
 \bsplined@ \splineset@ \leave@ }
\xydef@\lastbspline@@{\bgroup 
 \advance\crv@cnt@\@ne \edef\segmentnum@{\the\crv@cnt@}%
\splinetrace@{<: \the\X@p, \the\Y@p}%
 \advance\crv@cnt@\@ne \xycontrolpt@{\crv@cnt@}%
 \global\dimen3=\X@c \global\dimen5=\Y@c
\splinetrace@{\the\crv@cnt@: \the\X@c, \the\Y@c}%
 \advance\crv@cnt@\m@ne \xycontrolpt@{\crv@cnt@}%
\splinetrace@{\the\crv@cnt@: \the\X@c, \the\Y@c}%
 \A@=\X@c \advance\A@\dimen3 \halve@dimen\A@
 \B@=\Y@c \advance\B@\dimen5 \halve@dimen\B@
 \adjustmaxmin@ \leave@ \relax \cv@end
\splinetrace@{>: \the\X@c, \the\Y@c}%
 \bsplined@ \splineset@ \leave@ }%
\xylet@\lastbspline@=\lastbspline@@
\xydef@\middlebspline@@{%
 \advance\crv@cnt@\@ne \edef\segmentnum@{\the\crv@cnt@}%
\splinetrace@{<: \the\X@p, \the\Y@p}%
 \bgroup 
 \xycontrolpt@{\crv@cnt@}\A@=2\X@c \B@=2\Y@c
\splinetrace@{\the\crv@cnt@: \the\X@c, \the\Y@c}%
 \advance\crv@cnt@\@ne \xycontrolpt@{\crv@cnt@}%
\splinetrace@{\the\crv@cnt@: \the\X@c, \the\Y@c}%
 \advance\A@\X@c \dimen@nth3\A@
 \advance\B@\Y@c \dimen@nth3\B@
 \advance\X@c\A@ \halve@dimen\X@c
 \advance\Y@c\B@ \halve@dimen\Y@c
 \global\dimen3=\X@c \global\dimen5=\Y@c 
 \advance\crv@cnt@\@ne \xycontrolpt@{\crv@cnt@}%
\splinetrace@{\the\crv@cnt@: \the\X@c, \the\Y@c}%
 \expandafter\count@\xycrvcnt@\relax 
 \ifnum\crv@cnt@<\count@\relax 
 \advance\X@c 7\dimen3\advance\X@c-2\A@
 \dimen@nth6\X@c
 \advance\Y@c 7\dimen5\advance\Y@c-2\B@
 \dimen@nth6\Y@c
 \enter@{\X@p=\the\X@c \Y@p=\the\Y@c \crv@cnt@=\segmentnum@\relax
 \noexpand\middlebspline@}%
 \else 
 \advance\X@c-\A@ \dimen@nth4\X@c
 \advance\X@c \dimen3\relax
 \advance\Y@c-\B@ \dimen@nth4\Y@c
 \advance\Y@c \dimen5\relax
 \enter@{\X@p=\the\X@c \Y@p=\the\Y@c \noexpand\lastbspline@}%
 \fi \adjustmaxmin@ 
 \bsplined@ \splineset@ \leave@ } 
\xylet@\middlebspline@=\middlebspline@@
\xydef@\scanbspline@{\splined@@@}
\xydef@\bsplined@{\cubiced@ 
 \expandafter\ifx\xysplineedges@\relax\relax\DN@{}%
 \else\DN@{\adjustbsplineedges@}\fi \next@ }
\xydef@\adjust@forsegments@{\getcrvsegsnum@ 
 \ifnum\count@>\@ne
\splinetrace@{adjust for \the\count@\space segments:
 \the\dimen5, \the\dimen7}%
 \multiply\dimen5 by \count@\relax \dimen@=\segmentnum@\p@
 \ifnum\dimen5>\dimen@ \relax\dimen5=\p@
 \else \advance\dimen5-\segmentnum@\p@ \advance\dimen5 by\p@ \fi
 \ifnum\dimen5<\z@ \relax\dimen5=\z@\relax\fi
 \multiply\dimen7 by \count@\relax
 \dimen@=\segmentnum@\p@
 \ifnum\dimen7<\dimen@ \advance\dimen@-\p@
 \ifnum\dimen7>\dimen@ \advance\dimen7-\dimen@
 \else \dimen7=\z@ \fi
 \else \dimen7=\p@ \fi
\splinetrace@{adjusted for \the\count@\space segments:
 \the\dimen5, \the\dimen7}%
 \fi}
\xydef@\adjustbsplineedges@{\bgroup
\splinetrace@{** adjusting edges **}%
 \readsplineparams@ \adjust@forsegments@
\splinetrace@{params:\xysplineparams@}%
\splinetrace@{segment \segmentnum@:<\the\dimen5,\the\dimen7>:\xysplineedges@}%
 \multiply\dimen7by\m@ne \advance\dimen7by\p@
 \expandafter\edef\xysplineedges@{%
 \noexpand\z@;\the\dimen5,\noexpand\z@;\the\dimen7,}%
 \edef\tmp@{\egroup 
 \noexpand\def\expandafter\noexpand\xysplineedges@{\xysplineedges@}}%
 \tmp@ }
\xydef@\bsegment@@ii@iii{%
 \xycontrolpt@{\count@@}\global\dimen3=\X@c \global\dimen5=\Y@c
\splinetrace@{\the\count@@: \the\X@c, \the\Y@c}%
 \advance\count@@\@ne \xycontrolpt@{\count@@}\A@=\X@c \B@=\Y@c
 \advance\A@ by2\dimen3 \dimen@nth3\A@
 \advance\B@ by2\dimen5 \dimen@nth3\B@
 \dimen@=\dimen3 \advance\dimen@ by2\X@c
 \dimen@nth3\dimen@
 \global\dimen3=\dimen@
 \dimen@=\dimen5 \advance\dimen@ by2\Y@c
 \dimen@nth3\dimen@
 \global\dimen5=\dimen@
\splinetrace@{<: \the\dimen3, \the\dimen5}%
\splinetrace@{>: \the\A@, \the\B@}%
 \advance\count@@\m@ne }
\xydef@\bsegment@@i{\bgroup
 \advance\count@@\m@ne \xycontrolpt@{\count@@}%
\splinetrace@{\the\count@@: \the\X@c, \the\Y@c}%
 \edef\tmp@{\egroup \X@p=\the\X@c \Y@p=\the\Y@c}\tmp@
 \advance\X@p-2\dimen3\advance\X@p by7\A@
 \dimen@nth6\X@p
 \advance\Y@p-2\dimen5\advance\Y@p by7\B@ 
 \dimen@nth6\Y@p
}
\xydef@\bsegment@@iv{%
 \advance\count@@\tw@ \xycontrolpt@{\count@@}%
\splinetrace@{\the\count@@: \the\X@c, \the\Y@c}%
 \advance\X@c by7\dimen3\advance\X@c-2\A@ 
 \dimen@nth6\X@c
 \advance\Y@c by7\dimen5\advance\Y@c-2\B@ 
 \dimen@nth6\Y@c
\splinetrace@{>>: \the\X@c, \the\Y@c }%
}
\xydef@\bsegment@@ii@i{\bgroup
 \advance\count@@\m@ne \xycontrolpt@{\count@@}%
\splinetrace@{\the\count@@: \the\X@c, \the\Y@c}%
 \edef\tmp@{\egroup \X@p=\the\X@c \Y@p=\the\Y@c}\tmp@
 \advance\X@p-\dimen3\advance\X@p by4\A@ 
 \dimen@nth4\X@p
 \advance\Y@p-\dimen5\advance\Y@p by4\B@ 
 \dimen@nth4\Y@p
\splinetrace@{<<: \the\X@p, \the\Y@p}%
}
\xydef@\bsegment@@y@iv{%
 \advance\count@@\tw@ \xycontrolpt@{\count@@}%
\splinetrace@{\the\count@@: \the\X@c, \the\Y@c}%
 \advance\X@c by4\dimen3\advance\X@c-\A@ 
 \dimen@nth4\X@c
 \advance\Y@c by4\dimen5\advance\Y@c-\B@ 
 \dimen@nth4\Y@c
}
\xydef@\bsegment@i{%
 \xycontrolpt@\z@ \X@p=\the\X@c \Y@p=\the\Y@c
\splinetrace@{0: \the\X@p \the\Y@p}%
 \xycontrolpt@\@ne
\splinetrace@{1: \the\X@c, \the\Y@c}\A@=\X@c \B@=\Y@c 
 \xycontrolpt@\tw@
 \dimen@=\X@c \advance\dimen@\A@ \dimen@half
 \global\dimen3=\dimen@
\splinetrace@{2: \the\X@c, \the\Y@c}%
 \dimen@=\Y@c \advance\dimen@\B@ \dimen@half
 \global\dimen5=\dimen@ }
\xydef@\bsegment@i@iv{%
 \xycontrolpt@{3}%
\splinetrace@{3: \the\X@c, \the\Y@c}%
 \advance\X@c by7\dimen3\advance\X@c-2\A@ 
 \dimen@nth6\X@c
 \advance\Y@c by7\dimen5\advance\Y@c-2\B@ 
 \dimen@nth6\Y@c
 }
\xydef@\bsegment@z{%
 \expandafter\count@@\xycrvptsnum@ \advance\count@@\@ne 
 \xycontrolpt@{\the\count@@}\relax
\splinetrace@{\the\count@@: \the\X@c, \the\Y@c}%
 \advance\count@@\m@ne
 \bgroup
 \xycontrolpt@{\the\count@@}%
\splinetrace@{\the\count@@: \the\X@c, \the\Y@c}%
 \global\dimen3=\X@c \global\dimen5=\Y@c
 \advance\count@@\m@ne \xycontrolpt@{\the\count@@}%
\splinetrace@{\the\count@@: \the\X@c, \the\Y@c}%
 \A@=\X@c \advance\A@\dimen3 \halve@dimen\A@
 \B@=\Y@c \advance\B@\dimen5 \halve@dimen\B@
 \edef\tmp@{\egroup \A@=\the\A@ \B@=\the\B@ \count@@=\the\count@@}%
 \tmp@ }
\xydef@\bsegment@z@i{%
 \expandafter\count@@\xycrvptsnum@\relax\advance\count@@-\tw@ 
 \bgroup
 \xycontrolpt@{\count@@}\X@p=\the\X@c \Y@p=\the\Y@c
\splinetrace@{\the\count@@: \the\X@c, \the\Y@c}%
 \advance\X@p by7\A@ \advance\X@p-2\dimen3 \dimen@nth6\X@p
 \advance\Y@p by7\B@ \advance\Y@p-2\dimen5 \dimen@nth6\Y@p
 \edef\tmp@{\egroup \X@p=\the\X@p \Y@p=\the\Y@p}%
 \tmp@ }
\xydef@\bsplinesegment@#1{\xybsplinemethods@ 
 \count@@=#1\relax 
 \ifnum\count@@=\@ne
 \bsegment@i \bsegment@i@iv
 \else\ifnum\count@@=\tw@
 \bsegment@@ii@iii \bsegment@@ii@i \bsegment@@iv
 \else\expandafter\count@\xycrvptsnum@\advance\count@\m@ne
 \ifnum\count@@=\count@
 \bsegment@z \bsegment@z@i 
 \else\advance\count@\m@ne
 \ifnum\count@@=\count@
 \bsegment@@ii@iii \bsegment@@i \bsegment@@y@iv
 \else
 \bsegment@@ii@iii \bsegment@@i \bsegment@@iv
 \fi\fi\fi\fi 
 \expandafter\def\expandafter\segmentnum@\expandafter{\number#1}%
 \bsplined@ }
\xydef@\bsplinesegment@iii#1{\xybsplinemethods@ 
\splinetrace@{2 segments; \number#1}%
 \count@@=#1\relax 
 \ifnum\count@@=\@ne \bsegment@i 
 \xycontrolpt@{3}%
\splinetrace@{3: \the\X@c, \the\Y@c}%
 \advance\X@c 4\dimen3\advance\X@c-\A@ 
 \dimen@nth4\X@c
 \advance\Y@c 4\dimen5\advance\Y@c-\B@ 
 \dimen@nth4\Y@c
 \else\ifnum\count@@=\tw@ \bsegment@z 
 \bgroup\xycontrolpt@{\@ne}%
\splinetrace@{1: \the\X@c, \the\Y@c}%
 \edef\tmp@{\egroup \X@p=\the\X@c \Y@p=\the\Y@c}\tmp@
 \advance\X@p 4\A@ \advance\X@p-\dimen3
 \dimen@nth4\X@p
 \advance\Y@p 4\B@ \advance\Y@p-\dimen5
 \dimen@nth4\Y@p
 \fi\fi
 \expandafter\def\expandafter\segmentnum@\expandafter{\number#1}%
 \bsplined@ }
\xydef@\bsplinesegment@iv#1{\xybsplinemethods@ 
\splinetrace@{3 segments; \number#1}%
 \count@@=#1\relax
 \ifnum\count@@=\@ne \bsegment@i \bsegment@i@iv
 \else\ifnum\count@@=\tw@
 \bsegment@@ii@iii \bsegment@@ii@i \bsegment@@y@iv
 \else\ifnum\count@@=3\relax
 \bsegment@z \bsegment@z@i
 \fi\fi\fi 
 \expandafter\def\expandafter\segmentnum@\expandafter{\number#1}%
 \bsplined@ }
\message{circles,}
\xydef@\Circmagic@@{0.5517847}
\xylet@\Circmagic=\Circmagic@@
\xydef@\twoPi@{6.2831852}
\xydef@\fullPi@{3.1415926}
\xydef@\halfPi@{1.5707963}
\xynew@{dimen}\L@
\xydef@\xycircle#1#{\hbox\bgroup\afterVECTORorEMPTY{%
 \xy@@{\R@=\X@c \L@=\Y@c}\xycircle@}{\xy@@{\R@=\R@c \L@=\L@c}\xycircle@}#1@}
\xydef@\xycircle@#1@#2{%
 \DN@{#1}\ifx\next@\empty\def\onlyQuad@{}\else \count@=#1\relax 
 \ifnum\count@<5 \advance\count@-3\relax 
 \ifnum\count@<\z@ \advance\count@ 4\relax\fi \edef\onlyQuad@{\the\count@}%
 \else\xyerror@{illegal circle <radius>: must be <vector> or <empty>}{}\fi
 \fi \xy@@{\def\circleSTYLE@{#2}}\def\circleSTYLE@{#2}\xycircle@i}
\xydef@\xycircle@i{\hbox{\vbox{\vskip\L@
 \hbox to2\R@{\hfill \buildcircle@ \hfill}\vskip\L@ }}%
 \L@c=\R@ \R@c=\R@ \D@c=\L@ \U@c=\L@ \def\Leftness@{.5}\def\Upness@{.5}%
 \def\Drop@@{\styledboxz@}\def\Connect@@{\straight@\relax}\Edge@c={\circleEdge}%
 \OBJECT@x}
\xydef@\adjustMinMaxcirc@#1#2{%
 \dimen@=\X@c \advance\dimen@#1\relax\ifdim\dimen@>\X@max \X@max=\dimen@\fi
 \dimen@=\X@c \advance\dimen@-#1\relax\ifdim\dimen@<\X@min \X@min=\dimen@\fi
 \dimen@=\Y@c \advance\dimen@#2\relax\ifdim\dimen@>\Y@max \Y@max=\dimen@\fi
 \dimen@=\Y@c \advance\dimen@-#2\relax\ifdim\dimen@<\Y@min \Y@min=\dimen@\fi
}
%% \cubicCircleControls@@ 
\xydef@\cubicCircleControls@@{\X@origin=\z@ \Y@origin=\z@
 \X@xbase=\R@ \Y@xbase=\z@ \X@ybase=\z@ \Y@ybase=\L@
 \vfromcartesian@@1,0@\czeroEdge@\idfromc@{0@c}%
 \vfromcartesian@@0,1@\czeroEdge@\idfromc@{1@c}%
 \vfromcartesian@@-1,0@\czeroEdge@\idfromc@{2@c}%
 \vfromcartesian@@0,-1@\czeroEdge@\idfromc@{3@c}%
 \vfromcartesian@@1,\Circmagic@@ @\czeroEdge@\idfromc@{1@m}%
 \vfromcartesian@@\Circmagic@@,1@\czeroEdge@\idfromc@{2@m}%
 \vfromcartesian@@-\Circmagic@@,1@\czeroEdge@\idfromc@{3@m}%
 \vfromcartesian@@-1,\Circmagic@@ @\czeroEdge@\idfromc@{4@m}%
 \vfromcartesian@@-1,-\Circmagic@@ @\czeroEdge@\idfromc@{5@m}%
 \vfromcartesian@@-\Circmagic@@,-1@\czeroEdge@\idfromc@{6@m}%
 \vfromcartesian@@\Circmagic@@,-1@\czeroEdge@\idfromc@{7@m}%
 \vfromcartesian@@1,-\Circmagic@@ @\czeroEdge@\idfromc@{8@m}%
 }
\xydef@\doCircleQuadrant@@#1#2{\save@ \ifcase#2\relax
 \doCircleQuadrant@@@{0@c}{1@m}{2@m}{1@c}{#1}\or
 \doCircleQuadrant@@@{1@c}{3@m}{4@m}{2@c}{#1}\or
 \doCircleQuadrant@@@{2@c}{5@m}{6@m}{3@c}{#1}\or
 \doCircleQuadrant@@@{3@c}{7@m}{8@m}{0@c}{#1}\or
 \doCircleQuadrant@@@{0@c}{1@m}{2@m}{1@c}{#1}\or
 \doCircleQuadrant@@@{1@c}{3@m}{4@m}{2@c}{#1}\or
 \doCircleQuadrant@@@{2@c}{5@m}{6@m}{3@c}{#1}\or
 \doCircleQuadrant@@@{3@c}{7@m}{8@m}{0@c}{#1}\fi \leave@ }
\xydef@\doCircleQuadrant@@@#1#2#3#4#5{%
 \cfromid@{#1}\pfromc@\senter@
 \cfromid@{#2}\spushc@\cfromid@{#3}\spushc@\cfromid@{#4}%
 \let\bstartPLACE@=\empty \connect@\crvs{#5}\relax\sinit@\sleave@
 \resetbreaks@}
\xydef@\dosolidcircle@#1{%
 \cubicCircleControls@@ 
 \doCircleQuadrant@@{#1}1 \relax\Clast@@
 \doCircleQuadrant@@{#1}2 \relax\Clast@@
 \doCircleQuadrant@@{#1}3 \relax\Clast@@
 \doCircleQuadrant@@{#1}4 \relax\Clast@@}%
\xydef@\solidcircle@{\dosolidcircle@@}
\xylet@\dosolidcircle@@=\dosolidcircle@
\xydef@\circledobjects@{\cubicCircleControls@@ 
 \setboxz@h{\expandafter\object\circleSTYLE@{}}%
 \ifdim\L@>\R@ \dimen@ii=\ht\z@ \advance\dimen@ii \dp\z@
 \ifdim\zz@\dimen@ii \dimen@ii=\wdz@\fi
 \else \dimen@ii=\wdz@ 
 \ifdim\zz@\dimen@ii \dimen@ii=\ht\z@ \advance\dimen@ii \dp\z@\fi
 \fi \ifdim\zz@\dimen@ii \dimen@ii=2\jot\fi
 \expandafter\dimen@\ifdim\L@>\R@ \twoPi@\L@\else \twoPi@\R@\fi
 \advance\dimen@.5\dimen@ii
 \count@@=\dimen@ \count@=\dimen@ii \divide\count@@\count@
 \edef\numobjects{\the\count@@}\dimen@=4\p@
 \dimen@nth\numobjects\dimen@
 \edef\circleseparation@{\expandafter\removePT@\the\dimen@}%
 \edef\circleplace@{-\circleseparation@}\placeQuadrants@}%
\xydef@\placeQuadrants@{\DN@{\placeAllQuadrants@}%
 \ifx\onlyQuad@\undefined\else\ifx\onlyQuad@\empty\else
 \DN@{\expandafter\placeCircQuadrant@\expandafter{\onlyQuad@}}%
 \fi\fi \next@ }%
\xydef@\placeAllQuadrants@{%
 \placeCircQuadrant@{1}%
 \advance\dimen@-\p@\advance\dimen@-\circleseparation@\p@
 \edef\circleplace@{\expandafter\removePT@\the\dimen@}%
 \placeCircQuadrant@{2}%
 \advance\dimen@-\p@\advance\dimen@-\circleseparation@\p@
 \edef\circleplace@{\expandafter\removePT@\the\dimen@}%
 \placeCircQuadrant@{3}%
 \advance\dimen@-\p@\advance\dimen@-\circleseparation@\p@
 \edef\circleplace@{\expandafter\removePT@\the\dimen@}%
 \placeCircQuadrant@{4}}
\xydef@\placeCircQuadrant@#1{%
 \let\bstartPLACE@=\relax \doCircleQuadrant@@{}#1%
 \loop@
 \expandafter\dimen@\circleplace@\p@
 \advance\dimen@\circleseparation@\p@
 \edef\circleplace@{\expandafter\removePT@\the\dimen@}%
 \ifdim\dimen@<\p@ \placeCircObject@
 \repeat@ }
\xydef@\placeCircObject@{\begingroup
 \crvconnect@@ \Creset@@ \Invisible@false
 \expandafter\splinealong@\expandafter{\circleplace@}%
 \expandafter\drop\circleSTYLE@{}\endgroup }
\xydef@\buildcircle@{\save@
 \DNii@{\circledobjects@}%
 \ifx\circleSTYLE@\empty\DNii@{\solidcircle@{}}%
 \else \expandafter\DN@\expandafter{\addDASH@{}}\relax
 \ifx\next@\circleSTYLE@ \DNii@{\solidcircle@{}}%
 \else \expandafter\DN@\expandafter{\addEQ@{}}%
 \ifx\next@\circleSTYLE@ 
 \expandafter\circletemplate@\expandafter{\addEQ@{}}{}%
 \else \expandafter\DN@\expandafter{\addDASH@ 2}%
 \ifx\next@\circleSTYLE@ \DNii@{\doublecircle@{}}%
 \else \expandafter\DN@\expandafter{\addDASH@ 3}%
 \ifx\next@\circleSTYLE@ \DNii@{\triplecircle@{}}%
 \else \expandafter\expandafter\expandafter\DN@\expandafter\expandafter
 \expandafter{\expandafter\addDASH@\addDASH@{}}%
 \ifx\next@\circleSTYLE@ \DNii@{\dashedcircle@{}}%
 \else \expandafter\expandafter\expandafter\DN@\expandafter\expandafter
 \expandafter{\expandafter\addEQ@\addEQ@{}}%
 \ifx\next@\circleSTYLE@ \expandafter\expandafter\expandafter
 \circletemplate@\expandafter\expandafter\expandafter{%
 \expandafter\addEQ@\addEQ@{}}2%
 \else \expandafter\expandafter\expandafter\DN@\expandafter\expandafter
 \expandafter{\expandafter\addEQ@\addEQ@2}%
 \ifx\next@\circleSTYLE@ \expandafter\expandafter\expandafter
 \circletemplate@\expandafter\expandafter\expandafter{%
 \expandafter\addEQ@\addEQ@{}}2%
 \else \expandafter\expandafter\expandafter\DN@\expandafter\expandafter
 \expandafter{\expandafter\addEQ@\addEQ@3}%
 \ifx\next@\circleSTYLE@ \expandafter\expandafter\expandafter
 \circletemplate@\expandafter\expandafter\expandafter{%
 \expandafter\addEQ@\addEQ@{}}3%
 \else \expandafter\DN@\expandafter{\addDOT@{}}\relax
 \ifx\next@\circleSTYLE@ \DNii@{\dottedcircle@{}}%
 \else \expandafter\DN@\expandafter{\addDOT@2}\relax
 \ifx\next@\circleSTYLE@ \DNii@{\dbldottedcircle@{}}%
 \else \expandafter\DN@\expandafter{\addDOT@3}\relax
 \ifx\next@\circleSTYLE@ \DNii@{\trpldottedcircle@{}}%
 \else \DN@{:}\relax
 \ifx\next@\circleSTYLE@ \DNii@{\dbldottedcircle@{}}%
 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \nextii@ \leave@}
\xydef@\circletemplate@#1#2{\def\circleSTYLE@{\dir#2{#1}}}
\xydef@\doublecircle@#1{%
 \advance\R@-\p@ \advance\L@-\p@ \solidcircle@{}%
 \advance\R@ 2\p@ \advance\L@ 2\p@ \solidcircle@{}}
\xydef@\triplecircle@#1{%
 \advance\R@-2\p@ \advance\L@-2\p@ \solidcircle@{}%
 \advance\R@ 2\p@ \advance\L@ 2\p@ \solidcircle@{}%
 \advance\R@ 2\p@ \advance\L@ 2\p@ \solidcircle@{}}
\xydef@\dottedcircle@#1{%
 \expandafter\def\expandafter\circleSTYLE@\expandafter{%
 \zerodot@i}%
 \circledobjects@}
\xydef@\dashedcircle@#1{%
 \expandafter\def\expandafter\circleSTYLE@\expandafter{\zerodash@i}%
 \circledobjects@}
\xydef@\dbldottedcircle@#1{%
 \advance\R@-\p@ \advance\L@-\p@ \dottedcircle@{}%
 \advance\R@ 2\p@ \advance\L@ 2\p@ \dottedcircle@{}}
\xydef@\trpldottedcircle@{%
 \advance\R@-2\p@ \advance\L@-2\p@ \dottedcircle@{}%
 \advance\R@ 2\p@ \advance\L@ 2\p@ \dottedcircle@{}%
 \advance\R@ 2\p@ \advance\L@ 2\p@ \dottedcircle@{}}
{\xyuncatcodes \gdef\next{=<.75\jot>{\zerodot}}}
\xylet@\zerodot@i=\next
{\dimen0=2\xydashl@ \xyuncatcodes 
\expandafter\gdef\expandafter\next\expandafter{\expandafter
 =\expandafter<\the\dimen0 >_\dir{|}}}
\xylet@\zerodash@i=\next
{\xyuncatcodes\gdef\next{--}}
\xylet@\dashcorntemp@@=\next
{\xyuncatcodes\gdef\next{.}}
\xylet@\dotcorntemp@@=\next
\xydef@\dotcorner@#1{%
 \expandafter\circleCorner@\expandafter{\dotcorntemp@@}{#1}}%
\xydef@\dashcorner@#1{%
 \expandafter\circleCorner@\expandafter{\dashcorntemp@@}{#1}}
\xydef@\circleCorner@#1#2{\setboxz@h\bgroup 
 \edef\next{#2\relax\R@=\the\R@\relax\L@=\R@ }%
 \expandafter\xycircle@\next @{#1}%
 \ifcase#2\or \setboxz@h{\lower\R@\boxz@\kern\X@c}%
 \or \setboxz@h{\kern-\R@\lower\R@\boxz@\kern\R@\kern\X@c}%
 \or \setboxz@h{\kern-\R@\lower\R@\boxz@\kern\R@\kern\X@c}%
 \or \setboxz@h{\lower\R@\boxz@\kern\X@c}\fi
 \wdz@=\R@ \ht\z@=\R@ \dp\z@=\R@ \boxz@
 }
\xydef@\qspline{\hbox\bgroup\crvresetbreaks@ \xy@spline@}
\xydef@\xy@spline@#1#{\if\sempty@ \DN@{\crvs@{}\resetbreaks@}%
 \else\DN@{\xy@spline@i{#1}}\fi \next@ }%
\xydef@\xy@spline@i#1#2{\def\splineSTYLE@{#2}%
 \DN@{\xy@spline@ii}\DNii@{#1}%
 \ifx\nextii@\empty\DN@{\xy@spline@ii@@}\fi \next@ }
\xydef@\xy@spline@ii{\save@ \cfromp@\idfromc@{@p}%
 \enter@\cplusthec@ \count@@=\s@top\advance\count@@\m@ne
 \cfroms@{\count@@}\leave@
 \halve@dimen\X@c
 \halve@dimen\Y@c
 \czeroEdge@ \idfromc@{@c}%
 \expandafter\doSplineStraight@\expandafter{\splineSTYLE@}%
 \count@=\@ne \edef\next@{\the\count@}%
 \ifx\next@\s@top\DN@{\xy@spline@iv}\else\DN@{\xy@spline@iii}\fi 
 \next@ }
\xylet@\xy@spline@ii@@=\xy@spline@ii
\xydef@\xy@spline@iii{\crv@cnt@=\s@top 
 \loop \advance\crv@cnt@\m@ne \xy@spline@g \ifnum\crv@cnt@>\@ne\repeat
 \xy@spline@iv}
\xydef@\xy@spline@g{\cfromid@{@c}\idfromc@{@p}%
 \count@@=\crv@cnt@\cfroms@{\count@@}\idfromc@{@m}%
 \enter@\cplusthec@ \count@@=\crv@cnt@ \advance\count@@\m@ne
 \cfroms@{\count@@}\leave@
 \halve@dimen\X@c
 \halve@dimen\Y@c
 \czeroEdge@\idfromc@{@c}%
 \expandafter\doSplineSegment@\expandafter{\splineSTYLE@}}
\xydef@\xy@spline@iv{\cfromid@{@c}\idfromc@{@p}%
 \cfroms@{\z@}\idfromc@{@m}\leave@ \save@
 \enter@\cplusthec@ \cfromid@{@m}\leave@
 \halve@dimen\X@c
 \halve@dimen\Y@c
 \czeroEdge@\idfromc@{@c}%
 \expandafter\doSplineSegment@\expandafter{\splineSTYLE@}%
 \xy@spline@v }
\xydef@\xy@spline@v{\cfromid@{@c}\idfromc@{@p}%
 \leave@ \save@ \idfromc@{@c}%
 \expandafter\doSplineStraight@\expandafter{\splineSTYLE@}%
 \xy@spline@x }
\xydef@\xy@spline@x{\leave@ 
 \def\Drop@@{\splineDrop@ \resetbreaks@}%
 \def\Connect@@{\straight@\relax\splineConnect@ \resetbreaks@}%
 \OBJECT@x}
\xydef@\splineDrop@{\ifInvisible@\setboxz@h{}%
 \else\setboxz@h{\kern-\the\X@c\raise-\the\Y@c\hbox{\styledboxz@}}\fi
 \wdz@=\z@ \ht\z@=\z@ \dp\z@=\z@ \boxz@ }
\xydef@\splineConnect@{%
 \ifInvisible@\else\box\lastobjectbox@\fi }%
\xydef@\doSplineStraight@#1{\begingroup \sinit@
 \cfromid@{@p}\pfromc@\cfromid@{@c}%
 \connect@\crvs{#1}\relax\sleave@\endgroup }
\xydef@\doSplineSegment@#1{\begingroup \sinit@
 \cfromid@{@p}\pfromc@\senter@\cfromid@{@m}\spushc@\cfromid@{@c}%
 \connect@\crvs{#1}\relax\sinit@\sleave@\endgroup }
\xyendinput

xyframe.tex
%% xyframe.tex from $Id: xyframe.doc,v 3.7 1999/02/16 15:12:50 krisrose Exp $
%%
%% Xy-pic ``Frames and Brackets'' extension.
%% Copyright (c) 1991-1997 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% See the companion README and INSTALL files for further information.
%% Copyright (c) 1991-1997 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, write to the Free Software Foundation, Inc.,
%% 675 Mass Ave, Cambridge, MA 02139, USA.
%%
\ifx\xyloaded\undefined \input xy \fi
\xyprovide{frame}{Frame and Bracket extension}{\stripRCS$Revision: 3.7 $}%
 {Kristoffer H.~Rose}{krisrose@brics.dk}%
 {BRICS/Computer Science, University of Aarhus, Ny Munkegade, building 540,
 DK--8000 Aarhus~C}
\xydef@\frm{\hbox{}\dimen@=\L@c \advance\dimen@\R@c \wdz@=\dimen@
 \ht\z@=\U@c \dp\z@=\D@c \dimen@=\U@c \advance\dimen@\D@c
 \ifdim\wdz@=\z@ \def\Leftness@{.5}\else \quotient@\Leftness@\L@c\wdz@ \fi
 \ifdim\dimen@=\z@ \def\Upness@{.5}\else \quotient@\Upness@\U@c\dimen@ \fi
 \expandafter\Edge@c\expandafter{\prevEdge@@}\let\frmradius@@=\z@
 \def\Drop@@{}%
 \def\Connect@@{\xy@@{\save@\cmerge@\Y@p\X@p\D@p\U@p\L@p\R@p\Drop@@}\restore}%
 \xyFN@\frm@i}
\xylet@\frmradius@@=\z@
\xydef@\frm@i{%
 \addLT@\ifx\next \addGT@{\addLT@\DN@##1}{\def\frmradius@@{##1}\xyFN@\frm@i}%
 \else \DN@##1##{\frm@{##1}}\fi \next@}
\xydef@\frm@#1#2{\DNii@{frm#1{#2}}%
 \expandafter\let\expandafter\next@\csname\codeof\nextii@\endcsname
 \ifx\next@\relax \DNii@{frm{#2}}%
 \expandafter\let\expandafter\next@\csname\codeof\nextii@\endcsname
 \ifx\next@\relax \let\next@=\frm@generic \fi\fi \next@}
\xydef@\frm@generic{\xyerror@{No generic frames yet!}{}}
\xydef@\frmDrop@#1{%
 \ifx\frmradius@@\z@ \addtoDrop@@{\let\frmradius@@=\z@ #1}%
 \else \expandafter\addtoDrop@@\expandafter{%
 \expandafter\def\expandafter\frmradius@@\expandafter{\frmradius@@}#1}\fi}
\xydef@\EdgefromtheEdge@{%
 \U@c=\the\U@c \D@c=\the\D@c \L@c=\the\L@c \R@c=\the\R@c
 \Edge@c={\expandafter\noexpand\the\Edge@c}}
\xydef@\prevEdgefromtheEdge@{%
 \U@c=\the\U@c \D@c=\the\D@c \L@c=\the\L@c \R@c=\the\R@c
 \noexpand\def\noexpand\prevEdge@@{\expandafter\noexpand\the\Edge@c}}
\xydef@\addtoDrop@@#1{%
 \expandafter\def\expandafter\Drop@@\expandafter{\Drop@@#1}}
\xydef@\addbeforeDrop@@#1{\DNii@{#1}%
 \expandafter\DN@\expandafter{\expandafter\nextii@\Drop@@}%
 \expandafter\expandafter\expandafter\def
 \expandafter\expandafter\expandafter\Drop@@
 \expandafter\expandafter\expandafter{\next@}}
\xydefcsname@{frm{}}{}
\xyletcsnamecsname@{frm[]{}}{frm{}}
\xyletcsnamecsname@{frm[o]{}}{frm{}}
\xydefcsname@{frm{.}}{\frmDrop@{\let\zerocorner=\framezerodot@@
 \let\framehfill=\frm@doth@@ \let\framevfill=\frm@dotv@@
 \framed@@{\frmradius@@}}}
\xyletcsnamecsname@{frm[]{.}}{frm{.}}
\xydef@\frm@doth@@{\setboxz@h{\kern5\B@\framezerodot@@\kern5\B@}\ht\z@=\B@
 \dp\z@=\B@\kern5\B@\xleaders\boxz@\hss\kern5\B@}
\xydef@\frm@dotv@@{\setboxz@h to2\B@{\hss\framezerodot@@\hss}\ht\z@=5\B@
 \dp\z@=5\B@\kern5\B@\xleaders\boxz@\vss\kern5\B@}
\xyletcsnamecsname@{frm{..}}{frm{.}}
\xylet@\framezerodot@@=\zerodot
\xydefcsname@{frm{-}}{\frmDrop@{\framed@\frmradius@@}}
\xyletcsnamecsname@{frm[]{-}}{frm{-}}
\xydef@\framed@{\let\zerocorner=\framezerodot@@
 \let\framehfill=\frm@solidh@@ \let\framevfill=\frm@solidv@@ \framed@@}
\xylet@\framesetthick@=\relax
\xydef@\frm@solidh@@{\framesetthick@\leaders\hrule height\B@ depth\B@\hfill}
\xydef@\frm@solidv@@{\framesetthick@\leaders\vrule width2\B@\vfill}
\xydefcsname@{frm{=}}{\frmDrop@{\framed@\frmradius@@
 {\advance\L@c-2\p@ \advance\R@c-2\p@ \advance\U@c-2\p@ \advance\D@c-2\p@
 \dimen@=\frmradius@@
 \ifdim\dimen@>2\p@ \advance\dimen@-2\p@ \else \dimen@=\z@\fi
 \framed@\dimen@}}}
\xyletcsnamecsname@{frm[]{=}}{frm{=}}
\xydef@\framesetthick@line{\B@=.5\xylinethick@}
\xydef@\frm@thickc@@{\hbox{\framesetthick@line
 \vrule height.5\B@ depth.5\B@ width\B@}}
\xywithoption{line}{%
 \let\framezerodot@@\frm@thickc@@ \let\framesetthick@=\framesetthick@line}
\xydef@\framed@@#1{\setboxz@h{\R@=#1\relax 
 \dimen@=\L@c \advance\dimen@\R@c \dimen@ii=\U@c \advance\dimen@ii\D@c
 \ifdim.5\dimen@<\R@ \R@=.5\dimen@ \fi
 \ifdim.5\dimen@ii<\R@ \R@=.5\dimen@ii \fi
 \A@=\X@c \advance\A@-\L@c \B@=\Y@c \advance\B@-\D@c
 \ifdim\R@<\p@\else \cirrestrict@@ \fi
 \dimen@=2\R@ \advance\dimen@-\L@c \advance\dimen@-\R@c
 \ifdim\dimen@>\z@ \advance\A@-.5\dimen@ \fi
 \dimen@=2\R@ \advance\dimen@-\U@c \advance\dimen@-\D@c
 \ifdim\dimen@>\z@ \advance\B@-.5\dimen@ \fi
 \kern\A@ \raise\B@\vbox to \dimen@ii{\framed@body@@}}%
 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \boxz@}
\xydef@\framed@body@{%
 \advance\dimen@ii.22\p@ \advance\dimen@-.2\p@ 
 \setboxz@h{\corn@@4\R@}\A@=-.5\wdz@ \B@=.5\xydashw@
 \dimen@=\L@c \advance\dimen@\R@c \advance\dimen@-.2\p@
 \setboxz@h to\dimen@{\kern\A@ \boxz@ \framehfill\corn@@3\R@\kern\A@}%
 \advance\dimen@ii-\dp\z@ \kern-\ht\z@ \nointerlineskip\boxz@
 \dimen@=\L@c \advance\dimen@\R@c \advance\dimen@-.2\p@
 \setboxz@h to\dimen@{\kern\A@\corn@@1\R@\framehfill\corn@@2\R@\kern\A@}%
 \advance\dimen@ii-\ht\z@
 \dimen@=\L@c \advance\dimen@\R@c \advance\dimen@.2\p@
 \nointerlineskip\hbox to\dimen@{%
 \setbox\z@=\vbox to\dimen@ii{\framevfill}\kern-.5\wdz@\copy\z@
 \hss \copy\z@\kern-.5\wdz@ }%
 \nointerlineskip\boxz@ \vss \kern\z@}
\xylet@\framed@body@@=\framed@body@
\xylet@\zerocorner=\framezerodot@@
\xydef@\solidcorner@#1#2{\hbox\bgroup \R@=#2\relax
 \ifdim\R@<\p@ \zerocorner
 \else \cirrestrict@@ \multiply\count@8
 \setboxz@h{\corn@x@@{#1}}\dimen@=\wdz@
 \ifcase#1\or \ht\z@=\z@ \kern\dimen@ \raise\dimen@\boxz@ 
 \or \ht\z@=\z@ \raise\dimen@\boxz@ \kern\dimen@
 \or \dp\z@=\z@ \lower\dimen@\boxz@ \kern\dimen@
 \or \dp\z@=\z@ \kern\dimen@ \lower\dimen@\boxz@ \fi
 \vrule height\dimen@ depth\dimen@ width\z@\fi
 \edef\tmp@{\egroup \U@c=\the\dimen@}\tmp@ \D@c=\U@c \L@c=\U@c \R@c=\U@c
 \Edge@c={\circleEdge}\ignorespaces}
\xydef@\corn@x@#1{\ifcase#1\or
 \circhar@@\z@ \circhar@@\@ne\or\circhar@@\tw@ \circhar@@3\or
 \circhar@@5\circhar@@4\or\circhar@@7\circhar@@6\fi}
\xylet@\corn@x@@=\corn@x@
\xydef@\corn@@{\DN@{\solidcorner@}%
 \ifx\framehfill\frm@doth@@ \DN@{\let\cirrestrict@@=\relax
 \let\corn@x@@=\dotcorner@@ \let\zerodot=\framezerodot@@
 \solidcorner@ }%
 \else\ifx\framehfill\frm@dashh@@ \DN@{\let\cirrestrict@@=\relax
 \let\corn@x@@=\dashcorner@@ \let\zerodot=\framezerodot@@
 \solidcorner@ }%
 \fi\fi \next@}
\xydef@\dotcorner@@#1{\zerocorner}
\xydef@\dashcorner@@#1{\zerocorner}
\xywithoption{curve}{%
 \let\dotcorner@@=\dotcorner@ \let\dashcorner@@=\dashcorner@}
\xydefcsname@{frm{--}}{%
 \frmDrop@{\let\zerocorner=\framezerodot@@ 
 \let\framehfill=\frm@dashh@@ \let\framevfill=\frm@dashv@@
 \framed@@\frmradius@@}}
\xyletcsnamecsname@{frm[]{--}}{frm{--}}
\xydef@\frm@dashh@@{\setboxz@h{\dashhfillchar}%
 \ht\z@=\B@ \dp\z@=\B@ \wdz@=2\xydashl@
 \copy\z@ \xleaders\copy\z@\hss \boxz@\kern-\xydashl@}
\xydef@\frm@dashv@@{\setboxz@h to2\B@{\hss\dashvfillchar\hss}\ht\z@=\z@
 \dp\z@=2\xydashl@ \nointerlineskip\copy\z@ \xleaders\copy\z@\vss
 \nointerlineskip\boxz@\kern-\xydashl@}%
\xydef@\dashhfillchar{{\rDirection@\xydashl@ \line@@}}
\xydef@\dashvfillchar{{\dDirection@\xydashl@ \line@@}}
\xydefcsname@{frm{o-}}{%
 \ifdim\frmradius@@<2\xydashl@\relax \dimen@=.8\xydashl@
 \expandafter\def\expandafter\frmradius@@\expandafter{\the\dimen@}\fi
 \frmDrop@{\let\zerocorner=\framezerodot@@ 
 \let\framehfill=\frm@rddashh@@ \let\framevfill=\frm@rddashv@@
 \framed@@\frmradius@@}}%
\xydef@\frm@rddashh@@{\setboxz@h{\kern\xydashl@\dashhfillchar}%
 \ht\z@=\B@ \dp\z@=\B@ \copy\z@ \xleaders\copy\z@\hss \boxz@ \kern\xydashl@}
\xydef@\frm@rddashv@@{\ifdim\dimen@ii<2\xydashl@\else
 \setbox\z@=\vbox to2\xydashl@{\hbox to2\B@{\hss\dashvfillchar\hss}\vss}%
 \kern\xydashl@ \copy\z@ \xleaders\copy\z@\vss
 {\ifdim\dimen@ii<2\xydashl@\else\aftergroup\boxz@\fi}\fi}
\xydefcsname@{frm{,}}{%
 \ifx\frmradius@@\z@ \shaded@{1.2\p@}\else \shaded@\frmradius@@ \fi}
\xydef@\shaded@#1{\frmDrop@{\R@=#1\relax
 {\advance\X@c\R@ \advance\Y@c-\D@c \U@c=\z@ \D@c=\R@ \blacked@}%
 {\advance\X@c\R@c \advance\Y@c-\R@ \L@c=\z@ \R@c=\R@ \blacked@}}}
\xydefcsname@{frm{-,}}{\addtoDrop@@{\drop\frm{-}\drop\frm{,}}}
\xydef@\blacked@{\setboxz@h{%
 \A@=\X@c \advance\A@-\L@c \dimen@=\L@c \advance\dimen@\R@c
 \B@=\Y@c \advance\B@-\D@c \dimen@ii=\Y@c \advance\dimen@ii\U@c
 \advance\A@-.5\xydashw@
 \kern\A@ \blacked@@ }%
 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \boxz@}
\xydef@\bblacked@{\setboxz@h{%
 \dimen@=\L@c \advance\dimen@\R@c \B@=-\D@c \dimen@ii=\U@c
 \kern-\L@c \blacked@@ \kern-\dimen@ \kern\L@c}%
 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \boxz@}
\xydef@\blacked@@{\vrule width\dimen@ depth-\B@ height\dimen@ii}
\xydefcsname@{frm{o}}{%
 \ifx\frmradius@@\z@
 \frmDrop@{\dimen@=.5\L@c \advance\dimen@.5\R@c
 \let\framehfill=\frm@solidh@@ \let\framevfill=\frm@solidv@@
 \circled@\dimen@}%
 \else
 \frmDrop@{\let\framehfill=\frm@solidh@@
 \let\framevfill=\frm@solidv@@ \circled@\frmradius@@}%
 \fi}
\xydefcsname@{frm{oo}}{%
 \ifx\frmradius@@\z@
 \frmDrop@{\dimen@=.5\L@c \advance\dimen@.5\R@c
 \let\framehfill=\frm@solidh@@ \let\framevfill=\frm@solidv@@
 {\circled@\dimen@}\advance\dimen@-2.1\p@ \circled@\dimen@}%
 \else
 \frmDrop@{\dimen@=\frmradius@@
 \let\framehfill=\frm@solidh@@ \let\framevfill=\frm@solidv@@
 {\circled@\dimen@}\advance\dimen@-2.1\p@ \circled@\dimen@}%
 \fi}
\xydef@\circled@#1{\setboxz@h\bgroup \R@=#1\relax 
 \setboxz@h{\vbox{\circled@x@@}}%
 \A@=\X@c \advance\A@-.5\wd\z@
 \B@=\Y@c \advance\B@-.5\ht\z@ \advance\B@.5\dp\z@ \advance\B@.2\p@
 \edef\tmp@{\egroup\dimen@=\the\wdz@}%
 \kern\A@ \raise\B@\boxz@
 \tmp@ \divide\dimen@4 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \boxz@}
\xydef@\circled@x@{\hbox{\corn@@4\R@ \corn@@3\R@}%
 \nointerlineskip\hbox{\corn@@1\R@ \corn@@2\R@}}
\xylet@\circled@x@@=\circled@x@
\xydefcsname@{frm{.o}}{%
 \ifx\frmradius@@\z@ \frmDrop@{\let\framehfill=\frm@doth@@ 
 \dimen@=.5\L@c \advance\dimen@.5\R@c \circled@\dimen@}%
 \else
 \frmDrop@{\let\framehfill=\frm@doth@@ \circled@\frmradius@@}%
 \fi}
\xydefcsname@{frm{-o}}{%
 \ifx\frmradius@@\z@ \frmDrop@{\let\framehfill=\frm@dashh@@
 \dimen@=.5\L@c \advance\dimen@.5\R@c \circled@\dimen@}%
 \else
 \frmDrop@{\let\framehfill=\frm@dashh@@ \circled@\frmradius@@}%
 \fi}
\xydefcsname@{frm{e}}{\ellipse@whichfrm@\ellipsesolidframed@}%
\xydefcsname@{frm{.e}}{\ellipse@whichfrm@\ellipsedotframed@}%
\xydefcsname@{frm{-e}}{\ellipse@whichfrm@\ellipsedashframed@}%
\xydefcsname@{frm{ee}}{\ellipse@whichdblfrm@\ellipsesolidframed@}%
\xydefcsname@{frm2{.e}}{\ellipse@whichdblfrm@\ellipsedotframed@}%
\xydefcsname@{frm2{-e}}{\ellipse@whichdblfrm@\ellipsedashframed@}%
\xyletcsnamecsname@{frm[o]{-}}{frm{e}}
\xyletcsnamecsname@{frm[o]{=}}{frm{ee}}
\xyletcsnamecsname@{frm[o]{.}}{frm{.e}}
\xyletcsnamecsname@{frm[o]{--}}{frm{-e}}
\xydef@\ellipse@whichfrm@#1{%
 \ifx\frmradius@@\z@
 \frmDrop@{#1\dimen@=.5\L@c \advance\dimen@.5\R@c
 \dimen@ii=.5\U@c \advance\dimen@ii.5\D@c
 \edef\next@{\noexpand\ellipsed@{\the\dimen@}{\the\dimen@ii}}\next@ }%
 \else
 \frmDrop@{#1\expandafter\ellipsed@i@\frmradius@@,,@@}%
 \fi}
\xydef@\ellipse@whichdblfrm@#1{%
 \ifx\frmradius@@\z@
 \frmDrop@{#1\dimen@=.5\L@c \advance\dimen@.5\R@c
 \dimen@ii=.5\U@c \advance\dimen@ii.5\D@c
 \edef\next@{\noexpand\ellipsed@e@{\the\dimen@}{\the\dimen@ii}}\next@ }%
 \else
 \frmDrop@{#1\expandafter\ellipsed@ei@\frmradius@@,,@@}%
 \fi}
\xydef@\ellipsed@i@#1,#2,#3@@{\DNii@{,}\DN@{#3}%
 \ifx\next@\nextii@
 \dimen@=#1\relax \dimen@ii=#2\relax
 \edef\next@{\noexpand\ellipsed@{\the\dimen@}{\the\dimen@ii}}%
 \else \ifx\next@\empty \DN@{#2}%
 \ifx\next@\empty \DN@{#1}%
 \dimen@=.5\L@c \advance\dimen@.5\R@c
 \dimen@ii=.5\U@c \advance\dimen@ii.5\D@c
 \edef\next@{\noexpand\ellipsed@{\the\dimen@}{\the\dimen@ii}}%
 \else \dimen@=#1\relax
 \edef\next@{\noexpand\ellipsed@{\the\dimen@}{\the\dimen@ii}}%
 \fi
 \else\xywarning@{ignoring extra tokens in elliptical frame: #3 }%
 \dimen@=#1\relax \dimen@ii=#2\relax 
 \edef\next@{\noexpand\ellipsed@{\the\dimen@}{\the\dimen@ii}}%
 \fi\fi \next@ }
\xydef@\ellipsed@ei@#1,#2,#3@@{\DNii@{,}\DN@{#3}%
 \ifx\next@\nextii@
 \dimen@=#1\relax \dimen@ii=#2\relax 
 \edef\next@{\noexpand\ellipsed@e@{\the\dimen@}{\the\dimen@ii}}%
 \else \ifx\next@\empty \DN@{#2}%
 \ifx\next@\empty \DN@{#1}%
 \dimen@=.5\L@c \advance\dimen@.5\R@c
 \dimen@ii=.5\U@c \advance\dimen@ii.5\D@c
 \edef\next@{\noexpand\ellipsed@e@{\the\dimen@}{\the\dimen@ii}}%
 \else 
 \dimen@=#1\relax 
 \edef\next@{\noexpand\ellipsed@e@{\the\dimen@}{\the\dimen@}}%
 \fi
 \else\xywarning@{ignoring extra tokens in elliptical frame: #3 }%
 \dimen@=#1\relax \dimen@ii=#2\relax 
 \edef\next@{\noexpand\ellipsed@e@{\the\dimen@}{\the\dimen@ii}}%
 \fi\fi \next@ }
\xydef@\ellipsed@e@#1#2{%
 \dimen@=#1\relax \dimen@ii=#2\relax 
 \edef\next@{\noexpand\ellipsed@{\the\dimen@}{\the\dimen@ii}}\next@ 
 \dimen@=#1\relax \dimen@ii=#2\relax 
 \ifdim\dimen@>2\p@ \advance\dimen@-2\p@ \else \dimen@=\z@\fi
 \ifdim\dimen@ii>2\p@ \advance\dimen@ii-2\p@ \else \dimen@ii=\z@\fi
 \edef\next@{\noexpand\ellipsed@{\the\dimen@}{\the\dimen@ii}}\next@ }%
\xydef@\ellipsed@#1#2{\setboxz@h\bgroup \relax
 \setboxz@h{\vbox{\ellipsed@x@@{#1}{#2}}}%
 \A@=\X@c \advance\A@-.5\wd\z@
 \B@=\Y@c \advance\B@-.5\ht\z@ \advance\B@.5\dp\z@ \advance\B@.2\p@
 \edef\tmp@{\egroup\dimen@=\the\wdz@}%
 \kern\A@ \raise\B@\boxz@
 \tmp@ \divide\dimen@4 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \boxz@}
\xydef@\ellipsed@i#1#2{{\R@c=#1\relax\L@c=\R@c
 \U@c=#2\relax\D@c=\U@c \ellipsed@{#1}{#2}}}
\xydef@\ellipsed@x@#1#2{\R@=#1\relax\advance\R@#2\relax
 \divide\R@\tw@ \circled@x@@ }
\xylet@\ellipsed@x@@=\ellipsed@x@
\xydef@\ellipsesolidframed@{%
 \let\framehfill=\frm@solidh@@ \let\framevfill=\frm@solidv@@}
\xydef@\ellipsedotframed@{%
 \let\framehfill=\frm@doth@@ \let\framevfill=\frm@dotv@@}
\xydef@\ellipsedashframed@{%
 \let\framehfill=\frm@dashh@@ \let\framevfill=\frm@dashv@@}
\xydefcsname@{frm{\{}}{\addtoDrop@@{\lbraced}}
\xydefcsname@{frm{\}}}{\addtoDrop@@{\rbraced}}
\xydefcsname@{frm{^\}}}{\addtoDrop@@{\ubraced}}
\xydefcsname@{frm{_\}}}{\addtoDrop@@{\dbraced}}
\xydef@\dbraced{\xy@@{\setboxz@h{%
 \A@=\X@c \advance\A@-\L@c \B@=\Y@c \advance\B@-\D@c
 \setboxz@h{$\m@th\bracelu$}\dimen@=2\wdz@ \advance\B@-.5\ht\z@
 \ifdim\R@c<\dimen@ \R@c=\dimen@ \fi
 \ifdim\L@c<\dimen@ \advance\A@-\dimen@ \advance\A@\L@c \L@c=\dimen@ \fi
 \advance\A@-.25pt
 \kern\A@\raise\B@\hbox{%
 \hbox to\L@c{$\m@th\bracelu\leaders\vrule\hfil\bracerd$}%
 \kern.5pt
 \hbox to\R@c{$\m@th\braceld\leaders\vrule\hfil\braceru$}}}%
 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \boxz@}}
\xydef@\ubraced{\xy@@{\setboxz@h{%
 \A@=\X@c \advance\A@-\L@c \B@=\Y@c \advance\B@\U@c
 \setboxz@h{$\m@th\bracelu$}\dimen@=2\wdz@
 \ifdim\R@c<\dimen@ \R@c=\dimen@ \fi
 \ifdim\L@c<\dimen@ \advance\A@-\dimen@ \advance\A@\L@c \L@c=\dimen@ \fi
 \advance\A@-.25pt
 \kern\A@\raise\B@\hbox{%
 \hbox to\L@c{$\m@th\braceld\leaders\vrule\hfil\braceru$}%
 \kern.5pt
 \hbox to\R@c{$\m@th\bracelu\leaders\vrule\hfil\bracerd$}}}%
 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \boxz@}}
{\catcode`\"=12
 \global\mathchardef\braceur="338
 \global\mathchardef\braceul="339
 \global\mathchardef\bracedr="33A
 \global\mathchardef\bracedl="33B
 \global\mathchardef\bracecl="33C
 \global\mathchardef\bracecr="33D
 \global\mathchardef\bracec="33E }
\xydef@\lbraced{\xy@@{\setboxz@h{%
 \A@=\X@c \advance\A@-\L@c \B@=\Y@c \advance\B@-\D@c
 \setboxz@h{$\m@th\bracecl$}\dimen@ii=\dp\z@ \advance\A@-.5\wdz@
 \setboxz@h{$\m@th\bracec$}\dimen@=\dp\z@
 \ifdim\U@c<.5\dimen@ \U@c=.5\dimen@ \fi
 \ifdim\D@c<.5\dimen@ \advance\B@-.5\dimen@ \advance\B@\D@c \D@c=.5\dimen@ \fi
 \advance\U@c.6\p@ \advance\D@c.6\p@ \advance\B@-.6\p@
 \kern\A@\raise\B@\vbox{\vbox to\U@c{%
 \nointerlineskip\hbox{$\m@th\braceur$}%
 \kern-.61\dimen@ \cleaders\copy\z@\vfil \kern-.4\dimen@
 \nointerlineskip\hbox{$\m@th\bracecl$}\kern-.5\dimen@ii}%
 \nointerlineskip\vbox to\D@c{\kern.5\dimen@ii
 \kern-.4\dimen@ \cleaders\copy\z@\vfil \kern-.61\dimen@
 \nointerlineskip\hbox{$\m@th\bracedr$}\kern\z@}}}%
 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \boxz@}}
\xydef@\rbraced{\xy@@{\setboxz@h{%
 \A@=\X@c \advance\A@\R@c \B@=\Y@c \advance\B@-\D@c
 \setboxz@h{$\m@th\bracecr$}\dimen@ii=\dp\z@ \advance\A@-.5\wdz@
 \setboxz@h{$\m@th\bracec$}\dimen@=\dp\z@
 \ifdim\U@c<.5\dimen@ \U@c=.5\dimen@ \fi
 \ifdim\D@c<.5\dimen@ \advance\B@-.5\dimen@ \advance\B@\D@c \D@c=.5\dimen@ \fi
 \advance\U@c.6\p@ \advance\D@c.6\p@ \advance\B@-.6\p@
 \kern\A@\raise\B@\vbox{\vbox to\U@c{%
 \nointerlineskip\hbox{$\m@th\braceul$}%
 \kern-.61\dimen@ \cleaders\copy\z@\vfil \kern-.4\dimen@
 \nointerlineskip\hbox{$\m@th\bracecr$}\kern-.5\dimen@ii}%
 \nointerlineskip\vbox to\D@c{\kern.5\dimen@ii
 \kern-.4\dimen@ \cleaders\copy\z@\vfil \kern-.61\dimen@
 \nointerlineskip\hbox{$\m@th\bracedl$}\kern\z@}}}%
 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \boxz@}}
\xydefcsname@{frm{(}}{\addtoDrop@@{\lparenthesized}}
\xydefcsname@{frm{)}}{\addtoDrop@@{\rparenthesized}}
\xydefcsname@{frm{^)}}{\addtoDrop@@{\uparenthesized}}
\xydefcsname@{frm{_)}}{\addtoDrop@@{\dparenthesized}}
\xydef@\dparenthesized{\xy@@{\setboxz@h{%
 \A@=\X@c \advance\A@-\L@c \B@=\Y@c \advance\B@-\D@c
 \setboxz@h{$\m@th\bracelu$}\dimen@=2\wdz@ \advance\B@-.5\ht\z@
 \ifdim\R@c<\dimen@ \R@c=\dimen@ \fi
 \ifdim\L@c<\dimen@ \advance\A@-\dimen@ \advance\A@\L@c \L@c=\dimen@ \fi
 \dimen@=\L@c \advance\dimen@\R@c
 \kern\A@\raise\B@\hbox to\dimen@{%
 $\m@th\bracelu\leaders\vrule\hfil\braceru$}}%
 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \boxz@}}
\xydef@\uparenthesized{\xy@@{\setboxz@h{%
 \A@=\X@c \advance\A@-\L@c \B@=\Y@c \advance\B@\U@c
 \setboxz@h{$\m@th\bracelu$}\dimen@=2\wdz@
 \ifdim\R@c<\dimen@ \R@c=\dimen@ \fi
 \ifdim\L@c<\dimen@ \advance\A@-\dimen@ \advance\A@\L@c \L@c=\dimen@ \fi
 \dimen@=\L@c \advance\dimen@\R@c
 \kern\A@\raise\B@\hbox to\dimen@{%
 $\m@th\braceld\leaders\vrule\hfil\bracerd$}}%
 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \boxz@}}
\xydef@\lparenthesized{\xy@@{\setboxz@h{%
 \A@=\X@c \advance\A@-\L@c \B@=\Y@c \advance\B@-\D@c
 \setboxz@h{$\m@th\bracecr$}\dimen@ii=\dp\z@ \advance\A@-.5\wdz@
 \setboxz@h{$\m@th\bracec$}\dimen@=\dp\z@
 \ifdim\U@c<.5\dimen@ \U@c=.5\dimen@ \fi
 \ifdim\D@c<.5\dimen@ \advance\B@-.5\dimen@ \advance\B@\D@c \D@c=.5\dimen@ \fi
 \advance\U@c.6\p@ \advance\D@c.6\p@ \advance\B@-.6\p@
 \dimen@ii\U@c \advance\dimen@ii\D@c
 \kern\A@\raise\B@\vbox to \dimen@ii{%
 \nointerlineskip\hbox{$\m@th\braceur$}%
 \kern-.61\dimen@ \cleaders\copy\z@\vfil \kern-.61\dimen@
 \nointerlineskip\hbox{$\m@th\bracedr$}\kern\z@}}%
 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \boxz@}}
\xydef@\rparenthesized{\xy@@{\setboxz@h{%
 \A@=\X@c \advance\A@\R@c \B@=\Y@c \advance\B@-\D@c
 \setboxz@h{$\m@th\bracecr$}\dimen@ii=\dp\z@ \advance\A@-.5\wdz@
 \setboxz@h{$\m@th\bracec$}\dimen@=\dp\z@
 \ifdim\U@c<.5\dimen@ \U@c=.5\dimen@ \fi
 \ifdim\D@c<.5\dimen@ \advance\B@-.5\dimen@ \advance\B@\D@c \D@c=.5\dimen@ \fi
 \advance\U@c.6\p@ \advance\D@c.6\p@ \advance\B@-.6\p@
 \dimen@ii\U@c \advance\dimen@ii\D@c
 \kern\A@\raise\B@\vbox to \dimen@ii{%
 \nointerlineskip\hbox{$\m@th\braceul$}%
 \kern-.61\dimen@ \cleaders\copy\z@\vfil \kern-.61\dimen@
 \nointerlineskip\hbox{$\m@th\bracedl$}\kern\z@}}%
 \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \boxz@}}
\xydefcsname@{frm{*}}{%
 \expandafter\frmDrop@\expandafter{%
 \expandafter\def\expandafter\prevEdge@@\expandafter{\prevEdge@@}%
 \frame@fill@@\frmradius@@}}
\xydefcsname@{frm{**}}{%
 \expandafter\frmDrop@\expandafter{%
 \expandafter\def\expandafter\prevEdge@@\expandafter{\prevEdge@@}%
 \frame@emph@@\frmradius@@}}
\xydef@\frame@fill@#1{\filled@{#1}\empty}
\xydef@\frame@emph@#1{\framed@\frmradius@@}
\xylet@\frame@fill@@=\frame@fill@
\xylet@\frame@emph@@=\frame@emph@
\xydef@\filled@#1{\R@=#1\relax 
 \expandafter\DNii@\expandafter{\prevEdge@@}%
 \DN@{\rectangleEdge}\ifx\next@\prevEdge@@
 \ifdim\R@=\z@ \DN@{\filled@Rectangle@}%
 \else \DN@{\filled@Oval@}\fi
 \else \DN@{\circleEdge}\ifx\next@\prevEdge@@
 \ifdim\R@=\z@ \DN@{\filled@Ellipse@}%
 \else \DN@{\restR@max\filled@Circle@}\fi
 \else 
 \ifdim\R@=\z@ \DN@{\filled@Rectangle@}%
 \else \DN@{\filled@Circle@}\fi
 \fi\fi \next@}
\xydef@\restR@max{%
 \dimen@=\L@c\advance\dimen@\R@c
 \dimen@ii=\U@c \advance\dimen@ii\D@c
 \ifdim\dimen@ii>\dimen@ \dimen@=\dimen@ii\fi
 \ifdim\dimen@>\z@ \divide\dimen@\tw@
 \ifdim\R@>\dimen@\R@=\dimen@\fi\fi }
\xylet@\filledRectangle@@=\bblacked@
\xylet@\filledCircle@@=\bblacked@
\xylet@\filledEllipse@@=\bblacked@
\xylet@\filledOval@@=\bblacked@
\xydef@\filled@Region@#1#2{\setboxz@h\bgroup 
 \setboxz@h{\vbox{#1#2\empty}}%
 \A@=\X@c \advance\A@-.5\wd\z@
 \B@=\Y@c \advance\B@-.5\ht\z@ \advance\B@.5\dp\z@ 
 \edef\tmp@{\egroup\dimen@=\the\wdz@}%
 \kern\A@ \raise\B@\boxz@ \kern-\A@
 \tmp@ \divide\dimen@\tw@ \ht\z@=\z@ \dp\z@=\z@ \wd\z@=\z@ \styledboxz@}
\xydef@\filled@Rectangle@{\filled@Region@\filledRectangle@@}
\xydef@\filled@Oval@{\filled@Region@\filledOval@@}
\xydef@\filled@Circle@{\filled@Region@\filledCircle@@}
\xydef@\filled@Ellipse@{\filled@Region@\filledEllipse@@}
\xydefcsname@{shape [F...]}#1{\xyFN@\Fshape@#1:@}
\xylet@\whichframe@@=\empty
\xylet@\whichoptions@@=\empty
\xydef@\Fshape@#1:{\def\whichframe@@{{#1}}%
 \DN@{{}}\ifx\whichframe@@\next@ \def\whichframe@@{{-}}\fi
 \expandafter\DN@\expandafter{\the\Edge@c}\DNii@{\circleEdge}\ifx\next@\nextii@
 \DN@##1{\def\whichframe@@{[o]##1}}%
 \expandafter\next@\expandafter{\whichframe@@}\fi
 \let\whichoptions@@=\empty \xyFN@\Fshape@i}
\xydef@\Fshape@i{%
 \ifx @\next \let\next@=\Fshape@x
 \else\addLT@\ifx\next \let\next@=\Fshape@iii
 \else \let\next@=\Fshape@ii \fi\fi \next@}
\xydef@\Fshape@ii#1:{%
 \expandafter\def\expandafter\whichoptions@@\expandafter{\whichoptions@@[#1]}%
 \xyFN@\Fshape@i}
\xydef@\Fshape@iii#1:{\DN@##1{\def\whichframe@@{#1##1}}%
 \expandafter\next@\expandafter{\whichframe@@}\xyFN@\Fshape@i}
\xydef@\Fshape@x @{%
 \edef\next@##1{\noexpand\addbeforeDrop@@{{\EdgefromtheEdge@##1}}}%
 \DNii@##1##2{\next@{\saveframestyles@{\setbox\z@=\object##2\frm##1%
 \xypre@Style@@\Drop@@\xypost@Style@@\restoreframestyles@}}}%
 \expandafter\expandafter\expandafter\nextii@
 \expandafter\expandafter\expandafter{%
 \expandafter\whichframe@@\expandafter}\expandafter{\whichoptions@@}}
\xydef@\saveframestyles@{%
 \edef\afterframe@preStyle@{\preXY@style@}%
 \edef\afterframe@postStyle@{\postXY@style@}}
\xydef@\restoreframestyles@{%
 \xdef\preXY@style@{\afterframe@preStyle@}\def\afterframe@preStyle@{}%
 \xdef\postXY@style@{\afterframe@postStyle@}\def\afterframe@postStyle@{}}
\xydef@\xycircleframe@x@{\L@=\R@ \xycircleframe@x@i}%
\xydef@\xyellipseframe@x@#1#2{\R@=#1\relax \L@=#2\relax \xycircleframe@x@i}
\xydef@\xycircleframe@x@i{%
 \ifx\framehfill\frm@solidh@@\def\circleSTYLE@{}%
 \else\ifx\framehfill\frm@doth@@
 \expandafter\def\expandafter\circleSTYLE@\expandafter{\addDOT@{}}%
 \else\ifx\framehfill\frm@dashh@@
 \expandafter\expandafter\expandafter\def\expandafter\expandafter
 \expandafter\circleSTYLE@\expandafter\expandafter\expandafter
 {\expandafter\addDASH@\addDASH@{}}%
 \fi\fi\fi \xycircleframe@x@x }
\xydef@\xycircleframe@x@x{\hbox{\vbox{\vskip\L@
 \hbox to2\R@{\hfill \buildcircle@ \hfill}\vskip\L@ }}}
\xydef@\UseCurveFrames@{%
 \let\circled@x@@=\xycircleframe@x@
 \let\ellipsed@x@@=\xyellipseframe@x@ }
\def\UseCurveFrames{\xywithoption{curve}{\UseCurveframes@}}%
\xydef@\UseFontFrames@{%
 \let\circled@x@@=\circled@x@
 \let\ellipsed@x@@=\ellipsed@x@ }
\xylet@\UseFontFrames=\UseFontFrames@
\xydef@\UnloadFrames@{%
 \let\framed@body@@=\framed@body@
 \let\circled@x@@=\circled@x@
 \let\ellipsed@x@@=\ellipsed@x@
 \let\frame@fill@@=\frame@fill@
 \let\frame@emph@@=\frame@emph@
 \let\filledRectangle@@=\bblacked@
 \let\filledCircle@@=\bblacked@
 \let\filledEllipse@@=\bblacked@
 \let\filledOval@@=\bblacked@
}
\xyaddunsupport{frame}\UnloadFrames@
\xyendinput

xygraph.tex
%% xygraph.tex from $Id: xygraph.doc,v 3.7 1999/02/16 15:12:50 krisrose Exp $
%%
%% Xy-pic ``Graph Combinator feature'' option.
%% Copyright (c) 1994-1997 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% See the companion README and INSTALL files for further information.
%% Copyright (c) 1991-1997 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, write to the Free Software Foundation, Inc.,
%% 675 Mass Ave, Cambridge, MA 02139, USA.
%%
\ifx\xyloaded\undefined \input xy \fi
\xyprovide{graph}{Graph feature}{\stripRCS$Revision: 3.7 $}%
 {Kristoffer H.~Rose}{krisrose@brics.dk}%
 {BRICS/Computer Science, University of Aarhus, Ny Munkegade, building 540,
 DK--8000 Aarhus~C}
\xyrequire{arrow}\xycatcodes
\xydef@\xygraph#1{\relax\graph#1\endgraph}
\xydef@\graph{\if\inxy@ \DN@{\xy@@{\nter@{}}}%
 \else \DN@{\xy \xy@\xy{\nter@\endxy}}\fi \next@
 \xy@\xygraph{\senter@ \idfromc@{?NODE}\spushc@
 \expandafter\let\expandafter\next@\csname Q@graphbase\endcsname
 \ifx\next@\relax \setbase@\z@\z@{3pc}\z@
 \else \expandafter\next@ \fi}%
 \GRAPH[]}
\xydef@\endgraph{\ignorespaces}
\xydef@\GRAPH{\xyFN@\GRAPH@}
\xydef@\GRAPH@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\GRAPH@}%
 \else\ifx :\next \DN@:{\xy@:{}\expandafter\GRAPHar@\GRAPHeveryarrow@@}%
 \else\addDASH@\ifx\next
 \addDASH@\DN@{\xy@-{}\expandafter\GRAPHar@\GRAPHeveryline@@}%
 \else\ifx (\next
 \DN@({\xy@({\spushid@{?NODE}\idfromc@{?NODE}}\xyFN@\GRAPH@}%
 \else\ifx ,\next
 \DN@,{\xy@,{\cfromid@{?NODE}}\xyFN@\GRAPH@}%
 \else\ifx )\next
 \DN@){\xy@){\cfromid@{?NODE}%
 \tests@\z@{\idfroms@{?NODE}\z@ \spop@}{\xyerror@{) without (}{}}}%
 \xyFN@\GRAPH@}%
 \else\ifx \endgraph\next \DN@{\xy@@{\tests@\z@\spop@\sleave@\leave@}}%
 \else\ifx \end\next \DN@{\xy@@{\tests@\z@\spop@\sleave@\leave@}}%
 \else\ifx ~\next
 \DN@~{\xy@@{\enter@\cfromthec@}\afterNODE{\leave@ \xyFN@\GRAPH@}!}%
 \else \DN@{\afterNODE{\xyFN@\GRAPH@}}%
 \fi\fi\fi\fi\fi\fi\fi\fi\fi \next@}
\xylet@\GRAPHsaved@PATHafterPOS=\PATHafterPOS
\xylet@\GRAPHsaved@afterar@@=\afterar@@
\xydef@\GRAPHar@{%
 \let\PATHafterPOS=\afterNODE \let\afterar@@=\GRAPHafterar@ \ar}
\xydef@\GRAPHafterar@{%
 \let\PATHafterPOS=\GRAPHsaved@PATHafterPOS
 \let\afterar@@=\GRAPHsaved@afterar@@
 \xy@@{\cfromid@{}}\xyFN@\GRAPH@}
\xylet@\afterNODE@@=\empty
\xydef@\afterNODE#1{\xy@@{\enter@\pfromthep@}%
 \DN@##1{\def\afterNODE@@{\xy@@\leave@ \def\afterNODE@@{##1}#1}}%
 \expandafter\next@\expandafter{\afterNODE@@}%
 \xyFN@\NODE@}
\xylet@\theMOVE@@=\relax
\xydef@\NODE@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\NODE@}%
 \else\ifx [\next \DN@[##1]{\xy@{[##1]}{}%
 \def\theMOVE@@{[##1]}\xyFN@\MOVE@##1]}%
 \else\ifx "\next \DN@ "##1"{%
 \xy@{"##1"}{\cfromid@{##1}}\def\theMOVE@@{"##1"}\xyFN@\NODE@i}%
 \else\ifx ?\next \DN@ ?{%
 \xy@?{\cfromid@{?NODE}}\def\theMOVE@@{?}\xyFN@\NODE@i}%
 \else\ifx !\next \def\theMOVE@@{[]}\let\next@=\NODE@i
 \else \testAND@\iffalse
 \DN@##1{\xy@{}{\pfromc@ \advance\X@c\X@xbase \advance\Y@c\Y@xbase
 \czeroEdge@}\jumpMOVE@ \xyFN@\NODE@i}%
 \else\ifx \\\next
 \DN@\\{\xy@\\{\pfromc@ \advance\X@c\X@xbase \advance\Y@c\Y@xbase
 \R@c=\X@ybase \U@c=\Y@ybase \intersect@
 \advance\X@c-\X@ybase \advance\Y@c-\Y@ybase
 \czeroEdge@}\def\theMOVE@@{\\}\xyFN@\NODE@i}%
 \else \xyerror@{Illegal <node>: \string`\meaning\next\string' unexpected}{}%
 \fi\fi\fi\fi\fi\fi\fi \next@}
\xydef@\jumpMOVE@@{&}
\xydef@\jumpMOVE@{\let\theMOVE@@=\jumpMOVE@@}
\xydef@\MOVE@{\xy@@{\count@=\z@ \count@@=\z@}%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\MOVE@}%
 \else\ifcat A\noexpand\next \let\next@=\MOVE@letter
 \else \let\next@=\MOVE@x \fi\fi \next@}
\xydef@\MOVE@letter{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\MOVE@letter}%
 \else\ifx u\next \DN@ u{\xy@@{\advance\count@\@ne}\xyFN@\MOVE@letter}%
 \else\ifx d\next \DN@ d{\xy@@{\advance\count@\m@ne}\xyFN@\MOVE@letter}%
 \else\ifx l\next \DN@ l{\xy@@{\advance\count@@\m@ne}\xyFN@\MOVE@letter}%
 \else\ifx r\next \DN@ r{\xy@@{\advance\count@@\@ne}\xyFN@\MOVE@letter}%
 \else \let\next@=\MOVE@x \fi\fi\fi\fi\fi \next@}
\xydef@\MOVE@x{%
 \ifx ]\next \DN@ ]{\MOVE@hop \xyFN@\NODE@i}%
 \else\ifx (\next \DN@{\MOVE@hop \xyFN@\MOVE@place}%
 \else\ifx !\next \DN@{\MOVE@hop \xyFN@\MOVE@place}%
 \else\ifx /\next \DN@{\MOVE@hop \xyFN@\MOVE@place}%
 \else\addLT@\ifx\next \DN@{\MOVE@hop \xyFN@\MOVE@place}%
 \else\addGT@\ifx\next \DN@{\MOVE@hop \xyFN@\MOVE@place}%
 \else\addDASH@\ifx\next \addDASH@\DN@{\xyerror@{- not implemented yet}{}}%
 \else \xyerror@{illegal <move>: \codeof\theMOVE@@}{}\let\next@=\NODE@i
 \fi\fi\fi\fi\fi\fi\fi \next@}
\xydef@\MOVE@hop{\xy@@{\pfromc@ \czeroEdge@
 \edef\next@{\the\count@@,\the\count@ @}\expandafter\vfromcartesian@@\next@
 \advance\X@c-\X@origin \advance\Y@c-\Y@origin
 \advance\X@c\X@p \advance\Y@c\Y@p}}
\xydef@\MOVE@place{\xy@@\no@@ \afterPLACE{\xyFN@\MOVE@}}
\xydef@\NODE@i{\let\next@=\NODE@x
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\NODE@i}%
 \else\addEQ@\ifx \next
 \addEQ@\DN@"##1"{\xy@{="##1"}{\idfromc@{##1}}\xyFN@\NODE@i}%
 \else\ifx !\next \DN@!{\xyFN@\NODE@escape}%
 \else\ifx :\next 
 \else\addDASH@\ifx\next
 \else\ifx (\next
 \else\ifx ,\next
 \else\ifx )\next
 \else\ifx ~\next
 \else\ifx [\next
 \else\ifx "\next
 \else\ifx ?\next
 \else\ifx ^\next
 \else\ifx _\next
 \else\ifx |\next
 \else\addLQ@\ifx\next
 \else\addRQ@\ifx\next
 \else \testAND@ \iffalse
 \else\ifx \\\next
 \else\ifx \endgraph\next
 \else\ifx \end\next
 \else \let\next@=\NODE@it
 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next@}
\xydef@\NODE@x{\xy@@{\idfromc@{}}\afterNODE@@}
\xydef@\NODE@it{\let\PATHlabelit@@=\NODEit@ \PATHit@}
{\xyuncatcodes \gdef\next{+}}
\xylet@\GRAPHnodemodifiers@@=\next
\xydef@\NODEit@#1{%
 \DN@{#1}\ifx\next@\empty
 \DN@{\expandafter\NODEit@i\expandafter{\GRAPHnodemodifiers@@}}%
 \else \DN@{\NODEit@i{#1}}\fi \next@}
\def\NODEit@i#1#2{\xy@{*#1{#2}}{\drop@{#1}{#2}}%
 \DN@{\addEQ@\ifx\next\else \xy@@{\idfromc@{#2}}\fi \NODE@i}%
 \xyFN@\next@}
\xydef@\NODE@escape{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\NODE@escape}%
 \else\ifcat A\noexpand\next \DN@##1{\rungraphescape@{##1}}%
 \else\ifcat !\noexpand\next \DN@##1{\rungraphescape@{##1}}%
 \else\ifx \bgroup\next \DN@##1{\xy@{!{##1}}{}\POS##1\relax \xyFN@\NODE@i}%
 \else\ifx ~\next \let\next@=\graphsetup@
 \else \DN@{\xyerror@{Unknown graph <escape>}{}\xyFN@\NODE@i}%
 \fi\fi\fi\fi\fi \next@}
\xydefcsname@{graph !M}#1#{\NODE@matrix{#1}}
\xydef@\NODE@matrix#1#2{\xyerror@{matrix feature not loaded}{}\xyFN@\GRAPH@}
\xydef@\NODE@matrix@#1#2{\xy@{!M#1{#2}}{}%
 \def\everyentry@{\GRAPHeveryentry}%
 \xymatrix#1{#2}%
 \let\everyentry@=\empty \insertmatrixingraph@ \xyFN@\NODE@i}
\xydef@\GRAPHeveryentry{\def\:{\ar}\def\="##1"{\xy@@{\idfromc@{##1}}}}
\xywithoption{matrix}{\let\NODE@matrix=\NODE@matrix@}
\xydef@\insertmatrixingraph@{%
 \xy@@{\enter@{\cfromthec@ \pfromthep@}%
 \expandafter\let\expandafter\next@\csname Q@1,1\endcsname
 \ifx\next@\relax\else
 \next@ \swap@
 \expandafter\let\expandafter\next@\csname Q@1,2\endcsname
 \ifx\next@\relax\else \next@ \setbase@\X@p\Y@p\X@c\Y@c
 \expandafter\let\expandafter\next@\csname Q@2,1\endcsname
 \ifx\next@\relax\else
 \next@ \setbase@@{-\X@c}{-\Y@c}\fi\fi\fi
 \leave@}}
\xydefcsname@{graph !P}#1#{\NODE@poly{#1}}
\xydef@\NODE@poly#1#2{\xyerror@{poly(gon) feature not loaded}{}\xyFN@\GRAPH@}
\xydef@\NODE@poly@#1#2{\xy@{!P#1{#2}}{}\xypoly@#1{#2}\xyFN@\NODE@i}
\xywithoption{poly}{\let\NODE@poly=\NODE@poly@}
\xydefcsname@{graph !E}#1#{\NODE@arc{#1}!}
\xydef@\NODE@arc#1#2{\xyerror@{(ellipse+)arc feature not loaded}{}%
 \xyFN@\GRAPH@}
\xydef@\NODE@arc@#1#2{\xy@{!E#1{#2}}{}\ellipse#1{#2}\xyFN@\NODE@i}
\xywithoption{arc}{\let\NODE@arc=\NODE@arc@}
\xylet@\GRAPHeveryarrow@@=\empty
{\xyuncatcodes \gdef\next{@{-}}}
\xylet@\GRAPHeveryline@@=\next
\xydef@\graphsetup@~{\xyFN@\graphsetup@i}
\xydef@\graphsetup@i{%
 \ifx :\next \DN@:##1{\def\GRAPHeveryarrow@@{##1}\xyFN@\NODE@i}%
 \else\addDASH@\ifx\next
 \addDASH@\DN@##1{\def\GRAPHeveryline@@{##1}\xyFN@\NODE@i}%
 \else\ifx *\next \DN@*##1{\def\GRAPHnodemodifiers@@{##1}\xyFN@\NODE@i}%
 \else\ifcat A\next \DN@##1##2{\newgraphescape{##1}{##2}\xyFN@\NODE@i}%
 \else \DN@{\xyerror@{illegal graph setup \codeof\next@}{}\xyFN@\NODE@i}%
 \fi\fi\fi\fi \next@}
\xydef@\newgraphescape#1{%
 \expandafter\let\expandafter\next\csname graph !#1\endcsname
 \ifx\next\relax\else \expandafter\let\csname G!#1\endcsname=\undefined
 \xywarning@{Redefining graph <escape> !#1}\fi
 \expandafter\gdef\csname graph !#1\endcsname{%
 \expandafter\let\expandafter\next\csname G!#1\endcsname
 \expandafter\xyFN@\expandafter\NODE@\next}%
 \DN@{\newgraphescape@{#1}}\xyFN@\next@}
\xydef@\newgraphescape@#1{%
 \ifx [\next
 \ifx\newcommand\undefined \xyerror@{[n] only with LaTeX}%
 \else
 \def\nextiv@{\expandafter\newcommand\expandafter{\csname G!#1\endcsname}}\fi
 \else \def\nextiv@{\expandafter\gdef\csname G!#1\endcsname}\fi \nextiv@}
\xydef@\rungraphescape@#1{%
 \expandafter\let\expandafter\next\csname graph !#1\endcsname
 \ifx\next\relax \xyerror@{Undefined graph <escape> !#1}\fi \next}
\xyendinput

xyidioms.tex
%% xyidioms.tex from $Id: xyidioms.doc,v 3.4 1997/05/18 01:14:25 krisrose Exp $
%%
%% Format-dependent idioms for Xy-pic.
%% Copyright (c) 1991-1997 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% See the companion README and INSTALL files for further information.
%% Copyright (c) 1991-1997 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, write to the Free Software Foundation, Inc.,
%% 675 Mass Ave, Cambridge, MA 02139, USA.
%%
\ifx\xyidiomsloaded\empty \message{not reloaded}\endinput \fi
\let\xyidiomsloaded=\empty
\xywarnifdefined\A@ \dimendef\A@=4
\xywarnifdefined\B@ \dimendef\B@=6
\xywarnifdefined\R@ \dimendef\R@=8
\ifx\undefined\AveryUNLIKELYc@ntr@lSEQUENCE@@\else
\errmessage{Xy-pic Error: \string\undefined\space defined.}\fi
\ifx\undefined\literal@ \def\literal@#1{#1}\fi
\ifx\undefined\eat@ \def\eat@#1{}\fi
\xydef@\xyFN@{\futurelet\next}
\ifx\undefined\DN@ \def\DN@{\def\next@}\fi
\ifx\undefined\DNii@ \def\DNii@{\def\nextii@}\fi
\ifx\undefined\setboxz@h\def\setboxz@h{\setbox\z@\hbox}\fi
\ifx\undefined\wdz@ \def\wdz@{\wd\z@}\fi
\ifx\undefined\boxz@ \def\boxz@{\box\z@}\fi
\ifx\undefined\W@ \def\W@{\immediate\write16 }\fi
\ifx\undefined\space@ \def\space@.{\futurelet\space@\relax}\space@. \fi
\ifx\undefined\notempty \def\notempty#1{T\if @#1@F\else T\fi}\fi
\xydef@\xysetup@dummy#1{\xyuncatcodes#1}
\xywarnifdefined\xysetup@@
\ifx\AtEndDocument\undefined
 \expandafter\ifx\csname amsppt.sty\endcsname\relax
 \let\xysetup@@=\xysetup@dummy
 \else
 \def\xysetup@@#1{%
 \expandafter\def\expandafter\topmatter\expandafter{\topmatter
 #1\xyuncatcodes}}\fi
\else
 \def\xysetup@@#1{\AtBeginDocument{#1\xyuncatcodes}}
\fi
\ifx\xysetup@@\xysetup@dummy\else
 \xysetup@@{\let\xysetup@@=\xysetup@dummy \xyuncatcodes}\fi
\xywarnifdefined\xyclosedown@@
\ifx\AtEndDocument\undefined \let\xyclosedown@@=\eat@
\else \def\xyclosedown@@#1{\AtEndDocument{#1}}\fi
\xylet@\xy@begindvi=\literal@
\ifx\undefined\AtBeginDvi\else
 \AtBeginDocument{\let\xy@begindvi=\AtBeginDvi}
 \AtBeginDvi{\global\let\xy@begindvi=\literal@}\fi
\ifx\amstexloaded@\relax
\xylet@\toks@ii=\toks@@ \endinput \fi
\ifx\@tempcnta\undefined
\xynew@{count}\count@@
\xynew@{count}\count@@@
\else
\xylet@\count@@=\@tempcnta
\xylet@\count@@@=\@tempcntb
\fi
\ifx\undefined\toks@ii \toksdef\toks@ii=2 \fi
\endinput

xyline.tex
%% xyline.tex from $Id: xyline.doc,v 3.6 1998/03/06 01:28:05 krisrose Exp $
%%
%% Xy-pic ``Line Width'' extension.
%% Copyright (c) 1993-1996 Ross Moore <ross@mpce.mq.edu.au>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% See the companion README and INSTALL files for further information.
%% Copyright (c) 1991-1996 Kristoffer H. Rose <krisrose@ens-lyon.fr>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, write to the Free Software Foundation, Inc.,
%% 675 Mass Ave, Cambridge, MA 02139, USA.
%%
\ifx\xyloaded\undefined \input xy \fi
\xyprovide{line}{Line styles extension}{\stripRCS$Revision: 3.6 $}%
 {Ross Moore}{ross@mpce.mq.edu.au}%
 {Mathematics Department, Macquarie University, NSW~2109, Australia}
\xydefcsname@{*stylechar@|@}#1{\xyFN@\xywidthchar@#1@@}%
\xydefcsname@{style [thinner]}{\xyshape@thinner@}
\xydefcsname@{style [thicker]}{\xyshape@thicker@}
\xynew@{dimen}\xylinethick@ \xylinethick@=\xydashw@
\xydef@\xyshape@thicker@{\xylinewidth@i{\multiply\xylinethick@\tw@}}
\xydef@\xyshape@thinner@{\xylinewidth@i{\divide\xylinethick@\tw@}}
\xydef@\xylinewidth@i#1{\edef\xyprevwidth@@{\the\xylinethick@}%
 #1\edef\next@{\xylinethick@=\the\xylinethick@}%
 \edef\next@ii{\noexpand\addtotoks@{%
 \noexpand\xylinewidth@@{\next@}{\xyprevwidth@@}}}%
 \next@ii }
\xydef@\xywidthchar@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\xywidthchar@}%
 \else\ifx @\next \DN@ @@{\checkXyStyle@}%
 \else\ifx (\next \DN@ (##1)##2@@{%
 \xylinewidth@i{\xylinethick@=##1\xydashw@}}%
 \else\addLT@\ifx \next \addGT@{\addLT@\DN@ ##1}##2@@{%
 \xylinewidth@i{\xylinethick@=##1\relax}}%
 \else\ifx *\next \DN@ *@@{\recoverXyStyle@}%
 \else\addEQ@\ifx \next \addEQ@\DN@##1@@{\checkXyStyle@
 \addtotoks@{\xynamestyle@{##1}}}%
 \else\ifx C\next \DN@ C##1@@{\xysetlinecap@{##1}@}%
 \else\ifx J\next \DN@ J##1@@{\xysetlinejoin@{##1}@}%
 \else\ifx M\next \DN@ M(##1)@@{\xymiterlimit@{##1}@}%
 \else \DN@##1@@{\xylinewidth@i{\xylinethick@=##1\relax}}%
 \fi\fi\fi\fi\fi\fi\fi\fi\fi \next@}
\xydef@\xylinecap@{2}
\xydef@\xylinejoin@{2}
\xydef@\xylinemiter@{10}
\xydefcsname@{style [bevel]}{\xyshape@bevel@}
\xydefcsname@{style [roundjoin]}{\xyshape@rdjoin@}
\xydefcsname@{style [miter]}{\xyshape@miter@}
\xydefcsname@{style [butt]}{\xyshape@butt@}
\xydefcsname@{style [roundcap]}{\xyshape@rdcap@}
\xydefcsname@{style [projcap]}{\xyshape@projcap@}
\xydef@\xyshape@butt@{\xysetlinecap@@0}
\xydef@\xyshape@rdcap@{\xysetlinecap@@1}
\xydef@\xyshape@projcap@{\xysetlinecap@@2}
\xydef@\xyshape@miter@{\xysetlinejoin@@0}
\xydef@\xyshape@rdjoin@{\xysetlinejoin@@1}
\xydef@\xyshape@bevel@{\xysetlinejoin@@2}
\xydef@\xysetlinecap@#1@{\DN@ii{#1}\count@=#1\relax
 \expandafter\DN@\expandafter{\the\count@}%
 \ifx\next@\next@ii\else
 \xywarning@{ignoring extra tokens in line-cap: \next@}\fi
 \expandafter\xysetlinecap@@\expandafter{\next@}}
\xydef@\xysetlinejoin@#1@{\DN@ii{#1}\count@=#1\relax
 \expandafter\DN@\expandafter{\the\count@}%
 \ifx\next@\next@ii\else
 \xywarning@{ignoring extra tokens in line-join: \next@}\fi
 \expandafter\xysetlinejoin@@\expandafter{\next@}}
\xydef@\xysetmiterlimit@#1@{\DN@ii{#1}\dimen@=#1\p@\relax
 \edef\next@{\expandafter\removePT@\the\dimen@}%
 \ifx\next@\next@ii\else
 \xywarning@{ignoring extra tokens in miter-limit: \next@}\fi
 \expandafter\xysetmiterlimit@@\expandafter{\next@}}
\xydef@\xysetlinecap@@#1{\xy@linecap@i{\def\xylinecap@{#1}}}
\xydef@\xysetlinejoin@@#1{\xy@linejoin@i{\def\xylinejoin@{#1}}}
\xydef@\xysetmiterlimit@@#1{%
 \xy@linemiter@i{\def\xylinemiter@{#1}}}
\xydef@\xy@linecap@i#1{#1\addtotoks@{\xy@linecap@@{#1}}}
\xydef@\xy@linejoin@i#1{#1\addtotoks@{\xy@linejoin@{#1}}}
\xydef@\xy@linemiter@i#1{#1\addtotoks@{\xy@linemiter@{#1}}}
\xydef@\xy@linecap@#1{\checkXyStyle@ \edef\xyprevcap@@{\xylinecap@}%
 #1\let\prexylinecap@=\prexylinecap@@ \let\postxylinecap@=\postxylinecap@@
 \applyLIFOstyle@\prexylinecap@{\xylinecap@}%
 \postxylinecap@{\xyprevcap@@}}
\xydef@\prexylinecap@@{\let\prexylinecap@=\eat@ 
 \let\postxylinecap@=\postxylinecap@@ \outputxylinecap@ }
\xydef@\postxylinecap@@{\let\postxylinecap@=\eat@ 
 \let\prexylinecap@=\prexylinecap@@ \resetxylinecap@@ }
\xylet@\prexylinecap@=\prexylinecap@@
\xylet@\postxylinecap@=\postxylinecap@@
\xydef@\outputxylinecap@#1{\xycapSpecial@@{#1}}
\xydef@\resetxylinecap@#1{\resetxylinecap@i{#1}\outputxylinecap@{#1}}
\xydef@\resetxylinecap@i#1{\def\xylinecap@{#1}}
\xylet@\resetxylinecap@@=\resetxylinecap@
\xylet@\xycapSpecial@@=\eat@
\xydef@\xy@linejoin@#1{\checkXyStyle@
 \edef\xyprevjoin@@{\xylinejoin@}#1%
 \let\prexylinejoin@=\prexylinejoin@@
 \let\postxylinejoin@=\postxylinejoin@@
 \applyLIFOstyle@\prexylinejoin@{\xylinejoin@}%
 \postxylinecap@{\xyprevjoin@@}}
\xydef@\prexylinejoin@@{\let\prexylinejoin@=\eat@ 
 \let\postxylinejoin@=\postxylinejoin@@ \outputxylinejoin@ }
\xydef@\postxylinejoin@@{\let\postxylinejoin@=\eat@ 
 \let\prexylinejoin@=\prexylinejoin@@ \resetxylinejoin@@ }
\xylet@\prexylinejoin@=\prexylinejoin@@
\xylet@\postxylinejoin@=\postxylinejoin@@
\xydef@\outputxylinejoin@#1{\xyjoinSpecial@@{#1}}
\xydef@\resetxylinejoin@#1{\resetxylinejoin@i{#1}\outputxylinejoin@{#1}}
\xydef@\resetxylinejoin@i#1{\def\xylinejoin@{#1}}
\xylet@\resetxylinejoin@@=\resetxylinejoin@
\xylet@\xyjoinSpecial@@=\eat@
\xydef@\xy@linemiter@#1{\checkXyStyle@
 \edef\xyprevmiter@@{\xylinemiter@}#1%
 \let\prexylinemiter@=\prexylinemiter@@
 \let\postxylinemiter@=\postxylinemiter@@
 \applyLIFOstyle@\prexylinemiter@{\xylinemiter@}%
 \postxylinecap@{\xyprevmiter@@}}
\xydef@\prexylinemiter@@{\let\prexylinemiter@=\eat@ 
 \let\postxylinemiter@=\postxylinemiter@@ \outputxylinemiter@ }
\xydef@\postxylinemiter@@{\let\postxylinemiter@=\eat@ 
 \let\prexylinemiter@=\prexylinemiter@@ \resetxylinemiter@@ }
\xylet@\prexylinemiter@=\prexylinemiter@@
\xylet@\postxylinemiter@=\postxylinemiter@@
\xydef@\outputxylinemiter@#1{\xymiterSpecial@@{#1}}
\xydef@\resetxylinemiter@#1{\resetxylinemiter@i{#1}\outputxylinemiter@{#1}}
\xydef@\resetxylinemiter@i#1{\def\xylinemiter@{#1}}
\xylet@\resetxylinemiter@@=\resetxylinemiter@
\xylet@\xymiterSpecial@@=\eat@
\xydef@\xypolyline#1{\xypolyline@{#1}}
\xydef@\xypolyline@#1{\hbox\bgroup
 \enter@{\pfromthep@ \basefromthebase@ \cfromthec@}%
 \def\xyps@list{}\edef\smapp@@{\s@bot}%
 \smapxy@i{\enter@{\pfromthep@ \basefromthebase@ }%
 \edef\xyps@list{\expandafter\removePT@\the\X@c\space
 \expandafter\removePT@\the\Y@c\space \xyps@list}\leave@}%
 \leave@ \xy@polystyle@@{#1}\xydopoly@style\egroup
 \def\Drop@@{\styledboxz@}\def\Connect@@{\styledboxz@}}%
\xylet@\xypolyline@Special=\eat@
\xylet@\xypolyfill@Special=\eat@
\xylet@\xypolyeofill@Special=\eat@
\xylet@\xypolydot@Special=\eat@
\xylet@\xypolydash@Special=\eat@
\xydef@\UnloadpolySpecials@{%
 \let\xypolyline@Special=\eat@
 \let\xypolyfill@Special=\eat@
 \let\xypolyeofill@Special=\eat@
 \let\xypolydot@Special=\eat@
 \let\xypolydash@Special=\eat@
}
\xydef@\xy@polystyle@#1{%
 \let\poly@style@@=\xypolyline@Special
 \DNii@{#1}\ifx\nextii@\empty 
 \else\DN@{*}\ifx\next@\nextii@ \let\poly@style@@=\xypolyfill@Special
 \else\DN@{?}\ifx\next@\nextii@ \let\poly@style@@=\xypolyeofill@Special
 \else\expandafter\DN@\expandafter{\addDOT@{}}\ifx\next@\nextii@
 \let\poly@style@@=\xypolydot@Special
 \else\expandafter\DN@\expandafter{\addDASH@{}}\ifx\next@\nextii@
 \let\poly@style@@=\xypolydash@Special
 \else\DN@{{*}}\ifx\next@\nextii@ \def\poly@style@@{\xypolystraight@{*}}%
 \else \def\poly@style@@{\xypolystraight@{#1}}%
 \fi\fi\fi\fi\fi\fi }
\xydef@\xydopoly@style{\expandafter\poly@style@@\expandafter{\xyps@list}}
\xydef@\xynopolystyle@#1#2{\xyundefinedLine@{polyline}{{#1}}@@}
\xydef@\xypolynospec@#1{\DNii@{#1}%
 \ifx\nextii@\empty\def\poly@style@@{\xypolystraight@{-}}%
 \else\DN@{.}\ifx\next@\nextii@ \def\poly@style@@{\xypolystraight@{.}}%
 \else\DN@{-}\ifx\next@\nextii@ \def\poly@style@@{\xypolystraight@{--}}%
 \else\DN@{*}\ifx\next@\nextii@ \def\poly@style@@{\xypolystraight@{.}}%
 \else\DN@{?}\ifx\next@\nextii@ \def\poly@style@@{\xypolystraight@{.}}%
 \else\DN@{{*}}\ifx\next@\nextii@ \def\poly@style@@{\xypolystraight@{*}}%
 \else \def\poly@style@@{\xypolystraight@{#1}}%
 \fi\fi\fi\fi\fi\fi }
\xydef@\xypolystraight@#1#2{%
 \enter@{\pfromthep@ \basefromthebase@ \cfromthec@}%
 \edef\smapp@@{\s@bot}\csname S@0\endcsname\czeroEdge@\pfromc@\def\smapp@@{0}%
 \smapxy@i{\czeroEdge@\enter@{\pfromthec@}{\connect@\dir{#1}}\leave@}\leave@ }
\xylet@\xy@polystyle@@=\xypolynospec@
\xydef@\UninstallPolylines@{%
 \UnloadpolySpecials@
 \let\xy@polystyle@@=\xypolynospec@ }
\UninstallPolylines@
\xydef@\xyundefinedLine@#1#2@@{%
 \xywarning@{The #1 #2 effect is not implemented with the current driver.}}%
\xydef@\xynolinewidth@#1#2{%
 \xyundefinedLine@{linewidth}{\the\xylinethick@}@@}%
\xydef@\xynolinecap@#1{\xyundefinedLine@{linecap}{\xylinecap@}@@}%
\xydef@\xynolinejoin@#1{\xyundefinedLine@{linejoin}{\xylinejoin@}@@}%
\xydef@\xynolinemiter@#1{\xyundefinedLine@{miterlimit}{\xylinemiter@}@@}%
\xylet@\xylinewidth@@=\xynolinewidth@
\xylet@\xy@linecap@@=\xynolinecap@
\xylet@\xy@linejoin@@=\xynolinejoin@
\xylet@\xy@linemiter@@=\xynolinemiter@
\xydef@\UnloadLine@#1{%
 \ifx#1\relax\else\xyunload@{line width extension}\fi
 \let\resetxyline@@=\resetxyline@
 \let\resetxylinecap@@=\resetxylinecap@
 \let\resetxylinejoin@@=\resetxylinejoin@
 \let\resetxylinemiter@@=\resetxylinemiter@
 \let\transxyline@@=\DN@
 \let\xylineSpecial@@=\eat@
 \let\xycapSpecial@@=\eat@
 \let\xyjoinSpecial@@=\eat@
 \let\xymiterSpecial@@=\eat@
 \let\xylinewidth@@=\xynolinewidth@
 \let\xy@linecap@@=\xynolinecap@
 \let\xy@linejoin@@=\xynolinejoin@
 \let\xy@linemiter@@=\xynolinemiter@
 \UninstallPolylines@ }
\xyaddunsupport{line}{\UnloadLine@\relax}
\xydef@\xylinewidth@#1#2{\checkXyStyle@
 #1\let\prexyline@=\prexyline@@ \let\postxyline@=\postxyline@@
 \applyLIFOstyle@\prexyline@{\the\xylinethick@}\postxyline@{#2}}
\xydef@\prexyline@@{\let\prexyline@=\eat@ 
 \let\postxyline@=\postxyline@@ \outputxyline@ }
\xydef@\postxyline@@{\let\postxyline@=\eat@ 
 \let\prexyline@=\prexyline@@ \resetxyline@@ }
\xylet@\prexyline@=\prexyline@@
\xylet@\postxyline@=\postxyline@@
\xydef@\resetxyline@#1{\resetxyline@i{#1}\outputxyline@{#1}}
\xydef@\resetxyline@i#1{\xylinethick@=#1\relax}
\xydef@\outputxyline@#1{\transxyline@@{#1}%
 \expandafter\xylineSpecial@@\expandafter{\next@}}
\xylet@\resetxyline@@=\resetxyline@
\xydef@\transxyline@#1{\edef\next@{\removePT@#1}}
\xylet@\transxyline@@=\DN@
\xylet@\xylineSpecial@@=\eat@
\xyendinput

xymatrix.tex
%% xymatrix.tex from $Id: xymatrix.doc,v 3.4 1997/05/18 01:14:25 krisrose Exp $
%%
%% Xy-pic ``Matrix'' feature.
%% Copyright (c) 1991-1997 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% See the companion README and INSTALL files for further information.
%% Copyright (c) 1991-1997 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, write to the Free Software Foundation, Inc.,
%% 675 Mass Ave, Cambridge, MA 02139, USA.
%%
\ifx\xyloaded\undefined \input xy \fi
\xyprovide{matrix}{Matrix feature}{\stripRCS$Revision: 3.4 $}%
 {Kristoffer H.~Rose}{krisrose@brics.dk}%
 {BRICS/Computer Science, University of Aarhus, Ny Munkegade, building 540,
 DK--8000 Aarhus~C}
\xynew@{count}\Row
\xynew@{count}\Col
\xydef@\maxrow@{0}
\xydef@\maxcol@{0}
\xydef@\maxcolrow@{0}
\xynew@{toks}\queue@
\xynew@{toks}\queue@@
\xynew@{count}\qcount@
\xynew@{count}\qcount@@
\xydef@\clearq@{%
 \global\queue@={}\global\qcount@=\@ne
 \global\queue@@={}\global\qcount@@=\z@}
\xydef@\addq@#1{\global\advance\matrixsize@\@ne
 \ifnum\qcount@@<\qcount@ \let\addq@@=\addq@i
 \else \let\addq@@=\addq@ii \fi
 \expandafter\addq@@\the\queue@@\addq@@{#1}}
\xylet@\addq@@=\relax
\xydef@\addq@i#1\addq@@#2{%
 \global\advance\qcount@@\@ne \global\queue@@={#1#2}}
\xydef@\addq@ii#1\addq@@#2{%
 \global\advance\qcount@\@ne \global\qcount@@=\z@ 
 \global\queue@=\expandafter{\the\queue@#1#2}\global\queue@@={}}
\xydef@\finishq@{\expandafter\addq@ii\the\queue@@\addq@@{}}
\xynew@{count}\matrixsize@
\xynew@{if}\ifnoisymatrices@ \noisymatrices@true
\xydef@\SilentMatrices{\noisymatrices@false}
\xydef@\NoisyMatrices{\noisymatrices@true}
\xydef@\xymatrixnocompile{\global\matrixsize@=\z@
 \ifnoisymatrices@\message{<xymatrix}\fi
 \if\inxy@
 \DN@{\nter@{}\xy@\xymatrix{\enter@{%
 \def\noexpand\xy@minX@@{\xy@minX@@}\def\noexpand\xy@maxX@@{\xy@maxX@@}%
 \def\noexpand\xy@minY@@{\xy@minY@@}\def\noexpand\xy@maxY@@{\xy@maxY@@}%
 \edef\noexpand\xymatrixprefix@@{\codeof\xymatrixprefix@@}}}}%
 \else \DN@{\xy \nter@\endxy \xy@\xymatrix{\nter@{}}}\fi \next@
 \xy@@{\save@ \edef\matrixorigin@{\X@c=\the\X@c \Y@c=\the\Y@c}%
 \edef\xy@minX@@{\the\X@c}\edef\xy@maxX@@{\the\X@c}%
 \edef\xy@minY@@{\the\Y@c}\edef\xy@maxY@@{\the\Y@c}}%
 \xdef\maxrow@{0}\xdef\maxcol@{0}\xdef\maxcolrow@{0}%
 \mkHWdefaults@ \xymatrix@prefix""}
\xylet@\xymatrix=\xymatrixnocompile
\xydef@\xymatrixprefix@@{}
\xydef@\xymatrix@prefix"#1"{\DN@{#1}\edef\xymatrixprefix@@{\codeof\next@}%
 \DNii@##1{\xy@{"#1"}{\edef\xymatrixprefix@@{##1}}}%
 \expandafter\nextii@\expandafter{\xymatrixprefix@@}%
 \xyFN@\xymatrix@setup}
\xydef@\xymatrix@setup{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\xymatrix@setup}%
 \else\ifx \bgroup\next \let\next@=\xymatrix@ii
 \else\addAT@\ifx\next \addAT@\DN@{\xy@{@}{}\xyFN@\xymatrix@at}%
 \else\ifx "\next \let\next@=\xymatrix@prefix
 \else \DN@{\xyerror@{\string\xymatrix<setup>{<rows>} expected}{}}%
 \fi\fi\fi\fi \next@}
\xydef@\xymatrix@ii#1{%
 \xymatrix@pretypeset{#1}%
 \ifnum\maxcol@=\z@ \mkWcol@ \mkWmax@ \mkHrow@ \mkHmax@
 \xdef\maxcol@{\the\Col}\xdef\maxcolrow@{\the\Row}\fi
 \ifnoisymatrices@\message{\maxcol@ x\maxrow@}\fi
 \xymatrix@measureit@@ \the\queue@ \global\queue@={}%
 \xymatrix@typeset{#1}\restore\xymatrix@insert
 \xy@@\leave@ \leave@
 \ifnoisymatrices@\message{\the\matrixsize@>}\fi \ignorespaces}
\xydef@\xymatrixcompile#1#{\xymatrixcompile@{#1}}
\xydef@\xymatrixcompile@#1#2{\xycompile{\xymatrixnocompile#1{#2}}}
\xydef@\CompileMatrices{\let\xymatrix=\xymatrixcompile}
\xydef@\NoCompileMatrices{\let\xymatrix=\xymatrixnocompile}
\xydef@\xy@cossign@@{+}
\xydef@\xy@sinsign@@{+}
\xydef@\xy@cosabs@@{1}
\xydef@\xy@sinabs@@{0}
\xydef@\xy@tanabs@@{0}
\xydef@\xy@cotabs@@{100}
\xydef@\xymatrix@rotation{%
 \xy@@{%
 \edef\xy@cossign@@{\ifdim\cosDirection\p@<\z@-\else+\fi}%
 \edef\xy@sinsign@@{\ifdim\sinDirection\p@<\z@-\else+\fi}%
 \edef\xy@cosabs@@{%
 \if\xy@cossign@@\cosDirection\else\xy@cossign@@\cosDirection\fi}%
 \edef\xy@sinabs@@{%
 \if\xy@sinsign@@\sinDirection\else\xy@sinsign@@\sinDirection\fi}%
 \dimen@=\xy@cosabs@@\p@ \dimen@ii=\xy@sinabs@@\p@
 \ifdim\dimen@ii<.01\p@ \def\xy@cotabs@@{100}%
 \else \quotient@\xy@cotabs@@\dimen@\dimen@ii \fi
 \dimen@=\xy@cosabs@@\p@ \dimen@ii=\xy@sinabs@@\p@
 \ifdim\dimen@<.01\p@ \def\xy@tanabs@@{100}%
 \else \quotient@\xy@tanabs@@\dimen@ii\dimen@ \fi}}
\xylet@\xymatrixsavedCOORD@=\relax
\xydef@\xymatrix@pretypeset#1{%
 \global\Row=\z@ \xdef\maxcol@{0}\clearq@
 \setbox8=\vtop{%
 \ifx\xymatrixsavedCOORD@\relax \let\xymatrixsavedCOORD@=\COORD@ \fi
 \let\COORD@=\xymatrixCOORD@
 \everycr{}\let\\=\cr \tabskip=\z@ \offinterlineskip
 \halign{\prentry@ ##!@&&\xyFN@\prentry@@##!@\cr#1\crcr}%
 \prentry@@@}%
 \xdef\maxrow@{\the\Row}%
 \finishq@}
\xydef@\prentry@{\relax
 \ifnum\Row>\z@
 \ifnum\maxcol@<\Col\xdef\maxcol@{\the\Col}\xdef\maxcolrow@{\the\Row}\fi
 \expandafter\xdef\csname maxcol@\the\Row\endcsname{\the\Col}\fi
 \global\advance\Row\@ne \global\Col=\z@ \xyFN@\prentry@@}
\xylet@\lastprentry@@=\relax
\xydef@\xyeatall@{\let\xy@=\xyeat@ \change@oxy@\xyeat@ \let\xy@@ix@=\eat@}
\xydef@\prentry@@{\global\advance\Col\@ne
 \let\next@=\prentry@@norm
 \ifoldxymatrix@\else \ifx *\next \DN@*{\xyFN@\prentry@@star}\fi \fi
 \next@}
\xydef@\prentry@@star{\ifx *\next \DN@*{\xyFN@\prentry@@star@ii}%
 \else \DN@##1##{\prentry@@star@i{##1}}\fi \next@}
\xydef@\prentry@@star@i#1#2#3!@{\gdef\lastprentry@@{*#1{#2}#3}%
 \setbox\lastobjectbox@=\object#1{#2}%
 \prentry@@x}
\xydef@\prentry@@star@ii{%
 \ifx [\next
 \DN@[##1]{\DN@####1{\def\entrymodifiers@{[##1]####1}}%
 \expandafter\next@\expandafter{\entrymodifiers@}\prentry@@norm}%
 \else
 \DN@##1{\DN@####1{\def\entrymodifiers@{##1####1}}%
 \expandafter\next@\expandafter{\entrymodifiers@}\prentry@@norm}%
 \fi \next@}
\xydef@\prentry@@norm#1!@{\gdef\lastprentry@@{#1}%
 \DN@{\setbox\lastobjectbox@=\object}%
 \expandafter\next@\entrymodifiers@{\xyeatall@ \everyentry@ #1}%
 \prentry@@x}
\xydef@\prentry@@x{%
 \edef\next@{{\noexpand\pre@emit{\the\Row}{\Upness@}{\the\Col}{\Leftness@}%
 {\the\L@c}{\the\R@c}{\the\D@c}{\the\U@c}{\expandafter\noexpand\the\Edge@c}}}%
 \expandafter\addq@\next@ \box\lastobjectbox@}
\xynew@{if}\ifoldxymatrix@ \oldxymatrix@false
\xydef@\prentry@@@{\relax \let\next@=\prentry@@@i
 \ifoldxymatrix@ \ifnum\Col=\@ne \ifx\lastprentry@@\empty
 \global\advance\Row\m@ne \let\next@=\relax \fi\fi\fi
 \global\let\lastprentry@@=\relax \next@}
\xydef@\prentry@@@i{%
 \ifnum\maxcol@<\Col \xdef\maxcol@{\the\Col}\xdef\maxcolrow@{\the\Row}\fi
 \expandafter\xdef\csname maxcol@\the\Row\endcsname{\the\Col}}
\xydef@\xy@minX@@{\z@}
\xydef@\xy@maxX@@{\z@}
\xydef@\xy@minY@@{\z@}
\xydef@\xy@maxY@@{\z@}
\xydef@\pre@emit#1#2#3#4#5#6#7#8#9{%
 \global\Row=#1\global\Col=#3\relax
 \ifnum#3=\@ne
 \ifnum#1=\@ne \xy@@{\matrixorigin@}%
 \else \count@@=#1\advance\count@@\m@ne
 \edef\next@{\noexpand\xy@@{\noexpand\cfromid@
 {\xymatrixprefix@@\the\count@@,1}}}\next@
 \pre@emit@ \W@maxout\Hrow@c@@\W@maxin\Hrow@in\xy@tanabs@@
 \X@c\xy@sinsign@@\xy@sinabs@@\xymatrixrowsep@
 \pre@emit@ \Hrow@c@@\W@maxout\Hrow@in\W@maxin\xy@cotabs@@
 \Y@c{-\xy@cossign@@}\xy@cosabs@@\xymatrixrowsep@
 \fi
 \else \count@@=#3\advance\count@@\m@ne
 \pre@emit@ \Wcol@c@@\H@maxout\Wcol@in\H@maxin\xy@cotabs@@
 \X@c\xy@cossign@@\xy@cosabs@@\xymatrixcolsep@
 \pre@emit@ \H@maxout\Wcol@c@@\H@maxin\Wcol@in\xy@tanabs@@
 \Y@c\xy@sinsign@@\xy@sinabs@@\xymatrixcolsep@
 \fi
 \DN@##1{\xy@@{\L@c=#5\R@c=#6\D@c=#7\U@c=#8\Edge@c={#9}\idfromc@{##1#1,#3}}}%
 \expandafter\next@\expandafter{\xymatrixprefix@@}%
 \xy@@{%
 \dimen@=\X@c \advance\dimen@-\L@c
 \ifdim\dimen@<\xy@minX@@ \edef\xy@minX@@{\the\dimen@}\fi
 \dimen@=\X@c \advance\dimen@+\R@c
 \ifdim\dimen@>\xy@maxX@@ \edef\xy@maxX@@{\the\dimen@}\fi
 \dimen@=\Y@c \advance\dimen@-\D@c
 \ifdim\dimen@<\xy@minY@@ \edef\xy@minY@@{\the\dimen@}\fi
 \dimen@=\Y@c \advance\dimen@+\U@c
 \ifdim\dimen@>\xy@maxY@@ \edef\xy@maxY@@{\the\dimen@}\fi}}
\xydef@\pre@emit@#1#2#3#4{#1\A@ #2\B@ #3\R@ #4\dimen@
 \edef\next@{{\the\A@}{\the\B@}{\the\R@}{\the\dimen@}}%
 \expandafter\pre@emit@i\next@}
\xydef@\pre@emit@i#1#2#3#4#5{\xy@@{%
 \dimen@=#2\R@=#5\dimen@ \dimen@=#1\relax \ifdim\R@>\dimen@ \R@=\dimen@ \fi
 \dimen@=#4\B@=#5\dimen@ \dimen@=#3\relax \ifdim\B@>\dimen@ \B@=\dimen@ \fi
 \advance\R@\B@}%
 \pre@emit@ii}
\xydef@\pre@emit@ii#1#2#3#4{\xy@@{%
 \dimen@=#4\dimen@=#3\dimen@ \advance\R@\dimen@ \advance#1#2\R@}}
\xydef@\Wcol@in#1{#1=\csname Wcol@\the\Col\endcsname #1=.5#1}
\xydef@\Wcol@out#1{#1=\csname Wcol@\the\Col\endcsname #1=.5#1}
\xydef@\Wcol@c@@#1{#1=\csname Wcol@\the\count@@\endcsname #1=.5#1}
\xydef@\W@maxin#1{#1=\W@max #1=.5#1}
\xydef@\W@maxout#1{#1=\W@max #1=.5#1}
\xydef@\Hrow@in#1{#1=\csname Hrow@\the\Row\endcsname #1=.5#1}
\xydef@\Hrow@out#1{#1=\csname Hrow@\the\Row\endcsname #1=.5#1}
\xydef@\Hrow@c@@#1{#1=\csname Hrow@\the\count@@\endcsname #1=.5#1}
\xydef@\H@maxin#1{#1=\H@max #1=.5#1}
\xydef@\H@maxout#1{#1=\H@max #1=.5#1}
\xydef@\H@max{\z@}
\xydef@\W@max{\z@}
\xydef@\HW@max{\z@}
\xydef@\mkHrow@{}
\xydef@\mkWcol@{}
\xydef@\mkHmax@{}
\xydef@\mkWmax@{}
\xydef@\mkHWmax@{}
\xydef@\mkHWdefaults@{\let\xymatrix@measureit@@=\xymatrix@measureit
 \let\mkHrow@=\Hrow@R \let\mkWcol@=\Wcol@C
 \def\mkHmax@{\ifdim\dimen@>\H@max\relax \xdef\H@max{\the\dimen@}\fi}%
 \def\mkWmax@{\ifdim\dimen@>\W@max\relax \xdef\W@max{\the\dimen@}\fi}%
 \let\mkHWmax@=\HWmax@max}
\xydef@\Hrow@R{\expandafter\xdef\csname Hrow@\the\Row\endcsname{\the\dimen@}}
\xydef@\Wcol@C{\expandafter\xdef\csname Wcol@\the\Col\endcsname{\the\dimen@}}
\xydef@\Hrow@max{\expandafter\gdef\csname Hrow@\the\Row\endcsname{\H@max}}
\xydef@\Wcol@max{\expandafter\gdef\csname Wcol@\the\Col\endcsname{\W@max}}
\xydef@\Hrow@HWmax{\expandafter\gdef\csname Hrow@\the\Row\endcsname{\HW@max}}
\xydef@\Wcol@HWmax{\expandafter\gdef\csname Wcol@\the\Col\endcsname{\HW@max}}
\xydef@\HWmax@max{%
 \ifdim\H@max>\W@max\global\let\HW@max=\H@max\else\global\let\HW@max=\W@max\fi}
\xydef@\HWmax@set#1{\gdef\HW@max{#1}%
 \global\let\H@max=\HW@max \global\let\W@max=\HW@max}
\xydef@\xymatrix@measureit{%
 \xdef\H@max{\z@}\xdef\W@max{\z@}%
 \setbox6=\vbox{\unvbox8 \global\Row=\maxrow@
 \loop@ \dimen@ii=\lastskip\unskip \ifnum\z@<\Row
 \setbox4=\lastbox \dimen@=\dp4 \advance\dimen@\ht4 \mkHrow@ \mkHmax@
 \ifnum\Row=\maxcolrow@
 \setbox2=\hbox{\unhbox4
 \global\Col=\maxcol@
 \loop@ \dimen@ii=\lastskip\unskip \ifnum\z@<\Col
 \setbox\z@=\lastbox \dimen@=\wdz@ \mkWcol@ \mkWmax@
 \global\advance\Col\m@ne
 \repeat@}\fi
 \global\advance\Row\m@ne
 \repeat@}%
 \mkHWmax@}
\xylet@\xymatrix@measureit@@=\relax
\xydef@\xymatrix@typeset#1{%
 \clearq@
 \hbox{\vtop{\xyqall@
 \xy@@{\ifx\xymatrixsavedCOORD@\relax
 \enter@{\noexpand\let\noexpand\COORD@\noexpand\xymatrixsavedCOORD@}%
 \let\xymatrixsavedCOORD@=\COORD@ \let\COORD@=\xymatrixCOORD@
 \else \enter@{}\fi}%
 \ifx\xymatrixsavedCOORD@\relax \let\xymatrixsavedCOORD@=\COORD@ \fi
 \let\COORD@=\xymatrixCOORD@
 \kern\z@ \global\Row=\z@
 \everycr{}\let\\=\cr \tabskip=\z@ \offinterlineskip
 \halign{\entry@##!@&&\entry@@##!@\cr#1\crcr}%
 \xy@@{\leave@}}}%
 \finishq@ \expandafter\xy@@\expandafter{\the\queue@}\global\queue@={}}
\xydef@\entry@{\relax \global\advance\Row\@ne \global\Col=\z@ \entry@@}
\xydef@\entry@@{\global\advance\Col\@ne
 \DN@##1,##2,##3@{\xy@{ENTRY "##3##1,##2"}{\Row=##1 \Col=##2\relax
 \cfromid@{##3##1,##2}\pfromc@}}%
 \edef\nextii@{\the\Row,\the\Col,\xymatrixprefix@@ @}%
 \expandafter\next@\nextii@
 \xyFN@\entry@@i}
\xydef@\entry@@i{\let\next@=\entry@@norm
 \ifoldxymatrix@\else \ifx *\next \DN@*{\xyFN@\entry@@star}\fi \fi
 \next@}
\xydef@\entry@@star{\ifx *\next \DN@*{\xyFN@\entry@@star@ii}%
 \else \DN@##1##{\entry@@star@i{##1}}\fi \next@}
\xydef@\entry@@star@i#1#2#3!@{%
 \xy@@ix@{{#1}{#2}}\xy@@{\expandafter\dropentry@\the\toks9}%
 \setboxz@h{\xyqall@
 \ifx\xymatrixsavedCOORD@\relax \let\xymatrixsavedCOORD@=\COORD@ \fi
 \let\COORD@=\xymatrixCOORD@ \everyentry@ #3}%
 \setbox\z@=\copy\voidb@x}
\xydef@\entry@@star@ii{%
 \ifx [\next
 \DN@[##1]{\DN@####1{\def\entrymodifiers@{[##1]####1}}%
 \expandafter\next@\expandafter{\entrymodifiers@}\entry@@norm}%
 \else
 \DN@##1{\DN@####1{\def\entrymodifiers@{##1####1}}%
 \expandafter\next@\expandafter{\entrymodifiers@}\entry@@norm}%
 \fi \next@}
\xydef@\entry@@norm#1!@{%
 \DN@##1{\expandafter\xy@@ix@
 \expandafter{\expandafter{\entrymodifiers@}{##1}}}%
 \expandafter\next@\expandafter{\everyentry@#1}%
 \xy@@{\expandafter\dropentry@\the\toks9}%
 \setbox\z@=\expandafter\object\entrymodifiers@{\xyqall@
 \ifx\xymatrixsavedCOORD@\relax \let\xymatrixsavedCOORD@=\COORD@ \fi
 \let\COORD@=\xymatrixCOORD@ \everyentry@ #1}%
 \setbox\z@=\copy\voidb@x}
\xydef@\dropentry@#1#2{\drop@{#1}{\xyeatall@
 \ifx\xymatrixsavedCOORD@\relax \let\xymatrixsavedCOORD@=\COORD@ \fi
 \let\COORD@=\xymatrixCOORD@ #2}}
\xydef@\xyqall@{%
 \ifxysaving@ \let\xy@=\xyqs@ \let\xy@@ix@=\xysave@@toksix@
 \else \let\xy@=\xyq@ \let\xy@@ix@=\xyq@@toksix@ \fi
 \change@oxy@\xy@}
\xydef@\xyq@#1#2{\addq@{#2}}
\xydef@\xyq@@toksix@{\begingroup
 \xyuncatcodes \afterassignment\xyq@@toksix@i \global\toks9=}
\xydef@\xyq@@toksix@i{%
 \DN@##1{\endgroup \xy@@{\global\toks9={##1}}}%
 \expandafter\next@\expandafter{\the\toks9}}
\xydef@\xyqs@{\global\advance\matrixsize@\@ne \xysave@}
\xydef@\xymatrix@insert{%
 \xy@@{\edef\nextii@{{\xy@minX@@}{\xy@maxX@@}{\xy@minY@@}{\xy@maxY@@}}%
 \expandafter\xymatrix@insert@\nextii@}}
\xydef@\xymatrix@insert@#1#2#3#4{\matrixorigin@
 \L@c=+\X@c \advance\L@c-#1\relax
 \R@c=-\X@c \advance\R@c+#2\relax
 \D@c=+\Y@c \advance\D@c-#3\relax
 \U@c=-\Y@c \advance\U@c+#4\relax
 \Edge@c={\rectangleEdge}}
\xylet@\thematrixCOORD@@=\relax
\xylet@\thematrixprefix@@=\relax
\xydef@\xymatrixCOORD@{%
 \ifx [\next
 \DN@[##1]{\xy@{[##1]}{\def\thematrixCOORD@@{[##1]}}%
 \xyFN@\xymatrixCOORD@i##1]}%
 \else \let\next@=\xymatrixsavedCOORD@ \fi \next@}
\xydef@\xymatrixCOORD@i{\count@=\Row \count@@=\Col
 \let\thematrixprefix@@=\xymatrixprefix@@
 \ifcat A\noexpand\next
 \DN@##1{\expandafter\notrelaxorelse@\csname xymatrixCOORD@i@##1\endcsname
 \xymatrixCOORD@other}%
 \else\ifx ]\next \DN@]{\xymatrixCOORD@x}%
 \else\ifx "\next \DN@"##1"{\DN@{##1}\edef\thematrixprefix@@{\codeof\next@}%
 \xyFN@\xymatrixCOORD@ii}%
 \else \let\next@=\xymatrixCOORD@other \fi\fi\fi \next@}
\xydef@\xymatrixCOORD@i@u{\advance\count@ \m@ne\xyFN@\xymatrixCOORD@ii}
\xydef@\xymatrixCOORD@i@d{\advance\count@ \@ne \xyFN@\xymatrixCOORD@ii}
\xydef@\xymatrixCOORD@i@l{\advance\count@@\m@ne\xyFN@\xymatrixCOORD@ii}
\xydef@\xymatrixCOORD@i@r{\advance\count@@\@ne \xyFN@\xymatrixCOORD@ii}
\xydef@\xymatrixCOORD@ii{%
 \ifcat A\noexpand\next
 \DN@##1{\expandafter\notrelaxorelse@\csname xymatrixCOORD@i@##1\endcsname
 \xymatrixCOORD@error}%
 \else\ifx ]\next \DN@]{\xymatrixCOORD@x}%
 \else \let\next@=\xymatrixCOORD@xx \fi\fi \next@}
\xydef@\xymatrixCOORD@error#1{\DN@{#1}%
 \xyerror@{illegal <coord> (\codeof\next@): illegal [...] target form}{}%
 \xyFN@\xymatrixCOORD@ii}
\xydef@\xymatrixCOORD@other#1,#2]{%
 \advance\count@#1\advance\count@@#2\xymatrixCOORD@x}
\xydef@\xymatrixCOORD@x{%
 \DN@##1{\xy@@{%
 \expandafter\let\expandafter\next@\csname Q@##1\endcsname
 \ifx\next@\relax \xyerror@RC{##1}\else \next@ \fi}%
 \afterCOORD@}%
 \edef\nextii@{{\thematrixprefix@@\the\count@,\the\count@@}}%
 \expandafter\next@\nextii@}
\xydef@\xymatrixCOORD@xx{%
 \DN@##1{\xy@@{%
 \expandafter\let\expandafter\next@\csname Q@##1\endcsname
 \ifx\next@\relax \xyerror@RC{##1}\else \next@\no@@ \fi}%
 \afterPLACE\xymatrixCOORD@after}%
 \edef\nextii@{{\thematrixprefix@@\the\count@,\the\count@@}}%
 \expandafter\next@\nextii@}
\xydef@\xymatrixCOORD@after{%
 \ifx ]\next \DN@]{\afterCOORD@}%
 \else \let\next@=\xymatrixCOORD@error \fi \next@}
\xydef@\xyerror@RC#1{\xyerror@{in entry \string"\the\Row,\the\Col\string":
 No \codeof\thematrixCOORD@@\space(is \string"#1\string") from here}{}}
\xylet@\xymatrix@addop@@=\relax
\xydef@\xymatrix@at{\def\xymatrix@addop@@{\xymatrix@R\xymatrix@C}%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\xymatrix@at}%
 \else\ifx !\next \DN@!{\xyFN@\xymatrix@fix}%
 \else\addPLUS@\ifx \next \let\next@=\xymatrix@addop
 \else\addDASH@\ifx \next \let\next@=\xymatrix@addop
 \else\addEQ@\ifx \next \let\next@=\xymatrix@addop
 \else\ifx 1\next \DN@1{\def\everyentry@{\vphantom(}%
 \let\objectmargin@=\p@ \xyFN@\xymatrix@setup}%
 \else\ifx R\next \def\xymatrix@addop@@{\xymatrix@R}\DN@ R{\xymatrix@addop}%
 \else\ifx C\next \def\xymatrix@addop@@{\xymatrix@C}\DN@ C{\xymatrix@addop}%
 \else\ifx M\next \def\xymatrix@addop@@{\xymatrix@M}\DN@ M{\xymatrix@addop}%
 \else\ifx L\next \def\xymatrix@addop@@{\xymatrix@L}\DN@ L{\xymatrix@addop}%
 \else\ifx H\next \def\xymatrix@addop@@{\xymatrix@H}\DN@ H{\xymatrix@addop}%
 \else\ifx W\next \def\xymatrix@addop@@{\xymatrix@W}\DN@ W{\xymatrix@addop}%
 \else\ifx *\next \DN@*{\xyFN@\xymatrix@mods}%
 \else \DN@{\afterDIRECTIONorEMPTY
 {\xymatrix@rotation \xyFN@\xymatrix@setup}{%
 \xyerror@{<addop> or <direction> or one of RCMLHW*! expected}{}%
 \xyFN@\xymatrix@setup}}%
 \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next@}
\xydef@\xymatrix@fix{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\xymatrix@fix}%
 \else\ifx R\next \let\mkHrow@=\Hrow@max \DN@ R{\xyFN@\xymatrix@fix@}%
 \else\ifx C\next \let\mkWcol@=\Wcol@max \DN@ C{\xyFN@\xymatrix@fix@}%
 \else \let\mkHrow@=\Hrow@HWmax \let\mkWcol@=\Wcol@HWmax
 \let\next@=\xymatrix@fix@
 \fi\fi\fi \next@}
\xydef@\xymatrix@fix@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\xymatrix@fix@}%
 \else\ifx 0\next \def\mkHWmax@{\HWmax@set\z@}\DN@ 0{\xyFN@\xymatrix@setup}%
 \else\addEQ@\ifx\next \addEQ@\DN@{\afterassignment\xymatrix@fix@x\dimen@ii=}%
 \else \let\mkHWmax@=\HWmax@max \let\next@=\xymatrix@setup \fi\fi\fi \next@}
\xydef@\xymatrix@fix@x{%
 \edef\mkHWmax@{\noexpand\HWmax@set{\the\dimen@ii}}\xyFN@\xymatrix@setup}
\xydef@\xymatrix@addop{\afterADDOP{\xyFN@\xymatrix@addop@}}
\xydef@\xymatrix@addop@{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\xymatrix@addop@}%
 \else\ifx R\next \DN@ R{\xy@{R}{}\dimen@ii=\xymatrixrowsep@\xymatrix@addop@x}%
 \else\ifx C\next \DN@ C{\xy@{C}{}\dimen@ii=\xymatrixcolsep@\xymatrix@addop@x}%
 \else \DN@{\afterassignment\xymatrix@addop@x\dimen@ii=}\fi\fi\fi \next@}
\xydef@\xymatrix@addop@x{\expandafter\xy@\expandafter{\the\dimen@ii}{}%
 \xymatrix@addop@@ \xyFN@\xymatrix@setup}
\xydef@\xymatrix@R{\Addop@@\xymatrixrowsep@\dimen@ii}
\xydef@\xymatrix@C{\Addop@@\xymatrixcolsep@\dimen@ii}
\xydef@\xymatrix@M{\Addop@@\objectmargin@\dimen@ii}
\xydef@\xymatrix@L{\Addop@@\labelmargin@\dimen@ii}
\xydef@\xymatrix@H{\Addop@@\objectheight@\dimen@ii}
\xydef@\xymatrix@W{\Addop@@\objectwidth@\dimen@ii}
\xydef@\xymatrixrowsep@{2pc}
\xydef@\xymatrixcolsep@{2pc}
\xydef@\xymatrixrowsep{\afterADDOP{\Addop@@\xymatrixrowsep@}}
\xydef@\xymatrixcolsep{\afterADDOP{\Addop@@\xymatrixcolsep@}}
\xydef@\xymatrix@mods{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\xymatrix@mods}%
 \else\ifx [\next
 \DN@ [##1]{\xy@{[##1]}{}\DN@####1{\def\entrymodifiers@{[##1]####1}}%
 \expandafter\next@\expandafter{\entrymodifiers@}\xyFN@\xymatrix@setup}%
 \else\addPLUS@\ifx \next \DN@##1{\DNii@{##1}\xyFN@\xymatrix@change}%
 \else\addDASH@\ifx \next \DN@##1{\DNii@{##1}\xyFN@\xymatrix@change}%
 \else\addEQ@\ifx \next \DN@##1{\DNii@{##1}\xymatrix@set}%
 \else \let\next@=\xymatrix@mods@error \fi\fi\fi\fi\fi \next@}
\xydef@\xymatrix@set{%
 \begingroup \plainxy@
 \afterVECTORorEMPTY\xymatrix@mods@x\xymatrix@mods@error}
\xydef@\xymatrix@change{%
 \addEQ@\ifx\next \DN@##1{\expandafter\DNii@\expandafter{\nextii@##1}%
 \expandafter\xy@\expandafter{\nextii@}{}\begingroup \plainxy@
 \afterVECTORorEMPTY\xymatrix@mods@x\xymatrix@mods@xx}%
 \else \DN@{\expandafter\xy@\expandafter{\nextii@}{}\begingroup \plainxy@
 \afterVECTORorEMPTY\xymatrix@mods@x\xymatrix@mods@xx}\fi
 \next@}
\xydef@\xymatrix@mods@x{\expandafter\xy@\expandafter{\nextii@}{}%
 \def\next@##1##2##3{\def\nextii@####1{##1##2####1##3}}%
 \addGT@{\addLT@{\expandafter\next@\expandafter{\nextii@}}}%
 \DN@##1{\gdef\tmp@@@{{##1}}}%
 \edef\nextiii@{{\the\X@c,\the\Y@c}}%
 \expandafter\expandafter\expandafter\next@
 \expandafter\expandafter\expandafter{\expandafter\nextii@\nextiii@}%
 \endgroup
 \DN@##1{\xy@{##1}{}\DN@####1{\def\entrymodifiers@{##1####1}}%
 \expandafter\next@\expandafter{\entrymodifiers@}\xyFN@\xymatrix@setup}%
 \expandafter\next@\tmp@@@}
\xydef@\xymatrix@mods@xx{\expandafter\xy@\expandafter{\nextii@}{}%
 \expandafter\gdef\expandafter\tmp@@@\expandafter{\expandafter{\nextii@}}%
 \endgroup
 \DN@##1{\xy@{##1}{}\DN@####1{\def\entrymodifiers@{##1####1}}%
 \expandafter\next@\expandafter{\entrymodifiers@}\xyFN@\xymatrix@setup}%
 \expandafter\next@\tmp@@@}
\xydef@\xymatrix@mods@error{\endgroup
 \xyerror@{Impossible @*<addop><size> <setup>.}{}\xyFN@\xymatrix@setup}
\xywarnifdefined\entrymodifiers
\expandafter\def\addEQ@\entrymodifiers#1{\def\entrymodifiers@{#1}\ignorespaces}
\xydef@\entrymodifiers@{\entrybox}
\xydef@\entrybox#1{\hbox{\setbox\z@=\objectbox{#1}%
 \L@p=\wdz@ \D@p=\ht\z@ \advance\D@p\dp\z@
 \dimen@=\objectwidth@ \advance\dimen@-\L@p
 \ifdim\dimen@>\z@ \advance\L@p\dimen@ \R@p=.5\dimen@ \else \R@p=\z@ \fi
 \dimen@=\objectheight@ \advance\dimen@-\D@p
 \ifdim\dimen@>\z@ \advance\D@p\dimen@ \fi
 \dimen@=\objectmargin@ \advance\L@p2\dimen@ \advance\D@p2\dimen@ 
 \U@p=-.5\ht\z@ \advance\U@p.5\dp\z@ \advance\R@p\objectmargin@
 \setboxz@h{\kern\R@p \raise\U@p\boxz@}%
 \wdz@=\L@p \ht\z@=.5\D@p \dp\z@=.5\D@p \boxz@}}
\xywarnifdefined\everyentry
\expandafter\def\addEQ@\everyentry#1{\def\everyentry@{#1}\ignorespaces}
\xylet@\everyentry@=\empty
\xyendinput

xyrecat.tex
%% xyrecat.tex from $Id: xyrecat.doc,v 3.3 1996/12/19 03:31:56 krisrose Exp $
%%
%% Xy-pic ``Reset Category Codes'' utility.
%% Copyright (c) 1994-1996 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% See the companion README and INSTALL files for further information.
%% Copyright (c) 1991-1996 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, write to the Free Software Foundation, Inc.,
%% 675 Mass Ave, Cambridge, MA 02139, USA.
%%
\xyuncatcodes
\xyrecat @ 64 \catcode 64 11
\xymakeADD@\addHASH@ # 35
\xymakeADD@\addDOLL@ $ 36
\xymakeADD@\addAND@ & 38
\xymakeADD@\addRQ@ ' 39
\xymakeADD@\addPLUS@ + 43
\xymakeADD@\addDASH@ - 45
\xymakeADD@\addDOT@ . 46
\xymakeADD@\addLT@ < 60
\xymakeADD@\addEQ@ = 61
\xymakeADD@\addGT@ > 62
\xymakeADD@\addLQ@ ` 96
\endinput

xyrotate.tex
%% xyrotate.tex from $Id: xyrotate.doc,v 3.3 1996/12/18 09:40:16 ross Exp $
%%
%% Xy-pic ``Rotate and Scale extension'' option.
%% Copyright (c) 1993-1996 Ross Moore <ross@mpce.mq.edu.au>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% See the companion README and INSTALL files for further information.
%% Copyright (c) 1991-1996 Kristoffer H. Rose <krisrose@brics.dk>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, write to the Free Software Foundation, Inc.,
%% 675 Mass Ave, Cambridge, MA 02139, USA.
%%
\ifx\xyloaded\undefined \input xy \fi
\xyprovide{rotate}{Rotate and Scale extension}{\stripRCS$Revision: 3.3 $}%
 {Ross Moore}{ross@mpce.mq.edu.au}%
 {Mathematics Department, Macquarie University, NSW~2109, Australia}
\xydef@\xyundefinedRotate@#1#2@@{%
 \xywarning@{The #1 #2 effect is not implemented with the current driver.}}%
\xydef@\NoResizing{\xyNoResizing@}
\xydef@\UseResizing{\xyUseResizing@}
\xydef@\xyNoResizing@{%
 \global\let\origxyrescale@=\xyrescale@
 \global\let\origxyrotSizeMod@=\xyrotateSizeMod@
 \global\let\xyNoResizing@=\xyNoResizing@@
 \global\let\xyUseResizing@=\xyUseResizing@@
 \xyNoResizing@@ }
\xydef@\xyNoResizing@@{%
 \global\let\xyrescale@=\xyignorescale@
 \global\let\xyrotateSizeMod@=\xyignoreSizeMod@
 }
\xylet@\xyUseResizing@=\relax
\xydef@\xyUseResizing@@{%
 \global\let\xyrescale@=\origxyrescale@
 \global\let\xyrotateSizeMod@=\origxyrotSizeMod@
 }
\xydefcsname@{shape [@...]}#1{\xyrotatechar@#1@@}%
\xydefcsname@{shape [<...]}#1{\xyshearchar@{#1}@@}%
\xydefcsname@{shape [*...]}#1{\xyscalechar@{#1}@@}%
\xydefcsname@{shape [left]}{\xyshape@left@}
\xydefcsname@{shape [right]}{\xyshape@right@}
\xydefcsname@{shape [flip]}{\xyshape@flip@}
\xydefcsname@{shape [halfsize]}{\xyshape@halfsize@}
\xydefcsname@{shape [dblsize]}{\xyshape@dblsize@}
\xydefcsname@{shape [vflip]}{\xyshape@vflip@}
\xydefcsname@{shape [hflip]}{\xyshape@hflip@}
\xydef@\preXYtransform@{}
\xydef@\postXYtransform@{}
\xywarnifdefined\preXYtransform@@
\xywarnifdefined\postXYtransform@@
 \gdef\preXYtransform@@{}
 \gdef\postXYtransform@@{}
\xydef@\xy@transform@{}
\xydef@\preShape@@{}
\xydef@\postShape@@{}
\xydef@\modXYtransform@{%
 \ifx\xy@transform@\empty
 \transformDrop@\transformConnect@\resetTransform@\fi
 \DN@##1{\expandafter\def\expandafter\tmp@\expandafter{##1}}%
 \expandafter\next@\expandafter{\preShape@@}%
 \DN@##1{\expandafter\gdef\expandafter\preXYtransform@@\expandafter{%
 \tmp@ ##1}}\expandafter\next@\expandafter{\preXYtransform@@}%
 \DN@##1{\expandafter\def\expandafter\tmp@\expandafter{##1}}%
 \expandafter\next@\expandafter{\postShape@@}%
 \DN@##1{\expandafter\gdef\expandafter\postXYtransform@@\expandafter{%
 \postXYtransform@@ ##1}}\expandafter\next@\expandafter{\tmp@}}%
\xydef@\transformDrop@{\let\xy@transform@=\relax
 \expandafter\def\expandafter\Drop@@\expandafter{%
 \expandafter\preXYtransform@\Drop@@\postXYtransform@}}
\xydef@\transformConnect@{\let\xy@transform@=\relax
 \expandafter\def\expandafter\Connect@@\expandafter{%
 \expandafter\preXYtransform@\Connect@@\postXYtransform@}}
\xydef@\resetTransform@{\gdef\preXYtransform@@{}\gdef\postXYtransform@@{}}
\xydef@\xynametransform@#1{%
 \DN@{\expandafter\gdef\expandafter#1\expandafter{\the\toks@}}\next@ }
\xydef@\xyscalechar@#1@@{\xyscalechars@#1,#1,@@}
\xydef@\xyscalechars@#1,#2,#3@@{%
 \DN@{\xyrescale@(#1,#2)}%
 \dimen@=#1\p@
 \ifdim\dimen@>\z@ \else \ifdim\dimen@<\z@ \else
 \DN@{\xywarning@{invalid scaling factors #1, #2}}%
 \fi\fi \dimen@=#2\p@
 \ifdim\dimen@>\z@ \else \ifdim\dimen@<\z@ \else
 \DN@{\xywarning@{invalid scaling factors #1, #2 }}%
 \fi\fi \next@ }
\xydef@\xyrescale@(#1,#2){%
 \setboxz@h{\xyscale@@{#1}{#2}%
 \dimen@=\ifx-#1\R@c\advance\dimen@-\R@c \dimen@=-\dimen@
 \else#1\L@c \advance\dimen@-\L@c\fi
 \kern\dimen@\boxz@\kern-\dimen@}%
 \R@c=\if-#1\L@c\else#1\R@c\fi
 \L@c=\if-#1\R@c\else#1\L@c\fi
 \U@c=\if-#2\D@c\else#2\U@c\fi
 \D@c=\if-#2\U@c\else#2\D@c\fi }
\xydef@\xyignorescale@(#1,#2){\xywarning@{Ignoring rescale: #1,#2}%
 \setboxz@h{\xyscale@@{#1}{#2}\boxz@}}%
\xydef@\xyshape@halfsize@{\xyrescale@(.5,.5)}
\xydef@\xyshape@dblsize@{\xyrescale@(2,2)}
\xydef@\xyshape@flip@{\xyrescale@(-1,-1)}
\xydef@\xyshape@vflip@{\xyrescale@(1,-1)}
\xydef@\xyshape@hflip@{\xyrescale@(-1,1)}
\xydef@\xyrotatechar@{\bgroup
 \afterDIRECTIONorEMPTY{\xyrotateSizeMod@}{\xyFN@\xySpecialRotate@i}}
\xydef@\xySpecialRotate@i{%
 \ifx \space@\next \expandafter\DN@\space{\xyFN@\xySpecialRotate@i}%
 \else\ifx @\next \let\next@=\xyrotateSizeMod@
 \else\addEQ@\ifx \next
 \addEQ@\DN@##1@@{%
 \expandafter\xynametransform@\csname shape [##1]\endcsname\egroup}%
 \else\ifx !\next \DN@!{\egroup\getSpecialRotate@}%
 \else\ifx *\next \DN@*@@{\egroup\transformDrop@}%
 \else \DN@{\xySpecialRotate@@}%
 \fi\fi\fi\fi\fi \next@ }
\xydef@\getSpecialRotate@{\doSpecialRotate@@}
\xydef@\xyRotate@#1{\xyundefinedRotate@{rotate}{#1}@@}
\xydef@\xySpecialRotate@#1@@{\xyundefinedRotate@{rotate}{#1}@@\egroup}
\xydef@\doSpecialRotate@#1@@{\xyundefinedRotate@{special rotate}{#1}@@}
\xydef@\xyscale@#1#2{\xyundefinedRotate@{scale}{#1,#2}@@}
\xydef@\UnloadRotate@#1{%
 \ifx#1\relax\else\xyunload@{rotation extension}\fi
 \let\xyRotate@@=\xyRotate@
 \let\xySpecialRotate@@=\xySpecialRotate@
 \let\doSpecialRotate@@=\doSpecialRotate@
 \let\xyscale@@=\xyscale@ }
\UnloadRotate@\relax
\xyaddunsupport{rotate}{\UnloadRotate@\relax}
\xydef@\xyrotateSizeMod@ @@{%
 \L@p=\L@c \R@p=\R@c \U@p=\U@c \D@p=\D@c 
 \ifdim\cosDirection\p@>\z@ 
 \R@c=\cosDirection\R@p \L@c=\cosDirection\L@p
 \U@c=\cosDirection\U@p \D@c=\cosDirection\D@p 
 \else
 \R@c=\cosDirection\L@p \L@c=\cosDirection\R@p
 \U@c=\cosDirection\D@p \D@c=\cosDirection\U@p 
 \fi
 \advance\L@c \if-\sinDirection\D@p\else\sinDirection\U@p\fi
 \advance\R@c \if-\sinDirection\U@p\else\sinDirection\D@p\fi
 \advance\U@c \if-\sinDirection\L@p\else\sinDirection\R@p\fi
 \advance\D@c \if-\sinDirection\R@p\else\sinDirection\L@p\fi
 \dimen@ii=\L@c \advance\dimen@ii-\L@p
 \edef\tmp@{\egroup \L@c=\the\L@c \R@c=\the\R@c \U@c=\the\U@c \D@c=\the\D@c
 \dimen@ii=\the\dimen@ii \noexpand\setboxz@h\bgroup
 \noexpand\xyRotate@@{\the\Direction}}\tmp@
 \xydropRotated@ }
\xydef@\xydropRotated@@{%
 \kern\dimen@ii \boxz@ \kern-\dimen@ii \modXYtransform@ \egroup }
\xylet@\xydropRotated@=\xydropRotated@@
\xydef@\xyignoreSizeMod@ @@{\xywarning@{Ignoring rotation}}
\xydef@\xyshape@left@{\xyrotatechar@ v(0,1)@@}
\xydef@\xyshape@right@{\xyrotatechar@ v(0,-1)@@}
\xydef@\xyshearchar@{\xyundefinedRotate@{shearing}}
\xyendinput

xytips.tex
%% xytips.tex from $Id: xytips.doc,v 3.3 1996/12/19 04:12:13 krisrose Exp $
%%
%% Xy-pic ``More Tips'' extension.
%% Copyright (c) 1992-1996 Kristoffer H. Rose <kris@diku.dk>
%%
%% This file is part of the Xy-pic package for graphs and diagrams in TeX.
%% Copyright (c) 1991-1996 Kristoffer H. Rose <kris@diku.dk>
%%
%% The Xy-pic package is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by the
%% Free Software Foundation; either version 2 of the License, or (at your
%% option) any later version.
%%
%% The Xy-pic package is distributed in the hope that it will be useful, but
%% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
%% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
%% for more details.
%%
%% You should have received a copy of the GNU General Public License along
%% with this package; if not, write to the Free Software Foundation, Inc.,
%% 675 Mass Ave, Cambridge, MA 02139, USA.
%%
\ifx\xyloaded\undefined \input xy \fi
\xyprovide{tips}{More Tips extension}{\stripRCS$Revision: 3.3 $}%
 {Kristoffer H.~Rose}{kris@diku.dk}%
 {BRICS/Computer Science, University of Aarhus, Ny Munkegade, building 540,
 DK--8000 Aarhus~C}
\xylet@\tip@xy=\tip@
\xylet@\atip@xy=\atip@
\xylet@\btip@xy=\btip@
\xylet@\Tip@xy=\Tip@
\xylet@\Ttip@xy=\Ttip@
\xylet@\tipjot@xy=\tipjot@
\xyfont@\xy@@atfont=xycmat10
\xyfont@\xy@@btfont=xycmbt10
\xydef@\tipfamily@@{cm}
\xydef@\tipsize@@{10}
\xydef@\SelectTips#1#2{%
 \DN@{#1}\ifx\next@\empty\else \def\tipfamily@@{#1}\fi
 \DN@{#2}\ifx\next@\empty\else \def\tipsize@@{#2}\fi
 \csname tipfamily \tipfamily@@\endcsname \ignorespaces}
\xydefcsname@{tipfamily cm}{\loadtipfonts@
 \let\tip@=\tip@cm \let\atip@=\atip@cm \let\btip@=\btip@cm
 \let\Tip@=\Tip@xy \let\Ttip@=\Ttip@xy \def\tipjot@{.2em}}
\xydef@\loadtipfonts@{\edef\next##1##2{##1=xy\tipfamily@@##2\tipsize@@}%
 \next{\font\xy@@atfont}{at}
 \next{\font\xy@@btfont}{bt}
}
\xydef@\tip@cm{\activatetips@ \tip@x\tip@@}
\xydef@\atip@cm{\activatetips@ \tip@x\atip@@}
\xydef@\btip@cm{\activatetips@ \tip@x\btip@@}
\xydef@\activatetips@{\let\xyatipfont=\xy@@atfont \let\xybtipfont=\xy@@btfont}
\xydefcsname@{tipfamily eu}{\loadtipfonts@
 \let\tip@=\tip@cm \let\atip@=\atip@cm \let\btip@=\btip@cm
 \let\Tip@=\Tip@eu \let\Ttip@=\Ttip@eu \def\tipjot@{.15em}}
\xydef@\Tip@eu{\kern1.5pt \vrule height1.5pt depth1.5pt width\z@
 \Tip@@eu \kern1.5pt \egroup
 \U@c=1.5pt \D@c=1.5pt \L@c=1.5pt \R@c=1.5pt \Edge@c={\circleEdge}%
 \Invisible@false \Hidden@false \def\Leftness@{.5}\def\Upness@{.5}%
 \def\Drop@@{\styledboxz@}\def\Connect@@{\straight@{\dottedSpread@\jot}}}
\xydef@\Tip@@eu{\count@=\DirectionChar
 \advance\count@-10 \ifnum\count@<\z@ \advance\count@128 \fi
 \xyatipfont\char\count@
 \advance\count@ 20 \ifnum127<\count@ \advance\count@-128 \fi
 \xybtipfont\char\count@}
\xydef@\Ttip@eu{\kern2.4pt \vrule height2.4pt depth2.4pt width\z@
 \Ttip@@eu \kern2.4pt \egroup
 \U@c=2.4pt \D@c=2.4pt \L@c=2.4pt \R@c=2.4pt \Edge@c={\circleEdge}%
 \Invisible@false \Hidden@false
 \def\Leftness@{.5}\def\Upness@{.5}%
 \def\Drop@@{\styledboxz@}\def\Connect@@{\straight@{\dottedSpread@\jot}}}
\xydef@\Ttip@@eu{%
 \setboxz@h\bgroup\reverseDirection@\line@ \wdz@=\z@ \ht\z@=\z@ \dp\z@=\z@
 \kern-\L@c \boxz@ \kern\L@c \Tip@@eu}
\xydef@\UseTips{\csname tipfamily \tipfamily@@\endcsname}
\xydef@\NoTips{\let\tip@=\tip@xy \let\atip@=\atip@xy \let\btip@=\btip@xy
 \let\Tip@=\Tip@xy \let\Ttip@=\Ttip@xy \let\tipjot@=\tipjot@xy}
\xyendinput

cs0605128.extracted_bib
\begin{thebibliography}{10}

\bibitem{abramsky:bctcs88}
S.~Abramsky.
\newblock {A Cook's Tour of the Finitary Non-Well-Founded Sets}.
\newblock Invited Lecture at BCTCS 1988.

\bibitem{abramsky:deb}
S.~Abramsky.
\newblock A domain equation for bisimulation.
\newblock {\em Information and Computation}, 92, 1991.

\bibitem{abramsky:dtlf}
S.~Abramsky.
\newblock Domain theory in logical form.
\newblock {\em Annals of Pure and Applied Logic}, 51, 1991.

\bibitem{abra-jung:dt}
S.~Abramsky and A.~Jung.
\newblock Domain theory.
\newblock In {\em Handbook of Logic in Computer Science}. OUP, 1994.

\bibitem{aczel:nwfs}
P.~Aczel.
\newblock {\em Non-Well-Founded Sets}.
\newblock CSLI, Stanford, 1988.

\bibitem{arba-rutt:comp-conn}
F.~Arbab and J.~Rutten.
\newblock A coinductive calculus of component connectors.
\newblock In {\em WADT'02}, LNCS 2755, 2003.

\bibitem{barbosa:components}
L.~Barbosa.
\newblock Towards a calculus of software components.
\newblock {\em J.~Univ.\ Comp.\ Sci.}, 9, 2003.

\bibitem{bartels:diss}
F.~Bartels.
\newblock {\em On Generalised Coinduction and Probabilistic Specification
  Formats}.
\newblock PhD thesis, Vrije Universiteit Amsterdam, 2004.

\bibitem{bsv:cmcs03-j}
F.~Bartels, A.~Sokolova, and E.~de~Vink.
\newblock A hierarchy of probabilistic system types.
\newblock {\em Theoret.\ Comput. Sci.}, 327, 2004.

\bibitem{brv:ml}
P.~Blackburn, M.~de~Rijke, and Y.~Venema.
\newblock {\em Modal Logic}.
\newblock CUP, 2001.

\bibitem{bjk:tzero}
M.~Bonsangue, B.~Jacobs, and J.~N. Kok.
\newblock Duality beyond sober spaces: Topological spaces and observation
  frames.
\newblock {\em Theoret.\ Comput.\ Sci.}, 151, 1995.

\bibitem{bons-kurz:fossacs05}
M.~Bonsangue and A.~Kurz.
\newblock Duality for logics of transition systems.
\newblock In {\em FoSSaCS'05}, LNCS 3441, 2005.

\bibitem{bons-kurz:pi-log}
M.~Bonsangue and A.~Kurz.
\newblock Pi-calculus in logical form.
\newblock Draft, 2006.

\bibitem{bons-kurz:fossacs06}
M.~Bonsangue and A.~Kurz.
\newblock Presenting functors by operations and equations.
\newblock In {\em FoSSaCS'06}, LNCS 3921, 2006.

\bibitem{bonsangue:diss}
M.~M. Bonsangue.
\newblock {\em Topological Dualities in Semantics}.
\newblock PhD thesis, Vrije Universiteit Amsterdam, 1996.

\bibitem{brin-rewi:ps}
C.~Brink and I.~M. Rewitzky.
\newblock {\em A Paradigm for Program Semantics: Power Structures and Duality}.
\newblock Cambridge University Press, 2001.

\bibitem{cirstea:cmcs03}
C.~C{\^\i}rstea.
\newblock On expressivity and compositionality in logics for coalgebras.
\newblock In {\em CMCS'03}, ENTCS, 2003.

\bibitem{cirs-patt:concur04}
C.~C{\^\i}rstea and D.~Pattinson.
\newblock Modular construction of modal logics.
\newblock In {\em CONCUR'04}, LNCS 3170, 2004.

\bibitem{dave-prie:lo}
B.~A. Davey and H.~A. Priestley.
\newblock {\em Introduction to Lattices and Order}.
\newblock Cambridge University Press, 1990.

\bibitem{bakk-vink:cfs}
J.~de~Bakker and E.~de~Vink.
\newblock {\em Control Flow Semantics}.
\newblock MIT Press, 1996.

\bibitem{vink-rutt:prob-bisim-j}
E.~de~Vink and J.~Rutten.
\newblock Bisimulation for probabilistic transition systems: A coalgebraic
  approach.
\newblock {\em Theoret.\ Comput.\ Sci.}, 221, 1999.

\bibitem{escardo:st}
M.~Escard\'o.
\newblock Synthetic topology of data types and classical spaces.
\newblock {\em ENTCS}, 87, 2004.

\bibitem{FMS96}
M.~Fiore, E.~Moggi, and D.~Sangiorgi.
\newblock A fully-abstract model for the $\pi$-calculus.
\newblock In {\em LICS 96}, 1996.

\bibitem{frig-gold:polynomial}
D.~Friggens and R.~Goldblatt.
\newblock A modal proof theory for final polynomial coalgebras.
\newblock {\em Theoret.\ Comput.\ Sci}.
\newblock To appear.

\bibitem{goldblatt:meta-76}
R.~Goldblatt.
\newblock Metamathematics of modal logic {I}.
\newblock {\em Reports on Mathematical Logic}, 6, 1976.

\bibitem{goldblatt:obs-ultraproducts}
R.~Goldblatt.
\newblock Observational ultraproducts of polynomial coalgebras.
\newblock {\em Ann.\ Pure Appl.\ Logic}, 123, 2003.

\bibitem{gumm:uc}
H.~P. Gumm.
\newblock Elements of the general theory of coalgebras.
\newblock LUATCS'99, 1999.

\bibitem{hans-kupk:cmcs04}
H.~Hansen and C.~Kupke.
\newblock A coalgebraic perspective on monotone modal logic.
\newblock In {\em CMCS'04}, ENTCS 106, 2004.

\bibitem{jacobs:intro-coalg}
B.~Jacobs.
\newblock {\em Introduction to Coalgebra. Towards Mathematics of States and
  Observations}.
\newblock In preparation, draft electronically available.

\bibitem{jacobs:oo}
B.~Jacobs.
\newblock Objects and classes, co-algebraically.
\newblock In {\em Object-Orientation with Parallelism and Persistence}. Kluwer,
  1996.

\bibitem{jacobs:many-sorted}
B.~Jacobs.
\newblock Many-sorted coalgebraic modal logic: a model-theoretic study.
\newblock {\em Theor.\ Inform.\ Appl.}, 35, 2001.

\bibitem{jaco-rutt:tutorial}
B.~Jacobs and J.~Rutten.
\newblock A tutorial on (co)algebras and (co)induction.
\newblock {\em EATCS Bulletin}, 62, 1997.

\bibitem{johnstone:stone-spaces}
P.~Johnstone.
\newblock {\em Stone Spaces}.
\newblock Cambridge University Press, 1982.

\bibitem{jons-tars:bao1}
B.~J{\'o}nsson and A.~Tarski.
\newblock Boolean algebras with operators, part 1.
\newblock {\em Amer.\ J.\ Math.}, 73, 1951.

\bibitem{jons-tars:bao2}
B.~J{\'o}nsson and A.~Tarski.
\newblock Boolean algebras with operators, part 2.
\newblock {\em American Journal of Mathematics}, 74, 1952.

\bibitem{karp:infinite}
C.~Karp.
\newblock {\em Languages with Expressions of Infinite Length}.
\newblock North-Holland, 1964.

\bibitem{klin:diss}
B.~Klin.
\newblock {\em An Abstract Coalgebraic Approach to Process Equivalence for
  Well-Behaved Operational Semantics}.
\newblock PhD thesis, University of Aarhus, 2004.

\bibitem{klin:calco05}
B.~Klin.
\newblock The least fibred lifting and the expressivity of coalgebraic modal
  logic.
\newblock In {\em CALCO'05}, 2005.

\bibitem{kome-schu:dec-sup-con}
J.~Komenda and J.~van Schuppen.
\newblock Decentralized supervisory control with coalgebra.
\newblock In {\em ECC'03}, 2003.

\bibitem{kkp:cmcs04}
C.~Kupke, A.~Kurz, and D.~Pattinson.
\newblock Algebraic semantics for coalgebraic logics.
\newblock In {\em CMCS'04}, ENTCS 106, 2004.

\bibitem{kkp:calco05}
C.~Kupke, A.~Kurz, and D.~Pattinson.
\newblock Ultrafilter extensions of coalgebras.
\newblock In {\em CALCO'05}, LNCS 3629, 2005.

\bibitem{kkv:cmcs03-j}
C.~Kupke, A.~Kurz, and Y.~Venema.
\newblock Stone coalgebras.
\newblock {\em Theoret.\ Comput.\ Sci.}, 327, 2004.

\bibitem{kupk-vene:lics05}
C.~Kupke and Y.~Venema.
\newblock Closure properties of coalgebra automata.
\newblock In {\em LICS'05}, 2005.

\bibitem{kurz:diss}
A.~Kurz.
\newblock {\em {Logics for Coalgebras and Applications to Computer Science}}.
\newblock PhD thesis, {LMU}, 2000.

\bibitem{kurz:aiml98}
A.~Kurz.
\newblock A co-variety-theorem for modal logic.
\newblock In {\em Advances in Modal Logic 2}. CSLI, 2001.

\bibitem{kurz:esslli01}
A.~Kurz.
\newblock {\em Coalgebras and Modal Logic - {C}ourse Notes for {ESSLLI} 2001}.
\newblock University of Helsinki, 2001.

\bibitem{kurz:cmcs98-j}
A.~Kurz.
\newblock Specifying coalgebras with modal logic.
\newblock {\em Theoret.\ Comput.\ Sci.}, 260, 2001.

\bibitem{kurz-rosi:cmcs02-j}
A.~Kurz and J.~Rosick{\'y}.
\newblock Operations and equations for coalgebras.
\newblock {\em Math.\ Structures Comput.\ Sci.}, 15, 2005.

\bibitem{mili-moss:rec}
S.~Milius and L.~Moss.
\newblock The category theoretic solution of recursive program schemes.
\newblock 2006.
\newblock Draft.

\bibitem{moss:cl}
L.~Moss.
\newblock Coalgebraic logic.
\newblock {\em Annals of Pure and Applied Logic}, 96, 1999.

\bibitem{moss-vigl:cmcs04-j}
L.~Moss and I.~Viglizzo.
\newblock Final coalgebras for functors on measurable spaces.
\newblock {\em Inform. and Comput.}
\newblock To appear.

\bibitem{mrrs:cocasl}
T.~Mossakowski, H.~Reichel, M.~Roggenbach, and L.~Schr{\"o}der.
\newblock Algebraic-coalgebraic specification in {CoCASL}.
\newblock In {\em WADT'02}, LNCS 2755, 2003.

\bibitem{palmigiano:cmcs03-j}
A.~Palmigiano.
\newblock A coalgebraic view on positive modal logic.
\newblock {\em Theoret.\ Comput.\ Sci.}, 327, 2004.

\bibitem{pattinson:cml-j}
D.~Pattinson.
\newblock Coalgebraic modal logic: Soundness, completeness and decidability of
  local consequence.
\newblock {\em Theoret.\ Comput.\ Sci.}, 309, 2003.

\bibitem{pattinson:nasslli}
D.~Pattinson.
\newblock An introduction to the theory of coalgebras, 2003.
\newblock {C}ourse Notes for {NASSLLI} 2003.

\bibitem{pattinson:expressive-j}
D.~Pattinson.
\newblock Expressive logics for coalgebras via terminal sequence induction.
\newblock {\em Notre Dame Journal of Formal Logic}, 45, 2004.

\bibitem{reichel:oo}
H.~Reichel.
\newblock An approach to object semantics based on terminal co-algebras.
\newblock {\em Math.\ Structures Comput.\ Sci.}, 5, 1995.

\bibitem{roessiger:ml98-j}
M.~R{\"o}{\ss}iger.
\newblock From modal logic to terminal coalgebras.
\newblock {\em Theoret.\ Comput.\ Sci.}, 260, 2001.

\bibitem{rtj:ccsl}
J.~Rothe, H.~Tews, and B.~Jacobs.
\newblock The coalgebraic class specification language {CCSL}.
\newblock {\em J.~Univ.\ Comp.\ Sci.}, 7, 2001.

\bibitem{rutten:automata}
J.~Rutten.
\newblock Automata and coinduction - an exercise in coalgebra.
\newblock In {\em CONCUR'98}, LNCS 1466, 1998.

\bibitem{rutten:uc-j}
J.~Rutten.
\newblock Universal coalgebra: {A} theory of systems.
\newblock {\em Theoret.\ Comput.\ Sci.}, 249, 2000.

\bibitem{rutten:counting}
J.~Rutten.
\newblock Coinductive counting with weighted automata.
\newblock {\em J.\ Autom.\ Lang.\ Comb.}, 8, 2003.

\bibitem{rutten:tcs05}
J.~Rutten.
\newblock A tutorial on coinductive stream calculus and signal flow graphs.
\newblock {\em Theoret.\ Comput.\ Sci.}, 343, 2005.

\bibitem{schroeder:fossacs05}
L.~Schr\"oder.
\newblock Expressivity of {C}oalgebraic {M}odal {L}ogic: {T}he {L}imits and
  {B}eyond.
\newblock In {\em FoSSaCS'05}, LNCS 3441, 2005.

\bibitem{smyth:handbook}
M.~Smyth.
\newblock Topology.
\newblock In {\em Handbook of Logic in Computer Science}. OUP, 1993.

\bibitem{Sta96}
I.~Stark.
\newblock A fully-abstract domain model for the $\pi$-calculus.
\newblock In {\em LICS 96}, 1996.

\bibitem{stone:ba}
M.~H. Stone.
\newblock The theory of representations for boolean algebras.
\newblock {\em Trans. Amer. Math. Soc}, 40, 1936.

\bibitem{stone:dl}
M.~H. Stone.
\newblock Topological representation of distributive lattices and {B}rouwerian
  lattices.
\newblock {\em \v Casopis p\v est.\ mat. fys.}, 67, 1937.

\bibitem{turi-plot:os}
D.~Turi and G.~Plotkin.
\newblock Towards a mathematical operational semantics.
\newblock In {\em LICS'97}, 1997.

\bibitem{berg-jaco:loop}
J.~van~den Berg and B.~Jacobs.
\newblock The loop compiler for java and jml.
\newblock In {\em TACAS'01}, LNCS 2031, 2001.

\bibitem{venema:coalg-aut}
Y.~Venema.
\newblock Automata and fixed point logics: a coalgebraic perspective.
\newblock {\em Inform. and Comput.}
\newblock To appear.

\bibitem{venema:ac}
Y.~Venema.
\newblock {\em Handbook of Modal Logic}, chapter Algebras and Coalgebras.
\newblock To appear. Electronically available.

\bibitem{vickers:tvl}
S.~J. Vickers.
\newblock {\em Topology Via Logic}.
\newblock CUP, 1989.

\end{thebibliography}