%
% >>> zed-cm.sty <<< 
%
% (c) Jim Davies, February 1997

% You may copy and distribute this file freely.  Any queries and
% complaints can be forwarded to Jim.Davies@comlab.ox.ac.uk.  However,
% the author accepts no liability for the accuracy of these macros, or
% their fitness for any purpose.  If you make any changes to this
% file, please do not distribute the results under the name `zed-cm.sty'.  

% >>> information <<<

% This is a LaTeX2e package for typesetting Z notation using the
% standard Computer Modern family.  It extends the standard (Mike
% Spivey) set of macros and uses the AMS symbol fonts.  I'd be
% happy to hear of any compatibility problems, and even happier
% to hear of elegant solutions at the same time.  

% >>> date and version <<<

\def\fileversion{1} \def\filedate{97/02/18} \def\docdate{97/02/18}

\NeedsTeXFormat{LaTeX2e}

\ProvidesPackage{zed-cm}[{%
  \filedate\space\fileversion\space zed-cm package}]

% >>> handle fuzz compatibility <<<

% Some people may wish to retain the standard \[ and \] commands; the
% option `nofuzz' allows them to do this. 

\newif\if@fuzz@ \@fuzz@true

\DeclareOption{fuzz}{\@fuzz@true}
\DeclareOption{nofuzz}{\@fuzz@false}

\ExecuteOptions{fuzz} \ProcessOptions

% >>> fonts and symbols <<<

% We declare a new math version.  For convenience, I have chosen the
% same name as that used in oz.sty.  The following code is based upon
% the work of Paul King, Sebastian Rahtz, and Mike Spivey.  Alan
% Jeffrey's influence is everywhere. 

