| 1 |
\def\fileversion{2.46} |
| 2 |
\def\filedate{1999/05/24} |
| 3 |
\def\docdate {1994/08/13} |
| 4 |
% |
| 5 |
% \iffalse |
| 6 |
%% File: oz.dtx Copyright (C) 1995-1999 Sebastian Rahtz |
| 7 |
% Permission is hereby granted, free of charge, to any person obtaining |
| 8 |
% a copy of this software and associated documentation files (the |
| 9 |
% ``Software''), to deal in the Software without restriction, including |
| 10 |
% without limitation the rights to use, copy, modify, merge, publish, |
| 11 |
% distribute, sublicense, and/or sell copies of the Software, and to |
| 12 |
% permit persons to whom the Software is furnished to do so, subject to |
| 13 |
% the following conditions: |
| 14 |
% |
| 15 |
% The above copyright notice and this permission notice shall be included |
| 16 |
% in all copies or substantial portions of the Software. |
| 17 |
% |
| 18 |
% THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 19 |
% OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 20 |
% MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 21 |
% IN NO EVENT SHALL SEBASTIAN RAHTZ BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 22 |
% OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 23 |
% ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 24 |
% OTHER DEALINGS IN THE SOFTWARE. |
| 25 |
% |
| 26 |
%<*driver> |
| 27 |
\documentclass{ltxdoc} |
| 28 |
\begin{document} |
| 29 |
\title{The \textsf{oz} package\thanks{This file |
| 30 |
has version number \fileversion, last |
| 31 |
revised \filedate.}} |
| 32 |
\author{edited by Sebastian Rahtz\\[email protected]} |
| 33 |
\date{\filedate} |
| 34 |
\maketitle |
| 35 |
\tableofcontents |
| 36 |
\DocInput{oz.dtx} |
| 37 |
\end{document} |
| 38 |
%</driver> |
| 39 |
% \fi |
| 40 |
% \CheckSum{3387} |
| 41 |
% |
| 42 |
% \section{Introduction} |
| 43 |
% |
| 44 |
% This file provides macros to typeset Object Z schemas. |
| 45 |
%\subsection{Modification History} |
| 46 |
% |
| 47 |
% The original zed.sty file was written by Mike Spivey. |
| 48 |
% These macros have been extensively modified to |
| 49 |
% include extra symbols and environments for Object-Z |
| 50 |
% and now have little resemblence to the original macros. |
| 51 |
% Mike Spivey has also extended his macros along |
| 52 |
% different lines for Z --- the latest version of macros |
| 53 |
% are called fuzz.sty and come with a syntax checker for Z. |
| 54 |
% They can be purchased for a small fee from: |
| 55 |
% \texttt{[email protected]} |
| 56 |
% |
| 57 |
% \begin{quote} |
| 58 |
% \begin{tabular}{lp{.6\textwidth}} |
| 59 |
% 87 &original zed.sty file --- Mike Spivey\\ |
| 60 |
% 88 &modified to include extra symbols and environments --- |
| 61 |
% Paul King\\ |
| 62 |
% 88 &modified to include macros for UQ editor --- Ray Neucom\\ |
| 63 |
% May 89 &modified to include object-oriented constructs --- PK\\ |
| 64 |
% Jun 89 &modified to automatically change Z symbol size --- PK\\ |
| 65 |
% 27 Jul 89 &removed spurious space from |\@setsize| --- PK\\ |
| 66 |
% 3 Aug 89 &adjust style of equation number field --- PK\\ |
| 67 |
% 24 Aug 89 &add optional field to topline and zedline for proofs --- |
| 68 |
% PK\\ |
| 69 |
% 15 Sep 89 &added extra qed symbols, updated classcom and comment --- |
| 70 |
% PK\\ |
| 71 |
% 25 Sep 89 &renamed z@[bB]ig to z[bB]ig and changed temporal symbols |
| 72 |
% --- PK\\ |
| 73 |
% 30 Sep 89 &added |\znewpage|, |\Infrule|, removed space above state |
| 74 |
% box --- PK\\ |
| 75 |
% 12 Mar 90 &changed |\@setsize| to work better for double-spaced text |
| 76 |
% --- PK\\ |
| 77 |
% 31 Mar 90 &added definition for @ and |\bool| and redefined `;' --- |
| 78 |
% PK\\ |
| 79 |
% 9 May 90 &changed |\sdef| to |\varsdef|, |\sdef| \& |\def|s to |
| 80 |
% Spivey's latest --- PK\\ |
| 81 |
% 27 May 90 &added |\c{n}{text}| --- a tab like |\t{n}| with text at |
| 82 |
% left --- PK\\ |
| 83 |
% 29 May 90 &added `corners' to boxes and |\zedcornerheight| --- PK\\ |
| 84 |
% 11 Jul 90 &added |\rename*[y/x]| and |\zseq \zset| ..., changed |\zeq| |
| 85 |
% |\zimp| --- PK\\ |
| 86 |
% 2 Aug 90 &added subseq --- PK\\ |
| 87 |
% 2 Aug 90 &added |\subseq|, |\iseq| - PK\\ |
| 88 |
% \end{tabular} |
| 89 |
% |
| 90 |
% \begin{tabular}{lp{.6\textwidth}} |
| 91 |
% 9 Nov 90 &changed |\M| to hopefully interact better with spacing --- |
| 92 |
% PK\\ |
| 93 |
% 18 Dec 90 &changed to new AMS 2.0 fonts - PK (with help from Adrian Lee)\\ |
| 94 |
% 11 Feb 91 &added |\poly| |\widen| and modified |\gendef| - PK\\ |
| 95 |
% 10 Apr 91 &added |\fuzzcompatible| - PK\\ |
| 96 |
% 1 Apr 91 &added |\gengendef| - Steve Atkinson\\ |
| 97 |
% 24 Feb 92 &changed to work with NFSS --- Sebastian Rahtz\\ |
| 98 |
% 29 Dec 92 &changed to work with NFSS2 --- Sebastian Rahtz\\ |
| 99 |
% 23 Dec 93 &checked for |\LaTeXe|\\ |
| 100 |
% 6 Jan 94 &checked again for |\LaTeXe| with help of David Carlisle\\ |
| 101 |
% 7 Apr 94 & checked again, bundle files added\\ |
| 102 |
% 13 Aug 94 & removed hard-wired number of family for math letters\\ |
| 103 |
% & removed definition of |\c| as it prevents cedilla from working\\ |
| 104 |
% 22 Feb 95 & updated for AMSLaTeX 2.1 and Lucida compatibility\\ |
| 105 |
% 30 Aug 96 &added Object-Z notations in Section 2A - SA\\ |
| 106 |
% 17 Sep 97 &re-added |\zedbaselinestretch| -- David Leadbetter\\ |
| 107 |
% 20 July 98 &|state| environment can be used in |sidebyside| \\ |
| 108 |
% &changed to work with |slides| class -- DL\\ |
| 109 |
% 4 Nov 98 & fixed |\zedbaselinestretch| -- DL\\ |
| 110 |
% 17 Nov 98 & fixed |\Init|, etc -- DL\\ |
| 111 |
% 24 May 99 & removed extra space output by |\fontsize| -- Ian Hayes and DL |
| 112 |
% \end{tabular} |
| 113 |
% \end{quote} |
| 114 |
% |
| 115 |
%\subsection{Known Problems} |
| 116 |
% |
| 117 |
%\begin{enumerate} |
| 118 |
% \item |\bBigg| defines |\zBig|, etc as fixed font sizes - |
| 119 |
% in the original oz.sty (for \LaTeX 2.09) these sizing commands change |
| 120 |
% the font size relative to the current font size (so a |\zBig| |
| 121 |
% in the scope of a |\large| is bigger than a |\zBig| |
| 122 |
% in the scope of a |\normalsize|); |
| 123 |
% \item |sidebyside| works very poorly with the |class| environment |
| 124 |
% - indentation of operation schemas is wrong; |
| 125 |
% \item the |calc| package is needed for |\zedbaselinestretch|. |
| 126 |
%\end{enumerate} |
| 127 |
% |
| 128 |
% |
| 129 |
%\subsection{The Object-Z Homepage} |
| 130 |
% |
| 131 |
% The Object-Z homepage (http://svrc.it.uq.edu.au/Object-Z/) contains: |
| 132 |
% |
| 133 |
% \begin{itemize} |
| 134 |
% \item Papers and Tech-reports on Object-Z; |
| 135 |
% \item {\bf wizard} - the Object-Z type checker. |
| 136 |
% \end{itemize} |
| 137 |
% |
| 138 |
% \noindent Please post any updates that you may make to this file to the |
| 139 |
% Formal Methods Group -- [email protected] |
| 140 |
% |
| 141 |
% |
| 142 |
% |
| 143 |
% \newpage |
| 144 |
% |
| 145 |
% \StopEventually{} |
| 146 |
% |
| 147 |
% \begin{macrocode} |
| 148 |
%<*package> |
| 149 |
\NeedsTeXFormat{LaTeX2e}[1994/12/01] |
| 150 |
\ProvidesPackage{oz}[\filedate\space\fileversion\space Object Z macros] |
| 151 |
\message{`Object-Z Macros' \fileversion\space <\filedate>} |
| 152 |
\RequirePackage{calc} |
| 153 |
% \end{macrocode} |
| 154 |
% The \LaTeXe\ parbox code is much more complicated, so we get back |
| 155 |
% a simpler world from \LaTeX 209. |
| 156 |
% \begin{macrocode} |
| 157 |
\def\oz@parbox{\@ifnextchar [{\oz@iparbox}{\oz@iparbox[c]}} |
| 158 |
\long\def\oz@iparbox[#1]#2#3{\leavevmode \@pboxswfalse |
| 159 |
\if #1b\vbox |
| 160 |
\else \if #1t\vtop |
| 161 |
\else \vbox |
| 162 |
%\ifmmode \vcenter \else \@pboxswtrue $\vcenter \fi |
| 163 |
\fi |
| 164 |
\fi |
| 165 |
{\hsize #2\@parboxrestore #3} |
| 166 |
%\if@pboxsw \m@th$\fi |
| 167 |
} |
| 168 |
% \end{macrocode} |
| 169 |
% |
| 170 |
%\section{Z fonts} |
| 171 |
% |
| 172 |
% The AMS extra symbol fonts are loaded if we are not using Lucida New Math. |
| 173 |
% Note: msam and msbm sometimes called euxm and euym respectively |
| 174 |
% NOTE: the new AMSFONTS 2.0 call these fonts msam and msbm repectively |
| 175 |
% (the fonts below need to be renamed if you want to use the new fonts) |
| 176 |
% |
| 177 |
% \begin{macrocode} |
| 178 |
\@ifpackageloaded{lucbr}{}{% |
| 179 |
\DeclareMathVersion{oz} |
| 180 |
\SetMathAlphabet{\mathrm}{oz}{\encodingdefault}{\rmdefault}{m}{n}% |
| 181 |
\SetMathAlphabet{\mathbf}{oz}{\encodingdefault}{\rmdefault}{bx}{n}% |
| 182 |
\SetMathAlphabet{\mathsf}{oz}{\encodingdefault}{\sfdefault}{m}{n}% |
| 183 |
\DeclareSymbolFont{italics}{\encodingdefault}{\rmdefault}{m}{it}% |
| 184 |
\DeclareSymbolFontAlphabet{\mathrm}{operators} |
| 185 |
\DeclareSymbolFontAlphabet{\mathit}{letters} |
| 186 |
\DeclareSymbolFontAlphabet{\mathcal}{symbols} |
| 187 |
\DeclareSymbolFontAlphabet{\ozit}{italics} |
| 188 |
\DeclareSymbolFont{lasy}{U}{lasy}{m}{n} |
| 189 |
\DeclareSymbolFont{AMSa}{U}{msa}{m}{n} |
| 190 |
\DeclareSymbolFont{AMSb}{U}{msb}{m}{n} |
| 191 |
\let\mho\undefined |
| 192 |
\let\Join\undefined |
| 193 |
\let\Box\undefined |
| 194 |
\let\Diamond\undefined |
| 195 |
\let\leadsto\undefined |
| 196 |
\let\sqsubset\undefined |
| 197 |
\let\sqsupset\undefined |
| 198 |
\let\lhd\undefined |
| 199 |
\let\unlhd\undefined |
| 200 |
\let\rhd\undefined |
| 201 |
\let\unrhd\undefined |
| 202 |
\DeclareMathSymbol{\mho}{\mathord}{lasy}{"30} |
| 203 |
\DeclareMathSymbol{\Join}{\mathrel}{lasy}{"31} |
| 204 |
\DeclareMathSymbol{\Box}{\mathord}{lasy}{"32} |
| 205 |
\DeclareMathSymbol{\Diamond}{\mathord}{lasy}{"33} |
| 206 |
\DeclareMathSymbol{\leadsto}{\mathrel}{lasy}{"3B} |
| 207 |
\DeclareMathSymbol{\sqsubset}{\mathrel}{lasy}{"3C} |
| 208 |
\DeclareMathSymbol{\sqsupset}{\mathrel}{lasy}{"3D} |
| 209 |
\DeclareMathSymbol{\lhd}{\mathrel}{lasy}{"01} |
| 210 |
\DeclareMathSymbol{\unlhd}{\mathrel}{lasy}{"02} |
| 211 |
\DeclareMathSymbol{\rhd}{\mathrel}{lasy}{"03} |
| 212 |
\DeclareMathSymbol{\unrhd}{\mathrel}{lasy}{"04} |
| 213 |
\DeclareSymbolFontAlphabet{\mathbb}{AMSb} |
| 214 |
\DeclareSymbolFontAlphabet{\bbold}{AMSb} |
| 215 |
\mathversion{oz} |
| 216 |
} |
| 217 |
% \end{macrocode} |
| 218 |
% |
| 219 |
% Allow change of size within schemas. This is a sod to get right; |
| 220 |
% my principle (eventually!) was to go out of math temporarily, change |
| 221 |
% size, go into an inner math, do the business, then get out of math |
| 222 |
% and back to outer math. |
| 223 |
% |
| 224 |
% \begin{macrocode} |
| 225 |
\newbox\strutbox@ |
| 226 |
\def\strut@{\copy\strutbox@} |
| 227 |
\addto@hook\every@math@size{% |
| 228 |
\setbox\strutbox@\hbox{\lower.5\normallineskiplimit |
| 229 |
\vbox{\kern-\normallineskiplimit\copy\strutbox}}} |
| 230 |
|
| 231 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 232 |
%% NOTE: bBigg is used to define the font size for zbig etc |
| 233 |
%% however it defines these as fixed sizes. |
| 234 |
%% The 209 definitions set the font size dependent on the |
| 235 |
%% current point size. |
| 236 |
%% |
| 237 |
%% Hence in 209 you can do \Large\cnj and the symbol is bigger |
| 238 |
%% But in 2e it remains a fixed size! |
| 239 |
%% |
| 240 |
%% This is a problem for the Object-Z operators as originally |
| 241 |
%% defined in the 209 oz.sty `96 file. |
| 242 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 243 |
|
| 244 |
\def\bBigg@#1#2{% |
| 245 |
\mbox{\ifcase#1\or\large\or\Large\or\LARGE\or\small\or\footnotesize\fi |
| 246 |
$#2$}\nulldelimiterspace\z@ \m@th} |
| 247 |
\addto@hook\every@math@size{\setbox\z@\vbox{\hbox{$($}\kern\z@}% |
| 248 |
\big@size 1.2\ht\z@} |
| 249 |
\newdimen\big@size |
| 250 |
\def\zBIG{\bBigg@{3}} |
| 251 |
\def\zBig{\bBigg@{2}} |
| 252 |
\def\zbig{\bBigg@{1}} |
| 253 |
\def\zsmall{\bBigg@{4}} |
| 254 |
\def\zSmall{\bBigg@{5}} |
| 255 |
% \end{macrocode} |
| 256 |
% |
| 257 |
% WORD STYLES |
| 258 |
% these need handling a bit differently in NFSS from the original. |
| 259 |
% |
| 260 |
% \begin{macrocode} |
| 261 |
\def\String#1{\hbox{`\texttt{#1}'}} |
| 262 |
\def\STRING#1{\hbox{``\texttt{#1}''}} |
| 263 |
\def\infix#1{\z@rel{{\underline{#1}}}} |
| 264 |
\def\word#1{\z@op{#1}} |
| 265 |
\def\keyword#1{\z@op{\mbox{\textrm{#1}}}} |
| 266 |
\def\boldword#1{\z@op{\mbox{\textbf{#1}}}} |
| 267 |
\def\underword#1{\z@op{{\underline{#1}}}} |
| 268 |
\def\underkeyword#1{\z@op{{\underline{\mbox{\textrm{#1}}}}}} |
| 269 |
\def\underboldword#1{\z@op{{\underline{\mbox{\textbf{#1}}}}}} |
| 270 |
% \end{macrocode} |
| 271 |
% |
| 272 |
%\section{Z symbols} |
| 273 |
% |
| 274 |
% The mathcodes for the letters A, ..., Z, a, ..., z are changed to |
| 275 |
% generate text italic rather than math italic by default. This makes |
| 276 |
% multi-letter identifiers look better. The mathcode for character c |
| 277 |
% is set to |"7000| (variable family) + |"400| (text italic) + |c|. |
| 278 |
% |
| 279 |
% \begin{macrocode} |
| 280 |
\def\@setmcodes#1#2#3{{\count0=#1 \count1=#3 |
| 281 |
\loop \global\mathcode\count0=\count1 \ifnum \count0<#2 |
| 282 |
\advance\count0 by1 \advance\count1 by1 \repeat}} |
| 283 |
% \end{macrocode} |
| 284 |
% Use |\hexnumber@\symitalics| |
| 285 |
% in case other families are loaded before. |
| 286 |
% (from D. Roegel, July 13, 1994) |
| 287 |
% \begin{macrocode} |
| 288 |
\@setmcodes{`A}{`Z}{"7\hexnumber@\symitalics41} |
| 289 |
\@setmcodes{`a}{`z}{"7\hexnumber@\symitalics61} |
| 290 |
% \end{macrocode} |
| 291 |
% |
| 292 |
% Also, the mathcode for semicolon is set to |"8000|, so it behaves as an |
| 293 |
% active character in math mode; it is defined to insert a thick space. |
| 294 |
% |\semicolon| is a semicolon as an ordinary symbol. |
| 295 |
% |
| 296 |
% \begin{macrocode} |
| 297 |
\let\@mc=\mathchardef |
| 298 |
\mathcode`\;="8000 % Makes ; active in math mode |
| 299 |
{\catcode`\;=\active \gdef;{\semicolon\;}} |
| 300 |
\@mc\semicolon="603B |
| 301 |
% \end{macrocode} |
| 302 |
% |
| 303 |
%\section{Utility macros for Z symbols} |
| 304 |
%\begin{tabular}{ll} |
| 305 |
% |\z@op |& makes a large math operator\\ |
| 306 |
% |\z@rel|& makes a math relation\\ |
| 307 |
% |\z@bin|& makes a binary operator\\ |
| 308 |
%\end{tabular} |
| 309 |
% |
| 310 |
% Each use a mathstrut to defeat TeX's vertical adjustment. |
| 311 |
% |\z@bigXXX| is a big version of symbol |
| 312 |
% |
| 313 |
% \begin{macrocode} |
| 314 |
\def\z@op#1{\mathop{\mathstrut{#1}}\nolimits} |
| 315 |
\def\z@bin#1{\mathbin{\mathstrut{#1}}} |
| 316 |
\def\z@rel#1{\mathrel{\mathstrut{#1}}} |
| 317 |
% |
| 318 |
\def\z@bigop#1{\z@op{\zbig{#1}}} |
| 319 |
\def\z@bigbin#1{\z@bin{\zbig{#1}}} |
| 320 |
\def\z@bigrel#1{\z@rel{\zbig{#1}}} |
| 321 |
% |
| 322 |
\def\z@Bigop#1{\z@op{\zBig{#1}}} |
| 323 |
\def\z@Bigbin#1{\z@bin{\zBig{#1}}} |
| 324 |
\def\z@Bigrel#1{\z@rel{\zBig{#1}}} |
| 325 |
% |
| 326 |
\def\z@smallop#1{\z@op{\zsmall{#1}}} |
| 327 |
\def\z@smallbin#1{\z@bin{\zsmall{#1}}} |
| 328 |
\def\z@smallrel#1{\z@rel{\zsmall{#1}}} |
| 329 |
% \end{macrocode} |
| 330 |
% |
| 331 |
% This underscore doesn't have the little kern --- you get an italic |
| 332 |
% correction anyway in math mode. |
| 333 |
% \begin{macrocode} |
| 334 |
\def\_{\leavevmode \vbox{\hrule width0.4em}} |
| 335 |
% \end{macrocode} |
| 336 |
% Save |\q| as |\xq| for quantifiers q. |
| 337 |
% \begin{macrocode} |
| 338 |
\let\xforall=\forall |
| 339 |
\let\xexists=\exists |
| 340 |
\let\xlambda=\lambda |
| 341 |
\let\xmu=\mu |
| 342 |
% \end{macrocode} |
| 343 |
% Save other symbols |
| 344 |
% \begin{macrocode} |
| 345 |
\let\xsucc\succ |
| 346 |
\let\xprec\prec |
| 347 |
\let\dotaccent=\dot |
| 348 |
\let\sectionsymbol=\S |
| 349 |
\let\integral=\int |
| 350 |
\let\product\prod |
| 351 |
% \end{macrocode} |
| 352 |
% |\p| and |\f| make arrows with 1 and 2 crossings resp. |
| 353 |
% \begin{macrocode} |
| 354 |
\def\p#1{\mathrel{\ooalign{\hfil$\mapstochar\mkern 5mu$\hfil\cr$#1$}}} |
| 355 |
\def\f#1{\mathrel{\ooalign{\hfil |
| 356 |
$\mapstochar\mkern 3mu\mapstochar\mkern 5mu$\hfil\cr$#1$}}} |
| 357 |
\@ifpackageloaded{lucbr}{% |
| 358 |
\DeclareMathSymbol{\doublebarwedge}{\mathbin}{symbols}{"D4} |
| 359 |
\DeclareMathSymbol{\lll}{\mathrel}{letters}{"DE} |
| 360 |
\DeclareMathSymbol{\ggg}{\mathrel}{letters}{"DF} |
| 361 |
\DeclareMathSymbol{\eth}{\mathrel}{operators}{"F0} |
| 362 |
}{% |
| 363 |
% \end{macrocode} |
| 364 |
%\section{Amstex symbol definitions} |
| 365 |
% |
| 366 |
% Do these before Z symbols so that we can use them in our special symbols. |
| 367 |
% AMSa font: |
| 368 |
% \begin{macrocode} |
| 369 |
\let\rightleftharpoons\undefined |
| 370 |
\let\angle\undefined |
| 371 |
\DeclareMathSymbol\boxdot{\mathbin}{AMSa}{"00} |
| 372 |
\DeclareMathSymbol\boxplus{\mathbin}{AMSa}{"01} |
| 373 |
\DeclareMathSymbol\boxtimes{\mathbin}{AMSa}{"02} |
| 374 |
\DeclareMathSymbol\square{\mathord}{AMSa}{"03} |
| 375 |
\DeclareMathSymbol\blacksquare{\mathord}{AMSa}{"04} |
| 376 |
\DeclareMathSymbol\centerdot{\mathbin}{AMSa}{"05} |
| 377 |
\DeclareMathSymbol\lozenge{\mathord}{AMSa}{"06} |
| 378 |
\DeclareMathSymbol\blacklozenge{\mathord}{AMSa}{"07} |
| 379 |
\DeclareMathSymbol\circlearrowright{\mathrel}{AMSa}{"08} |
| 380 |
\DeclareMathSymbol\circlearrowleft{\mathrel}{AMSa}{"09} |
| 381 |
\DeclareMathSymbol\rightleftharpoons{\mathrel}{AMSa}{"0A} |
| 382 |
\DeclareMathSymbol\leftrightharpoons{\mathrel}{AMSa}{"0B} |
| 383 |
\DeclareMathSymbol\boxminus{\mathbin}{AMSa}{"0C} |
| 384 |
\DeclareMathSymbol\Vdash{\mathrel}{AMSa}{"0D} |
| 385 |
\DeclareMathSymbol\Vvdash{\mathrel}{AMSa}{"0E} |
| 386 |
\DeclareMathSymbol\vDash{\mathrel}{AMSa}{"0F} |
| 387 |
\DeclareMathSymbol\twoheadrightarrow{\mathrel}{AMSa}{"10} |
| 388 |
\DeclareMathSymbol\twoheadleftarrow{\mathrel}{AMSa}{"11} |
| 389 |
\DeclareMathSymbol\leftleftarrows{\mathrel}{AMSa}{"12} |
| 390 |
\DeclareMathSymbol\rightrightarrows{\mathrel}{AMSa}{"13} |
| 391 |
\DeclareMathSymbol\upuparrows{\mathrel}{AMSa}{"14} |
| 392 |
\DeclareMathSymbol\downdownarrows{\mathrel}{AMSa}{"15} |
| 393 |
\DeclareMathSymbol\upharpoonright{\mathrel}{AMSa}{"16} |
| 394 |
\DeclareMathSymbol\downharpoonright{\mathrel}{AMSa}{"17} |
| 395 |
\DeclareMathSymbol\upharpoonleft{\mathrel}{AMSa}{"18} |
| 396 |
\DeclareMathSymbol\downharpoonleft{\mathrel}{AMSa}{"19} |
| 397 |
\DeclareMathSymbol\rightarrowtail{\mathrel}{AMSa}{"1A} |
| 398 |
\DeclareMathSymbol\leftarrowtail{\mathrel}{AMSa}{"1B} |
| 399 |
\DeclareMathSymbol\leftrightarrows{\mathrel}{AMSa}{"1C} |
| 400 |
\DeclareMathSymbol\rightleftarrows{\mathrel}{AMSa}{"1D} |
| 401 |
\DeclareMathSymbol\Lsh{\mathrel}{AMSa}{"1E} |
| 402 |
\DeclareMathSymbol\Rsh{\mathrel}{AMSa}{"1F} |
| 403 |
\DeclareMathSymbol\rightsquigarrow{\mathrel}{AMSa}{"20} |
| 404 |
\DeclareMathSymbol\leftrightsquigarrow{\mathrel}{AMSa}{"21} |
| 405 |
\DeclareMathSymbol\looparrowleft{\mathrel}{AMSa}{"22} |
| 406 |
\DeclareMathSymbol\looparrowright{\mathrel}{AMSa}{"23} |
| 407 |
\DeclareMathSymbol\circeq{\mathrel}{AMSa}{"24} |
| 408 |
\DeclareMathSymbol\succsim{\mathrel}{AMSa}{"25} |
| 409 |
\DeclareMathSymbol\gtrsim{\mathrel}{AMSa}{"26} |
| 410 |
\DeclareMathSymbol\gtrapprox{\mathrel}{AMSa}{"27} |
| 411 |
\DeclareMathSymbol\multimap{\mathrel}{AMSa}{"28} |
| 412 |
\DeclareMathSymbol\therefore{\mathrel}{AMSa}{"29} |
| 413 |
\DeclareMathSymbol\because{\mathrel}{AMSa}{"2A} |
| 414 |
\DeclareMathSymbol\doteqdot{\mathrel}{AMSa}{"2B} |
| 415 |
\DeclareMathSymbol\triangleq{\mathrel}{AMSa}{"2C} |
| 416 |
\DeclareMathSymbol\precsim{\mathrel}{AMSa}{"2D} |
| 417 |
\DeclareMathSymbol\lesssim{\mathrel}{AMSa}{"2E} |
| 418 |
\DeclareMathSymbol\lessapprox{\mathrel}{AMSa}{"2F} |
| 419 |
\DeclareMathSymbol\eqslantless{\mathrel}{AMSa}{"30} |
| 420 |
\DeclareMathSymbol\eqslantgtr{\mathrel}{AMSa}{"31} |
| 421 |
\DeclareMathSymbol\curlyeqprec{\mathrel}{AMSa}{"32} |
| 422 |
\DeclareMathSymbol\curlyeqsucc{\mathrel}{AMSa}{"33} |
| 423 |
\DeclareMathSymbol\preccurlyeq{\mathrel}{AMSa}{"34} |
| 424 |
\DeclareMathSymbol\leqq{\mathrel}{AMSa}{"35} |
| 425 |
\DeclareMathSymbol\leqslant{\mathrel}{AMSa}{"36} |
| 426 |
\DeclareMathSymbol\lessgtr{\mathrel}{AMSa}{"37} |
| 427 |
\DeclareMathSymbol\backprime{\mathord}{AMSa}{"38} |
| 428 |
\DeclareMathSymbol\risingdotseq{\mathrel}{AMSa}{"3A} |
| 429 |
\DeclareMathSymbol\fallingdotseq{\mathrel}{AMSa}{"3B} |
| 430 |
\DeclareMathSymbol\succcurlyeq{\mathrel}{AMSa}{"3C} |
| 431 |
\DeclareMathSymbol\geqq{\mathrel}{AMSa}{"3D} |
| 432 |
\DeclareMathSymbol\geqslant{\mathrel}{AMSa}{"3E} |
| 433 |
\DeclareMathSymbol\gtrless{\mathrel}{AMSa}{"3F} |
| 434 |
\DeclareMathSymbol\sqsubset{\mathrel}{AMSa}{"40} |
| 435 |
\DeclareMathSymbol\sqsupset{\mathrel}{AMSa}{"41} |
| 436 |
\DeclareMathSymbol\vartriangleright{\mathrel}{AMSa}{"42} |
| 437 |
\DeclareMathSymbol\vartriangleleft{\mathrel}{AMSa}{"43} |
| 438 |
\DeclareMathSymbol\trianglerighteq{\mathrel}{AMSa}{"44} |
| 439 |
\DeclareMathSymbol\trianglelefteq{\mathrel}{AMSa}{"45} |
| 440 |
\DeclareMathSymbol\bigstar{\mathord}{AMSa}{"46} |
| 441 |
\DeclareMathSymbol\between{\mathrel}{AMSa}{"47} |
| 442 |
\DeclareMathSymbol\blacktriangledown{\mathord}{AMSa}{"48} |
| 443 |
\DeclareMathSymbol\blacktriangleright{\mathrel}{AMSa}{"49} |
| 444 |
\DeclareMathSymbol\blacktriangleleft{\mathrel}{AMSa}{"4A} |
| 445 |
\DeclareMathSymbol\vartriangle{\mathord}{AMSa}{"4D} |
| 446 |
\DeclareMathSymbol\blacktriangle{\mathord}{AMSa}{"4E} |
| 447 |
\DeclareMathSymbol\triangledown{\mathord}{AMSa}{"4F} |
| 448 |
\DeclareMathSymbol\eqcirc{\mathrel}{AMSa}{"50} |
| 449 |
\DeclareMathSymbol\lesseqgtr{\mathrel}{AMSa}{"51} |
| 450 |
\DeclareMathSymbol\gtreqless{\mathrel}{AMSa}{"52} |
| 451 |
\DeclareMathSymbol\lesseqqgtr{\mathrel}{AMSa}{"53} |
| 452 |
\DeclareMathSymbol\gtreqqless{\mathrel}{AMSa}{"54} |
| 453 |
\DeclareMathSymbol\Rrightarrow{\mathrel}{AMSa}{"56} |
| 454 |
\DeclareMathSymbol\Lleftarrow{\mathrel}{AMSa}{"57} |
| 455 |
\DeclareMathSymbol\veebar{\mathbin}{AMSa}{"59} |
| 456 |
\DeclareMathSymbol\barwedge{\mathbin}{AMSa}{"5A} |
| 457 |
\DeclareMathSymbol\doublebarwedge{\mathbin}{AMSa}{"5B} |
| 458 |
\DeclareMathSymbol\angle{\mathord}{AMSa}{"5C} |
| 459 |
\DeclareMathSymbol\measuredangle{\mathord}{AMSa}{"5D} |
| 460 |
\DeclareMathSymbol\sphericalangle{\mathord}{AMSa}{"5E} |
| 461 |
\DeclareMathSymbol\varpropto{\mathrel}{AMSa}{"5F} |
| 462 |
\DeclareMathSymbol\smallsmile{\mathrel}{AMSa}{"60} |
| 463 |
\DeclareMathSymbol\smallfrown{\mathrel}{AMSa}{"61} |
| 464 |
\DeclareMathSymbol\Subset{\mathrel}{AMSa}{"62} |
| 465 |
\DeclareMathSymbol\Supset{\mathrel}{AMSa}{"63} |
| 466 |
\DeclareMathSymbol\Cup{\mathbin}{AMSa}{"64} |
| 467 |
\DeclareMathSymbol\Cap{\mathbin}{AMSa}{"65} |
| 468 |
\DeclareMathSymbol\curlywedge{\mathbin}{AMSa}{"66} |
| 469 |
\DeclareMathSymbol\curlyvee{\mathbin}{AMSa}{"67} |
| 470 |
\DeclareMathSymbol\leftthreetimes{\mathbin}{AMSa}{"68} |
| 471 |
\DeclareMathSymbol\rightthreetimes{\mathbin}{AMSa}{"69} |
| 472 |
\DeclareMathSymbol\subseteqq{\mathrel}{AMSa}{"6A} |
| 473 |
\DeclareMathSymbol\supseteqq{\mathrel}{AMSa}{"6B} |
| 474 |
\DeclareMathSymbol\bumpeq{\mathrel}{AMSa}{"6C} |
| 475 |
\DeclareMathSymbol\Bumpeq{\mathrel}{AMSa}{"6D} |
| 476 |
\DeclareMathSymbol\lll{\mathrel}{AMSa}{"6E} |
| 477 |
\DeclareMathSymbol\ggg{\mathrel}{AMSa}{"6F} |
| 478 |
\DeclareMathDelimiter\ulcorner{4}{AMSa}{"70}{AMSa}{"70} |
| 479 |
\DeclareMathDelimiter\urcorner{5}{AMSa}{"71}{AMSa}{"71} |
| 480 |
\DeclareMathDelimiter\llcorner{4}{AMSa}{"78}{AMSa}{"78} |
| 481 |
\DeclareMathDelimiter\lrcorner{5}{AMSa}{"79}{AMSa}{"79} |
| 482 |
\xdef\yen {\noexpand\mathhexbox\hexnumber@\symAMSa 55 } |
| 483 |
\xdef\checkmark{\noexpand\mathhexbox\hexnumber@\symAMSa 58 } |
| 484 |
\xdef\circledR {\noexpand\mathhexbox\hexnumber@\symAMSa 72 } |
| 485 |
\xdef\maltese {\noexpand\mathhexbox\hexnumber@\symAMSa 7A } |
| 486 |
\DeclareMathSymbol\circledS{\mathord}{AMSa}{"73} |
| 487 |
\DeclareMathSymbol\pitchfork{\mathrel}{AMSa}{"74} |
| 488 |
\DeclareMathSymbol\dotplus{\mathbin}{AMSa}{"75} |
| 489 |
\DeclareMathSymbol\backsim{\mathrel}{AMSa}{"76} |
| 490 |
\DeclareMathSymbol\backsimeq{\mathrel}{AMSa}{"77} |
| 491 |
\DeclareMathSymbol\complement{\mathord}{AMSa}{"7B} |
| 492 |
\DeclareMathSymbol\intercal{\mathbin}{AMSa}{"7C} |
| 493 |
\DeclareMathSymbol\circledcirc{\mathbin}{AMSa}{"7D} |
| 494 |
\DeclareMathSymbol\circledast{\mathbin}{AMSa}{"7E} |
| 495 |
\DeclareMathSymbol\circleddash{\mathbin}{AMSa}{"7F} |
| 496 |
% \end{macrocode} |
| 497 |
% |
| 498 |
%AMSb font: |
| 499 |
% |
| 500 |
% \begin{macrocode} |
| 501 |
\DeclareMathSymbol\lvertneqq{\mathrel}{AMSb}{"00} |
| 502 |
\DeclareMathSymbol\gvertneqq{\mathrel}{AMSb}{"01} |
| 503 |
\DeclareMathSymbol\nleq{\mathrel}{AMSb}{"02} |
| 504 |
\DeclareMathSymbol\ngeq{\mathrel}{AMSb}{"03} |
| 505 |
\DeclareMathSymbol\nless{\mathrel}{AMSb}{"04} |
| 506 |
\DeclareMathSymbol\ngtr{\mathrel}{AMSb}{"05} |
| 507 |
\DeclareMathSymbol\nprec{\mathrel}{AMSb}{"06} |
| 508 |
\DeclareMathSymbol\nsucc{\mathrel}{AMSb}{"07} |
| 509 |
\DeclareMathSymbol\lneqq{\mathrel}{AMSb}{"08} |
| 510 |
\DeclareMathSymbol\gneqq{\mathrel}{AMSb}{"09} |
| 511 |
\DeclareMathSymbol\nleqslant{\mathrel}{AMSb}{"0A} |
| 512 |
\DeclareMathSymbol\ngeqslant{\mathrel}{AMSb}{"0B} |
| 513 |
\DeclareMathSymbol\lneq{\mathrel}{AMSb}{"0C} |
| 514 |
\DeclareMathSymbol\gneq{\mathrel}{AMSb}{"0D} |
| 515 |
\DeclareMathSymbol\npreceq{\mathrel}{AMSb}{"0E} |
| 516 |
\DeclareMathSymbol\nsucceq{\mathrel}{AMSb}{"0F} |
| 517 |
\DeclareMathSymbol\precnsim{\mathrel}{AMSb}{"10} |
| 518 |
\DeclareMathSymbol\succnsim{\mathrel}{AMSb}{"11} |
| 519 |
\DeclareMathSymbol\lnsim{\mathrel}{AMSb}{"12} |
| 520 |
\DeclareMathSymbol\gnsim{\mathrel}{AMSb}{"13} |
| 521 |
\DeclareMathSymbol\nleqq{\mathrel}{AMSb}{"14} |
| 522 |
\DeclareMathSymbol\ngeqq{\mathrel}{AMSb}{"15} |
| 523 |
\DeclareMathSymbol\precneqq{\mathrel}{AMSb}{"16} |
| 524 |
\DeclareMathSymbol\succneqq{\mathrel}{AMSb}{"17} |
| 525 |
\DeclareMathSymbol\precnapprox{\mathrel}{AMSb}{"18} |
| 526 |
\DeclareMathSymbol\succnapprox{\mathrel}{AMSb}{"19} |
| 527 |
\DeclareMathSymbol\lnapprox{\mathrel}{AMSb}{"1A} |
| 528 |
\DeclareMathSymbol\gnapprox{\mathrel}{AMSb}{"1B} |
| 529 |
\DeclareMathSymbol\nsim{\mathrel}{AMSb}{"1C} |
| 530 |
\DeclareMathSymbol\ncong{\mathrel}{AMSb}{"1D} |
| 531 |
%\DeclareMathSymbol\varsubsetneq{\mathrel}{AMSb}{"20} |
| 532 |
%\DeclareMathSymbol\varsupsetneq{\mathrel}{AMSb}{"21} |
| 533 |
\DeclareMathSymbol\nsubseteqq{\mathrel}{AMSb}{"22} |
| 534 |
\DeclareMathSymbol\nsupseteqq{\mathrel}{AMSb}{"23} |
| 535 |
\DeclareMathSymbol\subsetneqq{\mathrel}{AMSb}{"24} |
| 536 |
\DeclareMathSymbol\supsetneqq{\mathrel}{AMSb}{"25} |
| 537 |
%\DeclareMathSymbol\varsubsetneqq{\mathrel}{AMSb}{"26} |
| 538 |
%\DeclareMathSymbol\varsupsetneqq{\mathrel}{AMSb}{"27} |
| 539 |
\DeclareMathSymbol\subsetneq{\mathrel}{AMSb}{"28} |
| 540 |
\DeclareMathSymbol\supsetneq{\mathrel}{AMSb}{"29} |
| 541 |
\DeclareMathSymbol\nsubseteq{\mathrel}{AMSb}{"2A} |
| 542 |
\DeclareMathSymbol\nsupseteq{\mathrel}{AMSb}{"2B} |
| 543 |
\DeclareMathSymbol\nparallel{\mathrel}{AMSb}{"2C} |
| 544 |
\DeclareMathSymbol\nmid{\mathrel}{AMSb}{"2D} |
| 545 |
\DeclareMathSymbol\nshortmid{\mathrel}{AMSb}{"2E} |
| 546 |
\DeclareMathSymbol\nshortparallel{\mathrel}{AMSb}{"2F} |
| 547 |
\DeclareMathSymbol\nvdash{\mathrel}{AMSb}{"30} |
| 548 |
\DeclareMathSymbol\nVdash{\mathrel}{AMSb}{"31} |
| 549 |
\DeclareMathSymbol\nvDash{\mathrel}{AMSb}{"32} |
| 550 |
\DeclareMathSymbol\nVDash{\mathrel}{AMSb}{"33} |
| 551 |
\DeclareMathSymbol\ntrianglerighteq{\mathrel}{AMSb}{"34} |
| 552 |
\DeclareMathSymbol\ntrianglelefteq{\mathrel}{AMSb}{"35} |
| 553 |
\DeclareMathSymbol\ntriangleleft{\mathrel}{AMSb}{"36} |
| 554 |
\DeclareMathSymbol\ntriangleright{\mathrel}{AMSb}{"37} |
| 555 |
\DeclareMathSymbol\nleftarrow{\mathrel}{AMSb}{"38} |
| 556 |
\DeclareMathSymbol\nrightarrow{\mathrel}{AMSb}{"39} |
| 557 |
\DeclareMathSymbol\nLeftarrow{\mathrel}{AMSb}{"3A} |
| 558 |
\DeclareMathSymbol\nRightarrow{\mathrel}{AMSb}{"3B} |
| 559 |
\DeclareMathSymbol\nLeftrightarrow{\mathrel}{AMSb}{"3C} |
| 560 |
\DeclareMathSymbol\nleftrightarrow{\mathrel}{AMSb}{"3D} |
| 561 |
\DeclareMathSymbol\divideontimes{\mathbin}{AMSb}{"3E} |
| 562 |
\DeclareMathSymbol\varnothing{\mathord}{AMSb}{"3F} |
| 563 |
\DeclareMathSymbol\mho{\mathord}{AMSb}{"66} |
| 564 |
\DeclareMathSymbol\eth{\mathord}{AMSb}{"67} |
| 565 |
\DeclareMathSymbol\eqsim{\mathrel}{AMSb}{"68} |
| 566 |
\DeclareMathSymbol\beth{\mathord}{AMSb}{"69} |
| 567 |
\DeclareMathSymbol\gimel{\mathord}{AMSb}{"6A} |
| 568 |
\DeclareMathSymbol\daleth{\mathord}{AMSb}{"6B} |
| 569 |
\DeclareMathSymbol\lessdot{\mathrel}{AMSb}{"6C} |
| 570 |
\DeclareMathSymbol\gtrdot{\mathrel}{AMSb}{"6D} |
| 571 |
\DeclareMathSymbol\ltimes{\mathbin}{AMSb}{"6E} |
| 572 |
\DeclareMathSymbol\rtimes{\mathbin}{AMSb}{"6F} |
| 573 |
\DeclareMathSymbol\shortmid{\mathrel}{AMSb}{"70} |
| 574 |
\DeclareMathSymbol\shortparallel{\mathrel}{AMSb}{"71} |
| 575 |
\DeclareMathSymbol\smallsetminus{\mathbin}{AMSb}{"72} |
| 576 |
\DeclareMathSymbol\thicksim{\mathrel}{AMSb}{"73} |
| 577 |
\DeclareMathSymbol\thickapprox{\mathrel}{AMSb}{"74} |
| 578 |
\DeclareMathSymbol\approxeq{\mathrel}{AMSb}{"75} |
| 579 |
\DeclareMathSymbol\succapprox{\mathrel}{AMSb}{"76} |
| 580 |
\DeclareMathSymbol\precapprox{\mathrel}{AMSb}{"77} |
| 581 |
\DeclareMathSymbol\curvearrowleft{\mathrel}{AMSb}{"78} |
| 582 |
\DeclareMathSymbol\curvearrowright{\mathrel}{AMSb}{"79} |
| 583 |
\DeclareMathSymbol\digamma{\mathord}{AMSb}{"7A} |
| 584 |
\DeclareMathSymbol\varkappa{\mathord}{AMSb}{"7B} |
| 585 |
\DeclareMathSymbol\hslash{\mathord}{AMSb}{"7D} |
| 586 |
\DeclareMathSymbol\hbar{\mathord}{AMSb}{"7E} |
| 587 |
\DeclareMathSymbol\backepsilon{\mathrel}{AMSb}{"7F} |
| 588 |
} |
| 589 |
\def\interleave{{\parallel\!\!\vert}} |
| 590 |
\def\shortinterleave{\z@rel{\mathord\shortmid\mathord\shortparallel}} |
| 591 |
\def\napprox{\not\approx} |
| 592 |
\let\restriction\upharpoonright |
| 593 |
\let\Doteq\doteqdot |
| 594 |
\let\doublecup\Cup |
| 595 |
\let\llless\lll |
| 596 |
\let\gggtr\ggg |
| 597 |
\let\doublecap\Cap |
| 598 |
% \end{macrocode} |
| 599 |
% |
| 600 |
% Numbers |
| 601 |
% |
| 602 |
% \begin{macrocode} |
| 603 |
\def \nat {{\mathbb N}} |
| 604 |
\def \integer {{\mathbb Z}} |
| 605 |
\def \natone {{\mathbb N}_1} |
| 606 |
\def \real {{\mathbb R}} |
| 607 |
\def \bool {{\mathbb B}} |
| 608 |
\let \divides \div |
| 609 |
\def \div {\z@bin{\mathrm{div}}} |
| 610 |
\def \mod {\z@bin{\mathrm{mod}}} |
| 611 |
\def \succ {\word{succ}} |
| 612 |
\def \expon {^} |
| 613 |
% \end{macrocode} |
| 614 |
% aliases |
| 615 |
% \begin{macrocode} |
| 616 |
\let \num \integer |
| 617 |
\let \nplus \natone |
| 618 |
% \end{macrocode} |
| 619 |
% |
| 620 |
% Logic |
| 621 |
% |
| 622 |
% \begin{macrocode} |
| 623 |
\def \lnot {\neg\;} |
| 624 |
\def \land {\z@rel{\wedge}} |
| 625 |
\def \lor {\z@rel{\vee}} |
| 626 |
\let \imp \Rightarrow |
| 627 |
\let\iff \Leftrightarrow |
| 628 |
\def \all {\z@op{\xforall}} |
| 629 |
\def \exi {\z@op{\xexists}} |
| 630 |
\def \exione {\exists_1} |
| 631 |
\@ifpackageloaded{lucbr}{% |
| 632 |
\DeclareMathSymbol{\nexi}{0}{arrows}{"20} |
| 633 |
}{% |
| 634 |
\DeclareMathSymbol{\nexi}{\mathord}{AMSb}{"40} |
| 635 |
} |
| 636 |
\def \dot {\z@rel{\bullet}} |
| 637 |
\def \true {\keyword{true}} |
| 638 |
\def \false {\keyword{false}} |
| 639 |
\let \cond \rightarrow |
| 640 |
% \end{macrocode} |
| 641 |
% aliases |
| 642 |
% \begin{macrocode} |
| 643 |
\let \spot \dot |
| 644 |
\mathcode`\@="8000% make @ active in mathmode |
| 645 |
{\catcode`\@=\active \gdef@{\dot}} |
| 646 |
\let \implies \imp |
| 647 |
\let \forall \all |
| 648 |
\let \exists \exi |
| 649 |
\let \nexists \nexi |
| 650 |
% \end{macrocode} |
| 651 |
% |
| 652 |
% SETS |
| 653 |
% |
| 654 |
% \begin{macrocode} |
| 655 |
\let \emptyset \varnothing |
| 656 |
\def \varemptyset {\{\,\}} |
| 657 |
\def \pset {\z@op{\mathbb P}} |
| 658 |
\def \psetone {\pset_1} |
| 659 |
\def \fset {\z@op{\mathbb F}} |
| 660 |
\def \fsetone {\fset_1} |
| 661 |
\def \sset {\z@op{\mathbb S}} |
| 662 |
\let \mem \in |
| 663 |
\def \nem {\not\mem} |
| 664 |
\def \uni {\z@bin\cup} |
| 665 |
\def \int {\z@bin\cap} |
| 666 |
\let \prod \times |
| 667 |
\def \min {\word{min}} |
| 668 |
\def \max {\word{max}} |
| 669 |
\def \duni {\z@Bigop{\lower0.25ex\hbox{$\uni$}}} |
| 670 |
\def \dint {\z@Bigop{\lower0.25ex\hbox{$\int$}}} |
| 671 |
\def \upto {\z@bin{\ldotp\ldotp}} |
| 672 |
\let \psubs \subset |
| 673 |
\let \subs \subseteq |
| 674 |
\let \psups \supset |
| 675 |
\let \sups \supseteq |
| 676 |
\def \diff {\z@bin{\backslash}} |
| 677 |
% \end{macrocode} |
| 678 |
% aliases |
| 679 |
% \begin{macrocode} |
| 680 |
\let \cross \prod |
| 681 |
\let \notin \nem |
| 682 |
\let \nmem \nem |
| 683 |
\let \union \uni |
| 684 |
\let \inter \int |
| 685 |
\let \power \pset |
| 686 |
\let \finset \fset |
| 687 |
\let \dunion \duni |
| 688 |
\let \dinter \dint |
| 689 |
% \end{macrocode} |
| 690 |
% |
| 691 |
% RELATIONS \& FUNCTIONS |
| 692 |
% |
| 693 |
% \begin{macrocode} |
| 694 |
\def \lambda {\z@op{\xlambda}} |
| 695 |
\def \mu {\z@op{\xmu}} |
| 696 |
\def \dom {\keyword{dom}} |
| 697 |
\def \ran {\keyword{ran}} |
| 698 |
\def \id {\keyword{id}} |
| 699 |
\@ifpackageloaded{lucbr}{% |
| 700 |
\DeclareMathSymbol{\dres}{\mathbin}{letters}{"2F} |
| 701 |
\DeclareMathSymbol{\rres}{\mathbin}{letters}{"2E} |
| 702 |
}{% |
| 703 |
\DeclareMathSymbol{\dres}{\mathbin}{AMSa}{"43} |
| 704 |
\DeclareMathSymbol{\rres}{\mathbin}{AMSa}{"42} |
| 705 |
} |
| 706 |
\def \dsub {\mathbin{\rlap{\raise.05ex\hbox{$-$}}{\dres}}} |
| 707 |
\def \rsub {\mathbin{\rlap{\raise.05ex\hbox{$-$}}{\rres}}} |
| 708 |
\let \fovr \oplus |
| 709 |
\let \cmp \circ |
| 710 |
\def \fcmp {\mathbin{\raise 0.6ex\hbox{\oalign{\hfil$\scriptscriptstyle |
| 711 |
\mathrm{o}$\hfil\cr\hfil$\scriptscriptstyle\mathrm{9}$\hfil}}}} |
| 712 |
\def \inv {^\sim} |
| 713 |
\def \limg {(\!|} |
| 714 |
\def \rimg {|\!)} |
| 715 |
\let \map \mapsto |
| 716 |
\let \rel \leftrightarrow |
| 717 |
\let \tfun \rightarrow |
| 718 |
\let \tinj \rightarrowtail |
| 719 |
\def \tsur {\mathrel{\ooalign{$\tfun$\hfil\cr$\mkern4mu\tfun$}}} |
| 720 |
\def \pfun {\p\tfun} |
| 721 |
\def \pinj {\p\tinj} |
| 722 |
\def \psur {\p\tsur} |
| 723 |
\def \ffun {\f\tfun} |
| 724 |
\def \finj {\f\tinj} |
| 725 |
\def \bij {\mathrel{\ooalign{$\tinj$\hfil\cr$\mkern5mu\tfun$}}} |
| 726 |
\def \tcl {^+} |
| 727 |
\def \rtcl {^*} |
| 728 |
\def \iter {^} |
| 729 |
% \end{macrocode} |
| 730 |
% aliases |
| 731 |
% \begin{macrocode} |
| 732 |
\let \comp \fcmp |
| 733 |
\let \ndres \dsub |
| 734 |
\let \nrres \rsub |
| 735 |
\let \fun \tfun |
| 736 |
\let \inj \tinj |
| 737 |
\let \surj \tsur |
| 738 |
\let \psurj \psur |
| 739 |
\let \llless \lll |
| 740 |
\let \gggtr \ggg |
| 741 |
\def \interleave {{\parallel\!\!\vert}} |
| 742 |
\def \shortinterleave {\z@rel{\mathord\shortmid\mathord\shortparallel}} |
| 743 |
\let \restriction \upharpoonright |
| 744 |
\def \napprox {\not\approx} |
| 745 |
% \end{macrocode} |
| 746 |
% |
| 747 |
% SEQUENCES |
| 748 |
% \begin{macrocode} |
| 749 |
\def \seq {\keyword{seq}} |
| 750 |
\def \iseq {\keyword{iseq}} |
| 751 |
\def \seqone {\seq_1} |
| 752 |
\def \emptyseq {\lseq\,\rseq} |
| 753 |
\let \lseq \langle |
| 754 |
\let \rseq \rangle |
| 755 |
\def \head {\word{head}} |
| 756 |
\def \tail {\word{tail}} |
| 757 |
\def \front {\word{front}} |
| 758 |
\def \last {\word{last}} |
| 759 |
\def \rev {\word{rev}} |
| 760 |
\def \squash {\word{squash}} |
| 761 |
\def \next {\keyword{next}} |
| 762 |
\def \inseq {\keyword{in}} |
| 763 |
\@ifpackageloaded{lucbr}{% |
| 764 |
\DeclareMathSymbol{\sres}{2}{arrows}{"75} |
| 765 |
\DeclareMathSymbol{\ires}{2}{arrows}{"76} |
| 766 |
\DeclareMathSymbol{\@@cat}{\mathbin}{operators}{"5F} |
| 767 |
}{% |
| 768 |
\DeclareMathSymbol{\@@cat}{\mathbin}{AMSa}{"61} |
| 769 |
\DeclareMathSymbol{\sres}{\mathbin}{AMSa}{"16} |
| 770 |
\DeclareMathSymbol{\ires}{\mathbin}{AMSa}{"18} |
| 771 |
} |
| 772 |
\def \cat {\mathbin{\raise 0.8ex\hbox{$\mathchar\@@cat$}}} |
| 773 |
\def \ssub {\z@bin{\rlap{$-$}{\sres}}} |
| 774 |
\def \isub {\z@bin{\rlap{$-$}{\ires}}} |
| 775 |
\def \dcat {\z@op{\cat/}} |
| 776 |
\def \dovr {\z@op{\fovr/}} |
| 777 |
\def \dcmp {\z@op{\fcmp/}} |
| 778 |
\let \prefix \subseteq |
| 779 |
\def \suffix {\keyword{suffix}} |
| 780 |
\def \seqi {\keyword{seq_\infty}} |
| 781 |
\def \partitions {\keyword{partitions}} |
| 782 |
\def \partition {\keyword{partitions}} |
| 783 |
\def \disjoint {\keyword{disjoint}} |
| 784 |
\def \subseq {\keyword{subseq}} |
| 785 |
% \end{macrocode} |
| 786 |
% aliases |
| 787 |
% \begin{macrocode} |
| 788 |
\let \filter \sres |
| 789 |
% \end{macrocode} |
| 790 |
% |
| 791 |
% Schemas: |
| 792 |
% |
| 793 |
% \begin{macrocode} |
| 794 |
\def \lsch {\z@bigop{[}} |
| 795 |
\def \rsch {\z@bigop{]}} |
| 796 |
\def \dparallel {\z@bigop{\parallel}\limits} |
| 797 |
\def \zand {\z@bigbin\land} |
| 798 |
\def \zor {\z@bigbin\lor} |
| 799 |
\def \zcmp {\z@bigbin\fcmp} |
| 800 |
\def \zexi {\z@bigop\exists} |
| 801 |
\def \zall {\z@bigop\forall} |
| 802 |
\def \znot {\z@bigop\neg} |
| 803 |
\def \zbar {\z@bigbin\cbar} |
| 804 |
\def \zfor {/} |
| 805 |
\def \zhide {\z@bigbin\backslash} |
| 806 |
\def \zimp {\z@bigrel\imp} |
| 807 |
\def \zeq {\z@bigrel\iff} |
| 808 |
\def \zovr {\z@bigrel\oplus} |
| 809 |
\def \zpipe {\z@bigbin{\mathord>\!\!\mathord>}} |
| 810 |
\def \pre {\keyword{pre}} |
| 811 |
\def \pred {\keyword{pred}} |
| 812 |
\def \post {\keyword{post}} |
| 813 |
\def \zproject {\z@bigbin\sres} |
| 814 |
\def\rename{\@ifnextchar*{\z@rename}{\z@@rename}} |
| 815 |
\def\z@rename*[#1/#2]{\left[#1 \over #2\right]} |
| 816 |
\def\z@@rename[#1/#2]{\left[#1 \zfor #2\right]} |
| 817 |
% \end{macrocode} |
| 818 |
% aliases |
| 819 |
% \begin{macrocode} |
| 820 |
\let \project \zproject |
| 821 |
\let \import \sres |
| 822 |
\let \semi \zcmp |
| 823 |
\let \hide \zhide |
| 824 |
% \end{macrocode} |
| 825 |
% |
| 826 |
% BAGS |
| 827 |
% |
| 828 |
% \begin{macrocode} |
| 829 |
\let\buni\uplus |
| 830 |
\def \emptybag {\lbag\:\rbag} |
| 831 |
\def \lbag {[\![} |
| 832 |
\def \rbag {]\!]} |
| 833 |
\def \bag {\keyword{bag}} |
| 834 |
\def \items {\word{items}} |
| 835 |
\let \inbag \inseq |
| 836 |
\def \bagcount {\word{count}} |
| 837 |
% \end{macrocode} |
| 838 |
% |
| 839 |
% Definitions \& declarations |
| 840 |
% |
| 841 |
% \begin{macrocode} |
| 842 |
\def \ddef {\z@rel{\;::=\;}} |
| 843 |
\def \bbar {\z@bigrel{|}} |
| 844 |
\let \cbar \mid |
| 845 |
\def \lang {\langle\!\langle} |
| 846 |
\def \rang {\rangle\!\rangle} |
| 847 |
\def \sdef {\z@rel{\widehat=}} |
| 848 |
\def \defs {\z@smallrel{==}} |
| 849 |
\def \varsdef {\z@rel\triangleq} |
| 850 |
% \end{macrocode} |
| 851 |
% aliases |
| 852 |
% \begin{macrocode} |
| 853 |
\let \sdefs \sdef |
| 854 |
\mathcode`\|=\mid |
| 855 |
\let \ldata \lang |
| 856 |
\let \rdata \rang |
| 857 |
% \end{macrocode} |
| 858 |
% |
| 859 |
% MISCELLANEOUS |
| 860 |
% |
| 861 |
% \begin{macrocode} |
| 862 |
\def \lblot {\langle\!|} |
| 863 |
\def \rblot {|\!\rangle} |
| 864 |
\def \IMP {\boldword{Import}} |
| 865 |
\let \env \Rrightarrow |
| 866 |
\def \zlet {\boldword{let}} |
| 867 |
\def \zin {\boldword{in}} |
| 868 |
\def \zwhere {\boldword{where}} |
| 869 |
% \end{macrocode} |
| 870 |
% |
| 871 |
% QZED SUPPORT |
| 872 |
% |
| 873 |
% \begin{macrocode} |
| 874 |
\def\HOLE{\z@op{\hbox{$\lll\star\star\star\ggg$}}} |
| 875 |
\def\landd{} % to support qzed editor |
| 876 |
\def\semid{} % to support qzed editor |
| 877 |
\def\qzed{\ifz@inclass\else\zed\fi} |
| 878 |
\def\endqzed{\ifz@inclass\else\endzed\fi} |
| 879 |
% \end{macrocode} |
| 880 |
% |
| 881 |
% CLASSES |
| 882 |
% |
| 883 |
% \begin{macrocode} |
| 884 |
\def\qua{\mbox{::}} |
| 885 |
\def\redef{\mbox{\textbf{~redef}}} |
| 886 |
\def\Init{I\!{\scriptstyle{NIT}}} |
| 887 |
\def\Exit{E\!{\scriptstyle{XIT}}} |
| 888 |
\def\Internal{I\!{\scriptstyle{NTERNAL}}} |
| 889 |
\def\Aux{A\!{\scriptstyle{UX}}} |
| 890 |
\def\intern{\mbox{\textsf{i}}} |
| 891 |
% \end{macrocode} |
| 892 |
% |
| 893 |
% PROOFS |
| 894 |
% |
| 895 |
% \begin{macrocode} |
| 896 |
\def\thrm{\z@rel\vdash} |
| 897 |
\def\qed{\zsmall\Box} |
| 898 |
\let\Qed\Box |
| 899 |
\let\QED\square |
| 900 |
\def\BLACKQED{\zsmall\blacksquare} |
| 901 |
\let\ETH\qed |
| 902 |
\def\TH{\boldword{Theorem}} |
| 903 |
\def\LE{\boldword{Lemma}} |
| 904 |
\def\PR{\boldword{Proof}} |
| 905 |
\def\refines{\z@rel\sqsupseteq} |
| 906 |
\def\defines{\z@rel\sqsubseteq} |
| 907 |
\def\weakrefine{\z@rel{\raise0.2ex\rlap{\hbox{$\sqsupset$}}\lower1ex\hbox{$\sim$}}} |
| 908 |
\def\weakdefine{\z@rel{\raise0.2ex\rlap{\hbox{$\sqsubset$}}\lower1ex\hbox{$\sim$}}} |
| 909 |
% \end{macrocode} |
| 910 |
% aliases |
| 911 |
% \begin{macrocode} |
| 912 |
\let\shows\thrm |
| 913 |
% \end{macrocode} |
| 914 |
% |
| 915 |
% OBJECT THEORY |
| 916 |
% |
| 917 |
% \begin{macrocode} |
| 918 |
\def\childof{\z@rel\xsucc} |
| 919 |
\def\parentof{\z@rel\xprec} |
| 920 |
\let\weaksubclass\succsim |
| 921 |
\let\weaksupclass\precsim |
| 922 |
\def\hasa{\z@rel{\mathord\xsucc\!\!\!\mathord\xsucc}} |
| 923 |
\def\instancein{\z@rel{\mathord\xprec\!\!\!\mathord\xprec}} |
| 924 |
\def\subtype{\z@rel\sqsubset} |
| 925 |
\def\subtypeeq{\z@rel\sqsubseteq} |
| 926 |
\def\suptype{\z@rel\sqsupset} |
| 927 |
\def\suptypeeq{\z@rel\sqsupseteq} |
| 928 |
% \end{macrocode} |
| 929 |
% aliases |
| 930 |
% \begin{macrocode} |
| 931 |
\let\inherits\childof |
| 932 |
\let\subclass\childof |
| 933 |
\let\isa\childof |
| 934 |
\let\supclass\parentof |
| 935 |
\let\instantiates\hasa |
| 936 |
\let\islikea\weaksubclass |
| 937 |
\def\poly{\mathord\downarrow} |
| 938 |
\def\widen#1{\z@op{{\overline{#1}}}} |
| 939 |
% \end{macrocode} |
| 940 |
% |
| 941 |
% TEMPORAL LOGIC |
| 942 |
% |
| 943 |
% \begin{macrocode} |
| 944 |
\def\atnext{\rlap{$\zSmall\bigcirc$}\kern0.01em\rlap{$\zSmall\bigcirc$}\kern0.01em\zSmall\bigcirc} |
| 945 |
\def\atlast{\rlap{$\zSmall\bigcirc$}\kern0.01em\rlap{$\zSmall\bigcirc$}\kern0.01em\rlap{$\kern0.01em\mathord-$}\zSmall\bigcirc} |
| 946 |
\def\always{\lower0.37ex\hbox{$\zbig\Box$}} |
| 947 |
\def\uptilnow{\rlap{$\kern0.02em\mathord-$}\lower0.37ex\hbox{$\zbig\Box$}} |
| 948 |
\def\eventually{\lower0.37ex\hbox{$\zbig\Diamond$}} |
| 949 |
\def\previously{\rlap{$\kern0.04em\mathord-$}\lower0.37ex\hbox{$\zbig\Diamond$}} |
| 950 |
% \end{macrocode} |
| 951 |
% aliases |
| 952 |
% \begin{macrocode} |
| 953 |
\let\henceforth\always |
| 954 |
% \end{macrocode} |
| 955 |
% |
| 956 |
% ORDERS |
| 957 |
% |
| 958 |
% \begin{macrocode} |
| 959 |
\def \mono {\keyword{monotonic}} |
| 960 |
\def \porder {\keyword{partial\_order}} |
| 961 |
\def \torder {\keyword{total\_order}} |
| 962 |
\newbox\z@combox\newdimen\z@wdcalc |
| 963 |
\def\comment{\@ifnextchar*{\z@leftcomment}{\z@comment}} |
| 964 |
\def\z@comment#1{$\z@stopfield\z@addfield\z@startfield$% |
| 965 |
\global\setbox\z@combox\hbox{\quad[{\sf #1}]}\z@wdcalc=\wd\z@combox% |
| 966 |
\advance\z@wdcalc by \wd\z@curline\advance\z@wdcalc by \z@curindent% |
| 967 |
\advance\z@wdcalc by \zedleftsep\advance\z@wdcalc by \zedlinethickness% |
| 968 |
\advance\z@wdcalc by 2\zedindent\ifdim\z@wdcalc>\displaywidth\\% |
| 969 |
\fi&\box\z@combox\ignorespaces} |
| 970 |
\def\z@leftcomment*#1{\hbox{[{\sf #1}]}} |
| 971 |
% \end{macrocode} |
| 972 |
% |
| 973 |
%\section{Object-Z Notations} |
| 974 |
% |
| 975 |
% KEYWORDS AND KEYSYMBOLS |
| 976 |
% |
| 977 |
% \begin{macrocode} |
| 978 |
\def \oid {{\bbold O}} |
| 979 |
\def \self {\word{self}} |
| 980 |
\def \contained {\word{contained}} |
| 981 |
\let \classuni \uni |
| 982 |
\def \visibility {\zproject} |
| 983 |
\def \invisibility {{\project\hspace{-0.63 em}\cross}} |
| 984 |
% \end{macrocode} |
| 985 |
% |
| 986 |
% CONTAINMENT AND CONTROL ADORNMENTS |
| 987 |
% |
| 988 |
% \begin{macrocode} |
| 989 |
\def \cid {{\bigcirc\mbox{\scriptsize{\hspace{-0.78em}}\mbox{\tiny{C}}}}} |
| 990 |
\def \sid {{\bigcirc\mbox{\scriptsize{\hspace{-0.74em}}\mbox{\tiny{S}}}}} |
| 991 |
\def \eid {{\bigcirc\mbox{\scriptsize{\hspace{-0.74em}}\mbox{\tiny{E}}}}} |
| 992 |
% \end{macrocode} |
| 993 |
% |
| 994 |
% BINARY COMPOSITION OPERATORS |
| 995 |
% |
| 996 |
% \begin{macrocode} |
| 997 |
\def \pll {~\parallel~} |
| 998 |
\def \plo {~\parallel_{!}~} |
| 999 |
\def \sqc {~\semi~} |
| 1000 |
\def \cnj {~\zand~} |
| 1001 |
\def \gch {~[\mbox{\hspace{-0.06em}}]~} |
| 1002 |
\def \enh {~\dot~} |
| 1003 |
% \end{macrocode} |
| 1004 |
% |
| 1005 |
% DISTRIBUTED COMPOSITION OPERATORS |
| 1006 |
% |
| 1007 |
% \begin{macrocode} |
| 1008 |
% Redefined because of \zbig problem |
| 1009 |
% \def \dsqc {\mbox{{\Large $\zcmp~$}}} |
| 1010 |
\def \dsqc {\mbox{{\Large $\fcmp~$}}} |
| 1011 |
\def \dgch {\mbox{{\Large $[\mbox{\hspace{-0.06em}}]$}}} |
| 1012 |
% Redefined because of \zbig problem |
| 1013 |
% \def \dcnj {\mbox{{\Large $\zand$}}} |
| 1014 |
\def \dcnj {\mbox{{\Large $\land$}}} |
| 1015 |
\def \dpll {\mbox{{\Large $\parallel$}}} |
| 1016 |
\def \dplo {\mbox{{\Large $\parallel_{!}$}}} |
| 1017 |
% \end{macrocode} |
| 1018 |
% |
| 1019 |
%\section{Z environments} |
| 1020 |
% |
| 1021 |
%\subsection{Margin stack} |
| 1022 |
% |
| 1023 |
% Define a stack of dimensions (50 elements) |
| 1024 |
% This can probably be made smaller when qzed filters its \TeX\ output better |
| 1025 |
% \begin{macrocode} |
| 1026 |
\newcount\z@stackmin |
| 1027 |
\newcount\z@stackmax |
| 1028 |
\newcount\z@stacktop |
| 1029 |
\newdimen\@gtempa \z@stackmin=\allocationnumber |
| 1030 |
\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa |
| 1031 |
\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa |
| 1032 |
\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa |
| 1033 |
\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa |
| 1034 |
\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa |
| 1035 |
\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa |
| 1036 |
\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa |
| 1037 |
\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa |
| 1038 |
\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa |
| 1039 |
\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa |
| 1040 |
\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa |
| 1041 |
\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa\newdimen\@gtempa |
| 1042 |
\newdimen\@gtempa |
| 1043 |
\z@stackmax=\allocationnumber |
| 1044 |
\dimen\z@stackmin=0pt |
| 1045 |
% \end{macrocode} |
| 1046 |
% Define a box to contain the current line |
| 1047 |
% \& a variable to contain it's indentation |
| 1048 |
% \begin{macrocode} |
| 1049 |
\newbox\z@curline |
| 1050 |
\newdimen\z@curindent |
| 1051 |
\dimen\z@curindent=0pt |
| 1052 |
% \end{macrocode} |
| 1053 |
% Space between operands of a function application |
| 1054 |
% \begin{macrocode} |
| 1055 |
\def\z@space{{}\;{}} |
| 1056 |
% \end{macrocode} |
| 1057 |
% Define a box to contain the current field |
| 1058 |
% \begin{macrocode} |
| 1059 |
\newbox\z@curfield |
| 1060 |
% \end{macrocode} |
| 1061 |
% Define a mini-tabbing environment for use inside `zed' |
| 1062 |
% \begin{macrocode} |
| 1063 |
\def\z@startline{\setbox\z@curline\hbox{}% |
| 1064 |
\global\z@curindent\dimen\z@stacktop |
| 1065 |
\z@startfield\ignorespaces} |
| 1066 |
\def\z@stopline{\z@stopfield |
| 1067 |
\z@addfield |
| 1068 |
\hbox{\hskip\z@curindent \box\z@curline}} |
| 1069 |
|
| 1070 |
\def\z@startfield{\global\setbox\z@curfield\hbox\bgroup} |
| 1071 |
\def\z@stopfield{\egroup} |
| 1072 |
\def\z@addfield{\global\setbox\z@curline\hbox{\unhbox |
| 1073 |
\z@curline\unhbox\z@curfield}} |
| 1074 |
|
| 1075 |
\def\z@pushmargin{\hbox{\kern0pt}$% |
| 1076 |
\z@stopfield |
| 1077 |
\z@addfield |
| 1078 |
\ifnum \z@stacktop < \z@stackmax |
| 1079 |
\global\advance\z@stacktop \@ne |
| 1080 |
\else |
| 1081 |
\@latexerr{Z margin stack overflow (too many \string\M's)} |
| 1082 |
\@ehd |
| 1083 |
\fi |
| 1084 |
\global\dimen\z@stacktop\z@curindent |
| 1085 |
\global\advance\dimen\z@stacktop \wd\z@curline |
| 1086 |
\z@startfield\ignorespaces |
| 1087 |
$\relax} |
| 1088 |
\def\z@popmargin{\ifnum \z@stacktop > \z@stackmin |
| 1089 |
\global\advance\z@stacktop \m@ne \ignorespaces |
| 1090 |
\else |
| 1091 |
\@latexerr{Z Margin stack underflow (too many \string\O's)} |
| 1092 |
\@ehd |
| 1093 |
\fi} |
| 1094 |
\def\M{\z@pushmargin} \def\O{\z@popmargin} \def\S{\z@space} |
| 1095 |
\z@stacktop\z@stackmin |
| 1096 |
% \end{macrocode} |
| 1097 |
% |
| 1098 |
%\subsection{Utility macros for Z environments} |
| 1099 |
% |
| 1100 |
% Here are environments for the various sorts of displays which occur in |
| 1101 |
% Z documents. All displays are set flush left, indented by |\zedindent|, |
| 1102 |
% by default |\leftmargini|. Schemas, etc, are made just wide enough to |
| 1103 |
% give equal margins left and right. |
| 1104 |
% |
| 1105 |
% Some environments (schema, etc.) must only be split at |\zbreak|, |
| 1106 |
% and others (e.g. argue) may be split arbitrarily. All generate |
| 1107 |
% alignment displays, and penalties are used to control page breaks. |
| 1108 |
% |
| 1109 |
%\subsubsection{Format and control macros} |
| 1110 |
% |
| 1111 |
% \begin{macrocode} |
| 1112 |
\newdimen\zedindent \zedindent=\leftmargini |
| 1113 |
\newdimen\zedleftsep \zedleftsep=1em |
| 1114 |
\newdimen\zedtab \zedtab=2em |
| 1115 |
\newdimen\zedbar \zedbar=8em |
| 1116 |
\newdimen\zedlinethickness \zedlinethickness=0.4pt |
| 1117 |
\newdimen\zedcornerheight \zedcornerheight=0pt |
| 1118 |
\newcount\z@cols |
| 1119 |
\newif\ifz@firstline \z@firstlinefalse |
| 1120 |
\newif\ifz@inclass \z@inclassfalse |
| 1121 |
\newif\ifz@inenv \z@inenvfalse |
| 1122 |
\newif\ifz@leftmargin \z@leftmargintrue |
| 1123 |
\newif\ifz@incols \z@incolsfalse |
| 1124 |
\newif\ifleftnames \leftnamesfalse |
| 1125 |
\def\leftschemas{\leftnamestrue} |
| 1126 |
\newif\ifz@inbox \z@inboxfalse |
| 1127 |
\newskip\zedbaselineskip \zedbaselineskip\baselineskip |
| 1128 |
\newbox\zstrutbox \setbox\zstrutbox=\copy\strutbox |
| 1129 |
\def\zstrut{\relax\ifmmode\copy\zstrutbox\else\unhcopy\zstrutbox\fi} |
| 1130 |
\def\zedbaselinestretch{1} |
| 1131 |
\def\baselinestretch{1} |
| 1132 |
% \end{macrocode} |
| 1133 |
% |
| 1134 |
% Penalties |
| 1135 |
% |
| 1136 |
% \begin{macrocode} |
| 1137 |
\newcount\interzedlinepenalty \interzedlinepenalty=10000 %never break |
| 1138 |
\newcount\preboxpenalty \preboxpenalty=0 %break easily |
| 1139 |
\newcount\forcepagepenalty \forcepagepenalty=-10000 %always break |
| 1140 |
\interdisplaylinepenalty=100 %break sometimes |
| 1141 |
% \end{macrocode} |
| 1142 |
% |
| 1143 |
% Macros for changing the size of schema text |
| 1144 |
% |
| 1145 |
% \begin{macrocode} |
| 1146 |
\def\zedsize#1{\def\z@size{#1}} |
| 1147 |
\def\z@size{} |
| 1148 |
\newskip\z@adskip\newskip\z@bdskip\newskip\z@adsskip\newskip\z@bdsskip |
| 1149 |
\def\z@changesize{% |
| 1150 |
\z@adskip\abovedisplayskip\z@bdskip\belowdisplayskip% save skips |
| 1151 |
\z@adsskip\abovedisplayshortskip\z@bdsskip\belowdisplayshortskip |
| 1152 |
\z@size % change size |
| 1153 |
\abovedisplayskip\z@adskip\belowdisplayskip\z@bdskip% restore skips |
| 1154 |
\abovedisplayshortskip\z@adsskip\belowdisplayshortskip\z@bdsskip} |
| 1155 |
% |
| 1156 |
\def\z@zeroskips{\abovedisplayskip\z@\belowdisplayskip\z@ |
| 1157 |
\abovedisplayshortskip\z@\belowdisplayshortskip\z@} |
| 1158 |
% |
| 1159 |
% Make zedbaselinestretch have an automatic effect |
| 1160 |
% adapted from lfonts.tex |
| 1161 |
% |
| 1162 |
\def\@setfontsize#1#2#3{\@nomath#1% |
| 1163 |
\ifx\protect\@typeset@protect |
| 1164 |
\let\@currsize#1% |
| 1165 |
\fi |
| 1166 |
\fontsize{#2}{#3}\selectfont |
| 1167 |
\setlength{\zedbaselineskip}{\baselineskip/\real{\baselinestretch}}% |
| 1168 |
\zedbaselineskip\zedbaselinestretch\zedbaselineskip |
| 1169 |
\setbox\zstrutbox\hbox{\vrule height.7\zedbaselineskip |
| 1170 |
depth.3\zedbaselineskip width\z@}} |
| 1171 |
% \end{macrocode} |
| 1172 |
% |
| 1173 |
%\subsection{Macros for margins} |
| 1174 |
% |
| 1175 |
% |\z@narrow|, |\z@wide| --- make the margins narrower, wider |
| 1176 |
% |
| 1177 |
% \begin{macrocode} |
| 1178 |
\def\z@narrow{\advance\linewidth by -\zedindent} |
| 1179 |
\def\z@wide{\advance\linewidth by \zedindent} |
| 1180 |
% \end{macrocode} |
| 1181 |
% |
| 1182 |
%\subsection{Macros for drawing boxes} |
| 1183 |
% |
| 1184 |
% |\z@hrulefill| --- line with correct thickness |
| 1185 |
% |
| 1186 |
% \begin{macrocode} |
| 1187 |
\def\z@hrulefill{\leaders\hrule height\zedlinethickness\hfill} |
| 1188 |
% \end{macrocode} |
| 1189 |
% |
| 1190 |
% |\z@topline| draws the top horizontal line of boxed environments |
| 1191 |
% |\z@dbltopline| draws a double ruled top line |
| 1192 |
% |\z@botline| draws the bottom horizontal line of boxed environments |
| 1193 |
% |\zedline[comment]| draws a long horizontal line ending in comment |
| 1194 |
% |\where| draws a short horizontal line |
| 1195 |
% |
| 1196 |
% \begin{macrocode} |
| 1197 |
\def\z@topline#1{\omit\@ifnextchar[{\z@@topline{#1}}{\z@@topline{#1}[]}} |
| 1198 |
\def\z@@topline#1[#2]{\hbox to\linewidth{\zstrut\ifleftnames\else |
| 1199 |
\vrule height\zedlinethickness width\zedlinethickness |
| 1200 |
\hbox to\zedleftsep{\z@hrulefill}\fi#1\z@hrulefill |
| 1201 |
\smash{\vrule height\zedlinethickness width\zedlinethickness |
| 1202 |
depth\zedcornerheight}\hbox{\sf #2}}\cr} |
| 1203 |
\def\z@dbltopline#1{\omit\@ifnextchar[{\z@@dbltopline{#1}}{\z@@dbltopline{#1}[]}} |
| 1204 |
\def\z@@dbltopline#1[#2]{\z@@topline{#1}[#2]% |
| 1205 |
\noalign{\kern-\baselineskip |
| 1206 |
\kern-\zedlinethickness |
| 1207 |
\kern-\doublerulesep \nobreak}% |
| 1208 |
\omit\z@@topline{\hphantom{#1}}[\hphantom{#2}]% |
| 1209 |
\noalign{\kern\doublerulesep |
| 1210 |
\kern\zedlinethickness \nobreak}} |
| 1211 |
\def\z@botline{\also\omit\hbox to\linewidth{\z@hrulefill |
| 1212 |
\smash{\vrule height\zedcornerheight width\zedlinethickness |
| 1213 |
depth 0pt}}\cr} |
| 1214 |
\def\z@@botline[#1]{\hbox to\linewidth{\vrule\z@hrulefill\hbox{\sf\smash{#1}}}\also} |
| 1215 |
\def\zedline{\also\omit\@ifnextchar[{\z@@botline}{\z@@botline[]}} |
| 1216 |
\def\where{\also \omit \hbox to\zedbar{\z@hrulefill}\cr\also} |
| 1217 |
\let \ST \where |
| 1218 |
% \end{macrocode} |
| 1219 |
% |
| 1220 |
% |\z@left| is placed at the left of each z line: |
| 1221 |
% in non-box environments it will do nothing. |
| 1222 |
% in boxed environments it will do a vertical line with the same |
| 1223 |
% height as the maximum height of the line. |
| 1224 |
% |
| 1225 |
% \begin{macrocode} |
| 1226 |
\def\z@left{\ifz@inbox\vrule width\zedlinethickness\hskip\zedleftsep\fi} |
| 1227 |
% \end{macrocode} |
| 1228 |
% |
| 1229 |
% \subsection{Macros for setting up Z environments} |
| 1230 |
% |
| 1231 |
% \begin{macrocode} |
| 1232 |
\def\z@env{\global\z@firstlinetrue\z@changesize |
| 1233 |
$$ |
| 1234 |
\z@inenvtrue |
| 1235 |
\baselineskip\zedbaselineskip |
| 1236 |
\parskip=0pt\lineskip=0pt\z@narrow |
| 1237 |
\advance\displayindent by \zedindent |
| 1238 |
\def\\{\crcr}% Must have \def and not \let for nested alignments. |
| 1239 |
\everycr={\noalign{\ifz@firstline \global\z@firstlinefalse |
| 1240 |
\else \penalty\interzedlinepenalty \fi}} |
| 1241 |
\tabskip=0pt} |
| 1242 |
\def\endz@env{$$ |
| 1243 |
\global\@ignoretrue |
| 1244 |
} |
| 1245 |
% \end{macrocode} |
| 1246 |
% |
| 1247 |
% Z lines are formated in two (overlapping) columns; |
| 1248 |
% the first flush left having the same width as the environment, |
| 1249 |
% and, the second flush right ending at the right end of the environment. |
| 1250 |
% |
| 1251 |
% \begin{macrocode} |
| 1252 |
\def\z@format{\halign to\linewidth\bgroup% |
| 1253 |
\zstrut\z@left\z@startline\ignorespaces$\@lign##$\z@stopline\hfil% |
| 1254 |
\tabskip=0pt plus1fil% |
| 1255 |
&\hbox to 0pt{\hss\@lign##}\tabskip=0pt\cr} |
| 1256 |
\def\z@boxenv{\z@narrow\let\also=\als@ \let\Also=\Als@ \let\ALSO=\ALS@ |
| 1257 |
\z@inboxtrue \predisplaypenalty=\preboxpenalty \z@env\z@format} |
| 1258 |
\def\z@outnonbox{\z@outclasscheck\z@leavevmode\z@env} |
| 1259 |
\def\z@inoutbox{\z@leavevmode\z@makeouter\z@inclassfalse\z@boxenv} |
| 1260 |
% \end{macrocode} |
| 1261 |
% |
| 1262 |
%\subsection{Spacing commands} |
| 1263 |
% |
| 1264 |
% no vertical glue between abutted lines |
| 1265 |
% |
| 1266 |
% \begin{macrocode} |
| 1267 |
\def\@but{\noalign{\nointerlineskip}} |
| 1268 |
% \end{macrocode} |
| 1269 |
% |
| 1270 |
% no |\par| extra vertical spacing after Z environments |
| 1271 |
% |
| 1272 |
%|\def\z@nopar{\ifz@inclass\else\vskip-\parskip\fi}| |
| 1273 |
%|\def\z@nopar{\global\parskip0pt\global\everypar{\parskip30mm\everypar{}}}| |
| 1274 |
% \begin{macrocode} |
| 1275 |
\def\z@nopar{\global\@endpetrue} |
| 1276 |
% \end{macrocode} |
| 1277 |
% |
| 1278 |
% |\z@leavevmode| -- Enter horizontal mode, taking account of possible |
| 1279 |
% interaction with lists and section heads: |
| 1280 |
%\begin{enumerate} |
| 1281 |
% \item After a |\item|, use |\indent| to get the label (this |
| 1282 |
% fails to run in even short labels). |
| 1283 |
% \item After a run-in heading, use |\indent|. |
| 1284 |
% \item After an ordinary heading, throw away the |\everypar| |
| 1285 |
% tokens, reset |\@nobreak|, and use |\noindent| with |\parskip| |
| 1286 |
% zero. |
| 1287 |
% \item Otherwise, use |\noindent| with |\parskip| zero |
| 1288 |
%\end{enumerate} |
| 1289 |
% Use when entering displayed environments to get correct spacing |
| 1290 |
% |
| 1291 |
% \begin{macrocode} |
| 1292 |
\def\z@leavevmode{\ifvmode\if@inlabel\indent\else\if@noskipsec\indent\else |
| 1293 |
\if@nobreak\global\@nobreakfalse\everypar={}\fi |
| 1294 |
{\parskip=0pt\noindent}\fi\fi\fi} |
| 1295 |
% \end{macrocode} |
| 1296 |
% |
| 1297 |
% extra vertical space in non-box environments |
| 1298 |
% |
| 1299 |
% \begin{macrocode} |
| 1300 |
\def\also{\crcr\noalign{\vskip\jot}} |
| 1301 |
\def\Also{\crcr\noalign{\vskip2\jot}} |
| 1302 |
\def\ALSO{\Also\Also} |
| 1303 |
% \end{macrocode} |
| 1304 |
% |
| 1305 |
% extra vertical space in boxed environments |
| 1306 |
% |
| 1307 |
% \begin{macrocode} |
| 1308 |
\def\als@{\crcr\@but\omit\vrule height\jot width\zedlinethickness \cr \@but} |
| 1309 |
\def\Als@{\crcr\@but\omit\vrule height2\jot width\zedlinethickness \cr \@but} |
| 1310 |
\def\ALS@{\crcr\@but\omit\vrule height4\jot width\zedlinethickness \cr \@but} |
| 1311 |
% \end{macrocode} |
| 1312 |
% |
| 1313 |
%\subsection{Environment-breaking commands} |
| 1314 |
% |
| 1315 |
% \begin{macrocode} |
| 1316 |
\def\znewpage{\also\noalign{\penalty\forcepagepenalty}\also} |
| 1317 |
\def\zbreak{\also\noalign{\penalty\interdisplaylinepenalty\vskip-\jot}\also} |
| 1318 |
\def\Zbreak{\also\noalign{\penalty\interdisplaylinepenalty}\also} |
| 1319 |
\def\ZBREAK{\Also\noalign{\penalty\interdisplaylinepenalty}\Also} |
| 1320 |
\def\t#1{\hskip #1\zedtab} |
| 1321 |
%\def\c#1#2{\hbox to #1\zedtab{$#2$\hfil}} |
| 1322 |
\def\flushr#1{\crcr\quad\cr} |
| 1323 |
% \end{macrocode} |
| 1324 |
% |
| 1325 |
%\section{Utility macros for Object-Z} |
| 1326 |
% |
| 1327 |
% \begin{macrocode} |
| 1328 |
\def\z@inclasscheck{\ifz@inclass\else |
| 1329 |
\@latexerr{This Z environment is only allowed within a class} |
| 1330 |
{Perhaps you forgot to include a \string\begin\string{class\string} |
| 1331 |
somewhere^^Jor you are trying to print a file that needs updating.^^J\@ehc} \fi} |
| 1332 |
\def\z@outclasscheck{\ifz@inclass |
| 1333 |
\@latexerr{This Z environment is not allowed inside a class} |
| 1334 |
{This environment doesn't really make sense within a class.^^J% |
| 1335 |
If you really want it then I'll try my best to fit in in.^^J\@ehc}\else |
| 1336 |
\ifz@inenv \@latexerr{New Z environment declared before previous |
| 1337 |
one is completed} |
| 1338 |
{I suspect that you've forgotten to finish the last environment.^^J% |
| 1339 |
You are trying to nest environments and this can only be done inside classes^^J% |
| 1340 |
besides, the environment you have started isn't valid within classes any way.^^JI suggest that you type \space X <return> \space to quit and then correct your document.} |
| 1341 |
\fi\fi} |
| 1342 |
% |
| 1343 |
\def\z@makeouter{% |
| 1344 |
\ifz@inenv |
| 1345 |
\ifz@inclass\z@inenvfalse |
| 1346 |
\hskip-\zedleftsep \advance\linewidth by -\zedlinethickness |
| 1347 |
\zedindent=\zedleftsep \zedleftsep=0.8\zedleftsep |
| 1348 |
\zedbar=0.8\zedbar \zedtab=0.8\zedtab |
| 1349 |
\oz@parbox{\linewidth}\bgroup |
| 1350 |
\z@zeroskips |
| 1351 |
\else |
| 1352 |
\@latexerr{Incorrect place for Z environment; nesting is |
| 1353 |
allowed only inside classes} |
| 1354 |
{You've either forgotten to finish the last environment,^^J% |
| 1355 |
you've forgotten to include a |
| 1356 |
\string\begin\string{class\string} somewhere^^J% |
| 1357 |
or you are trying to print a file that needs updating.^^J% |
| 1358 |
(Then again, you might just be trying to do something^^J% |
| 1359 |
that the author of these macros didn't intend you to do)^^J\@ehc} |
| 1360 |
\fi |
| 1361 |
\else |
| 1362 |
\bgroup |
| 1363 |
\fi |
| 1364 |
} |
| 1365 |
% |
| 1366 |
\def \z@makeinner{\egroup |
| 1367 |
\global\z@curindent\z@ |
| 1368 |
} |
| 1369 |
% |
| 1370 |
\def \classbreak{\also\egroup$$\vskip -\ht\zstrutbox |
| 1371 |
\vskip -\abovedisplayskip\vskip -\belowdisplayskip\z@wide\z@boxenv\also} |
| 1372 |
% \end{macrocode} |
| 1373 |
% |
| 1374 |
%\section{Non-box environments} |
| 1375 |
% |
| 1376 |
% |
| 1377 |
% ZED for non-box multiline formulas |
| 1378 |
% |
| 1379 |
% \begin{macrocode} |
| 1380 |
\def\zed{\z@outnonbox\z@inboxfalse\z@format} |
| 1381 |
\def\endzed{\crcr\egroup\endz@env} |
| 1382 |
\let\[=\zed |
| 1383 |
\def\]{\crcr\egroup$$\ignorespaces} |
| 1384 |
% \end{macrocode} |
| 1385 |
% |
| 1386 |
% ARGUE for algebraic arguments |
| 1387 |
% |
| 1388 |
% used for algebraic proofs expressed as extended equations. |
| 1389 |
% like zed but with extra spacing between lines |
| 1390 |
% Generates an alignment display, which may be split across pages. |
| 1391 |
% |
| 1392 |
% \begin{macrocode} |
| 1393 |
\def\argue{\z@outnonbox\interzedlinepenalty=\interdisplaylinepenalty |
| 1394 |
\openup 1\jot \z@format |
| 1395 |
\noalign{\vskip-\jot}}% equal vspace above and below argue display |
| 1396 |
\let\endargue=\endzed |
| 1397 |
% \end{macrocode} |
| 1398 |
% |
| 1399 |
% INFRULE for inference rules |
| 1400 |
% |
| 1401 |
% used for inference rules. The horizontal line is generated by |\derive|: |
| 1402 |
% an optional argument contains the side-conditions of the rule. |
| 1403 |
% |
| 1404 |
% \begin{macrocode} |
| 1405 |
\def\infrule{\z@outnonbox\halign\bgroup |
| 1406 |
\zstrut\quad$\@lign##$\quad\hfil&\quad\@lign##\hfil\cr} |
| 1407 |
\let\endinfrule=\endzed |
| 1408 |
\def\derive{\crcr\also\@but\omit\z@hrulefill% |
| 1409 |
\@ifnextchar[{\z@sidecondition}{\cr\also\@but}} |
| 1410 |
\def\Derive{\crcr\also\@but\omit\z@hrulefill\cr\@but |
| 1411 |
\noalign{\kern-\dp\zstrutbox |
| 1412 |
\kern\doublerulesep \nobreak}% |
| 1413 |
\omit\derive} |
| 1414 |
\def\z@sidecondition[#1]{&$\smash{\lower 0.2ex\hbox{$[\;#1\;]$}}$\cr\also\@but} |
| 1415 |
% \end{macrocode} |
| 1416 |
% |
| 1417 |
% SYNTAX for syntax rules |
| 1418 |
% |
| 1419 |
% `syntax' environment: used for syntax rules --- even (once!) for VDM. |
| 1420 |
% \begin{macrocode} |
| 1421 |
\def\syntax{\z@outnonbox\halign\bgroup |
| 1422 |
\zstrut$\@lign##$\hfil &\hfil$\@lign{}##{}$\hfil |
| 1423 |
&$\@lign##$\hfil &\qquad\@lign-- ##\hfil\cr} |
| 1424 |
\let\endsyntax=\endzed |
| 1425 |
% \end{macrocode} |
| 1426 |
% |
| 1427 |
% \subsection{Boxed environments} |
| 1428 |
% |
| 1429 |
% |
| 1430 |
% SCHEMA schema definitions |
| 1431 |
% |
| 1432 |
% \begin{macrocode} |
| 1433 |
\def\schema#1{\z@inoutbox\z@topline{$\,#1\,$}} |
| 1434 |
\def\endschema{\z@botline \endzed \z@makeinner \z@nopar} |
| 1435 |
% \end{macrocode} |
| 1436 |
% |
| 1437 |
% ANONSCHEMA schema with no name |
| 1438 |
% |
| 1439 |
% \begin{macrocode} |
| 1440 |
\@namedef{anonschema}{\leftnamesfalse\z@inoutbox\z@topline{}} |
| 1441 |
\expandafter\let\csname endanonschema\endcsname=\endschema |
| 1442 |
% \end{macrocode} |
| 1443 |
% |
| 1444 |
% GENSCHEMA generic schema definitions |
| 1445 |
% |
| 1446 |
% \begin{macrocode} |
| 1447 |
\def\genschema#1#2{\z@inoutbox\z@topline{$\,#1\:[#2]\,$}} |
| 1448 |
\let\endgenschema=\endschema |
| 1449 |
% \end{macrocode} |
| 1450 |
% |
| 1451 |
% AXDEF `liberal' axiomatic definitions |
| 1452 |
% |
| 1453 |
% \begin{macrocode} |
| 1454 |
\def\axdef{\z@inoutbox} |
| 1455 |
\def\endaxdef{\endzed\z@makeinner} |
| 1456 |
% \end{macrocode} |
| 1457 |
% |
| 1458 |
% UNIQDEF `unique' axiomatic definitions |
| 1459 |
% |
| 1460 |
% \begin{macrocode} |
| 1461 |
\def\uniqdef{\leftnamesfalse\z@inoutbox\z@dbltopline{}} |
| 1462 |
\let\enduniqdef=\endschema |
| 1463 |
% \end{macrocode} |
| 1464 |
% |
| 1465 |
% GENDEF 'generic' axiomatic definitions |
| 1466 |
% |
| 1467 |
% HACK TO MAKE IT COMPATIBLE WITH FUZZ.STY |
| 1468 |
% \begin{macrocode} |
| 1469 |
\def\gendef{\@ifnextchar[{\z@gendef}{\z@@gendef}} |
| 1470 |
\def\z@gendef[#1]{\leftnamesfalse\z@inoutbox\z@dbltopline{$\,[#1]\,$}} |
| 1471 |
\def\z@@gendef#1{\leftnamesfalse\z@inoutbox\z@dbltopline{$\,[#1]\,$}} |
| 1472 |
\let\endgendef=\endschema |
| 1473 |
% \end{macrocode} |
| 1474 |
% |
| 1475 |
% GENGENDEF generic contents 'generic' axiomatic definitions |
| 1476 |
% |
| 1477 |
% Hack to provide syntax-oriented display boxes |
| 1478 |
% \begin{macrocode} |
| 1479 |
\def\gengendef{\@ifnextchar[{\z@gengendef}{\z@@gengendef}} |
| 1480 |
\def\z@gengendef[#1]{\leftnamesfalse\z@inoutbox\z@dbltopline{$\,#1\,$}} |
| 1481 |
\def\z@@gengendef#1{\leftnamesfalse\z@inoutbox\z@dbltopline{$\,#1\,$}} |
| 1482 |
\let\endgengendef=\endschema |
| 1483 |
% \end{macrocode} |
| 1484 |
% |
| 1485 |
% CLASS |
| 1486 |
% |
| 1487 |
% \begin{macrocode} |
| 1488 |
\def\class#1{\z@leavevmode\z@makeouter\z@inclasstrue |
| 1489 |
\z@boxenv\z@topline{$\,#1\,$}} |
| 1490 |
\let\endclass\endschema |
| 1491 |
% \end{macrocode} |
| 1492 |
% |
| 1493 |
% OP |
| 1494 |
% |
| 1495 |
% \begin{macrocode} |
| 1496 |
\def\op{\z@inclasscheck\schema} |
| 1497 |
\let\endop\endschema |
| 1498 |
% \end{macrocode} |
| 1499 |
% |
| 1500 |
% STATE |
| 1501 |
% |
| 1502 |
% \begin{macrocode} |
| 1503 |
\def\state{\z@inclasscheck\anonschema} |
| 1504 |
\let\endstate\endschema |
| 1505 |
% \end{macrocode} |
| 1506 |
% |
| 1507 |
% INIT |
| 1508 |
% |
| 1509 |
% \begin{macrocode} |
| 1510 |
\def\init{\z@inclasscheck\schema{\Init}} |
| 1511 |
\let\endinit\endschema |
| 1512 |
% \end{macrocode} |
| 1513 |
% |
| 1514 |
% CONST |
| 1515 |
% |
| 1516 |
% \begin{macrocode} |
| 1517 |
\let\const\axdef |
| 1518 |
\let\endconst\endaxdef |
| 1519 |
% \end{macrocode} |
| 1520 |
% |
| 1521 |
% TYPE |
| 1522 |
% |
| 1523 |
% \begin{macrocode} |
| 1524 |
\def\type{\z@inclasscheck} |
| 1525 |
\let\endtype\relax |
| 1526 |
% \end{macrocode} |
| 1527 |
% |
| 1528 |
%\subsection{Other environments} |
| 1529 |
% |
| 1530 |
% SIDEBYSIDE |
| 1531 |
% |
| 1532 |
% This should support an arbitary number of columns |
| 1533 |
% |\zedindent|'s proportion of |\linewidth| gives a practical limit |
| 1534 |
% |
| 1535 |
% \begin{macrocode} |
| 1536 |
\def\sidebyside{\@ifnextchar[{\z@columns}{\z@columns[2]}} |
| 1537 |
\def\z@columns[#1]{\z@leavevmode\z@cols#1 \z@makeouter\z@narrow% |
| 1538 |
$$\lineskip=0pt\z@incolstrue |
| 1539 |
\predisplaysize\maxdimen |
| 1540 |
\ifz@leftmargin\hskip-\zedindent\z@leftmarginfalse\fi |
| 1541 |
\setbox0=\hbox to \linewidth\bgroup\z@zeroskips% |
| 1542 |
\divide\zedbar by \z@cols \divide\zedleftsep by \z@cols |
| 1543 |
\divide\zedtab by \z@cols \divide\linewidth by \z@cols |
| 1544 |
\oz@parbox[t]{\linewidth}\bgroup\z@wide} |
| 1545 |
% |
| 1546 |
\def\nextside{\egroup\hss\oz@parbox[t]{\linewidth}\bgroup\z@wide} |
| 1547 |
% |
| 1548 |
\newdimen\z@temp |
| 1549 |
\def\endsidebyside{\egroup\egroup |
| 1550 |
\z@temp\ht0 \advance\z@temp by \dp0\advance\z@temp by-\dp\zstrutbox |
| 1551 |
\hbox{\raise\z@temp\box0}\endz@env\z@makeinner\z@nopar} |
| 1552 |
% \end{macrocode} |
| 1553 |
% |
| 1554 |
% ZPAR |
| 1555 |
% |
| 1556 |
% \begin{macrocode} |
| 1557 |
\def\zpar{\z@leavevmode |
| 1558 |
\ifz@inenv\z@inclasstrue\fi% fudge to let zpar in all boxes |
| 1559 |
\z@makeouter\z@changesize |
| 1560 |
\advance\linewidth by -\z@curindent |
| 1561 |
\advance\linewidth by -\wd\z@curline |
| 1562 |
\hskip-\wd\z@curline\advance\linewidth by -\zedindent$$ |
| 1563 |
\ifz@leftmargin\hskip-\zedindent\fi% adjustment for first column |
| 1564 |
\advance\displayindent by \zedindent |
| 1565 |
\advance\displaywidth by -\zedindent |
| 1566 |
\advance\displayindent by \z@curindent |
| 1567 |
\advance\displayindent by \wd\z@curline |
| 1568 |
\advance\displaywidth by -\z@curindent |
| 1569 |
\advance\displaywidth by -\wd\z@curline |
| 1570 |
\global\setbox\z@curline\hbox{} |
| 1571 |
\z@narrow\oz@parbox[b]{\linewidth}\bgroup\hfil\break} |
| 1572 |
\def\endzpar{\egroup$$\z@makeinner\z@nopar} |
| 1573 |
% \end{macrocode} |
| 1574 |
% |
| 1575 |
% CLASSCOM |
| 1576 |
% |
| 1577 |
% \begin{macrocode} |
| 1578 |
\def \classcom{\zpar\sf} |
| 1579 |
\let \endclasscom=\endzpar |
| 1580 |
% \end{macrocode} |
| 1581 |
% |
| 1582 |
% PROOF |
| 1583 |
% |
| 1584 |
% \begin{macrocode} |
| 1585 |
\def\proof{\zpar$\PR$\zpar} |
| 1586 |
\def\endproof{\endzpar\endzpar} |
| 1587 |
% \end{macrocode} |
| 1588 |
% |
| 1589 |
% Additional auxiliary macros |
| 1590 |
% |
| 1591 |
% \begin{macrocode} |
| 1592 |
\def\zseq#1{\lseq #1 \rseq} |
| 1593 |
\def\zset#1{\{ #1 \}} |
| 1594 |
\def\zimg#1{\limg #1 \rimg} |
| 1595 |
\def\zsch#1{\lsch #1 \rsch} |
| 1596 |
\def\zimgset#1{\zimg\zset{#1}} |
| 1597 |
% \end{macrocode} |
| 1598 |
% |
| 1599 |
% OZ FUZZ |
| 1600 |
% |
| 1601 |
% |\defs| == |
| 1602 |
% |\sdef| |\defs| |
| 1603 |
% |
| 1604 |
% \begin{macrocode} |
| 1605 |
\def\fuzzcompatible{% |
| 1606 |
\let\defs\sdef |
| 1607 |
\let\empty\emptyset |
| 1608 |
} |
| 1609 |
% |
| 1610 |
%</package> |
| 1611 |
% \end{macrocode} |
| 1612 |
% \Finale |
| 1613 |
\endinput |