\vspace*{-5.5ex}\LargeSimple free star-autonomous categories and full coherence
[-4ex]\normalsize\sc Dominic J.~D.~Hughes
July 7
2005
\noindent This paper gives a simple presentation of the free star-autonomous category over a category, based on Eilenberg-Kelly-MacLane graphs and Trimble rewiring, for full coherence.\vspace*{-1.5ex}
multido.tex
%% BEGIN multido.tex
%%
\def\fileversion{1.4}
\def\filedate{93/01/14}
%%
%% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu.
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt.
%%
%% DESCRIPTION:
%%   multido.tex/multido.sty contains a loop macro, \multido, that supports
%%   fixed-point addition and has a nice interface. Among other things, it
%%   is useful for pictures and putting numbers on axes. multido.tex
%%   is compatible with most TeX macro packages, including Plain TeX, LaTeX,
%%   AmSTeX, and Ams-LaTeX.
%%
%% INSTALLATION:
%%   Put this file where your TeX looks for inputs, under the name multido.tex.
%%   Use the file multido.sty with LaTeX.
%%
%% DOCUMENTATION:
%%   See multido.doc.
%%
%% COPYING:
%%   Copying of part or all of this file is allowed under the following
%%   conditions only:
%%   (1) You may freely distribute unchanged copies of the file. Please
%%       include the documentation when you do so.
%%   (2) You may modify a renamed copy of the file, but only for personal
%%       use or use within an organization.
%%   (3) You may copy fragments from the file, for personal use or for
%%       distribution, as long as credit is given where credit is due.
%%
%%   You are NOT ALLOWED to take money for the distribution or use of
%%   this file or modified versions or fragments thereof, except for
%%   a nominal charge for copying etc.
%%
%% CODE:
% These macros use TeX primitives, plus the Plain TeX commands:
%   \dimen@, \dimen@i, \count@, \newcount, \newtoks, \@ne, \tw@, \@z@.
%
% Check if file is loaded, announce file on terminal, and take care of @:
%


\message{ v\fileversion, \filedate\space <tvz>}

\csname MultidoLoaded\endcsname
\let\MultidoLoaded\endinput

\edef\TheAtCode{\the\catcode`\@}
\catcode`\@=11

% These are some useful hacks. "\multido@dimtonum" strips the value of "#1",
% a dimension register, of the "pt", and assigns the result to "#2",
% a command sequence.

\def\@empty{}
\def\@nnil{\@nil}
\def\multido@dimtonum#1#2{\edef#2{\multido@@dimtonum#1}}
\def\multido@@dimtonum#1{\expandafter\multido@@@dimtonum\the#1}
\edef\next{%
  \noexpand\def\noexpand\multido@@@dimtonum##1\string p\string t{##1}}
\next

% "\multido@count" stores the number of repetitions. "\multidocount" keeps
% track of the iteration. These are also used locally as scratch counters
% by "\FPadd@". "\multido@stuff" is used to store the <stuff> that is
% to be repeated.

\newcount\multido@count
\newcount\multidocount
\newtoks\multido@stuff

\def\multido{\multido@{}{\begingroup}{\endgroup}}
\def\mmultido{\multido@{\multido@stepvar}{\begingroup}{\endgroup}}
\def\Multido{\multido@{}{}{}}
\def\MMultido{\multido@{\multido@stepvar}{}{}}

% "\multido@initvar" processes the variable declarations, initializing
% the value of the variables and defining "\multido@stepvar" to increment
% the variables with each repetition. "\multido@count" is set to the number
% of repetitions.

\long\def\multido@#1#2#3#4#5#6{%
  #2%
    \multido@count=#5\relax
    \ifnum\multido@count=\z@\else\multido@@{#1}{#4}{#6}\fi
  #3%
  \ignorespaces}
\def\multido@@#1#2#3{%
  \def\multido@stepvar{}%
  \def\do{\noexpand\do\noexpand}%
  \multido@initvar#2,\@nil,%
  \let\do\noexpand
  \edef\multido@stepvar{\multido@stepvar}%
  \ifnum\multido@count<\z@\multido@count=-\multido@count\fi
  \multidocount=1\relax
  #1%
  \multido@stuff{#3}%
  \multido@loop}
\def\multido@loop{%
  \the\multido@stuff
  \ifnum\multidocount<\multido@count
    \advance\multidocount\@ne
    \multido@stepvar
    \expandafter\multido@loop
  \fi}
\def\multidostop{\multidocount=\multido@count}
\def\multido@badvar{%
  \multido@count=0
  \errhelp{\multido command will be skipped.}%
  \errmessage{Bad \string\multido\space variable declaration}}
\def\multido@initvar#1,{%
  \def\multido@temp{#1}%
  \ifx\multido@temp\@nnil\else
    \ifx\multido@temp\@empty\else
      \multido@@initvar#1\@nil=+\@nil\relax
    \fi
    \expandafter\multido@initvar
  \fi}
\def\multido@@initvar#1=#2+#3\@nil#4\relax{%
  \ifx\@empty#4\@empty
    \multido@badvar
  \else
    \multido@vartype#1\@empty
    \ifx\multido@temp\relax
      \multido@badvar
    \else
      \multido@temp{#2}{#3}#1%
    \fi
  \fi}
\def\multido@vartype#1{%
  \ifcat\noexpand\@nil\noexpand#1%
     \expandafter\multido@@vartype\string#1\@nil
  \else
    \let\multido@temp\relax
  \fi}
\def\multido@@vartype#1#2#3\@nil{%
  \expandafter\let\expandafter\multido@temp
    \csname multido@init@#2\endcsname}
\def\MultidoCheckNames{%
  \let\multido@@@vartype\multido@vartype
  \def\multido@vartype##1{%
    \ifx\undefined##1%
      \multido@@@vartype{##1}%
    \else
      \errhelp{\multido command will be skipped.}%
      \errmessage{Multido variable \string##1 already defined}%
      \let\multido@temp\relax
    \fi}}

% For each variable type, we must now define \multido@init<vartype>.
% The syntax of these macros is:
%
%   \multido@init@<vartype>{initial value}{increment}{variable}
%
% and the outcome should be:
%
% 1. Set <variable> to the initial value.
% 2. Invoke \multido@addtostep{step stuff}, where <step stuff> is
% whatever should be done to increment the variable. <step stuff> is
% expanded first, with expansion suppressed by "\do".

\def\multido@addtostep#1{\edef\multido@stepvar{\multido@stepvar#1}}

% Variable type for dimensions ("d", "D"):

\def\multido@init@d#1#2#3{%
  \expandafter\ifx\csname pssetlength\endcsname\relax
    \dimen@=#1\relax\dimen@i=#2\relax
  \else
    \pssetlength\dimen@{#1}\pssetlength\dimen@i{#2}%
  \fi
  \edef#3{\number\dimen@ sp}%
  \ifnum\multido@count<\z@\dimen@i=-\dimen@i\fi
  \multido@addtostep{\do\multido@step@d{\do#3}{\number\dimen@i sp}}}
\def\multido@step@d#1#2{%
  \dimen@=#1\advance\dimen@#2
  \edef#1{\number\dimen@ sp}}%
\def\multido@init@D{\multido@init@d}

% Variable type for integers ("i", "I"):

\def\multido@init@i#1#2#3{%
  \count@=#1\relax
  \edef#3{\the\count@}%
  \count@=#2\relax
  \ifnum\multido@count<\z@\count@=-\count@\fi
  \multido@addtostep{\do\multido@step@i{\do#3}{\the\count@}}}
\def\multido@step@i#1#2{%
  \count@=#1\advance\count@ by #2
  \edef#1{\the\count@}}
\def\multido@init@I{\multido@init@i}

% Variable type for reals ("r", "R").

\def\multido@init@r#1#2#3{%
  \dimen@=#1pt
  \multido@dimtonum\dimen@#3%
  \dimen@=#2pt
  \ifnum\multido@count<\z@\dimen@=-\dimen@\fi
  \multido@addtostep{\do\multido@step@r{\do#3}{\number\dimen@ sp}}}
\def\multido@step@r#1#2{%
  \dimen@=#1pt\advance\dimen@#2
  \multido@dimtonum\dimen@#1}
\def\multido@init@R{\multido@init@r}

% Variable type for numbers ("n", "N").

\def\multido@init@n#1#2#3{%
  \edef#3{#1}%
  \ifnum\multido@count<\z@\expandafter\FPsub\else\expandafter\FPadd\fi
  {0}{#2}\multido@temp
  \multido@addtostep{\do\FPadd{\do#3}{\multido@temp}{\do#3}}}
\def\multido@init@N{\multido@init@n}

% Simple fixed-point addition couldn't be harder.
% "\dimen@" and "\dimen@i" are used as scratch {\em counters} (to avoid
% creating a new counter). "\count@", "\multido@count" and "\multidocount"
% are also used as scratch counters.

% This is probably pretty close to optimal, given the requirements that
% leading and trailing spaces be OK in the arguments, and that there need
% not be any numbers to the left of the decimal.

\def\FPadd#1#2#3{%
  \edef\multido@temp{#1..\noexpand\@nil#2}%
  \expandafter\FPadd@\multido@temp..\@nil
  \let#3\multido@temp}
\def\FPsub#1#2{%
  \edef\multido@temp{\noexpand\FPsub@#2\noexpand\@empty}%
  \FPadd{#1}{\multido@temp}}
\def\FPsub@#1{\ifx-#1\else-#1\fi}
\def\FPadd@#1.#2.#3\@nil#4.#5.#6\@nil{%
  \begingroup
    \def\multido@temp{\let\next\relax}%
    \let\next\z@
    \afterassignment\multido@temp\count@=#1\next
    \dimen@i=0#2sp\relax
    \let\next\z@
    \afterassignment\multido@temp\multido@count=#4\next
    \multidocount=0#5\relax
    \dimen@=\number\count@ sp
    \count@=\@ne
    \FPadd@@@#500000000\@nil
    \ifnum#11<\z@
      \count@=-\tw@
      \dimen@=-\dimen@
    \fi
    \ifnum#41<\z@
      \count@=-\count@
      \multido@count=-\multido@count
    \fi
    \ifnum\count@>\z@
      \advance\multido@count\dimen@
      \advance\multidocount\dimen@i
      \ifnum\multidocount<\multido@temp\relax
        \advance\multidocount\multido@temp\relax
      \else
        \advance\multido@count\@ne
      \fi
      \advance\count@-3
    \else
      \advance\multido@count-\dimen@
      \advance\multidocount-\dimen@i
      \ifnum\multido@count<\z@
        \multido@count=-\multido@count
        \multidocount=-\multidocount
        \advance\count@\@ne
      \else
        \ifnum\multido@count=\z@
          \ifnum\multidocount<\z@
            \multidocount=-\multidocount
            \advance\count@\@ne
          \fi
        \fi
      \fi
      \ifnum\multidocount<\z@
        \advance\multidocount\multido@temp
        \advance\multido@count-\@ne
      \fi
      \advance\multidocount\multido@temp\relax
    \fi
    \expandafter\FPadd@@\the\multidocount\@empty\@nil
  \endgroup}
\def\FPadd@@#1#2#3\@nil{\xdef\multido@temp{%
  \ifnum\count@=-1-\fi
  \the\multido@count\ifx#2\@empty\else.#2#3\fi}}
\def\FPadd@@@#1#2#3#4#5#6#7#8#9\@nil{\def\multido@temp{1#9}}

\catcode`\@=\TheAtCode\relax

\endinput
%%
%% END multido.tex

pst-node.tex
%% BEGIN pst-node.tex
%%
%% Nodes with PSTricks 97.
%% See the betadoc documentation for usage. 
%% This uses the header file `pst-node.pro'.
%%
\def\fileversion{97 patch 11}
\def\filedate{2000/11/09}
%%
%% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu.
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt.
%%
\message{ v\fileversion, \filedate}
\csname PSTnodesLoaded\endcsname
\let\PSTnodesLoaded\endinput
\ifx\PSTricksLoaded\endinput\else\input pstricks.tex\fi\relax
\edef\TheAtCode{\the\catcode`\@}
\catcode`\@=11
\pstheader{pst-node.pro}
\def\pst@nodedict{tx@NodeDict begin }
\def\pst@zapspace#1 #2{%
#1%
\ifx#2\@empty\else\expandafter\pst@zapspace\fi
#2}
\def\pst@getnode#1#2{%
\pst@expandafter\pst@@getnode{#1},,\@nil#2}
\def\pst@@getnode#1,#2,#3\@nil#4{%
\ifx\@empty#3\@empty
\edef#4{/N@\pst@zapspace#1 \@empty\space}%
\else
\pst@cntg=#1\relax
\pst@cnth=#2\relax
\edef#4{/N@M-\ifnum\psmatrixcnt=\z@ 1\else\the\psmatrixcnt\fi
-\the\pst@cntg-\the\pst@cnth\space}%
\fi}
\def\tx@NewNode{NewNode }
\def\pst@newnode#1#2#3#4{%
% DG/SR modification begin - Nov.  9, 2000 - Patch 11
\pst@killglue
% DG/SR modification end
\leavevmode
\pst@getnode{#1}\pst@thenode
\pst@Verb{%
\pst@nodedict
{#3}
\ifx\psk@name\relax false \else \psk@name true \fi
\pst@thenode
#2
{#4}
\tx@NewNode
end}%
\global\let\psk@name\relax
\pstree@nodehook
\global\let\pstree@nodehook\relax}
\let\pstree@nodehook\relax
\newif\ifnodealign
\def\psset@nodealign#1{\@nameuse{nodealign#1}}
\psset@nodealign{false}
\def\pst@nodealign{%
\pst@dimg=\ht\pst@hbox
\advance\pst@dimg-\dp\pst@hbox
\divide\pst@dimg2
\lower\pst@dimg}
\def\tx@InitPnode{InitPnode }
\def\pnode{\@ifnextchar({\pnode@}{\pnode@(0,0)}}
\def\pnode@(#1)#2{%
\pst@@getcoor{#1}%
\pst@newnode{#2}{10}{\pst@coor}{\tx@InitPnode}%
\ignorespaces}
\def\tx@InitCnode{InitCnode }
\def\cnode{\pst@object{cnode}}
\def\cnode@i{\@ifnextchar({\cnode@ii}{\cnode@ii(0,0)}}
\def\cnode@ii(#1)#2#3{%
\leavevmode
\hbox{%
\use@par
\pst@@getcoor{#1}%
\pssetlength\pst@dimc{#2}%
\pst@dimg=\psk@dimen\pslinewidth
\advance\pst@dimc-\pst@dimg
\advance\pst@dimc.5\pslinewidth
\ifnodealign
\kern\pst@dimc
\vrule width\z@ height \pst@dimc depth \pst@dimc
\fi
\pscircle@do(#1){#2}%
\pst@newnode{#3}{11}{\pst@coor \pst@number\pst@dimc}{\tx@InitCnode}%
% DG/SR modification begin - Jul. 30, 1997 - Patch 2
%\ifnodealign \kern\pst@dimc\egroup \fi}%
\ifnodealign\kern\pst@dimc\fi}%
% DG/SR modification end
\ignorespaces}
\def\Cnode{\pst@object{Cnode}}
\def\Cnode@i{\@ifnextchar({\Cnode@ii}{\Cnode@ii(0,0)}}
\def\Cnode@ii(#1)#2{\cnode@ii(#1){\psk@radius}{#2}}%
\def\cnodeput{\pst@object{cnodeput}}
\def\cnodeput@i{\@ifnextchar({\cnodeput@iii}{\cnodeput@ii}}
\def\cnodeput@ii#1{%
\addto@par{rot={#1}}%
\@ifnextchar({\cnodeput@iii}{\cnodeput@iii(\z@,\z@)}}
\def\cnodeput@iii(#1)#2{%
\pst@killglue
\@fixedradiusfalse
\def\pst@nodehook{\cnodeput@iv{#2}}%
\pst@makebox{\cput@v{#1}}}
\def\cnodeput@iv#1{%
\pst@newnode{#1}{11}{\pscirclebox@iv \pst@number\pslinewidth add}%
{\tx@InitCnode}%
\global\let\pst@nodehook\relax}
\def\Cnodeput{\pst@object{Cnodeput}}
\def\Cnodeput@i{\@ifnextchar({\Cnodeput@iii}{\Cnodeput@ii}}
\def\Cnodeput@ii#1{%
\addto@par{rot={#1}}%
\@ifnextchar({\Cnodeput@iii}{\Cnodeput@iii(\z@,\z@)}}
\def\Cnodeput@iii(#1)#2{%
\pst@killglue
\@fixedradiustrue
\def\pst@nodehook{\Cnodeput@iv{#2}}%
\pst@makebox{\cput@iv{#1}}}
\def\Cnodeput@iv#1{%
\pst@newnode{#1}{11}{%
\pst@number{\wd\pst@hbox} 2 div \pst@number\pst@dima % x y
\pst@number\pst@dimb \pst@number\pslinewidth \psk@dimen .5 sub mul sub }% r
{\tx@InitCnode}%
\global\let\pst@nodehook\relax}
\def\circlenode{\pst@object{circlenode}}
\def\circlenode@i#1{\pst@makebox{\circlenode@ii{#1}}}
\def\circlenode@ii#1{%
\begingroup
\pst@useboxpar
\setbox\pst@hbox=\hbox{%
\cnodeput@iv{#1}%
\pscirclebox@iii
\box\pst@hbox}%
\ifnodealign \psboxseptrue \fi
\ifpsboxsep \pscirclebox@sep \fi
\leavevmode
\ifnodealign\pst@nodealign\fi
\box\pst@hbox
\endgroup}
\def\Circlenode{\pst@object{Circlenode}}
\def\Circlenode@i#1{\pst@makebox{\Circlenode@ii{#1}}}
\def\Circlenode@ii#1{%
\begingroup
\pst@useboxpar
\pst@dima=\ht\pst@hbox
\advance\pst@dima\dp\pst@hbox
\divide\pst@dima\tw@
\pssetlength\pst@dimb\psk@radius
\setbox\pst@hbox=\hbox{%
\Cnodeput@iv{#1}%
\pscircle(.5\wd\pst@hbox,\pst@dima){\pst@dimb}%
\box\pst@hbox}%
\ifnodealign \psboxseptrue \fi
\ifpsboxsep \psCirclebox@sep \fi
\leavevmode
\ifnodealign\pst@nodealign\fi
\box\pst@hbox
\endgroup}
\def\tx@GetRnodePos{GetRnodePos }
\def\tx@InitRnode{InitRnode }
\def\rnode{\@ifnextchar[{\rnode@i}{\def\pst@par{}\rnode@ii}}
\def\rnode@i[#1]{\def\pst@par{ref=#1}\rnode@ii}
\def\rnode@ii#1{\pst@makebox{\rnode@iii\rnode@iv{#1}}}
\def\rnode@iii#1#2{%
% DG modification begin - Jan. 1997
\leavevmode
% DG modification end
\begingroup
% DG/SR modification begin - Apr. 28, 1998 - Patch 6
\pst@useboxpar
% DG/SR modification end
#1%
\if@star\pst@starbox\fi
\ifnodealign\lower\pst@dimb\fi
\hbox{%
\pst@newnode{#2}{16}{%
\pst@number{\ht\pst@hbox}%
\pst@number{\dp\pst@hbox}%
\pst@number{\wd\pst@hbox}%
\pst@number\pst@dima
\pst@number\pst@dimb}%
{\tx@InitRnode}%
\box\pst@hbox}%
\endgroup}
\def\rnode@iv{%
\pst@dima=\psk@xref\wd\pst@hbox
\ifx\psk@yref\relax
\pst@dimb=\z@
\else
\pst@dimb=\ht\pst@hbox
\advance\pst@dimb\dp\pst@hbox
\pst@dimb=\psk@yref\pst@dimb
\advance\pst@dimb-\dp\pst@hbox
\fi}
\def\psset@href#1{\pst@checknum{#1}\psk@href}
\psset@href{0}
\def\psset@vref#1{\def\psk@vref{#1}}
\psset@vref{.7ex}
\def\Rnode{\pst@object{Rnode}}
\def\Rnode@i#1{\pst@makebox{\rnode@iii\Rnode@ii{#1}}}
\def\Rnode@ii{%
% DG modification begin - Jan. 1997
%   - \begingroup removed  as it seems to doesn't work any more
%   - \Rnode doesn't process the optional parameter changes
%\begingroup
\use@par
% DG modification end
\pst@dima=\psk@href\wd\pst@hbox
\advance\pst@dima\wd\pst@hbox
\divide\pst@dima 2
\pssetlength\pst@dimb{\psk@vref}}
\def\tx@DiaNodePos{DiaNodePos }
\def\dianode{\pst@object{dianode}}
\def\dianode@i#1{\pst@makebox{\dianode@ii{#1}}}
\def\dianode@ii#1{%
\begingroup
\pst@useboxpar
\psdiabox@iii
\setbox\pst@hbox=\hbox{%
\pst@newnode{#1}{14}{}{%
/X \pst@number\pst@dima def
/Y \pst@number\pst@dimb def
/w \pst@number\pst@dimc 2 mul def
/h \pst@number\pst@dimd 2 mul def
/NodePos { \tx@DiaNodePos } def}%
\box\pst@hbox}%
\ifnodealign\psboxseptrue\fi
\ifpsboxsep\psdiabox@sep\fi
% DG/SR modification begin - Sep. 2, 1997 - Patch 3
\leavevmode
% DG/SR modification end
\ifnodealign\lower\pst@dimb\fi
\box\pst@hbox
\endgroup}
\def\tx@TriNodePos{TriNodePos }
\def\tx@InitTriNode{InitTriNode }
\def\trinode{\pst@object{trinode}}
\def\trinode@i#1{\pst@makebox{\trinode@ii{#1}}}
\def\trinode@ii#1{%
\begingroup
\pst@useboxpar
\pstribox@iii
\setbox\pst@hbox=\hbox{%
\pst@newnode{#1}{14}{}{%
\pst@number\pst@dimc
\pst@number\pst@dimd
\ifodd\psk@trimode
exch
\pst@number\pst@dima
\else
\pst@number\pst@dimb
\fi
\psk@trimode
\pst@number{\wd\pst@hbox}%
\pst@number{\ht\pst@hbox}%
\pst@number{\dp\pst@hbox}%
\tx@InitTriNode}%
\box\pst@hbox}%
\ifnodealign\psboxseptrue\fi
\ifpsboxsep\pstribox@sep\fi
% DG/SR modification begin - Sep. 2, 1997 - Patch 3
\leavevmode
% DG/SR modification end
\ifnodealign\lower\pst@tempa\fi
\box\pst@hbox
\endgroup}
\def\tx@OvalNodePos{OvalNodePos }
\def\ovalnode{\pst@object{ovalnode}}
\def\ovalnode@i#1{\pst@makebox{\ovalnode@ii{#1}}}
\def\ovalnode@ii#1{%
\begingroup
\pst@useboxpar
\psovalbox@iii
\setbox\pst@hbox=\hbox{%
\pst@newnode{#1}{14}{}{%
/X \pst@number\pst@dima def
/Y \pst@number\pst@dimb def
/w \pst@number\pst@dimc def
/h \pst@number\pst@dimd def
/NodePos { \tx@OvalNodePos } def}%
\unhbox\pst@hbox}%
\ifnodealign\psboxseptrue\fi
\ifpsboxsep\psovalbox@sep\fi
% DG/SR modification begin - Sep. 2, 1997 - Patch 3
\leavevmode
% DG/SR modification end
\ifnodealign\lower\pst@dimb\fi
\box\pst@hbox
\endgroup}
\def\dotnode{\pst@object{dotnode}}
\def\dotnode@i{\@ifnextchar({\dotnode@ii}{\dotnode@ii(\z@,\z@)}}
\def\dotnode@ii(#1)#2{%
\leavevmode
\hbox{%
\use@par
\pst@@getcoor{#1}%
\pst@getdotsize
\pstree@nodehook
\ifnodealign
\pst@dima=\pst@dimg
\kern\pst@dima
\vrule width\z@ height \pst@dimh depth \pst@dimh
\fi
\pst@newnode{#2}{14}{}{%
\pst@coor
/Y ED /X ED
/w \pst@number\pst@dimg def
/h \pst@number\pst@dimh def
/NodePos { \tx@OvalNodePos } def}%
\psdot@ii(#1)%
\ifnodealign\kern\pst@dima\fi}%
\ignorespaces}
\def\psset@framesize#1{\pst@expandafter\psset@@framesize{#1} \@nil}
\def\psset@@framesize#1 #2\@nil{%
\pssetlength\pst@dimg{#1}%
\divide\pst@dimg2
\edef\psk@framewidth{\pst@number\pst@dimg}%
\ifx\@empty#2\@empty
\let\psk@frameheight\psk@framewidth
\else
\pssetlength\pst@dimg{#2}%
\divide\pst@dimg2
\edef\psk@frameheight{\pst@number\pst@dimg}%
\fi}
\psset@framesize{10pt}
\def\fnode{\pst@object{fnode}}
\def\fnode@i{\@ifnextchar({\fnode@ii}{\fnode@ii(\z@,\z@)}}
\def\fnode@ii(#1)#2{%
\leavevmode
\pst@killglue
\hbox{%
\use@par
\begin@ClosedObj
\ifnodealign
\kern\psk@framewidth\p@
\vrule width\z@ height \psk@frameheight\p@ depth \psk@frameheight\p@
\edef\pst@coor{0 0 }%
\else
\pst@@getcoor{#1}%
\fi
\pst@newnode{#2}{14}{}{%
\pst@coor
/Y ED /X ED
/d \psk@dimen .5 sub CLW mul neg def
/r \psk@framewidth d add def
/l r neg def
/u \psk@frameheight d add def
/d u neg def
/NodePos { \tx@GetRnodePos } def}%
\addto@pscode{%
/x2 \psk@framewidth CLW \psk@dimen mul sub def
/y2 \psk@frameheight CLW \psk@dimen mul sub def
\pst@coor 2 copy
y2 sub /y1 ED
x2 sub /x1 ED
y2 add /y2 ED
x2 add /x2 ED
\psk@cornersize
1 index 0 eq { pop pop \tx@Rect } { \tx@OvalFrame } ifelse}%
\def\pst@linetype{2}%
\showpointsfalse
\end@ClosedObj
\ifnodealign\kern\psk@framewidth\p@\fi}%
\ignorespaces}
\def\psset@nodesepA#1{%
\pst@getlength{#1}\psk@nodesepA
\def\psk@nodeseptypeA{0 }}
\def\psset@nodesepB#1{%
\pst@getlength{#1}\psk@nodesepB
\def\psk@nodeseptypeB{0 }}
\def\psset@nodesep#1{%
\pst@getlength{#1}\psk@nodesepA
\let\psk@nodesepB\psk@nodesepA
\def\psk@nodeseptypeA{0 }%
\def\psk@nodeseptypeB{0 }}
\psset@nodesep{0pt}
\def\psset@XnodesepA#1{%
\pst@getlength{#1}\psk@nodesepA
\def\psk@nodeseptypeA{1 }}
\def\psset@XnodesepB#1{%
\pst@getlength{#1}\psk@nodesepB
\def\psk@nodeseptypeB{1 }}
\def\psset@Xnodesep#1{%
\pst@getlength{#1}\psk@nodesepA
\let\psk@nodesepB\psk@nodesepA
\def\psk@nodeseptypeA{1 }%
\def\psk@nodeseptypeB{1 }}
\def\psset@YnodesepA#1{%
\pst@getlength{#1}\psk@nodesepA
\def\psk@nodeseptypeA{2 }}
\def\psset@YnodesepB#1{%
\pst@getlength{#1}\psk@nodesepB
\def\psk@nodeseptypeB{2 }}
\def\psset@Ynodesep#1{%
\pst@getlength{#1}\psk@nodesepA
\let\psk@nodesepB\psk@nodesepA
\def\psk@nodeseptypeA{2 }%
\def\psk@nodeseptypeB{2 }}
\def\psset@armA#1{%
\pst@getlength{#1}\psk@armA
\def\psk@armtypeA{0 }}
\def\psset@armB#1{%
\pst@getlength{#1}\psk@armB
\def\psk@armtypeB{0 }}
\def\psset@arm#1{%
\pst@getlength{#1}\psk@armA
\let\psk@armB\psk@armA
\def\psk@armtypeA{0 }%
\def\psk@armtypeB{0 }}
\psset@arm{10pt}
\def\psset@XarmA#1{%
\pst@getlength{#1}\psk@armA
\def\psk@armtypeA{1 }}
\def\psset@XarmB#1{%
\pst@getlength{#1}\psk@armB
\def\psk@armtypeB{1 }}
\def\psset@Xarm#1{%
\pst@getlength{#1}\psk@armA
\let\psk@armB\psk@armA
\def\psk@armtypeA{1 }%
\def\psk@armtypeB{1 }}
\def\psset@YarmA#1{%
\pst@getlength{#1}\psk@armA
\def\psk@armtypeA{2 }}
\def\psset@YarmB#1{%
\pst@getlength{#1}\psk@armB
\def\psk@armtypeB{2 }}
\def\psset@Yarm#1{%
\pst@getlength{#1}\psk@armA
\let\psk@armB\psk@armA
\def\psk@armtypeA{2 }%
\def\psk@armtypeB{2 }}
\def\psset@offsetA#1{\pst@getlength{#1}\psk@offsetA}
\def\psset@offsetB#1{\pst@getlength{#1}\psk@offsetB}
\def\psset@offset#1{\psset@offsetA{#1}\let\psk@offsetB\psk@offsetA}
\psset@offset{0pt}
\def\psset@angleA#1{\pst@getangle{#1}\psk@angleA}
\def\psset@angleB#1{\pst@getangle{#1}\psk@angleB}%
\def\psset@angle#1{%
\pst@getangle{#1}\psk@angleA
\let\psk@angleB\psk@angleA}
\psset@angle{0}
\def\psset@arcangleA#1{\pst@getangle{#1}\psk@arcangleA}
\def\psset@arcangleB#1{\pst@getangle{#1}\psk@arcangleB}%
\def\psset@arcangle#1{%
\pst@getangle{#1}\psk@arcangleA
\let\psk@arcangleB\psk@arcangleA}
\psset@arcangle{8}
\def\psset@ncurvA#1{\pst@checknum{#1}\psk@ncurvA}
\def\psset@ncurvB#1{\pst@checknum{#1}\psk@ncurvB}%
\def\psset@ncurv#1{\psset@ncurvA{#1}\let\psk@ncurvB\psk@ncurvA}
\psset@ncurv{.67}
\def\tx@GetCenter{GetCenter }
\def\tx@XYPos{XYPos }
\def\tx@GetEdge{GetEdge }
\def\tx@AddOffset{AddOffset }
\def\tx@GetEdgeA{GetEdgeA }
\def\tx@GetEdgeB{GetEdgeB }
\def\tx@GetArmA{GetArmA }
\def\tx@GetArmB{GetArmB }
\def\check@arrow#1#2{%
\check@@arrow#2-\@nil
\if@pst
\addto@par{arrows=#2}%
\def\next{#1}%
\else
\def\next{#1{#2}}%
\fi
\next}
\def\check@@arrow#1-#2\@nil{%
\ifx\@nil#2\@nil\@pstfalse\else\@psttrue\fi}
\def\tx@InitNC{InitNC }
\def\nc@object#1#2#3#4#5{%
\csname begin@#1Obj\endcsname
\showpointsfalse
\pst@getnode{#2}\pst@tempa
\pst@getnode{#3}\pst@tempb
\gdef\npos@default{#4 }%
\addto@pscode{%
/NCLW CLW def
\pst@nodedict
\psk@offsetA
\psk@offsetB neg
\psk@nodesepA
\psk@nodesepB
\psk@nodeseptypeA
\psk@nodeseptypeB
\pst@tempa
\pst@tempb
\tx@InitNC { #5 } if
end}%
\def\use@pscode{%
\pst@Verb{gsave \tx@STV newpath \pst@code\space grestore}%
\gdef\pst@code{}}%
\csname end@#1Obj\endcsname
\pst@shortput}
\def\npos@default{.5 }
\def\pc@object#1{%
\@ifnextchar({\pc@@object#1}{\pst@getarrows{\pc@@object#1}}}
\def\pc@@object#1(#2)(#3){%
\pnode(#2){@@A}\pnode(#3){@@B}%
#1{@@A}{@@B}}
\def\tx@LPutLine{LPutLine }
\def\tx@LPutLines{LPutLines }
\def\tx@BezierMidpoint{BezierMidpoint }
\def\tx@HPosBegin{HPosBegin }
\def\tx@HPosEnd{HPosEnd }
\def\tx@HPutLine{HPutLine }
\def\tx@HPutLines{HPutLines }
\def\tx@VPosBegin{VPosBegin }
\def\tx@VPosEnd{VPosEnd }
\def\tx@VPutLine{VPutLine }
\def\tx@VPutLines{VPutLines }
\def\tx@HPutCurve{HPutCurve }
\def\tx@NCCoor{NCCoor }
\def\tx@NCLine{NCLine }
\def\ncline{\pst@object{ncline}}
\def\ncline@i{\check@arrow{\ncline@ii}}
\def\ncline@ii#1#2{\nc@object{Open}{#1}{#2}{.5}{\tx@NCLine}}
\def\pcline{\pst@object{pcline}}
\def\pcline@i{\pc@object\ncline@ii}
\def\ncLine{\pst@object{ncLine}}
\def\ncLine@i{\check@arrow{\ncLine@ii}}
\def\ncLine@ii#1#2{\nc@object{Open}{#1}{#2}{.5}%
% DG/SR modification begin - Apr. 14, 1999 - Patch 9
%{\tx@NCLine /LPutPos { xB xA yB yA \tx@LPutLine } def}}
{\tx@NCLine /LPutPos { xB yB xA yA \tx@LPutLine } def}}
% DG/SR modification end
\def\tx@NCLines{NCLines }
\def\nclines{\pst@object{nclines}}
\def\nclines@i{\check@arrow\nclines@ii}
\def\nclines@ii#1#2{%
\begingroup
\use@par
\def\pst@aftercoors{\nclines@iii{#1}{#2}}%
\def\pst@coors{}%
\pst@@getcoors}
\def\nclines@iii#1#2{%
\nc@object{Open}{#1}{#2}{.5}{%
tx@Dict begin \psline@iii pop end
mark \pst@coors \tx@NCLines}%
\endgroup
\ignorespaces}
\def\tx@NCCurve{NCCurve }
\def\nccurve{\pst@object{nccurve}}
\def\nccurve@i{\check@arrow{\nccurve@ii}}
\def\nccurve@ii#1#2{\nc@object{Open}{#1}{#2}{.5}{%
/AngleA \psk@angleA\space def /AngleB \psk@angleB\space def
\psk@ncurvB\space \psk@ncurvA\space
\tx@NCCurve}}
\def\pccurve{\pst@object{pccurve}}
\def\pccurve@i{\pc@object\nccurve@ii}
\def\ncarc{\pst@object{ncarc}}
\def\ncarc@i{\check@arrow{\ncarc@ii}}
\def\ncarc@ii#1#2{\nc@object{Open}{#1}{#2}{.5}{%
yB yA sub xB xA sub \tx@Atan dup
\psk@arcangleA\space add /AngleA ED
\psk@arcangleB\space sub 180 add /AngleB ED
\psk@ncurvB\space \psk@ncurvA\space
\tx@NCCurve}}
\def\pcarc{\pst@object{pcarc}}
\def\pcarc@i{\pc@object\ncarc@ii}
\def\tx@NCAngles{NCAngles }
\def\ncangles{\pst@object{ncangles}}
\def\ncangles@i{\check@arrow{\ncangles@ii}}
\def\ncangles@ii#1#2{%
\nc@object{Open}{#1}{#2}{1.5}{\ncangles@iii \tx@NCAngles}}
\def\ncangles@iii{%
tx@Dict begin \psline@iii pop end
/AngleA \psk@angleA def
/AngleB \psk@angleB def
/ArmA \psk@armA def
/ArmB \psk@armB def
/ArmTypeA \psk@armtypeA def
/ArmTypeB \psk@armtypeB def }
\def\pcangles{\pst@object{pcangles}}
\def\pcangles@i{\pc@object\ncangles@ii}
\def\tx@NCAngle{NCAngle }
\def\ncangle{\pst@object{ncangle}}
\def\ncangle@i{\check@arrow{\ncangle@ii}}
\def\ncangle@ii#1#2{%
\nc@object{Open}{#1}{#2}{1.5}{\ncangles@iii \tx@NCAngle}}
\def\pcangle{\pst@object{pcangle}}
\def\pcangle@i{\pc@object\ncangle@ii}
\def\tx@NCBar{NCBar }
\def\ncbar{\pst@object{ncbar}}
\def\ncbar@i{\check@arrow{\ncbar@ii}}
\def\ncbar@ii#1#2{\nc@object{Open}{#1}{#2}{1.5}{%
\ncangles@iii /AngleB \psk@angleA def \tx@NCBar}}
\def\pcbar{\pst@object{pcbar}}
\def\pcbar@i{\pc@object\ncbar@ii}
\def\tx@NCDiag{NCDiag }
\def\ncdiag{\pst@object{ncdiag}}
\def\ncdiag@i{\check@arrow{\ncdiag@ii}}
\def\ncdiag@ii#1#2{%
\nc@object{Open}{#1}{#2}{1.5}{\ncangles@iii \tx@NCDiag}}
\def\pcdiag{\pst@object{pcdiag}}
\def\pcdiag@i{\pc@object\ncdiag@ii}
\def\tx@NCDiagg{NCDiagg }
\def\ncdiagg{\pst@object{ncdiagg}}
\def\ncdiagg@i{\check@arrow{\ncdiagg@ii}}
\def\ncdiagg@ii#1#2{%
\nc@object{Open}{#1}{#2}{.5}{\ncangles@iii \tx@NCDiagg}}
\def\pcdiagg{\pst@object{pcdiagg}}
\def\pcdiagg@i{\pc@object\ncdiagg@ii}
\def\tx@NCLoop{NCLoop }
\def\psset@loopsize#1{\pst@getlength{#1}\psk@loopsize}
\psset@loopsize{1cm}
\def\ncloop{\pst@object{ncloop}}
\def\ncloop@i{\check@arrow{\ncloop@ii}}
\def\ncloop@ii#1#2{%
\nc@object{Open}{#1}{#2}{2.5}%
{\ncangles@iii /loopsize \psk@loopsize def \tx@NCLoop}}
\def\pcloop{\pst@object{pcloop}}
\def\pcloop@i{\pc@object\ncloop@ii}
\def\tx@NCCircle{NCCircle }
\def\nccircle{\pst@object{nccircle}}
\def\nccircle@i{\check@arrow{\nccircle@ii}}
\def\nccircle@ii#1#2{%
\pssetlength\pst@dima{#2}%
\nc@object{Open}{#1}{#1}{.5}{%
/AngleA \psk@angleA def
/r \pst@number\pst@dima def
\tx@NCCircle \psarc@v end}}
\def\tx@NCBox{NCBox }
\def\ncbox{\pst@object{ncbox}}
\def\ncbox@i{\check@arrow{\ncbox@ii}}
\def\ncbox@ii#1#2{%
\def\pst@linetype{2}%
\nc@object{Closed}{#1}{#2}{.5}{%
tx@Dict begin \psline@iii pop end
\psk@boxheight \psk@boxdepth
\tx@NCBox}}
\def\pcbox{\pst@object{pcbox}}
\def\pcbox@i{\pc@object\ncbox@ii}
\def\tx@NCArcBox{NCArcBox }
\def\psset@boxheight#1{\pst@getlength{#1}\psk@boxheight}
\def\psset@boxdepth#1{\pst@getlength{#1}\psk@boxdepth}
\def\psset@boxsize#1{%
\psset@boxheight{#1}%
\let\psk@boxdepth\psk@boxheight}
\psset@boxsize{.4cm}
\def\ncarcbox{\pst@object{ncarcbox}}
\def\ncarcbox@i{\check@arrow{\ncarcbox@ii}}
\def\ncarcbox@ii#1#2{%
\def\pst@linetype{1}%
\nc@object{Closed}{#1}{#2}{.5}{%
\psk@arcangleA \psk@boxheight \psk@boxdepth \pst@number\pslinearc
\tx@NCArcBox}}
\def\pcarcbox{\pst@object{pcarcbox}}
\def\pcarcbox@i{\pc@object\ncarcbox@ii}
\def\tx@Tfan{Tfan }
% Changed according pst-beta.bug December 3, 1993
% nrot=:<angle> does not work when : is active.
\begingroup
\catcode`\:=13
\gdef\pst@activerot{\def:{\string:}}
\endgroup
\def\psset@nrot#1{%
\begingroup
\pst@activerot
\pst@expandafter{\@ifnextchar:{\psset@@nrot}{\psset@@rot}}{#1}\@nil
\global\let\pst@tempg\psk@rot
\endgroup
\let\psk@nrot\pst@tempg}
\def\psset@@nrot:#1\@nil{%
\psset@@rot#1\@nil
\edef\psk@rot{NAngle \ifx\psk@rot\@empty\else\psk@rot add \fi}}
\psset@nrot{0}
\def\tx@LPutCoor{LPutCoor }
\def\tx@LPut{LPut }
\def\psset@npos#1{%
\def\pst@tempa{#1}%
\ifx\pst@tempa\@empty
\def\psk@npos{\npos@default}%
\else
\pst@checknum{#1}\psk@npos
\fi}
\psset@npos{}
\def\ncput{\pst@object{ncput}}
\def\ncput@i{\pst@killglue\pst@makebox{\ncput@ii}}
\def\ncput@ii{%
\begingroup
\use@par
\if@star\pst@starbox\fi
\pst@makesmall\pst@hbox
\pst@rotate\psk@nrot\pst@hbox
\ncput@iii
\endgroup
\pst@shortput}
\def\ncput@iii{%
\leavevmode
\hbox{%
\pst@Verb{%
\pst@nodedict
/t \psk@npos def
\tx@LPut
end
\tx@PutBegin}%
\box\pst@hbox
\pst@Verb{\tx@PutEnd}}}
\def\naput{\pst@object{naput}}
\def\naput@i{\pst@killglue\pst@makebox{\naput@ii{NAngle 90 add}}}
\def\naput@ii#1{%
\begingroup
\use@par
\if@star\pst@starbox\fi
\def\psk@refangle{#1 }%
\let\psk@rot\psk@nrot
\uput@vii
{exch pop add a \tx@PtoC h1 add exch w1 add exch }%
{tx@Dict /NCLW known { NCLW add } if }%
\ncput@iii
\endgroup
\pst@shortput}
\def\nbput{\pst@object{nbput}}
\def\nbput@i{\pst@killglue\pst@makebox{\naput@ii{NAngle 90 sub}}}
\def\psset@tpos#1{%
\pst@checknum{#1}\psk@tpos
\ifdim\psk@tpos \p@<\z@
\def\psk@tpos{.5}%
% DG/SR modification begin - Sep. 23, 1998 - Patch 7
%\@pstrickserr{Bad `tpos' value: `#1'. Must be 0<tpos<1}\@epha
\@pstrickserr{Bad `tpos' value: `#1'. Must be 0<tpos<1}\@ehpa
% DG/SR modification end
\else
\ifdim\psk@tpos \p@>\p@
\def\psk@tpos{.5}%
% DG/SR modification begin - Sep. 23, 1998 - Patch 7
%\@pstrickserr{Bad `tpos' value: `#1'. Must be 0<tpos<1}\@epha
\@pstrickserr{Bad `tpos' value: `#1'. Must be 0<tpos<1}\@ehpa
% DG/SR modification end
\fi
\fi}
\psset@tpos{.5}
\def\tvput{\pst@object{tvput}}
\def\tvput@i{\pst@makebox{\psput@tput{H}{1}}}
\def\tlput{\pst@object{tlput}}
\def\tlput@i{\pst@makebox{\psput@tput{H}{true}}}
\def\trput{\pst@object{trput}}
\def\trput@i{\pst@makebox{\psput@tput{H}{false}}}
\def\thput{\pst@object{thput}}
\def\thput@i{\pst@makebox{\psput@tput{V}{1}}}
\def\taput{\pst@object{taput}}
\def\taput@i{\pst@makebox{\psput@tput{V}{true}}}
\def\tbput{\pst@object{tbput}}
\def\tbput@i{\pst@makebox{\psput@tput{V}{false}}}
\def\tx@HPutAdjust{HPutAdjust }
\def\tx@VPutAdjust{VPutAdjust }
\def\psput@tput#1#2{%
\begingroup
\use@par
\pst@tputmakesmall
\leavevmode
\hbox{%
\pst@Verb{%
\pst@nodedict
/t \psk@tpos \pst@tposflip def
tx@NodeDict /HPutPos known
{ #1PutPos }
{ CP /Y ED /X ED /NAngle 0 def /NCLW 0 def }
ifelse
/Sin NAngle sin def
/Cos NAngle cos def
/s \pst@number\pslabelsep NCLW add def
/l \pst@number\pst@dima def
/r \pst@number\pst@dimb def
/h \pst@number\pst@dimc def
/d \pst@number\pst@dimd def
% DG/SR modification begin - Sep. 26, 1997 - Patch 4
%\ifnum1=0#2\else
\ifnum1=0#2 \else
% DG/SR modification end
/flag #2 def
\csname tx@#1PutAdjust\endcsname
\fi
\tx@LPutCoor
end
\tx@PutBegin}%
\box\pst@hbox
\pst@Verb{\tx@PutEnd}}%
\endgroup
\pst@shortput}
\def\pst@tposflip{}
\def\pst@tputmakesmall{%
\pst@dima=\wd\pst@hbox
\divide\pst@dima 2
\pst@dimg=\psk@href\pst@dimg
\pst@dimb\pst@dima
\advance\pst@dima\pst@dimg % leftsize
\advance\pst@dimb-\pst@dimg % rightsize
\pst@dimd=\psk@vref\relax
\pst@dimc=\ht\pst@hbox
\advance\pst@dimc-\pst@dimd % height
\advance\pst@dimd\dp\pst@hbox % depth
\setbox\pst@hbox=\hbox to\z@{%
\kern-\pst@dima\vbox to\z@{\vss\box\pst@hbox\vskip-\pst@dimd}\hss}}
\def\MakeShortNab#1#2{%
  \def\pst@shortput@nab{%
    \def\pst@tempg{\next}%
    \ifx#1\next
      \let\pst@tempg\naput
    \else
      \ifx#2\next
        \let\pst@tempg\nbput
      \else
        \ifx\@sptoken\next
          \let\pst@tempg\pst@shortput
        \fi
      \fi
    \fi
    \pst@tempg}}
\MakeShortNab{^}{_}
\def\MakeShortTablr#1#2#3#4{%
  \def\pst@shortput@tablr{%
    \def\pst@tempg{\next}%
    \ifx#1\next
      \let\pst@tempg\taput
    \else
      \ifx#2\next
        \let\pst@tempg\tbput
      \else
        \ifx#3\next
          \let\pst@tempg\tlput
        \else
          \ifx#4\next
            \let\pst@tempg\trput
          \else
            \ifx\@sptoken\next
              \let\pst@tempg\pst@shortput
            \fi
          \fi
        \fi
      \fi
    \fi
    \pst@tempg}}
\MakeShortTablr{^}{_}{<}{>}
\def\MakeShortTab#1#2{%
  \def\pst@shortput@tab{%
    \def\pst@tempg{\next}%
    \ifx#1\next
      \def\pst@tempg{%
        \@nameuse{%
          t\ifodd\psk@treemode\ifpstreeflip b\else a\fi
          \else\ifpstreeflip r\else l\fi\fi put}}%
    \else
      \ifx#2\next
        \def\pst@tempg{%
          \@nameuse{%
            t\ifodd\psk@treemode\ifpstreeflip a\else b\fi
            \else\ifpstreeflip l\else r\fi\fi put}}%
      \else
        \ifx\@sptoken\next
          \let\pst@tempg\pst@shortput
        \fi
      \fi
    \fi
    \pst@tempg}}
\MakeShortTab{^}{_}
\def\psset@shortput#1{%
\def\pst@tempg{#1}%
\ifx\pst@tempg\@none
\let\pst@shortput\ignorespaces
\else
\@ifundefined{pst@shortput@#1}%
{\@pstrickserr{Bad short put: `#1'}\@ehpa}%
{\edef\pst@shortput{\noexpand\afterassignment\expandafter\noexpand
\csname pst@shortput@#1\endcsname\noexpand\let\noexpand\next}}%
\fi}
\psset@shortput{none}
\def\lput{\def\pst@par{}\pst@ifstar{\@ifnextchar[{\lput@i}{\lput@ii}}}
\def\lput@i[#1]{\addto@par{ref=#1}\lput@ii}
\def\lput@ii{\@ifnextchar({\lput@iv}{\lput@iii}}
\def\lput@iii#1{\addto@par{nrot=#1}\@ifnextchar({\lput@iv}{\ncput@i}}
\def\lput@iv(#1){\addto@par{npos=#1}\ncput@i}
\def\mput{\def\pst@par{}\pst@ifstar{\@ifnextchar[{\mput@i}{\ncput@i}}}
\def\mput@i[#1]{\addto@par{ref=#1}\ncput@i}
\def\Lput{\def\pst@par{}\pst@ifstar{\@ifnextchar[{\Lput@ii}{\Lput@i}}}
\def\Lput@i#1{\addto@par{labelsep=#1}\Lput@ii}
\def\Lput@ii[#1]{\addto@par{ref={#1}}\@ifnextchar({\Lput@iv}{\Lput@iii}}
\def\Lput@iii#1{\addto@par{nrot={#1}}\@ifnextchar({\Lput@iv}{\Lput@v}}
\def\Lput@iv(#1){\addto@par{npos=#1}\Lput@v}
\def\Lput@v{\pst@killglue\pst@makebox{\Lput@vi}}
\def\Lput@vi{%
\begingroup
\use@par
\if@star\pst@starbox\fi
\Rput@vi
\pst@makesmall\pst@hbox
\pst@rotate\psk@nrot\pst@hbox
\ncput@iii
\endgroup
\pst@shortput}
\def\Mput{\def\pst@par{}\pst@ifstar{\@ifnextchar[{\Mput@ii}{\Mput@i}}}
\def\Mput@i#1{\addto@par{labelsep=#1}\Mput@ii}
\def\Mput@ii[#1]{\addto@par{ref={#1}}\Lput@v}
\def\aput@#1{\def\pst@par{}\pst@ifstar{\@ifnextchar[{\aput@i#1}{\aput@ii#1}}}
\def\aput@i#1[#2]{\addto@par{labelsep=#2}\aput@ii#1}
\def\aput@ii#1{\@ifnextchar({\aput@iv#1}{\aput@iii#1}}
\def\aput@iii#1#2{\addto@par{nrot=#2}\@ifnextchar({\aput@iv#1}{#1}}
\def\aput@iv#1(#2){\addto@par{npos=#2}#1}
\def\aput{\aput@\naput@i}
\def\bput{\aput@\nbput@i}
\def\Aput{\def\pst@par{}\pst@ifstar{\@ifnextchar[{\Aput@i}{\naput@i}}}
\def\Aput@i[#1]{\addto@par{labelsep=#1}\naput@i}
\def\Bput{\def\pst@par{}\pst@ifstar{\@ifnextchar[{\Bput@i}{\nbput@i}}}
\def\Bput@i[#1]{\addto@par{labelsep=#1}\nbput@i}
\def\node@coor#1;#2\@nil{%
\pst@getnode{#1}\pst@tempg
\edef\pst@coor{%
\pst@nodedict
tx@NodeDict \pst@tempg known
{ \pst@tempg load \tx@GetCenter }
{ 0 0 }
ifelse
end }}
\def\Node@coor[#1]#2;#3\@nil{%
\begingroup
\psset{#1}%
\@ifnextchar\bgroup{\Node@@@coor}{\Node@@coor}#2\@nil
\endgroup
\let\pst@coor\pst@tempg}
\def\Node@@coor#1\@nil{%
\pst@getnode{#1}\pst@tempg
\xdef\pst@tempg{%
\pst@nodedict
tx@NodeDict \pst@tempg known
{ \psk@nodesepA \psk@angleA
\pst@tempg load \psk@nodeseptypeA \tx@GetEdge
\psk@offsetA \psk@angleA \tx@AddOffset
\pst@tempg load \tx@GetCenter
3 -1 roll add 3 1 roll add exch }
{ CP }
ifelse
end }}%
\def\Node@@@coor#1{%
\pst@@getcoor{#1}%
\def\psk@angleA{%
\pst@tempg load \tx@GetCenter \pst@coor
3 -1 roll sub 3 1 roll sub neg \tx@Atan}%
\Node@@coor}
\def\nput{\pst@object{nput}}
\def\nput@i#1#2{\pst@killglue\pst@makebox{\nput@ii{#1}{#2}}}
\def\nput@ii#1#2{%
\begingroup
\use@par
\psset@refangle{#1}%
\let\psk@angleA\psk@refangle
\edef\psk@nodesepA{\pst@number\pslabelsep}%
\def\psk@nodeseptypeA{0 }%
\pslabelsep\z@
\uput@vi
\Node@@coor#2\@nil
\let\pst@coor\pst@tempg
\leavevmode
\psput@special\pst@hbox
\endgroup
\ignorespaces}
\newcount\psrow
\newcount\pscol
\newcount\psmatrixcnt
\newskip\psrowsep
\newskip\pscolsep
\def\psset@colsep#1{\pssetlength\pscolsep{#1}}
\def\psset@rowsep#1{\pssetlength\psrowsep{#1}}
\psset@colsep{1.5cm}
\psset@rowsep{1.5cm}
\newif\ifpsmatrix
% DG/SR modification begin - Nov. 27, 1998 - Patch 8
%\let\mscount\@multicnt
\ifx\mscount\@undefined\let\mscount\@multicnt\fi
% DG/SR modification end
\def\psmatrix{%
  \begingroup
{\ifnum0=`}\fi % Don't want to expand any &.
\@ifnextchar[{\psmatrix@i}{\ifnum0=`{\fi}{}\psmatrix@ii}}
\def\psmatrix@i[#1]{%
\ifnum0=`{\fi}{}%
\psset{#1}%
\psmatrix@ii}
\def\psmatrix@ii{%
\KillGlue
\edef\psm@beginmath{%
\ifmmode$\m@th\ifinner\textstyle\else\displaystyle\fi\fi}%
\edef\psm@endmath{\ifmmode$\fi}%
\let\\\psm@cr
\advance\psmatrixcnt 1
\def\psm@thenode{M-\the\psmatrixcnt-\the\psrow-\the\pscol}%
\tabskip\z@
\psrow1
\pscol\z@
\psset@shortput{tablr}%
\leavevmode
\vbox\bgroup\halign\bgroup&%
\begingroup
\global\advance\pscol 1
\csname psrowhook\romannumeral\psrow\endcsname
\csname pscolhook\romannumeral\pscol\endcsname
\psm@beginnode##\psm@endnode\endgroup
\cr}
\def\endpsmatrix{%
\crcr\egroup\unskip\egroup
\endgroup}
\def\psm@cr{{\ifnum0=`}\fi\@ifnextchar[{\psm@@cr}{\psm@@@cr{}}}
\def\psm@@cr[#1]{\psm@@@cr{\vskip#1\relax}}
\def\psm@@@cr#1{%
\ifnum0=`{\fi}{}\cr
\noalign{%
\global\advance\psrow 1
\global\pscol\z@
\vskip\psrowsep
#1}}
\def\psm@beginnode{%
\@ifnextchar\psm@endnode
{\let\psm@endnode@i\relax\setbox\pst@hbox=\hbox{}}%
{\pst@object{psm@beginnode}}}
\def\psm@beginnode@i{%
\setbox\pst@hbox=\hbox\bgroup
\psm@beginmath
\begingroup
\ignorespaces}
\def\psm@endnode@i{%
\unskip
\endgroup
\psm@endmath
\egroup
\use@par
\@psttrue}
\def\psm@endnode{%
\@pstfalse
\psm@endnode@i
\ifnum\pscol>1 \hskip\pscolsep \fi
\psk@mnodesize
\hfil
\nodealigntrue
\if@pst
\csname mnode@\psk@mnode\endcsname
\else
\csname mnode@\psk@emnode\endcsname
\fi
\psk@mcol
\psk@@mnodesize}
% DG/SR modification begin - Sep. 3, 1999 - Patch 10 - From Michael Sharpe
%\def\psspan#1{\mscount#1\relax\loop\ifnum\mscount>\@ne \sp@n\repeat}
\def\psspan#1{\global\mscount#1\relax\pstloop\ifnum\mscount>\@ne\sp@n\repeat}
\def\pstloop#1\repeat{\gdef\pstiterate{#1\relax\expandafter\pstiterate\fi}%
\pstiterate
\let\pstiterate\relax}
% DG/SR modification end
\def\psset@name#1{\pst@getnode{#1}\psk@name}
\let\psk@name\relax
\def\psset@mcol#1{%
\ifx r#1\relax
\let\psk@mcol\relax
\else
\ifx l#1\relax
\let\psk@mcol\hfill
\else
\let\psk@mcol\hfil
\fi
\fi}
\psset@mcol{c}
\def\psset@mnodesize#1{%
\pssetlength\pst@dimg{#1}%
\ifdim\pst@dimg<\z@
\let\psk@mnodesize\relax
\let\psk@@mnodesize\relax
\else
\edef\psk@mnodesize{\noexpand\hbox to\number\pst@dimg sp\noexpand\bgroup}%
\let\psk@@mnodesize\egroup
\fi}
\psset@mnodesize{-1pt}
\def\mnode@R{\rnode@iii\Rnode@ii{\psm@thenode}}
\def\mnode@r{\rnode@iii\rnode@iv{\psm@thenode}}
\def\mnode@oval{\ovalnode@ii{\psm@thenode}}
\def\mnode@tri{\trinode@ii{\psm@thenode}}
\def\mnode@dia{\dianode@ii{\psm@thenode}}
\def\mnode@C{{\nodealigntrue\cnode@ii(\z@,\z@){\psk@radius}{\psm@thenode}}}
\def\mnode@f{{\nodealigntrue\fnode@ii(\z@,\z@){\psm@thenode}}}
\def\mnode@circle{\circlenode@ii{\psm@thenode}}
\def\mnode@p{\pnode(\z@,\z@){\psm@thenode}}
% DG/SR modification begin - Jul. 22, 1997 - Patch 1
\def\mnode@dot{\dotnode@ii(\z@,\z@){\psm@thenode}}
% DG/SR modification end
\def\mnode@none{\box\pst@hbox}
\def\psset@mnode#1{%
\@ifundefined{mnode@#1}%
{\@pstrickserr{\string\psmatrix\space node `#1' not defined.}\@ehpa}%
{\edef\psk@mnode{#1}}}
\def\psset@emnode#1{%
\@ifundefined{mnode@#1}%
{\@pstrickserr{\string\psmatrix\space node `#1' not defined.}\@ehpa}%
{\edef\psk@emnode{#1}}}
\psset@mnode{R}
\psset@emnode{none}
%%%% FROM pst-coil.tex
\def\nccoil{\pst@object{nccoil}}
\def\nccoil@i{\check@arrow{\nccoil@ii}}
\def\nccoil@ii#1#2{\nc@object{Open}{#1}{#2}{.5}{%
\tx@NCCoor
tx@Dict begin
% DG/SR modification begin - Mar. 19, 1998 - Patch 5
4 2 roll
% DG/SR modification end
\psk@coilwidth \pscoilheight
\psk@coilarmA \psk@coilarmB
\psk@coilaspect \psk@coilinc
\pst@coildict \tx@Coil end
end}}
\def\nczigzag{\pst@object{nczigzag}}
\def\nczigzag@i{\check@arrow{\nczigzag@ii}}
\def\nczigzag@ii#1#2{\nc@object{Open}{#1}{#2}{.5}{%
\tx@NCCoor
tx@Dict begin
% DG/SR modification begin - Mar. 19, 1998 - Patch 5
4 2 roll
% DG/SR modification end
\pscoilheight
\psk@coilwidth
\psk@coilarmA
\psk@coilarmB
\pst@coildict \tx@ZigZag end
\psline@iii
\tx@Line
end}}
\catcode`\@=\TheAtCode\relax
\endinput
%%
%% END pst-node.tex

pst-plot.tex
%% BEGIN pst-plot.tex
%%
%% Plots and axes with PSTricks 97.
%% See the PSTricks User's Guide for documentation.
%%
\def\fileversion{97 patch 2}
\def\filedate{1999/12/12}
%%
%% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu.
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt.
%%
\message{ v\fileversion, \filedate}

\csname PSTplotLoaded\endcsname
\let\PSTplotLoaded\endinput

\ifx\PSTricksLoaded\endinput\else
  \def\next{\input pstricks.tex }
  \expandafter\next
\fi

\ifx\MultidoLoaded\endinput\else
  \def\next{\input multido.tex }
  \expandafter\next
\fi

\edef\TheAtCode{\the\catcode`\@}
\catcode`\@=11

% Using lists of data is optimized for \dataplot and \fileplot
% Here is the tricky part. As each line is read from file,
% we want to ignore trailing delimiters, and convert arbitrary
% strings of non-trailing delimiters to _D_.
% We end up with
%   D x1 D y1 D x2 D y2 ... D xn D yn
%
\begingroup
\catcode`\{=13
\catcode`\}=13
\catcode`\(=13
\catcode`\)=13
\catcode`\,=13
\catcode`\!=1
\catcode`\*=2
\catcode`\ =13
\catcode`\_=13
\catcode`\^^M=13
\gdef\pst@datadelimiters!% Begin def
\catcode`\{=13%
\catcode`\}=13%
\catcode`\(=13%
\catcode`\)=13%
\catcode`\,=13%
\catcode`\ =13%
\catcode`\^^M=13%
\def,##1!%
\ifcat\noexpand,\noexpand##1%
\expandafter##1%
\else\space%
D\space##1%
\fi*%
\let(,\let),\let{,\let},\let ,\let^^M,\let_\@empty*% End def
\endgroup
\begingroup
\catcode`\,=13
\catcode`\_=13
\gdef\savedata@#1[#2]{%
  \xdef\pst@tempg{#2_}%
  \endgroup
  \let#1\pst@tempg
  \global\let\pst@tempg\relax
  \ignorespaces}
\gdef\readdata@{%
  \read1 to \pst@tempa
  \expandafter\readdata@@\pst@tempa_\@nil
  \ifeof1\else\expandafter\readdata@\fi}
\gdef\pst@@readfile#1#2\@nil{\addto@pscode{,#1#2}}%
\gdef\readdata@@#1#2\@nil{\xdef\pst@tempg{\pst@tempg,#1#2}}%
\endgroup

\def\readdata#1#2{%
  \openin1=#2
  \begingroup
  \def\pst@tempg{}%
  \ifeof1
    \@pstrickserr{Data file `#2' not found.}\@ehpa
  \else
    \pst@datadelimiters
    \catcode`\[=1
    \catcode`\]=2
    \readdata@%
  \fi
  \endgroup
  \let#1\pst@tempg
  \global\let\pst@tempg\relax
  \ignorespaces}

\def\pst@readfile#1{{\let\readdata@@\pst@@readfile\readdata\pst@tempg{#1}}}
\def\pst@altreadfile#1{%
  \openin1=#1
  \ifeof1
    \@pstrickserr{Data file `#1' not found.}\@ehpa
  \else
    \catcode`\{=10
    \catcode`\}=10
    \catcode`\(=10
    \catcode`\)=10
    \catcode`\,=10
    \catcode`\^^M=10
    \catcode`\[=1
    \catcode`\]=2
    \pst@@altreadfile
  \fi}
\def\pst@@altreadfile{%
  \read1 to \pst@tempg
  \expandafter\pst@@@altreadfile\pst@tempg\@empty\@nil
  \ifeof1\else\expandafter\pst@@@altreadfile\fi}
\def\pst@@@altreadfile#1#2\@nil{\addto@pscode{#1#2}}%

\def\savedata#1{\begingroup\pst@datadelimiters\savedata@{#1}}

\def\beginplot@line{\begin@OpenObj}
\def\endplot@line{\psline@ii}
\def\beginplot@polygon{\begin@ClosedObj}
\def\endplot@polygon{\pspolygon@ii}
\def\beginplot@curve{\begin@OpenObj}
\def\endplot@curve{\pscurve@ii}
\def\beginplot@ecurve{\begin@OpenObj}
\def\endplot@ecurve{\psecurve@ii}
\def\beginplot@ccurve{\begin@ClosedObj}
\def\endplot@ccurve{\psccurve@ii}
\def\beginplot@dots{\begin@SpecialObj}
\def\endplot@dots{\psdots@ii}
\def\beginplot@bezier{\begin@OpenObj}
\def\endplot@bezier{\psbezier@ii}
\def\beginplot@cbezier{\begin@ClosedObj}
\def\endplot@cbezier{\pscbezier@ii}

\def\psset@plotstyle#1{%
  \@ifundefined{beginplot@#1}%
    {\@pstrickserr{Plot style `#1' not defined}\@eha}%
    {\edef\psplotstyle{#1}}}
\psset@plotstyle{line}

\def\psset@plotpoints#1{%
  \pst@cntg=#1\relax
  \ifnum\pst@cntg<2
    \@pstrickserr{plotpoints parameter must be at least 2}\@ehpa
  \else
    \advance\pst@cntg-1
    \edef\psk@plotpoints{\the\pst@cntg\space}%
  \fi}
\psset@plotpoints{50}

% For quick plots, define:
%   \beginqp@<foo>   : What to do to first point (PS code only).
%   \doqp@<foo>      : What to do to subsequent points (PS code only).
%   \endqp@<foo>     : How to end plot.
%   \testqp@<foo>    : Set \@psttrue if OK to use quick plot.

\def\beginqp@line{\pst@oplineto}
\def\doqp@line{L }
\def\endqp@line{\end@OpenObj}%
\def\testqp@line{%
  \ifdim\pslinearc>\z@\else
    \ifshowpoints\else
      \ifx\psk@arrowA\@empty
        \ifx\psk@arrowB\@empty
          \@psttrue
        \fi
      \fi
    \fi
  \fi}

\def\beginqp@polygon{moveto }
\def\doqp@polygon{L }
\def\endqp@polygon{%
  \addto@pscode{closepath}%
  \end@ClosedObj}
\def\testqp@polygon{%
  \ifdim\pslinearc>\z@\else
    \ifshowpoints\else
      \@psttrue
    \fi
  \fi}

\def\beginqp@dots{%
  \psk@dotsize
  \@nameuse{psds@\psk@dotstyle}
% DG/SR modification begin - Dec. 12, 1999 - Patch 2
%  /TheDot { gsave \psk@dotangle \psk@dotscale Dot grestore } def
%  TheDot }
  Dot }
%\def\doqp@dots{TheDot }
\def\doqp@dots{Dot }
% DG/SR modification end
\def\endqp@dots{\end@SpecialObj}
\def\testqp@dots{\@psttrue}

\def\beginqp@bezier{/n 0 def \pst@oplineto}
\def\doqp@bezier{/n n 1 add def n 3 mod 0 eq { curveto } if }
\def\endqp@bezier{%
  \addto@pscode{n 3 mod { pop pop } repeat}
  \end@OpenObj}%
\def\testqp@bezier{%
  \ifshowpoints\else
    \ifx\psk@arrowA\@empty
      \ifx\psk@arrowB\@empty
        \@psttrue
      \fi
    \fi
  \fi}

\def\beginqp@cbezier{/n 0 def moveto }
\def\doqp@cbezier{\doqp@bezier}
\def\endqp@cbezier{%
  \addto@pscode{n 3 mod { pop pop } repeat closepath}
  \end@ClosedObj}%
\def\testqp@cbezier{\ifshowpoints\else\@psttrue\fi}

\def\dataplot{\def\pst@par{}\pst@object{dataplot}}
\def\dataplot@i#1{%
  \pst@killglue
  \begingroup
    \use@par
    \@pstfalse
    \@nameuse{testqp@\psplotstyle}%
    \if@pst
      \dataplot@ii{\addto@pscode{#1}}%
    \else
      \listplot@ii{\addto@pscode{#1}}%
    \fi
  \endgroup
  \ignorespaces}
\def\dataplot@ii#1{%
  \@nameuse{beginplot@\psplotstyle}%
    \addto@pscode{%
      /Dx { \pst@number\psxunit mul /D { Dy } def } def
      /Dy { \pst@number\psyunit mul Do /D { Dx } def } def
      /D { /D { Dx } def } def
      /Do {
        \@nameuse{beginqp@\psplotstyle}%
        /Do { \@nameuse{doqp@\psplotstyle}} def
      } def}%
    #1%
    \addto@pscode{D}%
  \@nameuse{endqp@\psplotstyle}}

\def\fileplot{\def\pst@par{}\pst@object{fileplot}}
\def\fileplot@i#1{%
  \pst@killglue
  \begingroup
    \use@par
    \@pstfalse
    \@nameuse{testqp@\psplotstyle}%
    \if@pst
      \dataplot@ii{\pst@readfile{#1}}%
    \else
      \listplot@ii{\pst@altreadfile{#1}}%
    \fi
  \endgroup
  \ignorespaces}

\pst@def{ScalePoints}<%
  /y ED /x ED
  counttomark dup dup cvi eq not { exch pop } if
  /m exch def /n m 2 div cvi def
  n { y mul m 1 roll x mul m 1 roll /m m 2 sub def } repeat>

\def\listplot{\def\pst@par{}\pst@object{listplot}}
\def\listplot@i#1{\listplot@ii{\addto@pscode{#1}}}
\def\listplot@ii#1{%
  \@nameuse{beginplot@\psplotstyle}%
    \addto@pscode{/D {} def mark}%
    #1%
    \addto@pscode{\pst@number\psxunit \pst@number\psyunit \tx@ScalePoints}%
  \@nameuse{endplot@\psplotstyle}}

% \psplot

\def\psplotinit#1{\xdef\psplot@init{#1 }}
\def\psplot@init{}

\def\psplot{\def\pst@par{}\pst@object{psplot}}
\def\psplot@i#1#2#3{%
  \pst@killglue
  \begingroup
    \use@par
    \@nameuse{beginplot@\psplotstyle}%
    \addto@pscode{%
      \psplot@init
      /x #1 def
      /x1 #2 def
      /dx x1 x sub \psk@plotpoints div def
      /xy {
        x \pst@number\psxunit mul
        #3 \pst@number\psyunit mul
      } def}%
    \gdef\psplot@init{}%
    \@pstfalse
    \@nameuse{testqp@\psplotstyle}%
    \if@pst
      \psplot@ii
    \else
      \psplot@iii
    \fi
  \endgroup
  \ignorespaces}
\def\psplot@ii{%
    \addto@pscode{%
      xy \@nameuse{beginqp@\psplotstyle}
      \psk@plotpoints 1 sub {
        /x x dx add def
        xy \@nameuse{doqp@\psplotstyle}
      } repeat
      /x x1 def
      xy \@nameuse{doqp@\psplotstyle}}%
  \@nameuse{endqp@\psplotstyle}}
\def\psplot@iii{%
    \addto@pscode{%
      mark
      /n 2 def
      \psk@plotpoints {
        xy
        n 2 roll
        /n n 2 add def
        /x x dx add def
      } repeat
      /x x1 def
      xy
      n 2 roll}%
  \@nameuse{endplot@\psplotstyle}}

\def\parametricplot{\def\pst@par{}\pst@object{parametricplot}}
\def\parametricplot@i#1#2#3{%
  \pst@killglue
  \begingroup
    \use@par
    \@nameuse{beginplot@\psplotstyle}%
    \addto@pscode{%
      \psplot@init
      /t #1 def
      /t1 #2 def
      /dt t1 t sub \psk@plotpoints div def
      /xy {
        #3
        \pst@number\psyunit mul exch
        \pst@number\psxunit mul exch
      } def}%
    \gdef\psplot@init{}%
    \@pstfalse
    \@nameuse{testqp@\psplotstyle}%
    \if@pst
      \parametricplot@ii
    \else
      \parametricplot@iii
    \fi
  \endgroup
  \ignorespaces}
\def\parametricplot@ii{%
    \addto@pscode{%
      xy \@nameuse{beginqp@\psplotstyle}
      \psk@plotpoints 1 sub {
        /t t dt add def
        xy \@nameuse{doqp@\psplotstyle}
      } repeat
      /t t1 def
      xy \@nameuse{doqp@\psplotstyle}}%
  \@nameuse{endqp@\psplotstyle}}
\def\parametricplot@iii{%
    \addto@pscode{%
      mark
      /n 2 def
      \psk@plotpoints {
        xy
        n 2 roll
        /n n 2 add def
        /t t dt add def
      } repeat
      /t t1 def
      xy
      n 2 roll}%
  \@nameuse{endplot@\psplotstyle}}

% These axes macros are complicated. Be careful.

% \pst@ticks{angle}{dx}{n}{int}
% int=1 if ticks appear on top of axes, 0 otherwise.
\def\pst@ticks#1#2#3#4{%
  \begin@SpecialObj
    \addto@pscode{%
      #1 rotate
      /n #3 def
      /dx #2 def
      n 0 lt { /dx dx neg def /n n neg def } if
      /y2 \psk@ticksize CLW 2 div add def
      /y1 y2 neg def
      \ifnum\psk@tickstyle=1
        \ifdim#4<\z@ /y2 \else /y1 \fi 0 def
      \else
        \ifnum\psk@tickstyle=-1
          \ifdim#4<\z@ /y1 \else /y2 \fi 0 def
        \fi
      \fi
      /x dx def
      n { x y1 moveto x y2 lineto stroke /x x dx add def } repeat}%
  \end@SpecialObj}


\def\psset@ticksize#1{\pst@getlength{#1}\psk@ticksize}
\psset@ticksize{3pt}

\def\psset@tickstyle#1{\pst@expandafter\psset@@tickstyle{#1}\@nil}
\def\psset@@tickstyle#1#2\@nil{%
  \ifx#1f\let\psk@tickstyle\z@\else
    \ifx#1t\let\psk@tickstyle\@ne\else
      \ifx#1b\let\psk@tickstyle\m@ne\else
        \@pstrickserr{Bad tick style: `#1#2'}\@ehpa
  \fi\fi\fi}
\psset@tickstyle{full}

\def\psset@ticks#1{\pst@expandafter\psset@@ticks{#1}\@nil\psk@ticks}
\def\psset@@ticks#1#2\@nil#3{%
  \ifx#1a\let#3\z@\else
    \ifx#1x\let#3\@ne\else
      \ifx#1y\let#3\tw@\else
        \ifx#1n\let#3\thr@@\else
          \@pstrickserr{Bad argument: `#1#2'}\@ehpa
  \fi\fi\fi\fi}
\psset@ticks{all}

\def\psset@labels#1{\pst@expandafter\psset@@ticks{#1}\@nil\psk@labels}
\psset@labels{all}

\def\psset@Ox#1{\edef\psk@Ox{#1}}
\psset@Ox{0}
\def\psset@Dx#1{\edef\psk@Dx{#1}}
\psset@Dx{1}
\def\psset@dx#1{%
  \pssetxlength\pst@dimg{#1}%
  \edef\psk@dx{\number\pst@dimg}}
\psset@dx{0}

\def\psset@Oy#1{\edef\psk@Oy{#1}}
\psset@Oy{0}
\def\psset@Dy#1{\edef\psk@Dy{#1}}
\psset@Dy{1}
\def\psset@dy#1{%
  \pssetylength\pst@dimg{#1}%
  \edef\psk@dy{\number\pst@dimg}}
\psset@dy{0}

\newif\ifshoworigin
\def\psset@showorigin#1{\@nameuse{showorigin#1}}
\psset@showorigin{true}


\def\psaxes{\def\pst@par{}\pst@object{psaxes}}
\def\psaxes@i{\pst@getarrows\psaxes@ii}
\def\psaxes@ii(#1){\@ifnextchar({\psaxes@iii(#1)}{\psaxes@iv(0,0)(0,0)(#1)}}
\def\psaxes@iii(#1)(#2){%
  \@ifnextchar(%
    {\psaxes@iv(#1)(#2)}%
    {\psaxes@iv(#1)(#1)(#2)}}
\def\psaxes@iv(#1,#2)(#3,#4)(#5,#6){%
  \setbox\pst@hbox=\hbox\bgroup
    \use@par
    \pssetxlength\pst@dimg{#1}% o-x
    \pssetylength\pst@dimh{#2}% o-y
    \pssetxlength\pst@dima{#3}% bl-x
    \pssetylength\pst@dimb{#4}% bl-y
    \pssetxlength\pst@dimc{#5}% ur-x
    \pssetylength\pst@dimd{#6}% ur-y
% Whole thing will be translated to origin:
    \advance\pst@dima-\pst@dimg % Dist. from bl-x to o-x
    \advance\pst@dimb-\pst@dimh % Dist. from bl-y to o-y
    \advance\pst@dimc-\pst@dimg % Dist. from ur-x to o-x
    \advance\pst@dimd-\pst@dimh % Dist. from ur-y to o-y
% Make lines/arrows or frame:
    \@nameuse{psxs@\psk@axesstyle}%
% "\pslabelsep" should be from the edge of the axis.
    \advance\pslabelsep.5\pslinewidth
% Now the ticks and labels. Start by checking for "\multido".
% !!Need to fix this so that does nothing when there are 0 ticks.!!
    \begingroup
      \ifdim\pst@dimb=\z@\else\showoriginfalse\fi
      \ifnum\psk@dx=\z@
        \pst@dimg=\psk@Dx\psxunit
        \edef\psk@dx{\number\pst@dimg}%
      \fi
      \ifnum\psk@ticks<\tw@
        \ifnum\psk@tickstyle>\z@\else
          \advance\pslabelsep\psk@ticksize\p@
        \fi
      \fi
      \pst@hlabels\pst@dimc\psk@arrowB
      \pst@hlabels\pst@dima\psk@arrowA
    \endgroup
    \begingroup
      \ifdim\pst@dima=\z@\else\showoriginfalse\fi
      \ifnum\psk@dy=\z@
         \pst@dimg=\psk@Dy\psyunit
         \edef\psk@dy{\number\pst@dimg}%
      \fi
      \ifodd\psk@ticks\else
        \ifnum\psk@tickstyle>\z@\else
          \advance\pslabelsep\psk@ticksize\p@
        \fi
      \fi
      \pst@vlabels\pst@dimd\psk@arrowB
      \pst@vlabels\pst@dimb\psk@arrowA
    \endgroup
% Now close "\pst@hbox" (which is 0-dimensional), and put it at the origin.
  \egroup
  \pssetxlength\pst@dimg{#1}%
  \pssetylength\pst@dimh{#2}%
  \leavevmode\psput@cartesian\pst@hbox
  \ignorespaces}

\def\psxs@axes{%
  \psxs@@axes\pst@dima\pst@dimc{}%
  \psxs@@axes\pst@dimb\pst@dimd{exch}}
\def\psxs@@axes#1#2#3{%
  \begin@SpecialObj
    \ifdim#1=\z@
      \def\psk@arrowA{C}%
    \else
      \ifdim#2=\z@
        \def\psk@arrowB{C}%
      \fi
    \fi
    \let\pst@linetype\pst@arrowtype
    \pst@addarrowdef
    \addto@pscode{%
      \pst@number#2 0 #3
      \pst@number#1 0 #3
      ArrowA
      CP 4 2 roll
      ArrowB
      L
      pop pop}%
    \pst@stroke
  \end@SpecialObj}

\def\psxs@frame{%
  \begin@SpecialObj
    \addto@pscode{%
      0 0 moveto \pst@number\pst@dimc 0 L
      0 \pst@number\pst@dimd 2 copy rlineto L closepath}%
    \pst@stroke
    \psk@fillstyle
  \end@SpecialObj
  \let\psk@arrowA\@empty
  \let\psk@arrowB\@empty}

\def\psset@axesstyle#1{%
  \@ifundefined{psxs@#1}%
    {\@pstrickserr{Axes style `#1' not defined}\@eha}%
    {\edef\psk@axesstyle{#1}}}
\psset@axesstyle{axes}

\def\psxs@none{\let\psk@arrowA\@empty\let\psk@arrowB\@empty}

% The origin is never the only label.
\def\pst@hlabels#1#2{%
  \ifdim#1=\z@\else
    \ifx#2\empty\else
      \advance#1\ifdim#1>\z@-\fi7\pslinewidth
    \fi
    \pst@cnta=#1\relax                % Distance (in sp) to end.
    \divide\pst@cnta\psk@dx\relax     % Number of ticks/labels
    \ifnum\pst@cnta=\z@\else
      \pst@dimb=\psk@dx sp            % Space between ticks.
      \ifnum\psk@ticks<\tw@
        \pst@ticks{0}{\pst@number\pst@dimb}{\the\pst@cnta}{\pst@dimd}%
      \fi
      \ifnum\psk@labels<\tw@ \pst@@hlabels\fi
      \showoriginfalse
    \fi
  \fi}

% Knows \pst@dimb and \pst@cnta
\def\pst@@hlabels{%
  \vbox to\z@{%
    \ifdim\pst@dimd>\z@\vskip\pslabelsep\else\vss\fi
    \ifnum\pst@cnta<\z@
      \pst@dimb=-\pst@dimb
    \fi
    \hbox to\z@{%
      \ifshoworigin\hbox to \z@{\hss\pshlabel{\psk@Ox}\hss}\fi
      \mmultido
        {\n=\psk@Ox+\psk@Dx}%
        {\pst@cnta}%
        {\hskip\pst@dimb\hbox to \z@{\hss\pshlabel{\n}\hss}}%
      \hss}%
    \ifdim\pst@dimd>\z@\vss\else\vskip\pslabelsep\fi}}%

\def\pshlabel#1{$#1$}

\def\pst@vlabels#1#2{%
  \ifdim#1=\z@\else
    \ifx#2\empty\else
      \advance#1\ifdim#1>\z@-\fi7\pslinewidth
    \fi
    \pst@cnta=#1\relax                % Distance (in sp) to end.
    \divide\pst@cnta\psk@dy\relax     % Number of ticks/labels
    \ifnum\pst@cnta=\z@\else
      \pst@dima=\psk@dy sp            % Space between ticks.
      \ifodd\psk@ticks\else
        \pst@ticks{90}{\pst@number\pst@dima}{\the\pst@cnta}{-\pst@dimc}%
      \fi
      \ifodd\psk@labels\else\pst@@vlabels\fi
      \showoriginfalse
    \fi
  \fi}

% Knows \pst@dima and \pst@cnta
\def\pst@@vlabels{%
  \vbox to\z@{%
    \ifnum\pst@cnta>\z@
      \pst@dima=-\pst@dima
    \fi
    \offinterlineskip
    \ifshoworigin
      \vbox to \z@{\vss\hbox to\z@{%
        \ifdim\pst@dimc>\z@\hss\else\hskip\pslabelsep\fi
        \psvlabel{\psk@Oy}%
        \ifdim\pst@dimc>\z@\hskip\pslabelsep\else\hss\fi}\vss}%
    \fi
    \mmultido
      {\n=\psk@Oy+\psk@Dy}%
      {\pst@cnta}%
      {\vbox to\pst@dima{\vss}\vbox to \z@{\vss\hbox to\z@{%
        \ifdim\pst@dimc>\z@\hss\else\hskip\pslabelsep\fi
        \psvlabel{\n}%
        \ifdim\pst@dimc>\z@\hskip\pslabelsep\else\hss\fi}\vss}}%
    \vss}}

\def\psvlabel#1{$#1$}

\catcode`\@=\TheAtCode\relax
\endinput
%%
%% END pst-plot.tex

pstricks-add.tex
%%
%% This is file `pstricks-add.tex',
%%
%% IMPORTANT NOTICE:
%%
%% Package `pstricks-add.tex'
%%
%% Herbert Voss <voss _at_ pstricks.de>
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN archives
%% in directory macros/latex/base/lppl.txt.
%%
%% DESCRIPTION:
%%   `pstricks-add' is a PSTricks package for additionals to the standard
%%         pstricks package
%%
\csname PSTricksAddLoaded\endcsname
\let\PSTricksAddLoaded\endinput
%
% Requires some packages
\ifx\PSTricksLoaded\endinput\else\input pstricks \fi
\ifx\PSTplotLoaded\endinput\else\input pst-plot \fi
\ifx\PSTnodesLoaded\endinput\else\input pst-node \fi
\ifx\MultidoLoaded\endinput\else\input multido \fi
\ifx\PSTXKeyLoaded\endinput\else\input pst-xkey \fi
%
\def\fileversion{2.32}
\def\filedate{2005/01/16}
\message{`pstricks-add' v\fileversion, \filedate\space (hv)}
%
\edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax
\SpecialCoor
\pst@addfams{pstricks-add}
%
%% prologue for postcript
\pstheader{pst-eqdf.pro}%
%
%
%-------------------------------- pstricks ------------------------------------
%
%%%%%%% \begin{pspicture} %%%%%%%%%%%%%%%%%%%
\newdimen\pst@dimm%
\newdimen\pst@dimn%
\newdimen\pst@dimo%
\newdimen\pst@dimp%
\newcount\pst@cntm%
\newcount\pst@cntn%
\newcount\pst@cnto%
\newcount\pst@cntp%
\psset{dx=0}%
\psset{dy=0}%
\newcount\@zero\@zero=0\relax
%

\def\pst@getdimdim#1 #2 #3\@nil{%
  \ifx#2\pst@missing\relax%
    \pssetxlength\pst@dimn{#1}%
    \pst@dimm=0pt%
  \else%
    \pssetlength\pst@dimm{#1}%
    \pssetlength\pst@dimn{#2}%
  \fi%
}
\def\pst@getxdimdim#1 #2 #3\@nil{%
  \ifx#2\pst@missing\relax%
    \pssetxlength\pst@dimn{#1}%
    \pst@dimm=0pt%
  \else%
    \pssetxlength\pst@dimm{#1}%
    \pssetxlength\pst@dimn{#2}%
  \fi%
}
\def\pst@getydimdim#1 #2 #3\@nil{%
  \ifx#2\pst@missing\relax%
    \pssetxlength\pst@dimn{#1}%
    \pst@dimm=0pt%
  \else%
    \pssetylength\pst@dimm{#1}%
    \pssetylength\pst@dimn{#2}%
  \fi%
}
%
% A modulo macro for integer values
% \pst@mod{34}{6}\value ==> \value is 4
%
\def\pst@mod#1#2#3{%
  \begingroup%
  \pst@cntm=#1\pst@cntn=#2\relax%
  \pst@cnto=\pst@cntm%
  \divide\pst@cntm by \pst@cntn%
  \multiply\pst@cntn by \pst@cntm%
  \advance\pst@cnto by -\pst@cntn%
  \edef\value{\endgroup\def\noexpand#3{\number\pst@cnto}}\value%
}
\def\pst@max#1#2#3{%
  \begingroup%
  \pst@cntm=#1\pst@cntn=#2\relax%
  \ifnum\pst@cntm<\pst@cntn\pst@cntm=\pst@cntn\fi
  \global#3=\the\pst@cntm%
  \endgroup%
}
\def\pst@maxdim#1#2#3{%
  \begingroup%
  \pst@dimm=#1\pst@dimn=#2\relax%
  \ifdim\pst@dimm<\pst@dimn\pst@dimm=\pst@dimn\fi
  \global#3=\the\pst@dimm%
  \endgroup%
}
\def\pst@abs#1#2{%
  \begingroup%
  \pst@cntm=#1\relax%
  \ifnum\pst@cntm<\z@\pst@cntm=-\pst@cntm\fi%
  \global#2=\the\pst@cntm
  \endgroup%
}
\def\pst@absdim#1#2{%
  \begingroup%
  \pst@dimm=#1\relax%
  \ifdim\pst@dimm<\z@\pst@dimm=-\pst@dimm\fi%
  \global#2=\the\pst@dimm%
  \endgroup%
}
%
%--------------------------------------- small stuff -------------------------------
\def\defineTColor{\@ifnextchar[{\defineTColor@i}{\defineTColor@i[]}}
\def\defineTColor@i[#1]#2#3{%     transparency "Colors"
  \newpsstyle{#2}{%
     fillstyle=vlines,hatchcolor=#3,
     hatchwidth=0.1\pslinewidth,hatchsep=1\pslinewidth,#1%
  }%
}
%
\def\rmultiput{\def\pst@par{}\pst@ifstar{\@ifnextchar[{\rmultiput@i}{\rmultiput@i[]}}}
\def\rmultiput@i[#1]{\begingroup\psset{#1}\rmultiput@ii}
\def\rmultiput@ii#1{\def\@rmultiputArg{#1}%
  \@ifnextchar({\rmultiput@iii}{\rmultiput@iii(\z@,\z@)}}
\def\rmultiput@iii(#1){%
  \pst@killglue%
  \if@star\rput*(#1){\@rmultiputArg}
  \else\rput(#1){\@rmultiputArg}%
  \fi
  \@ifnextchar({\rmultiput@iii}{\endgroup}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Begin patch TN; Date (YY-MM-DD): 04-07-17; first part
\define@key[psset]{}{dash}{%	defined in pstricks.tex
  \pst@expandafter\psset@@dash{#1}\@nil% Error handling for empty argument.
}
\define@key[psset]{}{maxdashes}{\edef\psk@maxdashes{#1}}
\psset{maxdashes=11}
\def\psset@@dash#1\@nil{%
 \def\psk@dash{}%
 % modification 04-08-07:
 \pst@cntm0
 \def\next##1 ##2\relax{%
   \expandafter\ifnum\psk@maxdashes>\pst@cntm\relax% 04-08-07
   \edef\@tempa{##1}%
   \ifx\@tempa\@empty\else% gobble leading spaces
   \pssetlength\pst@dimc{##1}%
       \advance\pst@cntm by 1
   \edef\psk@dash{\psk@dash\space\pst@number\pst@dimc}%
   \fi%
   \edef\@tempa{##2}%
   \ifx\@tempa\@empty\else% detect end
   \ifx\@tempa\space\else% gobble trailing spaces
     \next##2\relax%
   \fi\fi%
   \else% 04-08-07
     \@pstrickserr{Number of dashes > \psk@maxdashes. Increasing
`maxdashes' might work.}\@ehpa% 04-08-07
   \fi% 04-08-07
 }%
\expandafter\next#1 \relax}
%% End patch TN; Date (YY-MM-DD): 04-07-17; 1st part
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\psset{dash=5pt 3pt}% black white black white 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Begin patch TN; Date (YY-MM-DD): 04-07-17; 2nd part
\def\psls@dashed{%
  \ifpsdashadjust
    [ \psk@dash ] \pst@linetype\space \tx@DashLine
  \else
    [ \psk@dash ] 0 setdash stroke
  \fi}
%% End patch TN; Date (YY-MM-DD): 04-07-17; 2nd part
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%-----------------------------------------------------------------------------------
\pst@def{DashLine}<{
    dup 0 gt
    { /a .5 def PathLength exch div }
    { pop /a 1 def PathLength } ifelse
    /b ED % pattern should fit evenly in b
    dup /X ED % pattern array
    0 get /y ED % length of first black segment
    /z 0 X {add} forall def % length of the full pattern
    %% Computation of the scaling factor as described by van Zandt:
    b a .5 sub 2 mul y mul sub z Div round
    z mul a .5 sub 2 mul y mul add b exch Div
    %%%% scaling factor on stack.
    /z ED %% now, z is the scaling factor
    false % for the length test below
    X { z mul } forall X astore %% modification TN 04-08-07
    %%% Checking whether at least one dash in X has positive length:
    {0 gt or} forall
    { X 1 a sub y mul }
    { [ 1 0 ] 0 }
    ifelse
    setdash stroke }>
%% TN end patch; Date (YY-MM-DD): 04-07-17;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
\define@key[psset]{}{intSeparator}{\edef\psk@intSeparator{#1}}
\psset{intSeparator={,}}
%
\def\psFormatInt{\@ifnextchar[{\psFormatInt@i}{\psFormatInt@i[]}}
\def\psFormatInt@i[#1]#2{{%
    \def\ps@tempa{#1}
    \ifx\ps@tempa\@empty\else\psset{#1}\fi
    \count1=#2\count2=\count1
    \ifnum\count1=0 0\else
	\ifnum\count1>999999
	    \count3=\count1
	    \divide\count3 by 1000000
	    \the\count3\psk@intSeparator
	    \multiply\count3 by 1000000
	    \advance\count1 by -\count3 % modulo 1000000
	\fi
	\ifnum\count2>999
	    \count3=\count1
	    \divide\count3 by 1000
	    \ifnum\count2>99999
		\ifnum\count3<100 0\fi
		\ifnum\count3<10 0\fi
	    \fi
	    \the\count3\psk@intSeparator
	    \multiply\count3 by 1000
	    \advance\count1 by -\count3 %modulo 1000
	\fi%
	\ifnum\count2>999
	    \ifnum\count1<100 0\fi
	    \ifnum\count1<10 0\fi
	\fi
	\the\count1
    \fi
}}
%
\newdimen\pst@braceWidth
\define@key[psset]{}{braceWidth}{\pssetlength\pst@braceWidth{#1}}
\define@key[psset]{}{bracePos}{\edef\psk@bracePos{#1}}
\psset{braceWidth=10pt,bracePos=0.5}
%
\def\@@rput@iv(#1){\pst@killglue\pst@makebox{\@@rput@v{#1}}}
\def\@@rput@v#1{%
  \begingroup
    \use@par
    \pst@makesmall\pst@hbox
    \pst@Verb{%
      Alpha 90 sub \pst@number\pst@braceWidth  0 lt {180 add} if
      \ifx\psk@rot\@empty\else\psk@rot add \fi
      /rotAngle exch def
    }%
    \setbox\pst@hbox=\hbox{%
      \pst@Verb{rotAngle \tx@RotBegin}%
      \box\pst@hbox\pst@Verb{\tx@RotEnd}%
    }%
    \psput@{#1}\pst@hbox
  \endgroup
  \ignorespaces%
}
%
\def\psbrace{\pst@object{psbrace}}
\def\psbrace@i(#1)(#2)#3{{%
  \psset{linearc=2mm,linewidth=1pt,%
    nodesepA=0pt,nodesepB=0pt,bracePos=0.5}% the default
  \use@par%
  \pst@getcoor{#1}\pst@tempa%
  \pst@getcoor{#2}\pst@tempb%
  \pnode(!%
    /bW2 \pst@number\pst@braceWidth \pst@number\psyunit div 2.0 div def
    \pst@tempa /YA exch \pst@number\psyunit div def
    /XA exch \pst@number\psxunit div def
    \pst@tempb /YB exch \pst@number\psyunit div def
    /XB exch \pst@number\psxunit div def
    /Alpha YB YA sub XB XA sub atan def
    /xMid XB XA sub \psk@bracePos\space mul XA add def
    /yMid YB YA sub \psk@bracePos\space mul YA add def
    /@deltaX Alpha sin bW2 mul def
    /@deltaY Alpha cos bW2 mul def
    /@xTemp xMid @deltaX 2 mul add def
    /@yTemp yMid @deltaY 2 mul sub def
    @xTemp @yTemp){@tempNode}%
  \pst@getcoor{@tempNode}\pst@tempc%
  \@@rput@iv(! %
    \pst@tempc /Yc exch def
    /Xc exch def
    Xc \psk@nodesepA\space add \pst@number\psxunit div
    Yc \psk@nodesepB\space add \pst@number\psxunit div ){#3}
  \psline(#1)%
    (! XA @deltaX add YA @deltaY sub)%
    (! @xTemp @deltaX sub @yTemp @deltaY add)(@tempNode)%
  \psline(@tempNode)%
    (! @xTemp @deltaX sub @yTemp @deltaY add)%
    (! XB @deltaX add YB @deltaY sub)(#2)%
}\ignorespaces}
%
% -------------- the arrow part -------------
%  the original table
% \def\pst@arrowtable{,<->,<<->>,>-<,>>-<<,(-),[-]}
\edef\pst@arrowtable{\pst@arrowtable,)-(,]-[,|>-<|,H-H,h-h}
%
% HookLeft/RightArrow
\newdimen\pshooklength
\newdimen\pshookwidth
\define@key[psset]{}{hooklength}{\pssetlength\pshooklength{#1}}
\define@key[psset]{}{hookwidth}{\pssetlength\pshookwidth{#1}}
\psset{hooklength=3mm,hookwidth=1mm}
%
\edef\pst@arrowtable{\pst@arrowtable,H-H,h-h} % add new arrow
\def\tx@RHook{RHook }         % PostScript name
\def\tx@Rhook{Rhook }         % PostScript name
\@namedef{psas@H}{%
  /RHook {
    /x ED                     % hook width
    /y ED                     % hook length 
    /z CLW 2 div def          % save it
    x y moveto                % goto first point
    x 0 0 0 0 y 
    curveto                   % draw Bezier
    stroke 
    0 y moveto                % define current point
  } def
  \pst@number\pshooklength
  \pst@number\pshookwidth
  \tx@RHook 
}
\@namedef{psas@h}{%
  /Rhook {
    CLW mul 
    add dup 2 div 
    /w ED mul dup /h ED mul 
    /a ED { 0 h T 1 -1 scale } if 
    w neg h moveto 0 0 L 
    gsave 
%    \pst@number\pslinewidth 2 div SLW 
    stroke grestore 
  } def
  false 0 \psk@arrowlength \psk@arrowsize \tx@Rhook 
}
\@namedef{psas@<|}{%
    \psk@tbarsize\space \tx@Tbar
    0 CLW 2 div T
    newpath
    true \psk@arrowinset\space \psk@arrowlength\space \psk@arrowsize\space \tx@Arrow%
}
% ]-[ arrow
\def\tx@BracketOut{BracketOut }
\@namedef{psas@[}{%
  /BracketOut {%
  CLW mul add dup CLW sub 2 div
%/x ED mul CLW add
  /x ED mul neg
  /y ED
  /z CLW 2 div def
  x neg y moveto
  x neg CLW 2 div L x CLW 2 div L x y L stroke 0 CLW moveto } def
  \psk@bracketlength\space \psk@tbarsize\space \tx@BracketOut
}
% )-( arrow
\def\tx@RoundBracketOut{RoundBracketOut }
\@namedef{psas@(}{%
  /RoundBracketOut {%
    CLW mul add dup 2 div
%/x ED mul
    /x ED mul neg
    /y ED
    /mtrx CM def
    0 CLW
    2 div T x y mul 0 ne { x y scale } if
    1 1 moveto
    .85 .5 .35 0 0 0 curveto
    -.35 0 -.85 .5 -1 1 curveto
    mtrx setmatrix stroke 0 CLW moveto } def
  \psk@rbracketlength\space \psk@tbarsize\space \tx@RoundBracketOut
}
%
% Redefininition of \psset@arrowscale to store value of X scale factor
%\define@key[psset]{}{arrowscale}{\pst@getscale{#1}\psk@arrowscale}
%\psset{arrowscale=1}

\define@key[psset]{}{arrowscale}{%
  \pst@@arrowscale@i#1 \@nil
  \pst@getscale{\pst@arrowscale}\psk@arrowscale%
}
\def\pst@@arrowscale@i#1 #2\@nil{\edef\pst@arrowscale{#1}}
\psset{arrowscale=1}

% New parameter "arrowfill", with default as "true"
\newif\ifpsArrowFill
\define@key[psset]{}{ArrowFill}{\@nameuse{psArrowFill#1}}
\psset{ArrowFill=true}

% Modification of the PostScript macro Arrow to choose to fill or not the arrow
% (it require to restore the current linewidth, despite of the scaling)
\pst@def{Arrow}<{%
    CLW mul add dup 2 div
    /w ED mul dup
    /h ED mul
    /a ED { 0 h T 1 -1 scale } if
    gsave
    \ifpsArrowFill\else\pst@number\pslinewidth \pst@arrowscale\space div SLW \fi
    w neg h moveto
    0 0 L w h L w neg a neg rlineto
    \ifpsArrowFill gsave fill grestore \else gsave closepath stroke grestore \fi
    grestore
    0 h a sub moveto
}>
%
\define@key[psset]{}{nArrowsA}{\def\psk@nArrowsA{#1}}
\define@key[psset]{}{nArrowsB}{\def\psk@nArrowsB{#1}}
\define@key[psset]{}{nArrows}{\def\psk@nArrowsA{#1}\def\psk@nArrowsB{#1}}
\psset{nArrows=2}
%
\@namedef{psas@>>}{%
    \psk@nArrowsA\space 1 sub {
      false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow
      0 h a sub T
    } repeat
    gsave
    newpath
    false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow
    CP
    grestore
    moveto
}
%
\@namedef{psas@<<}{%
    true \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow
    0 h neg a add T
  \psk@nArrowsB\space 2 sub {
    false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow
    0 h neg a add T
  } repeat
  false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow
  0 h a 5 mul 2 div sub moveto
}
%
% DG addition begin - Dec. 18/19, 1997 and Oct. 11, 2002
% Adapted from \psset@arrows
\define@key[psset]{}{ArrowInside}{%
  \def\pst@tempa{#1}%
  \ifx\pst@tempa\@empty\def\psk@ArrowInside{}%
  \else%
    \begingroup%
      \pst@activearrows%
      \xdef\pst@tempg{<#1}%
    \endgroup%
    \expandafter\psset@@ArrowInside\pst@tempg\@empty-\@empty\@nil%
    \if@pst\else\@pstrickserr{Bad intermediate arrow specification: #1}\@ehpa\fi%
  \fi%
}
% Adapted from \psset@@arrows
\def\psset@@ArrowInside#1-#2\@empty#3\@nil{%
  \@psttrue
  \def\next##1,#1-##2,##3\@nil{\def\pst@tempg{##2}}%
  \expandafter\next\pst@arrowtable,#1-#1,\@nil
  \@ifundefined{psas@#2}%
    {\@pstfalse\def\psk@ArrowInside{}}%
    {\def\psk@ArrowInside{#2}}%
}
% Default value empty
\psset{ArrowInside={}}
% Modified version of \pst@addarrowdef
\def\pst@addarrowdef{%
    \addto@pscode{%
	/ArrowA {
    	    \ifx\psk@arrowA\@empty
		\pst@oplineto
	    \else
		\pst@arrowdef{A}
		moveto
	    \fi
	} def
	/ArrowB {
	    \ifx\psk@arrowB\@empty \else \pst@arrowdef{B} \fi
	} def
% DG addition
	/ArrowInside {
	    \ifx\psk@ArrowInside\@empty \else \pst@arrowdefA{Inside} \fi
	} def
    }%
}
% Adapted from \pst@arrowdef
\def\pst@arrowdefA#1{%
  \ifnum\pst@repeatarrowsflag>\z@
    /Arrow#1c [ 6 2 roll ] cvx def Arrow#1c
  \fi
  \tx@BeginArrow
  \psk@arrowscale
  \@nameuse{psas@\@nameuse{psk@Arrow#1}}
  \tx@EndArrow%
}
% ArrowInsidePos parameter (default value 0.5)
\define@key[psset]{}{ArrowInsidePos}{\pst@checknum{#1}\psk@ArrowInsidePos}%
\psset{ArrowInsidePos=0.5}
%
% Modified version of \begin@ClosedObj
\def\begin@ClosedObj{%
    \leavevmode
    \pst@killglue
    \begingroup
	\use@par
	\solid@star
	\ifpsdoubleline \pst@setdoublesep \fi
	\pst@addarrowdef% DG addition
	\init@pscode
}
%
% Redefinition of the PostScript /Line macro to print the intermediate
% arrow on each segment of the line
%
\define@key[psset]{}{ArrowInsideNo}{\pst@checknum{#1}\psk@ArrowInsideNo}% hv 20031001
\define@key[psset]{}{ArrowInsideOffset}{\pst@checknum{#1}\psk@ArrowInsideOffset}% hv 20031001
\psset{ArrowInsideNo=1,ArrowInsideOffset=0}
%
\pst@def{Line}<{%
  NArray n 0 eq not { n 1 eq { 0 0 /n 2 def } if
  (\psk@ArrowInside) length 0 gt {
    2 copy /y1 ED /x1 ED ArrowA x1 y1
    /n n 1 sub def
    n {
      4 copy
      /y1 ED /x1 ED /y2 ED /x2 ED
      x1 y1
      \psk@ArrowInsidePos\space 1 gt {
        /Alpha y2 y1 sub x2 x1 sub atan def
        /ArrowPos \psk@ArrowInsideOffset\space def
        /Length x2 x1 sub y2 y1 sub Pyth def
        /dArrowPos \psk@ArrowInsidePos\space abs def
        {
          /ArrowPos ArrowPos dArrowPos add def
          ArrowPos Length gt { exit } if
          x1 Alpha cos ArrowPos mul add
          y1 Alpha sin ArrowPos mul add
          ArrowInside
          pop pop
        } loop
      }{
        /ArrowPos \psk@ArrowInsideOffset\space def
        /dArrowPos \psk@ArrowInsideNo 1 gt {%
          1.0 \psk@ArrowInsideNo 1.0 add div
        }{\psk@ArrowInsidePos } ifelse def
          \psk@ArrowInsideNo\space cvi {
            /ArrowPos ArrowPos dArrowPos add def
            x2 x1 sub ArrowPos mul x1 add
            y2 y1 sub ArrowPos mul y1 add
            ArrowInside
            pop pop
          } repeat
      } ifelse
      pop pop Lineto
    } repeat
  }{ ArrowA /n n 2 sub def n { Lineto } repeat } ifelse
  CP 4 2 roll ArrowB L pop pop } if%
}>
%
% Redefinition of the PostScript /Polygon macro to print the intermediate
% arrow on each segment of the line
\pst@def{Polygon}<{%
    NArray n 2 eq { 0 0 /n 3 def } if
    n 3 lt {
	n { pop pop } repeat
    }{
	n 3 gt { CheckClosed } if
	n 2 mul
	-2 roll
	/y0 ED
	/x0 ED
    	/y1 ED
    	/x1 ED
    	/xx1 x1 def
    	/yy1 y1 def
    	x1 y1
    	/x1 x0 x1 add 2 div def
    	/y1 y0 y1 add 2 div def
    	x1 y1 moveto
    	/n n 2 sub def
	/drawArrows {
	    x11 y11
	    \psk@ArrowInsidePos\space 1 gt {
		/Alpha y12 y11 sub x12 x11 sub atan def
		/ArrowPos \psk@ArrowInsideOffset\space def
		/Length x12 x11 sub y12 y11 sub Pyth def
		/dArrowPos \psk@ArrowInsidePos\space abs def
		{
		    /ArrowPos ArrowPos dArrowPos add def
		    ArrowPos Length gt { exit } if
		    x11 Alpha cos ArrowPos mul add
		    y11 Alpha sin ArrowPos mul add
		    ArrowInside
		    pop pop
		} loop
	    }{
		/ArrowPos \psk@ArrowInsideOffset\space def
		/dArrowPos \psk@ArrowInsideNo 1 gt {%
	    	    1.0 \psk@ArrowInsideNo 1.0 add div
		}{ \psk@ArrowInsidePos } ifelse def
		\psk@ArrowInsideNo cvi {
		    /ArrowPos ArrowPos dArrowPos add def
		    x12 x11 sub ArrowPos mul x11 add
		    y12 y11 sub ArrowPos mul y11 add
        	    ArrowInside
		    pop pop
		} repeat
	    } ifelse
	    pop pop Lineto
	} def
	n {
	    4 copy
	    /y11 ED /x11 ED /y12 ED /x12 ED
	    drawArrows
	} repeat
	x1 y1 x0 y0
	6 4 roll
	2 copy
	/y11 ED /x11 ED /y12 y0 def /x12 x0 def
	drawArrows
	/y11 y0 def /x11 x0 def /y12 yy1 def /x12 xx1 def
	drawArrows
	pop pop
    	closepath
    } ifelse %
}>
%
%
% Redefinition of the PostScript /OpenBezier macro to print the intermediate
% arrow
\pst@def{OpenBezier}<{%
  /dArrowPos \psk@ArrowInsideNo 1 gt {%
    1.0 \psk@ArrowInsideNo 1.0 add div
    }{ \psk@ArrowInsidePos } ifelse def
      BezierNArray
      n 1 eq { pop pop
      }{ 2 copy
        /y0 ED /x0 ED
        ArrowA
        n 4 sub 3 idiv { 6 2 roll 4 2 roll curveto } repeat
        6 2 roll
        4 2 roll
        ArrowB
        /y3 ED /x3 ED /y2 ED /x2 ED /y1 ED /x1 ED
        /cx x1 x0 sub 3 mul def
        /cy y1 y0 sub 3 mul def
        /bx x2 x1 sub 3 mul cx sub def
        /by y2 y1 sub 3 mul cy sub def
        /ax x3 x0 sub cx sub bx sub def
        /ay y3 y0 sub cy sub by sub def
        /getValues {
          ax t0 3 exp mul bx t0 t0 mul mul add cx t0 mul add x0 add
          ay t0 3 exp mul by t0 t0 mul mul add cy t0 mul add y0 add
          ax t 3 exp mul bx t t mul mul add cx t mul add x0 add
          ay t 3 exp mul by t t mul mul add cy t mul add y0 add
        } def
        /getdL {
          getValues
          3 -1 roll sub 3 1 roll sub Pyth
        } def
        /CurveLength {
          /u 0 def
          /du 0.01 def
          0 100 {
            /t0 u def
            /u u du add def
            /t u def
            getdL add
          } repeat } def
          /GetArrowPos {
            /ende \psk@ArrowInsidePos\space 1 gt
              {ArrowPos}
              {ArrowPos CurveLength mul} ifelse def
            /u 0 def
            /du 0.01 def
            /sum 0 def
            { /t0 u def
              /u u du add def
              /t u def
              /sum getdL sum add def
              sum ende gt {exit} if
            } loop u
          } def
          /ArrowPos \psk@ArrowInsideOffset\space def
          /loopNo \psk@ArrowInsidePos\space 1 gt {%
            CurveLength \psk@ArrowInsidePos\space div cvi
          }{ \psk@ArrowInsideNo } ifelse def
            loopNo cvi {
              /ArrowPos ArrowPos dArrowPos add def
              /t GetArrowPos def
              /t0 t 0.95 mul def
              getValues
              ArrowInside pop pop pop pop
            } repeat
            x1 y1 x2 y2 x3 y3 curveto
  } ifelse
}>
%
% Redefinition of the PostScript /NCLine macro to print the intermediate
% arrow of the line
\pst@def{NCLine}<{%
	NCCoor
	tx@Dict begin
	ArrowA CP 4 2 roll ArrowB
	4 copy
	/y2 ED /x2 ED /y1 ED /x1 ED
	x1 y1
	\psk@ArrowInsidePos\space 1 gt {
		/Alpha y2 y1 sub x2 x1 sub atan def
		/ArrowPos \psk@ArrowInsideOffset\space def
		/Length x2 x1 sub y2 y1 sub Pyth def
		/dArrowPos \psk@ArrowInsidePos\space abs def
		{%
			/ArrowPos ArrowPos dArrowPos add def
			ArrowPos Length gt { exit } if
			x1 Alpha cos ArrowPos mul add
			y1 Alpha sin ArrowPos mul add
			ArrowInside
			pop pop
		} loop
	}{%
		/ArrowPos \psk@ArrowInsideOffset\space def
		/dArrowPos \psk@ArrowInsideNo 1 gt {%
			1.0 \psk@ArrowInsideNo 1.0 add div
		}{ \psk@ArrowInsidePos } ifelse def
		\psk@ArrowInsideNo\space cvi {
			/ArrowPos ArrowPos dArrowPos add def
			x2 x1 sub ArrowPos mul x1 add
			y2 y1 sub ArrowPos mul y1 add
			ArrowInside
			pop pop
		} repeat
	} ifelse
	pop pop lineto pop pop
	end%
}>
%
\pst@def{NCCurve}<{%
	GetEdgeA GetEdgeB
	xA1 xB1 sub yA1 yB1 sub
	Pyth 2 div dup 3 -1 roll mul
	/ArmA ED
	mul
	/ArmB ED
	/ArmTypeA 0 def
	/ArmTypeB 0 def
	GetArmA GetArmB
	xA2 yA2 xA1 yA1
	2 copy
	/y0 ED /x0 ED
	tx@Dict begin
		ArrowA
	end
	xB2 yB2 xB1 yB1
	tx@Dict begin
		ArrowB
	end
	/y3 ED /x3 ED /y2 ED /x2 ED /y1 ED /x1 ED
	/cx x1 x0 sub 3 mul def
	/cy y1 y0 sub 3 mul def
	/bx x2 x1 sub 3 mul cx sub def
	/by y2 y1 sub 3 mul cy sub def
	/ax x3 x0 sub cx sub bx sub def
	/ay y3 y0 sub cy sub by sub def
	/getValues {
		ax t0 3 exp mul bx t0 t0 mul mul add cx t0 mul add x0 add
		ay t0 3 exp mul by t0 t0 mul mul add cy t0 mul add y0 add
		ax t 3 exp mul bx t t mul mul add cx t mul add x0 add
	ay t 3 exp mul by t t mul mul add cy t mul add y0 add
	} def
	/getdL {
		getValues
		3 -1 roll sub 3 1 roll sub Pyth
	} def
	/CurveLength {
		/u 0 def
		/du 0.01 def
		0 100 {
			/t0 u def
			/u u du add def
			/t u def
			getdL add
		} repeat } def
	/GetArrowPos {
		/ende \psk@ArrowInsidePos\space 1 gt {ArrowPos}{ArrowPos CurveLength mul} ifelse def
		/u 0 def
		/du 0.01 def
		/sum 0 def
		{
			/t0 u def
			/u u du add def
			/t u def
			/sum getdL sum add def
			sum ende gt {exit} if
		} loop u
	} def
	/dArrowPos \psk@ArrowInsideNo 1 gt {%
		1.0 \psk@ArrowInsideNo 1.0 add div
	}{ \psk@ArrowInsidePos } ifelse def
	/ArrowPos \psk@ArrowInsideOffset\space def
	/loopNo \psk@ArrowInsidePos\space 1 gt {%
		CurveLength \psk@ArrowInsidePos\space div cvi
		}{ \psk@ArrowInsideNo } ifelse def
	loopNo cvi {
		/ArrowPos ArrowPos dArrowPos add def
		/t GetArrowPos def
		/t0 t 0.95 mul def
		getValues
		ArrowInside pop pop pop pop
	} repeat
	x1 y1 x2 y2 x3 y3 curveto
	/LPutVar [ xA1 yA1 xA2 yA2 xB2 yB2 xB1 yB1 ] cvx def
	/LPutPos { t LPutVar BezierMidpoint } def
	/HPutPos { { HPutLines } HPutCurve } def
	/VPutPos { { VPutLines } HPutCurve } def
}>
%
%\def\psDashColorI{black}
%\def\psDashColorII{red}
\define@key[psset]{}{dashColorI}{\pst@getcolor{#1}\psDashColorI}
\define@key[psset]{}{dashColorII}{\pst@getcolor{#1}\psDashColorII}
\define@key[psset]{}{dashNo}{\edef\psk@dashNo{#1}}
%
\define@key[psset]{}{linecap}{\edef\psk@linecap{#1}}
%\psset{dashColorI=black,dashColorII=red,dashNo=0.2,linecap=0}
\psset{dashColorI=black,dashColorII=red,dashNo=0.2,linecap=0}
%
\pst@def{LineII}<{%
	NArray
	/n n 1 sub def
	/y1 ED /x1 ED x1 y1 ArrowA x1 y1 moveto
	\psk@linecap\space 3 gt
		{\psk@linecap\space 0 lt {0 setlinecap} if }
		{\psk@linecap\space setlinecap} ifelse
	n {
		/y2 ED /x2 ED
		/y0 y1 def /x0 x1 def
		/length x2 x1 sub y2 y1 sub Pyth def
		\psk@dashNo\space 1.0 lt
			{/cntMax 1.0 \psk@dashNo\space div .49 add cvi def}
			{/cntMax length \psk@dashNo\space div .49 add cvi def} ifelse
		x2 x1 sub cntMax div /dx ED
		y2 y1 sub cntMax div /dy ED
		/cnt 0 def
		cntMax {
			gsave
			/x1 x1 dx add def
			/y1 y1 dy add def
			x1 y1
			cnt 2 mod 0 eq
				{ \pst@usecolor\psDashColorI }
				{ \pst@usecolor\psDashColorII } ifelse
			lineto stroke
			/cnt cnt 1 add def
			grestore
			x1 y1 moveto
		} repeat
		/y1 y2 def /x1 x2 def
	} repeat
	x0 y0 x2 y2 ArrowB L pop pop
}>
%
\def\pslineII{\pst@object{pslineII}}
\def\pslineII@i{%
    \pst@getarrows{%
        \begin@OpenObj
        \pst@getcoors[\pslineII@ii%
    }%
}
\def\pslineII@ii{%
	\addto@pscode{%
		\pst@cp
		\ifshowpoints true \else false \fi
		\tx@LineII
	}%
	\end@OpenObj%
}
%
\newdimen\pswBegin\newdimen\pswEnd
\define@key[psset]{}{wBegin}{\pssetlength\pswBegin{#1}}
\define@key[psset]{}{wEnd}{\pssetlength\pswEnd{#1}}
\psset{wBegin=\pslinewidth, wEnd=\pslinewidth}
%
\pst@def{LineIII}<{%
	NArray
	/n n 1 sub def
	/YA ED /XA ED
	/bA2 \pst@number\pswBegin\space 2.0 div def
	/bB2 \pst@number\pswEnd\space 2.0 div def
	/xStep bB2 bA2 sub n div def
	0 setlinecap
	n {
		XA YA moveto
		/YB ED /XB ED
		/Alpha YB YA sub XB XA sub atan def
		/Alphasin Alpha sin def
		/Alphacos Alpha cos def
        \pst@usecolor\pslinecolor
		0.01 SLW
		/bB2 bA2 xStep add def
		XA Alphasin bA2 mul sub
		YA Alphacos bA2 mul add lineto
		XB Alphasin bB2 mul sub
		YB Alphacos bB2 mul add lineto
		XB Alphasin bB2 mul add
		YB Alphacos bB2 mul sub lineto
		XA Alphasin bA2 mul add
		YA Alphacos bA2 mul sub lineto
		XA YA lineto fill
		/XA XB def /YA YB def
		/bA2 bB2 def
	} repeat
}>
%
\def\pslineIII{\pst@object{pslineIII}}
\def\pslineIII@i{%
  \pst@getarrows{%
     \begin@OpenObj
       \pst@getcoors[\pslineIII@ii%
  }%
}
\def\pslineIII@ii{%
  \addto@pscode{%
    \pst@cp
    \ifshowpoints true \else false \fi
    \tx@LineIII
  }%
  \end@OpenObj%
}
%
\define@key[psset]{}{randomPoints}{\def\psk@randomPoints{#1}}
\newif\ifPst@randomColor
\define@key[psset]{}{color}[true]{\@nameuse{Pst@randomColor#1}}
\psset{randomPoints=1000,color=false}
%
\def\psRandom{\pst@object{psRandom}}%  hv  2004-11-12
\def\psRandom@i{\@ifnextchar({\psRandom@ii}{\psRandom@iii(0,0)(1,1)}}
\def\psRandom@ii(#1){\@ifnextchar({\psRandom@iii(#1)}{\psRandom@iii(0,0)(#1)}}
\def\psRandom@iii(#1)(#2)#3{%
  \def\pst@tempa{#3}%
  \ifx\pst@tempa\pst@empty\psclip{\psframe(#2)}\else\psclip{#3}\fi
  \pst@getcoor{#1}\pst@tempa 
  \pst@getcoor{#2}\pst@tempb 
  \begin@SpecialObj
  \addto@pscode{
    \pst@tempa\space /yMin exch def 
    /xMin exch def
    \pst@tempb\space /yMax exch def 
    /xMax exch def 
    /dy yMax yMin sub def
    /dx xMax xMin sub def
    rrand srand                 % initializes the random generator
    /getRandReal { rand 2147483647 div } def
    \psk@dotsize % defines /DS ... def
    \@nameuse{psds@\psk@dotstyle}
    \psk@randomPoints {
     \ifPst@randomColor getRandReal getRandReal getRandReal setrgbcolor \fi
     getRandReal dx mul xMin add
     getRandReal dy mul yMin add
     Dot
     \ifx\psk@fillstyle\psfs@solid fill \fi stroke
    } repeat
  }%
  \end@SpecialObj
  \endpsclip
  \ignorespaces
}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%                                                  %%%%%%%%%%
%%%%%%%%%%%                pst-node                          %%%%%%%%%%
%%%%%%%%%%%                                                  %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This fixes a bug in pst-node, where the XY-direction is wrong
% the types are changed 1<->2 between X<->Y
%
\define@key[psset]{}{XnodesepA}{%
    \pst@getlength{#1}\psk@nodesepA
    \def\psk@nodeseptypeA{2 }%
}
\define@key[psset]{}{XnodesepB}{%
    \pst@getlength{#1}\psk@nodesepB
    \def\psk@nodeseptypeB{2 }%
}
\define@key[psset]{}{Xnodesep}{%
    \pst@getlength{#1}\psk@nodesepA
    \let\psk@nodesepB\psk@nodesepA
    \def\psk@nodeseptypeA{2 }%
    \def\psk@nodeseptypeB{2 }%
}
\define@key[psset]{}{YnodesepA}{%
    \pst@getlength{#1}\psk@nodesepA
    \def\psk@nodeseptypeA{1 }%
}
\define@key[psset]{}{YnodesepB}{%
    \pst@getlength{#1}\psk@nodesepB
    \def\psk@nodeseptypeB{1 }%
}
\define@key[psset]{}{Ynodesep}{%
    \pst@getlength{#1}\psk@nodesepA
    \let\psk@nodesepB\psk@nodesepA
    \def\psk@nodeseptypeA{1 }%
    \def\psk@nodeseptypeB{1 }%
}
%
\pst@def{NCLineII}<{
  NCCoor
  /y1 ED /x1 ED x1 y1 ArrowA x1 y1 moveto
  /y2 ED /x2 ED
  /y0 y1 def /x0 x1 def
  /length x2 x1 sub y2 y1 sub Pyth def
  \psk@dashNo\space 1.0 lt
     {/cntMax 1.0 \psk@dashNo\space div .49 add cvi def}
     {/cntMax length \psk@dashNo\space div .49 add cvi def} ifelse
  x2 x1 sub cntMax div /dx ED
  y2 y1 sub cntMax div /dy ED
  /cnt 0 def
  cntMax {
    gsave
    /x1 x1 dx add def
    /y1 y1 dy add def
    x1 y1
    cnt 2 mod 0 eq
      { \pst@usecolor\psDashColorI }
      { \pst@usecolor\psDashColorII } ifelse
    lineto stroke
    /cnt cnt 1 add def
    grestore
    x1 y1 moveto
  } repeat
  x0 y0 x2 y2 ArrowB L pop pop%
}>
%
\def\nclineII{\pst@object{nclineII}}%
\def\nclineII@i{\check@arrow{\nclineII@ii}}%
\def\nclineII@ii#1#2{\nc@object{Open}{#1}{#2}{.5}%
    {\tx@NCLineII /LPutPos { xB yB xA yA \tx@LPutLine } def}%
}%
\def\pclineII{\pst@object{pclineII}}%
\def\pclineII@i{\pc@object\nclineII@ii}%
%
\define@key[psset]{}{lineAngle}{\psset{armB=0.5}\edef\psk@lineAngle{#1}}%
\psset{lineAngle=0}%
%
\pst@def{NCDiag}<{
  GetEdgeA GetEdgeB GetArmA GetArmB mark
  \psk@lineAngle\space abs 0 gt {
    /xTemp xA2 10 add def
    /yTemp yA2 \psk@lineAngle\space dup sin exch cos div 10 mul add def
    /dY1 yTemp yA2 sub def
    /dX1 xTemp xA2 sub def
    /dY2 yB2 yB1 sub def
    /dX2 xB2 xB1 sub def
    dX1 abs 0.01 lt {
      /m2 dY2 dX2 div def
      /xB2 xA2 def
      /yB2 xA2 xB1 sub m2 mul yB1 add def
    }{
      dX2 abs 0.01 lt {
        /m1 dY1 dX1 div def
        /xB2 xB1 def
        /yB2 xB1 xA2 sub m1 mul yA2 add def
      }{%
        /m1 dY1 dX1 div def
        /m2 dY2 dX2 div def
        /xB2 m1 xA2 mul m2 xB1 mul sub yA2 sub yB1 add m1 m2 sub div def
        /yB2 xB2 xA2 sub m1 mul yA2 add def
      } ifelse
    } ifelse
  } if
  ArmB 0 ne { xB1 yB1 } if
  xB2 yB2
  xA2 yA2
  ArmA 0 ne { xA1 yA1 } if
  tx@Dict begin false Line end
  /LPutVar [ xB1 yB1 xB2 yB2 xA2 yA2 xA1 yA1 ] cvx def
  /LPutPos { LPutLines } def
  /HPutPos { HPutLines } def
  /VPutPos { VPutLines } def
}>
% hv 2003-12-22
\pst@def{NCDiagg}<{
  GetEdgeA GetArmA \psk@lineAngle\space abs 0 gt { \psk@lineAngle\space }
    { yB yA2 sub xB xA2 sub Atan 180 add } ifelse /AngleB ED
  GetEdgeB mark
  \psk@lineAngle\space abs 0 gt {
    /dY2 yA2 yA1 sub def
    /dX2 xA2 xA1 sub def
    \psk@lineAngle\space abs 90 eq {
      /m2 dY2 dX2 div def
      /yA2 xB xA2 sub m2 mul yA2 add def
      /xA2 xB def
    }{
      /m1 \psk@lineAngle\space dup sin exch cos div def % tan alpha
      dX2 abs 0.01 lt {
        /yA2 xA1 xB sub m1 mul yB add def
        /xA2 xA1 def
      }{%
        /m2 dY2 dX2 div def
        /xA2 m1 xB mul m2 xA2 mul sub yA2 add yB sub m1 m2 sub div def
        /yA2 xA2 xB sub m1 mul yB add def
      } ifelse
    } ifelse
  } if
  xB1 yB1 xA2 yA2
  ArmA 0 ne { xA1 yA1 } if
  tx@Dict begin false Line end
  /LPutVar [ xB1 yB1 xA2 yA2 xA1 yA1 ] cvx def
  /LPutPos { LPutLines } def
  /HPutPos { HPutLines } def
  /VPutPos { VPutLines } def
}>
%
\def\ncbarr{\pst@object{ncbarr}}
\def\ncbarr@i#1#2{
  \begingroup
  \use@par%
  \setLNode(#1)(#2){0.5}{barr@tempNode}%
  \pst@dimm=\psk@angleA pt
  \pst@dimn=180pt
  % be sure, that angleA is 0 or 180. if not, we set it to 0
  \ifdim\pst@dimm=\z@\else\ifdim\pst@dimm=\pst@dimn\else\psset{angleA=0}\fi\fi
  \ncbar[arrows=-]{#1}{barr@tempNode}
  \ifdim\psk@angleA pt=\z@\relax
    \ncbar[angleA=180,angleB=180]{barr@tempNode}{#2}
  \else\ncbar[angleA=0,angleB=0]{barr@tempNode}{#2}\fi%
  \endgroup
}
%   #1-------#4----------------#2
% where #1#4= #3 * #1#2
%
\def\setLNode(#1)(#2)#3#4{%
  \pst@getcoor{#1}\pst@tempa%
  \pst@getcoor{#2}\pst@tempb%
  \pnode(!%
    \pst@tempa /YA exch \pst@number\psyunit div def
    /XA exch \pst@number\psxunit div def
    \pst@tempb /YB exch \pst@number\psyunit div def
    /XB exch \pst@number\psxunit div def
    /dx XB XA sub def
    /dy YB YA sub def
    XA dx #3\space mul add YA dy #3\space mul add){#4}
}
%
% build the linear combination #2*#1+#4*#3=#5
\def\setLCNode(#1)#2(#3)#4#5{%
  \pst@getcoor{#1}\pst@tempa%
  \pst@getcoor{#3}\pst@tempb%
  \pnode(!%
    \pst@tempa /YA exch \pst@number\psyunit div def
    /XA exch \pst@number\psxunit div def
    \pst@tempb /YB exch \pst@number\psyunit div def
    /XB exch \pst@number\psxunit div def
    XA #2\space mul XB #4\space mul add
    YA #2\space mul YB #4\space mul add){#5}
}
%
\newif\ifPst@trueAngle
\define@key[psset]{}{trueAngle}[true]{\@nameuse{Pst@trueAngle#1}}
\psset{trueAngle=false}
%
\def\psRelLine{\pst@object{psRelLine}}
\def\psRelLine@i{\@ifnextchar({\psRelLine@iii}{\psRelLine@ii}}
\def\psRelLine@ii#1{%
  \addto@par{arrows=#1}%
  \psRelLine@iii%
}
\def\psRelLine@iii(#1)(#2)#3#4{{
  \pst@killglue
  \use@par
  \pst@getcoor{#1}\pst@tempa
  \pst@getcoor{#2}\pst@tempb
  \pnode(!
    \pst@tempa /YA exch \pst@number\psyunit div def
    /XA exch \pst@number\psxunit div def
    \pst@tempb /YB exch \pst@number\psyunit div def
    /XB exch \pst@number\psxunit div def
    /AlphaStrich \psk@angleA\space def
    /unit \pst@number\psyunit \pst@number\psxunit div def % yunit/xunit
%            
    /dx XB XA sub  def
    /dy YB YA sub \ifPst@trueAngle\space unit mul \fi\space def
    /laenge dy dup mul dx dup mul add sqrt #3 mul def
    /Alpha dy dx atan def 
    /beta Alpha AlphaStrich add def
    laenge beta cos mul XA add
    laenge beta sin mul \ifPst@trueAngle\space unit div \fi\space YA add ){#4}%
  \psline(#1)(#4)%
}\ignorespaces}
%
% #1 options
% draw a parallel line to #2 #3
%     #2---------#3
%         #4----------#5(new node)
% #5 length of the line
% #6 node name
\def\psParallelLine{\pst@object{psParallelLine}}
\def\psParallelLine@i{\@ifnextchar({\psParallelLine@iii}{\psParallelLine@ii}}
\def\psParallelLine@ii#1{%
  \addto@par{arrows=#1}%
  \psParallelLine@iii%
}
\def\psParallelLine@iii(#1)(#2)(#3)#4#5{{
  \pst@killglue
  \use@par
  \pst@getcoor{#1}\pst@tempa
  \pst@getcoor{#2}\pst@tempb
  \pst@getcoor{#3}\pst@tempc
%  \pst@getlength{#4}\pst@dima
  \pnode(!%
     \pst@tempa /YA exch \pst@number\psyunit div def
     /XA exch \pst@number\psxunit div def
     \pst@tempb /YB exch \pst@number\psyunit div def
     /XB exch \pst@number\psxunit div def
     \pst@tempc /YC exch \pst@number\psyunit div def
     /XC exch \pst@number\psxunit div def
%            
    /dx XB XA sub  def
    /dy YB YA sub  def
    /laenge dy dup mul dx dup mul add sqrt #4 mul def
    /Alpha dy dx atan def 
    laenge Alpha cos mul XC add
    laenge Alpha sin mul YC add ){#5}%
  \psline(#3)(#5)
}\ignorespaces}
%
\def\psIntersectionPoint(#1)(#2)(#3)(#4)#5{%
    \pst@getcoor{#1}\pst@tempa
    \pst@getcoor{#2}\pst@tempb
    \pst@getcoor{#3}\pst@tempc
    \pst@getcoor{#4}\pst@tempd
\pnode(!%
     \pst@tempa /YA exch \pst@number\psyunit div def
     /XA exch \pst@number\psxunit div def
     \pst@tempb /YB exch \pst@number\psyunit div def
     /XB exch \pst@number\psxunit div def
     \pst@tempc /YC exch \pst@number\psyunit div def
     /XC exch \pst@number\psxunit div def
     \pst@tempd /YD exch \pst@number\psyunit div def
     /XD exch \pst@number\psxunit div def
    /dY1 YB YA sub def
    /dX1 XB XA sub def
    /dY2 YD YC sub def
    /dX2 XD XC sub def
    dX1 abs 0.01 lt {
        /m2 dY2 dX2 div def
        XA dup XC sub m2 mul YC add
    }{
        dX2 abs 0.01 lt {
            /m1 dY1 dX1 div def
            XC dup XA sub m1 mul YA add
        }{%
            /m1 dY1 dX1 div def
            /m2 dY2 dX2 div def
            m1 XA mul m2 XC mul sub YA sub YC add m1 m2 sub div dup
            XA sub m1 mul YA add
        } ifelse
    } ifelse ){#5}%
}
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%                                                  %%%%%%%%%%
%%%%%%%%%%%                pst-plot                          %%%%%%%%%%
%%%%%%%%%%%                                                  %%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\newif\ifPst@plot@comma
\define@key[psset]{}{comma}[true]{\@nameuse{Pst@plot@comma#1}}
%
\newif\ifPst@plot@xAxis
\newif\ifPst@plot@yAxis
\newif\ifPst@plot@xyAxes
\define@key[psset]{}{xAxis}[true]{\@nameuse{Pst@plot@xAxis#1}}
\define@key[psset]{}{yAxis}[true]{\@nameuse{Pst@plot@yAxis#1}}
\define@key[psset]{}{xyAxes}[true]{\psset{xAxis=#1,yAxis=#1}}%
\psset{xyAxes=true}
%
\define@key[psset]{}{xyDecimals}{\def\psk@xDecimals{#1}\def\psk@yDecimals{#1}}
\define@key[psset]{}{xDecimals}{\def\psk@xDecimals{#1}}
\define@key[psset]{}{yDecimals}{\def\psk@yDecimals{#1}}
\psset{xyDecimals={}}%
%
\define@key[psset]{}{xyLabel}{\def\psk@xLabel{#1}\def\psk@yLabel{#1}}
\define@key[psset]{}{xLabel}{\def\psk@xLabel{#1}}
\define@key[psset]{}{yLabel}{\def\psk@yLabel{#1}}
\psset{xyLabel={}}
%
\define@key[psset]{}{xlogBase}{\edef\psk@xlogBase{#1}}
\define@key[psset]{}{ylogBase}{\edef\psk@ylogBase{#1}}
\define@key[psset]{}{xylogBase}{\edef\psk@xlogBase{#1}\edef\psk@ylogBase{#1}}%
\psset{xylogBase={}}
%
%logLines=all|x|y|none  (0,1,2,3)
\define@key[psset]{}{logLines}{\pst@expandafter\psset@@logLines{#1}\@nil\psk@logLines}
\def\psset@@logLines#1#2\@nil#3{%
  \ifx#1a\let#3\z@\else
    \ifx#1x\let#3\@ne\else
      \ifx#1y\let#3\tw@\else
        \ifx#1n\let#3\thr@@\else
          \@pstrickserr{Bad argument: `#1#2'}\@ehpa
  \fi\fi\fi\fi}
\psset{logLines=none}
%
% Define "ticklines" parameter (ticklines=all|x|y|none with default=none)
%\def\psset@ticklines#1{\pst@expandafter\psset@@ticklines{#1}\@nil\psk@ticklines}
%\psset@ticklines{none}
\define@key[psset]{}{ylabelFactor}{\edef\psk@ylabelFactor{#1}}
\define@key[psset]{}{xlabelFactor}{\edef\psk@xlabelFactor{#1}}
\psset{xlabelFactor=\relax,ylabelFactor=\relax}
% The parameter styles for the tick lines
% (default=arrows=-,linestyle=dotted,dotsep=5pt)
%\newpsstyle{ticklinesXStyle}{arrows=-,linestyle=dotted,dotsep=5pt}
%\newpsstyle{ticklinesYStyle}{arrows=-,linestyle=dotted,dotsep=5pt}
%
%
%% #1 integer
%% #2 decimals
%% #3 dot
\def\@stripDecimals#1.#2.#3\@nil{%
  \def\dummy{#1}%
  \ifx\dummy\@empty\the\@zero\else#1\fi% the integer part
}
%
\def\pst@@@hlabel#1{%
  \edef\@xyDecimals{\psk@xDecimals}%
  \psk@xLabel%
  \ifnum\psk@ticks<\tw@ % ticks=all|x
    \ifx\psk@xlogBase\@empty
      \ifPst@plot@comma\pshlabel{\expandafter\@LabelComma#1..\@nil\psk@xlabelFactor}%
      \else\pshlabel{#1}%
      \fi%
    \else%
      {\psk@xLabel\pshlabel{\psk@xlogBase\textsuperscript{\expandafter\@stripDecimals#1..\@nil }}}
    \fi%
  \fi%
}
\def\pst@@@vlabel#1{%
  \edef\@xyDecimals{\psk@yDecimals}%
  \psk@yLabel%
  \ifodd\psk@ticks  % ticks=all||y (0,2)
  \else
    \ifx\psk@ylogBase\@empty
      \ifPst@plot@comma\psvlabel{\expandafter\@LabelComma#1..\@nil\psk@ylabelFactor}%
      \else\psvlabel{#1}%
      \fi%
    \else%
      {\psk@yLabel\psvlabel{\psk@ylogBase\textsuperscript{\expandafter\@stripDecimals#1..\@nil }}}
    \fi%
  \fi%
}
\newcount\@digitcounter\@digitcounter=0\relax
\def\@inc@digitcounter{\global\advance\@digitcounter by 1\relax}
\def\@get@digitcounter{\the\@digitcounter\relax}
\def\@Reset@digitcounter{\global\@digitcounter=0\relax}
\def\@zeroFill{%
  \ifnum \@xyDecimals>\@get@digitcounter
    \bgroup
      0\@inc@digitcounter\@zeroFill
    \egroup%
  \fi%
}
% #1 the value, maybe empty
%
\def\@process@digits#1#2;{%
	\ifx *#1\@zeroFill\else#1\@inc@digitcounter\@process@digits#2;\fi%
}
\def\@writeDecimals#1{%
  \ifx\@xyDecimals\@empty% take value as is
    \def\@tempa{#1}% write only if not empty
    \ifx\@tempa\@empty% write nothing
    \else
      \ifPst@plot@comma,\else.\fi%
      #1%
    \fi%
  \else% write only \xy@decimals
    \ifnum\@xyDecimals>\@zero
      \ifPst@plot@comma,\else.\fi
        \@Reset@digitcounter
        \@process@digits#1*;
      \fi%
  \fi%
}
%% #1 integer
%% #2 decimals
%% #3 dot
\def\@LabelComma#1.#2.#3\@nil{%
  \def\dummy{#1}%
  \ifx\dummy\@empty\the\@zero\else#1\fi% the integer part
  \def\dummy{#2}%
  \ifx\dummy\@empty\@writeDecimals{}\else\@writeDecimals{#2}\fi%
}
%
\def\psxs@none{%
  \let\psk@arrowA\@empty%
  \let\psk@arrowB\@empty%
  \psxs@axes%
}
%
\def\psxs@axes{{%
  \ifPst@plot@xAxis\psxs@@axes\pst@dima\pst@dimb\pst@dimc\pst@dimd{}\fi
  \ifPst@plot@yAxis\psxs@@axes\pst@dima\pst@dimb\pst@dimc\pst@dimd{exch}\fi
}}
\def\psaxes{\pst@object{psaxes}}
\def\psaxes@i{\pst@getarrows\psaxes@ii}
\def\psaxes@ii(#1){\@ifnextchar({\psaxes@iii(#1)}{\psaxes@iv(0,0)(0,0)(#1)}}
\def\psaxes@iii(#1)(#2){\@ifnextchar({\psaxes@iv(#1)(#2)}{\psaxes@iv(#1)(#1)(#2)}}
%
\def\psaxes@iv(#1,#2)(#3,#4)(#5,#6){%
  \pst@killglue
  \begingroup
  \setbox\pst@hbox=\hbox\bgroup%
  \use@par%
  \pssetxlength\pst@dimg{#1}% o-x
  \pssetylength\pst@dimh{#2}% o-y
  \pssetxlength\pst@dima{#3}% bl-x
  \pssetylength\pst@dimb{#4}% bl-y
  \pssetxlength\pst@dimc{#5}% ur-x
  \pssetylength\pst@dimd{#6}% ur-y
    % If minimum values are negative in log mode, we modify Ox
    % (respectively Oy) if this was not done by the user
    % X axis labels (\psk@log = 0 or 1)
  \ifx\psk@xlogBase\@empty\else%
    \ifx\psk@Ox\@empty\else% we do nothing ... hv
      \ifdim\psk@Ox pt=\z@
        \ifdim#3pt<\z@
          \pssetxlength\pst@dimg{#3}% o-x
          \psset@Ox{#3}%
	\fi
      \fi%
    \fi%
  \fi%
% Y axis labels (\psk@log = 0 or 2)
  \ifx\psk@ylogBase\@empty\else%
    \ifx\psk@Ox\@empty\else
      \ifdim#4pt<\z@
        \ifdim\psk@Oy pt=\z@
          \pssetylength\pst@dimh{#4}% o-y
          \psset@Oy{#4}%
	\fi
      \fi
    \fi
  \fi
% Whole thing will be translated to origin:
  \advance\pst@dima-\pst@dimg % Dist. from bl-x to o-x
  \advance\pst@dimb-\pst@dimh % Dist. from bl-y to o-y
  \advance\pst@dimc-\pst@dimg % Dist. from ur-x to o-x
  \advance\pst@dimd-\pst@dimh % Dist. from ur-y to o-y
% Make lines/arrows or frame:
  \@nameuse{psxs@\psk@axesstyle}%  \psxs@axes or \psxs@frame
  \ifPst@plot@yAxis
  \begingroup
    \ifdim\pst@dima=\z@\else\showoriginfalse\fi
    \ifnum\psk@dy=\z@
      \pst@dimg=\psk@Dy\psyunit
      \edef\psk@dy{\number\pst@dimg}%
    \fi%
    \ifPst@plot@xAxis\else\showorigintrue\fi%
    \pst@vlabels{\pst@dimd}{\psk@arrowB}{#3}{#5}%
    \ifPst@plot@xAxis\showoriginfalse\fi%
    \pst@vlabels{\pst@dimb}{\psk@arrowA}{#3}{#5}%
  \endgroup%
  \fi
  \ifPst@plot@xAxis  
  \begingroup%
    \ifdim\pst@dimb=\z@\else\showoriginfalse\fi%
    \ifnum\psk@dx=\z@%
      \pst@dimg=\psk@Dx\psxunit%
      \edef\psk@dx{\number\pst@dimg}%
    \fi%
    \ifPst@plot@yAxis\else\showorigintrue\fi%
    \pst@hlabels{\pst@dimc}{\psk@arrowB}{#4}{#6}%
    \ifPst@plot@yAxis\showoriginfalse\fi%
    \pst@hlabels{\pst@dima}{\psk@arrowA}{#4}{#6}%
  \endgroup%
  \fi
% Now close "\pst@hbox" (which is 0-dimensional), and put it at the origin.
  \egroup%
  \pssetxlength\pst@dimg{#1}%
  \pssetylength\pst@dimh{#2}%
  \leavevmode\psput@cartesian\pst@hbox%
  \ignorespaces%
  \endgroup
}
%
\newdimen\psk@subticksize\psk@subticksize=\z@
\newdimen\pst@xticksizeA
\newdimen\pst@xticksizeB
\newdimen\pst@xticksizeC
\newdimen\pst@yticksizeA
\newdimen\pst@yticksizeB
\newdimen\pst@yticksizeC
%
\define@key[psset]{}{ticksize}{\psset{xticksize=#1,yticksize=#1}}
\define@key[psset]{}{xticksize}{%
  \pst@expandafter\pst@getydimdim{#1} {\pst@missing} {} {}\@nil%
  \pst@xticksizeA=\the\pst@dimm%
  \pst@xticksizeB=\the\pst@dimn%
  \edef\psk@xticksize{\pst@number\pst@xticksizeA\space \pst@number\pst@xticksizeB}%
  \ifdim\pst@xticksizeA=0pt\pst@xticksizeC=\z@\else
    \pst@absdim{\pst@xticksizeA}\pst@dimm%
    \pst@absdim{\pst@xticksizeB}\pst@dimn%
    \pst@maxdim{\pst@dimm}{\pst@dimn}\pst@dimo%
    \pst@xticksizeC=\pst@dimo%
  \fi%
}
\define@key[psset]{}{yticksize}{%  overwrites the definition in pstricks
  \pst@expandafter\pst@getxdimdim{#1} {\pst@missing} {} {}\@nil%
  \pst@yticksizeA=\the\pst@dimm%
  \pst@yticksizeB=\the\pst@dimn%
  \edef\psk@yticksize{\pst@number\pst@yticksizeA \pst@number\pst@yticksizeB}%
  \ifdim\pst@yticksizeA=0pt\pst@yticksizeC=\z@\else
    \pst@absdim{\pst@yticksizeA}\pst@dimm%
    \pst@absdim{\pst@yticksizeB}\pst@dimn%
    \pst@maxdim{\pst@dimm}{\pst@dimn}\pst@dimo%
    \pst@yticksizeC=\pst@dimo%
  \fi%
}
\psset{xticksize=-4pt 4pt,yticksize=-4pt 4pt}
%
% full= 0, top=1, bottom=-1
\define@key[psset]{}{tickstyle}{%
  \pst@expandafter\psset@@tickstyle{#1}\@nil%
  \ifnum\psk@tickstyle>\z@%
    \psset{xticksize=0 \pst@xticksizeB}%
    \psset{yticksize=0 \pst@yticksizeB}%
  \else\ifnum\psk@tickstyle<\z@%
%    \expandafter\psset@xticksize\expandafter{\pst@xticksizeA\space 0}%
%    \expandafter\psset@yticksize\expandafter{\pst@yticksizeA\space 0}%
    \psset{xticksize=\pst@xticksizeA\space 0pt}%
    \psset{yticksize=\pst@yticksizeA\space 0pt}%
  \fi\fi%
}
\psset{tickstyle=full}
%
%
\define@key[psset]{}{subticks}{\edef\psk@xsubticks{#1}\edef\psk@ysubticks{#1}}
\define@key[psset]{}{xsubticks}{\edef\psk@xsubticks{#1}}
\define@key[psset]{}{ysubticks}{\edef\psk@ysubticks{#1}}
%
\define@key[psset]{}{subticksize}{\edef\psk@xsubticksize{#1}\edef\psk@ysubticksize{#1}}
\define@key[psset]{}{xsubticksize}{\edef\psk@xsubticksize{#1}}
\define@key[psset]{}{ysubticksize}{\edef\psk@ysubticksize{#1}}
%
\define@key[psset]{}{tickwidth}{%
  \pst@getlength{#1}\psk@xtickwidth
  \pst@getlength{#1}\psk@ytickwidth}
\define@key[psset]{}{xtickwidth}{\pst@getlength{#1}\psk@xtickwidth}
\define@key[psset]{}{ytickwidth}{\pst@getlength{#1}\psk@ytickwidth}
\define@key[psset]{}{subtickwidth}{%
  \pst@getlength{#1}\psk@xsubtickwidth
  \pst@getlength{#1}\psk@ysubtickwidth}
\define@key[psset]{}{xsubtickwidth}{\pst@getlength{#1}\psk@xsubtickwidth}
\define@key[psset]{}{ysubtickwidth}{\pst@getlength{#1}\psk@ysubtickwidth}
%
\define@key[psset]{}{tickcolor}{\edef\psk@xtickcolor{#1}\edef\psk@ytickcolor{#1}}
\define@key[psset]{}{xtickcolor}{\edef\psk@xtickcolor{#1}}
\define@key[psset]{}{ytickcolor}{\edef\psk@ytickcolor{#1}}
\define@key[psset]{}{subtickcolor}{\edef\psk@xsubtickcolor{#1}\edef\psk@ysubtickcolor{#1}}
\define@key[psset]{}{xsubtickcolor}{\edef\psk@xsubtickcolor{#1}}
\define@key[psset]{}{ysubtickcolor}{\edef\psk@ysubtickcolor{#1}}
%
\define@key[psset]{}{xticklinestyle}{%
  \@ifundefined{psls@#1}%
    {\@pstrickserr{Line style `#1' not defined}\@eha}%
    {\edef\psxticklinestyle{#1}}%
}
\define@key[psset]{}{xsubticklinestyle}{%
  \@ifundefined{psls@#1}%
    {\@pstrickserr{Line style `#1' not defined}\@eha}%
    {\edef\psxsubticklinestyle{#1}}%
}
\define@key[psset]{}{yticklinestyle}{%
  \@ifundefined{psls@#1}%
    {\@pstrickserr{Line style `#1' not defined}\@eha}%
    {\edef\psyticklinestyle{#1}}%
}
\define@key[psset]{}{ysubticklinestyle}{%
  \@ifundefined{psls@#1}%
    {\@pstrickserr{Line style `#1' not defined}\@eha}%
    {\edef\psysubticklinestyle{#1}}%
}
\define@key[psset]{}{ticklinestyle}{\psset{xticklinestyle=#1,yticklinestyle=#1}}
\define@key[psset]{}{subticklinestyle}{\psset{xsubticklinestyle=#1,ysubticklinestyle=#1}}
\psset{subticksize=0.75,subticks=1,tickcolor=black,ticklinestyle=solid,%
  subticklinestyle=solid,%
  subtickcolor=gray,%
  tickwidth=0.5\pslinewidth,%
  subtickwidth=0.25\pslinewidth}
%
\newif\ifis@yAxis%
%
\def\psxs@@axes#1#2#3#4#5{% llx,lly,urx,ury,exch,arrowA,arrowB
  \begin@SpecialObj%
    \def\pst@tempa{#5}%
    \ifx\pst@tempa\@empty\relax
      \is@yAxisfalse
      \ifnum\psk@dx=\z@
        \pst@dimg=\psk@Dx\psxunit
        \edef\psk@dx{\number\pst@dimg}%
      \fi
    \else
      \is@yAxistrue
      \ifnum\psk@dy=\z@
        \pst@dimg=\psk@Dy\psyunit       
        \edef\psk@dy{\number\pst@dimg}%
      \fi
    \fi% 
    \let\pst@linetype\pst@arrowtype%
    \def\pst@tempa{none}%
    \pst@addarrowdef%
    \addto@pscode{%
      \ifis@yAxis 0 \pst@number#4 \else \pst@number#3 0 \fi
      \ifis@yAxis 0 \pst@number#2 \else \pst@number#1 0 \fi
      ArrowA
      CP 4 2 roll
      ArrowB 
      /yEnd exch def /xEnd exch def
      xEnd yEnd 
      \ifx\psk@axesstyle\pst@tempa
        pop pop % axesstyle = none (only ticks)
      \else
        L                                  % the line with arrows 
      \fi
      /yStart exch def
      /xStart exch def
      \@nameuse{psls@\pslinestyle}                 % linestyle for the axes
      stroke                                       % draw the main line
%     \psk@ticks: all=0; x=1; y=2; none=3
      \number\psk@ticks\space dup 2 mod 0 eq \ifis@yAxis true \else false \fi and 
      exch 2 lt \ifis@yAxis false \else true \fi and or {
      /viceversa 
        \ifis@yAxis\pst@number#2 \pst@number#4 \else\pst@number#1 \pst@number#3 \fi
         gt { true }{ false } ifelse def           % other way round
      /epsilon 0.01 def                            % rounding errors
      /minTickline \ifis@yAxis \pst@number#1 \else \pst@number#2 \fi def
      /maxTickline \ifis@yAxis \pst@number#3 \else \pst@number#4 \fi def
      /dT \ifis@yAxis\psk@dy\else\psk@dx\fi\space 65536 div viceversa {neg} if def 
      /subTNo \ifis@yAxis\psk@ysubticks\else\psk@xsubticks\fi \space def
      subTNo 0 gt { /dsubT dT subTNo div def}{ /dsubT 0 def } ifelse  % deltaSubTick
      \ifis@yAxis \psk@yticksize \else \psk@xticksize \fi
      /tickend exch def /tickstart exch def
      /Twidth \ifis@yAxis \psk@ytickwidth \else \psk@xtickwidth \fi\space def
      /subTwidth \ifis@yAxis \psk@ysubtickwidth \else \psk@xsubtickwidth \fi\space def
      /STsize \ifis@yAxis \psk@ysubticksize \else \psk@xsubticksize \fi\space def
      /TColor {
        \ifis@yAxis\pst@usecolor\psk@ytickcolor
        \else\pst@usecolor\psk@xtickcolor\fi\space } def
      /subTColor {
        \ifis@yAxis\pst@usecolor\psk@ysubtickcolor
        \else\pst@usecolor\psk@xsubtickcolor\fi\space } def
      /MinValue { \ifis@yAxis yStart \else xStart \fi
        \ifx\psk@arrowA\@empty\else 
          \psk@arrowsize\space CLW mul add \psk@arrowlength\space mul 
           viceversa { sub epsilon add } { add epsilon sub } ifelse \fi } def
      /MaxValue { \ifis@yAxis yEnd \else xEnd \fi
        \ifx\psk@arrowB\@empty\else
          \psk@arrowsize\space CLW mul add \psk@arrowlength\space mul 
           viceversa { add epsilon sub } { sub epsilon add } ifelse \fi } def
      /logLines {
        \ifnum\psk@logLines=\z@ true \else         % all axes
          \ifnum\psk@logLines<\tw@                 % x axis
            \ifis@yAxis false \else true \fi       % do we have x or y axis
          \else
            \ifnum\psk@logLines<\thr@@             % y axis
              \ifis@yAxis true \else false \fi     % do we have x or y axis
            \else 
              false                                % no one
            \fi
          \fi
        \fi
      } def
      /LSstroke {                                  % set linestyle and stroke
        \ifis@yAxis\@nameuse{psls@\psyticklinestyle}
        \else\@nameuse{psls@\psxticklinestyle}\fi } def
      /subLSstroke {                               % set sublinestyle and stroke
        \ifis@yAxis\@nameuse{psls@\psysubticklinestyle}
        \else\@nameuse{psls@\psxsubticklinestyle}\fi } def
%\iffalse
% start ticks ---------------------------------------------------------
      0 dT MaxValue {                              % the positive part of the axes
        /cntTick exch def                          % the index
        logLines {                                 % log lines?
          gsave
          1 10 subTNo div 9.99 {                   % do not write a line for 1
            /dx exch def                           % save index
            /x cntTick dT dx log mul add def       %
            x abs MaxValue abs le {                % out of range?
              x minTickline #5\space moveto
              x maxTickline #5\space lineto
            } if
          } for
          subTwidth SLW subTColor                  % set line width and subtick color
          subLSstroke
          grestore                                 % restore main tick status
          stroke
          /dsubT 0 def                             % no other subticks
        } if
        dsubT abs 0 gt {                           % du we have subticks?
          gsave                                    % save graphic state
% start subticks ----------------------------------------------------------
            /cntsubTick cntTick dsubT add def
            subTNo 1 sub {
            cntsubTick abs MaxValue abs le {       % out of range?
              cntsubTick tickstart STsize mul #5\space moveto
              cntsubTick tickend STsize mul #5\space lineto
            }{ exit }  ifelse
            /cntsubTick cntsubTick dsubT add def
          } repeat 
          subTwidth SLW subTColor                  % set line width and subtick color
          subLSstroke
% end subticks ----------------------------------------------------------
          grestore                                 % restore tick status
        } if
        gsave
        cntTick tickstart #5\space moveto          % line begin main Tick
        cntTick tickend #5\space lineto            % lineto tick end
        Twidth SLW TColor                          % set line width and tick color
        LSstroke
        grestore
      } for
% end ticks ----------------------------------------------------------
%\fi
%\iffalse
% ================================================ % the other side 
      /dT dT neg def                               % the other side of the axis
      /dsubT dsubT neg def
% start ticks ----------------------------------------------------------
      0 dT MinValue epsilon viceversa { add }{ sub } ifelse {
        /cntTick exch def
        logLines {                                 % log lines?
          gsave
          1 10 subTNo div 9.99 {                   % do not write a line for 1
            /dx exch def                           % save index
            /x cntTick dT dx log mul add def       %
            x abs MinValue abs le {                % out of range?
              x minTickline #5\space moveto
              x maxTickline #5\space lineto
            } if
          } for
          /dsubT 0 def 
          subTwidth SLW subTColor                  % set line width and subtick color
          subLSstroke
          grestore
        }
        dsubT abs 0 gt {                           % do we have subticks?
          gsave                                    % save main state
% start subticks ----------------------------------------------------------
          /cntsubTick cntTick dsubT add def
          subTNo 1 sub {
            cntsubTick abs MinValue abs le {       % out of range?
              cntsubTick tickstart STsize mul #5\space moveto
              cntsubTick tickend STsize mul #5\space lineto
            }{ exit } ifelse
            /cntsubTick cntsubTick dsubT add def
          } repeat % for
% end subticks ----------------------------------------------------------
          subTwidth SLW subTColor                  % set line width and subtick color
          subLSstroke
          grestore                                 % restore main state
        } if
        gsave
        cntTick tickstart #5\space moveto         % line begin main Tick
        cntTick tickend #5\space lineto           % lineto tick end
        Twidth SLW TColor                         % set line width and tick color
        LSstroke
        grestore
      } for
% end ticks ----------------------------------------------------------
%\fi    
    } if 
   }%  
  \end@SpecialObj%
}
\def\psxs@frame{%
  \begin@SpecialObj%
    \addto@pscode{%
      0 0 moveto \pst@number\pst@dimc 0 L
      0 \pst@number\pst@dimd 2 copy rlineto L closepath}%
    \pst@stroke%
    \psk@fillstyle%
  \end@SpecialObj%
  \let\psk@arrowA\@empty%
  \let\psk@arrowB\@empty%
%  \pst@dima=0pt\pst@dimb=0pt%
%  \psset{xticksize=0 \pst@dimd,yticksize=0 \pst@dimc}%
  \pst@xticksizeC=\z@\pst@yticksizeC=\z@%
  \psxs@@axes\pst@dima\pst@dimb\pst@dimc\pst@dimd{}%
  \psxs@@axes\pst@dima\pst@dimb\pst@dimc\pst@dimd{exch}%
}
%
% #1:Max/Min in pt from origin; #2:arrow; #3:min; #4:max
\def\pst@hlabels#1#2#3#4{%
  \ifdim#1=\z@\else%                   % start from 0 ?
    \ifx#2\empty\else\advance#1\ifdim#1>\z@-\fi7\pslinewidth\fi%
    \pst@cnta=#1\relax%                % Distance (in sp) to end.
    \divide\pst@cnta\psk@dx\relax%     % Number of ticks/labels
    \ifnum\pst@cnta=\z@\else%
      \pst@dimb=\psk@dx sp%            % Space between ticks.
%        \ifPst@plot@yAxis\else\showorigintrue\fi%
        \ifnum\psk@labels<\tw@ \ifPst@plot@xAxis\pst@@hlabels\fi\fi%
        \showoriginfalse%
    \fi%
  \fi%
}
% Knows \pst@dimb and \pst@cnta
\def\pst@@hlabels{%
  \pst@dimm=\pst@xticksizeC\advance\pst@dimm by \pslabelsep%
  \vbox to\z@{%
    \ifdim\pst@dimd>\z@\vskip\pst@dimm\else\vss\fi%
    \ifnum\pst@cnta<\z@\pst@dimb=-\pst@dimb\fi%
    \hbox to\z@{%
      \ifshoworigin\hbox to \z@{\hss\pst@@@hlabel{\psk@Ox}\hss}\fi%
      \mmultido{\n=\psk@Ox+\psk@Dx}{\pst@cnta}{%
        \hskip\pst@dimb\hbox to \z@{\hss\pst@@@hlabel{\n}\hss}%
      }\hss%
    }%
    \ifdim\pst@dimd>\z@\vss\else\vskip\pst@dimm\fi%
}}%

% #1:Max/Min in pt from origin; #2:arrow; #3:min; #4:max
% \psk@labels 0:all; 1:x; 2:y; 3:none
\def\pst@vlabels#1#2#3#4{%
  \ifdim#1=\z@\else%
    \ifx#2\empty\else\advance#1\ifdim#1>\z@-\fi7\pslinewidth\fi%
    \pst@cnta=#1\relax          %      % Distance (in sp) to end.
    \divide\pst@cnta\psk@dy\relax  %   % Number of ticks/labels
    \ifnum\pst@cnta=\z@\else%
      \pst@dima=\psk@dy sp%            % Space between ticks.
%      \ifPst@plot@xAxis\else\showorigintrue\fi%
      \ifodd\number\psk@labels\else\ifPst@plot@yAxis\pst@@vlabels\fi\fi%
      \showoriginfalse%
    \fi%
  \fi%
}
% \pst@dima: the width between two labels in pt
% \pst@dimc: the coordinate of the origin in pt
% \pst@cnta: the lowest label
\def\pst@@vlabels{%
  \pst@dimm=\pst@yticksizeC%
  \advance\pst@dimm by \pslabelsep%
  \vbox to\z@{%
    \ifnum\pst@cnta>\z@\pst@dima=-\pst@dima\fi%
    \offinterlineskip%
    \ifshoworigin
      \vbox to \z@{\vss\hbox to\z@{%
        \ifdim\pst@dimc>\z@\hss\else\hskip\pst@dimm\fi
        \pst@@@vlabel{\psk@Oy}%
        \ifdim\pst@dimc>\z@\hskip\pst@dimm\else\hss\fi}\vss}%
    \fi%
    \mmultido{\n=\psk@Oy+\psk@Dy}{\pst@cnta}{%
      \vbox to\pst@dima{\vss}
      \vbox to \z@{%
        \vss\hbox to\z@{%
          \ifdim\pst@dimc>\z@%
            \hss\pst@@@vlabel{\n}\hskip\pst@dimm%
          \else%
            \hskip\pst@dimm\pst@@@vlabel{\n}\hss%
          \fi
        }\vss%
    }}%
    \vss%
}}
%
\define@key[psset]{}{nStep}{\edef\psk@nStep{#1}}
\define@key[psset]{}{nStart}{\edef\psk@nStart{#1}}
\define@key[psset]{}{nEnd}{\edef\psk@nEnd{#1}}
\define@key[psset]{}{xStep}{\edef\psk@xStep{#1}}
\define@key[psset]{}{yStep}{\edef\psk@yStep{#1}}
%
\define@key[psset]{}{xStart}{\edef\psk@xStart{#1}}
\define@key[psset]{}{xEnd}{\edef\psk@xEnd{#1}}
\define@key[psset]{}{yStart}{\edef\psk@yStart{#1}}
\define@key[psset]{}{yEnd}{\edef\psk@yEnd{#1}}
%
\define@key[psset]{}{plotNo}{\edef\psk@plotNo{#1}}
\define@key[psset]{}{plotNoMax}{\edef\psk@plotNoMax{#1}}
%
\psset{nStep=1, nStart=0, nEnd={},%
  xStep=0, yStep=0, xStart={}, xEnd={},  yStart={}, yEnd={}, comma=false,%
  plotNo=1,plotNoMax=1}
%
\def\pstScalePoints(#1,#2)#3#4{%
%  xScale | yScale | xOperator | yOperator  
% the operators can be any Postscript code
  \pst@def{ScalePoints}<%
    /y ED /x ED
    counttomark dup dup cvi eq not { exch pop } if
    /m exch def /n m 2 div cvi def
    n {
      #4\space y mul #2\space mul m 1 roll
      #3\space x mul #1\space mul m 1 roll
      /m m 2 sub
      def } repeat>
}
%\pstScalePoints(1,1){}{}% the default -> no special operators
%
\def\listplot@ii#1{%
  \@nameuse{beginplot@\psplotstyle}%
  \addto@pscode{/D {} def mark}%
  #1%
  \addto@pscode{%
    \tx@PreparePoints
    \pst@number\psxunit
    \pst@number\psyunit
    \tx@ScalePoints%
  }%
  \@nameuse{endplot@\psplotstyle}%
}
%
\pst@def{PreparePoints}<{%
  counttomark /m exch def
  /n m \psk@plotNoMax\space 1 add div cvi def
  \psk@plotNoMax\space 1 gt {% multiple data files?
    n {
      \psk@plotNoMax\space \psk@plotNo\space 1 sub neg roll % x yNo y y y ...
      \psk@plotNoMax\space 1 sub { pop } repeat % x yNo
      /m m \psk@plotNoMax\space 1 sub sub def
      m 2 roll
    } repeat
  } if % no multiple data files
%	counttomark /m exch def
%	/n m 2 div cvi def
  /xMax -99999 def /yMax -99999 def
  /xP 0 def /yP 0 def
  m copy
  n {
    /y exch def /x exch def
    xMax x lt { /xMax x def } if
    yMax y lt {/yMax y def } if
    xP x gt { /xP x def } if
    yP y gt { /yP y def } if
  } repeat
%	m 2 roll
  \psk@xStep\space 0 gt \psk@yStep\space 0 gt or (\psk@xStart) length 0 gt or
  (\psk@yStart) length 0 gt or (\psk@xEnd) length 0 gt or (\psk@yEnd) length 0 gt or {
%
    (\psk@xStart) length 0 gt {\psk@xStart\space }{ xP } ifelse /xStart exch def
    (\psk@yStart) length 0 gt {\psk@yStart\space }{ yP } ifelse /yStart exch def
    (\psk@xEnd) length 0 gt { \psk@xEnd\space }{ xMax } ifelse /xEnd exch def
    (\psk@yEnd) length 0 gt { \psk@yEnd\space }{ yMax } ifelse /yEnd exch def
    n {
      m -2 roll
      2 copy /yVal exch def /xVal exch def
      xVal xP ge
      yVal yP ge and
      xVal xEnd le and
      yVal yEnd le and
      xVal xStart ge and
      yVal yStart ge and {
        /xP xP \psk@xStep\space add def
        /yP yP \psk@yStep\space add def
      }{%
        pop pop
        /m m 2 sub def
      } ifelse
    } repeat
  }{%
    /ncount 0 def
    (\psk@nEnd) length 0 gt { \psk@nEnd\space }{ m } ifelse 
    /nEnd exch def
    n {
      m -2 roll
      \psk@nStep\space 1 gt {
        ncount \psk@nStart\space sub \psk@nStep\space mod 0 eq }{ true } ifelse
        ncount nEnd le and
        ncount \psk@nStart\space ge and not {
          pop pop
          /m m 2 sub def
        } if
        /ncount ncount 1 add def
      } repeat
  } ifelse
}>
%
%
\define@key[psset]{}{xAxisLabel}{\edef\psk@xAxisLabel{#1}}
\define@key[psset]{}{yAxisLabel}{\edef\psk@yAxisLabel{#1}}
\psset{xAxisLabel=x,yAxisLabel=y}
\define@key[psset]{}{xAxisLabelPos}{\edef\psk@xAxisLabelPos{#1}}
\define@key[psset]{}{yAxisLabelPos}{\edef\psk@yAxisLabelPos{#1}}
\psset{yAxisLabelPos=\@empty,xAxisLabelPos=\@empty}
%
\newdimen\psk@llx
\newdimen\psk@lly
\newdimen\psk@urx
\newdimen\psk@ury
\define@key[psset]{}{llx}{\pssetxlength\psk@llx{#1}}
\define@key[psset]{}{lly}{\pssetylength\psk@lly{#1}}
\define@key[psset]{}{urx}{\pssetxlength\psk@urx{#1}}
\define@key[psset]{}{ury}{\pssetylength\psk@ury{#1}}
\psset{llx=\z@, lly=\z@, urx=\z@, ury=\z@}% prevents rounding errors 
\newif\ifPst@plot@box
\define@key[psset]{}{box}[true]{\@nameuse{Pst@plot@box#1}}

\newdimen\pst@xunit
\newdimen\pst@yunit
%
%\def\psgraph*{\psgraph{*}}
\def\psgraph{\begingroup\pst@ifstar\psgraph@i}
\def\psgraph@i{%
  \@ifnextchar[{\psgraph@ii}{\psgraph@ii[]}}
\def\psgraph@ii[#1](#2,#3)(#4,#5)#6#7{%
%\def\psgraph{\@ifnextchar[{\psgraph@i}{\psgraph@i[]}}
%\def\psgraph@i[#1](#2,#3)(#4,#5)#6#7{%
% options | minX | minY | maxX | maxY | Length x-axis | length y-axis%  
  \pst@dimo=#4\p@\advance\pst@dimo by -#2\p@ % delta x
  \pst@divide{#6}{\pst@dimo}\pst@tempa
  \pst@xunit=\pst@tempa\p@%
%  
  \pst@dimo=#5\p@\advance\pst@dimo by -#3\p@ % delta y
  \pst@divide{#7}{\pst@dimo}\pst@tempa%
  \pst@yunit=\pst@tempa\p@%
  %
  \pst@dima=#2\pst@xunit \advance\pst@dima by \psk@llx%
  \pst@dimb=#3\pst@yunit \advance\pst@dimb by \psk@lly%
  \pst@dimc=#4\pst@xunit \advance\pst@dimc by \psk@urx%
  \pst@dimd=#5\pst@yunit \advance\pst@dimd by \psk@ury%
  \if@star\pspicture*(\pst@dima,\pst@dimb)(\pst@dimc,\pst@dimd)\else
    \pspicture(\pst@dima,\pst@dimb)(\pst@dimc,\pst@dimd)\fi
  \psset{xunit=\pst@xunit,yunit=\pst@yunit}%
    \psaxes[#1](0,0)(#2,#3)(#4,#5)%
    \ifx\psk@xAxisLabel\@empty\else%
      \ifx\psk@xAxisLabelPos\@empty%
        \uput[0](#4,0){\psk@xAxisLabel}%
        \uput[90](0,#5){\psk@yAxisLabel}%
      \else%
        \rput(\psk@xAxisLabelPos){\psk@xAxisLabel}%
        \rput{90}(\psk@yAxisLabelPos){\psk@yAxisLabel}%
      \fi%
    \fi %
}
\def\endpsgraph{%
  \pst@killglue
  \endpspicture%
  \endgroup%
}
\@namedef{psgraph*}{\psgraph*}
\@namedef{endpsgraph*}{\endpsgraph}

%
\iffalse% still on progress
\def\psIVaxes{\@ifnextchar[{\psIVaxes@i}{\psIVaxes@i[]}}
\def\psIVaxes@i[#1](#2,#3)(#4,#5){%
  \edef\@psxMax{#3}
  \edef\@psyMax{#5}
  \psaxes[#1](#2,#3)(#4,#5)
  \@ifnextchar[{\psIVaxes@ii}{\psIVaxes@ii[]}%
}
\def\psIVaxes@ii[#1](#2,#3){%
  \psset{#1}
  \pst@ticks{90}{#2}{5}{1}
% \pst@ticks{angle}{dx}{n}{int}
% int=1 if ticks appear on top of axes, 0 otherwise.
  \ignorespaces
  \@ifnextchar[{\psIVaxes@iii}{\psIVaxes@iii[]}%
}
\def\psIVaxes@iii[#1](#2,#3){{%  to do ....
}}
\fi
%
%
\newcount\linecnt
\begingroup
\catcode`\,=13
\catcode`\_=13
\gdef\savedata@#1[#2]{%
  \xdef\pst@tempg{#2_}%
  \endgroup
  \let#1\pst@tempg
  \global\let\pst@tempg\relax
  \ignorespaces}
\gdef\readdata@{%
  \read1 to \pst@tempa
  \ifnum\linecnt=\psk@nStep
    \global\linecnt=0
    \expandafter\readdata@@\pst@tempa_\@nil
  \fi
  \global\advance\linecnt by 1
  \ifeof1\else\expandafter\readdata@\fi}
\gdef\pst@@readfile#1#2\@nil{\addto@pscode{,#1#2}}%
\gdef\readdata@@#1#2\@nil{\xdef\pst@tempg{\pst@tempg,#1#2}}%
\endgroup

\def\readdata{\@ifnextchar[{\readdata@i}{\readdata@i[]}}
\def\readdata@i[#1]#2#3{{%
  \def\pst@tempa{#1}%
  \ifx\pst@tempa\@empty\else\psset{#1}\fi
  \openin1=#3
  \begingroup
  \edef\pst@tempg{}%
  \ifeof1
    \@pstrickserr{Data file `#3' not found.}\@ehpa
  \else
    \pst@datadelimiters
    \catcode`\[=1
    \catcode`\]=2
    \global\linecnt=\psk@nStep
    \readdata@%
  \fi
  \endgroup
  \global\let#2\pst@tempg
  \global\let\pst@tempg\relax
  \ignorespaces%
}}
%
% D.G. addition - Jun.  9, 1998 - Polar plots using the \psplot macro
% Code added according the way suggested by Ulrich Dirr <udirr@das-team.com>

% For polar plots
\newif\ifpolarplot
\define@key[psset]{}{polarplot}{\@nameuse{polarplot#1}}
\psset{polarplot=false}
%
\define@key[psset]{}{method}{\edef\psk@method{#1}}%
\define@key[psset]{}{whichabs}{\edef\psk@whichabs{#1}}%
\define@key[psset]{}{whichord}{\edef\psk@whichord{#1}}%
\define@key[psset]{}{plotfuncx}{\edef\psk@plotfuncx{#1}}%
\define@key[psset]{}{plotfuncy}{\edef\psk@plotfuncy{#1}}%
\define@key[psset]{}{expression}{\edef\psk@expression{#1}}%
\define@key[psset]{}{VarStep}{\edef\psk@VarStep{#1}}%
\newif\ifPst@buildvector%
\define@key[psset]{}{buildvector}[true]{\@nameuse{Pst@buildvector#1}}%
\newif\ifPst@algebraic%
\define@key[psset]{}{algebraic}[false]{\@nameuse{Pst@algebraic#1}}%
\psset{method=default, whichabs=default, whichord=default,
  plotfuncx=default, plotfuncy=default, buildvector=false, algebraic=false, VarStep=default}
\def\@rkiv{rk4}%
\def\@adams{adams}%
\psset{dimen=middle}% remark of ML
\def\@undef{undef}%
\def\@default{default}%
%
\def\psplot@i#1#2#3{%
  \pst@killglue
  \begingroup
    \use@par
    \@nameuse{beginplot@\psplotstyle}%
% D.G. modification begin - Jun.  9, 1998
    \ifpolarplot
      \addto@pscode{%
        \psplot@init
        /x #1 def
        /x1 #2 def
        /dx x1 x sub \psk@plotpoints div def
        /F@pstplot \ifPst@algebraic (#3) tx@EqdfDict begin AlgParser end cvx
            \else { #3 } \fi  def 
        /xy {% Adapted from \parametricplot@i
          F@pstplot dup x cos mul exch x sin mul
%          #3 dup x cos mul exch x sin mul
          \pst@number\psxunit mul exch
          \pst@number\psyunit mul exch
        } def}%
    \else
% D.G. modification end
    \addto@pscode{%
      \psplot@init
      /x #1 def
      /x1 #2 def
      /dx x1 x sub \psk@plotpoints div def
      /F@pstplot \ifPst@algebraic (#3) tx@EqdfDict begin AlgParser end cvx
                 \else { #3 } \fi  def 
      /xy {
        x \pst@number\psxunit mul F@pstplot \pst@number\psyunit mul
%       \ifPst@algebraic F@pstplot \else #3 \fi \pst@number\psyunit mul
      } def}%
    \fi
    \gdef\psplot@init{}%
    \@pstfalse
    \@nameuse{testqp@\psplotstyle}%
    \if@pst
      \psplot@ii
    \else
      \psplot@iii
    \fi
  \endgroup
  \ignorespaces}
\def\psplot@ii{%
  \ifx\psk@VarStep\@default
    \addto@pscode{%
      xy \@nameuse{beginqp@\psplotstyle}
      \psk@plotpoints 1 sub {
        /x x dx add def
        xy \@nameuse{doqp@\psplotstyle}
      } repeat
      /x x1 def
      xy \@nameuse{doqp@\psplotstyle}}%
  \else
    \addto@pscode{%
      xy \@nameuse{beginqp@\psplotstyle}
      /Olddt dx def /OldOlddt dx def /Oldy F@pstplot def /y 0 def
      /Ndt dx def /Ny 0 def
      { /Ndt Ndt 1.5 mul def %%new step is 50% larger
        x1 x sub dup Ndt lt { /Ndt exch def } { pop } ifelse 
        { /x x /Ny /x x Ndt add def tx@EqdfDict begin F@pstplot end def def
          /x x /y /x x Ndt 2 div add def tx@EqdfDict begin F@pstplot end def def
              /Oldy tx@EqdfDict begin F@pstplot end def
         Ny y sub Ndt div y Oldy sub Ndt div dup 0 eq { pop pop exit } if div abs 
         dup 1 gt { 1 exch div } if \psk@VarStep\space gt%%if greater than rate OK
         { exit } { /Ndt Ndt 2 div def } ifelse
          Ndt dx lt { exit } if
       } loop
        /x x Ndt add def xy \@nameuse{doqp@\psplotstyle}
        x x1 eq { exit } if
        /Olddt Ndt def
        /OldOlddt Olddt def
       /y Ny def} loop}%
  \fi
  \@nameuse{endqp@\psplotstyle}}
\def\psplot@iii{%
  \ifx\psk@VarStep\@default
    \addto@pscode{%
      mark
      /n 2 def
      \psk@plotpoints {
        xy
        n 2 roll
        /n n 2 add def
        /x x dx add def
      } repeat
      /x x1 def
      xy
      n 2 roll}%
  \else\pst@killglue
    \addto@pscode{%
      /Olddt dx def /OldOlddt dx def /Oldy F@pstplot def /y 0 def
      /Ndt dx def /Ny 0 def /n 2 def
      mark xy
      { /Ndt Ndt 1.5 mul def %%new step is 50% larger
        x1 x sub dup Ndt lt { /Ndt exch def } { pop } ifelse 
        { /x x /Ny /x x Ndt add def tx@EqdfDict begin F@pstplot end def def
          /x x /y /x x Ndt 2 div add def tx@EqdfDict begin F@pstplot end def def
              /Oldy tx@EqdfDict begin F@pstplot end def
         Ny y sub Ndt div y Oldy sub Ndt div dup 0 eq { pop pop exit } if div abs 
         dup 1 gt { 1 exch div } if \psk@VarStep\space gt%%if greater than rate OK
         { exit } { /Ndt Ndt 2 div def } ifelse
          Ndt dx lt { exit } if
       } loop
        /x x Ndt add def xy /n n 2 add def n 2 roll
        x x1 eq { exit } if
        /Olddt Ndt def
        /OldOlddt Olddt def
       /y Ny def} loop}%
  \fi
  \@nameuse{endplot@\psplotstyle}}
\def\parametricplot@i#1#2#3{%
  \pst@killglue%
  \begingroup
    \use@par
    \@nameuse{beginplot@\psplotstyle}%
    \addto@pscode{%
      \psplot@init
      /t #1 def
      /t1 #2 def
      /dt t1 t sub \psk@plotpoints div def
      \ifPst@algebraic/F@pstplot (#3) tx@EqdfDict begin AlgParser end cvx def \fi
      /xy {
        \ifPst@algebraic F@pstplot \else #3 \fi
        \pst@number\psyunit mul exch
        \pst@number\psxunit mul exch
      } def}%
    \gdef\psplot@init{}%
    \@pstfalse
    \@nameuse{testqp@\psplotstyle}%
    \if@pst
      \parametricplot@ii
    \else
      \parametricplot@iii
    \fi
  \endgroup
  \ignorespaces}
%
\define@key[psset]{}{barwidth}{\pst@getlength{#1}\psk@barwidth}
\psset{barwidth=0.25cm}
%
\def\psbar@ii{\addto@pscode{false \tx@NArray \psbar@iii}}
\def\psbar@iii{%
  newpath
  n { 
    /Yval exch def /Xval exch def 
    Xval \number\psk@barwidth 0.5 mul sub 0 moveto 
    0 Yval rlineto \number\psk@barwidth 0 rlineto 
    0 Yval neg rlineto \number\psk@barwidth neg 0 rlineto
  } repeat
}%
\def\beginplot@bar{\begin@SpecialObj}
\def\endplot@bar{%
  \psbar@ii\psk@fillstyle\ifpsshadow\pst@closedshadow\fi%
  \pst@stroke
  \end@SpecialObj%
}
%
\def\resetOptions{%
  \@zero=0%
  \psset{%
%%%% pstricks %%%%%%%%
  unit=1cm,%
  swapaxes=false,%
  showpoints=false,%
  border=0pt, bordercolor=white,%
  doubleline=false, doublesep=1.25\pslinewidth,%
  doublecolor=white,%
  shadow=false, shadowsize=3pt, shadowangle=-45, shadowcolor=darkgray,%
  linewidth=.8pt,%
  linecolor=black,%
  dash=5pt 3pt, dashadjust=true,%
  dotsep=3pt,%
  linestyle=solid,%
  fillcolor=white,%
  hatchwidth=.8pt, hatchsep=4pt, hatchcolor=black, hatchangle=45,%
  fillstyle=none,%
  arrows=-, arrowscale=1, arrowsize=1.5pt 2, arrowlength=1.4, arrowinset=.4,%
  tbarsize=2pt 5,%
  bracketlength=.15, rbracketlength=.15,%
  liftpen=0, linetype=0,%
  gangle=0,%
  curvature=1 .1 0,%
  dotsize=2pt 2,%
  dotangle=0, dotscale=1, dotstyle=*,%
  linearc=0pt,%
  framearc=0,%
  cornersize=relative,%
  dimen=outer,%
  gridwidth=.8pt, griddots=0, gridcolor=black,%
  subgridwidth=.4pt, subgridcolor=gray, subgriddots=0, subgriddiv=5,%
  gridlabels=10pt, gridlabelcolor=black,%
  framesep=3pt, boxsep=true,%
  trimode=U,%
  arcsep=0,radius=.25cm,%
  ref=c,rot=0,labelsep=5pt,refangle=0,%
%%%%%%%%% pst-plot %%%%%%%%%%%%%
  plotstyle=line,plotpoints=50,%
  ticksize=-4pt 4pt,tickstyle=full,ticks=all,%
  labels=all,Ox=0,Dx=1,dx=0,Oy=0,Dy=1,dy=0,%
  showorigin=true,%
  axesstyle=axes,%
  intSeparator={,}%
  braceWidth=0.35,bracePos=0.5,%
  arrowscale=1,%
  ArrowFill=true,%
  ArrowInsidePos=0.5,%
  ArrowInsideNo=1,ArrowInsideOffset=0,%
  dashColorI=black,dashColorII=red,dashNo=0.2,linecap=0,%
  wBegin=\pslinewidth, wEnd=\pslinewidth,%
  lineAngle=0,%
  xyAxes=true,%
  xDecimals={},yDecimals={},%
  xLabel={},yLabel={},%
  xlogBase={},ylogBase={},%
  logLines=none,%
  nStep=1,nStart=0,nEnd={},%
  xStep=0,yStep=0,xStart={},xEnd={},yStart={},yEnd={},comma=false,%
  xAxisLabel=x,yAxisLabel=y,%
  yAxisLabelPos=\@empty,xAxisLabelPos=\@empty,%
  llx=\z@, lly=\z@, urx=\z@, ury=\z@,% prevents rounding errors 
%%%%%%%%% pst-node %%%%%%%%%%
  nodealign=false,%
  href=0,%
  vref=.7ex,%
  framesize=10pt,%
  nodesep=0pt,%
  arm=10pt,%
  offset=0pt,%
  angle=0,%
  arcangle=8,%
  ncurv=.67,%
  loopsize=1cm,%
  boxsize=.4cm,%
  nrot=0,%
  npos=,%
  tpos=0.5,%
  shortput=none,%
  colsep=1.5cm,%
  rowsep=1.5cm,%
%  shortput=tablr,%%
  mcol=c,%
  mnode=R,%
  emnode=none}
}
%
%
\catcode`\@=\PstAtCode\relax
%
%% END: pstricks-add.tex
\endinput

pstricks.tex
%% BEGIN: pstricks.tex
%%
%% PostScript macros for Generic TeX: main input file for PSTricks 97.
%% See the PSTricks User's Guide for description.
%% This uses the header file `pstricks.pro'.
%%
\def\fileversion{97 patch 14}
\def\filedate{1999/12/23}
%%
%% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu.
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt.
%%
\csname PSTricksLoaded\endcsname
\let\PSTricksLoaded\endinput
\edef\PstAtCode{\the\catcode`\@}
\catcode`\@=11\relax
\expandafter\ifx\csname @latexerr\endcsname\relax
\long\def\@ifundefined#1#2#3{\expandafter\ifx\csname
#1\endcsname\relax#2\else#3\fi}
\def\@namedef#1{\expandafter\def\csname #1\endcsname}
\def\@nameuse#1{\csname #1\endcsname}
\def\@eha{%
Your command was ignored.^^J
Type \space I <command> <return> \space to replace
it with another command,^^J
or \space <return> \space to continue without it.}
\def\@spaces{\space\space\space\space}
\def\typeout#1{\immediate\write\@unused{#1}}
\alloc@7\write\chardef\sixt@@n\@unused
\def\@empty{}
\def\@gobble#1{}
\def\@nnil{\@nil}
\def\@ifnextchar#1#2#3{%
\let\@tempe#1\def\@tempa{#2}\def\@tempb{#3}\futurelet\@tempc\@ifnch}
\def\@ifnch{%
\ifx\@tempc\@sptoken
\let\@tempd\@xifnch
\else
\ifx\@tempc\@tempe \let\@tempd\@tempa \else \let\@tempd\@tempb \fi
\fi
\@tempd}
\begingroup
\def\:{\global\let\@sptoken= } \:
\def\:{\@xifnch} \expandafter\gdef\: {\futurelet\@tempc\@ifnch}
\endgroup
\fi
\typeout{`PSTricks' v\fileversion\space\space <\filedate> (tvz)}
\def\@pstrickserr#1#2{%
\begingroup
\newlinechar`\^^J
\edef\pst@tempc{#2}%
\expandafter\errhelp\expandafter{\pst@tempc}%
\typeout{%
PSTricks error. \space See User's Guide for further information.^^J
\@spaces\@spaces\@spaces\@spaces
Type \space H <return> \space for immediate help.}%
\errmessage{#1}%
\endgroup}
\def\@ehpa{%
Your command was ignored. Default value substituted.^^J
Type \space <return> \space to procede.}
\def\@ehpb{%
Your command was ignored. Will recover best I can.^^J
Type \space <return> \space to procede.}
\def\@ehpc{%
You better fix this before proceding.^^J
See the PSTricks User's Guide or ask your system administrator for help.^^J
Type \space X <return> \space to quit.}
\def\pst@misplaced#1{\@pstrickserr{Misplaced \string#1 command}\@ehpb}
\newdimen\pst@dima
\newdimen\pst@dimb
\newdimen\pst@dimc
\newdimen\pst@dimd
\newdimen\pst@dimg
\newdimen\pst@dimh
\newbox\pst@hbox
\newbox\pst@boxg
\newcount\pst@cnta
\newcount\pst@cntb
\newcount\pst@cntc
\newcount\pst@cntd
\newcount\pst@cntg
\newcount\pst@cnth
\newif\if@pst
\newtoks\pst@toks
\newif\if@star
\def\pst@ifstar#1{%
\@ifnextchar*{\@startrue\def\next*{#1}\next}{\@starfalse#1}}
\def\pst@expandafter#1#2{%
\def\next{#1}%
\edef\@tempa{#2}%
\ifx\@tempa\@empty
\@pstrickserr{Unexpected empty argument!}\@ehpb
\def\@tempa{\@empty}%
\fi
\expandafter\next\@tempa}
\def\pst@dimtonum#1#2{\edef#2{\pst@@dimtonum#1}}
\def\pst@@dimtonum#1{\expandafter\pst@@@dimtonum\the#1}
{\catcode`\p=12 \catcode`\t=12 \global\@namedef{pst@@@dimtonum}#1pt{#1}}
\def\pst@pyth#1#2#3{%
\ifdim#1>#2\pst@@pyth#1#2#3\else\pst@@pyth#2#1#3\fi}
\def\pst@@pyth#1#2#3{%
\ifdim4#1>9#2%
#3=#1\advance#3 .2122#2%
\else
#3=.8384#1\advance#3 .5758#2%
\fi}
\def\pst@divide#1#2#3{%
\pst@@divide{#1}{#2}%
\pst@dimtonum\pst@dimg{#3}}
\def\pst@@divide#1#2{%
\pst@dimg=#1\relax
\pst@dimh=#2\relax
\pst@cntg=\pst@dimh
\pst@cnth=67108863
\pst@@@divide\pst@@@divide\pst@@@divide\pst@@@divide
\divide\pst@dimg\pst@cntg}
\def\pst@@@divide{%
\ifnum
\ifnum\pst@dimg<\z@-\fi\pst@dimg<\pst@cnth
\multiply\pst@dimg\sixt@@n
\else
\divide\pst@cntg\sixt@@n
\fi}
\def\pst@configerr#1{%
\@pstrickserr{\string#1 not defined in pstricks.con}\@ehpc}
% % \begin{macrocode}
\def\pstVerb#1{\pst@configerr\pstVerb}
\def\pstverb#1{\pst@configerr\pstverb}
\def\pstverbscale{\pst@configerr\pstverbscale}
\def\pstrotate{\pst@configerr\pstrotate}
\def\pstheader#1{\pst@configerr\pstheader}
\def\pstdriver{\pst@configerr\pstdriver}
\@ifundefined{pstcustomize}%
{\def\pstcustomize{\endinput\let\pstcustomize\relax}}{}
\input pstricks.con
\newif\ifPSTricks
\PSTrickstrue
\def\PSTricksOff{%
\def\pstheader##1{}%
\def\pstverb##1{}%
\def\pstVerb##1{}%
\PSTricksfalse}
\@ifundefined{pst@def}{\def\pst@def#1<#2>{\@namedef{tx@#1}{#2 }}}{}
\@ifundefined{pst@ATH}{\def\pst@ATH<#1>{}}{}
\pstheader{pstricks.pro}
\def\pst@dict{tx@Dict begin }
\def\pst@theheaders{pstricks.pro}
\def\pst@Verb#1{\pstVerb{\pst@dict #1 end}}
\def\tx@Atan{Atan }
\def\tx@Div{Div }
\def\tx@NET{NET }
\def\tx@Pyth{Pyth }
\def\tx@PtoC{PtoC }
\def\tx@PathLength@{PathLength@ }
\def\tx@PathLength{PathLength }
\pst@dimg=\pstunit\relax
\ifdim\pst@dimg=1bp
\def\pst@stp{.996264 dup scale}
\else
\edef\pst@stp{1 \pst@@dimtonum\pst@dimg\space div dup scale}
\fi
\def\tx@STP{STP }
\def\tx@STV{STV }
\def\pst@number#1{\pst@@dimtonum#1\space}
\def\pst@checknum#1#2{%
\edef\next{#1}%
\ifx\next\@empty
\let\pst@num\z@
\else
\expandafter\pst@@checknum\next..\@nil
\fi
\ifnum\pst@num=\z@
\@pstrickserr{Bad number: `#1'. 0 substituted.}\@ehpa
\def#2{0 }%
\else
\edef#2{\ifnum\pst@num=\tw@-\fi\the\pst@cntg.%
\expandafter\@gobble\the\pst@cnth\space}%
\fi}
\def\pst@@checknum{%
\@ifnextchar-%
{\let\pst@num\tw@\expandafter\pst@@@checknum\@gobble}%
{\let\pst@num\@ne\pst@@@checknum}}
\def\pst@@@checknum#1.#2.#3\@nil{%
\afterassignment\pst@@@@checknum\pst@cntg=0#1\relax\@nil
\afterassignment\pst@@@@checknum\pst@cnth=1#2\relax\@nil}
\def\pst@@@@checknum#1\relax\@nil{%
\ifx\@nil#1\@nil\else\let\pst@num\z@\fi}
\def\pst@getnumii#1 #2 #3\@nil{%
\pst@checknum{#1}\pst@tempg
\pst@checknum{#2}\pst@temph}
\def\pst@getnumiii#1 #2 #3 #4\@nil{%
\pst@checknum{#1}\pst@tempg
\pst@checknum{#2}\pst@temph
\pst@checknum{#3}\pst@tempi}
\def\pst@getnumiv#1 #2 #3 #4 #5\@nil{%
\pst@checknum{#1}\pst@tempg
\pst@checknum{#2}\pst@temph
\pst@checknum{#3}\pst@tempi
\pst@checknum{#4}\pst@tempj}
\def\pst@getdimnum#1 #2 #3\@nil{%
\pssetlength\pst@dimg{#1}%
\pst@checknum{#2}\pst@tempg}
% DG/SR modification begin - Jan. 7, 1998 - Patch 9
% Missing from pstricks.bug 0.93
%\def\pst@getscale#1#2{%
%\pst@expandafter\pst@getnumii{#1 #1} {} {} {}\@nil
%\@psttrue
%\ifdim\pst@tempg\p@=\z@
%\@pstrickserr{Bad scaling argument `#1'}\@ehpa
%\def\pst@tempg{1 }%
%\@pstfalse
%\fi
%\ifdim\pst@temph\p@=\z@
%\if@pst\@pstrickserr{Bad scaling argument `#1'}\@ehpa\fi
%\def\pst@temph{1 }%
%\fi
%\edef#2{\pst@tempg\space \pst@temph\space scale }%
%\ifdim\pst@tempg\p@=\p@ \ifdim\pst@temph\p@=\p@
%\def#2{}%
%\fi\fi}
\def\pst@getscale#1#2{%
\edef\pst@tempg{#1}%
\ifx\pst@tempg\@none
\def#2{}%
\else
\pst@expandafter\pst@getnumii{#1 #1} {} {} {}\@nil
\ifdim\pst@tempg\p@=\z@
\@pstrickserr{Bad scaling argument `#1'}\@ehpa
\def#2{}%
\else
\ifdim\pst@temph\p@=\z@
\@pstrickserr{Bad scaling argument `#1'}\@ehpa
\def#2{}%
\else
\edef#2{\pst@tempg\space \pst@temph\space scale }%
\fi
\fi
\fi}
% DG/SR modification end
\def\pst@getint#1#2{%
\pst@cntg=#1\relax
\edef#2{\the\pst@cntg\space}}
\begingroup
\catcode`\{=12
\catcode`\}=12
\catcode`\[=1
\catcode`\]=2
\gdef\pslbrace[{ ]
\gdef\psrbrace[} ]
\endgroup
\def\@newcolor#1#2{%
\expandafter\edef\csname #1\endcsname{\noexpand\pst@color{#2}}%
\expandafter\edef\csname color@#1\endcsname{#2}%
\ignorespaces}
\def\pst@color#1{%
\def\pst@currentcolor{#1}\pstVerb{#1}\aftergroup\pst@endcolor}
\def\pst@endcolor{\pstVerb{\pst@currentcolor}}
\def\pst@currentcolor{0 setgray}
\def\altcolormode{%
\def\pst@color##1{%
\pstVerb{gsave ##1}\aftergroup\pst@endcolor}%
\def\pst@endcolor{\pstVerb{\pst@grestore}}}
\def\pst@grestore{%
currentpoint
matrix currentmatrix
currentfont
grestore
setfont
setmatrix
moveto}
\def\pst@usecolor#1{\csname color@#1\endcsname\space}
\def\newgray#1#2{%
\pst@checknum{#2}\pst@tempg
\@newcolor{#1}{\pst@tempg setgray}}
\def\newrgbcolor#1#2{%
\pst@expandafter\pst@getnumiii{#2} {} {} {} {}\@nil
\@newcolor{#1}{\pst@tempg \pst@temph \pst@tempi setrgbcolor}}
\def\newhsbcolor#1#2{%
\pst@expandafter\pst@getnumiii{#2} {} {} {} {}\@nil
\@newcolor{#1}{\pst@tempg \pst@temph \pst@tempi sethsbcolor}}
\def\newcmykcolor#1#2{%
\pst@expandafter\pst@getnumiv{#2} {} {} {} {} {}\@nil
\@newcolor{#1}{\pst@tempg \pst@temph \pst@tempi \pst@tempj setcmykcolor}}
\newgray{black}{0}
\newgray{darkgray}{.25}
\newgray{gray}{.5}
\newgray{lightgray}{.75}
\newgray{white}{1}
\newrgbcolor{red}{1 0 0}
\newrgbcolor{green}{0 1 0}
\newrgbcolor{blue}{0 0 1}
\newrgbcolor{yellow}{1 1 0}
\newrgbcolor{cyan}{0 1 1}
\newrgbcolor{magenta}{1 0 1}
\def\psset#1{\@psset#1,\@nil\ignorespaces}
\def\@psset#1,{%
\@@psset#1==\@nil
\@ifnextchar\@nil{\@gobble}{\@psset}}
\def\@@psset#1=#2=#3\@nil{%
\@ifundefined{psset@#1}%
{\@pstrickserr{Graphics parameter `#1' not defined.}\@ehpa}%
{\@nameuse{psset@#1}{#2}}}%
\def\psset@style#1{%
\@ifundefined{pscs@#1}%
{\@pstrickserr{Custom style `#1' undefined}\@ehpa}%
{\@nameuse{pscs@#1}}}
\def\newpsstyle#1#2{\@namedef{pscs@#1}{\psset{#2}}}
\def\@none{none}
\def\pst@getcolor#1#2{%
\@ifundefined{color@#1}%
{\@pstrickserr{Color `#1' not defined}\@eha}%
{\edef#2{#1}}}
\newdimen\psunit \psunit 1cm
\newdimen\psxunit \psxunit 1cm
\newdimen\psyunit \psyunit 1cm
\let\psrunit\psunit
\def\pstunit@off{\let\@psunit\ignorespaces\ignorespaces}
\def\pssetlength#1#2{%
\let\@psunit\psunit
\afterassignment\pstunit@off
#1 #2\@psunit}
\def\psaddtolength#1#2{%
\let\@psunit\psunit
\afterassignment\pstunit@off
\advance#1 #2\@psunit}
\def\pssetxlength#1#2{%
\let\@psunit\psxunit
\afterassignment\pstunit@off
#1 #2\@psunit}
\def\pssetylength#1#2{%
\let\@psunit\psyunit
\afterassignment\pstunit@off
#1 #2\@psunit}
\def\psset@unit#1{%
\pssetlength\psunit{#1}%
\psxunit=\psunit
\psyunit=\psunit}
\def\psset@runit#1{\pssetlength\psrunit{#1}}
\def\psset@xunit#1{\pssetxlength\psxunit{#1}}
\def\psset@yunit#1{\pssetylength\psyunit{#1}}
\def\pst@getlength#1#2{%
\pssetlength\pst@dimg{#1}%
\edef#2{\pst@number\pst@dimg}}
\def\pst@@getlength#1#2{%
\pssetlength\pst@dimg{#1}%
\edef#2{\number\pst@dimg sp}}
\def\pst@getcoor#1#2{\pst@@getcoor{#1}\let#2\pst@coor}
\def\pst@coor{0 0 }
\def\pst@getcoors#1#2{%
\def\pst@aftercoors{\addto@pscode{#1 \pst@coors }#2}%
\def\pst@coors{}%
\pst@@getcoors}
\def\pst@@getcoors(#1){%
\pst@@getcoor{#1}%
\edef\pst@coors{\pst@coor\pst@coors}%
\@ifnextchar({\pst@@getcoors}{\pst@aftercoors}}
\def\pst@getangle#1#2{\pst@@getangle{#1}\let#2\pst@angle}
\def\pst@angle{0 }
\def\cartesian@coor#1,#2,#3\@nil{%
\pssetxlength\pst@dimg{#1}%
\pssetylength\pst@dimh{#2}%
\edef\pst@coor{\pst@number\pst@dimg \pst@number\pst@dimh}}
\def\NormalCoor{%
\def\pst@@getcoor##1{\pst@expandafter\cartesian@coor{##1},\relax,\@nil}%
\def\pst@@getangle##1{%
\pst@checknum{##1}\pst@angle
\edef\pst@angle{\pst@angle \pst@angleunit}}%
\def\psput@##1{\pst@@getcoor{##1}\leavevmode\psput@cartesian}}
\NormalCoor
\def\degrees{\@ifnextchar[{\@degrees}{\def\pst@angleunit{}}}
\def\@degrees[#1]{%
\pst@checknum{#1}\pst@tempg
\edef\pst@angleunit{360 \pst@tempg div mul }%
\ignorespaces}
\def\radians{\def\pst@angleunit{57.2956 mul }}
\def\pst@angleunit{}
\def\SpecialCoor{%
\def\pst@@getcoor##1{%
\begingroup
\pst@activecoor
\xdef\pst@tempg{##1}%
\endgroup
\expandafter\special@coor\pst@tempg||\@nil}%
\def\pst@@getangle##1{%
\begingroup
\pst@activecoor
\xdef\pst@tempg{##1}%
\endgroup
\expandafter\special@angle\pst@tempg\@empty)\@nil}%
\def\psput@##1{\pst@@getcoor{##1}\leavevmode\psput@special}}
\begingroup
\catcode`\|=13
\catcode`\;=13
\catcode`\!=13
\gdef\pst@activecoor{%
\def|{\string|}%
\def;{\string;}%
\def!{\string!}}
\endgroup
\def\special@coor#1|#2|#3\@nil{%
\ifx#3|\relax
\mixed@coor{#1}{#2}%
\else
\special@@coor#1;;\@nil
\fi}
\def\special@@coor#1{%
\ifcat#1a\relax
\def\next{\node@coor#1}%
\else
\ifx#1[\relax
\def\next{\Node@coor[}%
\else
\ifx#1!\relax
\def\next{\raw@coor}%
\else
\def\next{\special@@@coor#1}%
\fi
\fi
\fi
\next}
\def\special@@@coor#1;#2;#3\@nil{%
\ifx#3;\relax
\polar@coor{#1}{#2}%
\else
\cartesian@coor#1,\relax,\@nil
\fi}
\def\mixed@coor#1#2{%
\begingroup
% DG/SR modification begin - Oct. 27, 1997 - Patch 6
%\specialcoor@ii#1;;\@nil
%\let\pst@tempa\pst@coor
%\specialcoor@ii#2;;\@nil
\special@@coor#1;;\@nil
\let\pst@tempa\pst@coor
\special@@coor#2;;\@nil
% DG/SR modification end
\xdef\pst@tempg{\pst@tempa pop \pst@coor exch pop }%
\endgroup
\let\pst@coor\pst@tempg}
\def\polar@coor#1#2{%
\pssetlength\pst@dimg{#1}%
\pst@@getangle{#2}%
\edef\pst@coor{\pst@number\pst@dimg \pst@angle \tx@PtoC}}
\def\raw@coor#1;#2\@nil{%
\edef\pst@coor{%
#1 \pst@number\psyunit mul exch \pst@number\psxunit mul exch }}
\def\node@coor#1\@nil{%
\@pstrickserr{You must load `pst-node.tex' to use node coordinates.}\@ehps
\def\pst@coor{0 0 }}
\def\Node@coor{\node@coor}
\def\special@angle#1#2)#3\@nil{%
\ifx!#1\relax
\edef\pst@angle{#2 \pst@angleunit}%
\else
\ifx(#1\relax
\pst@@getcoor{#2}%
\edef\pst@angle{\pst@coor exch \tx@Atan}%
\else
\pst@checknum{#1#2}\pst@angle
\edef\pst@angle{\pst@angle \pst@angleunit}%
\fi
\fi}
\def\Cartesian{%
\def\cartesian@coor##1,##2,##3\@nil{%
\pssetxlength\pst@dimg{##1}%
\pssetylength\pst@dimh{##2}%
\edef\pst@coor{\pst@number\pst@dimg \pst@number\pst@dimh}}%
\@ifnextchar({\Cartesian@}{}}
\def\Cartesian@(#1,#2){%
\pssetxlength\psxunit{#1}%
\pssetylength\psyunit{#2}%
\ignorespaces}
\def\Polar{%
\def\psput@cartesian{\psput@special}%
\def\cartesian@coor##1,##2,##3\@nil{\polar@coor{##1}{##2}}}%
\def\psset@origin#1{%
\pst@@getcoor{#1}%
\edef\psk@origin{\pst@coor \tx@NET }}
\def\psk@origin{}
\newif\ifswapaxes
\def\psset@swapaxes#1{%
\@nameuse{@pst#1}%
\if@pst
\def\psk@swapaxes{-90 rotate -1 1 scale }%
\else
\def\psk@swapaxes{}%
\fi}
\psset@swapaxes{false}
\newif\ifshowpoints
\def\psset@showpoints#1{\@nameuse{showpoints#1}}
\psset@showpoints{false}
\let\pst@setrepeatarrowsflag\relax
\def\psset@border#1{%
\pst@getlength{#1}\psk@border
\pst@setrepeatarrowsflag}
\psset@border{0pt}
\def\psset@bordercolor#1{\pst@getcolor{#1}\psbordercolor}
\psset@bordercolor{white}
\newif\ifpsdoubleline
\def\psset@doubleline#1{%
\@nameuse{psdoubleline#1}%
\pst@setrepeatarrowsflag}
\psset@doubleline{false}
\def\psset@doublesep#1{\def\psdoublesep{#1}}
\psset@doublesep{1.25\pslinewidth}
\def\psset@doublecolor#1{\pst@getcolor{#1}\psdoublecolor}
\psset@doublecolor{white}
\newif\ifpsshadow
\def\psset@shadow#1{%
\@nameuse{psshadow#1}%
\pst@setrepeatarrowsflag}
\psset@shadow{false}
\def\psset@shadowsize#1{\pst@getlength{#1}\psk@shadowsize}
\psset@shadowsize{3pt}
\def\psset@shadowangle#1{\pst@getangle{#1}\psk@shadowangle}
\psset@shadowangle{-45}
\def\psset@shadowcolor#1{\pst@getcolor{#1}\psshadowcolor}
\psset@shadowcolor{darkgray}
\def\pst@repeatarrowsflag{\z@}
\def\pst@setrepeatarrowsflag{%
\edef\pst@repeatarrowsflag{%
\ifdim\psk@border\p@>\z@ 1\else\ifpsdoubleline 1\else
\ifpsshadow 1\else \z@\fi\fi\fi}}
\def\psls@none{}
\newdimen\pslinewidth
\def\psset@linewidth#1{\pssetlength\pslinewidth{#1}}
\psset@linewidth{.8pt}
\def\psset@linecolor#1{\pst@getcolor{#1}\pslinecolor}
\psset@linecolor{black}
\def\psls@solid{0 setlinecap stroke }
\def\pst@missing{%
\z@
\@pstrickserr{Missing number or dimension. 0 substituted}\@ehpa}
\def\psset@dash#1{%
\pst@expandafter\psset@@dash{#1} {\pst@missing} {\pst@missing} {}\@nil
\edef\psk@dash{\pst@number\pst@dimg \pst@number\pst@dimh}}
\def\psset@@dash#1 #2 #3\@nil{%
\pssetlength\pst@dimg{#1}%
\pssetlength\pst@dimh{#2}}
\psset@dash{5pt 3pt}
\newif\ifpsdashadjust
\def\psset@dashadjust#1{\@nameuse{psdashadjust#1}}
\psset@dashadjust{true}
\def\psls@dashed{%
\ifpsdashadjust
\psk@dash \pst@linetype\space \tx@DashLine
\else
[ \psk@dash ] 0 setdash stroke
\fi}
\def\tx@DashLine{DashLine }
\def\psset@dotsep#1{\pst@getlength{#1}\psk@dotsep}
\psset@dotsep{3pt}
\def\psls@dotted{%
\ifpsdashadjust
\psk@dotsep \pst@linetype\space \tx@DotLine
\else
[ 0 \psk@dotsep CLW add ] 0 setdash 1 setlinecap stroke
\fi}
\def\tx@DotLine{DotLine }
\def\psset@linestyle#1{%
\@ifundefined{psls@#1}%
{\@pstrickserr{Line style `#1' not defined}\@eha}%
{\edef\pslinestyle{#1}}}
\psset@linestyle{solid}
\def\psfs@none{}
\def\psset@fillcolor#1{\pst@getcolor{#1}\psfillcolor}
\psset@fillcolor{white}
\def\psfs@solid{\pst@fill{\pst@usecolor\psfillcolor fill}}
\def\psset@hatchwidth#1{\pst@getlength{#1}\psk@hatchwidth}
\psset@hatchwidth{.8pt}
\def\psset@hatchsep#1{\pst@getlength{#1}\psk@hatchsep}
\psset@hatchsep{4pt}
\def\psset@hatchcolor#1{\pst@getcolor{#1}\pshatchcolor}
\psset@hatchcolor{black}
\def\psset@hatchangle#1{\pst@getangle{#1}\psk@hatchangle}
\psset@hatchangle{45}
\def\pst@linefill{%
\psk@hatchangle rotate
\psk@hatchwidth SLW
\pst@usecolor\pshatchcolor
\psk@hatchsep \tx@LineFill}
\def\psfs@vlines{\pst@fill\pst@linefill}
\@namedef{psfs@vlines*}{\psfs@solid \psfs@vlines}
\def\psfs@hlines{\pst@fill{90 rotate \pst@linefill}}
\@namedef{psfs@hlines*}{\psfs@solid \psfs@hlines}
\def\psfs@crosshatch{\psfs@vlines \psfs@hlines}
\@namedef{psfs@crosshatch*}{\psfs@solid \psfs@vlines \psfs@hlines}
\def\tx@LineFill{LineFill }
\def\psset@fillstyle#1{%
\edef\pst@tempg{#1}\def\pst@temph{none}%
\ifx\pst@tempg\pst@temph
\let\psk@fillstyle\relax
\else
\@ifundefined{psfs@#1}%
{\@pstrickserr{Undefined fill style: `#1'}\@eha}%
{\edef\psk@fillstyle{\expandafter\noexpand\csname psfs@#1\endcsname}}%
\fi}
\def\psset@addfillstyle#1{%
\@ifundefined{psfs@#1}%
{\@pstrickserr{Undefined fill style: `#1'}\@eha}%
{\edef\psk@fillstyle{%
\expandafter\noexpand\psk@fillstyle
\expandafter\noexpand\csname psfs@#1\endcsname}}}
\psset@fillstyle{none}
\def\psset@arrows#1{%
\begingroup
\pst@activearrows
\xdef\pst@tempg{#1}%
\endgroup
\expandafter\psset@@arrows\pst@tempg\@empty-\@empty\@nil
\if@pst\else
\@pstrickserr{Bad arrows specification: #1}\@ehpa
\fi}
\def\psset@@arrows#1-#2\@empty#3\@nil{%
\@psttrue
\def\next##1,#1-##2,##3\@nil{\def\pst@tempg{##2}}%
\expandafter\next\pst@arrowtable,#1-#1,\@nil
\@ifundefined{psas@\pst@tempg}%
{\@pstfalse\def\psk@arrowA{}}%
{\let\psk@arrowA\pst@tempg}%
\@ifundefined{psas@#2}%
{\@pstfalse\def\psk@arrowB{}}%
{\def\psk@arrowB{#2}}}
\def\psk@arrowA{}
\def\psk@arrowB{}
\def\pst@arrowtable{,<->,<<->>,>-<,>>-<<,(-),[-]}
\begingroup
\catcode`\<=13
\catcode`\>=13
\catcode`\|=13
\gdef\pst@activearrows{\def<{\string<}\def>{\string>}\def|{\string|}}
\endgroup
\def\tx@BeginArrow{BeginArrow }
\def\tx@EndArrow{EndArrow }
\def\psset@arrowscale#1{\pst@getscale{#1}\psk@arrowscale}
\psset@arrowscale{1}
\def\psset@arrowsize#1{%
\pst@expandafter\pst@getdimnum{#1} 0 {} {}\@nil
\edef\psk@arrowsize{\pst@number\pst@dimg \pst@tempg}}
\psset@arrowsize{1.5pt 2}
\def\psset@arrowlength#1{\pst@checknum{#1}\psk@arrowlength}
\psset@arrowlength{1.4}
\def\psset@arrowinset#1{\pst@checknum{#1}\psk@arrowinset}%
\psset@arrowinset{.4}
\def\tx@Arrow{Arrow }
\@namedef{psas@>}{%
false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow}
\@namedef{psas@>>}{%
false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow
0 h T
gsave
newpath
false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow
CP
grestore
CP newpath moveto
2 copy
L
stroke
moveto}
\@namedef{psas@<}{%
true \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow}
\@namedef{psas@<<}{%
true \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow
CP newpath moveto 0 a neg L stroke 0 h neg T
false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow}
\def\psset@tbarsize#1{%
\pst@expandafter\pst@getdimnum{#1} 0 {} {}\@nil
\edef\psk@tbarsize{\pst@number\pst@dimg \pst@tempg}}
\psset@tbarsize{2pt 5}
\def\tx@Tbar{Tbar }
\@namedef{psas@|}{\psk@tbarsize \tx@Tbar}
\@namedef{psas@|*}{0 CLW -2 div T \psk@tbarsize \tx@Tbar}
\@namedef{psas@>|}{%
\psk@tbarsize \tx@Tbar
0 CLW 2 div T
newpath
false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow}
\@namedef{psas@>|*}{%
0 CLW -2 div T
\psk@tbarsize \tx@Tbar
0 CLW 2 div T
newpath
false \psk@arrowinset \psk@arrowlength \psk@arrowsize \tx@Arrow}
\edef\pst@arrowtable{\pst@arrowtable,|<*->|*,|<->|}
\def\psset@bracketlength#1{\pst@checknum{#1}\psk@bracketlength}
\psset@bracketlength{.15}
\def\tx@Bracket{Bracket }
\@namedef{psas@]}{\psk@bracketlength \psk@tbarsize \tx@Bracket}
\def\psset@rbracketlength#1{\pst@checknum{#1}\psk@rbracketlength}
\psset@rbracketlength{.15}
\def\tx@RoundBracket{RoundBracket }
\@namedef{psas@)}{\psk@rbracketlength \psk@tbarsize \tx@RoundBracket}
\def\psas@c{1 \psas@@c}
\def\psas@cc{0 CLW 2 div T 1 \psas@@c}
\def\psas@C{2 \psas@@c}
\def\psas@@c{%
setlinecap
0 0 moveto
0 CLW 2 div L
stroke
0 0 moveto}
\def\psas@{}
\psset@arrows{-}
\def\tx@SD{SD }
\def\tx@EndDot{EndDot }
\def\psas@oo{{\pst@usecolor\psfillcolor true} true \psk@dotsize \tx@EndDot}
\def\psas@o{{\pst@usecolor\psfillcolor true} false \psk@dotsize \tx@EndDot}
\@namedef{psas@**}{{false} true \psk@dotsize \tx@EndDot}
\@namedef{psas@*}{{false} false \psk@dotsize \tx@EndDot}
\def\pst@par{}
\def\addto@par#1{%
\ifx\pst@par\@empty
\def\pst@par{#1}%
\else
\expandafter\def\expandafter\pst@par\expandafter{\pst@par,#1}%
\fi}
\def\addbefore@par#1{%
\ifx\pst@par\@empty
\def\pst@par{#1}%
\else
\toks@{#1}%
\pst@toks\expandafter{\pst@par}%
\edef\pst@par{\the\toks@,\the\pst@toks}%
\fi}
\def\use@par{%
\ifx\pst@par\@empty\else
\expandafter\@psset\pst@par,\@nil
\def\pst@par{}%
\fi}
\def\pst@object#1{%
\pst@ifstar{%
\@ifnextchar[%
{\pst@@object{#1}}%
{\def\pst@par{}\@nameuse{#1@i}}}}
\def\pst@@object#1[#2]{%
\def\pst@par{#2}%
\@ifnextchar+{\@nameuse{#1@i}}{\@nameuse{#1@i}}}
\def\newpsobject#1#2#3{%
\@ifundefined{#2@i}%
{\@pstrickserr{Graphics object `#2' not defined}\@eha}{%
\@namedef{#1}{\pst@object{#1}}%
\@namedef{#1@i}{\addbefore@par{#3}\@nameuse{#2@i}}}%
\ignorespaces}
\def\pst@getarrows#1{\@ifnextchar({#1}{\pst@@getarrows{#1}}}
\def\pst@@getarrows#1#2{\addto@par{arrows=#2}#1}
\def\begin@ClosedObj{%
\leavevmode
\pst@killglue
\begingroup
\use@par
\solid@star
\ifpsdoubleline \pst@setdoublesep \fi
\init@pscode}
\def\end@ClosedObj{%
\ifpsshadow \pst@closedshadow \fi
\ifdim\psk@border\p@>\z@ \pst@addborder \fi
\psk@fillstyle
\pst@stroke
\ifpsdoubleline \pst@doublestroke \fi
\ifshowpoints
% DG modification begin - Mar. 4, 1995
%\addto@pscode{Points aload length 2 div cvi /N ED \psdots@iii}%
\pst@OpenShowPoints
% DG modification end
\fi
\use@pscode
\endgroup
\ignorespaces}
\def\begin@OpenObj{%
\begin@ClosedObj
\let\pst@linetype\pst@arrowtype
\pst@addarrowdef}
\def\begin@AltOpenObj{%
\begin@ClosedObj
\def\pst@repeatarrowsflag{\z@}%
\def\pst@linetype{0}}
\def\end@OpenObj{%
\ifpsshadow \pst@openshadow \fi
\ifdim\psk@border\p@>\z@ \pst@addborder \fi
\psk@fillstyle
\pst@stroke
\ifpsdoubleline \pst@doublestroke \fi
\ifnum\pst@repeatarrowsflag>\z@ \pst@repeatarrows \fi
\ifshowpoints \pst@OpenShowPoints \fi
\use@pscode
\endgroup
\ignorespaces}
\def\begin@SpecialObj{%
\leavevmode
\pst@killglue
\begingroup
\use@par
\init@pscode}
\def\end@SpecialObj{%
\use@pscode
\endgroup
\ignorespaces}
\def\pst@code{}%
\def\init@pscode{%
\addto@pscode{%
\pst@number\pslinewidth SLW
\pst@usecolor\pslinecolor}}
\def\addto@pscode#1{\xdef\pst@code{\pst@code#1\space}}
\def\use@pscode{%
\pstverb{%
\pst@dict
\tx@STP
\pst@newpath
\psk@origin
\psk@swapaxes
\pst@code
end}%
\gdef\pst@code{}}
\def\pst@newpath{newpath }
\def\pst@@killglue{\unskip\ifdim\lastskip>\z@\expandafter\pst@@killglue\fi}
\def\KillGlue{\let\pst@killglue\pst@@killglue}
\def\DontKillGlue{\let\pst@killglue\relax}
\DontKillGlue
\def\solid@star{%
\if@star
\pslinewidth=\z@
\psdoublelinefalse
\def\pslinestyle{none}%
\def\psk@fillstyle{\psfs@solid}%
\let\psfillcolor\pslinecolor
\fi}
\def\pst@setdoublesep{%
\pst@getlength\psdoublesep\psdoublesep
\pslinewidth=2\pslinewidth
\advance\pslinewidth\psdoublesep\p@
\let\pst@setdoublesep\relax}
\def\tx@Shadow{Shadow }
\def\pst@closedshadow{%
\addto@pscode{%
gsave
\psk@shadowsize \psk@shadowangle \tx@PtoC
\tx@Shadow
\pst@usecolor\psshadowcolor
gsave fill grestore
stroke
grestore
gsave
\pst@usecolor\psfillcolor
gsave fill grestore
stroke
grestore}}
\def\pst@openshadow{%
\addto@pscode{%
gsave
\psk@shadowsize \psk@shadowangle \tx@PtoC
\tx@Shadow
\pst@usecolor\psshadowcolor
\ifx\psk@fillstyle\relax\else
gsave fill grestore
\fi
stroke}%
\pst@repeatarrows
\addto@pscode{grestore}
\ifx\psk@fillstyle\relax\else
\addto@pscode{%
gsave
\pst@usecolor\psfillcolor
gsave fill grestore
stroke
grestore}
\fi}
\def\pst@addborder{%
\addto@pscode{%
gsave
\psk@border 2 mul
CLW add SLW
\pst@usecolor\psbordercolor
stroke
grestore}}
\def\pst@stroke{%
\ifx\pslinestyle\@none\else
\addto@pscode{%
gsave
\pst@number\pslinewidth SLW
\pst@usecolor\pslinecolor
\@nameuse{psls@\pslinestyle}
grestore}%
\fi}
\def\pst@fill#1{\addto@pscode{gsave #1 grestore}}%
\def\pst@doublestroke{%
\addto@pscode{%
gsave
\psdoublesep SLW
\pst@usecolor\psdoublecolor
stroke
grestore}}
\def\pst@arrowtype{%
\ifx\psk@arrowB\@empty 0 \else -2 \fi
\ifx\psk@arrowA\@empty 0 \else -1 \fi
add}
\def\pst@addarrowdef{%
\addto@pscode{%
/ArrowA {
\ifx\psk@arrowA\@empty
\pst@oplineto
\else
\pst@arrowdef{A}
moveto
\fi
} def
/ArrowB {
\ifx\psk@arrowB\@empty \else \pst@arrowdef{B} \fi
} def}}
\def\pst@arrowdef#1{%
\ifnum\pst@repeatarrowsflag>\z@
/Arrow#1c [ 6 2 roll ] cvx def Arrow#1c
\fi
\tx@BeginArrow
\psk@arrowscale
\@nameuse{psas@\@nameuse{psk@arrow#1}}
\tx@EndArrow}
\def\pst@repeatarrows{%
\addto@pscode{%
gsave
\ifx\psk@arrowA\@empty\else
ArrowAc ArrowA pop pop
\fi
\ifx\psk@arrowB\@empty\else
ArrowBc ArrowB pop pop pop pop
\fi
grestore}}
\def\pst@OpenShowPoints{%
\addto@pscode{%
gsave
\psk@dotsize
\@nameuse{psds@\psk@dotstyle}
newpath
Points aload length 2 div 2 sub cvi /N ED
N 0 ge
{ \ifx\psk@arrowA\@empty
Dot
\else
pop pop
\fi
N { Dot } repeat
\ifx\psk@arrowB\@empty
Dot
\else
pop pop
\fi }
{ N 2 mul { pop } repeat }
ifelse
grestore}}
\def\pscustom{\pst@object{pscustom}}
\long\def\pscustom@i#1{%
\begin@SpecialObj
\solid@star
\let\pst@ifcustom\iftrue
\let\begin@ClosedObj\begin@CustomObj
\let\end@ClosedObj\endgroup
\def\begin@OpenObj{\begin@CustomObj\pst@addarrowdef}%
\let\end@OpenObj\endgroup
\let\begin@AltOpenObj\begin@CustomObj
\def\begin@SpecialObj{%
\begingroup
\pst@misplaced{special graphics object}%
\def\addto@pscode####1{}
\let\end@SpecialObj\endgroup}%
\def\@multips(##1)(##2)##3##4{\pst@misplaced\multips}%
\def\psclip##1{\pst@misplaced\psclip}%
\def\pst@repeatarrowsflag{\z@}%
\let\pst@setrepeatarrowsflag\relax
\showpointsfalse
\let\showpointstrue\relax
\def\pst@linetype{\pslinetype}%
\let\psset@liftpen\psset@@liftpen
\psset@liftpen{\z@}%
\def\pst@cp{/currentpoint load stopped pop }%
\def\pst@oplineto{/lineto load stopped { moveto } if }%
\def\pst@optcp##1##2{%
\ifnum##1=\z@\def##2{/currentpoint load stopped { 0 0 } if }\fi}%
\let\caddto@pscode\addto@pscode
\def\cuse@par##1{{\use@par##1}}%
\the\pst@customdefs
\setbox\pst@hbox=\hbox{#1}%
\psk@fillstyle
\pst@stroke
\end@SpecialObj}
\def\begin@CustomObj{%
\begingroup
\use@par
\addto@pscode{%
\pst@number\pslinewidth SLW
\pst@usecolor\pslinecolor}}
\def\pst@oplineto{moveto }
\def\pst@cp{}
\def\pst@optcp#1#2{}
\def\psset@liftpen#1{}
\def\psset@@liftpen#1{%
\ifcase#1\relax
\def\psk@liftpen{\z@}%
\def\pst@cp{/currentpoint load stopped pop }%
\def\pst@oplineto{/lineto load stopped { moveto } if }%
\or
\def\psk@liftpen{1}%
\def\pst@cp{}%
\def\pst@oplineto{/lineto load stopped { moveto } if }%
\or
\def\psk@liftpen{2}%
\def\pst@cp{}%
\def\pst@oplineto{moveto }%
\fi}
\psset@liftpen{0}
\def\psk@liftpen{-1}
\def\psset@linetype#1{%
\pst@getint{#1}\pslinetype
\ifnum\pst@dimg<-3
\@pstrickserr{linetype must be greater than -3}\@ehpa
\def\pslinetype{0}%
\fi}
\psset@linetype{0}
\def\caddto@pscode#1{%
\@pstrickserr{Command can only be used in \string\pscustom}\@ehpa}
\let\cuse@par\caddto@pscode
\def\tx@MSave{%
/msavemtrx
[ tx@Dict /msavemtrx known { msavemtrx aload pop } if CM ]
def }
\def\tx@MRestore{%
tx@Dict /msavemtrx known { length 0 gt } { false } ifelse
{ /msavematrx [ msavematrx aload pop setmatrix ] def }
if }
\newtoks\pst@customdefs
\pst@customdefs{%
\def\newpath{\addto@pscode{newpath}}%
\def\moveto(#1){\pst@@getcoor{#1}\addto@pscode{\pst@coor moveto}}%
\def\closepath{\addto@pscode{closepath}}%
\def\gsave{\begingroup\addto@pscode{gsave}}%
\def\grestore{\endgroup\addto@pscode{grestore}}%
% DG/SR modification begin - May 12, 1997 - Patch 2
%\def\translate(#1){\pst@@getcoor{#1}\addto@pscode{\pst@coor moveto}}%
\def\translate(#1){\pst@@getcoor{#1}\addto@pscode{\pst@coor translate}}%
% DG/SR modification end
\def\rotate#1{\pst@@getangle{#1}\addto@pscode{\pst@angle rotate}}%
\def\scale#1{\pst@getscale{#1}\pst@tempg\addto@pscode{\pst@tempg}}%
\def\msave{\addto@pscode{\tx@MSave}}%
\def\mrestore{\addto@pscode{\tx@MRestore}}%
\def\swapaxes{\addto@pscode{-90 rotate -1 1 scale}}%
\def\stroke{\pst@object{stroke}}%
\def\fill{\pst@object{fill}}%
\def\openshadow{\pst@object{openshadow}}%
\def\closedshadow{\pst@object{closedshadow}}%
% DG/SR modification begin - Jan. 7, 1998 - Patch 8
%\def\movepath(#1){\pst@@getcoor{#1}\addto@pscode{\pst@coor tx@Shadow}}%
\def\movepath(#1){\pst@@getcoor{#1}\addto@pscode{\pst@coor \tx@Shadow}}%
% DG/SR modification end
\def\lineto{\pst@onecoor{lineto}}%
\def\rlineto{\pst@onecoor{rlineto}}%
\def\curveto{\pst@threecoor{curveto}}%
\def\rcurveto{\pst@threecoor{rcurveto}}%
\def\code#1{\addto@pscode{#1}}%
\def\coor(#1){\pst@@getcoor{#1}\addto@pscode\pst@coor\@ifnextchar({\coor}{}}%
\def\rcoor{\pst@getcoors{}{}}%
\def\dim#1{\pssetlength\pst@dimg{#1}\addto@pscode{\pst@number\pst@dimg}}%
\def\setcolor#1{%
\@ifundefined{color@#1}{}{\addto@pscode{\use@color{#1}}}}%
\def\arrows#1{{\psset@arrows{#1}\pst@addarrowdef}}%
\let\file\pst@rawfile
} % END \pst@customdefs
\def\closedshadow@i{\cuse@par\pst@closedshadow}
\def\openshadow@i{\cuse@par\pst@openshadow}
\def\stroke@i{\cuse@par\pst@stroke}%
\def\fill@i{\cuse@par\psk@fillstyle}%
\def\pst@onecoor#1(#2){%
\pst@@getcoor{#2}%
\addto@pscode{\pst@coor #1}}
\def\pst@threecoor#1(#2)#3(#4)#5(#6){%
\begingroup
\pst@getcoor{#2}\pst@tempa
\pst@getcoor{#4}\pst@tempb
% DG/SR modification begin - Aug.  4, 1999 - Patch 11
%\pst@getcoor{#6}\pst@tembc
\pst@getcoor{#6}\pst@tempc
% DG/SR modification end
\addto@pscode{\pst@tempa \pst@tempb \pst@tempc #1}%
\endgroup}
\def\pst@rawfile#1{%
\begingroup
\def\do##1{\catcode`##1=12\relax}"
\dospecials
\catcode`\%=14
\pst@@rawfile{#1}%
\endgroup}
\def\pst@@rawfile#1{%
\immediate\openin1 #1
\ifeof1
\@pstrickserr{File `#1' not found}\@ehpa
\else
\immediate\read1 to \pst@tempg
\loop
\ifeof1 \@pstfalse\else\@psttrue\fi
\if@pst
\addto@pscode\pst@tempg
\immediate\read1 to \pst@tempg
\repeat
\fi
\immediate\closein1\relax}
\def\tx@NArray{NArray }
\def\tx@NArray{NArray }
\def\tx@Line{Line }
\def\tx@Arcto{Arcto }
\def\tx@CheckClosed{CheckClosed }
\def\tx@Polygon{Polygon }
\def\psset@gangle#1{\pst@getangle{#1}\psk@gangle}
\psset@gangle{0}
\def\tx@Diamond{Diamond }
\def\psdiamond{\pst@object{psdiamond}}
\def\psdiamond@i(#1){%
\@ifnextchar({\psdiamond@ii(#1)}{\psdiamond@ii(0,0)(#1)}}
\def\psdiamond@ii(#1)(#2){%
\begin@ClosedObj
\pst@getcoor{#1}\pst@tempa
\pst@getcoor{#2}\pst@tempb
\addto@pscode{%
\psline@iii
pop
\psk@dimen
\pst@tempb
\psk@gangle
\pst@tempa
\tx@Diamond}%
\def\pst@linetype{4}%
\end@ClosedObj}
\def\tx@Triangle{Triangle }
\def\pstriangle{\pst@object{pstriangle}}
\def\pstriangle@i(#1){%
\@ifnextchar({\pstriangle@ii(#1)}{\pstriangle@ii(0,0)(#1)}}
\def\pstriangle@ii(#1)(#2){%
\begin@ClosedObj
\pst@getcoor{#1}\pst@tempa
\pst@getcoor{#2}\pst@tempb
\addto@pscode{%
\psline@iii
pop
\psk@dimen
\pst@tempb
\psk@gangle
\pst@tempa
\tx@Triangle}%
\def\pst@linetype{2}%
\end@ClosedObj}
\def\tx@CCA{CCA }
\def\tx@CCA{CCA }
\def\tx@CC{CC }
\def\tx@IC{IC }
\def\tx@BOC{BOC }
\def\tx@NC{NC }
\def\tx@EOC{EOC }
\def\tx@BAC{BAC }
\def\tx@NAC{NAC }
\def\tx@EAC{EAC }
\def\tx@OpenCurve{OpenCurve }
\def\tx@AltCurve{AltCurve }
\def\tx@ClosedCurve{ClosedCurve }
\def\psset@curvature#1{%
\edef\pst@tempg{#1 }%
\expandafter\psset@@curvature\pst@tempg * * * \@nil}
\def\psset@@curvature#1 #2 #3 #4\@nil{%
\pst@checknum{#1}\pst@tempg
\pst@checknum{#2}\pst@temph
\pst@checknum{#3}\pst@tempi
\edef\psk@curvature{\pst@tempg \pst@temph \pst@tempi}}
\psset@curvature{1 .1 0}
\def\pscurve{\pst@object{pscurve}}
\def\pscurve@i{%
\pst@getarrows{%
\begin@OpenObj
\pst@getcoors[\pscurve@ii}}
\def\pscurve@ii{%
\addto@pscode{%
\pst@cp
\psk@curvature\space /c ED /b ED /a ED
\ifshowpoints true \else false \fi
\tx@OpenCurve}%
\end@OpenObj}
\def\psecurve{\pst@object{psecurve}}
\def\psecurve@i{%
\pst@getarrows{%
\begin@OpenObj
\pst@getcoors[\psecurve@ii}}
\def\psecurve@ii{%
\addto@pscode{%
\psk@curvature\space /c ED /b ED /a ED
\ifshowpoints true \else false \fi
\tx@AltCurve}%
\end@OpenObj}
\def\psccurve{\pst@object{psccurve}}
\def\psccurve@i{%
\begin@ClosedObj
\pst@getcoors[\psccurve@ii}
\def\psccurve@ii{%
\addto@pscode{%
\psk@curvature\space /c ED /b ED /a ED
\ifshowpoints true \else false \fi
\tx@ClosedCurve}%
\def\pst@linetype{1}%
\end@ClosedObj}
\def\psset@dotsize#1{%
\pst@expandafter\pst@getdimnum{#1} 0 {} {}\@nil
\edef\psk@@dotsize{\pst@number\pst@dimg}%
\let\psk@@@dotsize\pst@tempg
\edef\psk@dotsize{%
/DS \psk@@dotsize \psk@@@dotsize CLW mul add 2 div def }}
\psset@dotsize{2pt 2}
\def\psset@dotscale#1{%
\pst@getscale{#1}\psk@dotscale
\ifx\psk@dotscale\@empty
\def\psk@xdotscale{1 }%
\def\psk@ydotscale{1 }%
\else
\let\psk@xdotscale\pst@tempg
\let\psk@ydotscale\pst@temph
\fi}
% DG/SR modification begin - Oct. 17, 1997 - Patch 5
%\psset@dotscale{1}
% DG/SR modification end
\def\pst@Getangle#1#2{%
\pst@getangle{#1}\pst@tempg
\def\pst@temph{0. }%
\ifx\pst@tempg\pst@temph
\def#2{}%
\else
\edef#2{\pst@tempg\space rotate }%
\fi}
\def\psset@dotangle#1{%
\pst@getangle{#1}\psk@@dotangle
\ifdim\psk@@dotangle\p@=\z@
\let\psk@dotangle\@empty
\else
% DG/SR modification begin - Aug. 8, 1997 - Patch 4
%\edef\psk@dotangle{\psk@@dotangle rotate }
\edef\psk@dotangle{\psk@@dotangle rotate }%
% DG/SR modification end
\fi}
\psset@dotangle{0}
\def\pst@getdotsize{%
\pst@dimg=\psk@@@dotsize\pslinewidth
\advance\pst@dimg\psk@@dotsize\p@
\pst@dimh=\psk@ydotscale\pst@dimg
\pst@dimg=\psk@xdotscale\pst@dimg
\divide\pst@dimh 2
\divide\pst@dimg 2\relax}
% DG/SR modification begin - Oct. 17, 1997 - Patch 5
\psset@dotscale{1}
% DG/SR modification end
\def\psdot{\pst@object{psdot}}
\def\psdot@i{\@ifnextchar({\psdot@ii}{\psdot@ii(\z@,\z@)}}
\def\psdot@ii(#1){%
\begin@SpecialObj
\pst@@getcoor{#1}%
\addto@pscode{%
\psk@dotsize
\@nameuse{psds@\psk@dotstyle}%
\pst@coor Dot}%
\end@SpecialObj}
\def\psdots{\pst@object{psdots}}
\def\psdots@i{%
\begin@SpecialObj
\pst@getcoors[\psdots@ii}
\def\psdots@ii{%
\addto@pscode{false \tx@NArray \psdots@iii}%
\end@SpecialObj}
\def\psdots@iii{%
\psk@dotsize
\@nameuse{psds@\psk@dotstyle}
newpath
n { transform floor .5 add exch floor .5 add exch itransform Dot } repeat}
% DG: dead code (to suppress until \psset@dotstyle) ? - Aug. 4, 1997
\def\tx@SQ{SQ }
\def\tx@ST{ST }
\def\tx@SP{SP }
\def\pst@gdot#1{/Dot { gsave T \psk@dotangle \psk@dotscale #1 grestore } def }
\@namedef{psds@*}{\pst@gdot{0 0 DS \tx@SD}}
\@namedef{psds@o}{%
/r2 DS CLW sub def
\pst@gdot{0 0 DS \tx@SD \pst@usecolor\psfillcolor 0 0 r2 \tx@SD}}
\@namedef{psds@square*}{%
/r1 DS .886 mul def
\pst@gdot{r1 \tx@SQ}}
\@namedef{psds@square}{%
/r1 DS .886 mul def /r2 r1 CLW sub def
\pst@gdot{r1 \tx@SQ \pst@usecolor\psfillcolor r2 \tx@SQ}}
\@namedef{psds@triangle*}{%
/y1 DS .778 mul neg def /x1 y1 1.732 mul neg def
\pst@gdot{x1 y1 \tx@ST}}
\@namedef{psds@triangle}{%
/y1 DS .778 mul neg def /x1 y1 1.732 mul neg def
/y2 y1 CLW add def /x2 y2 1.732 mul neg def
\pst@gdot{x1 y1 \tx@ST \pst@usecolor\psfillcolor x2 y2 \tx@ST}}
\@namedef{psds@pentagon*}{%
/r1 DS 1.149 mul def
\pst@gdot{r1 \tx@SP}}
\@namedef{psds@pentagon}{%
DS .93 mul dup 1.236 mul /r1 ED CLW sub 1.236 mul /r2 ED
\pst@gdot{r1 \tx@SP \pst@usecolor\psfillcolor r2 \tx@SP}}
\@namedef{psds@+}{%
/DS DS 1.253 mul def
\pst@gdot{DS 0 moveto DS neg 0 L stroke 0 DS moveto 0 DS neg L stroke}}
\@namedef{psds@|}{%
\psk@tbarsize CLW mul add 2 div /DS ED
\pst@gdot{0 DS moveto 0 DS neg L stroke}}
% DG: end dead code?
\def\psset@dotstyle#1{%
\@ifundefined{psds@#1}%
{\@pstrickserr{Dot style `#1' not defined}\@eha}%
{\edef\psk@dotstyle{#1}}}
\psset@dotstyle{*}
\def\tx@FontDot{FontDot }
\def\newpsfontdot#1[#2]#3#4{%
\@namedef{psds@#1}{%
/#3 \psk@@dotangle [#2] \tx@FontDot
% DG/SR modification begin - Dec. 12, 1999 - Patch 14
%/Dot { moveto #4 show } bind def }}
/Dot { moveto gsave \psk@dotscale #4 show grestore } bind def }}
% DG/SR modification end
\def\newpsfontdotH#1[#2]#3#4#5{%
\@namedef{psds@#1}{%
/#3 \psk@@dotangle [#2] \tx@FontDot
/Dot {
moveto
\iftrue
% DG/SR modification begin - Dec. 23, 1999 - Patch 14
%gsave \pst@usecolor\psfillcolor #5 show grestore
%\fi
%#4 show
gsave \psk@dotscale \pst@usecolor\psfillcolor #5 show grestore
\fi
gsave \psk@dotscale #4 show grestore
% DG/SR modification end
} bind def }}
\pstheader{pst-dots.pro}
\newpsfontdot{*}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(b)}
\newpsfontdotH{o}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(c)}{(b)}
\newpsfontdotH{Bo}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(C)}{(b)}
\newpsfontdotH{triangle}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(t)}{(u)}
\newpsfontdotH{Btriangle}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(T)}{(u)}
\newpsfontdot{triangle*}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(u)}
\newpsfontdotH{square}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(s)}{(r)}
\newpsfontdotH{Bsquare}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(S)}{(r)}
\newpsfontdot{square*}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(r)}
\newpsfontdotH{pentagon}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(p)}{(q)}
\newpsfontdotH{Bpentagon}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(P)}{(q)}
\newpsfontdot{pentagon*}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(q)}
% DG/SR modification begin - Mar. 18, 1997 and Dec. 16, 1999 - Patch 14
%\newpsfontdot{diamond*}%
%[1.9 0.0 0.0 1.9 -0.4598 -0.70775]{Symbol}{<E0>}
%\newpsfontdot{diamond}%
%[2.3 0.0 0.0 2.3 -0.8533 -0.5336]{Symbol}{<A8>}
% D.G. modification begin - Jan. 17, 2000
\newpsfontdotH{diamond}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(d)}{(l)}
\newpsfontdotH{Bdiamond}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(D)}{(l)}
\newpsfontdot{diamond*}%
[1.0 0.0 0.0 1.0 0.0 0.0]{PSTricksDotFont}{(l)}
% DG/SR modification end
\newpsfontdot{oplus}%
[1.44928 0.0 0.0 1.44928 -0.562319 -0.478261]{Symbol}{<C5>}
\newpsfontdot{otimes}%
[1.44928 0.0 0.0 1.44928 -0.562319 -0.475362]{Symbol}{<C4>}
\newpsfontdot{x}%
[1.8 0.0 0.0 1.8 -0.495 -0.4788]{Symbol}{<B4>}
\newpsfontdot{+}%
[2.3 0.0 0.0 2.3 -0.6486 -0.5819]{Times-Roman}{<2B>}
\newpsfontdot{asterisk}%
[2.43309 0.0 0.0 2.43309 -0.609489 -1.14477]{Times-Roman}{<2A>}
\newpsfontdot{B+}%
[2.3 0.0 0.0 2.3 -0.6555 -0.5819]{Times-Bold}{<2B>}
\newpsfontdot{Basterisk}%
[2.29358 0.0 0.0 2.29358 -0.576835 -1.08486]{Times-Bold}{<2A>}
\newpsfontdot{|}%
% DG/SR modification begin - Oct. 27, 1997 - Patch 7
%[1.98413 0.0 0.0 1.98413 -0.258929 -0.712302]{Helvetica}{(|)}
[1.98413 0.0 0.0 1.38 -0.258929 -0.5]{Helvetica}{(|)}
% DG/SR modification end
\newpsfontdot{B|}%
% DG/SR modification begin - Oct. 27, 1997 - Patch 7
%[1.98413 0.0 0.0 1.98413 -0.277778 -0.78302]{Helvetica-Bold}{(|)}
[1.98413 0.0 0.0 1.38 -0.277778 -0.5]{Helvetica-Bold}{(|)}
% DG/SR modification end
\iffalse
\newpsfontdot{*}%
[2.77778 0.0 0.0 2.77778 -0.638889 -0.813889]{Symbol}{<B7>}
\newpsfontdot{o}%
[3.33333 0.0 0.0 3.33333 -0.666667 -1.78167]{Symbol}{<B0>}
\newpsfontdot{Bo}%
[4.69484 0.0 0.0 4.69484 -0.78169 -2.97418]{Times-Bold}{<CA>}
\fi
\newdimen\pslinearc
\def\psset@linearc#1{\pssetlength\pslinearc{#1}}
\psset@linearc{0pt}
\def\psline{\pst@object{psline}}
\def\psline@i{%
\pst@getarrows{%
\begin@OpenObj
\pst@getcoors[\psline@ii}}
\def\psline@ii{%
\addto@pscode{\pst@cp \psline@iii \tx@Line}%
\end@OpenObj}
\def\psline@iii{%
\ifdim\pslinearc>\z@
/r \pst@number\pslinearc def
/Lineto { \tx@Arcto } def
\else
/Lineto /lineto load def
\fi
\ifshowpoints true \else false \fi}
\def\qline(#1)(#2){%
\def\pst@par{}%
\begin@SpecialObj
\def\pst@linetype{0}%
\pst@getcoor{#1}\pst@tempa
\pst@@getcoor{#2}%
\addto@pscode{%
\pst@tempa moveto \pst@coor L
\@nameuse{psls@\pslinestyle}}%
\end@SpecialObj}
\def\pspolygon{\pst@object{pspolygon}}
\def\pspolygon@i{%
\begin@ClosedObj
\def\pst@cp{}%
\pst@getcoors[\pspolygon@ii}
\def\pspolygon@ii{%
\addto@pscode{\psline@iii \tx@Polygon}%
\def\pst@linetype{1}%
\end@ClosedObj}
\def\psset@framearc#1{\pst@checknum{#1}\psk@framearc}
\psset@framearc{0}
\def\psset@cornersize#1{%
\pst@expandafter\psset@@cornersize{#1}\@nil}
\def\psset@@cornersize#1#2\@nil{%
\if #1a\relax
\def\psk@cornersize{\pst@number\pslinearc false }%
\else
\def\psk@cornersize{\psk@framearc true }%
\fi}
\psset@cornersize{relative}
\def\tx@Rect{Rect }
\def\tx@OvalFrame{OvalFrame }
\def\tx@Frame{Frame }
\def\psset@dimen#1{%
\pst@expandafter\psset@@dimen{#1}\@nil}
\def\psset@@dimen#1#2\@nil{%
\if #1o\relax
\def\psk@dimen{.5 }%
\else
\if #1m\relax
\def\psk@dimen{0 }%
\else
\if #1i\relax
\def\psk@dimen{-.5 }%
\fi
\fi
\fi}
\psset@dimen{outer}
\def\psframe{\pst@object{psframe}}
\def\psframe@i(#1){%
\@ifnextchar({\psframe@ii(#1)}{\psframe@ii(0,0)(#1)}}
\def\psframe@ii(#1)(#2){%
\begin@ClosedObj
\pst@getcoor{#1}\pst@tempa
\pst@@getcoor{#2}%
\addto@pscode{\psk@cornersize \pst@tempa \pst@coor \psk@dimen \tx@Frame}%
\def\pst@linetype{2}%
\showpointsfalse
\end@ClosedObj}
\def\tx@BezierNArray{BezierNArray }
\def\tx@OpenBezier{OpenBezier }
\def\tx@ClosedBezier{ClosedBezier }
\def\tx@BezierShowPoints{BezierShowPoints }
\def\psbezier{\pst@object{psbezier}}
\def\psbezier@i{%
\pst@getarrows{%
\begin@OpenObj
\pst@getcoors[\psbezier@ii}}
\def\psbezier@ii{%
\addto@pscode{%
% DG/SR modification begin - Apr. 28, 1997 - Patch 1
% \psbezier doesn't work inside \pscustom
%\pst@cp
% DG/SR modification end
\ifshowpoints true \else false \fi
\tx@OpenBezier
\ifshowpoints \tx@BezierShowPoints \fi}%
\end@OpenObj}
\def\pscbezier{\pst@object{pscbezier}}
\def\pscbezier@i{%
\begin@ClosedObj
\pst@getcoors[\pscbezier@ii}
\def\pscbezier@ii{%
\addto@pscode{%
\ifshowpoints true \else false \fi
\tx@ClosedBezier
\ifshowpoints \tx@BezierShowPoints \fi}%
\chardef\pst@linetype=1
\end@ClosedObj}
\def\tx@Parab{Parab }
\def\parabola{\pst@object{parabola}}
\def\parabola@i{\pst@getarrows\parabola@ii}
\def\parabola@ii#1(#2)#3(#4){%
\begin@OpenObj
\pst@getcoor{#2}\pst@tempa
\pst@@getcoor{#4}%
\addto@pscode{\pst@tempa \pst@coor \tx@Parab}%
\end@OpenObj}
\def\psset@gridwidth#1{\pst@getlength{#1}\psk@gridwidth}
\psset@gridwidth{.8pt}
\def\psset@griddots#1{%
\pst@cntg=#1\relax
\edef\psk@griddots{\the\pst@cntg}}
\psset@griddots{0}
\def\psset@gridcolor#1{\pst@getcolor{#1}\psgridcolor}
\psset@gridcolor{black}
\def\psset@subgridwidth#1{\pst@getlength{#1}\psk@subgridwidth}
\psset@subgridwidth{.4pt}
\def\psset@subgridcolor#1{\pst@getcolor{#1}\pssubgridcolor}
\psset@subgridcolor{gray}
\def\psset@subgriddots#1{%
\pst@cntg=#1\relax\edef\psk@subgriddots{\the\pst@cntg}}
\psset@subgriddots{0}
\def\psset@subgriddiv#1{%
\pst@cntg=#1\relax\edef\psk@subgriddiv{\the\pst@cntg}}
\psset@subgriddiv{5}
\def\psset@gridlabels#1{\pst@getlength{#1}\psk@gridlabels}
\psset@gridlabels{10pt}
\def\psset@gridlabelcolor#1{\pst@getcolor{#1}\psgridlabelcolor}
\psset@gridlabelcolor{black}
\def\tx@Grid{Grid }
\def\psgrid{\pst@object{psgrid}}
\def\psgrid@i{\@ifnextchar(%
{\psgrid@ii}{\expandafter\psgrid@iv\pic@coor}}
\def\psgrid@ii(#1){\@ifnextchar(%
{\psgrid@iii(#1)}{\psgrid@iv(0,0)(0,0)(#1)}}
\def\psgrid@iii(#1)(#2){\@ifnextchar(%
{\psgrid@iv(#1)(#2)}{\psgrid@iv(#1)(#1)(#2)}}
\def\psgrid@iv(#1)(#2)(#3){%
\begin@SpecialObj
\pst@getcoor{#1}\pst@tempa
\pst@getcoor{#2}\pst@tempb
\pst@@getcoor{#3}%
\ifnum\psk@subgriddiv>1
\addto@pscode{gsave
\psk@subgridwidth SLW \pst@usecolor\pssubgridcolor
\pst@tempb \pst@coor \pst@tempa
\pst@number\psxunit \pst@number\psyunit
\psk@subgriddiv\space \psk@subgriddots\space
{} 0 \tx@Grid grestore}%
\fi
\addto@pscode{gsave
\psk@gridwidth SLW \pst@usecolor\psgridcolor
\pst@tempb \pst@coor \pst@tempa
\pst@number\psxunit \pst@number\psyunit
1 \psk@griddots\space { \pst@usecolor\psgridlabelcolor }
\psk@gridlabels \tx@Grid grestore}%
\end@SpecialObj}
\newif\ifpsmathbox
\psmathboxtrue
\def\pst@mathflag{\z@}
\newtoks\everypsbox
\let\pst@thisbox\relax
\long\def\pst@makenotverbbox#1#2{%
\edef\pst@mathflag{%
\ifpsmathbox\ifmmode\ifinner 1\else 2\fi\else \z@\fi\else \z@\fi}%
\setbox\pst@hbox=\hbox{%
\ifcase\pst@mathflag\or$\m@th\textstyle\or$\m@th\displaystyle\fi
{\pst@thisbox\the\everypsbox#2}%
\ifnum\pst@mathflag>\z@$\fi}%
#1}
\def\pst@makeverbbox#1{%
\def\pst@afterbox{#1}%
\edef\pst@mathflag{%
\ifpsmathbox\ifmmode\ifinner 1\else 2\fi\else \z@\fi\else \z@\fi}%
\afterassignment\pst@beginbox
\setbox\pst@hbox\hbox}
\def\pst@beginbox{%
\ifcase\pst@mathflag\or$\m@th\or$\m@th\displaystyle\fi
\bgroup\aftergroup\pst@endbox
\pst@thisbox
\the\everypsbox}
\def\pst@endbox{%
\ifnum\pst@mathflag>\z@$\fi
\egroup
\pst@afterbox}
\def\pst@makebox{\pst@@makebox}
\def\psverbboxtrue{\def\pst@@makebox{\pst@makeverbbox}}
\def\psverbboxfalse{\def\pst@@makebox{\pst@makenotverbbox}}
\psverbboxfalse
\def\pst@longbox{%
\def\pst@makebox{%
\gdef\pst@makebox{\pst@@makebox}%
\pst@makelongbox}}
\def\pst@makelongbox#1{%
\def\pst@afterbox{#1}%
\edef\pst@mathflag{%
\ifpsmathbox\ifmmode\ifinner 1\else 2\fi\else \z@\fi\else \z@\fi}%
\setbox\pst@hbox\hbox\bgroup
\aftergroup\pst@afterbox
\ifcase\pst@mathflag\or$\m@th\or$\m@th\displaystyle\fi
\begingroup
\pst@thisbox
\the\everypsbox}
\def\pst@endlongbox{%
\endgroup
\ifnum\pst@mathflag>\z@$\fi
\egroup}
\def\pslongbox#1#2{%
\@namedef{#1}{\pst@longbox#2}%
\@namedef{end#1}{\pst@endlongbox}}
\newdimen\psframesep
\def\psset@framesep#1{\pssetlength\psframesep{#1}}
\psset@framesep{3pt}
\newif\ifpsboxsep
\def\psset@boxsep#1{\@nameuse{psboxsep#1}}
\psset@boxsep{true}
\def\pst@useboxpar{%
\use@par
\if@star
\let\pslinecolor\psfillcolor
\solid@star
\let\solid@star\relax
\fi
\ifpsdoubleline \pst@setdoublesep \fi}
\def\psframebox{\pst@object{psframebox}}
\def\psframebox@i{\pst@makebox\psframebox@ii}
\def\psframebox@ii{%
\begingroup
\pst@useboxpar
\pst@dima=\pslinewidth
\advance\pst@dima by \psframesep
\pst@dimc=\wd\pst@hbox\advance\pst@dimc by \pst@dima
\pst@dimb=\dp\pst@hbox\advance\pst@dimb by \pst@dima
\pst@dimd=\ht\pst@hbox\advance\pst@dimd by \pst@dima
\setbox\pst@hbox=\hbox{%
\ifpsboxsep\kern\pst@dima\fi
\begin@ClosedObj
\addto@pscode{%
\psk@cornersize
\pst@number\pst@dima neg
\pst@number\pst@dimb neg
\pst@number\pst@dimc
\pst@number\pst@dimd
.5
\tx@Frame}%
\def\pst@linetype{2}%
\showpointsfalse
\end@ClosedObj
\box\pst@hbox
\ifpsboxsep\kern\pst@dima\fi}%
\ifpsboxsep\dp\pst@hbox=\pst@dimb\ht\pst@hbox=\pst@dimd\fi
\leavevmode\box\pst@hbox
\endgroup}
\def\psdblframebox{\pst@object{psdblframebox}}
\def\psdblframebox@i{\addto@par{doubleline=true}\psframebox@i}
\def\psclip#1{%
\leavevmode
\begingroup
\begin@psclip
\begingroup
\def\use@pscode{%
\pstVerb{%
\pst@dict
/mtrxc CM def
CP CP T
\tx@STV
\psk@origin
\psk@swapaxes
newpath
\pst@code
clip
newpath
mtrxc setmatrix
moveto
0 setgray
end}%
\gdef\pst@code{}}%
\def\@multips(##1)(##2)##3##4{\pst@misplaced\multips}%
\def\nc@object##1##2##3##4{\pst@misplaced{node connection}}%
\hbox to\z@{#1}%
\endgroup
\def\endpsclip{%
\end@psclip
\endgroup}%
\ignorespaces}
\def\endpsclip{\pst@misplaced\endpsclip}
\let\begin@psclip\relax
\def\end@psclip{\pstVerb{currentpoint initclip moveto}}
\def\AltClipMode{%
\def\end@psclip{\pstVerb{\pst@grestore}}%
\def\begin@psclip{\pstVerb{gsave}}}
\def\clipbox{\@ifnextchar[{\clipbox@}{\clipbox@[\z@]}}
% DG modification begin - Apr. 3, 1997
% From paulus@immd5.informatik.uni-erlangen.de (Dietrich Paulus)
%\def\clipbox@[#1]{\pst@makebox\clipbox@@{#1}}
\def\clipbox@[#1]{\pst@makebox{\clipbox@@{#1}}}
% DG modification end
\def\clipbox@@#1{%
\pssetlength\pst@dimg{#1}%
\leavevmode\hbox{%
\begin@psclip
\pst@Verb{%
CM \tx@STV CP T newpath
/a \pst@number\pst@dimg def
/w \pst@number{\wd\pst@hbox}a add def
/d \pst@number{\dp\pst@hbox}a add neg def
/h \pst@number{\ht\pst@hbox}a add def
a neg d moveto
a neg h L
w h L
w d L
closepath
clip
newpath
0 0 moveto
setmatrix}%
\unhbox\pst@hbox
\end@psclip}}
\def\psshadowbox{\pst@object{psshadowbox}}
\def\psshadowbox@i{\pst@makebox\psshadowbox@ii}
\def\psshadowbox@ii{%
\begingroup
\pst@useboxpar
\psshadowtrue
\psboxseptrue
\def\psk@shadowangle{-45 }%
\setbox\pst@hbox=\hbox{\psframebox@ii}%
\pst@dimh=\psk@shadowsize\p@
\pst@dimh=.7071\pst@dimh
\pst@dimg=\dp\pst@hbox
\advance\pst@dimg\pst@dimh
\dp\pst@hbox=\pst@dimg
\pst@dimg=\wd\pst@hbox
\advance\pst@dimg\pst@dimh
\wd\pst@hbox=\pst@dimg
\leavevmode
\box\pst@hbox
\endgroup}
\def\pscirclebox{\pst@object{pscirclebox}}
\def\pscirclebox@i{\pst@makebox\pscirclebox@ii}
\def\pscirclebox@ii{%
\begingroup
\pst@useboxpar
\setbox\pst@hbox=\hbox{%
\pst@nodehook
\pscirclebox@iii
\box\pst@hbox}%
\ifpsboxsep \pscirclebox@sep \fi
\leavevmode
\box\pst@hbox
\endgroup}
\def\pscirclebox@iii{%
\if@star
\pslinewidth\z@
\pstverb{\pst@dict \tx@STP \pst@usecolor\psfillcolor
newpath \pscirclebox@iv \tx@SD end}%
\else
\begin@ClosedObj
\def\pst@linetype{4}\showpointsfalse
\addto@pscode{%
\pscirclebox@iv CLW 2 div add 0 360 arc closepath}%
\end@ClosedObj
\fi}
\def\pscirclebox@iv{%
\pst@number{\wd\pst@hbox}2 div
\pst@number{\ht\pst@hbox}\pst@number{\dp\pst@hbox}add 2 div
2 copy \pst@number{\dp\pst@hbox}sub 4 2 roll
\tx@Pyth \pst@number\psframesep add }
\def\pscirclebox@sep{%
\pst@dimb=\ht\pst@hbox
\advance\pst@dimb\dp\pst@hbox
\divide\pst@dimb 2
\pst@dima=.5\wd\pst@hbox
\pst@pyth\pst@dima\pst@dimb\pst@dimc
\advance\pst@dimc\pslinewidth
\advance\pst@dimc\psframesep
\advance\pst@dimb-\pst@dimc
\setbox\pst@hbox=\hbox to2\pst@dimc{%
\hss
\vbox{\kern-\pst@dimb\box\pst@hbox}%
\hss}%
\advance\pst@dimb-\dp\pst@hbox
\dp\pst@hbox=-\pst@dimb}
\let\pst@nodehook\relax
\def\psCirclebox{\pst@object{psCirclebox}}
\def\psCirclebox@i{\pst@makebox\psCirclebox@ii}
\def\psCirclebox@ii{%
\begingroup
\pst@useboxpar
\pst@dima=\ht\pst@hbox
\advance\pst@dima\dp\pst@hbox
\divide\pst@dima\tw@
\pssetlength\pst@dimb\psk@radius
\setbox\pst@hbox=\hbox{%
\pst@nodehook
\pscircle(.5\wd\pst@hbox,\pst@dima){\pst@dimb}%
\box\pst@hbox}%
\ifpsboxsep \psCirclebox@sep \fi
\leavevmode
\box\pst@hbox
\endgroup}
\def\psCirclebox@sep{%
\pst@dimc=\pst@dimb
\advance\pst@dimb-\pst@dima
\advance\pst@dima\pst@dimc
\setbox\pst@hbox=\hbox to\tw@\pst@dimc{%
\hss
\vrule width \z@ depth \pst@dimb height \pst@dima
\box\pst@hbox
\hss}}%
\def\psovalbox{\pst@object{psovalbox}}
\def\psovalbox@i{\pst@makebox{\psovalbox@ii}}
\def\psovalbox@ii{%
\begingroup
\pst@useboxpar
\psovalbox@iii
\ifpsboxsep\psovalbox@sep\fi
\leavevmode
\box\pst@hbox
\endgroup}
\def\psovalbox@iii{%
\psovalbox@iv
\setbox\pst@hbox=\hbox{%
\begin@ClosedObj
\addto@pscode{%
0 360
\pst@number\pst@dimc CLW 2 div sub
\pst@number\pst@dimd CLW 2 div sub
\pst@number\pst@dima
\pst@number\pst@dimb
\tx@Ellipse
closepath}%
\def\pst@linetype{2}%
\end@ClosedObj
\unhbox\pst@hbox}}
\def\psovalbox@iv{%
\pst@dimc=\pslinewidth\advance\pst@dimc\psframesep
\pst@dimd=\ht\pst@hbox\advance\pst@dimd\dp\pst@hbox
\pst@dima=.5\wd\pst@hbox
\pst@dimb=.5\pst@dimd\advance\pst@dimb-\dp\pst@hbox
\pst@dimd=.707\pst@dimd
\advance\pst@dimd\pst@dimc
\advance\pst@dimc.707\wd\pst@hbox}
\def\psovalbox@sep{%
\setbox\pst@hbox\hbox to 2\pst@dimc{\hss\unhbox\pst@hbox\hss}%
\pst@dimg=\pst@dimd
\advance\pst@dimg-\pst@dimb
\dp\pst@hbox=\pst@dimg
\advance\pst@dimd\pst@dimb
\ht\pst@hbox=\pst@dimd}
\def\psdiabox{\pst@object{psdiabox}}
\def\psdiabox@i{\pst@makebox{\psdiabox@ii}}
\def\psdiabox@ii{%
\begingroup
\pst@useboxpar
\psdiabox@iii
\ifpsboxsep\psdiabox@sep\fi
\leavevmode
\box\pst@hbox
\endgroup}
\def\psdiabox@iv{%
\pst@dimg=.707\pslinewidth
\advance\pst@dimg.707\psframesep
\pst@dima=\wd\pst@hbox
\divide\pst@dima 2
\pst@dimc=\pst@dima
\advance\pst@dimc\pst@dimg
\pst@dimd=\ht\pst@hbox
\advance\pst@dimd\dp\pst@hbox
\divide\pst@dimd 2
\pst@dimb=\pst@dimd
\advance\pst@dimb-\dp\pst@hbox
\advance\pst@dimd\pst@dimg}
\def\psdiabox@iii{%
\psdiabox@iv
\setbox\pst@hbox=\hbox{%
\begin@ClosedObj
\addto@pscode{%
\psline@iii
pop
.5
\pst@number\pst@dimc 2 mul \pst@number\pst@dimd 2 mul
0
\pst@number\pst@dima \pst@number\pst@dimb
\tx@Diamond}%
\def\pst@linetype{4}%
\end@ClosedObj
\box\pst@hbox}}
\def\psdiabox@sep{%
\setbox\pst@hbox\hbox to 4\pst@dimc{\hss\unhbox\pst@hbox\hss}%
\multiply\pst@dimd 2
\advance\pst@dimd\pst@dimb
\ht\pst@hbox\pst@dimd
\advance\pst@dimd-2\pst@dimb
\dp\pst@hbox\pst@dimd}
\def\psset@trimode#1{\pst@expandafter\psset@@trimode{#1}\@empty\@empty\@nil}
\def\psset@@trimode#1#2#3\@nil{%
\let\pst@tempg#1\relax
\ifx\pst@tempg*%
\let\psk@@trimode\@empty
\let\pst@tempg#2\relax
\else
\let\psk@@trimode\relax
\fi
\edef\psk@trimode{%
\ifx R\pst@tempg 1 \else\ifx D\pst@tempg 2
\else\ifx L\pst@tempg 3 \else 0 \fi\fi\fi}}
\psset@trimode{U}
\def\pstribox{\pst@object{pstribox}}
\def\pstribox@i{\pst@makebox{\pstribox@ii}}
\def\pstribox@ii{%
\begingroup
\pst@useboxpar
\pstribox@iii
\ifpsboxsep\pstribox@sep\fi
\leavevmode
\box\pst@hbox
\endgroup}
\def\pstribox@iii{%
\pstribox@iv
\setbox\pst@hbox=\hbox{%
\begin@ClosedObj
\addto@pscode{%
\psline@iii
pop
.5
\pst@number\pst@dimc \pst@number\pst@dimd
\ifodd\psk@trimode exch \fi
\psk@trimode -90 mul
\pst@number\pst@dima \pst@number\pst@dimb
\tx@Triangle}%
\def\pst@linetype{2}%
\end@ClosedObj
\box\pst@hbox}}
\def\pstribox@iv{%
\pst@dimh=\pslinewidth
\advance\pst@dimh\psframesep
\pst@dimg=\ht\pst@hbox
\advance\pst@dimg-\dp\pst@hbox
\divide\pst@dimg 2
\edef\pst@tempa{\number\pst@dimg sp}% For use by nodes.
\ifodd\psk@trimode
\pst@dimb\pst@dimg
\else
\pst@dima=\wd\pst@hbox
\divide\pst@dima 2
\fi
\ifcase\psk@trimode
\pst@dimb=-\dp\pst@hbox
\advance\pst@dimb-\pst@dimh
\or
\pst@dima=-\pst@dimh
\or
\pst@dimb=\ht\pst@hbox
\advance\pst@dimb\pst@dimh
\or
\pst@dima=\wd\pst@hbox
\advance\pst@dima\pst@dimh
\fi
\pst@dimd=\dp\pst@hbox
\advance\pst@dimd\ht\pst@hbox
\ifx\psk@@trimode\relax
\pst@dimc=\wd\pst@hbox
\advance\pst@dimc\ifodd\psk@trimode 1.447\else 1.789\fi\pst@dimh
\multiply\pst@dimc 2
\advance\pst@dimd\ifodd\psk@trimode 1.789\else 1.447\fi\pst@dimh
\multiply\pst@dimd 2
\else
\ifodd\psk@trimode
\advance\pst@dimd 1.1547\wd\pst@hbox
\advance\pst@dimd 3.4641\pst@dimh
\pst@dimc=.866\pst@dimd
\else
\advance\pst@dimd .866\wd\pst@hbox %.866=(sqrt(3)/2)
\advance\pst@dimd 3\pst@dimh
\pst@dimc=1.1547\pst@dimd % 1.1547=(2/sqrt(3))
\fi
\fi}
\def\pstribox@sep{%
\ifodd\psk@trimode
\advance\pst@dimb.5\pst@dimd
\ht\pst@hbox=\pst@dimb
\advance\pst@dimd-\pst@dimb
\dp\pst@hbox=\pst@dimd
\else
\setbox\pst@hbox\hbox to \pst@dimc{\hss\unhbox\pst@hbox\hss}%
\global\pst@dimg=.5\pst@dimc
\fi
\ifcase\psk@trimode
\dp\pst@hbox-\pst@dimb
\advance\pst@dimd\pst@dimb
\ht\pst@hbox\pst@dimd
\or
\pst@dimg=.5\wd\pst@hbox
\global\advance\pst@dimg-\pst@dima
\setbox\pst@hbox\hbox to \pst@dimc{\kern-\pst@dima\box\pst@hbox\hss}%
\or
\ht\pst@hbox\pst@dimb
\advance\pst@dimd-\pst@dimb
\dp\pst@hbox\pst@dimd
\or
\pst@dimg=\pst@dimc
\advance\pst@dimg-\pst@dima
\global\advance\pst@dimg.5\wd\pst@hbox
\setbox\pst@hbox\hbox to \pst@dimc{%
\hss\box\pst@hbox\kern\psframesep\kern\pslinewidth}%
\fi}
\def\psset@arcsepA#1{\pst@getlength{#1}\psk@arcsepA}
\def\psset@arcsepB#1{\pst@getlength{#1}\psk@arcsepB}
\def\psset@arcsep#1{%
\psset@arcsepA{#1}\let\psk@arcsepB\psk@arcsepA}
\psset@arcsep{0}
\def\tx@ArcArrow{ArcArrow }
\def\psarc{\pst@object{psarc}}
\def\psarc@i{%
\@ifnextchar({\psarc@iii}{\psarc@ii}}
\def\psarc@ii#1{\addto@par{arrows=#1}%
\@ifnextchar({\psarc@iii}{\psarc@iii(0,0)}}
\def\psarc@iii(#1)#2#3#4{%
\begin@OpenObj
\pst@getangle{#3}\pst@tempa
\pst@getangle{#4}\pst@tempb
\pst@@getcoor{#1}%
\pssetlength\pst@dima{#2}%
\addto@pscode{\psarc@iv \psarc@v}%
\gdef\psarc@type{0}%
\showpointsfalse
\end@OpenObj}
\def\psarc@iv{%
\pst@coor /y ED /x ED
/r \pst@number\pst@dima def
/c 57.2957 r \tx@Div def
/angleA
\pst@tempa
\psk@arcsepA c mul 2 div
\ifcase \psarc@type add \or sub \fi
def
/angleB
\pst@tempb
\psk@arcsepB c mul 2 div
\ifcase \psarc@type sub \or add \fi
def
\ifshowpoints\psarc@showpoints\fi
\ifx\psk@arrowA\@empty
\ifnum\psk@liftpen=2
r angleA \tx@PtoC
y add exch x add exch
moveto
\fi
\fi}
\def\psarc@v{%
x y r
angleA
\ifx\psk@arrowA\@empty\else
{ ArrowA CP }
{ \ifcase\psarc@type add \or sub \fi }
\tx@ArcArrow
\fi
angleB
\ifx\psk@arrowB\@empty\else
{ ArrowB }
{ \ifcase\psarc@type sub \or add \fi }
\tx@ArcArrow
\fi
\ifcase\psarc@type arc \or arcn \fi}
\def\psarc@type{0}
\def\psarc@showpoints{%
gsave
newpath
x y moveto
x y r \pst@tempa \pst@tempb
\ifcase\psarc@type arc \or arcn \fi
closepath
CLW 2 div SLW
[ \psk@dash\space ] 0 setdash stroke
grestore }
\def\psarcn{\pst@object{psarcn}}
\def\psarcn@i{\def\psarc@type{1}\psarc@i}
\def\pscircle{\pst@object{pscircle}}
\def\pscircle@i{\@ifnextchar({\pscircle@do}{\pscircle@do(0,0)}}
\def\pscircle@do(#1)#2{%
\if@star
{\use@par\qdisk(#1){#2}}%
\else
\begin@ClosedObj
\pst@@getcoor{#1}%
\pssetlength\pst@dimc{#2}%
\def\pst@linetype{4}%
\addto@pscode{%
\pst@coor
\pst@number\pst@dimc
\psk@dimen CLW mul sub
0 360 arc
closepath}%
\showpointsfalse
\end@ClosedObj
\fi
\ignorespaces}
\def\qdisk(#1)#2{%
\def\pst@par{}%
\begin@SpecialObj
\pst@@getcoor{#1}%
\pssetlength\pst@dimg{#2}%
\addto@pscode{\pst@coor \pst@number\pst@dimg \tx@SD}%
\end@SpecialObj}
\def\psset@radius#1{\pst@@getlength{#1}\psk@radius}
\psset@radius{.25cm}
\def\psCircle{\pst@object{psCircle}}
\def\psCircle@i{\@ifnextchar({\psCircle@ii}{\psCircle@ii(0,0)}}
\def\psCircle@ii(#1){\pscircle@do(#1){\psk@radius}}
\def\pswedge{\pst@object{pswedge}}
\def\pswedge@i{\@ifnextchar({\pswedge@ii}{\pswedge@ii(0,0)}}
\def\pswedge@ii(#1)#2#3#4{%
\begin@ClosedObj
\pssetlength\pst@dimc{#2}
\pst@getangle{#3}\pst@tempa
\pst@getangle{#4}\pst@tempb
\pst@@getcoor{#1}%
\def\pst@linetype{1}%
\addto@pscode{%
\pst@coor
2 copy
moveto
\pst@number\pst@dimc \psk@dimen CLW mul sub % Adjusted radius
\pst@tempa \pst@tempb
arc
closepath}%
\showpointsfalse
\end@ClosedObj}
\def\tx@Ellipse{Ellipse }
\def\psellipse{\pst@object{psellipse}}
\def\psellipse@i(#1){\@ifnextchar(%
{\psellipse@ii(#1)}{\psellipse@ii(0,0)(#1)}}
\def\psellipse@ii(#1)(#2){%
\begin@ClosedObj
\pst@getcoor{#1}\pst@tempa
\pst@@getcoor{#2}%
\addto@pscode{%
0 360
\pst@coor
\ifdim\psk@dimen\p@=\z@\else
\psk@dimen CLW mul
dup 4 -1 roll sub neg 3 1 roll sub
\fi
\pst@tempa
\tx@Ellipse
closepath}%
\def\pst@linetype{2}%
\end@ClosedObj}
\def\multips{\@ifnextchar({\def\pst@par{}\multips@ii}{\multips@i}}
\def\multips@i#1{\def\pst@par{rot=#1}\multips@ii}
\def\multips@ii(#1){\@ifnextchar({\multips@iii(#1)}{\multips@iii(\z@,\z@)(#1)}}
\long\def\multips@iii(#1)(#2)#3#4{%
\begingroup
\use@par
\pst@getcoor{#1}\pst@tempa
\pst@@getcoor{#2}%
\pst@cnta=#3\relax
\init@pscode
\addto@pscode{%
\pst@tempa T \the\pst@cnta\space \pslbrace
gsave \ifx\psk@rot\@empty\else\psk@rot rotate \fi}%
\hbox to\z@{%
\def\init@pscode{%
\addto@pscode{%
gsave
\pst@number\pslinewidth SLW
\pst@usecolor\pslinecolor}}%
\def\use@pscode{\addto@pscode{grestore}}%
\def\psclip##1{\pst@misplaced\psclip}%
\def\nc@object##1##2##3##4{\pst@misplaced{node connection}}%
#4}%
\addto@pscode{grestore \pst@coor T \psrbrace repeat}%
\leavevmode
\use@pscode
\endgroup
\ignorespaces}
\def\scalebox#1{\pst@makebox{\@scalebox{#1}}}
\def\@scalebox#1{%
\begingroup
\pst@getscale{#1}\pst@tempa
\let\pst@tempc\pst@tempg
\let\pst@tempd\pst@temph
\@@scalebox
\endgroup}
\def\@@scalebox{%
\leavevmode
\hbox{%
\ifdim\pst@tempd\p@<\z@
\pst@dimg=\pst@tempd\ht\pst@hbox
\pst@dimh=\pst@tempd\dp\pst@hbox
\dp\pst@hbox=-\pst@dimg
\ht\pst@hbox=-\pst@dimh
\else
\ht\pst@hbox=\pst@tempd\ht\pst@hbox
\dp\pst@hbox=\pst@tempd\dp\pst@hbox
\fi
\pst@dima=\pst@tempc\wd\pst@hbox
\ifdim\pst@dima<\z@\kern-\pst@dima\fi
\pst@Verb{CP CP translate \pst@tempa \tx@NET}%
\hbox to \z@{\box\pst@hbox\hss}%
\pst@Verb{%
CP CP translate
1 \pst@tempc div 1 \pst@tempd div scale
\tx@NET}%
\ifdim\pst@dima>\z@\kern\pst@dima\fi}}
\pslongbox{Scalebox}{\scalebox}
\def\scaleboxto(#1,#2){\pst@makebox{\@scaleboxto(#1,#2)}}
\def\@scaleboxto(#1,#2){%
\begingroup
\pssetlength\pst@dima{#1}%
\pssetlength\pst@dimb{#2}%
\ifdim\pst@dima=\z@\else
\pst@divide{\pst@dima}{\wd\pst@hbox}\pst@tempc
\edef\pst@tempc{\pst@tempc\space}%
\fi
\ifdim\pst@dimb=\z@
\ifdim\pst@dima=\z@
\@pstrickserr{%
\string\scaleboxto\space dimensions cannot both be zero}\@ehpa
\def\pst@tempa{}%
\def\pst@tempc{1 }%
\def\pst@tempd{1 }%
\else
\let\pst@tempd\pst@tempc
\fi
\else
\pst@dimc=\ht\pst@hbox
\advance\pst@dimc\dp\pst@hbox
\pst@divide{\pst@dimb}{\pst@dimc}\pst@tempd
\edef\pst@tempd{\pst@tempd\space}%
\ifdim\pst@dima=\z@ \let\pst@tempc\pst@tempd \fi
\fi
\edef\pst@tempa{\pst@tempc \pst@tempd scale }%
\@@scalebox
\endgroup}
\pslongbox{Scaleboxto}{\scaleboxto}
\def\tx@Rot{Rot }
\def\rotateleft{\pst@makebox{\@rotateleft\pst@hbox}}
\def\@rotateleft#1{%
\leavevmode\hbox{\hskip\ht#1\hskip\dp#1\vbox{\vskip\wd#1%
\pst@Verb{90 \tx@Rot}
\vbox to \z@{\vss\hbox to \z@{\box#1\hss}\vskip\z@}%
\pst@Verb{-90 \tx@Rot}}}}
\def\rotateright{\pst@makebox{\@rotateright\pst@hbox}}
\def\@rotateright#1{%
\hbox{\hskip\ht#1\hskip\dp#1\vbox{\vskip\wd#1%
\pst@Verb{-90 \tx@Rot}
\vbox to \z@{\hbox to \z@{\hss\box#1}\vss}%
\pst@Verb{90 \tx@Rot}}}}
\def\rotatedown{\pst@makebox{\@rotatedown\pst@hbox}}
\def\@rotatedown#1{%
\hbox{\hskip\wd#1\vbox{\vskip\ht#1\vskip\dp#1%
\pst@Verb{180 \tx@Rot}%
\vbox to \z@{\hbox to \z@{\box#1\hss}\vss}%
\pst@Verb{-180 \tx@Rot}}}}
\pslongbox{Rotateleft}{\rotateleft}
\pslongbox{Rotateright}{\rotateright}
\pslongbox{Rotatedown}{\rotatedown}
\def\pst@starbox{%
\setbox\pst@hbox\hbox{\psframebox*[boxsep=false]{\unhbox\pst@hbox}}}
\def\pst@@makesmall#1{%
\setbox#1=\hbox to\z@{\hss\vbox to \z@{\vss\box#1\vss}\hss}}
\def\pst@@@makesmall#1{%
\pst@dimh=\psk@xref\wd#1%
\ifx\psk@yref\relax
\pst@dimg=\dp#1%
\else
\pst@dimg=\psk@yref\ht#1%
\advance\pst@dimg\psk@yref\dp#1%
\fi
\setbox#1=\hbox to\z@{%
\kern-\pst@dimh\vbox to\z@{\vss\box#1\kern-\pst@dimg}\hss}}
\def\psset@ref#1{\pst@expandafter\psset@@ref{#1}\@empty,,\@nil}
\def\psset@@ref#1#2,#3,#4\@nil{%
\def\psk@xref{.5}%
\def\psk@yref{.5}%
\let\pst@makesmall\pst@@@makesmall
\ifx\@empty#3\@empty
\@nameuse{getref@#1}%
\@nameuse{getref@#2}%
\else
\pst@checknum{#1#2}\psk@xref
\pst@checknum{#3}\psk@yref
\fi}
\def\getref@c{\let\pst@makesmall\pst@@makesmall}
\def\getref@t{\def\psk@yref{1}}
\def\getref@b{\def\psk@yref{0}}
\def\getref@B{\let\psk@yref\relax}
\def\getref@l{\def\psk@xref{0}}
\def\getref@r{\def\psk@xref{1}}
\psset@ref{c}
\def\psset@rot#1{%
\pst@expandafter{\@ifnextchar*{\psset@@@rot}{\psset@@rot}}{#1}\@nil}
\def\psset@@rot#1\@nil{%
\def\next##1@#1=##2@##3\@nil{%
\ifx\relax##2%
\pst@getangle{#1}\psk@rot
\else
\def\psk@rot{##2}%
\fi}%
\expandafter\next\pst@rottable @#1=\relax @\@nil}
\def\psset@@@rot#1#2\@nil{%
\psset@@rot#2\@nil
\edef\psk@rot{\pst@rotlist \ifx\psk@rot\@empty\else\psk@rot add \fi}}
\def\pst@rotlist{mark RAngle /a ED cleartomark a neg }
\def\pst@rottable{%
@0=%
@U=%
@L=90 %
@D=180 %
@R=-90 %
@N=\pst@rotlist
@W=\pst@rotlist 90 add %
@S=\pst@rotlist 180 add %
@E=\pst@rotlist 90 sub }
\psset@rot{0}
\def\tx@RotBegin{RotBegin }
\def\tx@RotEnd{RotEnd }
\def\pst@rotate#1#2{%
\ifx#1\@empty\else
\setbox#2=\hbox{\pst@Verb{#1 \tx@RotBegin}\box#2\pst@Verb{\tx@RotEnd}}%
\fi}
\def\psput@cartesian#1{%
\hbox to \z@{\kern\pst@dimg{\vbox to \z@{\vss\box#1\vskip\pst@dimh}\hss}}}
\def\psput@special#1{%
\hbox{%
\pst@Verb{{ \pst@coor } \tx@PutCoor \tx@PutBegin}%
\box#1%
\pst@Verb{\tx@PutEnd}}}
\def\tx@PutCoor{PutCoor }
\def\tx@PutBegin{PutBegin }
\def\tx@PutEnd{PutEnd }
\def\rput{\def\pst@par{}\pst@ifstar{\@ifnextchar[{\rput@i}{\rput@ii}}}
\def\rput@i[#1]{\addto@par{ref={#1}}\rput@ii}
\def\rput@ii{\@ifnextchar({\rput@iv}{\rput@iii}}
\def\rput@iii#1{\addto@par{rot={#1}}\@ifnextchar({\rput@iv}{\rput@iv(\z@,\z@)}}
\def\rput@iv(#1){\pst@killglue\pst@makebox{\rput@v{#1}}}
\def\rput@v#1{%
\begingroup
\use@par
\if@star\pst@starbox\fi
\pst@makesmall\pst@hbox
\pst@rotate\psk@rot\pst@hbox
\psput@{#1}\pst@hbox
\endgroup
\ignorespaces}
\def\multirput{%
\def\pst@par{}%
\pst@ifstar{\@ifnextchar[{\multirput@i}{\multirput@ii}}}
\def\multirput@i[#1]{\addto@par{ref={#1}}\multirput@ii}
\def\multirput@ii{\@ifnextchar({\multirput@iv}{\multirput@iii}}
\def\multirput@iii#1{\addto@par{rot={#1}}\multirput@iv}
\def\multirput@iv(#1){%
\@ifnextchar({\multirput@v(#1)}{\multirput@v(\z@,\z@)(#1)}}
\def\multirput@v(#1,#2)(#3,#4)#5{%
\pst@makebox{\multirput@vi(#1,#2)(#3,#4){#5}}}
\def\multirput@vi(#1,#2)(#3,#4)#5{%
\begingroup
\use@par
\if@star\pst@starbox\fi
\pst@makesmall\pst@hbox
\pst@rotate\psk@rot\pst@hbox
\pssetxlength\pst@dima{#1}%
\pssetylength\pst@dimb{#2}%
\pssetxlength\pst@dimc{#3}%
\pssetylength\pst@dimd{#4}%
\pst@cntg=#5\relax
\pst@cnth=\@ne
\leavevmode
\loop
\vbox to \z@{%
\vss
\hbox to \z@{\kern\pst@dima\copy\pst@hbox\hss}%
\vskip\pst@dimb}%
\ifnum\pst@cntg>\pst@cnth
\advance\pst@dima\pst@dimc
\advance\pst@dimb\pst@dimd
\advance\pst@cnth\@ne
\repeat
\endgroup
\ignorespaces}
\newif\if@fixedradius
\def\cput{\pst@object{cput}}
\def\cput@i{\@fixedradiusfalse\cput@ii}
\def\cput@ii{\pst@killglue\@ifnextchar({\cput@iv}{\cput@iii}}
\def\cput@iii#1{%
\addto@par{rot={#1}}%
\@ifnextchar({\cput@iv}{\cput@iv(\z@,\z@)}}
\def\cput@iv(#1){\pst@makebox{\cput@v{#1}}}
\def\cput@v#1{%
\begingroup
\use@par
\setbox\pst@hbox=\hbox{%
\psboxsepfalse
\if@fixedradius\psCirclebox@ii\else\pscirclebox@ii\fi}%
\pst@@makesmall\pst@hbox
\pst@rotate\psk@rot\pst@hbox
\psput@{#1}\pst@hbox
\endgroup
\ignorespaces}
\def\Cput{\pst@object{Cput}}
\def\Cput@i{\@fixedradiustrue\cput@ii}
\newdimen\pslabelsep
\def\psset@labelsep#1{\pssetlength\pslabelsep{#1}}
\psset@labelsep{5pt}
\def\psset@refangle#1{\pst@expandafter\psset@@refangle{#1}\@nil}
\def\psset@@refangle#1\@nil{%
\def\next##1@#1=##2"##3@##4\@nil{%
\ifx\relax##2%
\pst@getangle{#1}\psk@refangle
\def\psk@uputref{}%
\else
\def\psk@refangle{##2 }%
\def\psk@uputref{##3}%
\fi}%
\expandafter\next\pst@refangletable @#1=\relax"@\@nil}
\def\pst@refangletable{%
@r=0"20%
@u=90"02%
@l=180"10%
@d=-90"01%
@ur=45"22%
@ul=135"12%
@dr=-135"21%
@dl=-45"11}
\psset@refangle{0}
% DG/SR modification begin - Mar. 24, 1999 - Patch 10
%\def\uput{\def\pst@par{}\@ifnextchar[{\uput@ii}{\uput@i}}
\def\uput{\def\pst@par{}\pst@ifstar{\@ifnextchar[{\uput@ii}{\uput@i}}} 
% DG/SR modification end
\def\uput@i#1{\addto@par{labelsep=#1}\uput@ii}
\def\uput@ii[#1]{%
\addto@par{refangle={#1}}%
\@ifnextchar({\uput@iv}{\uput@iii}}
\def\uput@iii#1{%
\addto@par{rot={#1}}%
\@ifnextchar({\uput@iv}{\uput@iv(\z@,\z@)}}
\def\uput@iv(#1){\pst@killglue\pst@makebox{\uput@v{#1}}}
\def\uput@v#1{%
\begingroup
\use@par
\if@star\pst@starbox\fi
\uput@vi
\psput@{#1}\pst@hbox
\endgroup
\ignorespaces}
\def\uput@vi{%
\ifx\psk@uputref\@empty
\uput@vii\tx@UUput{}%
\else
\ifx\psk@rot\@empty
\expandafter\uput@viii\psk@uputref
\else
\uput@vii\tx@UUput{}%
\fi
\fi}
\def\uput@vii#1#2{%
\edef\pst@coor{%
\pst@number\pslabelsep
#2%
\pst@number{\wd\pst@hbox}%
\pst@number{\ht\pst@hbox}%
\pst@number{\dp\pst@hbox}%
\psk@refangle\space \ifx\psk@rot\@empty\else\psk@rot\space sub \fi
\tx@Uput #1}%
\setbox\pst@hbox=\hbox to\z@{\hss\vbox to\z@{\vss\box\pst@hbox\vss}\hss}%
\setbox\pst@hbox=\psput@special\pst@hbox
\ifx\psk@rot\@empty\else\pst@rotate\psk@rot\pst@hbox\fi}
\def\uput@viii#1#2{%
\ifnum#1>\z@\ifnum#2>\z@\pslabelsep=.707\pslabelsep\fi\fi
\setbox\pst@hbox=\vbox to\z@{%
\ifnum#2=1 \vskip\pslabelsep\else\vss\fi
\hbox to\z@{%
\ifnum#1=2 \hskip\pslabelsep\else\hss\fi
\box\pst@hbox
\ifnum#1=1 \hskip\pslabelsep\else\hss\fi}%
\ifnum#2=2 \vskip\pslabelsep\else\vss\fi}}
\def\tx@Uput{Uput }
\def\tx@UUput{UUput }
\def\Rput{\def\pst@par{}\pst@ifstar{\@ifnextchar[{\Rput@ii}{\Rput@i}}}
\def\Rput@i#1{\addto@par{labelsep=#1}\Rput@ii}
\def\Rput@ii[#1]{\addto@par{ref={#1}}\@ifnextchar({\Rput@iv}{\Rput@iii}}
\def\Rput@iii#1{\addto@par{rot={#1}}\@ifnextchar({\Rput@iv}{\Rput@iv(\z@,\z@)}}
\def\Rput@iv(#1){\pst@killglue\pst@makebox{\Rput@v{#1}}}
\def\Rput@v#1{%
\begingroup
\use@par
\if@star\pst@starbox\fi
\Rput@vi
\pst@makesmall\pst@hbox
\pst@rotate\psk@rot\pst@hbox
\psput@{#1}\pst@hbox
\endgroup
\ignorespaces}
\def\Rput@vi{%
\pst@dimg=\dp\pst@hbox
\advance\pst@dimg\pslabelsep
\dp\pst@hbox=\pst@dimg
\pst@dimg=\ht\pst@hbox
\advance\pst@dimg\pslabelsep
\ht\pst@hbox=\pst@dimg
\setbox\pst@hbox\hbox{\kern\pslabelsep\box\pst@hbox\kern\pslabelsep}}%
\def\oldpsput{%
\def\pst@par{}\pst@ifstar{\@ifnextchar[{\oldpsput@i}{\oldpsput@ii}}}
\def\oldpsput@i[#1]{\addto@par{ref={#1}}\oldpsput@ii}
\def\oldpsput@ii{\@ifnextchar<{\oldpsput@iii}{\oldpsput@iv}}
\def\oldpsput@iii<#1>{\rput@iii{#1}}
\def\OldPsput{\let\psput\oldpsput}
\def\NewPsput{\let\psput\rput}
\def\pspicture{\begingroup\pst@ifstar\pst@picture}
\def\pst@picture{%
\@ifnextchar[{\pst@@picture}{\pst@@picture[0]}}
\def\pst@@picture[#1]#2(#3,#4){%
\@ifnextchar({\pst@@@picture[#1](#3,#4)}%
{\pst@@@picture[#1](0,0)(#3,#4)}}
\def\pst@@@picture[#1](#2,#3)(#4,#5){%
\pssetxlength\pst@dima{#2}%
\pssetylength\pst@dimb{#3}%
\pssetxlength\pst@dimc{#4}%
\pssetylength\pst@dimd{#5}%
\ifdim\pst@dima>\pst@dimc
\pst@dimg=\pst@dima
\pst@dima=\pst@dimc
\pst@dimc=\pst@dimg
\fi
\ifdim\pst@dimb>\pst@dimd
\pst@dimg=\pst@dimb
\pst@dimb=\pst@dimd
\pst@dimd=\pst@dimg
\fi
\def\pst@tempa{#1}%
\setbox\pst@hbox=\hbox\bgroup
\begingroup\KillGlue
\@ifundefined{@latexerr}{}{\let\unitlength\psunit}%
\edef\pic@coor{(#2,#3)(#2,#3)(#4,#5)}\ignorespaces}
\def\pic@coor{(0,0)(0,0)(10,10)}
\def\endpspicture{%
\pst@killglue
\endgroup
\egroup
\ifdim\wd\pst@hbox=\z@\else
%\@pstrickserr{Extraneous space in the pspicture environment}%
%{Type \space <return> \space to procede.}%
\fi
\ht\pst@hbox=\pst@dimd
\dp\pst@hbox=-\pst@dimb
\setbox\pst@hbox=\hbox{%
\kern-\pst@dima
\ifx\pst@tempa\@empty\else
\advance\pst@dimd-\pst@dimb
\pst@dimd=\pst@tempa\pst@dimd
\advance\pst@dimd\pst@dimb
\lower\pst@dimd
\fi
\box\pst@hbox
\kern\pst@dimc}%
\if@star\setbox\pst@hbox=\hbox{\clipbox@@\z@}\fi
\leavevmode\box\pst@hbox
\endgroup}
\@namedef{pspicture*}{\pspicture*}
\@namedef{endpspicture*}{\endpspicture}
\def\tx@BeginOL{BeginOL }
\def\tx@InitOL{InitOL }
\def\pst@initoverlay#1{\pst@Verb{\tx@InitOL /TheOL (#1) def}}
\def\AltOverlayMode{%
\def\pst@initoverlay##1{%
\pst@Verb{%
\tx@InitOL
/Visible { initclip } def
/Invisible {
CP newpath OLUnit itransform moveto clip newpath moveto
} def
/TheOL (##1) def}}}
\def\pst@overlay#1{%
\edef\curr@overlay{#1}%
\pst@Verb{(#1) BOL}%
\aftergroup\pst@endoverlay}
\def\pst@endoverlay{%
\pst@Verb{(\curr@overlay) BOL}}
\def\curr@overlay{all}
\newbox\theoverlaybox
\def\overlaybox{%
\global\setbox\theoverlaybox=\hbox\bgroup
\begingroup
\let\psoverlay\pst@overlay
\def\overlaybox{%
\@pstrickserr{Overlays cannot be nested}\@eha}%
\def\putoverlaybox{%
\@pstrickserr{You must end the overlay box
before using \string\putoverlaybox}}%
\psoverlay{main}%
\ignorespaces}
\def\endoverlaybox{\endgroup\egroup}
\def\putoverlaybox#1{%
\hbox{\pst@initoverlay{#1}\copy\theoverlaybox}}
\def\psoverlay{\@pstrickserr{\string\psoverlay\space
can only be used after \string\overlaybox}}
\ifx\pstcustomize\relax \input pstricks.con \fi
\catcode`\@=\PstAtCode\relax
%
\endinput
%%
%% END: pstricks.tex

pst-text.tex
%% BEGIN pst-text.tex
%%
%% Placing text on a path with PSTricks 97.
%% See the PSTricks User's Guide for description.
%% See tp-test.tex for sample input and tp-test.ps for sample output.
%% This uses the header file `pst-text.pro'.
%%
\def\fileversion{97}
\def\filedate{1997/03/25}
%%
%% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu.
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt.
%%
\message{ v\fileversion, \filedate}

\csname PSTextPathLoaded\endcsname
\let\PSTextPathLoaded\endinput

\ifx\PSTricksLoaded\endinput\else
  \def\next{\input pstricks.tex}\expandafter\next
\fi

\edef\TheAtCode{\the\catcode`\@}
\catcode`\@=11

\pstheader{pst-text.pro}

\def\pstextpath{\@ifnextchar[{\pstextpath@}{\pstextpath@[l]}}
\def\pstextpath@[#1]{%
  \@ifnextchar({\pstextpath@@[#1]}{\pstextpath@@[#1](0,\TPoffset)}}
\def\pstextpath@@[#1](#2)#3{\pst@makebox{\pstextpath@@@[#1](#2){#3}}}
\def\pstextpath@@@[#1](#2,#3)#4{%
  \pst@killglue
  \begingroup
    \ifx c#1\relax
      \def\pst@tempa{.5}%
    \else
      \ifx r#1\relax
        \def\pst@tempa{1}%
      \else
        \def\pst@tempa{0}%
      \fi
    \fi
    \def\use@pscode{%
      \pst@Verb{%
        /mtrxc CM def
        \tx@STV
        CP translate
        newpath
        \pst@code\space
        mtrxc setmatrix
        0 setgray}%
      \gdef\pst@code{}}%
    \def\psclip#1{\pst@misplaced\psclip}%
    \let\endpsclip\relax
    \def\@multips(##1)(##2)##3##4{\pst@misplaced\multips}%
    \def\nc@object##1##2##3##4{\pst@misplaced{node connection}}%
    \def\PSTtoEPS@i##1##2{\pst@misplaced\PSTtoEPS}%
    \pssetlength\pst@dima{#2}%
    \pssetlength\pst@dimb{#3}%
    \setbox\pst@hbox\hbox{%
      \hbox to\z@{%
        \kern -\wd\pst@hbox
        % BoxWidth = CurrX - Hoffset.
        \pstVerb{tx@TextPathDict begin
          currentpoint pop /Hoffset exch def end}%
        \kern\pst@dima
        % XOffset = Voffset - Hoffset (extra horizontal skip)
        \pstVerb{tx@TextPathDict begin
          currentpoint pop /Voffset exch def end}%
        \hss
        \pstVerb{%
          /tx@TextPathSavedShow /show load def
          \pst@dict \tx@PathLength end
          dup 0 gt
          { tx@TextPathDict begin \pst@tempa\space InitTextPath end
            /show { tx@TextPathDict begin TextPathShow end } def
          }
          { pop }
          ifelse}}%
      \raise\pst@dimb\box\pst@hbox
      \pstVerb{%
        currentpoint newpath moveto
        /show /tx@TextPathSavedShow load def}}%
    \wd\pst@hbox=\z@ \dp\pst@hbox=\z@ \ht\pst@hbox=\z@
    \leavevmode
    \hbox{{#4}\box\pst@hbox}%
  \endgroup\ignorespaces}
\def\TPoffset{-.7ex}

\catcode`\@=\TheAtCode\relax

\endinput
%%
%% END pst-text.tex

pst-tree.tex
%% BEGIN pst-tree.tex
%%
%% Trees with PSTricks 97.
%%
\def\fileversion{97 patch 5}
\def\filedate{1999/10/28}
%%
%% COPYRIGHT 1993, 1994, 1999 by Timothy Van Zandt, tvz@nwu.edu.
%%
%% This program can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License Distributed from CTAN
%% archives in directory macros/latex/base/lppl.txt.
%%
\message{ v\fileversion, \filedate}

\csname PSTreeLoaded\endcsname
\let\PSTreeLoaded\endinput

\ifx\PSTnodesLoaded\endinput\else\input pst-node.tex\fi\relax

\edef\TheAtCode{\the\catcode`\@}
\catcode`\@=11

\newbox\pstree@rootbox
\newbox\pstree@box
\def\pstree@succrow{%
\ifpstreeflip
\def\pssubtree@vertical{\pssubtree@vertical@vflip}%
\else
\def\pssubtree@vertical{\pssubtree@vertical@v}%
\fi
\def\pstree@node{\pstree@node@v}%
\def\pssubtree@horizontal{\pssubtree@horizontal@v}}%
\def\pssubtree@vertical@v{%
\vrule height \pst@dimc depth \pst@dimd width \z@
\ifnum\psnodecnt=\z@
\global\let\pstree@theleftprofile\pstree@leftprofile
\global\let\pstree@therightprofile\pstree@rightprofile
\else
\psk@thistreefit\pstree@therightprofile\pstree@leftprofile
\kern\the\pst@cnth sp
\pstree@zip\pstree@therightprofile
\pstree@rightprofile\pstree@therightprofile
\global\advance\pstree@cnt\pst@cnth
\pst@cnth=\pstree@cnt
\pstree@zip\pstree@leftprofile
\pstree@theleftprofile\pstree@theleftprofile
\fi
\box\pstree@box
\global\advance\psnodecnt 1\relax}%
\def\pssubtree@vertical@vflip{%
\vrule height \pst@dimc depth \pst@dimd width \z@
\ifnum\psnodecnt=\z@
\global\let\pstree@theleftprofile\pstree@leftprofile
\global\let\pstree@therightprofile\pstree@rightprofile
\else
\psk@thistreefit\pstree@theleftprofile\pstree@rightprofile
\kern-\pst@cnth sp
\pstree@zip\pstree@theleftprofile
\pstree@leftprofile\pstree@theleftprofile
\global\advance\pstree@cnt\pst@cnth
\pst@cnth=\pstree@cnt
\pstree@zip\pstree@rightprofile
\pstree@therightprofile\pstree@therightprofile
\fi
\box\pstree@box
\global\advance\psnodecnt 1\relax}%
\def\pstree@node@v{%
\edef\pstree@leftprofile{\psk@thistreenodesize\pst@dima,\pstree@stop,}%
\edef\pstree@rightprofile{\psk@thistreenodesize\pst@dimb,\pstree@stop,}%
\pssubtree@vertical}%
\def\pssubtree@horizontal@v{%
\pstree@max\pstree@upprofile\pst@cntg
\pst@dimc=\pst@cntg sp
\pstree@max\pstree@downprofile\pst@cntg
\pst@dimd=\pst@cntg sp
\pstree@treebboxadjust
\edef\pstree@leftprofile{\number\pst@dima,\pstree@stop,}%
\edef\pstree@rightprofile{\number\pst@dimb,\pstree@stop,}%
\pssubtree@vertical}%
\def\pstree@tightfit#1#2{%
\pst@cnth=\z@
\edef\next{\noexpand\pstree@@tightfit#1\noexpand\@nil#2\noexpand\@nil}%
\next
\advance\pst@cnth\psk@thistreesep\relax
\advance\pst@cnth\pstree@tspace\relax
\gdef\pstree@tspace{\z@}}
\def\pstree@@tightfit#1,#2\@nil#3,#4\@nil{%
\ifnum#1=\pstree@stop
\let\next\relax
\else
\ifnum#3=\pstree@stop
\let\next\relax
\else
\pst@cntg=#1
\advance\pst@cntg#3
\ifnum\pst@cntg>\pst@cnth
\pst@cnth=\pst@cntg
\fi
\def\next{\pstree@@tightfit#2\@nil#4\@nil}%
\fi
\fi
\next}
\def\pstree@loosefit#1#2{%
\pstree@max{#1}\pst@cnth
\pstree@max{#2}\pst@cntg
\advance\pst@cnth\pst@cntg
\advance\pst@cnth\psk@thistreesep\relax
\advance\pst@cnth\pstree@tspace\relax
\gdef\pstree@tspace{\z@}}
\def\tspace#1{%
\pst@@killglue
\pssetlength\pst@dimg{#1}%
\xdef\pstree@tspace{\number\pst@dimg}%
\ignorespaces}
\def\psset@treefit#1{%
\@ifundefined{pstree@#1fit}%
{\@pstrickserr{Bad `treefit' parameter value: `#1'}\@ehpa}%
{\expandafter\let\expandafter\psk@treefit\csname pstree@#1fit\endcsname}}
\psset@treefit{tight}
\def\psset@thistreefit#1{%
\@ifundefined{pstree@#1fit}%
{\@pstrickserr{Bad `treefit' parameter value: `#1'}\@ehpa}%
{\expandafter\let\expandafter\psk@thistreefit
\csname pstree@#1fit\endcsname}}
\psset@treefit{tight}
\def\pstree@zip#1#2#3{%
\def\pst@tempg{}%
\edef\next{\noexpand\pstree@@zip#1\noexpand\@nil#2\noexpand\@nil}%
\next
\global\let#3\pst@tempg}
\def\pstree@@zip#1,#2\@nil#3,#4\@nil{%
\ifnum#1=\pstree@stop
\edef\pst@tempg{\pst@tempg#3,#4}%
\let\next\relax
\else
\ifnum#3=\pstree@stop
\pst@cntg=#1
\advance\pst@cntg-\pst@cnth
\edef\pst@tempg{\pst@tempg\the\pst@cntg,}%
\def\next{\pstree@@zip#2\@nil\pstree@stop,\@nil}%
\else
\edef\pst@tempg{\pst@tempg#3,}%
\def\next{\pstree@@zip#2\@nil#4\@nil}%
\fi
\fi
\next}
\def\pstree@max#1#2{%
\pst@cntg=\z@
\expandafter\pstree@@max#1%
#2=\pst@cntg}%
\def\pstree@@max#1,{%
\ifnum#1=\pstree@stop\else
\ifnum#1>\pst@cntg \pst@cntg=#1 \fi
\expandafter\pstree@@max
\fi}
\def\pstree@add#1{%
\def\pst@tempg{}%
\expandafter\pstree@@add#1%
\xdef#1{\pst@tempg\pstree@stop,}}
\def\pstree@@add#1,{%
\ifnum#1=\pstree@stop\else
\pst@cnth=#1
\advance\pst@cnth\pst@cntg
\xdef\pst@tempg{\pst@tempg\the\pst@cnth,}%
\expandafter\pstree@@add
\fi}
\newcount\psnodecnt
\let\c@psnodecnt\psnodecnt
\newcount\pstreelevel
\let\c@pstreelevel\pstreelevel
\newcount\pstreecnt
\let\c@pstreecnt\pstreecnt
\newcount\pstree@cnt
\def\pstree{\def\pst@par{}\pst@object{pstree}}
\def\pstree@i{\def\pstree@makebox{\pst@@makebox}\pstree@ii}
\def\psTree{\def\pst@par{}\pst@object{psTree}}
\def\psTree@i{\def\pstree@makebox{\pst@makelongbox}\pstree@ii}
\def\endpsTree{\pst@endlongbox\ignorespaces}
\def\pstree@ii{%
\ifnum\pstreelevel=\z@
\let\pstree@savedshortput\pst@shortput
\psset@shortput{tab}%
\else
\pst@@killglue
\fi
\begingroup
\begingroup
\def\pstree@node{%
\xdef\pstree@next{%
\noexpand\@psttrue
\noexpand\def\noexpand\pst@tempa{\number\pst@dima}%
\noexpand\def\noexpand\pst@tempb{\number\pst@dimb}%
\noexpand\def\noexpand\pst@tempc{\number\pst@dimc}%
\noexpand\def\noexpand\pst@tempd{\number\pst@dimd}}%
\box\pstree@box}%
\def\pssubtree@horizontal{\pssubtree@horizontal@o}%
\def\pssubtree@vertical{\pssubtree@vertical@o}%
\global\let\pstree@next\relax
\pst@makebox\pstree@iii}
\def\pstree@iii{%
\global\setbox\pst@boxg=\box\pst@hbox
\endgroup
\setbox\pstree@rootbox=\box\pst@boxg
\@pstfalse
\pstree@next
\if@pst
\ifdim\wd\pstree@rootbox=\z@\else
\@pstrickserr{Extraneous space in root node}\@ehpa
\wd\pstree@rootbox=\z@
\fi
\else
\@pstrickserr{Missing or bad root node
(level \the\pstreelevel, node \the\psnodecnt)}\@ehpa
\def\pstree@next{%
\def\pst@tempa{0}%
\def\pst@tempb{0}%
\def\pst@tempc{0}%
\def\pst@tempd{0}}%
\wd\pstree@rootbox=\z@
\fi
\pstree@savevalues
\begingroup
\pstree@initsuccvalues
\pstree@setlevelpar
\pstree@do}
\def\pstree@setlevelpar{%
\advance\pstreelevel1
\let\psk@thislevelsep\relax
\let\psk@thistreesep\relax
\let\psk@thistreefit\relax
\let\psk@thistreenodesize\relax
\csname pstreehook\romannumeral\pstreelevel\endcsname
\use@par
\ifx\psk@thistreesep\relax
\let\psk@thistreesep\psk@treesep
\fi
\ifx\psk@thistreenodesize\relax
\let\psk@thistreenodesize\psk@treenodesize
\fi
\ifx\psk@thistreefit\relax
\let\psk@thistreefit\psk@treefit
\fi
\ifx\psk@thislevelsep\relax
\let\psk@thislevelsep\psk@levelsep
\let\psk@thislevelsepmode\psk@levelsepmode
\fi
\ifnum\psk@treemode=\pstree@predmode\else
\global\advance\pstreecnt1
\edef\pstree@thetree{\the\pstreecnt}%
\let\pstree@predmode\psk@treemode
\fi
\ifx\psk@thislevelsepmode\relax
\pst@dimg=\psk@thislevelsep\relax
\pst@cntg=0\@nameuse{%
pstree@levelsepadjust-\pstree@thetree-\the\pstreelevel}%
\advance\pst@dimg\pst@cntg sp
\edef\psk@thislevelsep{\number\pst@dimg sp}%
\fi
\ifnum\psk@treemode>1
\def\pst@tposflip{1 sub neg }%
\else
\def\pst@tposflip{}%
\fi
\ifx\pstree@bboxadjust\@empty\else
\xdef\pstree@treebboxadjust{%
\pstree@bboxadjust
\ifpsshowbbox\noexpand\pstree@showbbox\fi}%
\gdef\pstree@bboxadjust{}%
\fi
\let\pst@thispsbox\@skiplevelfalse}
\def\pstree@predmode{-1}
\def\pstree@savevalues{%
\edef\pstree@restorevalues{%
\noexpand\gdef\noexpand\pstree@theleftprofile{\pstree@theleftprofile}%
\noexpand\gdef\noexpand\pstree@therightprofile{\pstree@therightprofile}%
\noexpand\gdef\noexpand\pstree@theupprofile{\pstree@theupprofile}%
\noexpand\gdef\noexpand\pstree@thedownprofile{\pstree@thedownprofile}%
\noexpand\gdef\noexpand\pstree@tspace{\pstree@tspace}%
\noexpand\gdef\noexpand\pssucc{\pssucc}%
\global\psnodecnt=\the\psnodecnt\relax
\global\pstree@cnt=\the\pstree@cnt\relax}%
\let\pstree@savebboxadjust\pstree@treebboxadjust}
\def\pstree@initsuccvalues{%
\def\pstree@therightprofile{\pstree@stop,}%
\let\pstree@theleftprofile\pstree@therightprofile
\let\pstree@theupprofile\pstree@therightprofile
\let\pstree@thedownprofile\pstree@therightprofile
\psnodecnt=\z@
\pstree@cnt\z@
\gdef\pstree@tspace{\z@}%
\let\pspred\pssucc}
\def\pssucc{T}
\pstree@initsuccvalues
\def\pstree@down{%
\pstree@succrow
\pstree@makebox{\pstree@vertical{\lower}}}
\def\pstree@up{%
\pstree@succrow
\pstree@makebox{\pstree@vertical{\raise}}}
\def\pstree@levelsepadjust#1#2{%
% DG/SR modification begin - May 14, 1997 - Patch 1
% Problem with levelsep=*...
%\pst@cntg=0\@nameuse{pstree@levelsepadjust-#1}%
\pst@cntg=0\@nameuse{pstree@levelsepadjust-#1}
% DG/SR modification end
\ifnum#2>\pst@cntg
\expandafter\xdef\csname pstree@levelsepadjust-#1\endcsname
{#2}%
\fi}
% DG/SR modification begin - October 28, 1999 - Patch 5 - For plain TeX
\ifx\@undefined\@auxout\newwrite\@auxout\fi
% DG/SR modification end
\def\pstree@initlevelsepadjust{%
\@ifundefined{@latexerr}{%
\immediate\openin1 \jobname.pst
\ifeof1 \else
\input \jobname.pst
\fi
\immediate\closein1
\csname newwrite\endcsname\pstree@auxout
\immediate\openout\pstree@auxout \jobname.pst }%
{\let\pstree@auxout\@auxout}%
\global\let\pstree@initlevelsepadjust\relax}
\newcount\pstree@stop
\pstree@stop=-987654321
\def\pstree@vertical#1{%
\pst@cntg=\ifpstreeflip-\fi\wd\pst@hbox
\divide\pst@cntg 2
\pstree@add\pstree@theleftprofile
\pstree@add\pstree@therightprofile
\pst@dimg=\psk@thislevelsep\relax
\ifx\psk@thislevelsepmode\relax
\pstree@vertlevelsepadjust{#1}%
\fi
\global\setbox\pstree@box=\hbox{%
\vrule height \pst@tempc sp depth \pst@tempd sp width \z@
\unhbox\pstree@rootbox
#1\pst@dimg\hbox to\z@{\hss\unhbox\pst@hbox\hss}}%
\if@skiplevel
\skiplevel@vertical
\else
\endgroup
\fi
\edef\pstree@leftprofile{\pst@tempa,\pstree@theleftprofile}%
\edef\pstree@rightprofile{\pst@tempb,\pstree@therightprofile}%
\pst@dimc=\ht\pstree@box
\pst@dimd=\dp\pstree@box
\ifpsshowbbox
\pstree@max\pstree@leftprofile\pst@cntg
\pst@dima=\pst@cntg sp
\pstree@max\pstree@rightprofile\pst@cntg
\pst@dimb=\pst@cntg sp
\pstree@showbbox
\fi
\dp\pstree@box=\z@
\ht\pstree@box=\z@
\pstree@restorevalues
\pssubtree@vertical
\global\let\pstree@treebboxadjust\pstree@savebboxadjust
\endgroup
\ifnum\pstreelevel>\z@\expandafter\ignorespaces\fi}
\def\pstree@vertlevelsepadjust#1{%
\ifx\if@filesw\iffalse\else
\ifx#1\lower
\pst@dimh=\pst@tempd sp
\advance\pst@dimh\ht\pst@hbox
\else
\pst@dimh=\pst@tempc sp
\advance\pst@dimh\dp\pst@hbox
\fi
\immediate\write\@auxout{%
\string\pstree@levelsepadjust
{\pstree@thetree-\the\pstreelevel}{\number\pst@dimh}}%
\fi}
\def\pstree@succcolumn{%
\def\pssubtree@vertical{\pssubtree@vertical@h}%
\def\pssubtree@horizontal{\pssubtree@horizontal@h}%
\def\pstree@node{\pstree@node@h}}%
\def\pssubtree@horizontal@h{%
\xdef\pstree@theleftprofile{\number\pst@dima,\pstree@theleftprofile}%
\xdef\pstree@therightprofile{\number\pst@dimb,\pstree@therightprofile}%
\ifnum\psnodecnt=\z@
\global\let\pstree@theupprofile\pstree@upprofile
\global\let\pstree@thedownprofile\pstree@downprofile
\box\pstree@box
\else
\ifpstreeflip
\pssubtree@horizontal@@hflip
\else
\pssubtree@horizontal@@h
\fi
\fi
\global\advance\psnodecnt 1\relax}
\def\pssubtree@horizontal@@h{%
\psk@thistreefit\pstree@thedownprofile\pstree@upprofile
\global\advance\pstree@cnt\pst@cnth
\lower\the\pstree@cnt sp\box\pstree@box
\pstree@zip\pstree@thedownprofile\pstree@downprofile\pstree@thedownprofile
\pst@cnth=\pstree@cnt
\pstree@zip\pstree@upprofile\pstree@theupprofile\pstree@theupprofile}
\def\pssubtree@horizontal@@hflip{%
\psk@thistreefit\pstree@theupprofile\pstree@downprofile
\global\advance\pstree@cnt\pst@cnth
\raise\the\pstree@cnt sp\box\pstree@box
\pstree@zip\pstree@theupprofile\pstree@upprofile\pstree@theupprofile
\pst@cnth=\pstree@cnt
\pstree@zip\pstree@downprofile\pstree@thedownprofile\pstree@thedownprofile}
\def\pstree@node@h{%
\edef\pstree@upprofile{\psk@thistreenodesize\pst@dimc,\pstree@stop,}%
\edef\pstree@downprofile{\psk@thistreenodesize\pst@dimd,\pstree@stop,}%
\pssubtree@horizontal@h}%
\def\pssubtree@vertical@h{%
\pstree@max\pstree@leftprofile\pst@cntg
\pst@dima=\pst@cntg sp
\pstree@max\pstree@rightprofile\pst@cntg
\pst@dimb=\pst@cntg sp
\pstree@treebboxadjust
\edef\pstree@upprofile{\number\pst@dimc,\pstree@stop,}%
\edef\pstree@downprofile{\number\pst@dimd,\pstree@stop,}%
\pssubtree@horizontal@h}%
\newif\if@psrighttree
\def\pstree@right{%
\@psrighttreetrue
\pstree@succcolumn
\pstree@makebox\pstree@horizontal}
\def\pstree@left{%
\@psrighttreefalse
\pstree@succcolumn
\pstree@makebox\pstree@horizontal}
\def\pstree@horizontal{%
\ifdim\wd\pst@hbox=\z@\else
\@pstrickserr{Extraneous space in tree successors}\@ehpa
\fi
\pst@cntg=\ifpstreeflip\ht\else\dp\fi\pst@hbox
\divide\pst@cntg 2
\pstree@add\pstree@theupprofile
\pstree@add\pstree@thedownprofile
% DG/SR modification begin - Sep. 24, 1997 - Patch 3
%\ifx\psk@thislevelsepmode\relax
%\pstree@horizlevelsepadjust
%\fi
% DG/SR modification end
\pst@dimg\psk@thislevelsep\relax
\global\setbox\pstree@box=\hbox{%
\unhbox\pstree@rootbox
\kern\if@psrighttree\else-\fi\pst@dimg
\ifpstreeflip\lower\else\raise\fi\pst@cntg sp\box\pst@hbox}%
% DG/SR modification begin - Sep. 24, 1997 - Patch 3
\ifx\psk@thislevelsepmode\relax
\pstree@horizlevelsepadjust
\fi
% DG/SR modification end
\if@psrighttree
\pst@dimh=\pst@dimg
\pstree@max\pstree@therightprofile\pst@cntg
\global\advance\pst@dimh\pst@cntg sp
\global\pst@dimg=\pst@tempa sp
\else
\pstree@max\pstree@theleftprofile\pst@cntg
\global\advance\pst@dimg\pst@cntg sp
\global\pst@dimh=\pst@tempb sp
\fi
\if@skiplevel
\skiplevel@horizontal
\else
\endgroup
\fi
\pst@dima=\pst@dimg
\pst@dimb=\pst@dimh
\edef\pstree@upprofile{\pst@tempc,\pstree@theupprofile}%
\edef\pstree@downprofile{\pst@tempd,\pstree@thedownprofile}%
\dp\pstree@box=\z@
\ht\pstree@box=\z@
\wd\pstree@box=\z@
\ifpsshowbbox
\pstree@max\pstree@upprofile\pst@cntg
\pst@dimc=\pst@cntg sp
\pstree@max\pstree@downprofile\pst@cntg
\pst@dimd=\pst@cntg sp
\pstree@showbbox
\fi
\pstree@restorevalues
\pssubtree@horizontal
\endgroup
\ifnum\pstreelevel>\z@\expandafter\ignorespaces\fi}
% DG/SR modification begin - Sep. 24, 1997 - Patch 2
%\def\pstree@horizlevelsepadjust#1{%
\def\pstree@horizlevelsepadjust{%
% DG/SR modification end
\ifx\if@filesw\iffalse\else
\if@psrighttree
\pst@dimh=\pst@tempb sp
\pstree@max\pstree@theleftprofile\pst@cntg
\advance\pst@dimh\pst@cntg sp
\else
\pst@dimh=\pst@tempa sp
\pstree@max\pstree@therightprofile\pst@cntg
\advance\pst@dimh\pst@cntg sp
\fi
\immediate\write\@auxout{%
\string\pstree@levelsepadjust
{\pstree@thetree-\the\pstreelevel}{\number\pst@dimh}}%
\fi}
\def\psset@treemode#1{%
\pst@cntg=
\ifx#1U\@empty2\else\ifx#1R\@empty1\else\ifx#1L\@empty3\else0\fi\fi\fi
\relax
\edef\psk@treemode{\the\pst@cntg}%
\ifcase\pst@cntg
\let\pstree@do\pstree@down
\or
\let\pstree@do\pstree@right
\or
\let\pstree@do\pstree@up
\or
\let\pstree@do\pstree@left
\fi}
\def\psk@treemode{0}
\let\pstree@do\pstree@down
\def\psset@treesep#1{%
\pssetlength\pst@dimg{#1}%
\edef\psk@treesep{\number\pst@dimg}}%
\psset@treesep{.75cm}
\def\psset@thistreesep#1{%
\pssetlength\pst@dimg{#1}%
\edef\psk@thistreesep{\number\pst@dimg}}%
\def\psset@treenodesize#1{%
\pssetlength\pst@dimg{#1}%
\ifdim\pst@dimg<\z@
\let\psk@treenodesize\number
\else
\edef\psk@treenodesize{\number\pst@dimg\noexpand\@gobble}%
\fi}
\psset@treenodesize{-1pt}
\def\psset@thistreenodesize#1{%
\pssetlength\pst@dimg{#1}%
\ifdim\pst@dimg<\z@
\let\psk@thistreenodesize\number
\else
\edef\psk@thistreenodesize{\number\pst@dimg\noexpand\@gobble}%
\fi}
\def\psset@levelsep#1{%
\pst@expandafter{\pst@ifstar\psset@@levelsep}{#1}\@nil}
\def\psset@@levelsep#1\@nil{%
\pst@@getlength{#1}\psk@levelsep
\if@star
\pstree@initlevelsepadjust
\let\psk@levelsepmode\relax
\else
\def\psk@levelsepmode{}%
\fi}
\psset@levelsep{2cm}
\def\psset@thislevelsep#1{%
\pst@expandafter{\pst@ifstar\psset@@thislevelsep}{#1}\@nil}
\def\psset@@thislevelsep#1\@nil{%
\pst@@getlength{#1}\psk@thislevelsep
\if@star
\pstree@initlevelsepadjust
\let\psk@thislevelsepmode\relax
\else
\def\psk@thislevelsepmode{}%
\fi}
\newif\ifpstreeflip
\def\psset@treeflip#1{\@nameuse{pstreeflip#1}}
\psset@treeflip{false}
\def\pstree@node@o{%
\leavevmode
\hbox{%
\vrule height \pst@dimc depth \pst@dimd width \z@
\kern\pst@dima
\box\pstree@box
\kern\pst@dimb}}
\def\pssubtree@vertical@o{%
\pstree@max\pstree@leftprofile\pst@cntg
\pst@dima=\pst@cntg sp
\pstree@max\pstree@rightprofile\pst@cntg
\pst@dimb=\pst@cntg sp
\pstree@treebboxadjust
\pstree@node}
\def\pssubtree@horizontal@o{%
\pstree@max\pstree@upprofile\pst@cntg
\pst@dimc=\pst@cntg sp
\pstree@max\pstree@downprofile\pst@cntg
\pst@dimd=\pst@cntg sp
\pstree@treebboxadjust
\pstree@node}
\def\pstree@outer{%
\def\pstree@node{\pstree@node@o}%
\def\pssubtree@vertical{\pssubtree@vertical@o}%
\def\pssubtree@horizontal{\pssubtree@horizontal@o}%
\pstreelevel=\z@
\def\pstree@predmode{-1}%
\def\pst@tposflip{}%
\let\pst@thisbox\relax
\let\pst@shortput\pstree@savedshortput}
\let\pstree@savedshortput\ignorespaces
\pstree@outer
\newif\ifpsshowbbox
\def\psset@showbbox#1{\@nameuse{psshowbbox#1}}%
\psset@showbbox{false}
\def\pstree@showbbox{%
\setbox\pstree@box=\hbox{%
\psframe[linewidth=0,linecolor=black,linestyle=solid,fillstyle=none]%
(-\pst@dima,-\pst@dimd)(\pst@dimb,\pst@dimc)%
\box\pstree@box}}%
\def\psset@edge#1{%
\def\psedge{#1}%
\ifx\psedge\@none
\def\psedge##1##2{}%
\fi}
\psset@edge{\ncline}
\def\pspred{T}
\def\pstree@makenodebox{%
\pst@@killglue
\let\pst@thispsbox\pstree@outer
\pst@makebox}
\def\begin@treenode{%
\pst@@killglue
\begingroup
\use@par
\global\let\pstree@edge\psedge
\xdef\pssucc{\pspred-\the\psnodecnt}}
\def\MakeShortTnput#1{%
\def\end@treenode{\@ifnextchar#1{\tnput@}{\end@@treenode}}}
\MakeShortTnput{~}
\def\end@@treenode{%
\pstree@bboxadjust
\gdef\pstree@bboxadjust{}%
\ifpsshowbbox\pstree@showbbox\fi
\pstree@node
\endgroup
\ifnum\pstreelevel>\z@
\pstree@edge{\pspred}{\pssucc}%
\expandafter\pst@shortput
\else
\expandafter\ignorespaces
\fi}
\def\pstree@bboxadjust{}
\def\pstree@setbboxadjust#1#2{%
\pssetlength\pst@dimg{#1}%
\xdef\pstree@bboxadjust{%
\pstree@bboxadjust
#2\number\pst@dimg sp\relax}}
\def\psset@bbl#1{\pstree@setbboxadjust{#1}{\pst@dima=}}
\def\psset@bbr#1{\pstree@setbboxadjust{#1}{\pst@dimb=}}
\def\psset@bbh#1{\pstree@setbboxadjust{#1}{\pst@dimc=}}
\def\psset@bbd#1{\pstree@setbboxadjust{#1}{\pst@dimd=}}
\def\psset@xbbl#1{\pstree@setbboxadjust{#1}{\advance\pst@dima}}
\def\psset@xbbr#1{\pstree@setbboxadjust{#1}{\advance\pst@dimb}}
\def\psset@xbbh#1{\pstree@setbboxadjust{#1}{\advance\pst@dimc}}
\def\psset@xbbd#1{\pstree@setbboxadjust{#1}{\advance\pst@dimd}}
\let\pstree@treebboxadjust\relax
\def\Tn{\def\pst@par{}\pst@object{Tn}}
\def\Tn@i{%
\pst@@killglue
\global\let\pssucc\pspred
\begingroup
\pst@dima=\z@
\pst@dimb=\z@
\pst@dimc=\z@
\pst@dimd=\z@
\setbox\pstree@box=\hbox{}%%
\pstree@node
\endgroup
\ignorespaces}
\def\Tp{\def\pst@par{}\pst@object{Tp}}
\def\Tp@i{%
\begin@treenode
\pst@dima=\z@
\pst@dimb=\z@
\pst@dimc=\z@
\pst@dimd=\z@
\setbox\pstree@box=\hbox{%
\pst@newnode{\pssucc}{10}{0 0 }{\tx@InitPnode}}%
\end@treenode}
\def\Tc{\def\pst@par{}\pst@object{Tc}}
\def\Tc@i#1{%
\begin@treenode
\pssetlength\pst@dima{#1}%
\pst@dimb=\pst@dima
\pst@dimc=\pst@dima
\pst@dimd=\pst@dima
\nodealignfalse
\setbox\pstree@box=\hbox{\cnode@ii(\z@,\z@){#1}{\pssucc}}%
\end@treenode}
\def\TC{\def\pst@par{}\pst@object{TC}}
\def\TC@i{\Tc@i{\psk@radius}}
\def\Toval{\def\pst@par{}\pst@object{Toval}}
\def\Toval@i{\pstree@makenodebox{\Toval@ii\ovalnode@ii}}
\def\Toval@ii#1{%
\begin@treenode
\nodealigntrue
\setbox\pstree@box=\hbox{#1\pssucc}%
\pst@dima=\wd\pstree@box
\divide\pst@dima 2
\pst@dimb=\pst@dima
\pst@dimc=\ht\pstree@box
\pst@dimd=\dp\pstree@box
\setbox\pstree@box=\hbox to\z@{\hss\unhbox\pstree@box\hss}%
\dp\pstree@box=\z@
\ht\pstree@box=\z@
\end@treenode}
\def\Tcircle{\def\pst@par{}\pst@object{Tcircle}}
\def\Tcircle@i{\pstree@makenodebox{\Toval@ii\circlenode@ii}}
\def\Tf{\def\pst@par{}\pst@object{Tf}}
\def\Tf@i{\Toval@ii{\fnode@ii()}}
\def\Tdia{\def\pst@par{}\pst@object{Tdia}}
\def\Tdia@i{\pstree@makenodebox{\Toval@ii\dianode@ii}}
\def\Ttri{\def\pst@par{}\pst@object{Ttri}}
\def\Ttri@i{\pstree@makenodebox{\Ttri@ii}}
\def\Ttri@ii{%
\begin@treenode
\nodealigntrue
\setbox\pstree@box=\hbox{\trinode@ii\pssucc}%
\pst@dima=\pst@dimg % Set by \pst@triboxsep
\pst@dimb=\wd\pstree@box
\advance\pst@dimb-\pst@dima
\pst@dimc=\ht\pstree@box
\pst@dimd=\dp\pstree@box
\setbox\pstree@box=\hbox to\z@{\hss\unhbox\pstree@box\hss}%
\dp\pstree@box=\z@
\ht\pstree@box=\z@
\end@treenode}
\def\Tr{\def\pst@par{}\pst@object{Tr}}
% SR modification begin - Oct. 27, 1996
%\def\Tr@i{\pstree@makenodebox{\Tr@ii{\begingroup\rnode@ii}}}
\def\Tr@i{\pstree@makenodebox{\Tr@ii{\rnode@iii\rnode@iv}}}
% SR modification end
\def\Tr@ii#1{%
\begin@treenode
\def\pstree@nodehook{%
\xdef\pstree@next{\pst@dima=\number\pst@dima sp\relax}}%
\nodealigntrue
\setbox\pstree@box\hbox{#1\pssucc}%
\pstree@next
\pst@dimb=\wd\pstree@box
\advance\pst@dimb-\pst@dima
\pst@dimc=\ht\pstree@box
\pst@dimd=\dp\pstree@box
\setbox\pstree@box\hbox to\z@{\kern-\pst@dima\unhbox\pstree@box\hss}%
\ht\pstree@box=\z@
\dp\pstree@box=\z@
\end@treenode}
\def\TR{\def\pst@par{}\pst@object{TR}}
% DG modification begin - Oct. 25, 1996
%\def\TR@i{\pstree@makenodebox{\Tr@ii{\Rnode@ii}}}
\def\TR@i{\pstree@makenodebox{\Tr@ii{\rnode@iii\Rnode@ii}}}
% DG modification end
\def\Tdot{\def\pst@par{}\pst@object{Tdot}}
\def\Tdot@i{%
\begin@treenode
\def\pstree@nodehook{\xdef\pstree@next{%
\pst@dima=\number\pst@dima sp\relax
\pst@dimc=\number\pst@dimb sp\relax}}%
\nodealignfalse
\setbox\pstree@box=\hbox{\dotnode@ii(\z@,\z@)\pssucc}%
\pstree@next
\pst@dimb=\pst@dima
\pst@dimd=\pst@dimc
\end@treenode}
\def\psset@fansize#1{\pst@@getlength{#1}\psk@fansize}
\psset@fansize{1cm}
\def\Tfan{\def\pst@par{}\pst@object{Tfan}}
\def\Tfan@i{%
\addto@par{edge=none}%
\begin@treenode
\solid@star
\pst@dimb=\psk@fansize
\pst@dimd=\pslinewidth
\advance\pst@dimb-\pst@dimd
\divide\pst@dimb 2
\divide\pst@dimd 2
\ifodd\psk@treemode\relax
\pst@dima=\pst@dimd
\pst@dimc=\pst@dimb
\else
\pst@dima=\pst@dimb
\pst@dimc=\pst@dimd
\fi
\setbox\pstree@box=\hbox{%
\pst@newnode{\pssucc}{16}{}{%
/Y 0 def
/X 0 def
/l \pst@number\pst@dima def
/r l def
/u \pst@number\pst@dimc def
/d u def
/NodePos { \tx@GetRnodePos } def}%
\def\pst@linetype{1}%
\nc@object{Closed}{\pspred}{\pssucc}{.5}{%
tx@Dict begin \psline@iii pop end
/w \pst@number\pst@dimb CLW 2 div sub def
/m \ifodd\psk@treemode false \else true \fi def
\tx@Tfan}}%
\pst@dimb=\pst@dima
\pst@dimd=\pst@dimc
\end@treenode}
\def\psset@tnsep#1{%
\def\pst@tempg{#1}%
\ifx\pst@tempg\@empty
\def\psk@tnsep{\number\pslabelsep sp}%
\else
\pst@@getlength{#1}\psk@tnsep
\fi}
\psset@tnsep{}
\def\psset@tnyref#1{\def\psk@tnyref{#1}}%
\psset@tnyref{}
\def\psset@tnheight#1{\edef\psk@tnheight{#1}}
\psset@tnheight{\ht\strutbox}
\def\psset@tndepth#1{\edef\psk@tndepth{#1}}
\psset@tndepth{\dp\strutbox}
\def\psset@tnpos#1{%
\def\pst@tempg{#1}%
\ifx\pst@tempg\@empty
\def\psk@tnpos{%
\ifcase\psk@treemode b\or r\or a\or l\fi}%
\else
\@ifundefined{pstree@tnput@#1}%
{\@pstrickserr{Bad tnpos: `#1'}\@ehpa}%
{\edef\psk@tnpos{#1}}%
\fi}
\psset@tnpos{}
\def\tnput@#1{\def\pst@par{}\pst@object{tnput}}
\def\tnput@i{\pstree@makenodebox{\tnput@ii}}
\def\tnput@ii{%
\begingroup
\use@par
\xdef\next{%
\if@star\noexpand\pst@starbox\fi
\noexpand\def\noexpand\psk@thistndepth{\psk@tndepth}%
\noexpand\def\noexpand\psk@thistnheight{\psk@tnheight}%
\noexpand\def\noexpand\psk@thistnyref{\psk@tnyref}%
\noexpand\def\noexpand\psk@thistnsep{\psk@tnsep}%
\expandafter\noexpand\csname pstree@tnput@\psk@tnpos\endcsname}%
\endgroup
\next
\end@treenode}
\@namedef{pstree@tnput@b}{%
\pstree@tnput@@v\pst@dimd\ht\dp\lower\psk@thistnheight}
\@namedef{pstree@tnput@a}{%
\pstree@tnput@@v\pst@dimc\dp\ht\raise\psk@thistndepth}
\def\pstree@tnput@@v#1#2#3#4#5{%
\pst@dimh=\wd\pst@hbox
\pst@dimg=\psk@href\pst@dimh
\advance\pst@dimg\pst@dimh
\divide\pst@dimg 2
\advance\pst@dimh-\pst@dimg
\ifdim\pst@dimg>\pst@dima
\pst@dima=\pst@dimg
\fi
\ifdim\pst@dimh>\pst@dimb
\pst@dimb=\pst@dimh
\fi
\pst@dimh=\psk@thistnsep\relax
\ifdim\pst@dimh<\z@
\pst@dimh=-\pst@dimh
\else
\advance\pst@dimh#1%
\fi
\pssetlength\dimen@{#5}%
\ifdim\dimen@>#2\pst@hbox
\advance\pst@dimh\dimen@\relax
\else
\advance\pst@dimh#2\pst@hbox
\fi
\setbox\pstree@box=\hbox{%
\box\pstree@box
#4\pst@dimh\hbox to\z@{\kern-\pst@dimg\unhbox\pst@hbox\hss}}%
#1=#3\pstree@box
\dp\pstree@box=\z@
\ht\pstree@box=\z@}
\@namedef{pstree@tnput@l}{%
\pstree@tnput@@h\pst@dima{%
\hss
\lower\pst@dimg\box\pst@hbox
\kern\pst@dimh
\box\pstree@box}}
\@namedef{pstree@tnput@r}{%
\pstree@tnput@@h\pst@dimb{%
\box\pstree@box
\kern\pst@dimh
\lower\pst@dimg\box\pst@hbox
\hss}}%
\def\pstree@tnput@@h#1#2{%
\ifx\psk@thistnyref\@empty
\pssetlength\pst@dimg\psk@vref
\else
\pst@dimg=\ht\pst@hbox
\advance\pst@dimg\dp\pst@hbox
\pst@dimg=\psk@thistnyref\pst@dimg
\advance\pst@dimg-\dp\pst@hbox
\fi
\pst@dimh=\psk@thistnsep\relax
\ifdim\pst@dimh<\z@
\pst@dimh=-\pst@dimh
\else
\advance\pst@dimh#1%
\fi
#1=\pst@dimh
\advance#1\wd\pst@hbox
\setbox\pstree@box=\hbox to\z@{#2}%
\ifdim\ht\pstree@box>\pst@dimc
\pst@dimc=\ht\pstree@box
\fi
\ifdim\dp\pstree@box>\pst@dimd
\pst@dimd=\dp\pstree@box
\fi
\dp\pstree@box=\z@
\ht\pstree@box=\z@}
\newif\if@skiplevel
\def\skiplevel{\def\pst@par{}\pst@object{skiplevel}}
\def\skiplevel@i{\def\pstree@makebox{\pst@@makebox}\skiplevel@ii}
\def\skiplevel@ii{%
\pst@@killglue
\begingroup
\let\pssucc\pspred
\def\pst@tempa{0}%
\def\pst@tempb{0}%
\def\pst@tempc{0}%
\def\pst@tempd{0}%
\setbox\pstree@rootbox=\hbox{}%
\pstree@savevalues
\begingroup
\pstree@initsuccvalues
\pstree@setlevelpar
\@skipleveltrue
\pstree@do}
% DG/SR modification begin - Aug. 31, 1999 - Patch 4
%\def\pstree@gettop#1{\expandafter\pstree@@gettop#1\@nil}
%\def\pstree@@gettop#1,#2\@nil{#1}
% DG/SR modification end
\def\skiplevel@horizontal{%
% DG/SR modification begin - Aug. 31, 1999 - Patch 4
%\pst@dimc=\pstree@gettop\pstree@theupprofile sp
%\pst@dimd=\pstree@gettop\pstree@thedownprofile sp
\edef\pstree@upprofile{\pst@tempc,\pstree@theupprofile}%
\edef\pstree@downprofile{\pst@tempd,\pstree@thedownprofile}%
\pstree@max\pstree@upprofile\pst@cntg
\pst@dimc=\pst@cntg sp
\pstree@max\pstree@downprofile\pst@cntg
\pst@dimd=\pst@cntg sp
% DG/SR modification end
\pstree@treebboxadjust
\gdef\pstree@treebboxadjust{}%
\xdef\pstree@next{%
\noexpand\def\noexpand\pst@tempc{\number\pst@dimc}%
\noexpand\def\noexpand\pst@tempd{\number\pst@dimd}}%
\endgroup
\pstree@next}
\def\skiplevel@vertical{%
% DG/SR modification begin - Aug. 31, 1999 - Patch 4
%\pst@dima=\pstree@gettop\pstree@theleftprofile sp
%\pst@dimb=\pstree@gettop\pstree@therightprofile sp
\edef\pstree@leftprofile{\pst@tempa,\pstree@theleftprofile}%
\edef\pstree@rightprofile{\pst@tempb,\pstree@therightprofile}%
\pstree@max\pstree@leftprofile\pst@cntg
\pst@dima=\pst@cntg sp
\pstree@max\pstree@rightprofile\pst@cntg
\pst@dimb=\pst@cntg sp
% DG/SR modification end
\pstree@treebboxadjust
\gdef\pstree@treebboxadjust{}%
\xdef\pstree@next{%
\noexpand\def\noexpand\pst@tempa{\number\pst@dima}%
\noexpand\def\noexpand\pst@tempb{\number\pst@dimb}}%
\endgroup
\pstree@next}
\def\skiplevels{\def\pst@par{}\pst@object{skiplevels}}
\def\skiplevels@i#1{%
\pst@@killglue
\begingroup
\pst@cnta=#1\relax
\edef\skiplevels@num{\the\pst@cnta}%
\def\pstree@makebox{\pst@makelongbox}%
\def\endskiplevels{}%
\loop
\ifnum\pst@cnta>\z@
\advance\pst@cnta-1
\expandafter\def\expandafter\endskiplevels\expandafter{%
\endskiplevels\pst@endlongbox}
\skiplevel@ii
\repeat
\expandafter\def\expandafter\endskiplevels\expandafter{%
\endskiplevels\endgroup\ignorespaces}
\ignorespaces}

\catcode`\@=\TheAtCode\relax

\endinput
%%
%% END: pst-tree.tex

pst-xkey.tex
%%
%% This is file `pst-xkey.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% pst-xkey.dtx  (with options: `tex')
%% 
%% ---------------------------------------
%% Copyright (C) 2004-2005 Hendri Adriaens
%% ---------------------------------------
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
%% This Current Maintainer of this work is Hendri Adriaens.
%%
%% This work consists of the files xkeyval.dtx and pst-xkey.dtx and
%% the from xkeyval.dtx derived files keyval.tex, xkvtxhdr.tex,
%% xkeyval.sty, xkeyval.tex, xkvview.sty, xkvltxp.sty, xkveca.cls,
%% xkvecb.cls, xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex,
%% xkvex2.tex, xkvex3.tex and xkvex4.tex and the from pst-xkey.dtx
%% derived files pst-xkey.sty and pst-xkey.tex.
%%
%% The following files constitute the xkeyval bundle and must be
%% distributed as a whole: readme, pst-xkey.pdf, xkeyval.pdf, keyval.tex,
%% pst-xkey.sty, pst-xkey.tex, xkeyval.sty, xkeyval.tex, xkvview.sty,
%% xkvltxp.sty, xkvtxhdr.tex, pst-xkey.dtx and xkeyval.dtx.
%%
\csname PSTXKeyLoaded\endcsname
\let\PSTXKeyLoaded\endinput
\edef\PSTXKEYCatcodes{%
  \catcode`\noexpand\@\the\catcode`\@\relax
  \let\noexpand\PSTXKEYCatcodes\relax
}
\catcode`\@=11\relax
\ifx\ProvidesFile\@undefined
  \message{2005/02/14 v1.4 PSTricks specialization of xkeyval (HA)}
  \ifx\XKeyValLoaded\endinput\else\input xkeyval \fi
\else
  \ProvidesFile{pst-xkey.tex}[2005/02/14 v1.4 PSTricks specialization of xkeyval (HA)]
  \@addtofilelist{pst-xkey.tex}
  \RequirePackage{xkeyval}
\fi
\def\pst@famlist{}
\def\pst@addfams#1{%
  \@for\XKV@tempa:=#1\do{%
    \@expandtwoargs\in@{,\XKV@tempa,}{,\pst@famlist,}%
    \ifin@\else\edef\pst@famlist{\pst@famlist,\XKV@tempa}\fi
  }%
}
\def\psset{%
  \expandafter\@testopt\expandafter\pss@t\expandafter{\pst@famlist}%
}
\def\pss@t[#1]{\setkeys+[psset]{#1}}
\def\@psset#1,\@nil{%
  \edef\XKV@tempa{\noexpand\setkeys+[psset]{\pst@famlist}}%
  \XKV@tempa{#1}%
}
\PSTXKEYCatcodes
\endinput
%%
%% End of file `pst-xkey.tex'.

star.tex
%&biglatex
\documentclass[11pt]{article}
\setlength{\textwidth}{5.9in}
\setlength{\oddsidemargin}{.2in}%{-.2in}
\setlength{\evensidemargin}{.2in}%{-.2in}
\setlength{\textheight}{8.5in}
\setlength{\topmargin}{.1in}
\usepackage{times,amsmath,amssymb,graphicx,theorem}%,wrapfig,graphicx,epic,eepic}%multicol
\usepackage{pstricks,pst-node,pst-text,pst-tree,pstricks-add}% pstricks-add MUST come last
\makeatletter
\def\section{\@startsection{section}{1}{0pt}{-3.25ex plus -1ex minus 
-.2ex}{1.5ex plus .2ex minus .3ex}{\normalfont\large\bf}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\normalsize\bfseries}}
\makeatother
\renewenvironment{abstract}
{\vspace*{-1.8ex}\begin{quotation}\small%\textbf{Abstract. }
}{\end{quotation}}
\newcommand{\parag}[1]{\paragraph{#1.}\!\!\!}
\newcommand{\defn}[1]{{\textit{\textbf{#1}}}}
\newcommand{\myitem}[1]{\item[\textnormal{(#1)}]}
\newcommand{\abcitem}[1]{\item[\bf#1]}
\theoremheaderfont{\scshape}
\theorembodyfont{\normalfont\slshape}
\theoremstyle{plain}
\newtheorem{definition}{Definition}
\newtheorem{lemma}{Lemma}
\newtheorem{proposition}{Proposition}
\newtheorem{corollary}{Corollary}
\newtheorem{theorem}{Theorem}
\newenvironment{proof}{\begin{trivlist}\item{}\normalfont\textit{Proof.}}{\hfill$\square$\end{trivlist}}
\newenvironment{proofof}[1]{\begin{trivlist}\item{}\normalfont\textit{Proof of #1.}}{\hfill$\square$\end{trivlist}}

\newcommand{\comment}[1]{\marginpar{\raggedright\tiny#1}}
\newcommand{\etal}{\emph{et al.}}
\newcommand{\nth}{^{\text{th}}}
\newcommand{\Ie}{\emph{I.e.}}
\newcommand{\ie}{\emph{i.e.}}
\newcommand{\eg}{\emph{e.g.}}
\newcommand{\cf}{\emph{cf.}}
\newcommand{\etc}{\emph{etc.}}

\newdimen\arrayruleHwidth
\setlength{\arrayruleHwidth}{1.3pt}
\makeatletter
\def\Hline{\noalign{\ifnum0=`}\fi\hrule \@height \arrayruleHwidth
  \futurelet \@tempa\@xhline}
\makeatother


\def\introrule{{\cal I}}\def\elimrule{{\cal E}}%
\def\andintro{\using{\land}\introrule\justifies}%
\def\impelim{\using{\Rightarrow}\elimrule\justifies}%
\def\allintro{\using{\forall}\introrule\justifies}%
\def\allelim{\using{\forall}\elimrule\justifies}%
\def\falseelim{\using{\bot}\elimrule\justifies}%
\def\existsintro{\using{\exists}\introrule\justifies}%

\def\andelim#1{\using{\land}#1\elimrule\justifies}%
\def\orintro#1{\using{\lor}#1\introrule\justifies}%

\def\impintro#1{\using{\Rightarrow}\introrule_{#1}\justifies}%
\def\orelim#1{\using{\lor}\elimrule_{#1}\justifies}%
\def\existselim#1{\using{\exists}\elimrule_{#1}\justifies}


\newdimen\proofrulebreadth \proofrulebreadth=.05em
\newdimen\proofdotseparation \proofdotseparation=1.25ex
\newdimen\proofrulebaseline \proofrulebaseline=2ex
\newcount\proofdotnumber \proofdotnumber=3
\let\then\relax
\def\hfi{\hskip0pt plus.0001fil}
\mathchardef\squigto="3A3B
\newif\ifinsideprooftree\insideprooftreefalse
\newif\ifonleftofproofrule\onleftofproofrulefalse
\newif\ifproofdots\proofdotsfalse
\newif\ifdoubleproof\doubleprooffalse
\let\wereinproofbit\relax
\newdimen\shortenproofleft
\newdimen\shortenproofright
\newdimen\proofbelowshift
\newbox\proofabove
\newbox\proofbelow
\newbox\proofrulename
\def\shiftproofbelow{\let\next\relax\afterassignment\setshiftproofbelow\dimen0 }
\def\shiftproofbelowneg{\def\next{\multiply\dimen0 by-1 }%
\afterassignment\setshiftproofbelow\dimen0 }
\def\setshiftproofbelow{\next\proofbelowshift=\dimen0 }
\def\setproofrulebreadth{\proofrulebreadth}

\def\prooftree{% NESTED ZERO (\ifonleftofproofrule)
\ifnum  \lastpenalty=1
\then   \unpenalty
\else   \onleftofproofrulefalse
\fi
\ifonleftofproofrule
\else   \ifinsideprooftree
        \then   \hskip.5em plus1fil
        \fi
\fi
\bgroup% NESTED ONE (\proofbelow, \proofrulename, \proofabove,
\setbox\proofbelow=\hbox{}\setbox\proofrulename=\hbox{}%
\let\justifies\proofover\let\leadsto\proofoverdots\let\Justifies\proofoverdbl
\let\using\proofusing\let\[\prooftree
\ifinsideprooftree\let\]\endprooftree\fi
\proofdotsfalse\doubleprooffalse
\let\thickness\setproofrulebreadth
\let\shiftright\shiftproofbelow \let\shift\shiftproofbelow
\let\shiftleft\shiftproofbelowneg
\let\ifwasinsideprooftree\ifinsideprooftree
\insideprooftreetrue
\setbox\proofabove=\hbox\bgroup$\displaystyle % NESTED TWO
\let\wereinproofbit\prooftree
\shortenproofleft=0pt \shortenproofright=0pt \proofbelowshift=0pt
\onleftofproofruletrue\penalty1
}

\def\eproofbit{% NESTED TWO
\ifx    \wereinproofbit\prooftree
\then   \ifcase \lastpenalty
        \then   \shortenproofright=0pt  % 0: some other object, no indentation
        \or     \unpenalty\hfil         % 1: empty hypotheses, just glue
        \or     \unpenalty\unskip       % 2: just had a tree, remove glue
        \else   \shortenproofright=0pt  % eh?
        \fi
\fi
\global\dimen0=\shortenproofleft
\global\dimen1=\shortenproofright
\global\dimen2=\proofrulebreadth
\global\dimen3=\proofbelowshift
\global\dimen4=\proofdotseparation
\global\count255=\proofdotnumber
$\egroup  % NESTED ONE
\shortenproofleft=\dimen0
\shortenproofright=\dimen1
\proofrulebreadth=\dimen2
\proofbelowshift=\dimen3
\proofdotseparation=\dimen4
\proofdotnumber=\count255
}

\def\proofover{% NESTED TWO
\eproofbit % NESTED ONE
\setbox\proofbelow=\hbox\bgroup % NESTED TWO
\let\wereinproofbit\proofover
$\displaystyle
}%
\def\proofoverdbl{% NESTED TWO
\eproofbit % NESTED ONE
\doubleprooftrue
\setbox\proofbelow=\hbox\bgroup % NESTED TWO
\let\wereinproofbit\proofoverdbl
$\displaystyle
}%
\def\proofoverdots{% NESTED TWO
\eproofbit % NESTED ONE
\proofdotstrue
\setbox\proofbelow=\hbox\bgroup % NESTED TWO
\let\wereinproofbit\proofoverdots
$\displaystyle
}%
\def\proofusing{% NESTED TWO
\eproofbit % NESTED ONE
\setbox\proofrulename=\hbox\bgroup % NESTED TWO
\let\wereinproofbit\proofusing
\kern0.3em$
}

\def\endprooftree{% NESTED TWO
\eproofbit % NESTED ONE
  \dimen5 =0pt% spread of hypotheses
\dimen0=\wd\proofabove \advance\dimen0-\shortenproofleft
\advance\dimen0-\shortenproofright
\dimen1=.5\dimen0 \advance\dimen1-.5\wd\proofbelow
\dimen4=\dimen1
\advance\dimen1\proofbelowshift \advance\dimen4-\proofbelowshift
\ifdim  \dimen1<0pt
\then   \advance\shortenproofleft\dimen1
        \advance\dimen0-\dimen1
        \dimen1=0pt
        \ifdim  \shortenproofleft<0pt
        \then   \setbox\proofabove=\hbox{%
                        \kern-\shortenproofleft\unhbox\proofabove}%
                \shortenproofleft=0pt
        \fi
\fi
\ifdim  \dimen4<0pt
\then   \advance\shortenproofright\dimen4
        \advance\dimen0-\dimen4
        \dimen4=0pt
\fi
\ifdim  \shortenproofright<\wd\proofrulename
\then   \shortenproofright=\wd\proofrulename
\fi
\dimen2=\shortenproofleft \advance\dimen2 by\dimen1
\dimen3=\shortenproofright\advance\dimen3 by\dimen4
\ifproofdots
\then
        \dimen6=\shortenproofleft \advance\dimen6 .5\dimen0
        \setbox1=\vbox to\proofdotseparation{\vss\hbox{$\cdot$}\vss}%
        \setbox0=\hbox{%
                \advance\dimen6-.5\wd1
                \kern\dimen6
                $\vcenter to\proofdotnumber\proofdotseparation
                        {\leaders\box1\vfill}$%
                \unhbox\proofrulename}%
\else   \dimen6=\fontdimen22\the\textfont2 % height of maths axis
        \dimen7=\dimen6
        \advance\dimen6by.5\proofrulebreadth
        \advance\dimen7by-.5\proofrulebreadth
        \setbox0=\hbox{%
                \kern\shortenproofleft
                \ifdoubleproof
                \then   \hbox to\dimen0{%
                        $\mathsurround0pt\mathord=\mkern-6mu%
                        \cleaders\hbox{$\mkern-2mu=\mkern-2mu$}\hfill
                        \mkern-6mu\mathord=$}%
                \else   \vrule height\dimen6 depth-\dimen7 width\dimen0
                \fi
                \unhbox\proofrulename}%
        \ht0=\dimen6 \dp0=-\dimen7
\fi
\let\doll\relax
\ifwasinsideprooftree
\then   \let\VBOX\vbox
\else   \ifmmode\else$\let\doll=$\fi
        \let\VBOX\vcenter
\fi
\VBOX   {\baselineskip\proofrulebaseline \lineskip.2ex
        \expandafter\lineskiplimit\ifproofdots0ex\else-0.6ex\fi
        \hbox   spread\dimen5   {\hfi\unhbox\proofabove\hfi}%
        \hbox{\box0}%
        \hbox   {\kern\dimen2 \box\proofbelow}}\doll%
\global\dimen2=\dimen2
\global\dimen3=\dimen3
\egroup % NESTED ZERO
\ifonleftofproofrule
\then   \shortenproofleft=\dimen2
\fi
\shortenproofright=\dimen3
\onleftofproofrulefalse
\ifinsideprooftree
\then   \hskip.5em plus 1fil \penalty2
\fi
}



\newcount\PLv\newcount\PLw\newcount\PLx\newcount\PLy\newdimen\PLyy\newdimen\PLX
\newbox\PLdot \setbox\PLdot\hbox{{\tiny.}} \def\scl{.07} % resettable scale
\def\PLot#1{\PLx`#1\advance\PLx-42\PLy\PLx\PLv\PLx\divide\PLy9\PLw\PLy\multiply
\PLw9\advance\PLx-\PLw\advance\PLx-4\PLy-\PLy\advance\PLy4\PLX=\the\PLx pt
\advance\PLyy\the\PLy pt\wd\PLdot=\scl\PLX\raise\scl\PLyy\copy\PLdot}
\def\draw#1{\ifx#1\end\let\next=\relax\else\PLot#1\let\next=\draw\fi\next}
\def\vnparr{\hbox{\PLyy=70pt\draw :::;DMV_gqppyyyyyooooxxxnnwvlutkjaWNE=5-./9%
9:::CCCC:::99/..--544=EENWWaajjjkktttttttNNNVVVVVVVV\end \hskip6pt}}
\newcount\smallPLv\newcount\smallPLw\newcount\smallPLx\newcount\smallPLy\newdimen\smallPLyy\newdimen\smallPLX\newbox\smallPLdot \setbox\smallPLdot\hbox{{\tiny.}} \def\smallscl{.062} \def\smallPLot#1{\smallPLx`#1\advance\smallPLx-42\smallPLy\smallPLx\smallPLv\smallPLx\divide\smallPLy9\smallPLw\smallPLy\multiply \smallPLw9\advance\smallPLx-\smallPLw\advance\smallPLx-4\smallPLy-\smallPLy\advance\smallPLy4\smallPLX=\the\smallPLx pt \advance\smallPLyy\the\smallPLy pt\wd\smallPLdot=\smallscl\smallPLX\raise\smallscl\smallPLyy\copy\smallPLdot} \def\smalldraw#1{\ifx#1\end\let\next=\relax\else\smallPLot#1\let\next=\smalldraw\fi\next} \def\smallinvamp{\hbox{\smallPLyy=70pt\smalldraw :::;DMV_gqppyyyyyooooxxxnnwvlutkjaWNE=5-./99:::CCCC:::99/..--544=EENWWaajjjkktttttttNNNVVVVVVVV\end \hskip6pt}}
\newcommand{\smallvnparr}{\smallinvamp}

\newlength{\parrdp}\newlength{\parrht}
\settodepth{\parrdp}{$\&$}\settoheight{\parrht}{$\&$}
\newcommand{\parr}{\raisebox{-\parrdp}{\raisebox{\parrht}{\rotatebox{180}{$\&$}}}}
\newlength{\smallparrdp}\newlength{\smallparrht}
\settodepth{\smallparrdp}{{\small$\&$}}\settoheight{\smallparrht}{{\small$\&$}}
\newcommand{\smallparr}
{\mkern1mu\raisebox{-.1\smallparrdp}{\raisebox{\smallparrht}{\rotatebox{180}{\small$\&$}}}\mkern1mu}
\newlength{\footnoteparrdp}\newlength{\footnoteparrht}
\settodepth{\footnoteparrdp}{{\footnotesize$\&$}}\settoheight{\footnoteparrht}{{\footnotesize$\&$}}
\newcommand{\footnoteparr}
{\mkern1mu\raisebox{-\footnoteparrdp}{\raisebox{\footnoteparrht}{\rotatebox{180}{\footnotesize$\&$}}}\mkern1mu}
\newlength{\scriptparrdp}\newlength{\scriptparrht}
\settodepth{\scriptparrdp}{{\scriptsize$\&$}}\settoheight{\scriptparrht}{{\scriptsize$\&$}}
\newcommand{\scriptparr}
{\raisebox{-\scriptparrdp}{\raisebox{\scriptparrht}{\rotatebox{180}{\scriptsize$\&$}}}}
\newcommand{\scriptsizeparr}{\scriptparr}
\newlength{\tinyparrdp}\newlength{\tinyparrht}
\settodepth{\tinyparrdp}{{\tiny$\&$}}\settoheight{\tinyparrht}{{\tiny$\&$}}
\newcommand{\tinyparr}
{\raisebox{-\tinyparrdp}{\raisebox{\tinyparrht}{\rotatebox{180}{\tiny$\&$}}}}


\newcommand{\A}{\mathbb{A}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\D}{\mathbb{D}}
\newcommand{\N}{\mathcal{N}}
\newcommand{\op}{^{\mathsf{op}}}

\newcommand{\sks}{\mathsf{SKS}}
\newcommand{\sksg}{\mathsf{SKSg}}
\newcommand{\tensor}{\otimes}
\newcommand{\inv}[1]{{#1}^{-1}}
\newcommand{\dual}[1]{#1\perp}
\newcommand{\tunitright}{\rho}
\newcommand{\tunitleft}{\lambda}
\newcommand{\punitright}{\dual{\tunitright}}
\newcommand{\punitleft}{\dual{\tunitleft}}
\newcommand{\invtunitleft}{\inv{(\tunitleft)}}
\newcommand{\invpunitright}{\inv{(\punitright)}}
\newcommand{\lindist}{\delta}
\newcommand{\lindistleft}{\lindist}
\newcommand{\lindistright}{\dual{\lindist}}
\newcommand{\cut}{\gamma}
\newcommand{\axiom}{\dual{\cut}}
\newcommand{\id}{\mathsf{id}}
\newcommand{\tw}{\mathsf{tw}}
\newcommand{\twist}{\mathsf{tw}}
\newcommand{\punit}{\bot}
\newcommand{\tunit}{1}
\newcommand{\tassocleft}{\alpha}
\newcommand{\tassocright}{\inv{\tassocleft}}
\newcommand{\passocright}{\dual{\tassocleft}}
\newcommand{\passocleft}{\inv{(\passocright)}}
\newcommand{\psym}{\sigma}
\newcommand{\tsym}{\dual{\psym}}
\newcommand{\pcon}{c}
\newcommand{\pweak}{w'}
\newcommand{\punitweak}{w}
\newcommand{\tcon}{\dual{\pcon}}
\newcommand{\tweak}{\dual{\pweak}}
\newcommand{\tunitweak}{\dual{\punitweak}}
\newcommand{\bigbulle}{\raisebox{-.6pt}[5.8pt][0pt]{\Large$\bullet$}}
\newcommand{\bigcircl}{\raisebox{-1.2pt}[5.7pt][0pt]{\LARGE$\circ$}}
\newcommand{\squar}{\raisebox{0pt}[6.2pt][0pt]{\small$\square$}}
\newcommand{\circl}{\raisebox{-.7pt}[5.7pt][0pt]{\Large$\circ$}}
\newcommand{\putbigbulle}[2]{\putlabel{#1}{#2}{\bigbulle}}
\newcommand{\putbigcircl}[2]{\putlabel{#1}{#2}{\bigcircl}}
\newcommand{\putsquar}[2]{\putlabel{#1}{#2}{\squar}}
\newcommand{\putbiglabelledbullet}[5]{\putbigbulle{#1}{#2}\put(#1,#2){\put(#4,#5){\makebox(0,0){#3}}}}
\newcommand{\hdownleftmapsto}{\thicklines\put(0,0){\put(0,0){\vector(-1,-4){12.5}}}}
\newcommand{\hdownrightmapsto}{\thicklines\put(0,0){\put(0,0){\vector(1,-4){12.5}}}}
\newcommand{\putlabel}[3]{\put(#1,#2){\makebox(0,0){#3}}}
\renewcommand{\perp}{^*}
\newcommand{\perpp}{{}^*{}^*}

\newcommand{\rulelabel}[1]{\mathsf{#1}}
\newcommand{\tensorlabel}{\otimes}
\newcommand{\parlabel}{\parr}
\newcommand{\onelabel}{\tu}
\newcommand{\botlabel}{\bot}
\newcommand{\axlabel}{\rulelabel{ax}}
\newcommand{\cutlabel}{\rulelabel{\mkern1mu cut}}
\newcommand{\smallparlabel}{\smallparr}
\newcommand{\graph}[1]{\mathcal{G}_{#1}}
\newcommand{\sLink}{\mathsf{sLink}}
\newcommand{\oLink}{\mathsf{oLink}}
\newcommand{\cl}[1]{\mathsf{L}#1}
\newcommand{\linka}{\cl{\A}}


\psset{radius=2pt,xunit=.5cm,yunit=1,arrowscale=1.7,arrowlength=.7,labelsep=3pt,nodesep=.5ex}%-.2mm
\newcommand{\uloop}[2]{\nccurve[ncurv=1.3,angleA=75,angleB=105]{#1}{#2}}
\newcommand{\dloop}[2]{\nccurve[ncurv=1.3,angleA=-75,angleB=-105]{#1}{#2}}
\newcommand{\uloopp}[2]{\nccurve[ncurv=1,angleA=75,angleB=105]{#1}{#2}}
\newcommand{\dloopp}[2]{\nccurve[ncurv=1,angleA=-75,angleB=-105]{#1}{#2}}
\newcommand{\uline}[2]{\nccurve[angleA=90,angleB=-90]{#1}{#2}}
\newcommand{\lineanglesheight}[5]{\nccurve[angleA=#3,angleB=#4,ncurv=#5]{#1}{#2}}
\newcommand{\lineangles}[4]{\nccurve[angleA=#3,angleB=#4]{#1}{#2}}
\newcommand{\ulineangles}[4]{\lineangles{#1}{#2}{#3}{#4}}
\newcommand{\uliner}[2]{\nccurve[angleA=70,angleB=-110]{#1}{#2}}
\newcommand{\ulinel}[2]{\nccurve[angleA=110,angleB=-70]{#1}{#2}}
\newcommand{\dline}[2]{\nccurve[angleA=-90,angleB=90]{#1}{#2}}
\newcommand{\linevecpos}[3]{\ncline[ArrowInside=->,ArrowInsidePos=#3]{#1}{#2}}
\newcommand{\linevec}[2]{\linevecpos{#1}{#2}{.54}}
\newcommand{\vecanglesposheight}[6]{\nccurve[ncurv=#6,ArrowInside=->,ArrowInsidePos=#5,angleA=#3,angleB=#4]{#1}{#2}}
\newcommand{\vecanglespos}[5]{\vecanglesposheight{#1}{#2}{#3}{#4}{#5}{1}}
\newcommand{\vecanglesheight}[5]{\vecanglesposheight{#1}{#2}{#3}{#4}{.54}{#5}}
\newcommand{\vecangles}[4]{\vecanglespos{#1}{#2}{#3}{#4}{.54}}
\newcommand{\uvec}[2]{\vecangles{#1}{#2}{90}{-90}}
\newcommand{\dvec}[2]{\vecangles{#1}{#2}{-90}{90}}
\newcommand{\uvecpos}[3]{\vecanglespos{#1}{#2}{90}{-90}{#3}}
\newcommand{\dvecpos}[3]{\vecanglespos{#1}{#2}{-90}{90}{#3}}
\newcommand{\dloopvecleft}[2]{\nccurve[ncurv=1.3,angleA=-105,angleB=-75]{#1}{#2}
\lput{:0}{\psline{->}(.05,.005)(.1,.005)}}
\newcommand{\dloopvecanglesheight}[5]{\nccurve[ncurv=#5,angleA=#3,angleB=#4]{#1}{#2}
\lput{:0}{\psline{->}(.05,.005)(.1,.005)}}
\newcommand{\dloopvecheight}[3]{\dloopvecanglesheight{#1}{#2}{-75}{-105}{#3}}
\newcommand{\dloopvec}[2]{\dloopvecheight{#1}{#2}{1.3}}
\newcommand{\uloopvec}[2]{\nccurve[ncurv=1.3,angleA=75,angleB=105]{#1}{#2}
\lput{:0}{\psline{->}(.05,-.005)(.1,-.005)}}
\newcommand{\uloopvecanglesheight}[5]{\nccurve[ncurv=#5,angleA=#3,angleB=#4]{#1}{#2}
\lput{:0}{\psline{->}(.05,-.005)(.1,-.005)}}
\newcommand{\uloopvecheight}[3]{\uloopvecanglesheight{#1}{#2}{75}{105}{#3}}
\newcommand{\uloopvecleft}[2]{\nccurve[ncurv=1.3,angleA=105,angleB=75]{#1}{#2}
\lput{:0}{\psline{->}(.05,-.005)(.1,-.005)}}
\newcommand{\uloopvecleftheight}[3]{\nccurve[ncurv=#3,angleA=105,angleB=75]{#1}{#2}
\lput{:0}{\psline{->}(.05,-.005)(.1,-.005)}}

\newcommand{\goi}{\mathbf{GoI}}
\newcommand{\Rel}{\mathsf{Rel}}
\newcommand{\neigh}{\sim_1}
\newcommand{\similar}{\simeq}
\newcommand{\tu}{I}
\newcommand{\one}[1]{\rnode{#1}{\tu}}
\newcommand{\nbot}[1]{\rnode{#1}{\bot}}
\newcommand{\nets}[1]{\mathsf{N}#1}
\newcommand{\netsa}{\nets{\A}}
\newcommand{\pfunc}{\mathsf{Setp}}
\newcommand{\finsetp}{\mathsf{fSetp}}
\newcommand{\goipfunc}{\goi(\pfunc)}
\newcommand{\goifinsetp}{\goi(\finsetp)}
\newcommand{\goirel}{\goi(\Rel)}
\newcommand{\bgap}{\rule{9mm}{0mm}}% gap between GoI blobs
\newcommand{\sgap}{\rule{9mm}{0mm}}% gap between sequent formulas
\newcommand{\negb}[1]{\cnode{2pt}{#1}}
\newcommand{\posb}[1]{\cnode*{2pt}{#1}}
\newcommand{\gnegb}[1]{\bgap\negb{#1}}
\newcommand{\gposb}[1]{\bgap\posb{#1}}
\newcommand{\posrestr}{^+}%{^\bullet}
\newcommand{\negrestr}{^-}%{^\circ}
\newcommand{\cutpairlink}[2]{{\psset{nodesep=1pt}\nccurve[ncurv=1,angleA=-60,angleB=-120]{#1}{#2}}}
\newcommand{\cutpair}[1]{{\psset{nodesep=1pt}\rnode{a}{#1}\;\,\rnode{b}{#1}\perp%
\nccurve[ncurv=1,angleA=-60,angleB=-120]{a}{b}}}
\newcommand{\dualcutpair}[1]{{\psset{nodesep=1pt}\rnode{a}{#1}\perp\;\,\rnode{b}{#1}\perpp%
\nccurve[ncurv=1,angleA=-60,angleB=-120]{a}{b}}}
\newcommand{\revcutpair}[1]{{\psset{nodesep=1pt}\rnode{a}{#1}\perp\,\rnode{b}{#1}%
\nccurve[ncurv=1,angleA=-60,angleB=-120]{a}{b}}}
\newcommand{\cutpairbot}[1]{{\psset{nodesep=1pt}\rnode{a}{#1}\;\,\rnode{b}{#1}^\bot%
\nccurve[ncurv=1,angleA=-60,angleB=-120]{a}{b}}}
\newcommand{\reduc}[1]{\underline{#1}}
\newcommand{\Matching}{\textsc{Matching}}
\newcommand{\Switching}{\textsc{Switching}}
\newcommand{\Labelling}{\textsc{Labelling}}
\newcommand{\Bijection}{\textsc{Bijection}}
\newcommand{\parseone}{3.1ex}% drop gap to second row of parse tree
\newcommand{\parsetwo}{7.6ex}% ... third row
\newcommand{\parsethree}{12.1ex}% ... fourth row
\newcommand{\parsenodeparents}[7]{\ncline[linestyle=none]{#1}{#2}\nbput[labelsep=#3]{\rnode{#4}{#5}}%
\ncline{#6}{#4}\ncline{#7}{#4}}
\newcommand{\parsenode}[5]{\parsenodeparents{#1}{#2}{#3}{#4}{#5}{#1}{#2}}
\newcommand{\parsenodeone}[4]{\parsenode{#1}{#2}{\parseone}{#3}{#4}}
\newcommand{\parsenodetwo}[4]{\parsenode{#1}{#2}{\parsetwo}{#3}{#4}}
\newcommand{\parsenodetwoleft}[5]{\parsenodeparents{#1}{#2}{\parsetwo}{#3}{#4}{#1}{#5}}
\newcommand{\parsenodetworight}[5]{\parsenodeparents{#1}{#2}{\parsetwo}{#3}{#4}{#5}{#2}}
\newcommand{\parsenodethreeleft}[5]{\parsenodeparents{#1}{#2}{\parsethree}{#3}{#4}{#1}{#5}}
\newcommand{\parsenodethreeright}[5]{\parsenodeparents{#1}{#2}{\parsethree}{#3}{#4}{#5}{#2}}
\newcommand{\sync}{\Bumpeq}
\newcommand{\lam}{\mathbf{Lam}}
\newcommand{\synccomp}{\mkern1mu\textbf{;}\mkern1mu}
\newcommand{\im}{\,\text{im}\,}
\newcommand{\dom}{\,\text{dom}\,}

\newcommand{\alabelpos}[5]{\ncline[linestyle=none]{#1}{#2}\naput[labelsep=#4,npos=#5]{#3}}
\newcommand{\blabelpos}[5]{\ncline[linestyle=none]{#1}{#2}\nbput[labelsep=#4,npos=#5]{#3}}
\newcommand{\clabelpos}[4]{\ncline[linestyle=none]{#1}{#2}\ncput[npos=#4]{#3}}
\newcommand{\alabel}[4]{\alabelpos{#1}{#2}{#3}{#4}{.5}}
\newcommand{\blabel}[4]{\blabelpos{#1}{#2}{#3}{#4}{.5}}
\newcommand{\clabel}[3]{\clabelpos{#1}{#2}{#3}{.5}}

\newcommand{\setp}{\mathsf{Setp}}
\newcommand{\rel}{\mathsf{Rel}}
\renewcommand{\int}{\textbf{Int}}
\newcommand{\intsetp}{\int(\setp)}
\newcommand{\intrel}{\int(\rel)}
\newcommand{\longto}{\longrightarrow}
\newcommand{\powerset}{\mathcal{P}}
\newcommand{\tighttensor}{\mkern-3mu\tensor\mkern-3mu}
\newcommand{\lf}{\mathcal{L}}
\newcommand{\leaves}[1]{|#1|}
\newcommand{\traj}[1]{\vec{#1}}
\newcommand{\out}[1]{\widehat{#1}}
\newcommand{\polynetstar}[2]{\text{Net}^*_{#1}(#2)}
\newcommand{\polynetstara}{\polynetstar{\mathcal{C}_\A}{E_\A}}
\newcommand{\netstar}[1]{\text{Net}^{*}_{^{_\tensor}}(#1)}
\newcommand{\netstara}{\netstar{\A}}
\newcommand{\mll}[1]{\widehat{#1}}
\newcommand{\ldual}[1]{{#1}\perp}% lin dist duality
\newcommand{\depth}[1]{|#1|}
\newcommand{\tempend}{\small
\bibliographystyle{alpha}
\bibliography{../../bib/main}
\end{document}}


\title{\vspace*{-5.5ex}\Large\bf 
Simple free star-autonomous categories and full coherence }%
\author{\\[-4ex]\normalsize\sc 
Dominic J.~D.~Hughes
\\[-.2ex]
\normalsize Stanford University\\
\small July 7, 2005}\date{}
\begin{document}
\maketitle\vspace*{-5ex}
\begin{abstract}\noindent
This paper gives a simple presentation of the free star-autonomous
category over a category, based on Eilenberg-Kelly-MacLane graphs and
Trimble rewiring, for full coherence.\vspace*{-1.5ex}
\end{abstract}

\section{Introduction}

Eilenberg-Kelly-MacLane graphs \cite{EK66,KM71} elegantly describe
certain morphisms of
closed
categories.
This paper shows that little more is needed to present
the free star-autonomous category generated by a category
\cite{Bar79}, for a full coherence theorem.

Given a set $\A=\{a,b,\ldots\}$ of generators, we define the category
of \emph{$\A$-linkings}: objects are star-autonomous
\emph{shapes} 
(expressions)
over $\A$, 
such as $S\:=\:\big(a\tensor (b\perp\tensor
a\perpp)\big)\perpp{}\perp\tensor \tu\perp$ (with $\tu$ the unit),
and a
morphism $S\to T$
is a \emph{linking}, a function from negative leaves to positive
leaves, \eg
\begin{center}
\small
\label{firstexample}
\begin{psmatrix}[rowsep=3.3\baselineskip]
$\big((\,\one{u}\tensor\one{uu}\,)\tensor(\,\rnode{a}{a}\tensor\rnode{aa}{a}\perp)\big)
\tensor (\,\one{uuu}\tensor \one{uuuu}\perp)$ \\
$(\,\rnode{a1}{a}\tensor\rnode{aa1}{a}\,\perp) \tensor \big((\,\rnode{b1}{b}\perp\tensor\rnode{bb1}{b}\,)\perp
\tensor \one{u1}\perp\big)$
\dvec{u}{a1}
\vecanglespos{uu}{b1}{-60}{115}{.5}
\vecanglespos{a}{a1}{-120}{65}{.59}
\vecanglespos{aa1}{aa}{60}{-115}{.67}
\uloopvecleft{bb1}{b1}
\dloopvec{uuu}{uuuu}
\uvec{u1}{uuuu}
\end{psmatrix}
\end{center}
is a morphism from the upper shape to the lower shape.
Composition is simply path composition:
\begin{center}
\small
\begin{psmatrix}[rowsep=2.8\baselineskip]
$\big((\,\one{u}\tensor\one{uu}\,)\tensor(\,\rnode{a}{a}\tensor\rnode{aa}{a}\perp)\big)
\tensor (\one{uuu}\tensor \one{uuuu}\perp)$
&&
$\big((\,\one{u'}\tensor\one{uu'}\,)\tensor(\,\rnode{a'}{a}\tensor\rnode{aa'}{a}\perp)\big)
\tensor (\,\one{uuu'}\tensor \one{uuuu'}\perp)$
\\
$(\,\rnode{a1}{a}\tensor\rnode{aa1}{a}\,\perp) \tensor \big((\,\rnode{b1}{b}\perp\tensor\rnode{bb1}{b}\,)\perp
\tensor \one{u1}\perp\big)$
&
$\mapsto$ \\
$\big((\,\one{u2}\perp\tensor \rnode{b2}{b}\,)\perp\tensor \rnode{bb2}{b}\,\big)\perp
\tensor (\,\one{uu2} \tensor \one{uuu2})\perp$
&&
$\big((\,\one{u2'}\perp\tensor \rnode{b2'}{b}\,)\perp\tensor \rnode{bb2'}{b}\,\big)\perp
\tensor (\,\one{uu2'} \tensor \one{uuu2'})\perp$
\dvec{u}{a1}
\vecanglespos{uu}{b1}{-60}{115}{.5}
\vecanglespos{a}{a1}{-120}{65}{.59}
\vecanglespos{aa1}{aa}{60}{-115}{.67}
\uloopvecleft{bb1}{b1}
\dloopvec{uuu}{uuuu}
\uvec{u1}{uuuu}
\dloopvec{a1}{aa1}
\vecangles{u2}{aa1}{82}{-83}
\vecangles{b1}{b2}{-105}{70}
\vecangles{bb2}{bb1}{75}{-100}
\vecangles{uu2}{u1}{85}{-103}
\vecangles{uuu2}{u1}{90}{-80}
\vecanglesposheight{u'}{aa'}{-60}{-90}{.58}{1}
\vecanglespos{uu'}{b2'}{-80}{90}{.45}
\dloopvec{a'}{aa'}
\dloopvec{uuu'}{uuuu'}
\vecanglespos{u2'}{aa'}{70}{-77}{.58}
\uloopvecleft{bb2'}{b2'}
\vecangles{uu2'}{uuuu'}{90}{-90}
\vecangles{uuu2'}{uuuu'}{90}{-76}
\end{psmatrix}
\end{center}
A leaf function shall qualify as a linking only if it satisfies the
standard criterion for multiplicative proof
nets\footnote{\label{assume}This paper will not assume any familiarity
with proof nets or linear logic.} \cite{DR89,Gir96}, so simple as to
be checkable in linear time \cite{Gue99,Hug05}.  Employing Trimble
rewiring
\cite{Tri94,BCST96}, we define two linkings as \emph{similar} if they differ
by an edge from an $\tu$, \eg
\begin{center}
\small
\vspace*{-2.7ex}
\begin{psmatrix}[rowsep=.5\baselineskip]
$(\rnode{a}{a}\tensor\rnode{b}{b}\perp)\tensor\one{u}$ &&
$(\rnode{a'}{a}\tensor\rnode{b'}{b}\perp)\tensor\one{u'}$ \\ &
$\leftrightarrow$ \\ $\rnode{a1}{a}\tensor\rnode{b1}{b}\perp$ &&
$\rnode{a1'}{a}\tensor\rnode{b1'}{b}\perp$
\linevec{a}{a1}
\linevec{b1}{b}
\nccurve[ncurv=1.1,angleA=-115,angleB=-65]{u}{b}
\lput{:0}{\psline{->}(.05,.005)(.1,.005)}
\linevec{a'}{a1'}
\linevecpos{b1'}{b'}{.7}
\vecanglespos{u'}{a1'}{-100}{80}{.4}
\end{psmatrix}
\end{center}
and define an \emph{$\A$-net} as an $\A$-linking modulo similarity.
The category of $\A$-nets is the free star-autonomous category
generated by $\A$.  To emphasise the simplicity:\vspace*{-1ex}
\begin{itemize}
\myitem{1} a morphism is a leaf function satisfying a standard criterion (checkable in linear time);
\vspace*{-1ex}\myitem{2} composition is standard path composition;
\vspace*{-1ex}\myitem{3} 
modulo a standard equivalence (Trimble rewiring).
\end{itemize}

The key novelty is (2), 
the fact that composition is simply path composition.
This preserves an elegant feature of Eilenberg-Kelly-MacLane graphs.
In contrast, the composition in previous presentations of free
star-autonomous categories \cite{BCST96,KO99,LS04} is more complex.
(We return to this related work later in the Introduction.)


Abstractly, the underlying path composition can be understood as a
forgetful functor from the category of $\A$-linkings (sketched above)
to $\intsetp$, the compact closed category obtained by applying the
$\int$ or geometry-of-interaction construction
\cite{Gir89,JSV96,Abr96} to the traced mononoidal category $\setp$ of
sets and partial functions (with tensor as coproduct).  This ties in
nicely with Eilenberg-Kelly-MacLane graphs and Kelly-Laplaza graphs
\cite{KL80} for compact closed categories, since each has a forgetful
functor to $\intsetp$.

\parag{Arbitrary base category}
When $\A$ is not discrete, we simply label each edge between generators with
a morphism of $\A$.  For example, if $x:a\to b$ and $y:c\to c$ in
$\A$, then
\begin{center}\small
\begin{psmatrix}[rowsep=3.3\baselineskip]
$\big((\,\one{u}\tensor\one{uu}\,)\tensor(\,\rnode{a}{a}\tensor\rnode{b}{b}\perp)\big)
\tensor (\,\one{uuu}\tensor \one{uuuu}\perp)$ \\
$(\,\rnode{b1}{b}\tensor\rnode{a1}{a}\,\perp) \tensor \big((\,\rnode{c1}{c}\,\perp\tensor\rnode{cc1}{c}\,)\perp
\tensor \one{u1}\perp\big)$
\dvec{u}{b1}
\vecanglespos{uu}{c1}{-60}{110}{.47}
\vecanglespos{a}{b1}{-120}{65}{.59}\nbput[npos=.59,nrot=:D]{$x$}
\vecanglespos{a1}{b}{60}{-115}{.67}\nbput[npos=.76,nrot=:U]{$x$}
\uloopvecleft{cc1}{c1}\nbput[npos=.5,nrot=:D]{$y$}
\dloopvec{uuu}{uuuu}
\uvec{u1}{uuuu}
\end{psmatrix}
\end{center}
is an $\A$-linking.
Composition collects labels along a path, and composes them in $\A$,
\eg
\begin{center}\small\label{label-comp-eg}
\begin{psmatrix}[rowsep=2.8\baselineskip]
$\big((\,\one{u}\tensor\one{uu}\,)\tensor(\,\rnode{a}{a}\tensor\rnode{b}{b}\perp)\big)
\tensor (\,\one{uuu}\tensor \one{uuuu}\perp)$
&&
$\big((\,\one{u'}\tensor\one{uu'}\,)\tensor(\,\rnode{a'}{a}\tensor\rnode{b'}{b}\perp)\big)
\tensor (\,\one{uuu'}\tensor \one{uuuu'}\perp)$
\\
$(\,\rnode{b1}{b}\tensor\rnode{a1}{a}\,\perp) \tensor \big((\,\rnode{c1}{c}\,\perp\tensor\rnode{cc1}{c}\,)\perp
\tensor \one{u1}\perp\big)$
&
$\mapsto$ \\
$\big((\,\one{u2}\perp\tensor \rnode{d2}{d}\,)\perp\tensor \rnode{c2}{c}\,\big)\perp
\tensor (\,\one{uu2} \tensor \one{uuu2})\perp$
&&
$\big((\,\one{u2'}\perp\tensor \rnode{d2'}{d}\,)\perp\tensor \rnode{c2'}{c}\,\big)\perp
\tensor (\,\one{uu2'} \tensor \one{uuu2'})\perp$
\dvec{u}{b1}
\vecanglespos{uu}{c1}{-60}{110}{.47}
\vecanglespos{a}{b1}{-120}{65}{.59}\nbput[npos=.6,nrot=:D]{$x$}
\vecanglespos{a1}{b}{60}{-115}{.67}\nbput[npos=.76,nrot=:U]{$x$}
\uloopvecleft{cc1}{c1}\nbput[npos=.5,nrot=:D]{$y$}
\dloopvec{uuu}{uuuu}
\uvec{u1}{uuuu}
\dloopvec{b1}{a1}\nbput[npos=.32,nrot=:U]{$w$}
\vecangles{u2}{a1}{82}{-83}
\vecangles{c1}{d2}{-105}{70}\nbput[npos=.62,nrot=:U]{$z$}
\vecangles{c2}{cc1}{75}{-100}\nbput[npos=.63,nrot=:U]{$c$}
\vecangles{uu2}{u1}{85}{-103}
\vecangles{uuu2}{u1}{90}{-80}
\vecanglesposheight{u'}{b'}{-60}{-90}{.58}{1}
\vecanglespos{uu'}{d2'}{-80}{90}{.45}
\dloopvec{a'}{b'}\nbput[npos=.2,labelsep=1pt]{$xwx$}
\dloopvec{uuu'}{uuuu'}
\vecanglespos{u2'}{b'}{70}{-77}{.58}
\uloopvecleft{c2'}{d2'}\nbput[npos=.5]{$zy$}
\vecangles{uu2'}{uuuu'}{90}{-90}
\vecangles{uuu2'}{uuuu'}{90}{-76}
\end{psmatrix}
\end{center}
The category of $\A$-nets ($\A$-linkings modulo Trimble rewiring, as
before) is the free star-autonomous category generated by $\A$.

\paragraph*{Coherence.}
Equivalence 
modulo rewiring is decidable, by finiteness.  Thus we have a full
coherence theorem: we can decide the general commutativity of diagrams
of canonical maps in star-autonomous categories.
Here are two short illustrative examples.

\emph{Example 1: identity $\neq$ twist on $\bot=\tu\perp$.}\label{intro-rewiring-examples}\label{intro-rewiring-example1}
Let $\tw_{A,B}:A\tensor B\to B\tensor A$ be the canonical twist
(symmetry) isomorphism.  
The identity and twist $\id_{\bot,\bot},\tw_{\bot,\bot}:\bot\tensor
\bot\to \bot\tensor \bot$ determine respective linkings $i$ and $t$:
\begin{center}\small\psset{rowsep=2.5\baselineskip}$\begin{psmatrix}
\nbot{b}\tensor\nbot{bb} \\ 
\nbot{b1}\tensor\nbot{bb1}
\uvec{b1}{b}\uvec{bb1}{bb}\blabel{b}{b1}{i}{.7cm} 
\end{psmatrix}
\rule{3cm}{0cm}
\begin{psmatrix} 
\nbot{b}\tensor\nbot{bb} \\
\nbot{b1}\tensor\nbot{bb1}
\vecanglespos{b1}{bb}{75}{-105}{.78}\vecanglespos{bb1}{b}{105}{-75}{.78}
\alabel{bb}{bb1}{t}{.4cm} 
\end{psmatrix}$\end{center}
They differ on two inputs,
and there are no other%
\footnote{\label{no-others}The
other two functions from negative leaves to positive leaves fail the
proof net criterion.}
linkings $\bot\tensor\bot\to\bot\tensor\bot$, so $i$ and $t$ cannot be rewired into each other.
Thus, in general,
$\id_{\bot,\bot}\neq\twist_{\bot,\bot}:\bot\tensor\bot\to\bot\tensor\bot$.

\emph{Example 2: Triple-dual problem.}\label{intro-rewiring-example2}  We show that the following diagram
commutes (an instance of the triple-dual problem, \cf\ \cite[\S1,
diagram\ (1.4)]{KM71})
\begin{equation}\label{triangle}
\psset{nodesep=1ex}
\begin{psmatrix}[ref=c]
\big((a\multimap\bot)\multimap\bot\big)\multimap\bot &
a\multimap\bot\rule{0pt}{3ex} \\
& 
\big((a\multimap\bot)\multimap\bot\big)\multimap\bot
\ncline{->}{1,1}{1,2}\naput{k_a\multimap \id}
\ncline{->}{1,2}{2,2}\naput{k_{(a\multimap\mkern2mu\bot)}}
\ncline{->}{1,1}{2,2}\nbput{\id}
\end{psmatrix}
\end{equation}
where 
$A\multimap B=(A\tensor B\perp)\perp$ and
$k_A:A\;\to\;(A\mkern-2mu\multimap\mkern-2mu\bot)\mkern-2mu\multimap\mkern-2mu\bot$ is the canonical map of
its type.  Each path in the triangle determines a
corresponding linking
\begin{center}\footnotesize\begin{math}
\newcommand{\tightmap}{\mkern-3mu\multimap\mkern-4mu}
\psset{rowsep=1.7\baselineskip,nodesep=2pt}
\rule{.3cm}{0pt}\begin{psmatrix}
\big((\rnode{a}{a}\tightmap\nbot{b})\tightmap\nbot{bb}\big)\tightmap\nbot{bbb}\\\\
\big((\rnode{a1}{a}\tightmap\nbot{b1})\tightmap\nbot{bb1}\big)\tightmap\nbot{bbb1}
\uvec{a1}{a}
\uvec{b1}{b}
\dvec{bb}{bb1}
\uvec{bbb1}{bbb}
\blabel{a}{a1}{\id}{.7cm} 
\end{psmatrix}
\rule{3cm}{0cm}
\rnode{A}{\begin{psmatrix} 
\big((\rnode{a}{a}\tightmap\nbot{b})\tightmap\nbot{bb}\big)\tightmap\nbot{bbb}\\
\rnode{am}{a}\tightmap\nbot{bm} \\
\big((\rnode{a1}{a}\tightmap\nbot{b1})\tightmap\nbot{bb1}\big)\tightmap\nbot{bbb1}
\blabelpos{a}{a1}{k_a\tightmap \id}{.4cm}{.23} 
\blabelpos{a}{a1}{k_{(a\multimap\mkern2mu\bot)}}{.4cm}{.77} 
\vecangles{am}{a}{110}{-60}
\vecangles{a1}{am}{60}{-110}
\dloopvecleft{bb}{b}
\vecangles{bm}{bbb}{50}{-125}
\vecangles{b1}{bm}{60}{-120}
\uloopvecleft{bbb1}{bb1}
\end{psmatrix}}
\rule{1cm}{0cm}
\rnode{B}{\begin{psmatrix} 
\big((\rnode{a}{a}\tightmap\nbot{b})\tightmap\nbot{bb}\big)\tightmap\nbot{bbb}\\
\\
\big((\rnode{a1}{a}\tightmap\nbot{b1})\tightmap\nbot{bb1}\big)\tightmap\nbot{bbb1}
\uvec{a1}{a}
\dloopvecleft{bb}{b}
\vecangles{b1}{bbb}{55}{-125}
\uloopvecleft{bbb1}{bb1}
\end{psmatrix}}
\clabel{A}{B}{=}
\end{math}\end{center}
equivalent via three rewirings:
\begin{center}\scriptsize
\psset{nodesep=.5ex,rowsep=1.3cm}
\newcommand{\tightmap}{\mkern-5mu\multimap\mkern-5mu}
\newcommand{\core}[2]{%
\rnode{#1}{\psframebox[linestyle=none]{%
\psset{nodesep=.5ex,rowsep=1.3cm}\begin{psmatrix}
$((\rnode{a'}{a}\tightmap\nbot{b'})\tightmap\nbot{bb'})\tightmap\nbot{bbb'}\;$
\\
$((\rnode{a1'}{a}\tightmap\nbot{b1'})\tightmap\nbot{bb1'})\tightmap\nbot{bbb1'}\;$
\uvec{a1'}{a'}
#2
\end{psmatrix}}}}
\begin{psmatrix}
  \core{D}{%
    \dvec{bb'}{bb1'}
    \uvec{b1'}{b'}
    \uvec{bbb1'}{bbb'}
  }
  & \hspace{-3ex} &
  \core{C}{%
    \dvec{bb'}{bb1'}
    \uvec{b1'}{b'}
    \uloopvecleft{bbb1'}{bb1'}
  }
  & \hspace{-4ex} &
  \core{B}{%
    \dloopvecleft{bb'}{b'}
    \uvec{b1'}{b'}
    \uloopvecleft{bbb1'}{bb1'}
  }
  & \hspace{-4ex} &
  \core{A}{%
    \dloopvecleft{bb'}{b'}
    \vecangles{b1'}{bbb'}{55}{-125}
    \uloopvecleft{bbb1'}{bb1'}
  }
\end{psmatrix}
  \psset{linestyle=none}
  \ncline{A}{B}\ncput{$\leftrightarrow$}
  \ncline{B}{C}\ncput{$\leftrightarrow$}
  \ncline{C}{D}\ncput{$\leftrightarrow$}
\end{center}
Thus 
we conclude that triangle (\ref{triangle}) commutes in every
star-autonomous category.\footnote{\label{path}Compare this with
similar arguments in \cite{BCST96} (Sec.~4.2),
\cite{KO99} (Sec.~2) and \cite{MO03} (Sec.~10).  A key advantage
here is that, because of the simple path composition, the composite
$\:k_a\mkern-3mu\multimap\mkern-3mu\id\:;\: k_{(a\multimap\bot)}\:$ is
immediate on inspection.}


\parag{Related work}\label{related-work}


This paper follows an approach which can be traced back to Todd Trimble's
Ph.D.{}
thesis \cite{Tri94}\footnote{Copies of Trimble's thesis \cite{Tri94}
are not particularly easy to come by.  See \cite[\S1,\,\S3.2]{BCST96}
and \cite[\S3]{CS97} for overviews of some of the content.}.  Let us
call this the \emph{rewiring approach}:
\begin{itemize}
\myitem{a} represent a morphism by a structure involving attachments (`wiring') of
negative units\footnote{For history and development of `attachment'
of negative units in linear logic, see
\cite{Dan90,Reg92,GSS92,Gir93,Gir96}.};
\myitem{b} quotient by rewiring: identify structures which differ by just 
one such attachment.
\end{itemize}
This is the fourth paper to use the rewiring approach to
construct free star-autonomous categories:
(1) in \cite{BCST96} stuctures are circuit diagrams, attachments are
edges from negative units (called thinning links), and rewiring is by
rules of circuit surgery;
(2) in \cite{KO99} structures are $\lambda\mu$-style terms with
explicit substitution, attachment is the unit let construct $\langle
x/\ast\rangle(-)$, and rewiring is by a congruence rule
$\:\Gamma\vdash C[\langle x/\ast\rangle t]\sim\langle x/\ast\rangle
C[t] : A\:$\;;\:
(3) in \cite{LS04} structures are formulas of multiplicative linear
logic equipped with a leaf permutation,
attachment is the formula constructor $(-)\tensor\bot$, and rewiring is by the rewrite rule
$Q\footnoteparr (R\tensor\bot)\leftrightarrow (Q\footnoteparr R)\tensor\bot$.
See Section~\ref{approach} for details, especially Table~\ref{approach-table}.
In each case, a morphism of the free category is a finite equivalence
class, so equality of morphisms is decidable.

At first sight, it may seem repetitive and uninteresting to employ the
rewiring approach for star-autonomous categories a fourth time.
However, the simplicity of the end product relative to the previous
approaches seems to justify the repetition.
As we remarked earlier, we preserve an elegant feature of
Eilenberg-Kelly-MacLane graphs:
\begin{itemize}
\item \sl Composition is simply path composition.
\end{itemize}
Composition is more complex in the three previous approaches to free
star-autonomous categories \cite{BCST96,KO99,LS04}. 
In each case, given normal forms $s$ and $t$ representing equivalence
classes, one first forms a `concatenation' $s;t$ (in \cite{BCST96},
pasting the circuits at a cut wire, in \cite{KO99} forming an explicit
substitution, and in \cite{LS04} forming a proof net with cuts), then
normalises $s;t$ in a rewrite system.
In \cite{BCST96} and \cite{LS04} normalisation is defined only modulo
equivalence, since unit attachments (thinning links in
\cite{BCST96} and $(-)\tensor\bot$ in \cite{LS04}) can block cut
redexes\footnote{A problem also discussed by Girard, in the context of
proof nets \cite[\S{}A.2]{Gir96}.}, and in
\cite{KO99} confluence is only modulo equivalence (congruence).
In contrast, path composition, as in this paper and
Eilenberg-Kelly-MacLane graphs, is simple and direct.



This paper is the sequel to \cite{Hug05}\footnote{It was tempting to merge the two papers.  However,
some proof theorists and linear logicians may not be interested in
star-autonomous categories and the emphasis on coherence over
correctness critera (combinatorial characterisations of
\emph{allowability}, in the parlance of \cite{KM71}), and conversely,
some categorists may not be interested in linear logic and its sequent
calculus, and the emphasis on correctness criteria over coherence. The
present paper targets categorists, and assumes no familiarity with
linear logic.} on multiplicative proof nets with units, which relate
closely to $\A$-linkings, for $\A$ discrete.
For comprehensive background and history on free star-autonomous
categories and coherence, see the introductions of
\cite{BCST96,KO99,LS04}.

\parag{Acknowledgements}  
Many thanks to Robin Cockett and Robert Seely for helping me understand
the construction of free star-autonomous categories in
\cite{BCST96}, which is an important precursor to this paper.
I am extremely grateful to Robin Houston for insightful feedback, in
particular for improvements to the definition of \emph{split
star-autonomous category}.


\section{Split star-autonomous categories}\label{split-star}

The category of $\A$-linkings (sketched above, and defined in the next
section) is almost, but not quite, star-autonomous.  It becomes
star-autonomous upon quotienting by Trimble rewiring.  Below we
axiomatise its raw structure, prior to quotienting, as a
\emph{split star-autonomous category}, defined by relaxing the
unit isomorphisms $A\to \tu\tensor A$ and $A\to A\tensor\tu$ of a
star-autonomous category to be split monos (sections).

A \defn{star-autonomous category} \cite{Bar79} is a category $\C$
equipped with the following structure:
\begin{enumerate}
\myitem{1} \emph{Tensor}. A functor $-\tensor-:\C\times \C\to\C$.
\myitem{2} \emph{Unit}.  An object $\tu\in \C$.
\myitem{3} \emph{Associativity}. 
A natural isomorphism $a_{A,B,C}:(A\tensor B)\tensor C\to
A\tensor(B\tensor C)$, natural in objects $A,B,C\in\C$, such that the
following pentagon commutes:
\begin{displaymath}
\begin{psmatrix}[ref=c,nodesep=1ex,colsep=-4ex]
\big((A\tensor B)\tensor C\big)\tensor D \rule{0pt}{3ex}
&& (A\tensor B)\tensor (C\tensor D) && A\tensor \big(B\tensor (C\tensor
D)\big)
\\
& \big(A\tensor(B\tensor C)\big)\tensor D
&&
A\tensor\big((B\tensor C)\tensor D\big)
\ncline{->}{1,1}{2,2}\nbput[npos=.34]{a\tensor \id}
\ncline{->}{1,1}{1,3}\naput{a}
\ncline{->}{1,3}{1,5}\naput{a}
\ncline{->}{2,2}{2,4}\nbput{a}
\ncline{->}{2,4}{1,5}\nbput[npos=.66]{\id\tensor a}
\end{psmatrix}
\end{displaymath}
\myitem{4} \emph{Unit isomorphisms}.  
Natural isomorphisms $l_A:A\to\tu\tensor A$ and $r_A:A\to
A\tensor\tu$, natural in the object $A\in\C$, such that the following
triangle commutes:\footnote{Conventionally the unit
isomorphisms are typed $A\tensor \tu\to A$ and $\tu\tensor A\to A$\;
\cite{Mac71}.  We reverse them to ease the definition of split
star-autonomous category.}
\begin{displaymath}
\begin{psmatrix}[ref=c,nodesep=1ex,colsep=1ex]
{} & A\tensor B \\
(A\tensor\tu)\tensor B && A\tensor (\tu\tensor B) 
\ncline{->}{2,1}{2,3}\nbput{a}
\ncline{->}{1,2}{2,1}\nbput[npos=.57]{r\tensor \id}
\ncline{->}{1,2}{2,3}\naput[npos=.57]{\id\tensor l}
\end{psmatrix}
\end{displaymath}
\myitem{5} \emph{Symmetry}.
A natural isomorphism $c_{A,B}:A\tensor B\to B\tensor A$, natural in
objects $A,B\in\C$, such that 
the following diagrams commute:
\begin{displaymath}\begin{psmatrix}[ref=c,nodesep=1ex,colsep=1ex]
A\tensor B  && A\tensor B \\
{} & B\tensor A  
\ncline{->}{1,1}{1,3}\naput{\id}
\ncline{->}{1,1}{2,2}\nbput{c}
\ncline{->}{2,2}{1,3}\nbput{c}
\end{psmatrix}
\hspace{5ex}
\begin{psmatrix}[ref=c,nodesep=1ex,colsep=8.5ex]
(A\tensor B)\tensor C 
&
A\tensor (B\tensor C)
& 
(B\tensor C)\tensor A
\\
(B\tensor A)\tensor C
&
B\tensor (A\tensor C)
&
B\tensor(C\tensor A)
\ncline{->}{1,1}{1,2}\naput{a}
\ncline{->}{1,2}{1,3}\naput{c}
\ncline{->}{1,3}{2,3}\naput{a}
\ncline{->}{1,1}{2,1}\nbput{c\tensor\id}
\ncline{->}{2,1}{2,2}\nbput{a}
\ncline{->}{2,2}{2,3}\nbput{\id\tensor c}
\end{psmatrix}\end{displaymath}
\myitem{6} \emph{Involution}. A full and faithful functor $(-)\perp:\C\op\to\C$.
\myitem{7} \emph{Closure}. A natural isomorphism $\C(A\tensor B,C\perp)\to\C(A,(B\tensor C)\perp)$, natural 
in objects $A,B,C\in\C$.
\end{enumerate}
Axioms (1)--(4) define a monoidal category, and (1)--(5) define a
symmetric monoidal category \cite{Mac71}.\footnote{In \cite{Mac71} Mac
Lane demands $r_I=l_I$ for a monoidal category, and $c_{\tu,A}\,l_A=r_A$
for a symmetric monoidal category, which are superfluous
\cite{Kel64,JS93}.}  The above is not the original definition of
star-autonomous category, but (modulo our slightly different
presentation of symmetric monoidal category) was shown equivalent to
it in \cite{Bar79}.

Define a \defn{split star-autonomous category} by relaxing (4):
demand only that $l_A:A\to\tu\tensor A$ and $r_A:A\to A\tensor\tu$ be
split monos (sections), rather than forcing them to be isomorphisms.
%(We retain naturality and the commutating triangle.)
Thus we require the existence of left inverses
$\overline{l}_A:\tu\tensor A\to A$ and $\overline{r}_A:A\tensor \tu\to
A$ with $\overline{l}_A\,l_A=\id_A$ and $\overline{r}_A\,r_A=\id_A$,
but right inverses need not exist.
%
The category of $\A$-linkings (sketched in the Introduction, and defined
in the next section) is split star-autonomous, but not
star-autonomous.\footnote{The category of $\A$-linkings is
also \emph{semi star-autonomous} in the sense of \cite{HHS05}.}  It
becomes star-autonomous upon quotienting by Trimble rewiring.

\section{Linkings}\label{linkings}

This section presents the split star-autonomous category $\linka$
of $\A$-linkings, over a category $\A$.  Each linking is `two-sided',
being a morphism $S\to T$ between two star-autonomous shapes $S$ and
$T$, analogous to the original Eilenberg-Kelly-MacLane graphs
\cite{EK66,KM71}.  Section~\ref{one-sided} introduces `one-sided' 
linkings, more analogous to the graphs in \cite{KL80} for compact
closed categories.  Auxiliary one-sided linkings will facilitate the
proofs of our results later.

\subsection{The category $\lf$ of signed sets and leaf functions}\label{lf}

Define the category $\lf$ as follows.  An object is a \defn{signed
set} $X$, whose elements we shall call \defn{leaves}, each signed
either \defn{positive} or \defn{negative}.  (Thus a signed set is a
set $X$ equipped with a function $X\to\{+,-\}$.)  A morphism $X\to Y$
is a \defn{partial leaf function}: a partial function from
$X\posrestr+Y\negrestr$ to $X\negrestr+Y\posrestr$, where $+$ is
disjoint union and $(-)\posrestr$ (resp.\ $(-)\negrestr$) restricts to
positive (resp.\ negative) leaves.  For example,
\begin{center}
\begin{math}
\psset{nodesep=-.2mm}
\begin{psmatrix}
\posb{u}\bgap\posb{uu}\bgap\posb{a}\bgap\negb{aa}\bgap\posb{uuu}\bgap\negb{uuuu} \\
\posb{a1}\bgap\negb{aa1}\bgap\posb{b1}\bgap\negb{bb1}\bgap\negb{u1}
\linevec{u}{a1}
\linevecpos{uu}{b1}{.53}
\linevecpos{a}{a1}{.59}
\linevecpos{aa1}{aa}{.59}
\uloopvecanglesheight{bb1}{b1}{115}{65}{1}
\dloopvecanglesheight{uuu}{uuuu}{-65}{-115}{1}
\linevec{u1}{uuuu}
\end{psmatrix}
\end{math}
\end{center}
is a (total) morphism from the upper signed set, 4 positive $\bullet$
and 2 negative $\circ$ leaves, to the lower one, 2 positive and 3
negative leaves.  Composition is simply finite (directed) path
composition, \eg
\begin{center}\label{goi-comp}
\vspace{-2.6ex}
\psset{rowsep=1.1cm,nodesep=-.2mm}\begin{psmatrix}
$\posb{u}\bgap\posb{uu}\bgap\posb{a}\bgap\negb{aa}\bgap\posb{uuu}\bgap\negb{uuuu}$ 
&&
$\posb{u'}\bgap\posb{uu'}\bgap\posb{a'}\bgap\negb{aa'}\bgap\posb{uuu'}\bgap\negb{uuuu'}$
\\
$\posb{a1}\bgap\negb{aa1}\bgap\posb{b1}\bgap\negb{bb1}\bgap\negb{u1}$
&
$\mapsto$ \\
$\negb{u2}\gposb{b2}\gnegb{bb2}\gnegb{uu2}\gnegb{uuu2}$
&&
$\negb{u2'}\gposb{b2'}\gnegb{bb2'}\gnegb{uu2'}\gnegb{uuu2'}$
\linevec{u}{a1}
\linevecpos{uu}{b1}{.53}
\linevecpos{a}{a1}{.59}
\linevecpos{aa1}{aa}{.59}
\uloopvecanglesheight{bb1}{b1}{115}{65}{1}
\dloopvecanglesheight{uuu}{uuuu}{-65}{-115}{1}
\linevec{u1}{uuuu}
\dloopvecanglesheight{a1}{aa1}{-65}{-115}{1}
\linevec{u2}{aa1}
\linevec{b1}{b2}
\linevec{bb2}{bb1}
\linevec{uu2}{u1}
\linevec{uuu2}{u1}
\vecanglesposheight{u'}{aa'}{-60}{-120}{.58}{.8}
\linevecpos{uu'}{b2'}{.45}
\dloopvecanglesheight{a'}{aa'}{-65}{-120}{1}
\dloopvecanglesheight{uuu'}{uuuu'}{-65}{-115}{1}
\linevecpos{u2'}{aa'}{.58}
\uloopvecanglesheight{bb2'}{b2'}{115}{65}{1}
\linevec{uu2'}{uuuu'}
\linevec{uuu2'}{uuuu'}
\end{psmatrix}
\end{center}
Formally, given partial leaf functions $f:X\to Y$ and $g:Y\to Z$ define
$gf\,:\,X\to Z$ by setting $(gf)(l)=l'$ iff there is a finite directed
path from $l$ to $l'$ in the union of $f$ and $g$, viewed as a
directed graph on $X+Y+Z$.

The category $\lf$ is $\intsetp$, the result of applying
the feedback construction $\int$ \cite{JSV96} (or geometry of
interaction construction \cite{Abr96,Gir89}) to the traced monoidal
category $\setp$ of sets and partial functions, with tensor as
coproduct.
Thus $\lf$ is compact closed, with tensor as disjoint union and the
dual of a signed set obtained by reversing signs.
The subcategory of $\lf$ whose objects are finite and morphisms
are bijections is the category of involutions defined in
\cite[\S3]{KL80}, a modified presentation of the fixed-point free 
involutions of \cite{EK66,KM71}.

The following proposition will be used in Section~\ref{arbitrary}.
\begin{proposition}[Unique Path Property]\label{upp}
If $gf$ is a composite partial leaf function containing the edge
$\langle l,l'\rangle$ (\ie, $(gf)(l)=l'$), then a unique path
$ll_0\ldots l_nl'$ gave rise to $\langle l,l'\rangle$ during
composition.
\end{proposition}
\begin{proof}
Suppose $ll_0'\ldots l_m'l'$ were an alternative path.  Let $i$ be
minimal with $l_i\neq l'_i$.  Then $f(l_{i-1})=l_i$ and
$f(l_{i-1})=l_i'$, or $g(l_{i-1})=l_i$ and $g(l_{i-1})=l_i'$,
contradicting (partial) functionality.
\end{proof}

\subsection{Shapes and linkings}\label{switchings}

Fix a set $\A=\{a,b,c,\ldots\}$ of generators. 
An \defn{atom} is any generator in $\A$ or the constant $\tu$.
An \defn{$\A$-shape} is an expression generated from atoms by binary
tensor $\tensor$ and unary dual $(-)\perp$, \eg\ $\big(a\tensor
(b\perp\tensor a\perpp)\big)\perpp{}\perp\tensor
\tu\perp$.  The \defn{sign} of an atom or tensor in a shape is \defn{positive} $+$ iff
it is under an even number of duals $(-)\perp$, otherwise
\defn{negative} $-$.  Here is a shape with signs subscripted:
\raisebox{2pt}{\footnotesize$\big(\underset{-}{\tu}\perpp\underset{-}{\tensor}
(\underset{+}{a}\perpp{}\perp\underset{-}{\tensor}(\underset{+}{\tu}\underset{+}{\tensor}
\underset{+}{b})\perp)\big)\perp$}\:.
Write $\leaves{S}$ for the underlying signed set of a shape $S$,
obtained from its leaves, \ie, its occurrences of atoms.  
%
A \defn{leaf function} $X\to Y$ between signed sets is a partial leaf
function $X\to Y$ which is total (\ie, defined on the whole of
$X^++Y^-$).
%
A \defn{leaf function} $f:S\to T$ between shapes is a leaf function
$f:\leaves{S}\to\leaves{T}$ between the underlying signed sets.  The
\defn{graph of $f$} is the disjoint union of the underlying parse
trees of $S$ and $T$ (trees labelled with atoms at the leaves and
$\tensor$ or $\ast$ at internal vertices) together with the edges of
$f$, undirected.  For example, if $f:S\to T$ is
\begin{center}\vspace*{-2.7ex}\small
\begin{psmatrix}[rowsep=3.3\baselineskip]
$(\,\rnode{a}{a}\perp\tensor\rnode{aa}{a})\tensor \one{uu}$ \\
$(\,\rnode{a1}{a}\perp\tensor\rnode{aa1}{a}\,) \tensor (\,\rnode{b1}{b}\tensor\rnode{bb1}{b}\perp)\perp$
\vecanglespos{uu}{bb1}{-80}{80}{.5}
\vecanglespos{aa}{aa1}{-100}{80}{.59}
\vecanglespos{a1}{a}{80}{-100}{.67}
\uloopvec{b1}{bb1}
\end{psmatrix}
\end{center}
then the graph of $f$ is shown below-left:
\begin{center}\vspace{-.4ex}\small\begin{math}\begin{array}{c}
\psset{colsep=3cm,framesep=0pt,nodesep=0pt,rowsep=1cm}
\psset{treemode=D,nodesep=2pt,levelsep=20pt}
  \pstree{\TR[name=t11]{\tensor}}
    {
     \pstree{\TR[name=t112]{\tensor}}
      {
       \pstree{\TR[name=ast1]{\ast}}
         {\TR[name=aa]{a}
         }
       \TR[name=a]{a}
      }
      {
       \TR[name=uu]{\tu} 
      }
    }
  
\\\\
\psset{treemode=U,nodesep=2pt,levelsep=20pt}
\pstree{\TR[name=tt1]{\tensor}}
  {\pstree{\TR[name=tt11]{\tensor}}
    {
     \pstree{\TR[name=ast'1]{\ast}}
       {\TR[name=aa1]{a}
       }
     \TR[name=a1]{a}
    }
     {\pstree{\TR[name=ast'2]{\ast}}
       {\pstree{\TR[name=tt121]{\tensor}}
          {\TR[name=bb1]{b}
           \pstree{\TR[name=ast'3]{\ast}}
            {\TR[name=b1]{b}
            }
           
          }
       }
     }
  }
\lineangles{uu}{b1}{-85}{90}
\lineangles{a}{a1}{-90}{90}
\lineanglesheight{aa1}{aa}{90}{-95}{1.1}
\lineanglesheight{b1}{bb1}{120}{90}{1.3}
\end{array}
\hspace{20ex}
\begin{array}{c}
\psset{colsep=3cm,framesep=0pt,nodesep=0pt,rowsep=1cm}
\psset{treemode=D,nodesep=2pt,levelsep=20pt}
  \pstree{\TR[name=t11]{\tensor}}
    {
     \pstree{\TR[name=t112]{\tensor}}
      {
       \pstree{\psset{linestyle=none}\TR[name=ast1]{\ast}}
         {\TR[name=aa]{a}
         }
       \TR[name=a]{a}
      }
      {
       \psset{linestyle=none}\TR[name=uu]{\tu} 
      }
    }
  
\\\\
\psset{treemode=U,nodesep=2pt,levelsep=20pt}
\pstree{\TR[name=tt1]{\tensor}}
  {\pstree{\TR[name=tt11]{\tensor}}
    {
     \pstree{\TR[name=ast'1]{\ast}}
       {\TR[name=aa1]{a}
       }
     \TR[name=a1]{a}
    }
     {\pstree{\TR[name=ast'2]{\ast}}
       {\pstree{\TR[name=tt121]{\tensor}}
          {\TR[name=bb1]{b}
           \pstree{\psset{linestyle=none}\TR[name=ast'3]{\ast}}
            {\TR[name=b1]{b}
            }
           
          }
       }
     }
  }
\lineangles{uu}{b1}{-85}{90}
\lineangles{a}{a1}{-90}{90}
\lineanglesheight{aa1}{aa}{90}{-95}{1.1}
\lineanglesheight{b1}{bb1}{120}{90}{1.3}
\end{array}\end{math}\end{center}
A \defn{switching} of a leaf function $f:S\to T$ between shapes is any
subgraph of the graph of $f$ obtained by deleting one of the two
argument edges of each positive tensor in $S$ and negative tensor in
$T$.  See above-right for an example.
A leaf function $f:S\to T$ is an \defn{$\A$-linking}
if it satisfies:
\begin{itemize}\label{criterion}
\myitem{1} \Matching. 
Restricting $f$ to $a$-labelled leaves (both in $S$ and in $T$) yields
a bijection for each generator $a\in\A$
\myitem{2} \Switching. 
Every switching of $f$ is a tree.
\end{itemize}
The leaf function above-left is an $\A$-linking: its switching shown
above-right is a tree, as are its seven other switchings.  Other
examples of $\A$-linkings are shown on page~\ref{firstexample} of the
Introduction.

The linking criterion (conditions (1) and (2)) is the analogue of
allowability in \cite{EK66,KM71}, but
presented combinatorially rather than inductively/syntactically.
It is traditional in linear logic \cite{Gir87} to present allowability
combinatorially.  The criterion above derives from a standard one for
multiplicative proof nets \cite{DR89,Hug05}.

\begin{proposition}\label{linear-time}
Verifying that a leaf function is a linking is linear time in
the number of leaves.
\end{proposition}
Thus the linking criterion (allowability) is very simple.
This proposition is proved in Section~\ref{proofs}, using one-sided
linkings.


Given linkings $f:S\to T$ and $g:T\to U$ define $gf:S\to U$ as their
path composite (in the category $\lf$ of partial leaf functions
between signed sets, defined in Section~\ref{lf}).
\begin{proposition}\label{link-comp}
The composite of two linkings is a linking.
\end{proposition}
The proof is in Section~\ref{proofs}, using one-sided linkings.

Write $\linka$ for the category of $\A$-linkings between $\A$-shapes.
Identities are inherited from $\lf$: the identity $S\to S$ has an edge
between the $i\nth$ leaf in the input shape and the $i\nth$ leaf in
the output shape.  The identity is a well-defined linking (\ie, every
switching is a tree) by a simple induction on the number of tensors in
$S$.

\parag{Split star-autonomy}
The category $\linka$ of $\A$-linkings is split star-autonomous, as
defined in Section~\ref{split-star}.  

Tensor and dual act symbolically on objects, \ie, the tensor of shapes
$S$ and $T$ is the shape $S\tensor T$, and the dual of $S$ is
$S\perp$.  Tensor acts as disjoint union on morphisms, hence is
functorial.  Given linkings $f:S\to T$ and $f':S'\to T'$, the leaf
function $f\tensor f':S\tensor S'\to T\tensor T'$ is a well-defined
linking since every switching of $f\tensor f'$ is a disjoint union of
switchings of $f$ and $f'$, connected at the tensor of $T\tensor T'$,
together with one of the two argument edges of the tensor of $S\tensor
S'$.  The dual $f\perp:T\perp\to S\perp$ of a linking $f:S\to T$ has
the same underlying directed graph as $f$, hence $(-)\perp$ is
functorial, full and faithful.

Associativity and symmetry are the obvious bijective leaf functions
(exactly the associativity and symmetry involutions of
\cite[\S3]{KM71}): associativity $(S\tensor T)\tensor U\to
S\tensor(T\tensor U)$ has edges between the $i\nth$ leaf of the input
and the $i\nth$ leaf of the output, and symmetry $S\tensor T\to
T\tensor S$ has edges between the $i\nth$ leaf of $S$ in $S\tensor T$
and the $i\nth$ leaf of $S$ in $T\tensor S$, and similarly for $T$.
Both are well-defined linkings by a simple induction (analogous to the
well-definedness of the identity).

The natural isomorphism $\linka(S\tensor
T,U\perp)\cong\linka(S,(T\tensor U)\perp)$ is the restriction of the
corresponding natural isomorphism
$\lf(\leaves{S}+\leaves{T},\leaves{U}\perp)\cong\lf(\leaves{S},(\leaves{Y}+
\leaves{Z})\perp)$ in the underlying compact closed category $\lf$ of leaf functions 
between signed sets.
This restriction is well-defined since switchings
$S\tensor T\to U\perp$ and 
$S\to (T\tensor U)\perp$ are in bijection.

Define $l_S:S\to\tu\tensor S$ as the identity $S\to S$ together with
$\tu\tensor(-)$ added to the syntax of the output shape, and define
$r_S:S\to S\tensor\tu$ similarly.  Since the added $\tu$ and $\tensor$
are positive, the switchings of $l_S$ and $r_S$ are in bijection with
those of the identity, hence $l_S$ and $r_S$ are well-defined
linkings.  The requisite triangle commutes since the edge between the
distinguished $\tu$'s in associativity $a:(S\tensor \tu)\tensor T\to
S\tensor(\tu\tensor T)$ does not connect to an edge of $r\tensor\id$
during composition.
%
Naturality of $l_S$ and $r_S$ holds because there is no edge to
the added $\tu$.

Define the left inverse $\overline{l}_S:\tu\tensor S\to S$ from the
identity $S\to S$ by\label{split-unit-arrows} adding $\tu\tensor(-)$
to the input shape together with an edge from the added $\tu$ to an
arbitrary positive leaf of the $S$ on the right of the arrow
$\tu\tensor S\to S$ or a negative leaf of the $S$ on the left of the
arrow.  
%
This is a well-defined linking since every switching is a switching of
the identity $S\to S$ together with two new edges and two new
vertices, arranged so that the graph remains a tree, irrespective of
whether the added tensor is switched left or right.
%
The morphism $\overline{l}_S$ is left inverse to $l_S$ since the edge
of $\overline{l}_S$ from the added $\tu$ meets no edge of $l_S$ during
the composition
$\overline{l}_S\,l_S$.  The left inverse
$\overline{r}_S:S\tensor\tu\to S$ of $r_S:S\to S\tensor \tu$ is
analogous.

\parag{Compatibility}

Given leaf functions $f:X\to Y$ and $g:Y\to Z$ between signed sets,
write $f+g$ for the disjoint union of $f$ and $g$, viewed as a simple
directed graph on $X+Y+Z$.\footnote{A \defn{simple directed graph} on
a set $V$ (\cf\ \cite{Bol02}) is a set of edges on $V$, where an
\defn{edge on $V$} is an ordered pair $vw$ of distinct elements of
$V$.}
%
The following theorem will not be used in the sequel; we present it
since it is the analogue of Theorem~2.1 in \cite{KM71}.
\begin{theorem}[Compatibility]\label{compatibility}
If $f:S\to T$ and $g:T\to U$ are linkings between shapes, then $f+g$
contains no cycle.
\end{theorem}
By a \defn{cycle} we mean an undirected graph \cite{Bol02} on a vertex
set $\{v_1,\ldots,v_n\}$, all $v_i$ distinct, $n\ge 3$, and with an
edge $v_iv_j$ iff $j=i+1$ mod $n$.  The proof of the Compatability
Theorem is in Section~\ref{proofs}, using one-sided linkings.

\subsection{Linkings over an arbitrary base category}\label{arbitrary}

This section generalises $\A$-linkings from discrete $\A$ to an
arbitrary category $\A$.  Shapes are generated from the objects of
$\A$ as before.  A \defn{leaf function} $S\to T$ between shapes is a
leaf function $\leaves{S}\to\leaves{T}$ between the underlying signed
sets, equipped with a labelling: every edge from a leaf labelled by a
generator (object of $\A$) is labelled with a morphism of $\A$.  A
leaf function $f:S\to T$ is an \defn{$\A$-linking} if it satisfies:
\begin{itemize}\label{arb-matching}
\myitem{1a} \Bijection. Restricting $f$ to $\A$-labelled leaves (both in $S$ and in $T$) yields a bijection.
\myitem{1b} \Labelling. Whenever $x$ is the label of an edge 
from a leaf labelled $a$ to a leaf labelled $b$, then $x:a\to b$ is a
morphism in $\A$.
\myitem{2} \Switching. Every switching of $f$ is a tree.
\end{itemize}
(In forming the switchings of $f$,
ignore its edge labels.) Conditions (1a) and (2b) reduced to (1)
\Matching{} in the discrete case (since all labels are identities).

For example, if $x:a\to b$ and $y:c\to c$ in $\A$, then
\begin{center}
\small
\begin{psmatrix}[rowsep=3.3\baselineskip]
$\big((\,\one{u}\tensor\one{uu}\,)\tensor(\,\rnode{a}{a}\tensor\rnode{b}{b}\perp)\big)
\tensor (\,\one{uuu}\tensor \one{uuuu}\perp)$ \\
$(\,\rnode{b1}{b}\tensor\rnode{a1}{a}\,\perp) \tensor \big((\,\rnode{c1}{c}\,\perp\tensor\rnode{cc1}{c}\,)\perp
\tensor \one{u1}\perp\big)$
\dvec{u}{b1}
\vecanglespos{uu}{c1}{-60}{110}{.47}
\vecanglespos{a}{b1}{-120}{65}{.59}\nbput[npos=.59,nrot=:D]{$x$}
\vecanglespos{a1}{b}{60}{-115}{.67}\nbput[npos=.76,nrot=:U]{$x$}
\uloopvecleft{cc1}{c1}\nbput[npos=.5,nrot=:D]{$y$}
\dloopvec{uuu}{uuuu}
\uvec{u1}{uuuu}
\end{psmatrix}
\end{center}
is a linking from the upper to the lower shape.

Composition is path composition, as in the discrete case, but
simultaneously collecting labels along each path and composing them in
$\A$.  More precisely, if $l_1\ldots l_n$ is a path traversed during
(underlying discrete) composition, resulting in the edge $\langle
l_0,l_n\rangle$ in the (underlying discrete) composite, then:
\begin{itemize}
\item if every edge $\langle l_{i-1},l_{i}\rangle$ is
labelled with a morphism $x_i$ in $\A$, the composite edge $\langle
l_0,l_n\rangle$ is labelled by the composite $x_n\ldots x_1$ in $\A$,
\item otherwise $\langle l_0,l_n\rangle$ is unlabelled.
\end{itemize}
Thus an edge
in the composite is labelled iff every edge along the path giving rise
to it is labelled.
Here is an example of composition (where $c$ doubles as the identity
$c\to c$):
\begin{center}\small
\begin{psmatrix}[rowsep=2.8\baselineskip]
$\big((\,\one{u}\tensor\one{uu}\,)\tensor(\,\rnode{a}{a}\tensor\rnode{b}{b}\perp)\big)
\tensor (\,\one{uuu}\tensor \one{uuuu}\perp)$
&&
$\big((\,\one{u'}\tensor\one{uu'}\,)\tensor(\,\rnode{a'}{a}\tensor\rnode{b'}{b}\perp)\big)
\tensor (\,\one{uuu'}\tensor \one{uuuu'}\perp)$
\\
$(\,\rnode{b1}{b}\tensor\rnode{a1}{a}\,\perp) \tensor \big((\,\rnode{c1}{c}\,\perp\tensor\rnode{cc1}{c}\,)\perp
\tensor \one{u1}\perp\big)$
&
$\mapsto$ \\
$\big((\,\one{u2}\perp\tensor \rnode{d2}{d}\,)\perp\tensor \rnode{c2}{c}\,\big)\perp
\tensor (\,\one{uu2} \tensor \one{uuu2})\perp$
&&
$\big((\,\one{u2'}\perp\tensor \rnode{d2'}{d}\,)\perp\tensor \rnode{c2'}{c}\,\big)\perp
\tensor (\,\one{uu2'} \tensor \one{uuu2'})\perp$
\dvec{u}{b1}
\vecanglespos{uu}{c1}{-60}{110}{.47}
\vecanglespos{a}{b1}{-120}{65}{.59}\nbput[npos=.6,nrot=:D]{$x$}
\vecanglespos{a1}{b}{60}{-115}{.67}\nbput[npos=.76,nrot=:U]{$x$}
\uloopvecleft{cc1}{c1}\nbput[npos=.5,nrot=:D]{$y$}
\dloopvec{uuu}{uuuu}
\uvec{u1}{uuuu}
\dloopvec{b1}{a1}\nbput[npos=.32,nrot=:U]{$w$}
\vecangles{u2}{a1}{82}{-83}
\vecangles{c1}{d2}{-105}{70}\nbput[npos=.62,nrot=:U]{$z$}
\vecangles{c2}{cc1}{75}{-100}\nbput[npos=.63,nrot=:U]{$c$}
\vecangles{uu2}{u1}{85}{-103}
\vecangles{uuu2}{u1}{90}{-80}
\vecanglesposheight{u'}{b'}{-60}{-90}{.58}{1}
\vecanglespos{uu'}{d2'}{-80}{90}{.45}
\dloopvec{a'}{b'}\nbput[npos=.2,labelsep=1pt]{$xwx$}
\dloopvec{uuu'}{uuuu'}
\vecanglespos{u2'}{b'}{70}{-77}{.58}
\uloopvecleft{c2'}{d2'}\nbput[npos=.5]{$zy$}
\vecangles{uu2'}{uuuu'}{90}{-90}
\vecangles{uuu2'}{uuuu'}{90}{-76}
\end{psmatrix}
\end{center}
By the Unique Path Property (Proposition~\ref{upp}), composition is
well-defined: there is no ambiguity in constructing the labels on the
edges of a composite.
Composition is associative since concatenation of paths is
associative, and composition in $\A$ is associative.
The identity linking has all labels identities in $\A$.

\parag{Split star-autonomy}  
The split star-autonomous structure carries over from the discrete
case.  Labels on linking edges do not interfere: every label of a
canonical map (associativity, symmetry or unit map) is an identity.

\section{Nets}

This section quotients the category $\linka$ of $\A$-linkings by
Trimble rewiring \cite{Tri94,BCST96}, yielding the free star-autonomous
category generated by $\A$.  Define two $\A$-linkings as
\defn{similar} if one can be obtained from the other by re-targeting
an edge from an $\tu$,
\eg
\begin{center}
\small
\begin{psmatrix}[rowsep=.5\baselineskip]
$(\rnode{a}{a}\tensor\rnode{b}{b}\perp)\tensor\one{u}$ &&
$(\rnode{a'}{a}\tensor\rnode{b'}{b}\perp)\tensor\one{u'}$ \\ &
and \\ $\rnode{a1}{a}\tensor\rnode{b1}{b}\perp$ &&
$\rnode{a1'}{a}\tensor\rnode{b1'}{b}\perp$
\linevec{a}{a1}
\linevec{b1}{b}
\nccurve[ncurv=1.1,angleA=-115,angleB=-65]{u}{b}
\lput{:0}{\psline{->}(.05,.005)(.1,.005)}
\linevec{a'}{a1'}
\linevecpos{b1'}{b'}{.7}
\vecanglespos{u'}{a1'}{-100}{80}{.4}
\end{psmatrix}
\end{center}
in the discrete case, or, if $x:a\to b$ and $y:c\to c$ are morphisms in $\A$,
\begin{center}
\small
\begin{psmatrix}[rowsep=.7\baselineskip]
$(\rnode{a}{a}\tensor\rnode{b}{c}\perp)\tensor\one{u}$ &&
$(\rnode{a'}{a}\tensor\rnode{b'}{c}\perp)\tensor\one{u'}$ \\ &
and \\ $\rnode{a1}{b}\tensor\rnode{b1}{c}\perp$ &&
$\rnode{a1'}{b}\tensor\rnode{b1'}{c}\perp$
\linevec{a}{a1}\nbput[npos=.59]{$x$}
\linevec{b1}{b}\naput[npos=.5]{$y$}
\nccurve[ncurv=1.1,angleA=-115,angleB=-65]{u}{b}
\lput{:0}{\psline{->}(.05,.005)(.1,.005)}
\linevec{a'}{a1'}\nbput[npos=.59]{$x$}
\linevecpos{b1'}{b'}{.7}\naput[npos=.66]{$y$}
\vecanglespos{u'}{a1'}{-100}{65}{.4}
\end{psmatrix}
\end{center}
An \defn{$\A$-net} is an equivalence class of $\A$-linkings modulo
similarity (\ie, modulo the equivalence relation generated by
similarity).

\begin{theorem}[Net Compositionality]\label{net-comp}
Composition of $\A$-linkings respects equivalence.
\end{theorem}
In other words, if $f,f':S\to T$ and $g,g':T\to U$ are linkings with
$f$ equivalent to $f'$ and $g$ equivalent to $g'$, then the composite
linkings $gf,g'f':S\to U$ are equivalent.  This theorem is proved in
Section~\ref{net-comp-proof} via one-sided nets.  By the theorem,
composition of $\A$-nets is well-defined: given proof nets $[f]:S\to
T$, and $[g]:T\to U$, where $[h]$ denotes the equivalence class of a
linking $h$, define $[g][f]=[gf]:S\to U$.  Write $\netsa$ for the
category of $\A$-nets.  Typically we abbreviate a net $[f]$ to $f$,
when it is clear from context that we are dealing with a net rather
than a linking.


\parag{Star autonomy} 
The split star-autonomous structure of the category $\linka$ of
$\A$-linkings respects equivalence, yielding
a star-autonomous structure on $\netsa$.

On morphisms, tensor in $\linka$ is disjoint union, hence respects
similarity in each argument, \ie, if linkings $f$ and $f'$ are
similar, then $f\tensor g$ and $f'\tensor g$ are similar, as are
$g\tensor f$ and $g\tensor f'$.  Duality on $\linka$ respects
similarity (if $f$ and $f'$ are similar then $f\perp$ and $f'{}\perp$
are similar) since
it acts trivially on the graph of a morphism (so re-targeting an edge
from an $\tu$ amounts to the same thing before and after dualising).
Similarly, the natural isomorphism $\linka(S\tensor
T,U\perp)\cong\linka(S,(T\tensor U)\perp)$ respects similarity, since
a linking $S\tensor T\to U\perp$ has the same underlying directed
graph as its transpose $S\to (T\tensor U)\perp$.

The split monos $l_S:S\to \tu\tensor S$ and $r_S:S\to S\tensor\tu$ in
$\linka$ become isomorphisms upon quotienting.
%
Choose a left inverse $\overline{l}_S:\tu\tensor S\to S$ for $l_S$.
The composite $\tu\tensor S\stackrel{\overline{l}_S}{\to}
S\stackrel{l_S}{\to}\tu\tensor S$ in $\linka$ differs from the
identity $\tu\tensor S\to\tu \tensor S$ by just one edge, the edge
from the distinguished $\tu$ on the left of the arrow, hence is
similar to the identity.  Thus $\overline{l}_S$ is a right inverse for
$l_S$ in $\netsa$.  Similarly, the left inverse $\overline
r_S:S\tensor\tu\to S$ for $r_S:S\to S\tensor\tu$ becomes a right
inverse in $\netsa$.

The associativity, symmetry and unit coherence diagrams commute in
$\linka$, so they commute in $\netsa$.




\subsection{Free star-autonomous category and full coherence}\label{freestar}
\begin{theorem}[freeness]\label{free}
For any category $\A$, the category $\netsa$ of $\A$-nets 
is the free star-autono\-mous category generated by $\A$.
\end{theorem}
The proof is the subject of Section~\ref{mainproof}.
By finiteness of equivalence classes, we have:
\begin{theorem}
Equality of morphisms in the free star-autonomous category generated
by a category is decidable.
\end{theorem}
This theorem was first proved using the rewiring approach (see
Section~\ref{approach}) in \cite{BCST96} (in a more general form, over a
polygraph with equations, and with \emph{star-autonomous category}
axiomatised as a symmetric linearly distributive category with
negation).

Two examples were given in the Introduction
(page~\ref{intro-rewiring-examples}).
Here are three more.

\emph{Example 3: identity = twist on $\tu$.}\label{example3}
We saw in Example~1 (page~\pageref{intro-rewiring-example1}) that
$\id_{\bot\tensor\bot}\neq\tw_{\bot\tensor\bot}:\bot\tensor\bot\to\bot\tensor\bot$.
The following pair of rewirings shows
$\id_{\tu\tensor\tu}=\tw_{\tu\tensor\tu}:\tu\tensor\tu\to\tu\tensor\tu$.
\begin{center}\vspace{3ex}\small\psset{rowsep=4\baselineskip}
\renewcommand{\tensor}{\mkern1mu\otimes\mkern1mu}
\newcommand{\core}[2]{%
\rnode{#1}{\psframebox[linestyle=none]{%
\psset{nodesep=.5ex,rowsep=2.5\baselineskip}\begin{psmatrix}
$\one{a}\tensor\one{b}$
\\
$\one{aa}\tensor\one{bb}$
#2
\end{psmatrix}}}}
\begin{psmatrix}
  \core{D}{%
    \dvec{a}{aa}
    \dvec{b}{bb}
  }
  & \hspace{-3ex} &
  \core{C}{%
  \vecanglespos{a}{bb}{-75}{105}{.65}
  \dvec{b}{bb}
  }
  & \hspace{-4ex} &
  \core{B}{%
  \vecanglespos{a}{bb}{-75}{105}{.78}
  \vecanglespos{b}{aa}{-105}{75}{.78}
  }
\end{psmatrix}
  \psset{linestyle=none}
  \ncline{B}{C}\ncput{$\leftrightarrow$}
  \ncline{C}{D}\ncput{$\leftrightarrow$}
\vspace{3ex}\end{center}
Compare this with page~25 of \cite{BCST96}, which also gives a proof
of $\id_{\tu\tensor\tu}=\tw_{\tu\tensor\tu}$.  (Ths presentation there
is in the dual mode,
$\id_{\bot\scriptparr\bot}=\tw_{\bot\scriptparr\bot}$.)\clearpage

\emph{Example 4: Triple-dual problem.}\label{example4}
We show that the following diagram commutes (like Example~2 on
page~\pageref{intro-rewiring-example2} of the Introduction, an
instance of the triple-dual problem: see \cite[\S1,
diagram\ (1.4)]{KM71})\vspace{2ex}
\begin{equation}\label{triangle2}
\psset{nodesep=1ex}
\vspace{2ex}\begin{psmatrix}[ref=c]
\big((\tu\multimap\tu)\multimap\tu\big)\multimap\tu &
\tu\multimap\tu\rule{0pt}{3ex} \\
& 
\big((\tu\multimap\tu)\multimap\tu\big)\multimap\tu
\ncline{->}{1,1}{1,2}\naput{k_\tu\multimap \id}
\ncline{->}{1,2}{2,2}\naput{k_{(\tu\multimap\mkern2mu\tu)}}
\ncline{->}{1,1}{2,2}\nbput{\id}
\end{psmatrix}\vspace*{1ex}
\end{equation}
where 
$A\multimap B=(A\tensor B\perp)\perp$ and
$k_A:A\;\to\;(A\mkern-2mu\multimap\mkern-2mu
A)\mkern-2mu\multimap\mkern-2mu A$ is the canonical map of its type.
Each path in the triangle determines a corresponding linking
\begin{center}\vspace*{3ex}\footnotesize\begin{math}
\newcommand{\tightmap}{\mkern-3mu\multimap\mkern-4mu}
\psset{rowsep=1.7\baselineskip,nodesep=2pt}
\rule{.3cm}{0pt}\begin{psmatrix}
\big((\one{a}\tightmap\one{b})\tightmap\one{bb}\big)\tightmap\one{bbb}\\\\
\big((\one{a1}\tightmap\one{b1})\tightmap\one{bb1}\big)\tightmap\one{bbb1}
\uvec{a1}{a}
\dvec{b}{b1}
\uvec{bb1}{bb}
\dvec{bbb}{bbb1}
\blabel{a}{a1}{\id}{.7cm} 
\end{psmatrix}
\rule{3cm}{0cm}
\rnode{A}{\begin{psmatrix} 
\big((\one{a}\tightmap\one{b})\tightmap\one{bb}\big)\tightmap\one{bbb}\\
\one{am}\tightmap\one{bm} \\
\big((\one{a1}\tightmap\one{b1})\tightmap\one{bb1}\big)\tightmap\one{bbb1}
\blabelpos{a}{a1}{k_\tu\tightmap \id}{.4cm}{.23} 
\blabelpos{a}{a1}{k_{(\tu\multimap\mkern2mu\tu)}}{.4cm}{.77} 
\vecangles{am}{a}{110}{-60}
\vecangles{a1}{am}{60}{-110}
\dloopvec{b}{bb}
\vecangles{bbb}{bm}{-125}{50}
\vecangles{bm}{b1}{-120}{60}
\uloopvec{bb1}{bbb1}
\end{psmatrix}}
\rule{1cm}{0cm}
\rnode{B}{\begin{psmatrix} 
\big((\one{a}\tightmap\one{b})\tightmap\one{bb}\big)\tightmap\one{bbb}\\
\\
\big((\one{a1}\tightmap\one{b1})\tightmap\one{bb1}\big)\tightmap\one{bbb1}
\uvec{a1}{a}
\dloopvec{b}{bb}
\vecangles{bbb}{b1}{-115}{65}
\uloopvec{bb1}{bbb1}
\end{psmatrix}}
\clabel{A}{B}{=}
\end{math}\vspace*{3ex}\end{center}
equivalent via five rewirings:
\begin{center}\vspace*{3ex}\scriptsize
\psset{nodesep=.5ex,rowsep=1.3cm}
\newcommand{\tightmap}{\mkern-5mu\multimap\mkern-5mu}
\newcommand{\core}[2]{%
\rnode{#1}{\psframebox[linestyle=none]{%
\psset{nodesep=.5ex,rowsep=1.3cm}\begin{psmatrix}
$((\one{a}\tightmap\one{b})\tightmap\one{bb})\tightmap\one{bbb}\;$
\\
$((\one{a1}\tightmap\one{b1})\tightmap\one{bb1})\tightmap\nbot{bbb1}\;$
#2
\end{psmatrix}}}}
\begin{psmatrix}
  \core{D}{%
    \uvec{a1}{a}
    \dvec{b}{b1}
    \uvec{bb1}{bb}
    \dvec{bbb}{bbb1}
  }
  & \hspace{-3ex} &
  \core{C}{%
    \uloopvec{a1}{b1}
    \dvec{b}{b1}
    \uvec{bb1}{bb}
    \dvec{bbb}{bbb1}
  }
  & \hspace{-4ex} &
  \core{B}{%
    \uloopvec{a1}{b1}
    \dloopvec{b}{bb}
    \uvec{bb1}{bb}
    \dvec{bbb}{bbb1}
  }
\\
  \core{X}{%
	\uvec{a1}{a}
	\dloopvec{b}{bb}
	\vecangles{bbb}{b1}{-115}{65}
	\uloopvec{bb1}{bbb1}
  }
  & \hspace{-4ex} &
  \core{Y}{%
	\uloopvec{a1}{b1}
	\dloopvec{b}{bb}
	\vecangles{bbb}{b1}{-115}{65}
	\uloopvec{bb1}{bbb1}
  }
  & \hspace{-4ex} &
  \core{Z}{%
	\uloopvec{a1}{b1}
	\dloopvec{b}{bb}
        \dvec{bbb}{bbb1}
	\uloopvec{bb1}{bbb1}
  }
\end{psmatrix}
  \psset{linestyle=none}
  \ncline{B}{C}\ncput{$\leftrightarrow$}
  \ncline{C}{D}\ncput{$\leftrightarrow$}
  \ncline{B}{Z}\ncput[npos=.5,nrot=:D]{$\leftrightarrow$}
  \ncline{X}{Y}\ncput{$\leftrightarrow$}
  \ncline{Y}{Z}\ncput{$\leftrightarrow$}
\vspace*{3ex}\end{center}
Thus we conclude that triangle (\ref{triangle2}) commutes in every
star-autonomous category.  Compare this with \cite{BCST96}, Figure~3
on page~43.  As with Example~2, a key advantage here is that the
composite $\:k_\tu\mkern-3mu\multimap\mkern-3mu\id\:;\:
k_{(\tu\multimap\tu)}\:$ is immediate on inspection, since we have
simple path composition.

\emph{Example 5: more path composition.}\label{path-power}
The following example illustrates a larger path composition.
Let $A\parr B\,=\,(A\perp\tensor B\perp)\perp$ and $\bot=I\perp$.
The path composition of linkings
\begin{center}\hspace{8ex}
\psset{nodesep=.5ex,yunit=1.4cm}
\begin{pspicture}[.5](0,-.2)(5,5.3)
\rput(0,0){$\rnode{a}{a} \tensor \rnode{b}{b}$}
\rput(0,1){\hspace{5ex}$\rnode{u1}{\bot} 
\parr (\rnode{a1}{a} \tensor \rnode{b1}{b})$}
\rput(0,2){$\big((\rnode{aa2}{a}\tensor \rnode{bb2}{b})\tensor(\rnode{aaa2}{\ldual{a}} \parr \rnode{bbb2}{\ldual{b}})\big)
\parr (\rnode{a2}{a} \tensor \rnode{b2}{b})$}
\rput(0,3){$(\rnode{aa3}{a}\tensor \rnode{bb3}{b}) \tensor \big((\rnode{aaa3}{\ldual{a}} \parr \rnode{bbb3}{\ldual{b}})
\parr (\rnode{a3}{a} \tensor \rnode{b3}{b})\big)$}
\rput(0,4){$(\rnode{a4}{a} \tensor \rnode{b4}{b}) \tensor \rnode{u4}{\tu}$\hspace{5ex}}
\rput(0,5){$\rnode{a5}{a} \tensor \rnode{b5}{b}$}
\linevec{a1}{a}
\linevec{b1}{b}
\vecanglespos{u1}{bbb2}{55}{-87}{.4}
\vecangles{a2}{a1}{-100}{60}
\vecangles{b2}{b1}{-100}{60}
\dloopvec{aa2}{aaa2}
\dloopvec{bb2}{bbb2}
\linevec{aa3}{aa2}
\linevec{bb3}{bb2}
\linevec{aaa2}{aaa3}
\linevec{bbb2}{bbb3}
\linevec{a3}{a2}
\linevec{b3}{b2}
\uloopvec{aaa3}{a3}
\uloopvec{bbb3}{b3}
\vecanglespos{u4}{aaa3}{-120}{94}{.4}
\vecangles{a4}{aa3}{-125}{80}
\vecangles{b4}{bb3}{-125}{80}
\linevec{a5}{a4}
\linevec{b5}{b4}
\end{pspicture}
\hspace{8ex}
$\mapsto$
\hspace{3ex}
\begin{pspicture}[.5](0,-.2)(5,5.3)
\psset{nodesep=.5ex}
\rput(2.5,0){$\rnode{a}{a\strut} \tensor \rnode{b}{b\strut}$}
\rput(2.5,5){$\rnode{a5}{a} \tensor \rnode{b5}{b}$}
\psset{nodesepB=-1pt}
\linevec{a5}{a}
\linevec{b5}{b}
\end{pspicture}
\end{center}
shows that the following diagram commutes in every star-autonomous
category, where each map is canonical at its type:
\begin{center}\begin{math}\newcommand{\locala}{a}\newcommand{\localb}{b}
\begin{psmatrix}[ref=c,nodesep=.6ex,rowsep=4ex]
&
\locala\tensor \localb
\\
(\locala\tensor \localb)\tensor \tu
\\
(\locala\tensor \localb)\tensor \big((\ldual{\locala}\parr\ldual{\localb})\parr(\locala\tensor \localb)\big)
\\
\big((\locala\tensor \localb)\tensor(\ldual{\locala}\parr\ldual{\localb})\big)\parr (\locala\tensor \localb)
\\
\bot\parr(\locala\tensor \localb)
\\
& \locala\tensor \localb
\ncline{->}{1,2}{6,2}
\ncline{->}{1,2}{2,1}
\ncline{->}{2,1}{3,1}
\ncline{->}{3,1}{4,1}
\ncline{->}{4,1}{5,1}
\ncline{->}{5,1}{6,2}
\end{psmatrix}\end{math}\end{center}
This is example is, of course, rather contrived.  (What other
canonical map $a\tensor b\to a\tensor b$ could there be?)  The point
is simply to give an example of path composition in a large diagram.


\section{One-sided linkings}\label{one-sided}

Eilenberg-Kelly-MacLane graphs \cite{EK66,KM71} are \emph{two-sided} in the
sense that they are between a source and a target.  Taking advantage
of duality, Kelly-Laplaza graphs \cite{KL80} for compact closed
categories are \emph{one-sided}: the authors define a (fixed-point free)
involution on a single signed set, hence on a single shape\footnote{We
have taken the liberty of referrring to words built freely from
generators and the constant $\tu$ by binary $\tensor$ and unary
$(-)\perp$ as \emph{shapes}, motivated by the Eilenberg-Kelly-MacLane
terminology for similar freely generated expressions.  These shapes
are exactly the words defined in \cite[\S3]{KL80}, objects of the free
compact closed category.}.
They then define a two-sided involution, \ie, a morphism $S\to T$, as
a (one-sided) involution on $S\perp\tensor T$.

Since star-autonomous categories are more general than compact closed
categories, to obtain a directly analogous one-sided representation
one would define a two-sided linking $S\to T$ as a one-sided linking
on the shape $(S\tensor T\perp)\perp$.  However, to avoid the extra
baggage of two auxiliary duals $(-)\perp$ and a tensor $\tensor$, we
shall instead define one-sided linkings on \emph{sequents}, where a
sequent is a disjoint union $\;S_1,\ldots,S_n\;$ of shapes $S_i$, with
comma denoting disjoint union, and define a two-sided linking $S\to T$
as a one-sided linking on the sequent $\;S\perp,T\;$ (the disjoint
union of the shapes $S\perp$ and $T$).  Using the sequent calculus
style, we can also define explicit cuts between shapes, faciliting an
inductive proof that two-sided linkings compose, \ie, that the path
composite of two (two-sided) linkings is a well-defined (two-sided)
linking.

The material here on one-sided linkings amounts to the multiplicative
proof nets with units in \cite{Hug05}, with explicit negation
$(-)\perp$, and with axiom links between dual occurrences of
generators in $\A$ generalised to morphisms of $\A$.  However, we
shall not require any familiarity on the part of the reader with proof
nets or linear logic \cite{Gir87}.

\parag{Sequents} 
The following definitions are a mild generalisation of those in
Section~2 of \cite{Hug05}.

Fix a set $\A=\{a,b,\ldots\}$ of generators.
Henceforth identify a shape (generated from $\A$) with its parse tree,
a tree labelled with atoms (generators or the constant $\tu$) at the
leaves, and $\tensor$ and $\ast$ at internal vertices.  (Examples of
parse trees were shown in Section~\ref{switchings}
(page~\pageref{switchings}), in the example of a switching.)
A \defn{sequent} is a non-empty disjoint union of shapes.  Thus a
sequent is a particular kind of labelled forest.
We take $S,T,\ldots$ to range over shapes, and
$\Gamma\mkern-3mu,\Delta,\ldots$ to range over (possibly empty)
disjoint unions of shapes.
A \defn{cut pair} $\cutpair{S}$ is a disjoint union of complementary
shapes $S$ and $S\perp$ together with an undirected edge, a
\defn{cut}, between their roots.
A \defn{cut sequent} is a disjoint union of a sequent and zero or more
cut pairs.
A \defn{switching} of a cut sequent is any subgraph obtained by
deleting one of the two argument edges of each negative $\tensor$
(\cf\ Section~\ref{switchings}).
We use comma to denote disjoint union, \ie\ $\;S_1,\ldots,S_n\;$ is
the disjoint union of the shapes $S_i$.

\parag{Linkings}  We begin with the discrete case, $\A$ a set of generators.  For the more general 
case of $\A$ an arbitrary category, see Section~\ref{arb} below.

A \defn{leaf function} on a cut sequent is a function from its
negative leaves to its positive leaves.  An \defn{$\A$-linking} on a
cut sequent $\Gamma$ is a leaf function $f$ on $\Gamma$ satisfying:
\begin{itemize}\label{onesided-linking-criterion}
\myitem{1} \Matching. For any generator $a\in\A$, the restriction of $f$ to $a$-labelled leaves
is a bijection between the negative $a$-labelled leaves of $\Gamma$
and the positive $a$-labelled leaves of $\Gamma$.
\myitem{2} \Switching. For any switching $\Gamma'$ of $\Gamma$, the undirected graph obtained by adding the 
edges of $f$ to $\Gamma'$ is a tree.
\end{itemize}
Thus two-sided linkings $S\to T$ between shapes, as defined in
Section~\ref{linkings}, are in bijection with one-sided linkings on
the two-shape sequent $S\perp,T$.


\subsection{Cut elimination}
Let $f$ be a linking on the cut sequent $\Gamma,\cutpair{S}$.
The result $f'$ of \defn{eliminating} the cut in $\cutpair{S}$
is:
\begin{itemize}
\item \emph{Atom.}\label{atom-cut}
Suppose $S$ is an atom $\alpha$ (a generator $a\in\A$ or the constant $\tu$).
Thus (in parse tree terms) the cut pair $\cutpair{S}$ comprises leaves
$l^+,l^-$ labelled $\alpha$,
a vertex $v$ labelled $\ast$, an argument edge from $v$ to $l^-$, and a
cut edge between $v$ and $l^+$.
Delete the cut pair (\ie, the vertices $l^+,l^-,v$ and associated
edges), and reset every $f$-edge to $l^+$ to target $f(l^-)$ instead,
\ie, for all negative leaves $n$ of the sequent such that $f(n)=l^+$,
set $f(n)=f(l^-)$.  
Schematically,
\begin{center}
\hspace{8ex}\psset{colsep=2.5cm,framesep=0pt,nodesep=0pt,rowsep=1.2cm}
\begin{psmatrix}
\Cnode(-3,.5){a}
\Cnode(-2.5,.9){b}
\Cnode(-1.7,1.2){c}
\circlenode[linestyle=none]{A}{$\alpha$}\rule{0pt}{7.2ex}
\hspace{4ex}
\circlenode[linestyle=none]{ast}{$\ast$}
\nput[labelsep=3ex]{90}{ast}{\circlenode[linestyle=none]{AA}{$\alpha$}}\ncline{ast}{AA}
{\psset{nodesep=1pt}\nccurve[ncurv=1,angleA=-60,angleB=-120]{A}{ast}}
\psset{nodesepB=-1pt}
\vecangles{a}{A}{10}{150}
\vecangles{b}{A}{0}{125}
\vecangles{c}{A}{-10}{100}
\hspace{4ex}
\Cnode*(1,.5){d}
\psset{nodesepB=-1pt,nodesepA=-1pt}
\vecangles{AA}{d}{60}{110}
\\
\rput{270}(-.8,.6){$\mapsto$}
\\
\Cnode(-3,.5){a}
\Cnode(-2.5,.9){b}
\Cnode(-1.7,1.2){c}
\hspace{14ex}
\psset{nodesepB=-1pt}
\Cnode*(1,.5){d}
\psset{nodesepB=-1pt,nodesepA=-1pt}
\vecangles{a}{d}{10}{160}
\vecangles{b}{d}{10}{145}
\vecangles{c}{d}{10}{130}
\end{psmatrix}
\end{center}
where the vertices $\circ$ represent all instances of $n$ and
$\bullet$ is $f(l^-)$.  (The left-most $\alpha$ in the picture is the
leaf $l^+$, the right-most $\alpha$ is the leaf $l^-$, and the $\ast$
is the vertex $v$.)
\item \emph{Tensor.} Suppose $S=T\tensor U$.  
Replace $\cutpair{S}$ by $\cutpair{T},\cutpair{U}$.  The leaves, and
$f$, remain unchanged (identifying the leaves of $T$ in $T\tensor U$
with $T$ in $\cutpair{T}$, \etc).
Schematically:
\begin{center}
\hspace{-6ex}\psset{colsep=2.5cm,framesep=0pt,nodesep=0pt,rowsep=1cm}
\begin{psmatrix}
\raisebox{1ex}{$
\pstree[treemode=U,nodesep=2pt,levelsep=20pt]
{\TR[name=t]{\tensor}}
  {\TR[name=b]{T}
   \TR[name=c]{U}}
\hspace{6ex}
\pstree[treemode=U,nodesep=2pt,levelsep=20pt]{\TR[name=ast]{\ast}}
  {\pstree{\TR[name=p]{\tensor}}
     {\TR[name=bb]{T}
      \TR[name=cc]{U}
     }
  }
$}
\nccurve[nodesepA=2pt,nodesepB=1pt,angleA=-40,angleB=-140]{t}{ast}
\\
\rput{270}(0,.2){$\mapsto$}
\\
\raisebox{5ex}{$
\hspace{.5ex}\rnode{b}{T}
\hspace{4ex}
\rnode{c}{U}
\hspace{6ex}
\circlenode[linestyle=none]{ast1}{\ast}
\nput[labelsep=3ex]{90}{ast1}{\circlenode[linestyle=none]{bb}{T}}\ncline{ast1}{bb}
\hspace{4ex}
\circlenode[linestyle=none]{ast2}{\ast}
\nput[labelsep=3ex]{90}{ast2}{\circlenode[linestyle=none]{cc}{U}}\ncline{ast2}{cc}
\hspace{-2ex}
\nccurve[nodesepA=1pt,nodesepB=2pt,angleA=-40,angleB=-130]{b}{ast1}
\nccurve[nodesepA=1pt,nodesepB=2pt,angleA=-40,angleB=-130]{c}{ast2}
$}
\end{psmatrix}
\end{center}
\item \emph{Dual.} Suppose $S=T\perp$.
Replace the cut pair $\dualcutpair{T}$ by $\revcutpair{\,T}$.  The
leaves, and $f$, remain unchanged.
Schematically,
\begin{center}
\psset{colsep=2.5cm,framesep=0pt,nodesep=0pt,rowsep=1cm}
\begin{psmatrix}
\raisebox{1ex}{\hspace{-5ex}$
\pstree[treemode=U,nodesep=2pt,levelsep=20pt]
{\TR[name=ast]{\ast}}
  {\TR[name=t]{T}}
\hspace{4ex}
\pstree[treemode=U,nodesep=2pt,levelsep=20pt]{\TR[name=ast1]{\ast}}
  {\pstree{\TR[name=ast2]{\ast}}
     {\TR[name=tt]{T}
     }
  }
$}
\nccurve[nodesepA=2pt,nodesepB=1pt,angleA=-60,angleB=-120]{ast}{ast1}
\\
\rput{270}(-1,.2){$\mapsto$}
\\
\raisebox{4ex}{\hspace{-5ex}$
\pstree[treemode=U,nodesep=2pt,levelsep=20pt]
{\TR[name=ast]{\ast}}
  {\TR[name=t]{T}}
\hspace{4ex}
\pstree[treemode=U,nodesep=2pt,levelsep=20pt]{\TR[name=tt]{T}}{}
$}
\nccurve[nodesepA=2pt,nodesepB=1pt,angleA=-60,angleB=-120]{ast}{tt}
\end{psmatrix}
\end{center}
\end{itemize}
\begin{theorem}\label{cut-elim}
Cut elimination is well-defined: eliminating a cut from a linking on a
cut sequent yields a linking on a cut sequent.
\end{theorem}
\begin{proof}
The atomic and dual cases are trivial, since switchings correspond
before and after the elimination.  The tensor case is a simple
combinatorial argument: any cycle in a switching after elimination
induces a cycle in a switching before elimination.  (This is a
standard combinatorial argument for tensor elimination in
multiplicative proof nets in linear logic.  See
\cite{Gir87,DR89,Gir96} for details (\cf\ \cite{Hug05}, Theorem~2)).
\end{proof}
\begin{proposition}\label{confluence}
Cut elimination is locally confluent.
\end{proposition}
\begin{proof}
The only non-trivial case is a pair of atomic eliminations.  
This case
is clear from the following schematic involving two interacting atomic
cut redexes $\cutpair{\alpha}$ and $\cutpair{\beta}$.
\begin{center}\psset{nodesep=-.2pt}
\newcommand{\abc}{\Cnode(-3,.5){a}
\Cnode(-2.5,.9){b}
\Cnode(-1.7,1.2){c}}
\newcommand{\bbcc}{\Cnode(-2,1.1){bb}
\Cnode(-1.2,1.2){cc}}
\newcommand{\abcA}{{\psset{nodesepB=2pt}\vecangles{a}{A}{10}{140}
\vecangles{b}{A}{0}{120}
\vecangles{c}{A}{-10}{100}}}
\newcommand{\bbccB}{{\psset{nodesepB=2pt}\vecangles{bb}{B}{-20}{120}
\vecangles{cc}{B}{-30}{105}}}
\newcommand{\maingap}{\hspace{8ex}}
\newcommand{\cutgap}{\hspace{3ex}}
\newcommand{\leftcut}{%\Cnode*{S}
$\circlenode[linestyle=none,framesep=-2pt]{A}{\alpha}$
\cutgap
\rnode{ast}{$\ast$}
\nput[labelsep=3ex]{90}{ast}{$\rnode{AA}{\alpha}$}\ncline[nodesepA=2pt,nodesepB=2pt]{ast}{AA}
\nccurve[ncurv=1,nodesep=2pt,angleA=-60,angleB=-120]{A}{ast}}%\naput{$c$}}
\newcommand{\rightcut}{%\Cnode*{B}
$\circlenode[linestyle=none,framesep=-2pt]{B}{\beta}$
\cutgap
\rnode{astC}{$\ast$}
\nput[labelsep=3ex]{90}{astC}{$\rnode{BB}{\beta}$}\ncline[nodesepA=2pt,nodesepB=2pt]{astC}{BB}
\nccurve[ncurv=1,nodesep=2pt,angleA=-60,angleB=-120]{B}{astC}}%\naput{$d$}}
\newcommand{\midjump}{{\psset{nodesep=2pt}\vecanglespos{AA}{B}{0}{135}{.4}}}
\newcommand{\abcB}{{\psset{nodesepB=2pt}\vecangles{a}{B}{0}{165}
\vecangles{b}{B}{-5}{155}
\vecangles{c}{B}{-10}{145}}}
\renewcommand{\C}{\maingap\Cnode*(0,.2){C}}
\newcommand{\rightjump}{{\psset{nodesepA=2pt}\vecangles{BB}{C}{60}{110}}}
\newcommand{\bbccC}{\vecanglesheight{bb}{C}{-10}{145}{.7}
\vecanglesheight{cc}{C}{-10}{140}{.7}}
\newcommand{\AAbbccC}{{\psset{nodesepA=2pt}\vecanglesheight{AA}{C}{0}{155}{.65}}\bbccC}
\newcommand{\abcC}{\vecanglesheight{a}{C}{0}{172}{.7}
\vecanglesheight{b}{C}{-5}{166}{.7}
\vecanglesheight{c}{C}{-10}{160}{.7}}
\newcommand{\finaledges}{\bbccC\abcC}
\begin{pspicture}(-3,.4)(0,7.4)
\rput(0,6){%
\abc
\leftcut
\abcA
\maingap
\bbcc
\rightcut
\midjump
\bbccB
\C
\rightjump
}
\rput(-8,3){%
\abc
\leftcut
\abcA
\maingap
\bbcc
\cutgap
\C
\AAbbccC
}
\rput(8,3){%
\abc
\cutgap
\maingap
\bbcc
\rightcut
\abcB
\bbccB
\C
\rightjump
}
\rput(0,0){%
\abc
\cutgap
\maingap
\bbcc
\cutgap
\C
\finaledges
}
\rput{-135}(-5.5,5){$\mapsto$}
\rput{-45}(2.5,5){$\mapsto$}
\rput{-135}(2.5,2){$\mapsto$}
\rput{-45}(-5.5,2){$\mapsto$}
\end{pspicture}\vspace{1ex}
\end{center}
(This is adapted from the proof of Proposition~1 of \cite{Hug05}.)
\end{proof}
\begin{theorem}\label{strong-norm}
Cut elimination is strongly normalising.
\end{theorem}
\begin{proof}
It is locally confluent, and eliminating a cut reduces the number of
vertices of the cut sequent.
\end{proof}
\parag{Turbo cut elimination}
Analogous to \cite{Hug05}, normalisation can be completed in a
single step.  For $l$ the $i\nth$ leaf of a shape $S$ in a cut pair
$\cutpair{S}$, let $l\perp$ denote the $i\nth$ leaf of $S\perp$.
The \defn{normal form} of a cut sequent $\Gamma$ is the sequent
$\reduc{\Gamma}$ obtained by deleting all cut pairs. Given a linking
$f$ on $\Gamma$, its \defn{normal form} $\reduc{f}$ is the linking on
$\reduc{\Gamma}$ obtained by replacing every set of directed edges
$\langle l_0,l_1\rangle,\langle l_1\perp,l_2\rangle,\langle
l_2\perp,l_3\rangle,\ldots,
\langle l_{n-1}\perp,l_n\rangle$ in $f$ in which only $l_0$
and $l_n$ occur in $\reduc{\Gamma}$ by the single directed edge
$\langle l_0,l_n\rangle$.  By a simple induction on the number of
vertices in cut sequents, $\reduc{f}$ is precisely the normal form of
$f$ under one-step cut elimination.  (In particular, this implies the
turbo normal form $\reduc{f}$ is indeed a linking, \ie, turbo cut
elimination is well defined on linkings.)

\subsection{Arbitrary base category}\label{arb}
So far we have only presented one-sided linkings over a set $\A$ of
generators.  When $\A$ is a category, as in the two-sided case we add
labels to every edge from a generator (object of $\A$), and define an
\defn{$\A$-linking} on a cut sequent $\Gamma$ as a leaf function $f$ on $\Gamma$
satisfying:
\begin{itemize}\label{onesided-arb-matching}
\myitem{1a} \Bijection. Restricting $f$ to generator-labelled leaves of
$\Gamma$ yields a bijection.
\myitem{1b} \Labelling. Whenever $x$ is the label of an edge 
from a leaf labelled $a$ to a leaf labelled $b$, then $x:a\to b$ is a
morphism in $\A$.
\myitem{2} \Switching. For any switching $\Gamma'$ of $\Gamma$, the undirected graph obtained by adding the 
edges of $f$ to $\Gamma'$ is a tree.
\end{itemize}
For example, if $x:a\to b$
and $y:c\to c$ are morphisms in $\A$, then
\begin{center}\begin{math}
(\rnode{a}{a}\tensor\rnode{cc}{c}\perp)\perp
\hspace{6ex}\rule{0pt}{6ex}
\rnode{c}{c}\perp\tensor\rnode{b}{b}
\hspace{6ex}\one{u}\perp
\uloopvecheight{a}{b}{.6}\naput[npos=.5]{x}
\uloopvecleftheight{c}{cc}{.7}\naput[npos=.45]{y}
\nccurve[ncurv=1.1,angleA=115,angleB=65]{u}{b}
\lput{:0}{\psline{->}(.05,.005)(.1,.005)}
\end{math}
\end{center}
is a (one-sided) $\A$-linking on the three-shape sequent $(a\tensor c\perp)\perp,\,c\perp\tensor b,\,\tu\perp$.
As in the two-sided case, conditions (1a) and (1b) reduce to (1)
\Matching{} (page~\pageref{onesided-linking-criterion}) in the
discrete case, since every label is an identity.

Atomic cut elimination (page~\pageref{atom-cut}) incorporates labels
as follows: when re-setting an $f$-edge $n\to l^+$ to target
$f(l^-)$ instead, let the $\A$-morphism $x$ be the label of the edge
$n\to l^+$ (if any) and let the $\A$-morphism $y$ be the label of the
edge $l^-\to f(l^-)$ (if any); if both $x$ and $y$ are present,
label the output edge $n\to f(l^-)$ by the composite $yx$ in $\A$,
otherwise leave $n\to f(l^-)$ unlabelled.
Correspondingly, we adjust the definition of turbo cut elimination:
the output edge $\langle l_0,l_n\rangle$ is labelled by the composite
$\A$-morphism $x_n\ldots x_1$ iff every $\langle l_{i-1},l_i\rangle$
is labelled by an $\A$-morphism $x_i$ (\cf\ path composition of
two-sided linkings defined in Section~\ref{arbitrary}).

The properties of cut elimination (Theorem~\ref{cut-elim},
Proposition~\ref{confluence} and Theorem~\ref{strong-norm}) are
unaffected by the presence of labels.  

\subsection{From one-sided linkings to two-sided linkings}\label{proofs}

By design, two-sided linkings $S\to T$ between shapes, as defined in
Section~\ref{linkings}, are in bijection with one-sided linkings on
the two-shape sequent $S\perp,T$.
Via this correspondence, we can take care of the proof obligations
left over from Section~\ref{linkings}.

\begin{proofof}{Proposition~\ref{linear-time} (linear time verification of the linking criterion)}
Every star-autonomous shape $S$ induces a formula $\mll{S}$ of multiplicative linear logic:
replace negative tensors in $S$ by pars $\parr$, replace negative
generators $a$ by $a^\bot$, replace negative $\tu$'s by $\bot$, and
delete all duals $(-)\perp$.  For example, $\big((1\tensor
a\perp)\perp\tensor 1\big)\perp$ becomes $(1\tensor a^\bot)\parr\bot$.
Thus every shape sequent $\Gamma=S_1,\ldots,S_n$ induces a formula
sequent $\mll{\Gamma}$, namely $\mll{S_1},\ldots,\mll{S_n}$.
The formula $\mll{S}$ has the same leaf vertices as the original shape $S$,
and switchings of $\mll{S}$ are in bijection with switchings of $S$.
Thus a leaf function on a shape sequent $\Gamma$ is a linking iff it
constitutes a multiplicative proof net on the formula sequent
$\mll{\Gamma}$, in the sense of \cite{Hug05}.
Via the translation $\Gamma\mapsto\mll{\Gamma}$,
Proposition~\ref{linear-time} becomes a corollary of Theorem~4 of
\cite{Hug05} (which, in turn, is not much more than a corollary of
linear time verification of the proof net criterion for unit-free
multiplicative nets \cite{Gue99,MO00}).
\end{proofof}
Given linkings $f:S\to T$ and $g:T\to U$, since the definition of
turbo cut elimination is precisely path composition, the composite
$gf:S\to U$ corresponds to the normal form of the one-sided linking
$f\cup g$, the disjoint union of $f$ and $g$, on the cut sequent
$S\perp,\cutpair{T},U$.  
\begin{proofof}{Proposition~\ref{link-comp} (two-sided linkings compose)}
Via the correspondence just described, this is a corollary of
Theorem~\ref{cut-elim} (and the correspondence between turbo cut
elimination of one-sided linkings and normalisation by one-step cut
elimination).
\end{proofof}
\begin{proofof}{Theorem~\ref{compatibility} (compatibility: cycles do 
not arise during composition)} Suppose $f:S\to T$ and $g:T\to U$ are
linkings such that the disjoint union $f+g$, a directed graph on
$\leaves{S}+\leaves{T}+\leaves{U}$, contains a cycle.  Let $f\cup g$
be the corresponding one-sided linking on the cut sequent
$S\perp,\cutpair{T},U$, and let $\overline{f\cup g}$ be the result of
eliminating all tensor $\tensor$ and dual $(-)\perp$ cuts from $f\cup
g$, a one-sided linking on the cut sequent
\raisebox{.3ex}{\small$S,\:\cutpair{\alpha_1\!},\ldots,\:\cutpair{\alpha_n\!},U$},
where $\alpha_i$ is the atom labelling the $i\nth$ leaf of $T$.  Had
the directed graph $f+g$ a cycle $C$, then $\overline{f\cup g}$ would
contain a cycle in every switching (the edges of the cycle $C$
alternating with cut edges between the $\alpha_i$), and therefore fail
to be a linking, contradicting Theorem~\ref{cut-elim}.
\end{proofof}
See \cite{Blu93} for more on the relationship between compatibility
and the multiplicative proof net criterion, in the unit-free case.

\section{One-sided nets}\label{one-sided-nets}\label{net-comp-proof}

We define a one-sided net as a one-sided linking modulo Trimble
rewiring \cite{Tri94,BCST96}.  See page~\pageref{related-work} of the
Introduction for a discussion of three previous approaches to free
star-autonomous categories using a form of rewiring
\cite{BCST96,KO99,LS04}.  Section~\ref{approach} discusses these works
in detail.

Define one-sided $\A$-linkings $f$ and $g$ on a cut sequent $\Gamma$
as \defn{similar} if they differ on a negative $\tu$, \ie, one can be
obtained from the other by re-targeting one edge from an $\tu$.  A
one-sided \defn{$\A$-net} on a cut sequent $\Gamma$ is an equivalence
class of $\A$-linkings on $\Gamma$ modulo similarity (\ie, modulo the
transitive closure of similarity).  Similarity here coincides with the
earlier two-sided case: two-sided $\A$-linkings $f,g:S\to T$ are
similar iff the corresponding one-sided linkings on the two-shape
sequent $\;S\perp,T\;$ are similar in the sense just defined.
\begin{theorem}\label{net-cut-elim}
Cut elimination respects equivalence, \ie, cut elimination is
well-defined on $\A$-nets.  More precisely: if $f$ and $g$ are
equivalent $\A$-linkings on the cut sequent $\Gamma$ containing a cut
pair $\cutpair{S}$,
and the $\A$-linkings $f'$ and $g'$ result from eliminating
$\cutpair{S}$ from $f$ and $g$, respectively, then $f'$ and $g'$ are
equivalent.
\end{theorem}
\begin{proof}
If $\cutpair{S}$ is a tensor or dual cut, the result is trivial, since
leaves and linkings are untouched by eliminating the cut.  Suppose the
cut is atomic.  Let $l^-$ be the negative leaf of 
$\cutpair{S}$.  If $l^-$ is not the leaf $l$ on which $f$ and $g$
differ, then $f'$ and $g'$ are similar or equal (hence equivalent, as
desired) since they differ on at most $l$ after eliminating the cut.
So assume $l^-=l$.  
Thus we have the situation
\begin{center}
\hspace{8ex}\psset{colsep=2.5cm,framesep=0pt,nodesep=0pt,rowsep=1.2cm}
\Cnode(-3,.5){a}
\Cnode(-2.5,.9){b}
\Cnode(-1.7,1.2){c}
\circlenode[linestyle=none]{A}{$l^+\!$}\rule{0pt}{12ex}
\hspace{4ex}
\circlenode[linestyle=none]{ast}{$\ast$}
\nput[labelsep=3ex]{90}{ast}{\circlenode[linestyle=none]{AA}{$l^-\!$}}\ncline{ast}{AA}
{\psset{nodesep=1pt}\nccurve[ncurv=1,angleA=-60,angleB=-120]{A}{ast}}
\psset{nodesepB=-1pt}
\vecangles{a}{A}{10}{150}
\vecangles{b}{A}{0}{125}
\vecangles{c}{A}{-10}{100}
\hspace{4ex}
\rput{0}(2,.6){\circlenode[linestyle=none]{d}{$f(l^-)$}}
\hspace{7ex}
\rput{0}(4,.6){\circlenode[linestyle=none]{dd}{$g(l^-)$}}
\psset{nodesepB=-1pt,nodesepA=0pt,nodesepB=-4pt}
\vecangles{AA}{d}{30}{130}\nbput{$f$}
\vecangles{AA}{dd}{40}{140}\nbput{$g$}
\hspace{5ex}\vspace*{2ex}
\end{center}
where the leaf vertices $l^-$ and $l^+$ are labelled by $\tu$, the
unlabelled directed edges are present in both $f$ and $g$, and the
edge labelled $f$ (resp.\ $g$) is present in $f$ (resp.\ $g$) only.
The vertices $\circ$ schematically represent the negative leaves
$l_1\ldots l_n$ of $\Gamma$ whose edge targets $l^+$ (in both $f$ and
$g$), \ie, such that $f(l_i)=g(l_i)=l^+$.  Note that, since $l^+$,
$l^-$ and the $l_i$ are labelled $\tu$, none of the edges from them
(\ie, the directed edges depicted above) is labelled by an
$\A$-morphism, so the case of non-discrete $\A$ coincides with the
case of $\A$ a set.

Let $h$ be the (partial) leaf function obtained from $f$ (or
equivalently $g$) by deleting the edge from $l^-$.  Since $f$ and $g$
are linkings, every switching $\sigma$ of $h$ is a disjoint union of
two trees, with all $l_i$ in one tree and $f(l^-)$ and $g(l^-)$ in the
other (otherwise the corresponding switching of one of $f$ or $g$
would contain a cycle, via the edge between $l^-$ and $f(l^-)$ or
$g(l^-)$, respectively).  Let $h^-$ be the result of deleting from $h$
all the edges from the $l_i$, and for $0\le j\le n$ construct $h_j$
from $h^-$ by adding an edge from $l_i$ to $g(l^-)$ for $1\le i\le j$,
and from $l_i$ to $f(l^-)$ for $j<i\le n$, and also an edge from $l^-$
to $f(l^-)$ (or $g(l^-)$; the choice is arbitrary).
Since for any switching of $h$, the $l_i$ are in one tree and $f(l^-)$
and $g(l^-)$ are in the other, $h_i$ is a well-defined linking.
Let $h_i'$ be result of eliminating the atomic cut from $h_i$. By
design, $f'=h_0'$ and $g'=h_n'$.  By Theorem~\ref{cut-elim}, each
$h'_i$ is a linking.  Since $h_i'$ and $h_{i-1}'$ differ on just one
$\tu$ (namely $l_i$), they are similar, so $f'$ and $g'$ are
equivalent, via the $h'_i$.
\end{proof}
By the correspondence between (turbo) cut elimination of one-sided
linkings and path composition of two-sided linkings, we obtain
Theorem~\ref{net-comp} (compositionality of two-sided nets).

\section{Proof that the category $\netsa$ of $\A$-nets is free star-autonomous}\label{mainproof}

This section proves the Freeness Theorem, Theorem~\ref{free} on page~\pageref{free}:
\textsl{For any category $\A$, the category $\netsa$ of $\A$-nets 
is the free star-autonomous category generated by $\A$}.

\subsection{Lax linkings}

Suppose $\A$ is a set.
Given $\A$-shapes $S$ and $T$, define a \defn{lax leaf function} $S\to
T$ as the relaxation of a leaf function (as defined in
Section~\ref{one-sided}) obtained by permitting edges from $\tu$'s to
target any vertex of $S$ or $T$ (viewed as a parse trees).  For
example, here is a lax leaf function from $(a\perp\tensor \tu)\tensor \tu$
to $(a\perp \tensor I)\tensor (b\tensor b\perp)\perp$, drawn in
parse-tree form on the left, and compact in-line form on the right:
\begin{center}\small\begin{math}\begin{array}{c}
\psset{colsep=3cm,framesep=0pt,nodesep=0pt,rowsep=1cm}
\psset{treemode=D,nodesep=2pt,levelsep=20pt}
  \pstree{\TR[name=t11]{\tensor}}
    {
     \pstree{\TR[name=t112]{\tensor}}
      {
       \pstree{\TR[name=ast1]{\ast}}
         {\TR[name=aa]{a}
         }
       \TR[name=a]{\tu}
      }
      {
       \TR[name=uu]{\tu} 
      }
    }
  
\\\\
\psset{treemode=U,nodesep=2pt,levelsep=20pt}
\pstree{\TR[name=tt1]{\tensor}}
  {\pstree{\TR[name=tt11]{\tensor}}
    {
     \pstree{\TR[name=ast'1]{\ast}}
       {\TR[name=aa1]{a}
       }
     \TR[name=a1]{\tu}
    }
     {\pstree{\TR[name=ast'2]{\ast}}
       {\pstree{\TR[name=tt121]{\tensor}}
          {\TR[name=bb1]{b}
           \pstree{\TR[name=ast'3]{\ast}}
            {\TR[name=b1]{b}
            }
           
          }
       }
     }
  }
\vecanglespos{uu}{ast'3}{-65}{55}{.5}
\vecanglespos{a}{tt11}{-100}{90}{.5}
\vecanglesheight{aa1}{aa}{85}{-95}{1}
{\psset{nodesepA=2pt}\vecanglesposheight{bb1}{b1}{80}{115}{.6}{1.3}}
\end{array}
\hspace{20ex}
\begin{array}{c}
\begin{psmatrix}[rowsep=3.3\baselineskip]
(\,\rnode{a}{a}\perp\tensor\rnode{aa}{I}\:)\tensor \one{uu} \\[8ex]
(\,\rnode{a1}{a}\:\perp\,\rnode{aa1}{\tensor}\,{I}\,) \tensor (\,\rnode{b1}{b}\tensor\rnode{bb1}{b}\,\rnode{perp}{{}\perp}\,)\,\perp
\vecanglespos{uu}{perp}{-87}{93}{.5}
\vecanglespos{aa}{aa1}{-110}{70}{.59}
\uloopvec{b1}{bb1}
\vecanglespos{a1}{a}{80}{-100}{.67}
\end{psmatrix}\end{array}
\end{math}\end{center}
Define the graph of a lax leaf function $f:S\to T$ by analogy with the
original non-lax case: the undirected graph which is the disjoint
union of the two parse trees $S$ and $T$, together with the edges of
$f$, undirected.  Define a switching as before.  A \defn{lax linking}
is a lax leaf function satisfying the linking criterion, \ie,
conditions (1) \Matching{} and (2) \Switching{} on
page~\pageref{criterion}.  For example, the lax leaf function depicted
below-left is a lax linking, since both its switchings are trees, but
the lax leaf function below-right is not, since the switching in which
the upper tensor chooses its right argument has a cycle.
\begin{center}\vspace*{1ex}
\small\psset{rowsep=2.5\baselineskip}$\begin{psmatrix}
\one{b}\,\rnode{t}{\tensor}\:\one{bb} \\ 
\one{b1}\,\rnode{t1}{\tensor}\:\one{bb1}
\linevec{b}{t1}\linevec{bb}{bb1}
\end{psmatrix}
\rule{3cm}{0cm}
\begin{psmatrix} 
\one{b}\,\perp\,\rnode{t}{\tensor}\:\one{bb}\,\rnode{perp}{{}\perp} \\
\one{b1}\,\perp\,\rnode{t1}{\tensor}\:\one{bb1}\,\rnode{perp1}{{}\perp}\;
\linevec{b1}{t}\linevec{bb1}{perp}
\end{psmatrix}$\vspace*{3ex}\end{center}

We make the corresponding lax definitions in the one-sided case.
Given a cut sequent $\Gamma$ over $\A$, define a \defn{lax leaf
function} on $\Gamma$ as the variant of a leaf function obtained by
permitted edges from $\tu$'s to target any vertex of $\Gamma$.
Switchings again generalise to lax leaf functions in the obvious way.
Define a \defn{lax linking} on $\Gamma$ as a lax leaf function on
$\Gamma$ which satisfies the linking criterion, \ie, conditions (1)
\Matching{} and (2) \Switching{} on
page~\pageref{onesided-linking-criterion}.
For example, here is a lax linking on the three-shape sequent
$(I\tensor a)\perp,\,a\tensor I,\,I\perp$\,:
\begin{center}\vspace*{3ex}\begin{math}
(\,\rnode{aa}{I}\tensor\rnode{bb}{a}\,)\perp
\hspace{6ex}\rule{0pt}{6ex}
\rnode{b}{a}\,\rnode{t}{\tensor}\,\rnode{a}{I}
\hspace{6ex}\one{u}\perp
\uloopvecheight{aa}{bb}{1}
\uloopvecheight{bb}{b}{.8}
\nccurve[ncurv=.9,angleA=125,angleB=70,nodesepB=2pt]{u}{t}
\lput{:0}{\psline{->}(.05,.005)(.1,.005)}
\end{math}
\vspace*{3ex}\end{center}

When $\A$ is an arbitrary category, generalise the definitions of lax
linking exactly as in the original non-lax case: add $\A$-morphisms as
labels on edges between generators (objects of $\A$), then replace
condition (1) \Matching{} by conditions (1a) \Bijection{} and (1b)
\Labelling{} (page~\pageref{arb-matching} in the two-sided case, and
page~\pageref{onesided-arb-matching} in the one-sided case).
Extending the non-lax case, lax linkings $S\to T$ correspond to lax
linkings on the two-shape sequent $\;S\perp,T\:$ such that no edge
targets the distinguished (\ie\ outermost) $\ast$-vertex of $S\perp$.

\subsection{Lax equivalence}

Define two lax linkings as \defn{similar} if they differ by a single
edge from an $\tu$, and \defn{lax equivalent} if they are equivalent
modulo similarity on lax linkings (\ie, modulo the
reflexive-transitive closure of similarity).
To help avoid ambiguity, while dealing with lax linkings in this
section we shall refer to the original non-lax notion of a linking as
a \defn{standard linking}, and the original non-lax notion of
equivalence between standard linkings as \defn{standard equivalence}.
The following is the key technical step in the proof that the category
$\netsa$ is free.
\begin{lemma}[Lax rewiring]\label{lax-rewiring}
Standard linkings are standard equivalent iff they are lax equivalent.
\end{lemma}
Thus if the standard linking $f$ can be rewired to the standard
linking $g$ along a sequence $f=h_1\ldots h_n=g$ of lax linkings with
$h_i$ similar to $h_{i-1}$ for $i>1$, then $f$ can be rewired to $g$
along a sequence of \emph{standard} linkings: there exists a sequence
$f=k_1\ldots k_m=g$ of standard linkings with $k_i$ similar to
$k_{i-1}$ for $i>1$.  In other words, adding lax linkings has no
impact on equivalence of standard linkings: no additional standard
linkings are identified when we permit `lax rewiring', via lax
linkings.


\subsubsection{Proof of the Lax Rewiring Lemma}

Since two-sided lax linkings $S\to T$ are in bijection with certain
one-sided lax linkings on the two-formula sequent $S\perp,T$,
henceforth we shall assume all lax linkings are one-sided.

An \defn{atomic linking} is a lax linking whose every edge targets an
atom.  (Note that an atomic linking need not be a standard linking
since an edge from an $\tu$ may target a negative leaf.)  Define
atomic linkings $f$ and $g$ as \defn{atomic equivalent} if they are
lax equivalent via atomic linkings: there exists a sequence
$f=h_1\ldots h_n=g$ of atomic linkings with $h_i$ similar to $h_{i-1}$
for $i>1$.
The following lemma reduces atomic equivalence to standard
equivalence.
\begin{lemma}\label{lemma-reduce-atomic}
Standard linkings are standard equivalent iff they are atomic equivalent.
\end{lemma}
\begin{proof}
Define the \defn{depth} of an atomic linking as the number of its
edges which target negative leaves.  Thus an atomic linking is a
standard linking iff it has depth $0$.  Define the depth of a sequence
of lax linkings $f_1\ldots f_m$ as the maximum of the depths of the
$f_i$.  Suppose $f_1\ldots f_m$ has depth $d$.  The \defn{size} of
$f_1\ldots f_m$ is the number of $f_i$ of depth $d$.

Suppose $f$ and $g$ are standard linkings which are atomic equivalent
via a sequence $f=h_1\ldots h_n=g$ of atomic linkings with $h_i$ similar to
$h_{i-1}$ for $i>1$.
We proceed by a primary induction on the depth of $h_1\ldots h_n$, and
a secondary induction on its size.

\begin{itemize}
\item Primary induction base: $h_1\ldots h_n$ has depth $0$.  
Then all $h_i$ are standard linkings, so $f$ and $g$ 
are already standard equivalent.
\item Primary induction step: $h_1\ldots h_n$ has depth $d>0$.
Let $pqr$ be a three-element subsequence of $h_1\ldots h_n$ with $q$
of depth $d$ (\ie, $q$ is of maximum depth in the sequence) and $r$ of
depth $d-1$.  (Such a subsequence exists since $h_n=g$ has depth $0$,
and consecutive elements in the sequence differ by at most one in depth.)

Let $l$ be the negative leaf such that $q(l)$ is a negative leaf
$l^-$, and $r(l)$ is a positive leaf $l^+$, and otherwise $q$ and $r$
are identical.  (The leaf $l$ must exist, since $q$ has depth $d$
while $r$ has depth $d-1$.)  
Let $l'$ be the negative leaf such that
$p(l')\neq q(l')$, and let $l''=p(l')$.  If $l\neq l'$
then $p$, $q$ and $r$ are:
\begin{equation}
\addtolength{\arraycolsep}{.4ex}
\begin{array}{r@{\;\;\;\;}cccccc}
\rule{0pt}{4ex}
p: & \rnode{l}{l} & \rnode{l-}{l}^-\hspace{-1.5ex} & & \rnode{l'}{l'} & \rnode{l''}{l''}\hspace{-1.5ex} \\[1.7ex]
\uloopvec{l}{l-}\uloopvec{l'}{l''}
q: & \rnode{l}{l} & \rnode{l-}{l}^-\hspace{-1.5ex} & & \rnode{l'}{l'} & & \rnode{l'''}{l'''} \\[1.7ex]
\uloopvec{l}{l-}\psset{nodesepB=0pt}\vecangles{l'}{l'''}{35}{145}
r: & \rnode{l}{l} & & \rnode{l+}{l}^+ & \rnode{l'}{l'} & & \rnode{l'''}{l'''} 
\vecangles{l}{l+}{35}{145}\psset{nodesepB=0pt}\vecangles{l'}{l'''}{35}{145}
\end{array}
\end{equation}
where $l'''=q(l')=r(l')$, and if $l=l'$ then $p$, $q$ and $r$ are:
\begin{equation}\label{l-eq-l'}
\addtolength{\arraycolsep}{.4ex}
\begin{array}{r@{\;\;\;\;}cccccc}
\rule{0pt}{4ex}
p: & \rnode{l}{l} & \rnode{l''}{l''}\hspace{-1ex} \\[1.7ex]
\uloopvec{l}{l''}
q: & \rnode{l}{l} & & \rnode{l-}{l}^-\hspace{-1.5ex} \\[1.7ex]
\vecangles{l}{l-}{35}{145}
r: & \rnode{l}{l} & & & \rnode{l+}{l}^+
\vecangles{l}{l+}{35}{145}
\end{array}
\end{equation}
\begin{itemize}
\myitem{a} Secondary induction base: $h_1\ldots h_n$ has size $1$.  Thus $p$ has size $d-1$.  Therefore the 
rewirings $p\mapsto q$ and $q\mapsto r$ each re-target the same
negative leaf, \ie, $l=l'$, as in diagram~(\ref{l-eq-l'}) above, so $p$
and $r$ are similar, without need for $q$ as an intermediate.
Delete $q$ from $h_1\ldots h_n$, and appeal to the primary induction
hypothesis with this new sequence of depth $d-1$.
\myitem{b} Secondary induction step: $h_1\ldots h_n$ has size $s>1$.  If $p$ has depth $d-1$, we can delete $q$ exactly 
as in the previous case, reducing the size of $h_1\ldots h_n$ by $1$,
and appeal to the secondary induction hypothesis.  So assume $p$ has depth $d$.
Let $l^{\star+}$ be the leaf at the end of the path in (the directed graph)
$p$ which begins at $l^-$.  Thus $l^{\star+}$ is positive.
\begin{itemize}
\myitem{i} Case $l^-\neq l'$.  We have:
\begin{equation}
\addtolength{\arraycolsep}{.4ex}
\begin{array}{r@{\;\;\;\;}ccccccccc@{\;\;\;\;\;\;\;\;\;\;}l}
\rule{0pt}{4ex}
p: & \rnode{l}{l} & & \rnode{lminus}{l}^-\hspace*{-.5ex}\pnode(0,.33){e0}
& \pnode(0,.33){e1} & \pnode(0,.33){e2} \raisebox{2ex}{\small$\,\cdots$} \pnode(0,.33){e3} 
& \pnode(0,.33){e4}\rnode{lstar+}{l^\star}^+ & \rnode{l'}{l'} & \rnode{l''}{l''}
&& \text{(depth $d$)}\\[1.7ex]
\vecangles{l}{lminus}{35}{145}
\uloopvec{l'}{l''}
\psset{nodesep=0pt}
\uloopvec{e0}{e1}
\uloopvec{e1}{e2}
\uloopvec{e3}{e4}
q: & \rnode{l}{l} & & \rnode{lminus}{l}^-\hspace*{-.5ex}\pnode(0,.33){e0}
& \pnode(0,.33){e1} & \pnode(0,.33){e2} \raisebox{2ex}{\small$\,\cdots$} \pnode(0,.33){e3} 
& \pnode(0,.33){e4}\rnode{lstar+}{l^\star}^+ & \rnode{l'}{l'} && \rnode{l'''}{l'''}
& \text{(depth $d$)}\\[1.7ex]
\vecangles{l'}{l'''}{35}{145}
\vecangles{l}{lminus}{35}{145}\psset{nodesepA=5pt,nodesepB=0pt}
\psset{nodesep=0pt}
\uloopvec{e0}{e1}
\uloopvec{e1}{e2}
\uloopvec{e3}{e4}
r: & \rnode{l}{l} & \rnode{l+}{l}^+ &
&&&
& \rnode{l'}{l'} && \rnode{l'''}{l'''}
\vecangles{l'}{l'''}{35}{145}
\uloopvec{l}{l+}\psset{nodesepA=5pt,nodesepB=0pt}
& \text{(depth $d-1$)}
\end{array}
\end{equation}
Define $p'$ as $p$ but for $p'(l)=l^{\star+}$ (versus $p(l)=l^-$) and
similarly, define $q'$ as $q$ but for $q'(l)=l^{\star+}$ (versus
$q(l)=l^-$). Substitute $p'q'$ for $q$:
\begin{equation}
\addtolength{\arraycolsep}{.4ex}
\begin{array}{r@{\;\;\;\;}ccccccccc@{\;\;\;\;\;\;\;\;\;\;}l}
\rule{0pt}{4ex}
p: & \rnode{l}{l} & & \rnode{lminus}{l}^-\hspace*{-.5ex}\pnode(0,.33){e0}
& \pnode(0,.33){e1} & \pnode(0,.33){e2} \raisebox{2ex}{\small$\,\cdots$} \pnode(0,.33){e3} 
& \pnode(0,.33){e4}\rnode{lstar+}{l^\star}^+ & \rnode{l'}{l'} & \rnode{l''}{l''}
&& \text{(depth $d$)}\\[1.7ex]
\vecangles{l}{lminus}{35}{145}
\uloopvec{l'}{l''}
\psset{nodesep=0pt}
\uloopvec{e0}{e1}
\uloopvec{e1}{e2}
\uloopvec{e3}{e4}
p': & \rnode{l}{l} & & \rnode{lminus}{l}^-\hspace*{-.5ex}\pnode(0,.33){e0}
& \pnode(0,.33){e1} & \pnode(0,.33){e2} \raisebox{2ex}{\small$\,\cdots$} \pnode(0,.33){e3} 
& \pnode(0,.33){e4}\rnode{lstar+}{l^\star}^+ & \rnode{l'}{l'} & \rnode{l''}{l''}
&& \text{(depth $d-1$)}\\[1.7ex]
\vecanglesheight{l}{lstar+}{35}{95}{.5}
\uloopvec{l'}{l''}
\psset{nodesep=0pt}
\uloopvec{e0}{e1}
\uloopvec{e1}{e2}
\uloopvec{e3}{e4}
q': & \rnode{l}{l} & & \rnode{lminus}{l}^-\hspace*{-.5ex}\pnode(0,.33){e0}
& \pnode(0,.33){e1} & \pnode(0,.33){e2} \raisebox{2ex}{\small$\,\cdots$} \pnode(0,.33){e3} 
& \pnode(0,.33){e4}\rnode{lstar+}{l^\star}^+ & \rnode{l'}{l'} && \rnode{l'''}{l'''}
& \text{(depth $d-1$)}\\[1.7ex]
\vecangles{l'}{l'''}{35}{145}
\vecanglesheight{l}{lstar+}{35}{95}{.5}
\psset{nodesepA=5pt,nodesepB=0pt}
\psset{nodesep=0pt}
\uloopvec{e0}{e1}
\uloopvec{e1}{e2}
\uloopvec{e3}{e4}
r: & \rnode{l}{l} & \rnode{l+}{l}^+ &
&&&
& \rnode{l'}{l'} && \rnode{l'''}{l'''}
\vecangles{l'}{l'''}{35}{145}
\uloopvec{l}{l+}\psset{nodesepA=5pt,nodesepB=0pt}
& \text{(depth $d-1$)}
\end{array}
\end{equation}
Note that $p'$ has depth $d-1$ since $p$ has depth $d$ and $l^{\star+}$ is
positive whereas $l^-$ is negative; similarly, $q'$ has depth $d-1$.

The lax leaf functions $p'$ and $q'$ are lax linkings (\ie, satisfy the
linking correctness criterion),
since $p$ and $q$ are lax linkings: the edge from $l$ targets $l^-$ in $p$
and $q$, and $l^{\star+}$ in $p'$ and $q'$; since $l$ and $l^{\star+}$
are connected along the edges of the lax leaf function, a switching of $p$
(resp.\ $q$) is a tree iff the corresponding switching of $p'$ (resp.\
$q'$) is a tree.

By construction, the pairs $p\leftrightarrow p'$, $p'\leftrightarrow
q'$ and $q'\leftrightarrow r$ are similar.  Thus we can appeal to the
inductive hypothesis with the original sequence $h_1\ldots h_n$ with
$p'q'$ substituted for $q$, which has strictly smaller size than the
original (since $p'$ and $q'$ each have depth $d-1$, whereas $q$ has
depth $d$).
\myitem{ii} Case: $l^-=l'$.  We have:
\begin{equation}
\addtolength{\arraycolsep}{.4ex}
\begin{array}{r@{\;\;\;\;}cccccccc@{\;\;\;\;\;\;\;\;\;\;}l}
\rule{0pt}{4ex}
p: & \rnode{l}{l} & & \rnode{lminus}{l}^- & & \rnode{l''}{l''}\hspace*{-.5ex}\pnode(0,.33){e0}
& \pnode(0,.33){e1} & \pnode(0,.33){e2} \raisebox{2ex}{\small$\,\cdots$} \pnode(0,.33){e3} 
& \pnode(0,.33){e4}\rnode{lstar+}{l^\star}^+
& \text{(depth $d$)}\\[1.7ex]
\vecangles{l}{lminus}{35}{145}\psset{nodesepA=7pt}\vecangles{lminus}{l''}{25}{155}
\psset{nodesep=0pt}
\uloopvec{e0}{e1}
\uloopvec{e1}{e2}
\uloopvec{e3}{e4}
q: & \rnode{l}{l} & & \rnode{lminus}{l}^- & \rnode{l'''}{l'''}
&&&
&& \text{(depth $d$)}\\[1.7ex]
\vecangles{l}{lminus}{35}{145}\psset{nodesepA=5pt,nodesepB=0pt}
\vecangles{lminus}{l'''}{40}{140}
r: & \rnode{l}{l} & \rnode{l+}{l}^+  & \rnode{lminus}{l}^- & \rnode{l'''}{l'''} 
\uloopvec{l}{l+}\psset{nodesepA=5pt,nodesepB=0pt}
\vecangles{lminus}{l'''}{40}{140}
&&&
&& \text{(depth $d-1$)}
\end{array}
\end{equation}
(Note that $l''=l^{\star+}$ is possible.)
Define $p'$ as $p$ but for $p'(l)=l^{\star+}$ (versus $p(l)=l^-$) and define $r'$ as $r$ but for $r'(l)=l^{\star+}$ (versus $r(l)=l^+$):
\begin{equation}
\addtolength{\arraycolsep}{.4ex}
\begin{array}{r@{\;\;\;\;}cccccccc@{\;\;\;\;\;\;\;\;\;\;}l}
\rule{0pt}{4ex}
p: & \rnode{l}{l} & & \rnode{lminus}{l}^- & & \rnode{l''}{l''}\hspace*{-.5ex}\pnode(0,.33){e0}
& \pnode(0,.33){e1} & \pnode(0,.33){e2} \raisebox{2ex}{\small$\,\cdots$} \pnode(0,.33){e3} 
& \pnode(0,.33){e4}\rnode{lstar+}{l^\star}^+
& \text{(depth $d$)}\\[3ex]
\vecangles{l}{lminus}{35}{145}\psset{nodesepA=7pt}\vecangles{lminus}{l''}{25}{155}
\psset{nodesep=0pt}
\uloopvec{e0}{e1}
\uloopvec{e1}{e2}
\uloopvec{e3}{e4}
p': & \rnode{l}{l} & & \rnode{lminus}{l}^- & & \rnode{l''}{l''}\hspace*{-.5ex}\pnode(0,.33){e0}
& \pnode(0,.33){e1} & \pnode(0,.33){e2} \raisebox{2ex}{\small$\,\cdots$} \pnode(0,.33){e3} 
& \pnode(0,.33){e4}\rnode{lstar+}{l^\star}^+
& \text{(depth $d-1$)}\\[3ex]
\vecanglesheight{l}{lstar+}{25}{95}{.4}\psset{nodesepA=7pt}\vecangles{lminus}{l''}{25}{160}
\psset{nodesep=0pt}
\uloopvec{e0}{e1}
\uloopvec{e1}{e2}
\uloopvec{e3}{e4}
r': & \rnode{l}{l} & \rnode{l+}{l}^+  & \rnode{lminus}{l}^- & \rnode{l'''}{l'''} & \rnode{l''}{l''}\hspace*{-.5ex}\pnode(0,.33){e0}
& \pnode(0,.33){e1} & \pnode(0,.33){e2} \raisebox{2ex}{\small$\,\cdots$} \pnode(0,.33){e3} 
& \pnode(0,.33){e4}\rnode{lstar+}{l^\star}^+
& \text{(depth $d-1$)}\\[2.5ex]
\vecanglesheight{l}{lstar+}{25}{95}{.4}\psset{nodesepA=5pt,nodesepB=0pt}\vecangles{lminus}{l'''}{40}{140}
\psset{nodesep=0pt}
\uloopvec{e0}{e1}
\uloopvec{e1}{e2}
\uloopvec{e3}{e4}
r: & \rnode{l}{l} & \rnode{l+}{l}^+  & \rnode{lminus}{l}^- & \rnode{l'''}{l'''} 
\uloopvec{l}{l+}\psset{nodesepA=5pt,nodesepB=0pt}
\vecangles{lminus}{l'''}{40}{140}
&&&&& \text{(depth $d-1$)}
\end{array}
\end{equation}
Note that $p'$ has depth $d-1$ since $p$ has depth $d$ and $l^{\star+}$ is
positive whereas $l^-$ is negative, and that $r'$ has depth $d-1$
since $r$ has depth $d-1$ and both $l^{\star+}$ and $l^+$ are positive.

The lax leaf function $p'$ is a lax linking (\ie, satisfies the linking
correctness criterion), 
since the targets $l^-$ and $l^{\star+}$ of the edge from $l$, in $p$ and $p'$
respectively, are connected along the edges of the lax leaf function.

\emph{Claim}: $r'$ is a lax linking. 
\emph{Proof.}  Let $e$ be the edge of $r'$ from $l$ to $l^{\star+}$, and 
let $e'$ be the edge of $r'$ from $l^-$ to $l'''$.
\begin{equation}
\addtolength{\arraycolsep}{.4ex}
\begin{array}{r@{\;\;\;\;}cccccccc@{\;\;\;\;\;\;\;\;\;\;}l}
\rule{0pt}{5ex}
r': & \rnode{l}{l} & \rnode{l+}{l}^+  & \rnode{lminus}{l}^- & \rnode{l'''}{l'''} & \rnode{l''}{l''}\hspace*{-.5ex}\pnode(0,.33){e0}
& \pnode(0,.33){e1} & \pnode(0,.33){e2} \raisebox{2ex}{\small$\,\cdots$} \pnode(0,.33){e3} 
& \pnode(0,.33){e4}\rnode{lstar+}{l^\star}^+
\vecanglesheight{l}{lstar+}{35}{95}{.5}\naput{e}\psset{nodesepA=5pt,nodesepB=0pt}\vecangles{lminus}{l'''}{40}{140}\naput[npos=.75]{e'}
\psset{nodesep=0pt}
\uloopvec{e0}{e1}
\uloopvec{e1}{e2}
\uloopvec{e3}{e4}
\end{array}
\end{equation}
Suppose $C$ is a cycle in a switching $\sigma$ of $r'$.  The cycle $C$
must traverse both $e$ and $e'$, for if it did not traverse $e'$ it
would be contained in the corresponding switching of $p'$
(already proved to be a lax linking, and differing from $r'$ only on
$l^-$) or $r$ (differing from $r'$ only on $l$).
\begin{itemize}
\item[-] Case: $C$ (oriented one way or the other) has the form $e\pi e' \pi' e$ for 
sequences of edges $\pi$ and $\pi'$. Let $e''$ be the edge from
$l$ to $l^-$ in $q$:
\begin{equation}
\addtolength{\arraycolsep}{.4ex}
\begin{array}{r@{\;\;\;\;}cccccccc}
\rule{0pt}{5ex}
q: & \rnode{l}{l} & \rnode{l+}{l}^+  & \rnode{lminus}{l}^- & \rnode{l'''}{l'''} & \rnode{l''}{l''}\hspace*{-.5ex}\pnode(0,.33){e0}
& \pnode(0,.33){e1} & \pnode(0,.33){e2} \raisebox{2ex}{\small$\,\cdots$} \pnode(0,.33){e3} 
& \pnode(0,.33){e4}\rnode{lstar+}{l^\star}^+
\vecangles{l}{lminus}{35}{145}\naput{e''}\psset{nodesepA=5pt,nodesepB=0pt}\vecangles{lminus}{l'''}{40}{140}\naput[npos=.75]{e'}
\psset{nodesep=0pt}
\uloopvec{e0}{e1}
\uloopvec{e1}{e2}
\uloopvec{e3}{e4}
\end{array}
\end{equation}
We obtain a cycle of the form $e''e'\pi e''$ in the corresponding switching of $q$,
contradicting the fact that $q$ is a lax linking.
\item[-] Case: $C$ (oriented one way or the other) has the form $e\pi \overline{e}'\pi' e$ for sequences 
of edges $\pi$ and $\pi'$, where $\overline{e}'$ is $e'$ traversed in
the direction opposite to its given orientation:
\begin{equation}
\addtolength{\arraycolsep}{.4ex}
\begin{array}{cccccccc}
\rule{0pt}{7ex}
\rnode{l}{l} & \rnode{l+}{l}^+  & \rnode{lminus}{l}^- & \rnode{l'''}{l'''} & \rnode{l''}{l''}\hspace*{-.5ex}\pnode(0,.33){e0}
& \pnode(0,.33){e1} & \pnode(0,.33){e2} \raisebox{2ex}{\small$\,\cdots$} \pnode(0,.33){e3} 
& \pnode(0,.33){e4}\rnode{lstar+}{l^\star}^+
\vecanglesheight{l}{lstar+}{35}{95}{.5}\naput{e}\psset{nodesepA=0pt,nodesepB=5pt}\vecangles{l'''}{lminus}{140}{40}
\nbput[npos=.25]{\overline{e}'}
\psset{nodesep=0pt}
\uloopvec{e0}{e1}
\uloopvec{e1}{e2}
\uloopvec{e3}{e4}
\end{array}
\end{equation}
Again, Let $e''$ be the edge from
$l$ to $l^-$ in $q$:
\begin{equation}
\addtolength{\arraycolsep}{.4ex}
\begin{array}{cccccccc}
\rule{0pt}{5ex}
\rnode{l}{l} & \rnode{l+}{l}^+  & \rnode{lminus}{l}^- & \rnode{l'''}{l'''} & \rnode{l''}{l''}\hspace*{-.5ex}\pnode(0,.33){e0}
& \pnode(0,.33){e1} & \pnode(0,.33){e2} \raisebox{2ex}{\small$\,\cdots$} \pnode(0,.33){e3} 
& \pnode(0,.33){e4}\rnode{lstar+}{l^\star}^+
\vecangles{l}{lminus}{35}{145}\naput{e''}\psset{nodesepA=0pt,nodesepB=5pt}\vecangles{l'''}{lminus}{140}{40}
\nbput[npos=.25]{\overline{e}'}
\psset{nodesep=0pt}
\uloopvec{e0}{e1}
\uloopvec{e1}{e2}
\uloopvec{e3}{e4}
\end{array}
\end{equation}
We obtain a cycle $e''\pi'e''$ in the corresponding switching of $q$,
contradicting the fact that $q$ is a lax linking.
\end{itemize}
\emph{QED Claim.}

By construction, the pairs $p\leftrightarrow p'$, $p'\leftrightarrow
r'$ and $r'\leftrightarrow r$ are similar, and $p'$ and $r'$ are
lax linkings.  Thus we can appeal to the inductive hypothesis with the
original sequence $h_1\ldots h_n$ with $p'r'$ substituted for $q$,
which has strictly smaller size than the original (since $p'$ and $r'$
each have depth $d-1$, whereas $q$ has depth $d$).
\end{itemize}
\end{itemize}
\end{itemize}
\end{proof}

\begin{lemma}\label{shift-to-arg}
Let $f$ be a lax linking, let $l$ be a negative $\tu$-labelled leaf
whose $f$-edge targets a vertex $v$ with an argument-vertex $a$ (thus
$v$ is either a $\tensor$ or a $\ast$).
Let $f'$ be the result of retargeting the edge from $l$ to point to
$a$ instead of $v$ (\ie, the lax leaf function $f'$ is $f$ but with
$f'(l)=a$ versus $f(l)=v$).
Then $f'$ is a lax linking.
\end{lemma}
\begin{proof}
If $v$ is a $\ast$-vertex, the result is immediate since switchings
of $f$ correspond to switchings of $f'$.  Thus assume $v$ is a
$\tensor$-vertex.  Without loss of generality, $a$ is the left
argument of $v$.
If $v$ is positive (hence retains both argument edges in every
switching), then the result is immediate.  So assume $v$ is
negative.\footnote{Note for readers familiar with linear
distributivity in linear logic: the remainder of this proof is simply
the usual argument (in disguise) that applying linear distributivity
preserves MLL proof net correctness.  The correspondence is as
follows.  Let $S$ be the (sub)shape rooted at the negative
$\tensor$-vertex $v$ in the proof in the main text; since $v$ is
negative, think of it as a par.  Thus we think of $S$ as
$S_1\footnoteparr S_2$.  Substitute $I\tensor S$ for $S$, and retarget
the $f$-edge from $l$ to point to the new $\tu$; call this the lax
linking $\widehat{f}$. Now apply linear distributivity (and ignore
$\ast$-vertices, which are irrelevant for cycles in switchings),
yielding a lax linking $\widehat{f}'$ on $(I\tensor S_1)\footnoteparr
S_2$.  This lax linking $\widehat{f}'$ corresponds to $f'$ just as
$\widehat{f}$ corresponded to $f$; hence $f'$ is a well-defined lax
linking.}  Towards a contradiction, suppose $\sigma$ is a switching of
$f'$ containing a cycle $C$.  Let $e$ be the edge in $f$ from $l$ to
$v$, let $e'$ be the edge in $f'$ from $l$ to $a$, let $e_1$ be the
edge between $v$ and its left argument, and let $e_2$ be the edge
between $v$ and its right argument.  Assume $C$ traverses $e'$,
otherwise $C$ is a cycle in the corresponding switching of $f$.
Assume $\sigma$ contains $e_2$ rather than $e_1$, for otherwise $C$
immediately induces a cycle $C'$ in the corresponding switching of
$f$: if $C$ traverses both $e'$ and $e_1$, following (in one
orientation or the other) the path $\pi=la\ldots v$, form $C'$ by
replacing $\pi$ by (the `shortcut') $e$; otherwise $C$ traverses $e'$
but not $e_1$, so replace $e'$ in $C$ by the path $t\ldots a$ which
starts out along the argument edge $e_1$.

Oriented one way or the other, $C$ has the form $e'\pi e_2\pi'e'$,
where $e'$ is traversed from $l$ to $a$ (its natural orientation) and
the undirected argument edge $e_2$ may be traversed either (a) towards
$v$, or (b) away from $v$.  In case (a), $e\pi e$ is a cycle in the
corresponding switching of $f$, and in case (b), $ee_2\pi'e$ is a
cycle in the corresponding switching of $f$; either case contradicts
the fact that $f$ is a lax linking.
\end{proof}
\begin{corollary}\label{shift-to-leaf}
Let $f$ be a lax linking, let $l$ be a negative $\tu$-labelled leaf
whose $f$-edge targets a vertex $v$, and let $l'$ be one of the leaves
above $v$ (\ie, a leaf which is a hereditary argument of $v$).  The
result of retargeting the $f$-edge $l\to v$ to $l\to l'$ is a lax
linking.
\end{corollary}
\begin{proof}
Iterate Lemma~\ref{shift-to-arg}.
\end{proof}
\begin{lemma}\label{atomic-lemma}
Standard linkings are atomic equivalent iff they are lax equivalent.
\end{lemma}
\begin{proof}
A three-level induction.  Define the \defn{volume} of a shape as its
number of vertices.  The volume of a vertex $v$ in a shape is the
volume of the (sub)shape rooted at $v$.  For example, the volumes of
vertices have been subscripted on the following shape:
\raisebox{2pt}{\footnotesize$\big(\underset{1}{\tu}\,\underset{2}{{}\perp}\,\underset{3}{{}\perp}\,\underset{13}{\tensor}
((\underset{1}{a}\underset{4}{\tensor}\underset{1}{a}\,\underset{2}{{}\perp}\,)\underset{9}{\tensor}(\underset{1}{\tu}
\underset{3}{\tensor}\underset{1}{b})\,\underset{4}{{}\perp}\,)\big)\,\underset{14}{{}\perp}\,$}\:.
Define the volume of a negative $I$ in a lax linking $f$ as the volume
of its target under $f$, and the volume of $f$ as the maximum of the
volumes of its negative $I$'s.  Thus $f$ has volume $1$ iff it is an
atomic lax linking (\ie, every $f$-edge from a negative $I$ targets a
leaf).  The volume of a sequence $f_1\ldots f_m$ of lax linkings is
the maximum of the volumes of the $f_i$.  Let $V$ be the volume of
$f_1\ldots f_m$.  The \defn{depth} of $f_i$ (with respect to
$f_1\ldots f_m$) is the number of negative $I$'s in $f_i$ which have
volume $V$.  Define the depth of a sequence of linkings $f_1\ldots
f_m$ as the maximum of the depths of the $f_i$.  Suppose $f_1\ldots
f_m$ has depth $d$.  The
\defn{size} of $f_1\ldots f_m$ is the number of $f_i$ of depth $d$.

Let $f$ and $g$ be standard linkings, lax equivalent via a sequence
$f=h_1\ldots h_n=g$ of lax linkings with $h_i$ similar to $h_{i-1}$
for $i>1$.  We proceed by a primary induction on the volume $V$ of
$h_1\ldots h_n$, a secondary induction on its depth $d$, and a
tertiary induction on its size $s$.

If $V=1$, then all the $h_i$ are already atomic lax linkings.

Suppose $V>1$.  Let $pqr$ be a subsequence of $h_1\ldots h_n$ in which
$q$ has depth $d$ (hence volume $V$) and $r$ has depth $e<d$.  (Such a
subsequence exists since $h_n=g$ has volume $1<V$.)  Let $c$ be the
depth of $q$.  There are two cases:
\begin{enumerate}
\item \emph{Case $c<d$.}  Since $c<d>e$ the rewirings $p\leftrightarrow q$ and $q\leftrightarrow r$ both rewire an edge
from the same negative $I$.  Delete $q$ from $h_1\ldots h_n$.  This
reduces at least one of the volume, depth or size of $h_1\ldots h_n$.
(If not the volume, then the depth or the size; if not the depth, then
the size.)
\item \emph{Case $c=d$.}  We have
\begin{equation}
\addtolength{\arraycolsep}{.4ex}
\begin{array}{r@{\;\;\;\;}cccccc@{\;\;\;\;\;\;\;\;\;\;}l}
\rule{0pt}{4ex}
p: & \rnode{l}{l} & \rnode{v_1}{v_1}\hspace{-1.5ex} & & \rnode{l'}{l'}
& \rnode{w_1}{w_1}\hspace{-1.5ex} && \text{(depth $d$)}\\[5ex]
\uloopvec{l}{v_1}
\uloopvec{l'}{w_1}
q: & \rnode{l}{l} & \rnode{v_1}{v_1}\hspace{-1.5ex} & & \rnode{l'}{l'}
& & \rnode{w_2}{w_2} & \text{(depth $d$)}\\[4.2ex]
\uloopvec{l}{v_1}
\naput{V}
\vecangles{l'}{w_2}{35}{145}
r: & \rnode{l}{l} & & \rnode{v_2}{v_2} & \rnode{l'}{l'} & &
\rnode{w_2}{w_2}
\vecangles{l}{v_2}{35}{145}
\naput{<\mkern-4mu V}
\vecangles{l'}{w_2}{35}{145}
& \text{(depth $e<d$)}
\end{array}
\end{equation}
where $l$ and $l'$ are negative $I$-labelled leaves, the $v_i$ and
$w_j$ are vertices of unspecified type, and the volume of $l$ is $V$
in $p$ and $q$ and $<\mkern-4mu V$ in $r$. If $l=l'$, then we can
simply delete $q$, as in the previous case.  Thus assume $l\neq l'$.

Let $a$ be a leaf above $v_1$.  Define $p'$ and $q'$ from $p$ and $q$
by re-targeting the edge from $l$ to target $a$ instead of $v_1$.
Each of $p'$ and $q'$ is a well-defined lax linking by
Corollary~\ref{shift-to-leaf}.  Substitute $p'q'$ for $q$ in
$h_1\ldots h_n$.  This reduces at least one of the volume, depth or
size of $h_1\ldots h_n$, since the volume of $l$ in $p'$ and $q'$ is
strictly less than $V$.  (If not the volume, then the depth or the
size; if not the depth, then the size.)
\end{enumerate}\vspace{-4.5ex}
\end{proof}
\begin{proofof}{Lemma~\ref{lax-rewiring} 
(the Lax Rewiring Lemma: standard linkings are standard equivalent iff
they are lax equivalent)} By Lemma~\ref{lemma-reduce-atomic} standard
linkings are standard equivalent iff they are atomic equivalent, and
by Lemma~\ref{atomic-lemma} they are atomic equivalent iff they are
lax equivalent.
\end{proofof}

\subsection{Main freeness proof}

We are now ready to prove the Freeness Theorem (Theorem~\ref{free},
page~\pageref{free}): for any category $\A$, the category $\netsa$ of
$\A$-nets is the free star-autonomous category generated by $\A$.  To
avoid wasting time and paper, rather than prove the theorem from
scratch we show that $\netsa$ is isomorphic to a full subcategory of
the circuit category $\polynetstara$ of \cite{BCST96}, where
$(\mathcal{C}_\A,E_\A)$ is the polygraph representing $\A$, with typed
components $\mathcal{C}_\A$ and equations $E_\A$.  By Theorem~5.1 of
\cite{BCST96}, $\polynetstara$ is the free symmetric linearly
(=weakly) distributive category with negation generated by $\A$.
Write $\netstara$ for the full subcategory of $\polynetstara$ whose
circuits are cotensor-free and cotensor-unit-free (\ie\ par-free and
$\bot$-free, in linear logic terminology \cite{Gir87}).  Thus the
objects of $\netstara$ are in bijection with $\A$-shapes.  By the
equivalence between symmetric linearly distributive categories with
negation and star-autonomous categories in \cite{CS97}, $\netstara$ is
the free star-autonomous category generated by $\A$, as a corollary of
Theorem~5.1 of \cite{BCST96}.  Thus our Freeness Theorem,
Theorem~\ref{free}, follows from:
\begin{proposition}\label{iso-prop}
$\netsa$ is isomorphic to $\netstara$.
\end{proposition}
\subsection{Proof of Proposition~\ref{iso-prop}}

In this paper we have defined a \emph{net} as an equivalence class of
\emph{linkings}.  To obtain the same two-level distinction with the
category $\netstara$ of \cite{BCST96}, we shall use a similar
convention: henceforth \defn{net} refers to an equivalence class, and
\defn{circuit} refers to an individual representative in a class.\footnote{Thus, in particular, we shall 
always assume a circuit satisfies the correctness criterion.}

Given $\A$-shapes $S$ and $T$ define a \defn{normal circuit} $S\to T$
as a normal circuit with a single input wire of type $S$ and a single
output wire of type $T$.  More precisely\footnote{One must work with
equivalence classes of circuits (nets) since thinning links may block
redexes.}, a normal circuit is any representative of a net in
$\netstara$ from $S$ to $T$ which is normalised.  For example, given
morphisms $x:a\to b$ and $y:c\to d$ in the generating category $\A$,
here is a normal circuit $\tu\tensor\big((b\tensor c\perp)\perp\tensor
I\big)\to (a\tensor d\perp)\perp$:
\begin{center}\footnotesize\psset{xunit=1.1cm,yunit=.5cm}
\newcommand{\blanklink}[3]{\pnode(#1,#2){#3}}
\newcommand{\tulink}[3]{\cnodeput[framesep=1pt](#1,#2){#3}{$\tu$}}
\newcommand{\neglink}[3]{\cnodeput[framesep=2pt](#1,#2){#3}{$\neg$}}
\newcommand{\tlink}[3]{\cnodeput[framesep=1pt](#1,#2){#3}{$\tensor$}}
\newcommand{\boxlink}[4]{\rput(#1,#2){\rnode{#3}{\psframebox[framesep=7pt]{$#4$}}}}
\newcommand{\conc}{3}
\newcommand{\rowzero}{4}
\newcommand{\rowone}{6}
\newcommand{\rowtwo}{8}
\newcommand{\rowthree}{9.5}
\newcommand{\rowfour}{12}
\newcommand{\rowfive}{14}
\newcommand{\hypoth}{15.5}
\newcommand{\colone}{-4}
\newcommand{\coltwo}{2}
\newcommand{\colthree}{2}
\newcommand{\colfour}{5}
\newcommand{\colfive}{8}% redundant
\newcommand{\colsix}{9}
\newcommand{\colseven}{12}
\newcommand{\coleight}{15}
\newcommand{\colnine}{19}
\newcommand{\colten}{21}
\newcommand{\coleleven}{23}
\newcommand{\coltwelve}{25}
\newcommand{\colthirteen}{27}
\newcommand{\wire}[4]{\nccurve[nodesep=-.2pt,angleA=#3,angleB=#4]{#1}{#2}}
\newcommand{\down}[2]{\ncline[nodesepA=-.2pt,angleA=-90,angleB=90]{#1}{#2}}
\newcommand{\up}[2]{\ncline[nodesepA=-.2pt,angleA=90,angleB=-90]{#1}{#2}}
\newcommand{\leftdown}[2]{\wire{#1}{#2}{180}{90}}
\newcommand{\rightdown}[2]{\wire{#1}{#2}{0}{90}}
\newcommand{\leftup}[2]{\wire{#1}{#2}{180}{-90}}
\newcommand{\rightup}[2]{\wire{#1}{#2}{0}{-90}}
\newcommand{\leftdiagdown}[2]{\wire{#1}{#2}{-135}{90}}
\newcommand{\rightdiagdown}[2]{\wire{#1}{#2}{-45}{90}}
\newcommand{\leftdiagup}[2]{\wire{#1}{#2}{135}{-90}}
\newcommand{\rightdiagup}[2]{\wire{#1}{#2}{45}{-90}}
\begin{pspicture}(2,3)(4,15)
\psset{xunit=.3cm,yunit=1}
\blanklink{\colone}{\conc}{conc}
\neglink{\coltwo}{\rowfive}{neg}
\tlink{\colfour}{\rowfour}{tensor}
\boxlink{\colthree}{\rowthree}{x}{x}
\neglink{\colsix}{\rowthree}{neg1}
\boxlink{\colseven}{\rowfour}{y}{y}
\neglink{\coleight}{\rowfive}{neg2}
\tlink{\colseven}{\rowone}{tensor2}
\neglink{\colnine}{\rowzero}{neg3}
\tlink{\coltwelve}{\rowtwo}{tensor3}
\tulink{\colthirteen}{\rowone}{I}
\tlink{\coleleven}{\rowfour}{tensor4}
\tulink{\colten}{\rowthree}{J}
\blanklink{\coleleven}{\hypoth}{hypoth}
\leftdown{neg}{conc}
\nbput[npos=.95]{$(a\tensor d\perp)\perp$}
\rightdown{neg}{tensor}
\naput[npos=.5]{$a\tensor d\perp$}
\leftdiagdown{tensor}{x}
\nbput[npos=.5]{$a$}
\wire{tensor}{neg1}{-45}{180}
\naput[npos=.5]{$d\perp$}
\rightup{neg1}{y}
\nbput[npos=.5]{$d$}
\leftdown{neg2}{y}
\nbput[npos=.5]{$c$}
\wire{neg2}{tensor2}{0}{45}
\naput[npos=.5]{$c\perp$}
\leftdiagup{tensor2}{x}
\naput[npos=.5]{$b$}
\leftup{neg3}{tensor2}
\naput[npos=.9]{$b\tensor c\perp$}
\ncput[npos=.33]{\ovalnode{j1}{\rule{0pt}{4pt}}}
\ncput[npos=.6]{\ovalnode{j2}{\rule{0pt}{4pt}}}
\wire{neg3}{tensor3}{0}{-135}
\naput[npos=.5]{$\!\!(b\tensor c\perp)\perp\!\!\!$}
\rightdiagdown{tensor3}{I}
\naput[npos=.4]{$\tu$}
\rightdiagdown{tensor4}{tensor3}
\naput[npos=.5]{$(b\tensor c\perp)\perp\tensor\tu$}
\leftdiagdown{tensor4}{J}
\nbput[npos=.4]{$\tu$}
\up{tensor4}{hypoth}
\nbput[npos=.85]{$\tu\tensor\big((b\tensor c\perp)\perp\tensor\tu\big)$}
\psset{linestyle=dotted}
\nccurve[angleA=-100,angleB=70]{J}{j2}
\nccurve[angleA=-90,angleB=-40,ncurv=1]{I}{j1}
\end{pspicture}
\end{center}
There is one notational difference: we write $\tu$ for the tensor
unit, denoted $\top$ in \cite{BCST96}.  Define an \defn{abstract
circuit} as a normal circuit modulo the ordering of thinning links
attached along each wire.  For example, the following normal circuit
denotes the same abstract circuit as the normal circuit above:
\begin{center}\footnotesize\psset{xunit=1.1cm,yunit=.5cm}
\newcommand{\blanklink}[3]{\pnode(#1,#2){#3}}
\newcommand{\tulink}[3]{\cnodeput[framesep=1pt](#1,#2){#3}{$\tu$}}
\newcommand{\neglink}[3]{\cnodeput[framesep=2pt](#1,#2){#3}{$\neg$}}
\newcommand{\tlink}[3]{\cnodeput[framesep=1pt](#1,#2){#3}{$\tensor$}}
\newcommand{\boxlink}[4]{\rput(#1,#2){\rnode{#3}{\psframebox[framesep=7pt]{$#4$}}}}
\newcommand{\conc}{3}
\newcommand{\rowzero}{4}
\newcommand{\rowone}{6}
\newcommand{\rowtwo}{8}
\newcommand{\rowthree}{9.5}
\newcommand{\rowfour}{12}
\newcommand{\rowfive}{14}
\newcommand{\hypoth}{15.5}
\newcommand{\colone}{-4}
\newcommand{\coltwo}{2}
\newcommand{\colthree}{2}
\newcommand{\colfour}{5}
\newcommand{\colfive}{8}% redundant
\newcommand{\colsix}{9}
\newcommand{\colseven}{12}
\newcommand{\coleight}{15}
\newcommand{\colnine}{19}
\newcommand{\colten}{21}
\newcommand{\coleleven}{23}
\newcommand{\coltwelve}{25}
\newcommand{\colthirteen}{27}
\newcommand{\wire}[4]{\nccurve[nodesep=-.2pt,angleA=#3,angleB=#4]{#1}{#2}}
\newcommand{\down}[2]{\ncline[nodesepA=-.2pt,angleA=-90,angleB=90]{#1}{#2}}
\newcommand{\up}[2]{\ncline[nodesepA=-.2pt,angleA=90,angleB=-90]{#1}{#2}}
\newcommand{\leftdown}[2]{\wire{#1}{#2}{180}{90}}
\newcommand{\rightdown}[2]{\wire{#1}{#2}{0}{90}}
\newcommand{\leftup}[2]{\wire{#1}{#2}{180}{-90}}
\newcommand{\rightup}[2]{\wire{#1}{#2}{0}{-90}}
\newcommand{\leftdiagdown}[2]{\wire{#1}{#2}{-135}{90}}
\newcommand{\rightdiagdown}[2]{\wire{#1}{#2}{-45}{90}}
\newcommand{\leftdiagup}[2]{\wire{#1}{#2}{135}{-90}}
\newcommand{\rightdiagup}[2]{\wire{#1}{#2}{45}{-90}}
\begin{pspicture}(2,3)(4,15)
\psset{xunit=.3cm,yunit=1}
\blanklink{\colone}{\conc}{conc}
\neglink{\coltwo}{\rowfive}{neg}
\tlink{\colfour}{\rowfour}{tensor}
\boxlink{\colthree}{\rowthree}{x}{x}
\neglink{\colsix}{\rowthree}{neg1}
\boxlink{\colseven}{\rowfour}{y}{y}
\neglink{\coleight}{\rowfive}{neg2}
\tlink{\colseven}{\rowone}{tensor2}
\neglink{\colnine}{\rowzero}{neg3}
\tlink{\coltwelve}{\rowtwo}{tensor3}
\tulink{\colthirteen}{\rowone}{I}
\tlink{\coleleven}{\rowfour}{tensor4}
\tulink{\colten}{\rowthree}{J}
\blanklink{\coleleven}{\hypoth}{hypoth}
\leftdown{neg}{conc}
\nbput[npos=.95]{$(a\tensor d\perp)\perp$}
\rightdown{neg}{tensor}
\naput[npos=.5]{$a\tensor d\perp$}
\leftdiagdown{tensor}{x}
\nbput[npos=.5]{$a$}
\wire{tensor}{neg1}{-45}{180}
\naput[npos=.5]{$d\perp$}
\rightup{neg1}{y}
\nbput[npos=.5]{$d$}
\leftdown{neg2}{y}
\nbput[npos=.5]{$c$}
\wire{neg2}{tensor2}{0}{45}
\naput[npos=.5]{$c\perp$}
\leftdiagup{tensor2}{x}
\naput[npos=.5]{$b$}
\leftup{neg3}{tensor2}
\naput[npos=.9]{$b\tensor c\perp$}
\ncput[npos=.33]{\ovalnode{j1}{\rule{0pt}{4pt}}}
\ncput[npos=.6]{\ovalnode{j2}{\rule{0pt}{4pt}}}
\wire{neg3}{tensor3}{0}{-135}
\naput[npos=.5]{$\!\!(b\tensor c\perp)\perp\!\!\!$}
\rightdiagdown{tensor3}{I}
\naput[npos=.4]{$\tu$}
\rightdiagdown{tensor4}{tensor3}
\naput[npos=.5]{$(b\tensor c\perp)\perp\tensor\tu$}
\leftdiagdown{tensor4}{J}
\nbput[npos=.4]{$\tu$}
\up{tensor4}{hypoth}
\nbput[npos=.85]{$\tu\tensor\big((b\tensor c\perp)\perp\tensor\tu\big)$}
\psset{linestyle=dotted}
\nccurve[angleA=-100,angleB=80]{J}{j1}
\nccurve[angleA=-90,angleB=-70,ncurv=.6]{I}{j2}
\end{pspicture}
\end{center}
To obtain a unique representation of a canonical circuit, we shall
superimpose the attachment points of the thinning links, for example,
drawing the above canonical circuit as
\begin{center}\label{canonical-circuit}\footnotesize\psset{xunit=1.1cm,yunit=.5cm}
\newcommand{\blanklink}[3]{\pnode(#1,#2){#3}}
\newcommand{\tulink}[3]{\cnodeput[framesep=1pt](#1,#2){#3}{$\tu$}}
\newcommand{\neglink}[3]{\cnodeput[framesep=2pt](#1,#2){#3}{$\neg$}}
\newcommand{\tlink}[3]{\cnodeput[framesep=1pt](#1,#2){#3}{$\tensor$}}
\newcommand{\boxlink}[4]{\rput(#1,#2){\rnode{#3}{\psframebox[framesep=7pt]{$#4$}}}}
\newcommand{\conc}{3}
\newcommand{\rowzero}{4}
\newcommand{\rowone}{6}
\newcommand{\rowtwo}{8}
\newcommand{\rowthree}{9.5}
\newcommand{\rowfour}{12}
\newcommand{\rowfive}{14}
\newcommand{\hypoth}{15.5}
\newcommand{\colone}{-4}
\newcommand{\coltwo}{2}
\newcommand{\colthree}{2}
\newcommand{\colfour}{5}
\newcommand{\colfive}{8}% redundant
\newcommand{\colsix}{9}
\newcommand{\colseven}{12}
\newcommand{\coleight}{15}
\newcommand{\colnine}{19}
\newcommand{\colten}{21}
\newcommand{\coleleven}{23}
\newcommand{\coltwelve}{25}
\newcommand{\colthirteen}{27}
\newcommand{\wire}[4]{\nccurve[nodesep=-.2pt,angleA=#3,angleB=#4]{#1}{#2}}
\newcommand{\down}[2]{\ncline[nodesepA=-.2pt,angleA=-90,angleB=90]{#1}{#2}}
\newcommand{\up}[2]{\ncline[nodesepA=-.2pt,angleA=90,angleB=-90]{#1}{#2}}
\newcommand{\leftdown}[2]{\wire{#1}{#2}{180}{90}}
\newcommand{\rightdown}[2]{\wire{#1}{#2}{0}{90}}
\newcommand{\leftup}[2]{\wire{#1}{#2}{180}{-90}}
\newcommand{\rightup}[2]{\wire{#1}{#2}{0}{-90}}
\newcommand{\leftdiagdown}[2]{\wire{#1}{#2}{-135}{90}}
\newcommand{\rightdiagdown}[2]{\wire{#1}{#2}{-45}{90}}
\newcommand{\leftdiagup}[2]{\wire{#1}{#2}{135}{-90}}
\newcommand{\rightdiagup}[2]{\wire{#1}{#2}{45}{-90}}
\begin{pspicture}(2,3)(4,15)
\psset{xunit=.3cm,yunit=1}
\blanklink{\colone}{\conc}{conc}
\neglink{\coltwo}{\rowfive}{neg}
\tlink{\colfour}{\rowfour}{tensor}
\boxlink{\colthree}{\rowthree}{x}{x}
\neglink{\colsix}{\rowthree}{neg1}
\boxlink{\colseven}{\rowfour}{y}{y}
\neglink{\coleight}{\rowfive}{neg2}
\tlink{\colseven}{\rowone}{tensor2}
\neglink{\colnine}{\rowzero}{neg3}
\tlink{\coltwelve}{\rowtwo}{tensor3}
\tulink{\colthirteen}{\rowone}{I}
\tlink{\coleleven}{\rowfour}{tensor4}
\tulink{\colten}{\rowthree}{J}
\blanklink{\coleleven}{\hypoth}{hypoth}
\leftdown{neg}{conc}
\nbput[npos=.95]{$(a\tensor d\perp)\perp$}
\rightdown{neg}{tensor}
\naput[npos=.5]{$a\tensor d\perp$}
\leftdiagdown{tensor}{x}
\nbput[npos=.5]{$a$}
\wire{tensor}{neg1}{-45}{180}
\naput[npos=.5]{$d\perp$}
\rightup{neg1}{y}
\nbput[npos=.5]{$d$}
\leftdown{neg2}{y}
\nbput[npos=.5]{$c$}
\wire{neg2}{tensor2}{0}{45}
\naput[npos=.5]{$c\perp$}
\leftdiagup{tensor2}{x}
\naput[npos=.5]{$b$}
\leftup{neg3}{tensor2}
\naput[npos=.9]{$b\tensor c\perp$}
\ncput[npos=.44]{\ovalnode{j1}{\rule{0pt}{4pt}}}
\wire{neg3}{tensor3}{0}{-135}
\naput[npos=.5]{$\!\!(b\tensor c\perp)\perp\!\!\!$}
\rightdiagdown{tensor3}{I}
\naput[npos=.4]{$\tu$}
\rightdiagdown{tensor4}{tensor3}
\naput[npos=.5]{$(b\tensor c\perp)\perp\tensor\tu$}
\leftdiagdown{tensor4}{J}
\nbput[npos=.4]{$\tu$}
\up{tensor4}{hypoth}
\nbput[npos=.85]{$\tu\tensor\big((b\tensor c\perp)\perp\tensor\tu\big)$}
\psset{linestyle=dotted}
\nccurve[angleA=-100,angleB=80]{J}{j1}
\nccurve[angleA=-90,angleB=-63,ncurv=.6]{I}{j1}
\end{pspicture}
\end{center}
\begin{lemma}\label{lax-bijection}
Lax linkings $S\to T$ are in bijection with canonical circuits $S\to
T$.
\end{lemma}
\begin{proof}
Deleting the thinning links and generators from a canonical circuit
$S\to T$ leaves the parse tree structures of $S$ and $T$.  For
example, the circuit above leaves
\begin{center}\footnotesize\psset{xunit=1.1cm,yunit=.5cm}
\newcommand{\blanklink}[3]{\pnode(#1,#2){#3}}
\newcommand{\tulink}[3]{\cnodeput[framesep=1pt](#1,#2){#3}{$\tu$}}
\newcommand{\neglink}[3]{\cnodeput[framesep=2pt](#1,#2){#3}{$\neg$}}
\newcommand{\tlink}[3]{\cnodeput[framesep=1pt](#1,#2){#3}{$\tensor$}}
\newcommand{\boxlink}[4]{\cnodeput[linestyle=none,framesep=2ex](#1,#2){#3}{}}
\newcommand{\conc}{3}
\newcommand{\rowzero}{4}
\newcommand{\rowone}{6}
\newcommand{\rowtwo}{8}
\newcommand{\rowthree}{9.5}
\newcommand{\rowfour}{12}
\newcommand{\rowfive}{14}
\newcommand{\hypoth}{15.5}
\newcommand{\colone}{-4}
\newcommand{\coltwo}{2}
\newcommand{\colthree}{2}
\newcommand{\colfour}{5}
\newcommand{\colfive}{8}% redundant
\newcommand{\colsix}{9}
\newcommand{\colseven}{12}
\newcommand{\coleight}{15}
\newcommand{\colnine}{19}
\newcommand{\colten}{21}
\newcommand{\coleleven}{23}
\newcommand{\coltwelve}{25}
\newcommand{\colthirteen}{27}
\newcommand{\wire}[4]{\nccurve[nodesep=-.2pt,angleA=#3,angleB=#4]{#1}{#2}}
\newcommand{\down}[2]{\ncline[nodesepA=-.2pt,angleA=-90,angleB=90]{#1}{#2}}
\newcommand{\up}[2]{\ncline[nodesepA=-.2pt,angleA=90,angleB=-90]{#1}{#2}}
\newcommand{\leftdown}[2]{\wire{#1}{#2}{180}{90}}
\newcommand{\rightdown}[2]{\wire{#1}{#2}{0}{90}}
\newcommand{\leftup}[2]{\wire{#1}{#2}{180}{-90}}
\newcommand{\rightup}[2]{\wire{#1}{#2}{0}{-90}}
\newcommand{\leftdiagdown}[2]{\wire{#1}{#2}{-135}{90}}
\newcommand{\rightdiagdown}[2]{\wire{#1}{#2}{-45}{90}}
\newcommand{\leftdiagup}[2]{\wire{#1}{#2}{135}{-90}}
\newcommand{\rightdiagup}[2]{\wire{#1}{#2}{45}{-90}}
\begin{pspicture}(2,3)(4,15)
\psset{xunit=.3cm,yunit=1}
\blanklink{\colone}{\conc}{conc}
\neglink{\coltwo}{\rowfive}{neg}
\tlink{\colfour}{\rowfour}{tensor}
\boxlink{\colthree}{\rowthree}{x}{x}
\neglink{\colsix}{\rowthree}{neg1}
\boxlink{\colseven}{\rowfour}{y}{y}
\neglink{\coleight}{\rowfive}{neg2}
\tlink{\colseven}{\rowone}{tensor2}
\neglink{\colnine}{\rowzero}{neg3}
\tlink{\coltwelve}{\rowtwo}{tensor3}
\blanklink{\colthirteen}{\rowone}{I}
\tlink{\coleleven}{\rowfour}{tensor4}
\blanklink{\colten}{\rowthree}{J}
\blanklink{\coleleven}{\hypoth}{hypoth}
\leftdown{neg}{conc}
\nbput[npos=.95]{$(a\tensor d\perp)\perp$}
\rightdown{neg}{tensor}
\naput[npos=.5]{$a\tensor d\perp$}
\leftdiagdown{tensor}{x}
\nbput[npos=.5]{$a$}
\wire{tensor}{neg1}{-45}{180}
\naput[npos=.5]{$d\perp$}
\rightup{neg1}{y}
\nbput[npos=.5]{$d$}
\leftdown{neg2}{y}
\nbput[npos=.5]{$c$}
\wire{neg2}{tensor2}{0}{45}
\naput[npos=.5]{$c\perp$}
\leftdiagup{tensor2}{x}
\naput[npos=.5]{$b$}
\leftup{neg3}{tensor2}
\naput[npos=.9]{$b\tensor c\perp$}
\wire{neg3}{tensor3}{0}{-135}
\naput[npos=.5]{$\!\!(b\tensor c\perp)\perp\!\!\!$}
\rightdiagdown{tensor3}{I}
\naput[npos=.4]{$\tu$}
\rightdiagdown{tensor4}{tensor3}
\naput[npos=.5]{$(b\tensor c\perp)\perp\tensor\tu$}
\leftdiagdown{tensor4}{J}
\nbput[npos=.4]{$\tu$}
\up{tensor4}{hypoth}
\nbput[npos=.85]{$\tu\tensor\big((b\tensor c\perp)\perp\tensor\tu\big)$}
\end{pspicture}
\end{center}
The parse tree relationship is clearer if we (1) abstract away from
the dependency of the distinction between input and output
wires/ports\footnote{Lambek's \emph{covariables} and \emph{variables}:
see page~5 of \cite{BCST96}.} on the up/down direction in the page, by
explicitly orienting the wires from output to input, and (2) change
the $\neg$ label to $\ast$, to match the shape syntax.  For example,
the canonical circuit above (prior to deleting the generators and
thinning links) becomes the circuit below-left,
\begin{center}\vspace{-6ex}\label{vertical-circuit}\footnotesize\psset{xunit=1.1cm,yunit=.5cm}
\newcommand{\blanklink}[3]{\pnode(#1,#2){#3}}
\newcommand{\tulink}[3]{\cnodeput[framesep=1pt](#1,#2){#3}{$\tu$}}
\newcommand{\neglink}[3]{\cnodeput[framesep=1pt](#1,#2){#3}{$\ast$}}
\newcommand{\tlink}[3]{\cnodeput[framesep=1pt](#1,#2){#3}{$\tensor$}}
\newcommand{\boxlink}[4]{\rput(#1,#2){\rnode{#3}{\psframebox[framesep=7pt]{$#4$}}}}
\newcommand{\conc}{3}
\newcommand{\rowone}{5}
\newcommand{\rowtwo}{7.2}
\newcommand{\rowthree}{9.5}
\newcommand{\rowfour}{12}
\newcommand{\rowfive}{14.5}
\newcommand{\rowsix}{16.8}
\newcommand{\rowseven}{19.5}
\newcommand{\roweight}{22}
\newcommand{\rownine}{24.5}
\newcommand{\hypoth}{27}
\newcommand{\colone}{-1}
\newcommand{\coltwo}{2}
\newcommand{\colthree}{4}
\newcommand{\colfour}{6}
\newcommand{\colfive}{9}
\newcommand{\wirevecat}[5]{\nccurve[nodesep=-.2pt,ArrowInside=->,ArrowInsidePos=#5,angleA=#3,angleB=#4]{#1}{#2}}
\newcommand{\wire}[4]{\wirevecat{#1}{#2}{#3}{#4}{.55}}
\newcommand{\down}[2]{\wire{#1}{#2}{-90}{90}}
\newcommand{\up}[2]{\wire{#1}{#2}{90}{-90}}
\newcommand{\upvecat}[3]{\wirevecat{#1}{#2}{90}{-90}{#3}}
\newcommand{\leftdown}[2]{\wire{#1}{#2}{180}{90}}
\newcommand{\rightdown}[2]{\wire{#1}{#2}{0}{90}}
\newcommand{\leftup}[2]{\wire{#1}{#2}{180}{-90}}
\newcommand{\rightup}[2]{\wire{#1}{#2}{0}{-90}}
\newcommand{\leftdiagdown}[2]{\wire{#1}{#2}{-135}{90}}
\newcommand{\rightdiagdown}[2]{\wire{#1}{#2}{-45}{90}}
\newcommand{\leftdiagup}[2]{\wire{#1}{#2}{135}{-90}}
\newcommand{\rightdiagup}[2]{\wire{#1}{#2}{45}{-90}}
\newcommand{\updiagright}[2]{\wire{#1}{#2}{90}{-135}}
\newcommand{\updiagleft}[2]{\wire{#1}{#2}{90}{-45}}
\newcommand{\diagleftdown}[2]{\wire{#1}{#2}{-135}{90}}
\newcommand{\diagrightdown}[2]{\wire{#1}{#2}{-45}{90}}
\begin{pspicture}(2,3)(.3,28)
\psset{xunit=.3cm,yunit=1}
\blanklink{\colthree}{\conc}{conc}
\neglink{\colthree}{\rowone}{neg}
\tlink{\colthree}{\rowtwo}{tensor}
\boxlink{\coltwo}{\rowfour}{x}{x}
\neglink{\colfour}{\rowthree}{neg1}
\boxlink{\colfour}{\rowfour}{y}{y}
\neglink{\colfour}{\rowfive}{neg2}
\tlink{\colthree}{\rowsix}{tensor2}
\neglink{\colthree}{\rowseven}{neg3}
\tulink{\colfive}{\rowseven}{I}
\tlink{\colfour}{\roweight}{tensor3}
\tulink{\colone}{\roweight}{J}
\tlink{\colthree}{\rownine}{tensor4}
\blanklink{\colthree}{\hypoth}{hypoth}
\down{neg}{conc}
\nbput[npos=.8]{$(a\tensor d\perp)\perp$}
\up{neg}{tensor}
\naput[npos=.5]{$a\tensor d\perp$}
\leftdiagup{tensor}{x}
\naput[npos=.5]{$a$}
\rightdiagup{tensor}{neg1}
\nbput[npos=.5]{$d\perp$}
\down{y}{neg1}
\naput[npos=.5]{$d$}
\down{neg2}{y}
\naput[npos=.5]{$c$}
\updiagleft{neg2}{tensor2}
\nbput[npos=.5]{$c\perp$}
\updiagright{x}{tensor2}
\naput[npos=.5]{$b\,$}
\upvecat{tensor2}{neg3}{.38}
\naput[npos=.25]{$b\tensor c\perp\:$}
\ncput[npos=.7]{\ovalnode{j1}{\rule{4pt}{0pt}}}
\diagleftdown{tensor3}{neg3}
\nbput[npos=.5]{$\!\!(b\tensor c\perp)\perp\!\!\!$}
\diagrightdown{tensor3}{I}
\naput[npos=.4]{$\tu$}
\diagrightdown{tensor4}{tensor3}
\naput[npos=.5]{$(b\tensor c\perp)\perp\tensor\tu$}
\diagleftdown{tensor4}{J}
\nbput[npos=.4]{$\tu$}
\down{hypoth}{tensor4}
\nbput[npos=.2]{$\tu\tensor\big((b\tensor c\perp)\perp\tensor\tu\big)$}
\psset{linestyle=dotted}
\nccurve[angleA=-100,angleB=180]{J}{j1}
\nccurve[angleA=-90,angleB=0,ncurv=1]{I}{j1}
\end{pspicture}
\hspace{30ex}
\footnotesize\psset{xunit=1.1cm,yunit=.5cm}
\renewcommand{\boxlink}[4]{\cnodeput[linestyle=none,framesep=2ex](#1,#2){#3}{}}
\begin{pspicture}(2,3)(.3,28)
\psset{xunit=.3cm,yunit=1}
\blanklink{\colthree}{\conc}{conc}
\neglink{\colthree}{\rowone}{neg}
\tlink{\colthree}{\rowtwo}{tensor}
\boxlink{\coltwo}{\rowfour}{x}{x}
\neglink{\colfour}{\rowthree}{neg1}
\boxlink{\colfour}{\rowfour}{y}{y}
\neglink{\colfour}{\rowfive}{neg2}
\tlink{\colthree}{\rowsix}{tensor2}
\neglink{\colthree}{\rowseven}{neg3}
\blanklink{\colfive}{\rowseven}{I}
\tlink{\colfour}{\roweight}{tensor3}
\blanklink{\colone}{\roweight}{J}
\tlink{\colthree}{\rownine}{tensor4}
\blanklink{\colthree}{\hypoth}{hypoth}
\down{neg}{conc}
\up{neg}{tensor}
\leftdiagup{tensor}{x}
\naput[npos=.5]{$a$}
\rightdiagup{tensor}{neg1}
\down{y}{neg1}
\naput[npos=.5]{$d$}
\down{neg2}{y}
\naput[npos=.5]{$c$}
\updiagleft{neg2}{tensor2}
\updiagright{x}{tensor2}
\naput[npos=.5]{$b\,$}
\up{tensor2}{neg3}
\diagleftdown{tensor3}{neg3}
\diagrightdown{tensor3}{I}
\naput[npos=.4]{$\tu$}
\diagrightdown{tensor4}{tensor3}
\diagleftdown{tensor4}{J}
\nbput[npos=.4]{$\tu$}
\down{hypoth}{tensor4}
\end{pspicture}
\end{center}
and deleting the generators $x$ and $y$, the thinning links, and
non-atomic labels more obviously leaves the parse trees of the shapes
$S=\tu\tensor\big((b\tensor c\perp)\perp\tensor\tu\big)$ and
$T=(a\tensor d\perp)\perp$, as shown above-right.
%
Generators and thinning links can then be viewed as the labelled edges
and unlabelled edges of a lax linking $S\to T$.  For example, the
canonical circuit above-left becomes the lax linking
\begin{center}\begin{math}
\begin{array}{c}
\begin{psmatrix}[rowsep=3.3\baselineskip]
\rnode{I1}{\tu}\tensor\big((\,\rnode{b}{b}\:\rnode{t}{\tensor}\:\rnode{c}{c}\perp)\perp\tensor\rnode{I2}{\tu}\,\big) \\[8ex]
(\,\rnode{a}{a}\tensor\rnode{d}{d}\,{}\perp){}\perp
\vecanglespos{I1}{t}{-60}{-120}{.45}
\vecanglespos{I2}{t}{-120}{-60}{.45}
\uvecpos{a}{b}{.53}\naput[npos=.3]{x}
\dvecpos{c}{d}{.6}\naput[npos=.7]{y}
\end{psmatrix}\end{array}
\end{math}\end{center}\vspace{-4ex}
\end{proof}
Say that canonical circuits $C$ and $D$ are \defn{equivalent} if
normal circuits $C'$ and $D'$ representing $C$ and $D$, respectively,
are equivalent (in the sense of \cite{BCST96}).  (Since all normal
circuits representating a canonical circuit are equivalent, this
definition is independent of the choice of $C'$ and $D'$.)
\begin{lemma}\label{equiv-corresponds}
Lax linkings are lax equivalent iff the corresponding canonical
circuits are equivalent.
\end{lemma}
\begin{proof}
By the Empire Rewiring Proposition, Proposition~3.3 on page~28 of
\cite{BCST96}, a thinning link can be moved to any wire in its empire.
Since (by definition) we are only dealing with circuits satisfying the
correctness criterion, such moves correspond to arbitrary retargeting
of edges from negative $\tu$s, between (correct) circuits.
\end{proof}
\begin{lemma}\label{equiv-to-standard}
Every lax linking $S\to T$ is lax equivalent to a standard linking
$S\to T$.
\end{lemma}
\begin{proof}
Using Lemma~\ref{shift-to-leaf} we can re-target all the edges from
negative $\tu$s to target leaves.  Then, suppose an edge from a leaf
$l$ targets a negative leaf $l'$, and suppose the edge from $l'$
targets $l''$.  Shift the edge from $l$ to target $l''$ instead.
Iterating this procedure leads to all edges targeting positive leaves,
yielding a standard linking.
\end{proof}
\begin{proposition}\label{net-bijection}
Nets $S\to T$ in $\netsa$ are in bijection with nets $S\to T$ in
$\netstara$.
\end{proposition}
\begin{proof}
By Lemma~\ref{lax-bijection} every standard linking representing a net
$S\to T$ in $\netsa$ corresponds to a canonical circuit representing a
net $S\to T$ in $\netstara$.  By the Lax Rewiring Lemma
(Lemma~\ref{lax-rewiring}), this yields an injection from nets $S\to
T$ in $\netsa$ to nets $S\to T$ in $\netstara$.  The injection is
surjective since every lax linking is equivalent to a standard
linking, by Lemma~\ref{equiv-to-standard}.
\end{proof}
To obtain an isomorphism between $\netsa$ and $\netstara$, completing
the proof of Proposition~\ref{iso-prop}, we must prove that the homset
bijection of Proposition~\ref{net-bijection} above is functorial.
\begin{lemma}
Suppose $f:S\to T$ and $g:T\to U$ are standard $\A$-linkings.  Let
$\widehat{f}$ and $\widehat{g}$ be normal circuits representing the
canonical circuits corresponding to $f$ and $g$, respectively, by the
bijection in Proposition~\ref{net-bijection}.  Let
$\widehat{f}\cup\widehat{g}$ be the circuit obtained by pasting
$\widehat{f}$ and $\widehat{g}$ at the $T$ wire.  There is a strategy
of reduction and rewiring of thinning links for the circuit
$\widehat{f}\cup\widehat{g}$ leading to a normal circuit
$\widehat{f};\widehat{g}$ of type $S\to U$ whose canonical circuit
corresponds to the composite linking $f;g$ (the composite of $f$ and
$g$ in the category $\linka$, by path composition) by the bijection in
Proposition~\ref{net-bijection}.
\end{lemma}
\begin{proof}
Let $f'$ be the one-sided linking on the two-shape sequent $S\perp,T$
corresponding to $f$, and let $g'$ be the one-sided linking on
$T\perp,U$ corresponding to $g$.  Let $f'\cup g'$ be the disjoint
union of $f'$ and $g'$ on the cut sequent $S\perp,\cutpair{T},U$.  Let
$h'$ be the one-sided linking on $S\perp,U$ corresponding to the
composite two-sided linking $h=f;g$.  Thus $h'$ is the normal form
resulting from cut elimination on $f'\cup g'$.  We shall mimic the cut
elimination steps on $\widehat{f}\cup\widehat{g}$ as reductions mixed
with rewiring of thinning links.

First, perform all $\tensor$ and $(-)\perp$ eliminations on $f'\cup
g'$.  This leaves the same leaf function $f'\cup g'$ on the cut
sequent $S\perp,\cutpair{a_1},\ldots,\cutpair{a_n},U$ where
$a_1,\ldots,a_n$ are the labels of the leaves of $T$.  Since these
eliminations affect only the parse trees of the shapes (and not the
edges of the leaf function), they can be mimicked directly on
$\widehat{f}\cup\widehat{g}$, as the $\tensor$ reduction (page~21 of
\cite{BCST96}) and the tensor unit reduction (page~22 of
\cite{BCST96}).  Let $\widehat{f_0}\cup\widehat{g_0}$ denote the end
result of these reductions.

The normalisation of $f'\cup g'$ on the cut sequent
$S\perp,\cutpair{a_1},\ldots,\cutpair{a_n},U$ finishes with atomic
eliminations.  (See the definition of atomic elimination on
page~\pageref{atom-cut} for discrete $\A$, and its generalisation to
an arbitrary category $\A$ towards the end of Section~\ref{arb}.)
These atomic eliminations have one of two forms: reduction of (a) a
cut pair $\cutpair{\tu}$ or (b) a cut pair $\cutpair{a}$ for $a$ an
object of $\A$.

Consider (a).  Let $l_1,\ldots, l_n$ be the leaves having an edge to
the left $\tu$ of $\cutpair{\tu}$ and let $l$ be the target of the
edge from the right $\tu$ of $\cutpair{\tu}$.  Thus elimination
deletes $\cutpair{\tu}$ and moves the edges from $l_i$ to target $l$.
In the circuit we have the corresponding redex:
\newcommand{\localsettings}{\newcommand{\blanktop}{17}
\newcommand{\cdotsy}{13}
\newcommand{\lefti}{-3}
\newcommand{\righti}{3}
\newcommand{\topi}{15}
\newcommand{\boti}{8}
\newcommand{\barbellx}{10}
\newcommand{\wirex}{15}
\newcommand{\wiretop}{9}
\newcommand{\wirebot}{0}}
\begin{center}\footnotesize\psset{xunit=1.1cm,yunit=.5cm}
\newcommand{\blanklink}[3]{\pnode(#1,#2){#3}}
\newcommand{\tulink}[3]{\cnodeput[framesep=1pt](#1,#2){#3}{$\tu$}}
\newcommand{\wire}[4]{\nccurve[nodesep=-.2pt,angleA=#3,angleB=#4]{#1}{#2}}
\newcommand{\down}[2]{\wire{#1}{#2}{-90}{90}}
\localsettings
\begin{pspicture}(3,0)(0,6.5)
\psset{xunit=.3cm,yunit=.4}
\blanklink{\lefti}{\blanktop}{blank1}
\blanklink{\righti}{\blanktop}{blank2}
\tulink{\lefti}{\cdotsy}{i1}
\tulink{\righti}{\cdotsy}{i2}
\down{blank1}{i1}
\down{blank2}{i2}
\ncline[linestyle=none]{i1}{i2}
\ncput{$\cdots$}
\tulink{\barbellx}{\topi}{j1}
\tulink{\barbellx}{\boti}{j2}
\down{j1}{j2}
\ncput[npos=.33]{\ovalnode{loop1}{\rule{4pt}{0pt}}}
\ncput[npos=.66]{\ovalnode{loop2}{\rule{4pt}{0pt}}}
\blanklink{\wirex}{\wiretop}{w1}
\blanklink{\wirex}{\wirebot}{w2}
\down{w1}{w2}
\ncput[npos=.5]{\ovalnode{loop3}{\rule{4pt}{0pt}}}
\naput[npos=.1]{$a$}
\psset{linestyle=dotted}
\nccurve[angleA=-90,angleB=180]{i1}{loop2}
\nccurve[angleA=-90,angleB=180]{i2}{loop1}
\nccurve[angleA=-90,angleB=180]{j2}{loop3}
\end{pspicture}
\end{center}
where the two left $\tu$-nodes tied by the ellipsis represent $n$
$\tu$-nodes corresponding to the leaves $l_1,\dots,l_n$, the highest
$\tu$-node corresponds to the left $\tu$ of $\cutpair{\tu}$, the
lowest $\tu$-node corresponds to the right $\tu$ of $\cutpair{\tu}$,
and $a$ is the label of $l$ (either $a=\tu$ or $a$ is an objet of
$\A$).  Rewire the $n$ thinning links on the left to the $a$-wire:
\begin{center}\footnotesize\psset{xunit=1.1cm,yunit=.5cm}
\newcommand{\blanklink}[3]{\pnode(#1,#2){#3}}
\newcommand{\tulink}[3]{\cnodeput[framesep=1pt](#1,#2){#3}{$\tu$}}
\newcommand{\wire}[4]{\nccurve[nodesep=-.2pt,angleA=#3,angleB=#4]{#1}{#2}}
\newcommand{\down}[2]{\wire{#1}{#2}{-90}{90}}
\localsettings
\begin{pspicture}(3,0)(0,6.5)
\psset{xunit=.3cm,yunit=.4}
\blanklink{\lefti}{\blanktop}{blank1}
\blanklink{\righti}{\blanktop}{blank2}
\tulink{\lefti}{\cdotsy}{i1}
\tulink{\righti}{\cdotsy}{i2}
\down{blank1}{i1}
\down{blank2}{i2}
\ncline[linestyle=none]{i1}{i2}
\ncput{$\cdots$}
\tulink{\barbellx}{\topi}{j1}
\tulink{\barbellx}{\boti}{j2}
\down{j1}{j2}
\blanklink{\wirex}{\wiretop}{w1}
\blanklink{\wirex}{\wirebot}{w2}
\down{w1}{w2}
\ncput[npos=.3]{\ovalnode{loop3}{\rule{4pt}{0pt}}}
\ncput[npos=.55]{\ovalnode{loop1}{\rule{4pt}{0pt}}}
\ncput[npos=.8]{\ovalnode{loop2}{\rule{4pt}{0pt}}}
\naput[npos=.1]{$a$}
\psset{linestyle=dotted}
\nccurve[angleA=-90,angleB=180]{i1}{loop2}
\nccurve[angleA=-90,angleB=180]{i2}{loop1}
\nccurve[angleA=-90,angleB=180]{j2}{loop3}
\end{pspicture}
\end{center}
then reduce the $\tu$-node redex:
\begin{center}\footnotesize\psset{xunit=1.1cm,yunit=.5cm}
\newcommand{\blanklink}[3]{\pnode(#1,#2){#3}}
\newcommand{\tulink}[3]{\cnodeput[framesep=1pt](#1,#2){#3}{$\tu$}}
\newcommand{\wire}[4]{\nccurve[nodesep=-.2pt,angleA=#3,angleB=#4]{#1}{#2}}
\newcommand{\down}[2]{\wire{#1}{#2}{-90}{90}}
\localsettings
\begin{pspicture}(3,0)(0,6.5)
\psset{xunit=.3cm,yunit=.4}
\blanklink{\lefti}{\blanktop}{blank1}
\blanklink{\righti}{\blanktop}{blank2}
\tulink{\lefti}{\cdotsy}{i1}
\tulink{\righti}{\cdotsy}{i2}
\down{blank1}{i1}
\down{blank2}{i2}
\ncline[linestyle=none]{i1}{i2}
\ncput{$\cdots$}
\blanklink{\wirex}{\wiretop}{w1}
\blanklink{\wirex}{\wirebot}{w2}
\down{w1}{w2}
\ncput[npos=.55]{\ovalnode{loop1}{\rule{4pt}{0pt}}}
\ncput[npos=.8]{\ovalnode{loop2}{\rule{4pt}{0pt}}}
\naput[npos=.1]{$a$}
\psset{linestyle=dotted}
\nccurve[angleA=-90,angleB=180]{i1}{loop2}
\nccurve[angleA=-90,angleB=180]{i2}{loop1}
\end{pspicture}
\end{center}
Case (b) is similar.  The circuit has a corresponding redex
\begin{center}\footnotesize\psset{xunit=1.1cm,yunit=.5cm}
\newcommand{\blanklink}[3]{\pnode(#1,#2){#3}}
\newcommand{\tulink}[3]{\cnodeput[framesep=1pt](#1,#2){#3}{$\tu$}}
\newcommand{\boxlink}[4]{\rput(#1,#2){\rnode{#3}{\psframebox[framesep=7pt]{$#4$}}}}
\newcommand{\wire}[4]{\nccurve[nodesep=-.2pt,angleA=#3,angleB=#4]{#1}{#2}}
\newcommand{\down}[2]{\wire{#1}{#2}{-90}{90}}
\localsettings
\renewcommand{\topi}{15.5}
\renewcommand{\boti}{7}
\newcommand{\boxtop}{19.5}
\newcommand{\boxbot}{3}
\begin{pspicture}(3,0)(0,7.5)
\psset{xunit=.3cm,yunit=.4}
\blanklink{\lefti}{\blanktop}{blank1}
\blanklink{\righti}{\blanktop}{blank2}
\tulink{\lefti}{\cdotsy}{i1}
\tulink{\righti}{\cdotsy}{i2}
\down{blank1}{i1}
\down{blank2}{i2}
\ncline[linestyle=none]{i1}{i2}
\ncput{$\cdots$}
\blanklink{\barbellx}{\boxtop}{boxtop}
\boxlink{\barbellx}{\topi}{j1}{x}
\boxlink{\barbellx}{\boti}{j2}{y}
\blanklink{\barbellx}{\boxbot}{boxbot}
\down{boxtop}{j1}
\naput{$b$}
\down{j1}{j2}
\naput{$\;\;c$}
\ncput[npos=.33]{\ovalnode{loop1}{\rule{4pt}{0pt}}}
\ncput[npos=.66]{\ovalnode{loop2}{\rule{4pt}{0pt}}}
\down{j2}{boxbot}
\naput{$d$}
\blanklink{\wirex}{\wiretop}{w1}
\blanklink{\wirex}{\wirebot}{w2}
\down{w1}{w2}
\naput[npos=.1]{$a$}
\psset{linestyle=dotted}
\nccurve[angleA=-90,angleB=180]{i1}{loop2}
\nccurve[angleA=-90,angleB=180]{i2}{loop1}
\end{pspicture}
\end{center}
where $x:b\to c$ and $y:c\to d$ are morphisms in $\A$.  First shift
the thinning links as before,
\begin{center}\footnotesize\psset{xunit=1.1cm,yunit=.5cm}
\newcommand{\blanklink}[3]{\pnode(#1,#2){#3}}
\newcommand{\tulink}[3]{\cnodeput[framesep=1pt](#1,#2){#3}{$\tu$}}
\newcommand{\boxlink}[4]{\rput(#1,#2){\rnode{#3}{\psframebox[framesep=7pt]{$#4$}}}}
\newcommand{\wire}[4]{\nccurve[nodesep=-.2pt,angleA=#3,angleB=#4]{#1}{#2}}
\newcommand{\down}[2]{\wire{#1}{#2}{-90}{90}}
\localsettings
\renewcommand{\topi}{15.5}
\renewcommand{\boti}{7}
\newcommand{\boxtop}{19.5}
\newcommand{\boxbot}{3}
\begin{pspicture}(3,0)(0,7.5)
\psset{xunit=.3cm,yunit=.4}
\blanklink{\lefti}{\blanktop}{blank1}
\blanklink{\righti}{\blanktop}{blank2}
\tulink{\lefti}{\cdotsy}{i1}
\tulink{\righti}{\cdotsy}{i2}
\down{blank1}{i1}
\down{blank2}{i2}
\ncline[linestyle=none]{i1}{i2}
\ncput{$\cdots$}
\blanklink{\barbellx}{\boxtop}{boxtop}
\boxlink{\barbellx}{\topi}{j1}{x}
\boxlink{\barbellx}{\boti}{j2}{y}
\blanklink{\barbellx}{\boxbot}{boxbot}
\down{boxtop}{j1}
\naput{$b$}
\down{j1}{j2}
\naput{$c$}
\down{j2}{boxbot}
\naput{$d$}
\blanklink{\wirex}{\wiretop}{w1}
\blanklink{\wirex}{\wirebot}{w2}
\down{w1}{w2}
\naput[npos=.1]{$a$}
\ncput[npos=.4]{\ovalnode{loop1}{\rule{4pt}{0pt}}}
\ncput[npos=.7]{\ovalnode{loop2}{\rule{4pt}{0pt}}}
\psset{linestyle=dotted}
\nccurve[angleA=-65,angleB=-140]{i1}{loop2}
\nccurve[angleA=-70,angleB=-140,ncurv=1.1]{i2}{loop1}
\end{pspicture}
\end{center}
then reduce:
\begin{center}\footnotesize\psset{xunit=1.1cm,yunit=.5cm}
\newcommand{\blanklink}[3]{\pnode(#1,#2){#3}}
\newcommand{\tulink}[3]{\cnodeput[framesep=1pt](#1,#2){#3}{$\tu$}}
\newcommand{\boxlink}[4]{\rput(#1,#2){\rnode{#3}{\psframebox[framesep=7pt]{$#4$}}}}
\newcommand{\wire}[4]{\nccurve[nodesep=-.2pt,angleA=#3,angleB=#4]{#1}{#2}}
\newcommand{\down}[2]{\wire{#1}{#2}{-90}{90}}
\localsettings
\renewcommand{\topi}{15.5}
\renewcommand{\boti}{7}
\newcommand{\midi}{11.25}
\newcommand{\boxtop}{19.5}
\newcommand{\boxbot}{3}
\begin{pspicture}(3,0)(0,7.5)
\psset{xunit=.3cm,yunit=.4}
\blanklink{\lefti}{\blanktop}{blank1}
\blanklink{\righti}{\blanktop}{blank2}
\tulink{\lefti}{\cdotsy}{i1}
\tulink{\righti}{\cdotsy}{i2}
\down{blank1}{i1}
\down{blank2}{i2}
\ncline[linestyle=none]{i1}{i2}
\ncput{$\cdots$}
\blanklink{\barbellx}{\boxtop}{boxtop}
\boxlink{\barbellx}{\midi}{yx}{yx}
\blanklink{\barbellx}{\boxbot}{boxbot}
\down{boxtop}{yx}
\naput{$b$}
\down{yx}{boxbot}
\naput{$d$}
\blanklink{\wirex}{\wiretop}{w1}
\blanklink{\wirex}{\wirebot}{w2}
\down{w1}{w2}
\naput[npos=.1]{$a$}
\ncput[npos=.4]{\ovalnode{loop1}{\rule{4pt}{0pt}}}
\ncput[npos=.7]{\ovalnode{loop2}{\rule{4pt}{0pt}}}
\psset{linestyle=dotted}
\nccurve[angleA=-65,angleB=-140]{i1}{loop2}
\nccurve[angleA=-70,angleB=-140,ncurv=1.1]{i2}{loop1}
\end{pspicture}
\end{center}
where $yx:b\to d$ is the composite of the morphisms $x:b\to c$ and
$y:c\to d$ in $\A$.

Since the elimination steps are mimicked precisely, the resulting
normal circuit $\widehat{f};\widehat{g}$, modulo the order of
attachments of thinning links along the same wire (\ie, the canonical
circuit represented by $\widehat{f};\widehat{g}$), corresponds to the
normal one-sided linking $h'$, hence the composite two-sided linking
$h=f;g$.
\end{proof}
\begin{corollary}
Let $f$ and $g$ be nets in $\netsa$ corresponding to the nets
$\widehat{f}$ and $\widehat{g}$ in $\netstara$, by the bijection in
Proposition~\ref{iso-prop}.  Then the composite $f;g$ in $\netsa$
corresponds to the composite $\widehat{f};\widehat{g}$ in $\netstara$.
\end{corollary}
In other words, we have one half of the desired functoriality: if $F$
is the homset bijection defined in Proposition~\ref{iso-prop}, then
$F(f);F(g)=F(f;g)$.  Finally, $F(\id)=\id$ since both the identity
linking and the identity circuit $S\to S$ amount to dual copies of the
parse tree $S$.  This completes the proof of the Freeness Theorem:
$\netsa$ is the free star-autonomous category generated by $\A$.


\section{The rewiring approach}\label{approach}

This paper follows an approach which can be traced back to Todd
Trimble's Ph.D.{} thesis \cite{Tri94}\footnote{Copies of Trimble's
thesis \cite{Tri94} are not particularly easy to come by.  See
\cite[\S1,\,\S3.2]{BCST96} and \cite[\S3]{CS97} for overviews of some
of the content.}, which we call the \emph{rewiring approach}:
\begin{itemize}
\myitem{a} represent a morphism by a structure involving attachments (`wiring') of
negative units\footnote{For history and development of the attachment
of negative units in linear logic, see
\cite{Dan90,Reg92,GSS92,Gir93,Gir96}.};
\myitem{b} quotient by rewiring: identify correct structures which differ by just 
one such attachment.
\end{itemize}
It is the fourth paper to use the rewiring approach to construct free
star-autonomous categories.  We detail the chronological sequence
below.  A summary is given in Table~\ref{approach-table} (details below).
\begin{table}\footnotesize\newcommand{\cell}[2]{\parbox{#2in}{\center #1}}
\newcommand{\cellone}[1]{\cell{\bf#1}{.45}}
\newcommand{\celltwo}[1]{\cell{#1}{1.33}}
\newcommand{\cellthree}[1]{\cell{#1}{.6}}
\newcommand{\cellfour}[1]{\cell{#1}{.9}}
\newcommand{\cellfive}[1]{\cell{#1}{.8}}
\newcommand{\cellsix}[1]{\cell{#1}{.8}}
\setlength{\doublerulesep}{\arrayrulewidth}
\begin{tabular}{|c|||c|c|c|c|c|}
\hline
& \celltwo{\bf\textsl{Structure}} &
\cellthree{\bf\textsl{\hspace*{-2.12315pt}Attachment of negative
unit}} & 
\cellfour{\bf\textsl{Correctness / allowability}} & 
\cellfive{\bf\textsl{Rewiring of attachments, between correct structures}}
&\cellsix{\bf\textsl{Problem with composition / normalisation}}
\\&&&&&\\\hline\hline\hline
\cellone{\makebox{\hspace*{-1ex}\cite{BCST96}\hspace*{-1ex}}} & \celltwo{Circuit diagram\\[1ex] (proof net in tensor calculus style)} &
\cellthree{Thinning link (dotted edge)} &
\cellfour{Standard proof\\ net criterion\\[1ex]\scriptsize (\mbox{sequentialisability} / contractibility for planar case)} & 
\cellfive{Surgery rules / re-target thinning link (by \cite[Prop.\,3.3]{BCST96})} 
& \cellsix{Attachments can block cut redexes}
\\&&&&&\\\hline
\cellone{\cite{KO99}} & 
\celltwo{$\lambda\mu$-style term, \eg{} \footnotesize$(\mathbf{\lambda}\beta^{A\multimap\bot}.\langle\beta\rangle z^A)\;\;\;\;\;\;$ $\;\;\;\;\;\;\;\{\mu
\alpha^{A\multimap\bot}.\langle\gamma\rangle\alpha/z\}$\!\!\!\!\!\!\!\!} &
\cellthree{Unit let term constructor $\langle x/\ast\rangle(-)$} &
\cellfour{Typability\\ (\ie, sequential\-isability)} &
\cellfive{$\pi$-congruence rule, $\:\Gamma\vdash C[\langle x/\ast\rangle t]\sim\langle x/\ast\rangle C[t] : A$}
& \cellsix{normalisation confluent only modulo rewiring / congruence}
\\&&&&&\\\hline
\cellone{\cite{LS04}} & 
\celltwo{MLL formula sharing sequent leaves, with permutation, \eg\\
\footnotesize\mbox{\hspace{-1ex}$\bot_1\tighttensor((a_2\tighttensor a\perp_4)\footnoteparr(\bot_3\tighttensor \tu_5))$\hspace{-.8ex}} \mbox{\normalsize$\triangleright$} $\;\;\;\bot\footnoteparr a,(\bot\tighttensor a\perp)\footnoteparr \tu$} &
\cellthree{Formula constructor $(-)\tensor\bot$} &
\cellfour{Standard proof\\ net criterion} &
\cellfive{Formula rewrite
$Q\footnoteparr (R\tensor\bot)\leftrightarrow (Q\footnoteparr
R)\tensor\bot$}
& \cellsix{Attachments can block cut redexes}
\\&&&&&\\\hline
\cellone{This paper} & \celltwo{Leaf function} & \cellthree{Edge\\ from $\tu$} &
\cellfour{Standard proof\\ net criterion} & 
\cellfive{Re-target edge from $\tu$} &
\cellsix{}
\\&&&&&\\\hline
\end{tabular}
\caption{\label{approach-table}The present paper is the fourth to construct
free star-autonomous categories using the \emph{`rewiring approach}',
which can be traced back to Trimble's thesis \cite{Tri94}: (a)
represent a morphism by a structure involving attachments (`wiring')
of negative units, (b) quotient by rewiring, that is, identify correct
structures which differ by just one such attachment.
(See main text for details.)
In each case a morphism of the free category is a finite equivalence
class, hence equality of morphisms is decidable.}\vspace*{1ex}
\end{table}

In \cite{BCST96} structures are circuit diagrams (in tensor calculus
style \cite{JS91}), attachments are (dotted) edges from negative
units, called thinning links, correctness is the standard
multiplicative proof net criterion\footnote{Sequentialisability /
contractibility \cite{Dan90} is used to deal with the planar case; see
Section~2.7 of \cite{BCST96}.}, and rewiring between correct
structures is expressed in rules of surgery on circuits, which (by the
empire rewiring Proposition~3.3 of \cite{BCST96}) permit an arbitrary
re-targeting of a thinning link between correct
circuits\footnote{Decomposing rewiring into shorter steps aids the
proof of characterisation of free linearly distributive and
star-autonomous categories.}.
Equivalence classes yield the free linearly distributive category and
free star-autonomous category (linearly distributive category with
negation) generated by a polygraph (\eg, by a category), for full
coherence.

In \cite{KO99} structures are $\lambda\mu$-style terms \cite{Par92}
with explicit substitution $\{-/-\}$, for example
$(\mathbf{\lambda}\beta^{A\multimap\bot}.\langle\beta\rangle z^A)\{\mu
\alpha^{A\multimap\bot}.\langle\gamma\rangle\alpha/z\}$\:, attachments are unit let
constructs $\langle x/\ast\rangle(-)$, correctness is inductive
(typability, \ie\ sequentialisability) and rewiring is by an instance
of the $\pi$-congruence rule, $\:\Gamma\vdash C[\langle x/\ast\rangle
t]\sim\langle x/\ast\rangle C[t] : A$\:.
Equivalence (congruence) classes yield an internal language
for autonomous and star-autonomous categories, for full coherence.

In \cite{LS04} the structure is a syntactic\footnote{Axiom links
$a\tensor a^\bot$ and attachments of negative units $(-)\tensor\bot$
are syntactic, enveloped in a formula sharing the leaves of the
sequent. In conventional proof nets \cite{Gir96}, axiom links and unit
attachments ($\bot$-jumps) are edges.}
proof net, a formula of multiplicative linear logic equipped with a
leaf permutation, \eg\
\mbox{\:$\bot_1\tighttensor((a_2\tighttensor
a\perp_4)\parr(\bot_3\tighttensor \tu_5))$}\:
\mbox{\large$\triangleright$}\:$\bot\parr
a,(\bot\tighttensor a\perp)\parr \tu\;$ is a structure representing a
morphism $\tu\tensor a\perp\to (\bot\tensor a\perp)\parr I$, the
formula constructor $(-)\tensor\bot$ attaches negative units,
correctness is again the standard multiplicative proof net criterion,
and rewiring is by the invertible linear distributivity rewrite
$Q\parr (R\tensor\bot)\leftrightarrow (Q\parr R)\tensor\bot$\:.
Equivalence classes yield the free star-autonomous category with strict
double involution\footnote{The canonical map $A\perpp\to A$ is the
identity.  Up to equivalence this is a free star-autonomous category,
in a strict sense \cite{CHS05}.} generated by a set, for full
coherence.


\parag{Future work}  

Perhaps the most direct redeployment of Trimble rewiring is
\cite{MO03}, since it is for autonomous\footnote{\Ie\ (symmetric monoidal) closed.}
categories, the original case treated in
\cite{Tri94}.\footnote{The
definition of $\sim$ in Section~9 of \cite{MO03} is precisely Trimble
rewiring: two (correct) structures (strategies / linkages /
generating functions) are identified if they differ by the attachment
of just one negative unit (there called a joker move).
Syntactically (see the discussion before Proposition~45 of
\cite{MO03}), Trimble rewiring here corresponds to that in
\cite{KO99}: $\pi$-congruence with the unit let construct,
$\:\Gamma\vdash C[\langle x/\ast\rangle t]\sim\langle x/\ast\rangle
C[t] : A$\:.}
Hybridising the present paper on star-autonomous categories with the
extension of Lamarche's essential nets \cite{Lam94} in \cite{MO03}
should yield a simple presentation of free autonomous
categories: objects are autonomous shapes (generated by $\tensor$,
$\multimap$, $\tu$ and $\bot$, \eg\ $(a\tensor \tu)\multimap\bot$), a
morphism is a leaf function satisfying Lamarche's criterion, modulo
Trimble rewiring, and composition is simply path composition.

Path composition would constitute a \emph{direct} composition of
generating functions, bypassing the complexities
of strategies (O-orientation, shortsightedness, non-determinism,
conditional exhaustion, \etc) for a more economical description of
the free autonomous category.
Furthermore, the approach would extend immediately to the free
autonomous category generated by an arbitrary category $\A$, not just
a set $\A$ (as in \cite{MO03}), by labelling edges with morphisms of
$\A$ (as in the present paper for star-autonomous categories).
In summary, this path composition approach would abstract away from
the intricacies of the strategies, extracting the essence: a geometry
of interaction of generating functions in $\intsetp$.



\small
\bibliographystyle{alpha}
\begin{thebibliography}{BCST96}

\bibitem[Abr96]{Abr96}
S.~Abramsky.
\newblock Retracing some paths in process algebra.
\newblock In {\em Proc.\ CONCUR '96}, pages 1--17, 1996.

\bibitem[Bar79]{Bar79}
M.~Barr.
\newblock {\em {$*$-A}utonomous categories}, volume 752 of {\em Lecture Notes
  in Mathematics}.
\newblock Springer-Verlag, 1979.

\bibitem[BCST96]{BCST96}
R.~F. Blute, J.\ R.~B. Cockett, R.~A.~G. Seely, and T.~H. Trimble.
\newblock Natural deduction and coherence for weakly distributive categories.
\newblock {\em Journal of Pure and Applied Algebra}, 113:229--296, 1996.

\bibitem[Blu93]{Blu93}
R.~F. Blute.
\newblock Linear logic, coherence and dinaturality.
\newblock {\em Theor.\ Comp.\ Sci.}, 115:3--41, 1993.

\bibitem[Bol02]{Bol02}
B.~Bollob{\'a}s.
\newblock {\em Modern Graph Theory}.
\newblock Springer-Verlag, 2002.

\bibitem[CHS05]{CHS05}
J.~R.~B. Cockett, M.~Hasegawa, and R.~A.~G. Seely.
\newblock Coherence of the double involution on \mbox{*-aut}onomous categories.
\newblock {\em Theory and Applications of Categories}, 2005.
\newblock To appear.

\bibitem[CS97]{CS97}
J.~R.~B. Cockett and R.~A.~G. Seely.
\newblock Proof theory for full intuitionistic linear logic, bilinear logic,
  and {\small mix} categories.
\newblock {\em Theory and Applications of Categories}, 3(5):85--131, 1997.

\bibitem[Dan90]{Dan90}
V.~Danos.
\newblock {\em La logique lin{\'e}aire appliqu{\'e}e {\`a} l'{\'e}tude de
  divers processus de normalisation et principalement du lambda calcul}.
\newblock PhD thesis, Univ.\ de Paris, 1990.

\bibitem[DR89]{DR89}
V.~Danos and L.~Regnier.
\newblock The structure of multiplicatives.
\newblock {\em Archive for Mathematical Logic}, 28:181--203, 1989.

\bibitem[EK66]{EK66}
S.~Eilenberg and G.~M. Kelly.
\newblock A generalization of the functorial calculus.
\newblock {\em J.\ Algebra}, 3:366--375, 1966.

\bibitem[Gir87]{Gir87}
J.-Y. Girard.
\newblock Linear logic.
\newblock {\em Theoretical Computer Science}, 50:1--102, 1987.

\bibitem[Gir89]{Gir89}
J.-Y. Girard.
\newblock Towards a geometry of interaction.
\newblock In {\em Categories in Computer Science and Logic}, volume~92 of {\em
  Contemporary Mathematics}, pages 69--108, 1989.
\newblock Proc.\ of June 1987 meeting in Boulder, Colorado.

\bibitem[Gir93]{Gir93}
J.-Y. Girard.
\newblock Linear logic: A survey.
\newblock {\em Proceedings of the International Summer School of Marktoberdorf,
  NATO Advanced Science Institutes, series F94}, pages 63--112, 1993.
\newblock Also in P.\ De Groote editor, The Curry-Howard Isomorphism, 193--255,
  D{\'e}partement de Philosophie, Universit{\'e} Catholique de Louvain, Cahiers
  du Centre de Logique 8, Academia Press.

\bibitem[Gir96]{Gir96}
J.-Y. Girard.
\newblock Proof-nets: the parallel syntax for proof theory.
\newblock In {\em Logic and Algebra}, volume 180 of {\em Lecture Notes In Pure
  and Applied Mathematics}. Marcel Dekker, New York, 1996.

\bibitem[GSS92]{GSS92}
J.-Y. Girard, A.~Scedrov, and P.~J. Scott.
\newblock Bounded linear logic: {A} modular approach to polynomial time
  computability.
\newblock {\em Theor.\ Comp.\ Sci.}, 97:1--66, 1992.

\bibitem[Gue99]{Gue99}
S.~Guerrini.
\newblock Correctness of multiplicative proof nets is linear.
\newblock In {\em Proc.\ Logic in Computer Science '99}, 1999.

\bibitem[HHS05]{HHS05}
R.~Houston, D.~J.~D. Hughes and A. Schalk.,
\newblock Modelling linear logic without units (preliminary result).
\newblock http://arxiv.org/abs/math.CT/0504037\,, April 2005.

\bibitem[Hug05]{Hug05}
D.~J.~D. Hughes.
\newblock Simple multiplicative proof nets with units.\\
\newblock http://arxiv.org/abs/math.CT/0507003\,.  Submitted for publication, March 2005.

\bibitem[JS91]{JS91}
A.~Joyal and R.~Street.
\newblock The geometry of tensor calculus {I}.
\newblock {\em Adv.\ Math.}, 88:55--112, 1991.

\bibitem[JS93]{JS93}
A.~Joyal and R.~Street.
\newblock Braided tensor categories.
\newblock {\em Adv.\ Math.}, 102(1):20--78, 1993.

\bibitem[JSV96]{JSV96}
A.~Joyal, R.~Street, and D.~Verity.
\newblock Traced monoidal categories.
\newblock {\em Math.\ Proc.\ Camb.\ Phil.\ Soc.}, 119:447--468, 1996.

\bibitem[Kel64]{Kel64}
G.~M. Kelly.
\newblock On Mac Lane's conditions for coherence of natural associativities, commutativities, etc.
\newblock {\em J. Algebra}, 1:397--402, 1964.

\bibitem[KL80]{KL80}
G.~M. Kelly and M.~L. Laplaza.
\newblock Coherence for compact closed categories.
\newblock {\em J.\ Pure and Applied Algebra}, 19:193--213, 1980.

\bibitem[KM71]{KM71}
G.~M. Kelly and S.~Mac{ }Lane.
\newblock Coherence in closed categories.
\newblock {\em J.\ Pure and Applied Algebra}, 1:97--140, 1971.

\bibitem[KO99]{KO99}
T.~W. Koh and C.-H.~L. Ong.
\newblock Explicit substitution internal languages for autonomous and
  \mbox{*-au}\-tonomous categories (preliminary version).
\newblock In {\em Proceedings of the 8th Conference on Category Theory and
  Computer Science, Edinburgh, September 1999, Electronic Notes in Theoreotical
  Computer Science}, volume~29, 1999.

\bibitem[Lam94]{Lam94}
F.~Lamarche.
\newblock Proof nets for intuitionistic linear logic {I}: {E}ssential nets.
\newblock Unpublished note, 1994.

\bibitem[LS04]{LS04}
F.~Lamarche and L.~Stra{\ss}burger.
\newblock On proof nets for multiplicative linear logic with units.
\newblock In {\em Proc.\ CSL'04}, volume 3210 of {\em Lecture Notes in Computer
  Science}, pages 145--159, 2004.

\bibitem[Mac71]{Mac71}
S.~Mac Lane.
\newblock {\em Categories for the Working Mathematician}.
\newblock Springer-Verlag", 1971.

\bibitem[MO00]{MO00}
A.~S. Murawski and C.-H.~L. Ong.
\newblock Dominator trees and fast verification of proof nets.
\newblock In {\em Proc.\ Logic in Computer Science '00}, 2000.

\bibitem[MO03]{MO03}
A.~S. Murawski and C.-H.~L. Ong.
\newblock Exhausting strategies, joker games and full completeness for {IMLL}
  with unit.
\newblock {\em Theor.\ Comp.\ Sci.}, 294:269--305, 2003.

\bibitem[Par92]{Par92}
M.~Parigot.
\newblock $\lambda\mu$-calculus: an algorithmic interpretation of classical
  natural deduction.
\newblock In {\em Proc.\ Int.\ Conf.\ Logic Prog.\ Automated Reasoning}, volume
  624 of {\em Lecture Notes in Computer Science}, pages 190--201. Springer,
  1992.

\bibitem[Reg92]{Reg92}
L.~Regnier.
\newblock {\em Lambda-Calcul et R{\`e}seaux}.
\newblock PhD thesis, Univ.\ Paris VII, 1992.

\bibitem[Tri94]{Tri94}
T.~H. Trimble.
\newblock {\em Linear logic, bimodules, and full coherence for autonomous
  categories}.
\newblock PhD thesis, Rutgers University, 1994.

\end{thebibliography}

\end{document}

xkeyval.tex
%%
%% This is file `xkeyval.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% xkeyval.dtx  (with options: `tex')
%% 
%% ---------------------------------------
%% Copyright (C) 2004-2005 Hendri Adriaens
%% ---------------------------------------
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version.
%% The latest version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.3 or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
%%
%% This work has the LPPL maintenance status "maintained".
%%
%% This Current Maintainer of this work is Hendri Adriaens.
%%
%% This work consists of the files xkeyval.dtx and pst-xkey.dtx and
%% the from xkeyval.dtx derived files keyval.tex, xkvtxhdr.tex,
%% xkeyval.sty, xkeyval.tex, xkvview.sty, xkvltxp.sty, xkveca.cls,
%% xkvecb.cls, xkvesa.sty, xkvesb.sty, xkvesc.sty, xkvex1.tex,
%% xkvex2.tex, xkvex3.tex and xkvex4.tex and the from pst-xkey.dtx
%% derived files pst-xkey.sty and pst-xkey.tex.
%%
%% The following files constitute the xkeyval bundle and must be
%% distributed as a whole: readme, pst-xkey.pdf, xkeyval.pdf, keyval.tex,
%% pst-xkey.sty, pst-xkey.tex, xkeyval.sty, xkeyval.tex, xkvview.sty,
%% xkvltxp.sty, xkvtxhdr.tex, pst-xkey.dtx and xkeyval.dtx.
%%
\csname XKeyValLoaded\endcsname
\let\XKeyValLoaded\endinput
\edef\XKVcatcodes{%
  \catcode`\noexpand\@\the\catcode`\@\relax
  \catcode`\noexpand\=\the\catcode`\=\relax
  \catcode`\noexpand\,\the\catcode`\,\relax
  \catcode`\noexpand\:\the\catcode`\:\relax
  \let\noexpand\XKVcatcodes\relax
}
\catcode`\@11\relax
\catcode`\=12\relax
\catcode`\,12\relax
\catcode`\:12\relax
\newtoks\XKV@toks
\newcount\XKV@depth
\newif\ifXKV@st
\newif\ifXKV@sg
\newif\ifXKV@pl
\newif\ifXKV@knf
\newif\ifXKV@rkv
\newif\ifXKV@inpox
\let\XKV@rm\@empty
\ifx\ProvidesFile\@undefined
  \message{2005/02/14 v2.2 key=value parser (HA)}
  \input xkvtxhdr
\else
  \ProvidesFile{xkeyval.tex}[2005/02/14 v2.2 key=value parser (HA)]
  \@addtofilelist{xkeyval.tex}
\fi
\long\def\@firstoftwo#1#2{#1}
\long\def\@secondoftwo#1#2{#2}
\long\def\XKV@afterfi#1\fi{\fi#1}
\long\def\XKV@afterelsefi#1\else#2\fi{\fi#1}
\ifx\ifcsname\@undefined\XKV@afterelsefi
  \def\XKV@ifundefined#1{%
    \begingroup\expandafter\expandafter\expandafter\endgroup
      \expandafter\ifx\csname#1\endcsname\relax
      \expandafter\@firstoftwo
    \else
      \expandafter\@secondoftwo
    \fi
  }
\else
  \def\XKV@ifundefined#1{%
    \ifcsname#1\endcsname
      \expandafter\@secondoftwo
    \else
      \expandafter\@firstoftwo
    \fi
  }
\fi
\XKV@ifundefined{ver@keyval.sty}{
  \input keyval
  \expandafter\def\csname ver@keyval.sty\endcsname{1999/03/16}
}{}
\long\def\@ifnextcharacter#1#2#3{%
  \@ifnextchar\bgroup
  {\@ifnextchar{#1}{#2}{#3}}%
  {\@ifncharacter{#1}{#2}{#3}}%
}
\long\def\@ifncharacter#1#2#3#4{%
  \if\string#1\string#4%
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
  {#2}{#3}#4%
}
\long\def\XKV@whilist#1:=#2\do#3\fi#4{%
  #3\expandafter\XKV@wh@list#2,\@nil,\@nil\@@#1#3\fi{#4}\fi
}
\long\def\XKV@wh@list#1,#2\@@#3#4\fi#5{%
  \begingroup\def#3{#1}\expandafter\endgroup
  \ifx#3\@nnil
    \expandafter\XKV@wh@l@st
  \else
    #4%
      \def#3{#1}#5\expandafter\expandafter\expandafter\XKV@wh@list
    \else
      \expandafter\expandafter\expandafter\XKV@wh@l@st
    \fi
  \fi
  #2\@@#3#4\fi{#5}%
}
\long\def\XKV@wh@l@st#1\@@#2#3\fi#4{}
\long\def\XKV@for#1:=#2\do#3{\expandafter\@forloop#2,\@nil,\@nil\@@#1{#3}}
\def\XKV@addtomacro@n#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}
\def\XKV@addtomacro@o#1#2{%
  \expandafter\expandafter\expandafter\def\expandafter\expandafter
    \expandafter#1\expandafter\expandafter\expandafter{\expandafter#1#2}%
}
\def\XKV@addtolist@n#1#2{%
  \ifx#1\@empty
    \XKV@addtomacro@n#1{#2}%
  \else
    \XKV@addtomacro@n#1{,#2}%
  \fi
}
\def\XKV@addtolist@o#1#2{%
  \ifx#1\@empty
    \XKV@addtomacro@o#1#2%
  \else
    \XKV@addtomacro@o#1{\expandafter,#2}%
  \fi
}
\def\XKV@addtolist@x#1#2{\edef#1{#1\ifx#1\@empty\else,\fi#2}}
\def\@selective@sanitize{\@testopt\@s@lective@sanitize\@M}
\def\@s@lective@sanitize[#1]#2#3{%
  \begingroup
    \count@#1\relax\advance\count@\@ne
    \XKV@toks\expandafter{#3}%
    \def#3{#2}\@onelevel@sanitize#3%
    \edef#3{{#3}{\the\XKV@toks}}%
    \expandafter\@s@l@ctive@sanitize\expandafter#3#3
  \expandafter\endgroup\expandafter\def\expandafter#3\expandafter{#3}%
}
\def\@s@l@ctive@sanitize#1#2#3{%
  \def\@i{\futurelet\@@tok\@ii}%
  \def\@ii{%
    \expandafter\@iii\meaning\@@tok\relax
    \ifx\@@tok\@s@l@ctive@sanitize
      \let\@@cmd\@gobble
    \else
      \ifx\@@tok\@sptoken
        \XKV@toks\expandafter{#1}\edef#1{\the\XKV@toks\space}%
        \def\@@cmd{\afterassignment\@i\let\@@tok= }%
      \else
        \let\@@cmd\@iv
      \fi
    \fi
    \@@cmd
  }%
  \def\@iii##1##2\relax{\if##1\@backslashchar\let\@@tok\relax\fi}%
  \def\@iv##1{%
    \toks@\expandafter{#1}\XKV@toks{##1}%
    \ifx\@@tok\bgroup
      \advance\count@\m@ne
      \ifnum\count@>\z@
        \begingroup
          \def#1{\expandafter\@s@l@ctive@sanitize
            \csname\string#1\endcsname{#2}}%
          \expandafter#1\expandafter{\the\XKV@toks}%
          \XKV@toks\expandafter\expandafter\expandafter
            {\csname\string#1\endcsname}%
          \edef#1{\noexpand\XKV@toks{\the\XKV@toks}}%
        \expandafter\endgroup#1%
      \fi
      \edef#1{\the\toks@{\the\XKV@toks}}%
      \advance\count@\@ne
      \let\@@cmd\@i
    \else
      \edef#1{\expandafter\string\the\XKV@toks}%
      \expandafter\in@\expandafter{#1}{#2}%
      \edef#1{\the\toks@\ifin@#1\else
              \ifx\@@tok\@sptoken\space\else\the\XKV@toks\fi\fi}%
      \edef\@@cmd{\noexpand\@i\ifx\@@tok\@sptoken\the\XKV@toks\fi}%
    \fi
    \@@cmd
  }%
  \let#1\@empty\@i#3\@s@l@ctive@sanitize
}
\def\XKV@checksanitizea#1#2{%
  \XKV@ch@cksanitize{#1}#2=%
  \ifin@\else\XKV@ch@cksanitize{#1}#2,\fi
  \ifin@\@selective@sanitize[0]{,=}#2\fi
}
\def\XKV@checksanitizeb#1#2{%
  \XKV@ch@cksanitize{#1}#2,%
  \ifin@\@selective@sanitize[0],#2\fi
}
\def\XKV@ch@cksanitize#1#2#3{%
  \def#2{#1}%
  \@onelevel@sanitize#2%
  \@expandtwoargs\in@#3{#2}%
  \ifin@
    \def#2##1#3##2\@nil{%
      \def#2{##2}%
      \ifx#2\@empty\else\in@false\fi
    }%
    #2#1#3\@nil
  \fi
  \def#2{#1}%
}
\def\XKV@merge#1#2#3{%
  \XKV@checksanitizea{#2}\XKV@tempa
  \@for\XKV@tempa:=\XKV@tempa\do{%
    \XKV@pltrue
    #3\XKV@tempa\XKV@tempb
    \let\XKV@tempc#1%
    \let#1\@empty
    \@for\XKV@tempc:=\XKV@tempc\do{%
      #3\XKV@tempc\XKV@tempd
      \ifx\XKV@tempb\XKV@tempd
        \XKV@plfalse
        \XKV@addtolist@o#1\XKV@tempa
      \else
        \XKV@addtolist@o#1\XKV@tempc
      \fi
    }%
    \ifXKV@pl\XKV@addtolist@o#1\XKV@tempa\fi
  }%
  \ifXKV@st\global\let#1#1\fi
}
\def\XKV@delete#1#2#3{%
  \XKV@checksanitizeb{#2}\XKV@tempa
  \let\XKV@tempb#1%
  \let#1\@empty
  \@for\XKV@tempb:=\XKV@tempb\do{%
    #3\XKV@tempb\XKV@tempc
    \@expandtwoargs\in@{,\XKV@tempc,}{,\XKV@tempa,}%
    \ifin@\else\XKV@addtolist@o#1\XKV@tempb\fi
  }%
  \ifXKV@st\global\let#1#1\fi
}
\def\XKV@warn#1{\message{xkeyval warning: #1}}
\def\XKV@err#1{\errmessage{xkeyval error: #1}}
\def\KV@errx{\XKV@err}
\let\KV@err\KV@errx
\def\XKV@ifstar#1{\@ifnextcharacter*{\@firstoftwo{#1}}}
\def\XKV@ifplus#1{\@ifnextcharacter+{\@firstoftwo{#1}}}
\def\XKV@sp@deflist#1#2{%
  \let#1\@empty
  \def\XKV@resa{#2}%
  \@for\XKV@resa:=\XKV@resa\do{%
    \expandafter\KV@@sp@def\expandafter\XKV@resa\expandafter{\XKV@resa}%
    \edef#1{#1,\XKV@resa}%
  }%
  \ifx#1\@empty\else
    \def\XKV@resa,##1\@nil{\def#1{##1}}%
    \expandafter\XKV@resa#1\@nil
  \fi
}
\def\XKV@makepf#1{%
  \KV@@sp@def\XKV@prefix{#1}%
  \def\XKV@resa{XKV}%
  \ifx\XKV@prefix\XKV@resa
    \XKV@err{`XKV' prefix is not allowed}%
    \let\XKV@prefix\@empty
  \else
    \ifx\XKV@prefix\@empty\else
      \edef\XKV@prefix{\XKV@prefix @}%
    \fi
  \fi
}
\def\XKV@makehd#1{%
  \expandafter\KV@@sp@def\expandafter\XKV@header\expandafter{#1}%
  \ifx\XKV@header\@empty
    \let\XKV@header\XKV@prefix
  \else
    \edef\XKV@header{\XKV@prefix\XKV@header @}%
  \fi
}
\def\XKV@srstate#1#2{%
  \ifx\@empty#2\@empty\advance\XKV@depth\@ne\fi
  \@for\XKV@resa:=prefix,fams,na\do{%
    \expandafter\let\csname XKV@\XKV@resa#1\expandafter
      \endcsname\csname XKV@\XKV@resa#2\endcsname
  }%
  \ifx\@empty#1\@empty\advance\XKV@depth\m@ne\fi
}
\def\XKV@testopta#1{%
  \XKV@ifstar{\XKV@sttrue\XKV@t@stopta#1}{\XKV@stfalse\XKV@t@stopta#1}%
}
\def\XKV@t@stopta#1{%
  \XKV@ifplus{\XKV@pltrue\XKV@t@st@pta#1}{\XKV@plfalse\XKV@t@st@pta#1}%
}
\def\XKV@t@st@pta#1{\@testopt{\XKV@@t@st@pta#1}{KV}}
\def\XKV@@t@st@pta#1[#2]#3{%
  \XKV@makepf{#2}%
  \XKV@checksanitizeb{#3}\XKV@fams
  \expandafter\XKV@sp@deflist\expandafter\XKV@fams\expandafter{\XKV@fams}%
  \@testopt#1{}%
}
\def\XKV@testoptb#1{\@testopt{\XKV@t@stoptb#1}{KV}}
\def\XKV@t@stoptb#1[#2]#3{%
  \XKV@makepf{#2}%
  \XKV@makehd{#3}%
  \KV@@sp@def\XKV@tfam{#3}%
  #1%
}
\def\XKV@ifcmd#1#2#3{%
  \def\XKV@@ifcmd##1#2##2##3\@nil##4{%
    \def##4{##2}\ifx##4\@nnil
      \def##4{##1}\expandafter\@secondoftwo
    \else
      \expandafter\@firstoftwo
    \fi
  }%
  \XKV@@ifcmd#1#2{\@nil}\@nil#3%
}
\def\XKV@getkeyname#1#2{\expandafter\XKV@g@tkeyname#1=\@nil#2}
\def\XKV@g@tkeyname#1=#2\@nil#3{%
  \XKV@ifcmd{#1}\savevalue#3{\XKV@rkvtrue\XKV@sgfalse}{%
    \XKV@ifcmd{#1}\gsavevalue#3%
      {\XKV@rkvtrue\XKV@sgtrue}{\XKV@rkvfalse\XKV@sgfalse}%
  }%
}
\def\XKV@getsg#1#2{%
  \expandafter\XKV@ifcmd\expandafter{#1}\global#2\XKV@sgtrue\XKV@sgfalse
}
\def\define@key{\XKV@testoptb\XKV@define@key}
\def\XKV@define@key#1{%
  \@ifnextchar[{\XKV@d@fine@k@y{#1}}{%
    \expandafter\def\csname\XKV@header#1\endcsname####1}%
}
\def\XKV@d@fine@k@y#1[#2]{%
  \expandafter\def\csname\XKV@header#1@default\expandafter\endcsname
    \expandafter{\csname\XKV@header#1\endcsname{#2}}%
  \expandafter\def\csname\XKV@header#1\endcsname##1%
}
\def\define@boolkey{\XKV@testoptb\XKV@define@boolkey}
\def\XKV@define@boolkey#1{%
  \expandafter\newif\csname if\XKV@header#1\endcsname
  \expandafter\edef\csname\XKV@header#1\endcsname##1%
    {\noexpand\XKV@setbool{\XKV@header#1}{##1}}%
  \@ifnextchar[{\XKV@d@fine@boolkey{#1}}{}%
}
\def\XKV@d@fine@boolkey#1[#2]{%
  \expandafter\def\csname\XKV@header#1@default\expandafter\endcsname
    \expandafter{\csname\XKV@header#1\endcsname{#2}}%
}
\def\XKV@setbool#1#2{%
  \def\XKV@tempa{true}%
  \def\XKV@tempb{false}%
  \lowercase{\def\XKV@tempc{#2}}%
  \ifx\XKV@tempc\XKV@tempa\else
    \ifx\XKV@tempc\XKV@tempb\else
      \let\XKV@tempc\relax
    \fi
  \fi
  \ifx\XKV@tempc\relax
    \XKV@err{boolean can only be `true' or `false'}%
  \else
    \csname#1\XKV@tempc\endcsname
  \fi
}
\def\define@cmdkey{\XKV@testoptb\XKV@define@cmdkey}
\def\XKV@define@cmdkey#1{%
  \expandafter\edef\csname\XKV@header#1\endcsname##1{\noexpand\def
    \expandafter\noexpand\csname\XKV@header#1@cmd\endcsname{##1}}%
  \@ifnextchar[{\XKV@d@fine@cmdkey{#1}}{}%
}
\def\XKV@d@fine@cmdkey#1[#2]{%
  \expandafter\def\csname\XKV@header#1@default\expandafter\endcsname
    \expandafter{\csname\XKV@header#1\endcsname{#2}}%
}
\def\key@ifundefined{\@testopt\XKV@key@ifundefined{KV}}
\def\XKV@key@ifundefined[#1]#2{%
  \XKV@makepf{#1}%
  \XKV@sp@deflist\XKV@fams{#2}%
  \XKV@key@if@ndefined
}
\def\XKV@key@if@ndefined#1{%
  \XKV@knftrue
  \KV@@sp@def\XKV@tkey{#1}%
  \XKV@whilist\XKV@tfam:=\XKV@fams\do\ifXKV@knf\fi{%
    \XKV@makehd\XKV@tfam
    \XKV@ifundefined{\XKV@header\XKV@tkey}{}{\XKV@knffalse}%
  }%
  \ifXKV@knf
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
}
\def\disable@keys{\XKV@testoptb\XKV@disable@keys}
\def\XKV@disable@keys#1{%
  \XKV@checksanitizeb{#1}\XKV@tempa
  \@for\XKV@tempa:=\XKV@tempa\do{%
    \XKV@ifundefined{\XKV@header\XKV@tempa}{%
      \XKV@err{key `\XKV@tempa' undefined}%
    }{%
      \edef\XKV@tempb{\noexpand\XKV@warn{key `\XKV@tempa' has been disabled}}%
      \XKV@ifundefined{\XKV@header\XKV@tempa @default}{%
        \edef\XKV@tempc{\noexpand\XKV@define@key{\XKV@tempa}}%
      }{%
        \edef\XKV@tempc{\noexpand\XKV@define@key{\XKV@tempa}[]}%
      }%
      \expandafter\XKV@tempc\expandafter{\XKV@tempb}%
    }%
  }%
}
\def\presetkeys{\XKV@stfalse\XKV@testoptb\XKV@presetkeys}
\def\gpresetkeys{\XKV@sttrue\XKV@testoptb\XKV@presetkeys}
\def\XKV@presetkeys#1#2{%
  \XKV@pr@setkeys{#1}{preseth}%
  \XKV@pr@setkeys{#2}{presett}%
}
\def\XKV@pr@setkeys#1#2{%
  \XKV@ifundefined{XKV@\XKV@header#2}{%
    \XKV@checksanitizea{#1}\XKV@tempa
    \ifXKV@st\expandafter\global\fi\expandafter\def
      \csname XKV@\XKV@header#2\expandafter\endcsname\expandafter{\XKV@tempa}%
  }{%
    \expandafter\XKV@merge\csname XKV@\XKV@header#2\endcsname{#1}\XKV@getkeyname
  }%
}
\def\delpresetkeys{\XKV@stfalse\XKV@testoptb\XKV@delpresetkeys}
\def\gdelpresetkeys{\XKV@sttrue\XKV@testoptb\XKV@delpresetkeys}
\def\XKV@delpresetkeys#1#2{%
  \XKV@d@lpresetkeys{#1}{preseth}%
  \XKV@d@lpresetkeys{#2}{presett}%
}
\def\XKV@d@lpresetkeys#1#2{%
  \XKV@ifundefined{XKV@\XKV@header#2}{%
    \XKV@err{no presets defined for `\XKV@header'}%
  }{%
    \expandafter\XKV@delete\csname XKV@\XKV@header#2\endcsname{#1}\XKV@getkeyname
  }%
}
\def\unpresetkeys{\XKV@stfalse\XKV@testoptb\XKV@unpresetkeys}
\def\gunpresetkeys{\XKV@sttrue\XKV@testoptb\XKV@unpresetkeys}
\def\XKV@unpresetkeys{%
  \XKV@ifundefined{XKV@\XKV@header preseth}{%
    \XKV@err{no presets defined for `\XKV@header'}%
  }{%
    \ifXKV@st\expandafter\global\fi\expandafter\let
      \csname XKV@\XKV@header preseth\endcsname\@undefined
    \ifXKV@st\expandafter\global\fi\expandafter\let
      \csname XKV@\XKV@header presett\endcsname\@undefined
  }%
}
\def\savekeys{\XKV@stfalse\XKV@testoptb\XKV@savekeys}
\def\gsavekeys{\XKV@sttrue\XKV@testoptb\XKV@savekeys}
\def\XKV@savekeys#1{%
  \XKV@ifundefined{XKV@\XKV@header save}{%
    \XKV@checksanitizeb{#1}\XKV@tempa
    \ifXKV@st\expandafter\global\fi\expandafter\def
      \csname XKV@\XKV@header save\expandafter\endcsname\expandafter{\XKV@tempa}%
  }{%
    \expandafter\XKV@merge\csname XKV@\XKV@header save\endcsname{#1}\XKV@getsg
  }%
}
\def\delsavekeys{\XKV@stfalse\XKV@testoptb\XKV@delsavekeys}
\def\gdelsavekeys{\XKV@sttrue\XKV@testoptb\XKV@delsavekeys}
\def\XKV@delsavekeys#1{%
  \XKV@ifundefined{XKV@\XKV@header save}{%
    \XKV@err{no save keys defined for `\XKV@header'}%
  }{%
    \expandafter\XKV@delete\csname XKV@\XKV@header save\endcsname{#1}\XKV@getsg
  }%
}
\def\unsavekeys{\XKV@stfalse\XKV@testoptb\XKV@unsavekeys}
\def\gunsavekeys{\XKV@sttrue\XKV@testoptb\XKV@unsavekeys}
\def\XKV@unsavekeys{%
  \XKV@ifundefined{XKV@\XKV@header save}{%
    \XKV@err{no save keys defined for `\XKV@header'}%
  }{%
    \ifXKV@st\expandafter\global\fi\expandafter\let
      \csname XKV@\XKV@header save\endcsname\@undefined
  }%
}
\def\setkeys{\XKV@testopta\XKV@setkeys}
\def\XKV@setkeys[#1]#2{%
  \def\XKV@tempa##1,{%
    \def\XKV@tempb{##1}%
    \ifx\XKV@tempb\@nnil\else
      \XKV@g@tkeyname##1=\@nil\XKV@tempb
      \XKV@addtolist@x\XKV@naa\XKV@tempb
      \expandafter\XKV@tempa
    \fi
  }%
  \XKV@checksanitizea{#2}\XKV@resb
  \let\XKV@naa\@empty
  \expandafter\XKV@tempa\XKV@resb,\@nil,%
  \let\XKV@rm\@empty
  \XKV@usepresetkeys{#1}{preseth}%
  \expandafter\XKV@s@tkeys\expandafter{\XKV@resb}{#1}%
  \XKV@usepresetkeys{#1}{presett}%
}
\def\XKV@usepresetkeys#1#2{%
  \XKV@for\XKV@tfam:=\XKV@fams\do{%
    \XKV@makehd\XKV@tfam
    \XKV@ifundefined{XKV@\XKV@header#2}{}{%
      \XKV@toks\expandafter\expandafter\expandafter
        {\csname XKV@\XKV@header#2\endcsname}%
      \@expandtwoargs\XKV@s@tkeys{\the\XKV@toks}%
        {\XKV@naa\ifx\XKV@naa\@empty\else,\fi#1}%
    }%
  }%
}
\def\XKV@s@tkeys#1#2{%
  \XKV@sp@deflist\XKV@na{#2}%
  \XKV@s@tk@ys#1,\@nil,%
}
\def\XKV@s@tk@ys#1,{%
  \def\XKV@tempa{#1}%
  \ifx\XKV@tempa\@nnil\else
    \XKV@knftrue
    \XKV@split#1==\@nil
    \ifXKV@knf
      \ifXKV@inpox
        \ifx\XKV@doxs\relax
          \ifx\@currext\@clsextension\else
            \let\CurrentOption\XKV@tkey\@unknownoptionerror
          \fi
        \else
          \def\CurrentOption{#1}\XKV@doxs
        \fi
      \else
        \ifXKV@st
          \XKV@addtolist@n\XKV@rm{#1}%
        \else
          \XKV@err{`\XKV@tkey' undefined in families `\XKV@fams'}%
        \fi
      \fi
    \else
      \ifXKV@inpox\ifx\XKV@testclass\XKV@documentclass
        \XKV@useoption{#1}%
      \fi\fi
    \fi
    \expandafter\XKV@s@tk@ys
  \fi
}
\def\XKV@split#1=#2=#3\@nil{%
  \XKV@g@tkeyname#1=\@nil\XKV@tkey
  \expandafter\KV@@sp@def\expandafter\XKV@tkey\expandafter{\XKV@tkey}%
  \ifx\XKV@tkey\@empty
    \ifx\@empty#2\@empty\else
      \XKV@toks{#2}%
      \XKV@err{no key specified for value `\the\XKV@toks'}%
    \fi
    \XKV@knffalse
  \else
    \@expandtwoargs\in@{,\XKV@tkey,}{,\XKV@na,}%
    \ifin@\XKV@knffalse\else
      \KV@@sp@def\XKV@tempa{#2}%
      \XKV@ifundefined{XKV@\XKV@header save}{}{%
        \expandafter\XKV@testsavekey\csname XKV@\XKV@header save\endcsname\XKV@tkey
      }%
      \ifXKV@rkv
        \ifXKV@sg\expandafter\global\fi\expandafter\let
          \csname XKV@\XKV@header\XKV@tkey @value\endcsname\XKV@tempa
      \fi
      \expandafter\XKV@replacepointers\expandafter{\XKV@tempa}%
      \ifXKV@pl
        \XKV@for\XKV@tfam:=\XKV@fams\do{%
          \XKV@makehd\XKV@tfam
          \expandafter\XKV@setkey@infam\expandafter{\XKV@tempa}{#3}%
        }%
      \else
        \XKV@whilist\XKV@tfam:=\XKV@fams\do\ifXKV@knf\fi{%
          \XKV@makehd\XKV@tfam
          \expandafter\XKV@setkey@infam\expandafter{\XKV@tempa}{#3}%
        }%
      \fi
    \fi
  \fi
}
\def\XKV@testsavekey#1#2{%
  \ifXKV@rkv\else
    \@for\XKV@resa:=#1\do{%
      \expandafter\XKV@ifcmd\expandafter{\XKV@resa}\global\XKV@resa{%
        \ifx#2\XKV@resa
          \XKV@rkvtrue\XKV@sgtrue
        \fi
      }{%
        \ifx#2\XKV@resa
          \XKV@rkvtrue\XKV@sgfalse
        \fi
      }%
    }%
  \fi
}
\def\XKV@replacepointers#1{%
  \let\XKV@tempa\@empty
  \let\XKV@resa\@empty
  \XKV@r@placepointers#1\usevalue\@nil
}
\def\XKV@r@placepointers#1\usevalue#2{%
  \XKV@addtomacro@n\XKV@tempa{#1}%
  \ifx\@nil#2\relax\else\XKV@afterfi
    \XKV@ifundefined{XKV@\XKV@header#2@value}{%
      \XKV@err{no value recorded for key `#2'; ignored}%
      \XKV@r@placepointers
    }{%
      \@expandtwoargs\in@{,#2,}{,\XKV@resa,}%
      \ifin@\XKV@afterelsefi
        \XKV@err{back linking pointers; pointer replacement canceled}%
      \else\XKV@afterfi
        \XKV@addtolist@x\XKV@resa{#2}%
        \expandafter\expandafter\expandafter\XKV@r@placepointers
          \csname XKV@\XKV@header#2@value\endcsname
      \fi
    }%
  \fi
}
\def\XKV@setkey@infam#1#2{%
  \XKV@ifundefined{\XKV@header\XKV@tkey}{}{%
    \XKV@knffalse
    \ifx\@empty#2\@empty
      \XKV@ifundefined{\XKV@header\XKV@tkey @default}{%
        \XKV@err{no value specified for key `\XKV@tkey'}%
      }{%
        \expandafter\expandafter\expandafter\XKV@default
          \csname\XKV@header\XKV@tkey @default\endcsname\@nil
      }%
    \else\XKV@afterfi
      \XKV@srstate{@\romannumeral\XKV@depth}{}%
      \csname\XKV@header\XKV@tkey\endcsname{#1}\relax
      \XKV@srstate{}{@\romannumeral\XKV@depth}%
    \fi
  }%
}
\def\XKV@default#1#2\@nil{%
  \expandafter\edef\expandafter\XKV@tempa\expandafter{\expandafter\@gobble\string#1}%
  \edef\XKV@tempb{\XKV@header\XKV@tkey}%
  \@onelevel@sanitize\XKV@tempb
  \ifx\XKV@tempa\XKV@tempb
    \begingroup
      \expandafter\def\csname\XKV@header\XKV@tkey\endcsname##1{%
        \gdef\XKV@tempa{##1}%
      }%
      \csname\XKV@header\XKV@tkey @default\endcsname
    \endgroup
    \XKV@ifundefined{XKV@\XKV@header save}{}{%
      \expandafter\XKV@testsavekey\csname XKV@\XKV@header save\endcsname\XKV@tkey
    }%
    \ifXKV@rkv
      \ifXKV@sg\expandafter\global\fi\expandafter\let
        \csname XKV@\XKV@header\XKV@tkey @value\endcsname\XKV@tempa
    \fi
    \expandafter\XKV@replacepointers\expandafter{\XKV@tempa}\XKV@afterelsefi
    \XKV@srstate{@\romannumeral\XKV@depth}{}%
    \expandafter#1\expandafter{\XKV@tempa}\relax
    \XKV@srstate{}{@\romannumeral\XKV@depth}%
  \else\XKV@afterfi
    \XKV@srstate{@\romannumeral\XKV@depth}{}%
    \csname\XKV@header\XKV@tkey @default\endcsname\relax
    \XKV@srstate{}{@\romannumeral\XKV@depth}%
  \fi
}
\def\setrmkeys{\XKV@testopta\XKV@setrmkeys}
\def\XKV@setrmkeys[#1]{%
  \def\XKV@tempa{\XKV@setkeys[#1]}%
  \expandafter\XKV@tempa\expandafter{\XKV@rm}%
}
\XKVcatcodes
\endinput
%%
%% End of file `xkeyval.tex'.

math0506521.extracted_bib
\begin{thebibliography}{BCST96}

\bibitem[Abr96]{Abr96}
S.~Abramsky.
\newblock Retracing some paths in process algebra.
\newblock In {\em Proc.\ CONCUR '96}, pages 1--17, 1996.

\bibitem[Bar79]{Bar79}
M.~Barr.
\newblock {\em {$*$-A}utonomous categories}, volume 752 of {\em Lecture Notes
  in Mathematics}.
\newblock Springer-Verlag, 1979.

\bibitem[BCST96]{BCST96}
R.~F. Blute, J.\ R.~B. Cockett, R.~A.~G. Seely, and T.~H. Trimble.
\newblock Natural deduction and coherence for weakly distributive categories.
\newblock {\em Journal of Pure and Applied Algebra}, 113:229--296, 1996.

\bibitem[Blu93]{Blu93}
R.~F. Blute.
\newblock Linear logic, coherence and dinaturality.
\newblock {\em Theor.\ Comp.\ Sci.}, 115:3--41, 1993.

\bibitem[Bol02]{Bol02}
B.~Bollob{\'a}s.
\newblock {\em Modern Graph Theory}.
\newblock Springer-Verlag, 2002.

\bibitem[CHS05]{CHS05}
J.~R.~B. Cockett, M.~Hasegawa, and R.~A.~G. Seely.
\newblock Coherence of the double involution on \mbox{*-aut}onomous categories.
\newblock {\em Theory and Applications of Categories}, 2005.
\newblock To appear.

\bibitem[CS97]{CS97}
J.~R.~B. Cockett and R.~A.~G. Seely.
\newblock Proof theory for full intuitionistic linear logic, bilinear logic,
  and {\small mix} categories.
\newblock {\em Theory and Applications of Categories}, 3(5):85--131, 1997.

\bibitem[Dan90]{Dan90}
V.~Danos.
\newblock {\em La logique lin{\'e}aire appliqu{\'e}e {\`a} l'{\'e}tude de
  divers processus de normalisation et principalement du lambda calcul}.
\newblock PhD thesis, Univ.\ de Paris, 1990.

\bibitem[DR89]{DR89}
V.~Danos and L.~Regnier.
\newblock The structure of multiplicatives.
\newblock {\em Archive for Mathematical Logic}, 28:181--203, 1989.

\bibitem[EK66]{EK66}
S.~Eilenberg and G.~M. Kelly.
\newblock A generalization of the functorial calculus.
\newblock {\em J.\ Algebra}, 3:366--375, 1966.

\bibitem[Gir87]{Gir87}
J.-Y. Girard.
\newblock Linear logic.
\newblock {\em Theoretical Computer Science}, 50:1--102, 1987.

\bibitem[Gir89]{Gir89}
J.-Y. Girard.
\newblock Towards a geometry of interaction.
\newblock In {\em Categories in Computer Science and Logic}, volume~92 of {\em
  Contemporary Mathematics}, pages 69--108, 1989.
\newblock Proc.\ of June 1987 meeting in Boulder, Colorado.

\bibitem[Gir93]{Gir93}
J.-Y. Girard.
\newblock Linear logic: A survey.
\newblock {\em Proceedings of the International Summer School of Marktoberdorf,
  NATO Advanced Science Institutes, series F94}, pages 63--112, 1993.
\newblock Also in P.\ De Groote editor, The Curry-Howard Isomorphism, 193--255,
  D{\'e}partement de Philosophie, Universit{\'e} Catholique de Louvain, Cahiers
  du Centre de Logique 8, Academia Press.

\bibitem[Gir96]{Gir96}
J.-Y. Girard.
\newblock Proof-nets: the parallel syntax for proof theory.
\newblock In {\em Logic and Algebra}, volume 180 of {\em Lecture Notes In Pure
  and Applied Mathematics}. Marcel Dekker, New York, 1996.

\bibitem[GSS92]{GSS92}
J.-Y. Girard, A.~Scedrov, and P.~J. Scott.
\newblock Bounded linear logic: {A} modular approach to polynomial time
  computability.
\newblock {\em Theor.\ Comp.\ Sci.}, 97:1--66, 1992.

\bibitem[Gue99]{Gue99}
S.~Guerrini.
\newblock Correctness of multiplicative proof nets is linear.
\newblock In {\em Proc.\ Logic in Computer Science '99}, 1999.

\bibitem[HHS05]{HHS05}
R.~Houston, D.~J.~D. Hughes and A. Schalk.,
\newblock Modelling linear logic without units (preliminary result).
\newblock http://arxiv.org/abs/math.CT/0504037\,, April 2005.

\bibitem[Hug05]{Hug05}
D.~J.~D. Hughes.
\newblock Simple multiplicative proof nets with units.\\
\newblock http://arxiv.org/abs/math.CT/0507003\,.  Submitted for publication, March 2005.

\bibitem[JS91]{JS91}
A.~Joyal and R.~Street.
\newblock The geometry of tensor calculus {I}.
\newblock {\em Adv.\ Math.}, 88:55--112, 1991.

\bibitem[JS93]{JS93}
A.~Joyal and R.~Street.
\newblock Braided tensor categories.
\newblock {\em Adv.\ Math.}, 102(1):20--78, 1993.

\bibitem[JSV96]{JSV96}
A.~Joyal, R.~Street, and D.~Verity.
\newblock Traced monoidal categories.
\newblock {\em Math.\ Proc.\ Camb.\ Phil.\ Soc.}, 119:447--468, 1996.

\bibitem[Kel64]{Kel64}
G.~M. Kelly.
\newblock On Mac Lane's conditions for coherence of natural associativities, commutativities, etc.
\newblock {\em J. Algebra}, 1:397--402, 1964.

\bibitem[KL80]{KL80}
G.~M. Kelly and M.~L. Laplaza.
\newblock Coherence for compact closed categories.
\newblock {\em J.\ Pure and Applied Algebra}, 19:193--213, 1980.

\bibitem[KM71]{KM71}
G.~M. Kelly and S.~Mac{ }Lane.
\newblock Coherence in closed categories.
\newblock {\em J.\ Pure and Applied Algebra}, 1:97--140, 1971.

\bibitem[KO99]{KO99}
T.~W. Koh and C.-H.~L. Ong.
\newblock Explicit substitution internal languages for autonomous and
  \mbox{*-au}\-tonomous categories (preliminary version).
\newblock In {\em Proceedings of the 8th Conference on Category Theory and
  Computer Science, Edinburgh, September 1999, Electronic Notes in Theoreotical
  Computer Science}, volume~29, 1999.

\bibitem[Lam94]{Lam94}
F.~Lamarche.
\newblock Proof nets for intuitionistic linear logic {I}: {E}ssential nets.
\newblock Unpublished note, 1994.

\bibitem[LS04]{LS04}
F.~Lamarche and L.~Stra{\ss}burger.
\newblock On proof nets for multiplicative linear logic with units.
\newblock In {\em Proc.\ CSL'04}, volume 3210 of {\em Lecture Notes in Computer
  Science}, pages 145--159, 2004.

\bibitem[Mac71]{Mac71}
S.~Mac Lane.
\newblock {\em Categories for the Working Mathematician}.
\newblock Springer-Verlag", 1971.

\bibitem[MO00]{MO00}
A.~S. Murawski and C.-H.~L. Ong.
\newblock Dominator trees and fast verification of proof nets.
\newblock In {\em Proc.\ Logic in Computer Science '00}, 2000.

\bibitem[MO03]{MO03}
A.~S. Murawski and C.-H.~L. Ong.
\newblock Exhausting strategies, joker games and full completeness for {IMLL}
  with unit.
\newblock {\em Theor.\ Comp.\ Sci.}, 294:269--305, 2003.

\bibitem[Par92]{Par92}
M.~Parigot.
\newblock $\lambda\mu$-calculus: an algorithmic interpretation of classical
  natural deduction.
\newblock In {\em Proc.\ Int.\ Conf.\ Logic Prog.\ Automated Reasoning}, volume
  624 of {\em Lecture Notes in Computer Science}, pages 190--201. Springer,
  1992.

\bibitem[Reg92]{Reg92}
L.~Regnier.
\newblock {\em Lambda-Calcul et R{\`e}seaux}.
\newblock PhD thesis, Univ.\ Paris VII, 1992.

\bibitem[Tri94]{Tri94}
T.~H. Trimble.
\newblock {\em Linear logic, bimodules, and full coherence for autonomous
  categories}.
\newblock PhD thesis, Rutgers University, 1994.

\end{thebibliography}