\DeclareMathVersion{zed}
\SetMathAlphabet{\mathrm}{zed}{\encodingdefault}{\rmdefault}{m}{n}%
\SetMathAlphabet{\mathbf}{zed}{\encodingdefault}{\rmdefault}{bx}{n}%
\SetMathAlphabet{\mathsf}{zed}{\encodingdefault}{\sfdefault}{m}{n}%
\SetMathAlphabet{\mathtt}{zed}{\encodingdefault}{\ttdefault}{m}{n}%
\DeclareSymbolFont{italics}{\encodingdefault}{\rmdefault}{m}{it}%
\DeclareSymbolFontAlphabet{\mathrm}{operators}
\DeclareSymbolFontAlphabet{\mathit}{letters}
\DeclareSymbolFontAlphabet{\mathcal}{symbols}
\DeclareSymbolFontAlphabet{\zedit}{italics}
\DeclareSymbolFont{lasy}{U}{lasy}{m}{n}
\DeclareSymbolFont{AMSa}{U}{msa}{m}{n}
\DeclareSymbolFont{AMSb}{U}{msb}{m}{n}
\let\mho\undefined
\let\Join\undefined
\let\Box\undefined
\let\Diamond\undefined
\let\leadsto\undefined
\let\sqsubset\undefined
\let\sqsupset\undefined
\let\lhd\undefined
\let\unlhd\undefined
\let\rhd\undefined
\let\unrhd\undefined
\DeclareMathSymbol{\mho}{\mathord}{lasy}{"30}
\DeclareMathSymbol{\Join}{\mathrel}{lasy}{"31}
\DeclareMathSymbol{\Box}{\mathord}{lasy}{"32}
\DeclareMathSymbol{\Diamond}{\mathord}{lasy}{"33}
\DeclareMathSymbol{\leadsto}{\mathrel}{lasy}{"3B}
\DeclareMathSymbol{\sqsubset}{\mathrel}{lasy}{"3C}
\DeclareMathSymbol{\sqsupset}{\mathrel}{lasy}{"3D}
\DeclareMathSymbol{\lhd}{\mathrel}{lasy}{"01}
\DeclareMathSymbol{\unlhd}{\mathrel}{lasy}{"02}
\DeclareMathSymbol{\rhd}{\mathrel}{lasy}{"03}
\DeclareMathSymbol{\unrhd}{\mathrel}{lasy}{"04}
\DeclareSymbolFontAlphabet{\bbold}{AMSb}
\mathversion{zed}

\let\rightleftharpoons\undefined
\let\angle\undefined
\DeclareMathSymbol\boxdot{\mathbin}{AMSa}{"00}
\DeclareMathSymbol\boxplus{\mathbin}{AMSa}{"01}
\DeclareMathSymbol\boxtimes{\mathbin}{AMSa}{"02}
\DeclareMathSymbol\square{\mathord}{AMSa}{"03}
\DeclareMathSymbol\blacksquare{\mathord}{AMSa}{"04}
\DeclareMathSymbol\centerdot{\mathbin}{AMSa}{"05}
\DeclareMathSymbol\lozenge{\mathord}{AMSa}{"06}
\DeclareMathSymbol\blacklozenge{\mathord}{AMSa}{"07}
\DeclareMathSymbol\circlearrowright{\mathrel}{AMSa}{"08}
\DeclareMathSymbol\circlearrowleft{\mathrel}{AMSa}{"09}
\DeclareMathSymbol\rightleftharpoons{\mathrel}{AMSa}{"0A}
\DeclareMathSymbol\leftrightharpoons{\mathrel}{AMSa}{"0B}
\DeclareMathSymbol\boxminus{\mathbin}{AMSa}{"0C}
\DeclareMathSymbol\Vdash{\mathrel}{AMSa}{"0D}
\DeclareMathSymbol\Vvdash{\mathrel}{AMSa}{"0E}
\DeclareMathSymbol\vDash{\mathrel}{AMSa}{"0F}
\DeclareMathSymbol\twoheadrightarrow{\mathrel}{AMSa}{"10}
\DeclareMathSymbol\twoheadleftarrow{\mathrel}{AMSa}{"11}
\DeclareMathSymbol\leftleftarrows{\mathrel}{AMSa}{"12}
\DeclareMathSymbol\rightrightarrows{\mathrel}{AMSa}{"13}
\DeclareMathSymbol\upuparrows{\mathrel}{AMSa}{"14}
\DeclareMathSymbol\downdownarrows{\mathrel}{AMSa}{"15}
\DeclareMathSymbol\upharpoonright{\mathrel}{AMSa}{"16}
\DeclareMathSymbol\downharpoonright{\mathrel}{AMSa}{"17}
\DeclareMathSymbol\upharpoonleft{\mathrel}{AMSa}{"18}
\DeclareMathSymbol\downharpoonleft{\mathrel}{AMSa}{"19}
\DeclareMathSymbol\rightarrowtail{\mathrel}{AMSa}{"1A}
\DeclareMathSymbol\leftarrowtail{\mathrel}{AMSa}{"1B}
\DeclareMathSymbol\leftrightarrows{\mathrel}{AMSa}{"1C}
\DeclareMathSymbol\rightleftarrows{\mathrel}{AMSa}{"1D}
\DeclareMathSymbol\Lsh{\mathrel}{AMSa}{"1E}
\DeclareMathSymbol\Rsh{\mathrel}{AMSa}{"1F}
\DeclareMathSymbol\rightsquigarrow{\mathrel}{AMSa}{"20}
\DeclareMathSymbol\leftrightsquigarrow{\mathrel}{AMSa}{"21}
\DeclareMathSymbol\looparrowleft{\mathrel}{AMSa}{"22}
\DeclareMathSymbol\looparrowright{\mathrel}{AMSa}{"23}
\DeclareMathSymbol\circeq{\mathrel}{AMSa}{"24}
\DeclareMathSymbol\succsim{\mathrel}{AMSa}{"25}
\DeclareMathSymbol\gtrsim{\mathrel}{AMSa}{"26}
\DeclareMathSymbol\gtrapprox{\mathrel}{AMSa}{"27}
\DeclareMathSymbol\multimap{\mathrel}{AMSa}{"28}
\DeclareMathSymbol\therefore{\mathrel}{AMSa}{"29}
\DeclareMathSymbol\because{\mathrel}{AMSa}{"2A}
\DeclareMathSymbol\doteqdot{\mathrel}{AMSa}{"2B}
\DeclareMathSymbol\triangleq{\mathrel}{AMSa}{"2C}
\DeclareMathSymbol\precsim{\mathrel}{AMSa}{"2D}
\DeclareMathSymbol\lesssim{\mathrel}{AMSa}{"2E}
\DeclareMathSymbol\lessapprox{\mathrel}{AMSa}{"2F}
\DeclareMathSymbol\eqslantless{\mathrel}{AMSa}{"30}
\DeclareMathSymbol\eqslantgtr{\mathrel}{AMSa}{"31}
\DeclareMathSymbol\curlyeqprec{\mathrel}{AMSa}{"32}
\DeclareMathSymbol\curlyeqsucc{\mathrel}{AMSa}{"33}
\DeclareMathSymbol\preccurlyeq{\mathrel}{AMSa}{"34}
\DeclareMathSymbol\leqq{\mathrel}{AMSa}{"35}
\DeclareMathSymbol\leqslant{\mathrel}{AMSa}{"36}
\DeclareMathSymbol\lessgtr{\mathrel}{AMSa}{"37}
\DeclareMathSymbol\backprime{\mathord}{AMSa}{"38}
\DeclareMathSymbol\risingdotseq{\mathrel}{AMSa}{"3A}
\DeclareMathSymbol\fallingdotseq{\mathrel}{AMSa}{"3B}
\DeclareMathSymbol\succcurlyeq{\mathrel}{AMSa}{"3C}
\DeclareMathSymbol\geqq{\mathrel}{AMSa}{"3D}
\DeclareMathSymbol\geqslant{\mathrel}{AMSa}{"3E}
\DeclareMathSymbol\gtrless{\mathrel}{AMSa}{"3F}
\DeclareMathSymbol\sqsubset{\mathrel}{AMSa}{"40}
\DeclareMathSymbol\sqsupset{\mathrel}{AMSa}{"41}
\DeclareMathSymbol\vartriangleright{\mathrel}{AMSa}{"42}
\DeclareMathSymbol\vartriangleleft{\mathrel}{AMSa}{"43}
\DeclareMathSymbol\trianglerighteq{\mathrel}{AMSa}{"44}
\DeclareMathSymbol\trianglelefteq{\mathrel}{AMSa}{"45}
\DeclareMathSymbol\bigstar{\mathord}{AMSa}{"46}
\DeclareMathSymbol\between{\mathrel}{AMSa}{"47}
\DeclareMathSymbol\blacktriangledown{\mathord}{AMSa}{"48}
\DeclareMathSymbol\blacktriangleright{\mathrel}{AMSa}{"49}
\DeclareMathSymbol\blacktriangleleft{\mathrel}{AMSa}{"4A}
\DeclareMathSymbol\vartriangle{\mathord}{AMSa}{"4D}
\DeclareMathSymbol\blacktriangle{\mathord}{AMSa}{"4E}
\DeclareMathSymbol\triangledown{\mathord}{AMSa}{"4F}
\DeclareMathSymbol\eqcirc{\mathrel}{AMSa}{"50}
\DeclareMathSymbol\lesseqgtr{\mathrel}{AMSa}{"51}
\DeclareMathSymbol\gtreqless{\mathrel}{AMSa}{"52}
\DeclareMathSymbol\lesseqqgtr{\mathrel}{AMSa}{"53}
\DeclareMathSymbol\gtreqqless{\mathrel}{AMSa}{"54}
\DeclareMathSymbol\Rrightarrow{\mathrel}{AMSa}{"56}
\DeclareMathSymbol\Lleftarrow{\mathrel}{AMSa}{"57}
\DeclareMathSymbol\veebar{\mathbin}{AMSa}{"59}
\DeclareMathSymbol\barwedge{\mathbin}{AMSa}{"5A}
\DeclareMathSymbol\doublebarwedge{\mathbin}{AMSa}{"5B}
\DeclareMathSymbol\angle{\mathord}{AMSa}{"5C}
\DeclareMathSymbol\measuredangle{\mathord}{AMSa}{"5D}
\DeclareMathSymbol\sphericalangle{\mathord}{AMSa}{"5E}
\DeclareMathSymbol\varpropto{\mathrel}{AMSa}{"5F}
\DeclareMathSymbol\smallsmile{\mathrel}{AMSa}{"60}
\DeclareMathSymbol\smallfrown{\mathrel}{AMSa}{"61}
\DeclareMathSymbol\Subset{\mathrel}{AMSa}{"62}
\DeclareMathSymbol\Supset{\mathrel}{AMSa}{"63}
\DeclareMathSymbol\Cup{\mathbin}{AMSa}{"64}
\DeclareMathSymbol\Cap{\mathbin}{AMSa}{"65}
\DeclareMathSymbol\curlywedge{\mathbin}{AMSa}{"66}
\DeclareMathSymbol\curlyvee{\mathbin}{AMSa}{"67}
\DeclareMathSymbol\leftthreetimes{\mathbin}{AMSa}{"68}
\DeclareMathSymbol\rightthreetimes{\mathbin}{AMSa}{"69}
\DeclareMathSymbol\subseteqq{\mathrel}{AMSa}{"6A}
\DeclareMathSymbol\supseteqq{\mathrel}{AMSa}{"6B}
\DeclareMathSymbol\bumpeq{\mathrel}{AMSa}{"6C}
\DeclareMathSymbol\Bumpeq{\mathrel}{AMSa}{"6D}
\DeclareMathSymbol\lll{\mathrel}{AMSa}{"6E}
\DeclareMathSymbol\ggg{\mathrel}{AMSa}{"6F}
\DeclareMathDelimiter\ulcorner{4}{AMSa}{"70}{AMSa}{"70}
\DeclareMathDelimiter\urcorner{5}{AMSa}{"71}{AMSa}{"71}
\DeclareMathDelimiter\llcorner{4}{AMSa}{"78}{AMSa}{"78}
\DeclareMathDelimiter\lrcorner{5}{AMSa}{"79}{AMSa}{"79}
\xdef\yen      {\noexpand\mathhexbox\hexnumber@\symAMSa 55 }
\xdef\checkmark{\noexpand\mathhexbox\hexnumber@\symAMSa 58 }
\xdef\circledR {\noexpand\mathhexbox\hexnumber@\symAMSa 72 }
\xdef\maltese  {\noexpand\mathhexbox\hexnumber@\symAMSa 7A }
\DeclareMathSymbol\circledS{\mathord}{AMSa}{"73}
\DeclareMathSymbol\pitchfork{\mathrel}{AMSa}{"74}
\DeclareMathSymbol\dotplus{\mathbin}{AMSa}{"75}
\DeclareMathSymbol\backsim{\mathrel}{AMSa}{"76}
\DeclareMathSymbol\backsimeq{\mathrel}{AMSa}{"77}
\DeclareMathSymbol\complement{\mathord}{AMSa}{"7B}
\DeclareMathSymbol\intercal{\mathbin}{AMSa}{"7C}
\DeclareMathSymbol\circledcirc{\mathbin}{AMSa}{"7D}
\DeclareMathSymbol\circledast{\mathbin}{AMSa}{"7E}
\DeclareMathSymbol\circleddash{\mathbin}{AMSa}{"7F}
\DeclareMathSymbol\lvertneqq{\mathrel}{AMSb}{"00}
\DeclareMathSymbol\gvertneqq{\mathrel}{AMSb}{"01}
\DeclareMathSymbol\nleq{\mathrel}{AMSb}{"02}
\DeclareMathSymbol\ngeq{\mathrel}{AMSb}{"03}
\DeclareMathSymbol\nless{\mathrel}{AMSb}{"04}
\DeclareMathSymbol\ngtr{\mathrel}{AMSb}{"05}
\DeclareMathSymbol\nprec{\mathrel}{AMSb}{"06}
\DeclareMathSymbol\nsucc{\mathrel}{AMSb}{"07}
\DeclareMathSymbol\lneqq{\mathrel}{AMSb}{"08}
\DeclareMathSymbol\gneqq{\mathrel}{AMSb}{"09}
\DeclareMathSymbol\nleqslant{\mathrel}{AMSb}{"0A}
\DeclareMathSymbol\ngeqslant{\mathrel}{AMSb}{"0B}
\DeclareMathSymbol\lneq{\mathrel}{AMSb}{"0C}
\DeclareMathSymbol\gneq{\mathrel}{AMSb}{"0D}
\DeclareMathSymbol\npreceq{\mathrel}{AMSb}{"0E}
\DeclareMathSymbol\nsucceq{\mathrel}{AMSb}{"0F}
\DeclareMathSymbol\precnsim{\mathrel}{AMSb}{"10}
\DeclareMathSymbol\succnsim{\mathrel}{AMSb}{"11}
\DeclareMathSymbol\lnsim{\mathrel}{AMSb}{"12}
\DeclareMathSymbol\gnsim{\mathrel}{AMSb}{"13}
\DeclareMathSymbol\nleqq{\mathrel}{AMSb}{"14}
\DeclareMathSymbol\ngeqq{\mathrel}{AMSb}{"15}
\DeclareMathSymbol\precneqq{\mathrel}{AMSb}{"16}
\DeclareMathSymbol\succneqq{\mathrel}{AMSb}{"17}
\DeclareMathSymbol\precnapprox{\mathrel}{AMSb}{"18}
\DeclareMathSymbol\succnapprox{\mathrel}{AMSb}{"19}
\DeclareMathSymbol\lnapprox{\mathrel}{AMSb}{"1A}
\DeclareMathSymbol\gnapprox{\mathrel}{AMSb}{"1B}
\DeclareMathSymbol\nsim{\mathrel}{AMSb}{"1C}
\DeclareMathSymbol\ncong{\mathrel}{AMSb}{"1D}
\DeclareMathSymbol\varsubsetneq{\mathrel}{AMSb}{"20} 
\DeclareMathSymbol\varsupsetneq{\mathrel}{AMSb}{"21}
\DeclareMathSymbol\nsubseteqq{\mathrel}{AMSb}{"22}
\DeclareMathSymbol\nsupseteqq{\mathrel}{AMSb}{"23}
\DeclareMathSymbol\subsetneqq{\mathrel}{AMSb}{"24}
\DeclareMathSymbol\supsetneqq{\mathrel}{AMSb}{"25}
\DeclareMathSymbol\varsubsetneqq{\mathrel}{AMSb}{"26}
\DeclareMathSymbol\varsupsetneqq{\mathrel}{AMSb}{"27}
\DeclareMathSymbol\subsetneq{\mathrel}{AMSb}{"28}
\DeclareMathSymbol\supsetneq{\mathrel}{AMSb}{"29}
\DeclareMathSymbol\nsubseteq{\mathrel}{AMSb}{"2A}
\DeclareMathSymbol\nsupseteq{\mathrel}{AMSb}{"2B}
\DeclareMathSymbol\nparallel{\mathrel}{AMSb}{"2C}
\DeclareMathSymbol\nmid{\mathrel}{AMSb}{"2D}
\DeclareMathSymbol\nshortmid{\mathrel}{AMSb}{"2E}
\DeclareMathSymbol\nshortparallel{\mathrel}{AMSb}{"2F}
\DeclareMathSymbol\nvdash{\mathrel}{AMSb}{"30}
\DeclareMathSymbol\nVdash{\mathrel}{AMSb}{"31}
\DeclareMathSymbol\nvDash{\mathrel}{AMSb}{"32}
\DeclareMathSymbol\nVDash{\mathrel}{AMSb}{"33}
\DeclareMathSymbol\ntrianglerighteq{\mathrel}{AMSb}{"34}
\DeclareMathSymbol\ntrianglelefteq{\mathrel}{AMSb}{"35}
\DeclareMathSymbol\ntriangleleft{\mathrel}{AMSb}{"36}
\DeclareMathSymbol\ntriangleright{\mathrel}{AMSb}{"37}
\DeclareMathSymbol\nleftarrow{\mathrel}{AMSb}{"38}
\DeclareMathSymbol\nrightarrow{\mathrel}{AMSb}{"39}
\DeclareMathSymbol\nLeftarrow{\mathrel}{AMSb}{"3A}
\DeclareMathSymbol\nRightarrow{\mathrel}{AMSb}{"3B}
\DeclareMathSymbol\nLeftrightarrow{\mathrel}{AMSb}{"3C}
\DeclareMathSymbol\nleftrightarrow{\mathrel}{AMSb}{"3D}
\DeclareMathSymbol\divideontimes{\mathbin}{AMSb}{"3E}
\DeclareMathSymbol\varnothing{\mathord}{AMSb}{"3F}
\DeclareMathSymbol\mho{\mathord}{AMSb}{"66}
\DeclareMathSymbol\eth{\mathord}{AMSb}{"67}
\DeclareMathSymbol\eqsim{\mathrel}{AMSb}{"68}
\DeclareMathSymbol\beth{\mathord}{AMSb}{"69}
\DeclareMathSymbol\gimel{\mathord}{AMSb}{"6A}
\DeclareMathSymbol\daleth{\mathord}{AMSb}{"6B}
\DeclareMathSymbol\lessdot{\mathrel}{AMSb}{"6C}
\DeclareMathSymbol\gtrdot{\mathrel}{AMSb}{"6D}
\DeclareMathSymbol\ltimes{\mathbin}{AMSb}{"6E}
\DeclareMathSymbol\rtimes{\mathbin}{AMSb}{"6F}
\DeclareMathSymbol\shortmid{\mathrel}{AMSb}{"70}
\DeclareMathSymbol\shortparallel{\mathrel}{AMSb}{"71}
\DeclareMathSymbol\smallsetminus{\mathbin}{AMSb}{"72}
\DeclareMathSymbol\thicksim{\mathrel}{AMSb}{"73}
\DeclareMathSymbol\thickapprox{\mathrel}{AMSb}{"74}
\DeclareMathSymbol\approxeq{\mathrel}{AMSb}{"75}
\DeclareMathSymbol\succapprox{\mathrel}{AMSb}{"76}
\DeclareMathSymbol\precapprox{\mathrel}{AMSb}{"77}
\DeclareMathSymbol\curvearrowleft{\mathrel}{AMSb}{"78}
\DeclareMathSymbol\curvearrowright{\mathrel}{AMSb}{"79}
\DeclareMathSymbol\digamma{\mathord}{AMSb}{"7A}
\DeclareMathSymbol\varkappa{\mathord}{AMSb}{"7B}
\DeclareMathSymbol\hslash{\mathord}{AMSb}{"7D}
\DeclareMathSymbol\hbar{\mathord}{AMSb}{"7E}
\DeclareMathSymbol\backepsilon{\mathrel}{AMSb}{"7F}

% A macro name has been chosen for each of the symbols in the AMS
% fonts.  There is no need to load any other AMS package in order to
% access these symbols. 

% >>> fuzz <<<

% This is the standard fuzz setup, apart from the oz style change to
% the setmcodes macro. 

\def\@setmcodes#1#2#3{{\count0=#1 \count1=#3
    \loop \global\mathcode\count0=\count1 \ifnum \count0<#2
    \advance\count0 by1 \advance\count1 by1 \repeat}}
\@setmcodes{`A}{`Z}{"7\hexnumber@\symitalics41}% 
\@setmcodes{`a}{`z}{"7\hexnumber@\symitalics61}% 

\def~{\ifmmode\,\else\penalty\@M\ \fi}

\let\@mc=\mathchardef \mathcode`\;="8000 {\catcode`\;=\active
  \gdef;{\semicolon\;}} \@mc\semicolon="603B

\def\strut@op#1{\mathop{\mathstrut{#1}}\nolimits}

\def\_{\leavevmode \ifmmode\else\kern0.06em\fi \vbox{\hrule
    width0.5em}} 

\mathcode`\"="8000 \def\@kwote#1"{\hbox{\it #1}} {\catcode`\"=\active
  \global\let"=\@kwote}

\mathchardef\spot="320F
\mathcode`\@=\spot
\mathcode`\|=\mid

\def\bsup#1 \esup{^{#1}}

\def\inrel#1{\mathrel{\underline{#1}}}

\newdimen\zedindent \zedindent=\leftmargini%
\newdimen\zedleftsep \zedleftsep=1em%
\newdimen\zedtab \zedtab=2em%
\newdimen\zedbar \zedbar=6em%
\newskip\zedskip \zedskip=0.5\baselineskip plus0.333333\baselineskip% 
                                minus0.333333\baselineskip%
\def\zedsize{}%

\newcount\interzedlinepenalty \interzedlinepenalty=10000%
\newcount\preboxpenalty \preboxpenalty=0%
\newif\ifzt@p           \zt@pfalse%

\def\@jot{0.5\zedskip}

\def\@narrow{\advance\linewidth by-\zedindent}

\def\@zrulefill{\leaders\hrule height\arrayrulewidth\hfill}

\def\@topline#1{\hbox to\linewidth{%
    \vrule height\arrayrulewidth width\arrayrulewidth
    \vrule height0pt depth\@jot width0pt
    \hbox to\zedleftsep{\@zrulefill\thinspace}%
    #1\thinspace\@zrulefill}}

\def\@zedline{\omit \vrule height\arrayrulewidth width\linewidth \cr}

\def\where{\@zskip\@jot
  \omit \vrule height\arrayrulewidth width\zedbar \cr
  \@zskip\@jot}

\def\also{\crcr \noalign{\penalty\interdisplaylinepenalty
    \vskip\zedskip}} 
\def\@zskip#1{\crcr \omit \vrule height#1 width\arrayrulewidth \cr}
\def\@zlign{\tabskip\z@skip\everycr{}} 

\let\tie=\t
\def\t#1{\afterassignment\@t\count@=#1}
\def\@t{\hskip\count@\zedtab}

\def\@setzsize{\let\next=\@nomath\def\@nomath##1{}%
  \skip0=\abovedisplayskip\skip1=\belowdisplayskip
  \zedsize \let\@nomath=\next 
  \abovedisplayskip=\skip0\belowdisplayskip=\skip1}

\def\@zed{\ifvmode\@zleavevmode\fi
  $$\global\zt@ptrue
  \@setzsize
  \advance\linewidth by-\zedindent
  \advance\displayindent by\zedindent
  \def\\{\crcr}% Must have \def and not \let for nested alignments.
  \let\par=\relax
  \tabskip=0pt}

\def\@znoskip{\offinterlineskip
  \everycr={\noalign{\ifzt@p \global\zt@pfalse
      \ifdim\prevdepth>-1000pt \skip0=\normalbaselineskip
        \advance\skip0by-\prevdepth \advance\skip0by-\ht\strutbox
        \ifdim\skip0<\normallineskiplimit \vskip\normallineskip
        \else \vskip\skip0 \fi\fi
    \else \penalty\interzedlinepenalty \fi}}}

\def\zed{\@zed\@znoskip\halign to\linewidth\bgroup
  \strut$\@zlign##$\hfil \tabskip=0pt plus1fil\cr}
\def\endzed{\crcr\egroup$$\global\@ignoretrue}

\if@fuzz@
  \def\[{\begingroup\zed}
  \def\]{\crcr\egroup$$\endgroup\ignorespaces}
\fi

\def\axdef{\def\also{\@zskip\zedskip}%
  \predisplaypenalty=\preboxpenalty
  \@zed\@znoskip \halign to\linewidth\bgroup
    \strut \vrule width\arrayrulewidth \hskip\zedleftsep
    $\@zlign##$\hfil \tabskip=0pt plus1fil\cr}
\let\endaxdef=\endzed

\def\schema#1{\@ifnextchar[{\@schema{#1}}{\@nschema{#1}}}
\def\@schema#1[#2]{\@nschema{#1[#2]}}
\def\@nschema#1{\@narrow\axdef \omit\@topline{$\strut#1$}\cr}
\def\endschema{\@zskip\@jot \@zedline \endzed}

\@namedef{schema*}{\@narrow\axdef \@zedline \@zskip\@jot}
\expandafter\let\csname endschema*\endcsname=\endschema

\def\gendef{\@ifnextchar[{\@gendef}{\@ngendef}}
\def\@gendef[#1]{\@narrow\axdef \omit \setbox0=\hbox{$\strut[#1]$}%
  \rlap{\raise\doublerulesep\@topline{\hskip\wd0}}\@topline{\box0}\cr}
\def\@ngendef{\@narrow\axdef \@zedline \omit \hbox to\linewidth{\vrule
    height\doublerulesep width\arrayrulewidth \@zrulefill}\cr
  \@zskip\@jot
  } 
\let\endgendef=\endschema

\def\argue{\@zed \interzedlinepenalty=\interdisplaylinepenalty
  \openup\@jot \halign to\linewidth\bgroup
  \strut$\@zlign##$\hfil \tabskip=0pt plus1fil
  &\hbox to0pt{\hss[\@zlign##\unskip]}\tabskip=0pt\cr
  \noalign{\vskip-\@jot}}
\let\endargue=\endzed

\def\because#1{\noalign{\vskip-\jot}&#1\cr}

\def\syntax{\@zed\@znoskip \halign\bgroup
  \strut$\@zlign##$\hfil &\hfil$\@zlign{}##{}$\hfil
  &$\@zlign##$\hfil\cr}
\let\endsyntax=\endzed

\def\infrule{\@zed\@znoskip \halign\bgroup
  \strut\quad$\@zlign##$\quad\hfil&\quad\@zlign##\hfil\cr}
\let\endinfrule=\endzed

\def\derive{\crcr \noalign{\vskip\@jot} \omit\@zrulefill
  \@ifnextchar[{\@xderive}{\@yderive}}
\def\@xderive[#1]{&$\smash{\lower 0.5ex\hbox{$[\;#1\;]$}}$\cr 
  \noalign{\vskip\@jot}}
\def\@yderive{\cr \noalign{\vskip\@jot}}

\def\@zleavevmode{\if@inlabel \indent
  \else\if@noskipsec \indent
  \else\if@nobreak \global\@nobreakfalse
  \everypar={}\abovedisplayskip=0pt\fi
  {\parskip=0pt\noindent}\fi\fi}

% From now on, we must depart from the text of fuzz, as we do not have
% the ox symbol font at our disposal.  We must choose symbols from
% the AMS fonts to compensate for our loss.  

\let\xlambda=\lambda \let\xmu=\mu 
\let\xforall=\forall \let\xexists=\exists

\def \bind      {\mathrel{\leadsto}}
\def \bindsto   {\mathrel{\leadsto}}

\def \lblot     {{\langle}\mkern -3.5mu{|}}
\def \rblot     {{|}\mkern -3.5mu{\rangle}}

\let\lbind=\lblot
\let\rbind=\rblot

\def \defs      {\mathrel{\widehat=}}
\def \power     {\strut@op{\bbold P}}
\let \cross     \times
\def \lambda    {\strut@op{\xlambda}}
\def \mu        {\strut@op{\xmu}}
\def \ldbrack{{[}\mkern-2mu{[}}
\def \rdbrack{{]}\mkern-2mu{]}}
\let \lbag      \ldbrack
\let \rbag      \rdbrack
\def \lnot      {\neg\;}
\def \land      {\mathrel{\wedge}}
\def \lor       {\mathrel{\vee}}
\let \implies   \Rightarrow
\let \iff       \Leftrightarrow
\def \forall    {\strut@op{\xforall}}
\def \exists    {\strut@op{\xexists}}
\def \hide      {\mathrel{\backslash}}
\DeclareMathSymbol{\project}{\mathrel}{AMSa}{"16}
\def \pre       {{\mathrm{pre}}\;}
\def \semi      {\mathrel{\comp}}
\def \ldata     {\langle\!\langle}
\def \rdata     {\rangle\!\rangle}
\let \shows     \vdash
\def \pipe      {\mathord>\!\!\mathord>}
\def \LET       {{\mathbf{let}}\;}
\def \IF        {{\mathbf{if}}\;}
\def \IN        {{\mathbf{in}}\;}
\def \THEN      {\mathrel{\mathbf{then}}}
\def \ELSE      {\mathrel{\mathbf{else}}}

\let \rel       \leftrightarrow
\def \dom       {\mathop{\mathrm{dom}}}
\def \ran       {\mathop{\mathrm{ran}}}
\def \id        {\mathop{\mathrm{id}}}
\def\comp{\mathbin{\raise 0.6ex\hbox{\small\oalign{\hfil%
        $\scriptscriptstyle\mathrm{o}$\hfil%
        \cr\hfil$\scriptscriptstyle\mathrm{9}$\hfil}}}}
\DeclareMathSymbol{\dres}{\mathbin}{AMSa}{"43}
\DeclareMathSymbol{\rres}{\mathbin}{AMSa}{"42}
\def \ndres     {\mathbin{\rlap{\raise.05ex\hbox{$-$}}{\dres}}}
\def \nrres     {\mathbin{\rlap{\raise.05ex\hbox{$-$}}{\rres}}}
\def \inv       {^\sim}
\def \limg      {(\mskip-4.5mu|}
\def \rimg      {|\mskip-4.5mu)}

\def\@p#1{\mathrel{\ooalign{\hfil$\mapstochar\mkern
      5mu$\hfil\cr$#1$}}} 
\def \pfun      {\@p\fun}
\let \fun       \rightarrow
\let \inj       \rightarrowtail
\def \pinj {\@p\inj}
\def \surj {\mathrel{\ooalign{$\fun$\hfil\cr$\mkern4mu\fun$}}}
\def \bij  {\mathrel{\ooalign{$\inj$\hfil\cr$\mkern5mu\fun$}}}
\def \psurj     {\@p\surj}
\def \nat       {{\bbold N}}
\def \num       {{\bbold Z}}
\def \div       {\mathbin{\mathsf{div}}}
\def \mod       {\mathbin{\mathsf{mod}}}
\def \upto      {\mathbin{\ldotp\ldotp}}
\def \plus      {^+}
\def \star      {^*}
\def \finset    {\strut@op{{\bbold F}}}
\def\@f#1{\mathrel{\ooalign{\hfil$\mapstochar\mkern 3mu 
      \mapstochar\mkern 5mu$\hfil\cr$#1$}}}
\def \ffun      {\@f\fun}
\def \finj      {\@f\inj}
\def \seq       {\mathop{\mathrm{seq}}}
\def \iseq      {\mathop{\mathrm{iseq}}}
\def \cat       {\mathbin{\raise 0.8ex\hbox{$\smallfrown$}}}
\def \filter    {\mathbin{\project}}
\def \dcat      {\mathop{\cat/}}
\def \bag       {\mathop{\mathrm{bag}}}
\def \bcount    {\mathbin{\sharp}}

\def \inbag     {\mathrel{\rlap{\hbox{$-$}}{\sqsubset}}}
\let \subbageq  \sqsubseteq
\def \disjoint  {{\mathsf{disjoint}}\;}
\def \partition {\mathrel{\mathsf{partition}}}
\def \prefix    {\mathrel{\mathsf{prefix}}}
\def \suffix    {\mathrel{\mathsf{suffix}}}
\def \inseq     {\mathrel{\mathsf{in}}}
\def \extract   {\mathrel{\upharpoonleft}} 

\def \uminus@sym{\setbox0=\hbox{$\cup$}\rlap{\hbox 
    to\wd0{\hss\raise0.3ex\hbox{$\scriptscriptstyle{-}$}\hss}}\box0}
\def \uminus    {\mathrel{\uminus@sym}}

%% nice macro names

\def \union     {\cup}
\def \inter     {\cap}
\def \Union     {\bigcup}
\def \Inter     {\bigcap}
\def \nil       {\langle\rangle}
\def \drop      {\array[t]{@{}l@{}}}
\def \enddrop   {\endarray}

\endinput
