| 73745 |      1 | % logics.sty : Logics Manuals Page Layout
 | 
|  |      2 | %
 | 
|  |      3 | \typeout{Document Style logics. Released 18 August 2003}
 | 
|  |      4 | 
 | 
|  |      5 | \hyphenation{Isa-belle man-u-script man-u-scripts ap-pen-dix mut-u-al-ly}
 | 
|  |      6 | \hyphenation{data-type data-types co-data-type co-data-types }
 | 
|  |      7 | 
 | 
|  |      8 | %usage: \iflabelundefined{LABEL}{if not defined}{if defined}
 | 
|  |      9 | \newcommand{\iflabelundefined}[1]{\@ifundefined{r@#1}}
 | 
|  |     10 | 
 | 
|  |     11 | 
 | 
|  |     12 | %%%INDEXING  use isa-index to process the index
 | 
|  |     13 | 
 | 
|  |     14 | \newcommand\seealso[2]{\emph{see also} #1}
 | 
|  |     15 | \usepackage{makeidx}
 | 
|  |     16 | 
 | 
|  |     17 | %index, putting page numbers of definitions in boldface
 | 
|  |     18 | \def\bold#1{\textbf{#1}}
 | 
|  |     19 | \newcommand\fnote[1]{#1n}
 | 
|  |     20 | \newcommand\indexbold[1]{\index{#1|bold}}
 | 
|  |     21 | 
 | 
|  |     22 | % The alternative to \protect\isa in the indexing macros is
 | 
|  |     23 | % \noexpand\noexpand \noexpand\isa
 | 
|  |     24 | % need TWO levels of \noexpand to delay the expansion of \isa:
 | 
|  |     25 | %  the \noexpand\noexpand will leave one \noexpand, to be given to the
 | 
|  |     26 | %  (still unexpanded) \isa token.  See TeX by Topic, page 122.
 | 
|  |     27 | 
 | 
|  |     28 | %%%% for indexing constants, symbols, theorems, ...
 | 
|  |     29 | \newcommand\cdx[1]{\isa{#1}\index{#1@\protect\isa{#1} (constant)}}
 | 
|  |     30 | \newcommand\sdx[1]{\isa{#1}\index{#1@\protect\isa{#1} (symbol)}}
 | 
|  |     31 | 
 | 
|  |     32 | \newcommand\tdx[1]{\isa{#1}\index{#1@\protect\isa{#1} (theorem)}}
 | 
|  |     33 | \newcommand\tdxbold[1]{\isa{#1}\index{#1@\protect\isa{#1} (theorem)|bold}}
 | 
|  |     34 | 
 | 
|  |     35 | \newcommand\cldx[1]{\isa{#1}\index{#1@\protect\isa{#1} (class)}}
 | 
|  |     36 | \newcommand\tydx[1]{\isa{#1}\index{#1@\protect\isa{#1} (type)}}
 | 
|  |     37 | \newcommand\thydx[1]{\isa{#1}\index{#1@\protect\isa{#1} (theory)}}
 | 
|  |     38 | 
 | 
|  |     39 | \newcommand\attrdx[1]{\isa{#1}\index{#1@\protect\isa{#1} (attribute)}}
 | 
|  |     40 | \newcommand\cmmdx[1]{\index{#1@\protect\isacommand{#1} (command)}}
 | 
|  |     41 | \newcommand\commdx[1]{\isacommand{#1}\index{#1@\protect\isacommand{#1} (command)}}
 | 
|  |     42 | \newcommand\methdx[1]{\isa{#1}\index{#1@\protect\isa{#1} (method)}}
 | 
|  |     43 | 
 | 
|  |     44 | %set argument in \bf font and index in ROMAN font (for definitions in text!)
 | 
|  |     45 | \newcommand\bfindex[1]{{\bf#1}\index{#1|bold}\@}
 | 
|  |     46 | 
 | 
|  |     47 | \newcommand\rmindex[1]{{#1}\index{#1}\@}
 | 
|  |     48 | \newcommand\ttindex[1]{\texttt{#1}\index{#1@\texttt{#1}}\@}
 | 
|  |     49 | \newcommand\ttindexbold[1]{\texttt{#1}\index{#1@\texttt{#1}|bold}\@}
 | 
|  |     50 | 
 | 
|  |     51 | \newcommand{\indexboldpos}[2]{#1\@}
 | 
|  |     52 | \newcommand{\ttindexboldpos}[2]{\isa{#1}\@}
 | 
|  |     53 | 
 | 
|  |     54 | %\newtheorem{theorem}{Theorem}[section]
 | 
|  |     55 | \newtheorem{Exercise}{Exercise}[section]
 | 
|  |     56 | \newenvironment{exercise}{\begin{Exercise}\rm}{\end{Exercise}}
 | 
|  |     57 | \newcommand{\ttlbr}{\texttt{[|}}
 | 
|  |     58 | \newcommand{\ttrbr}{\texttt{|]}}
 | 
|  |     59 | \newcommand{\ttor}{\texttt{|}}
 | 
|  |     60 | \newcommand{\ttall}{\texttt{!}}
 | 
|  |     61 | \newcommand{\ttuniquex}{\texttt{?!}}
 | 
|  |     62 | \newcommand{\ttEXU}{\texttt{EX!}}
 | 
|  |     63 | \newcommand{\ttAnd}{\texttt{!!}}
 | 
|  |     64 | 
 | 
|  |     65 | \newcommand{\isasymignore}{}
 | 
|  |     66 | \newcommand{\isasymimp}{\isasymlongrightarrow}
 | 
|  |     67 | \newcommand{\isasymImp}{\isasymLongrightarrow}
 | 
|  |     68 | \newcommand{\isasymFun}{\isasymRightarrow}
 | 
|  |     69 | \newcommand{\isasymuniqex}{\isamath{\exists!\,}}
 | 
|  |     70 | \renewcommand{\S}{Sect.\ts}
 | 
|  |     71 | 
 | 
|  |     72 | \renewenvironment{isamarkuptxt}{\begin{isamarkuptext}}{\end{isamarkuptext}}
 | 
|  |     73 | 
 | 
|  |     74 | \newif\ifremarks
 | 
|  |     75 | \newcommand{\REMARK}[1]{\ifremarks\marginpar{\raggedright\footnotesize#1}\fi}
 | 
|  |     76 | 
 | 
|  |     77 | %names of Isabelle rules
 | 
|  |     78 | \newcommand{\rulename}[1]{\hfill(#1)}
 | 
|  |     79 | \newcommand{\rulenamedx}[1]{\hfill(#1\index{#1@\protect\isa{#1} (theorem)|bold})}
 | 
|  |     80 | 
 | 
|  |     81 | %%%% meta-logical connectives
 | 
|  |     82 | 
 | 
|  |     83 | \let\Forall=\bigwedge
 | 
|  |     84 | \let\Imp=\Longrightarrow
 | 
|  |     85 | \let\To=\Rightarrow
 | 
|  |     86 | \newcommand{\Var}[1]{{?\!#1}}
 | 
|  |     87 | 
 | 
|  |     88 | %%% underscores as ordinary characters, not for subscripting
 | 
|  |     89 | %%  use @ or \sb for subscripting; use \at for @
 | 
|  |     90 | %%  only works in \tt font
 | 
|  |     91 | %%  must not make _ an active char; would make \ttindex fail!
 | 
|  |     92 | \gdef\underscoreoff{\catcode`\@=8\catcode`\_=\other}
 | 
|  |     93 | \gdef\underscoreon{\catcode`\_=8\makeatother}
 | 
|  |     94 | \chardef\other=12
 | 
|  |     95 | \chardef\at=`\@
 | 
|  |     96 | 
 | 
|  |     97 | % alternative underscore
 | 
|  |     98 | \def\_{\leavevmode\kern.06em\vbox{\hrule height.2ex width.3em}\hskip0.1em}
 | 
|  |     99 | 
 | 
|  |    100 | 
 | 
|  |    101 | %%%% ``WARNING'' environment
 | 
|  |    102 | \def\dbend{\vtop to 0pt{\vss\hbox{\Huge\bf!}\vss}}
 | 
|  |    103 | \newenvironment{warn}{\medskip\medbreak\begingroup \clubpenalty=10000 
 | 
|  |    104 |          \small %%WAS\baselineskip=0.9\baselineskip
 | 
|  |    105 |          \noindent \hangindent\parindent \hangafter=-2 
 | 
|  |    106 |          \hbox to0pt{\hskip-\hangindent\dbend\hfill}\ignorespaces}%
 | 
|  |    107 |         {\par\endgroup\medbreak}
 | 
|  |    108 | 
 | 
|  |    109 | 
 | 
|  |    110 | %%%% Standard logical symbols
 | 
|  |    111 | \let\turn=\vdash
 | 
|  |    112 | \let\conj=\wedge
 | 
|  |    113 | \let\disj=\vee
 | 
|  |    114 | \let\imp=\rightarrow
 | 
|  |    115 | \let\bimp=\leftrightarrow
 | 
|  |    116 | \newcommand\all[1]{\forall#1.}  %quantification
 | 
|  |    117 | \newcommand\ex[1]{\exists#1.}
 | 
|  |    118 | \newcommand{\pair}[1]{\langle#1\rangle}
 | 
|  |    119 | 
 | 
|  |    120 | \newcommand{\lparr}{\mathopen{(\!|}}
 | 
|  |    121 | \newcommand{\rparr}{\mathclose{|\!)}}
 | 
|  |    122 | \newcommand{\fs}{\mathpunct{,\,}}
 | 
|  |    123 | \newcommand{\ty}{\mathrel{::}}
 | 
|  |    124 | \newcommand{\asn}{\mathrel{:=}}
 | 
|  |    125 | \newcommand{\more}{\ldots}
 | 
|  |    126 | \newcommand{\record}[1]{\lparr #1 \rparr}
 | 
|  |    127 | \newcommand{\dtt}{\mathord.}
 | 
|  |    128 | 
 | 
|  |    129 | \newcommand\lbrakk{\mathopen{[\![}}
 | 
|  |    130 | \newcommand\rbrakk{\mathclose{]\!]}}
 | 
|  |    131 | \newcommand\List[1]{\lbrakk#1\rbrakk}  %was \obj
 | 
|  |    132 | \newcommand\vpile[1]{\begin{array}{c}#1\end{array}}
 | 
|  |    133 | \newenvironment{matharray}[1]{\[\begin{array}{#1}}{\end{array}\]}
 | 
|  |    134 | \newcommand{\Text}[1]{\mbox{#1}}
 | 
|  |    135 | 
 | 
|  |    136 | \DeclareMathSymbol{\dshsym}{\mathalpha}{letters}{"2D}
 | 
|  |    137 | \newcommand{\dsh}{\mathit{\dshsym}}
 | 
|  |    138 | 
 | 
|  |    139 | \let\int=\cap
 | 
|  |    140 | \let\un=\cup
 | 
|  |    141 | \let\inter=\bigcap
 | 
|  |    142 | \let\union=\bigcup
 | 
|  |    143 | 
 | 
|  |    144 | \def\ML{{\sc ml}}
 | 
|  |    145 | \def\AST{{\sc ast}}
 | 
|  |    146 | 
 | 
|  |    147 | %macros to change the treatment of symbols
 | 
|  |    148 | \def\relsemicolon{\mathcode`\;="303B}   %treat ; like a relation
 | 
|  |    149 | \def\binperiod{\mathcode`\.="213A}   %treat . like a binary operator
 | 
|  |    150 | \def\binvert{\mathcode`\|="226A}     %treat | like a binary operator
 | 
|  |    151 | 
 | 
|  |    152 | %redefinition of \sloppy and \fussy to use \emergencystretch
 | 
|  |    153 | \def\sloppy{\tolerance2000 \hfuzz.5pt \vfuzz.5pt \emergencystretch=15pt}
 | 
|  |    154 | \def\fussy{\tolerance200 \hfuzz.1pt \vfuzz.1pt \emergencystretch=0pt}
 | 
|  |    155 | 
 | 
|  |    156 | %non-bf version of description
 | 
|  |    157 | \def\descrlabel#1{\hspace\labelsep #1}
 | 
|  |    158 | \def\descr{\list{}{\labelwidth\z@ \itemindent-\leftmargin\let\makelabel\descrlabel}}
 | 
|  |    159 | \let\enddescr\endlist
 | 
|  |    160 | 
 | 
|  |    161 | % The mathcodes for the letters A, ..., Z, a, ..., z are changed to
 | 
|  |    162 | % generate text italic rather than math italic by default. This makes
 | 
|  |    163 | % multi-letter identifiers look better. The mathcode for character c
 | 
|  |    164 | % is set to |"7000| (variable family) + |"400| (text italic) + |c|.
 | 
|  |    165 | %
 | 
|  |    166 | \DeclareSymbolFont{italics}{\encodingdefault}{\rmdefault}{m}{it}%
 | 
|  |    167 | \def\@setmcodes#1#2#3{{\count0=#1 \count1=#3
 | 
|  |    168 |         \loop \global\mathcode\count0=\count1 \ifnum \count0<#2
 | 
|  |    169 |         \advance\count0 by1 \advance\count1 by1 \repeat}}
 | 
|  |    170 | \@setmcodes{`A}{`Z}{"7\hexnumber@\symitalics41}
 | 
|  |    171 | \@setmcodes{`a}{`z}{"7\hexnumber@\symitalics61}
 | 
|  |    172 | 
 | 
|  |    173 | %%% \dquotes permits usage of "..." for \hbox{...} 
 | 
|  |    174 | %%%   also taken from under.sty
 | 
|  |    175 | {\catcode`\"=\active
 | 
|  |    176 | \gdef\dquotes{\catcode`\"=\active  \let"=\@mathText}%
 | 
|  |    177 | \gdef\@mathText#1"{\hbox{\mathTextFont #1\/}}}
 | 
|  |    178 | \def\mathTextFont{\frenchspacing\tt}
 | 
|  |    179 | \def\dquotesoff{\catcode`\"=\other}
 |