doc-src/isar.sty
author wenzelm
Tue Mar 14 11:27:38 2000 +0100 (2000-03-14)
changeset 8446 fb73f193e577
parent 8377 def06c441893
child 8504 242527763a16
permissions -rw-r--r--
added \NEXT;
     1 
     2 %% $Id$
     3 %%
     4 %% Isar language elements
     5 %%
     6 
     7 \usepackage{ifthen}
     8 
     9 \newcommand{\isarkeyword}[1]{{\mathord{\mathbf{#1}}}}
    10 
    11 \newcommand{\indexoutertoken}[1]{\index{#1 (syntax)|bold}\index{Syntax!#1|bold}}
    12 \newcommand{\indexouternonterm}[1]{\index{#1 (syntax)|bold}\index{Syntax!#1|bold}}
    13 \newcommand{\indexisarcmd}[1]{\index{#1 (command)|bold}\index{Commands!#1|bold}}
    14 \newcommand{\indexisarmeth}[1]{\index{#1 (method)|bold}\index{Methods!#1|bold}}
    15 \newcommand{\indexisaratt}[1]{\index{#1 (attribute)|bold}\index{Attributes!#1|bold}}
    16 \newcommand{\indexisarthm}[1]{\index{#1 (theorem)|bold}\index{Theorems!#1|bold}}
    17 \newcommand{\indexisarvar}[1]{\index{#1 (variable)|bold}\index{Variables!#1|bold}}
    18 
    19 \newcommand{\isarcmd}[1]{\isarkeyword{#1}}
    20 \newcommand{\isartrans}[2]{#1 \mathbin{\,\to\,} #2}
    21 \newcommand{\isarkeep}[1]{#1 \mathbin{\,\to\,} #1}
    22 \newcommand{\isarmeth}{method}
    23 \newcommand{\isaratt}{attribute}
    24 
    25 \newcommand{\I@optname}[1]{\ifthenelse{\equal{}{#1}}{}{~#1\colon}}
    26 \newcommand{\I@optmeth}[1]{\ifthenelse{\equal{}{#1}}{}{~(#1)}}
    27 
    28 \newcommand{\LEMMANAME}{\isarkeyword{lemma}}
    29 \newcommand{\THEOREMNAME}{\isarkeyword{theorem}}
    30 \newcommand{\NOTENAME}{\isarkeyword{note}}
    31 \newcommand{\FROMNAME}{\isarkeyword{from}}
    32 \newcommand{\WITHNAME}{\isarkeyword{with}}
    33 \newcommand{\FIXNAME}{\isarkeyword{fix}}
    34 \newcommand{\ASSUMENAME}{\isarkeyword{assume}}
    35 \newcommand{\PRESUMENAME}{\isarkeyword{presume}}
    36 \newcommand{\CASENAME}{\isarkeyword{case}}
    37 \newcommand{\HAVENAME}{\isarkeyword{have}}
    38 \newcommand{\SHOWNAME}{\isarkeyword{show}}
    39 \newcommand{\HENCENAME}{\isarkeyword{hence}}
    40 \newcommand{\THUSNAME}{\isarkeyword{thus}}
    41 \newcommand{\PROOFNAME}{\isarkeyword{proof}}
    42 \newcommand{\QEDNAME}{\isarkeyword{qed}}
    43 \newcommand{\BYNAME}{\isarkeyword{by}}
    44 \newcommand{\ISNAME}{\isarkeyword{is}}
    45 \newcommand{\CONCLNAME}{\isarkeyword{concl}}
    46 \newcommand{\LETNAME}{\isarkeyword{let}}
    47 \newcommand{\DEFNAME}{\isarkeyword{def}}
    48 \newcommand{\OBTAINNAME}{\isarkeyword{obtain}}
    49 \newcommand{\CMTNAME}{\isarkeyword{-{}-}}
    50 
    51 \newcommand{\THEORY}{\isarkeyword{theory}}
    52 \newcommand{\CONTEXT}{\isarkeyword{context}}
    53 \newcommand{\END}{\isarkeyword{end}}
    54 
    55 \newcommand{\TYPES}{\isarkeyword{types}}
    56 \newcommand{\CONSTS}{\isarkeyword{consts}}
    57 \newcommand{\DEFS}{\isarkeyword{defs}}
    58 \newcommand{\TEXT}{\isarkeyword{text}}
    59 \newcommand{\TXT}{\isarkeyword{txt}}
    60 \newcommand{\NOTE}[2]{\NOTENAME~\ifthenelse{\equal{}{#1}}{}{#1=}#2}
    61 \newcommand{\FROM}[1]{\FROMNAME~#1}
    62 \newcommand{\WITH}[1]{\WITHNAME~#1}
    63 \newcommand{\FIX}[1]{\FIXNAME~#1}
    64 \newcommand{\ASSUME}[2]{\ASSUMENAME\I@optname{#1}~#2}
    65 \newcommand{\PRESUME}[2]{\PRESUMENAME\I@optname{#1}~#2}
    66 \newcommand{\CASE}[1]{\CASENAME~#1}
    67 \newcommand{\THEN}{\isarkeyword{then}}
    68 \newcommand{\HAVE}[2]{\isarkeyword{have}\I@optname{#1}~#2}
    69 \newcommand{\SHOW}[2]{\isarkeyword{show}\I@optname{#1}~#2}
    70 \newcommand{\HENCE}[2]{\isarkeyword{hence}\I@optname{#1}~#2}
    71 \newcommand{\THUS}[2]{\isarkeyword{thus}\I@optname{#1}~#2}
    72 \newcommand{\LEMMA}[2]{\LEMMANAME\I@optname{#1}~#2}
    73 \newcommand{\THEOREM}[2]{\THEOREMNAME\I@optname{#1}~#2}
    74 \newcommand{\PROOF}[1]{\PROOFNAME\I@optmeth{#1}}
    75 \newcommand{\QED}[1]{\QEDNAME\I@optmeth{#1}}
    76 \newcommand{\BY}[1]{\BYNAME\I@optmeth{#1}}
    77 \newcommand{\BYY}[2]{\BYNAME\I@optmeth{#1}\I@optmeth{#2}}
    78 \newcommand{\DOT}{\isarkeyword{.}}
    79 \newcommand{\DDOT}{\isarkeyword{.\,.}}
    80 \newcommand{\DDDOT}{\dots}
    81 \newcommand{\IS}[1]{(\ISNAME~#1)}
    82 \newcommand{\ISS}[2]{(\ISNAME~#1~\ISNAME~#2)}
    83 \newcommand{\LET}[1]{\LETNAME~#1}
    84 \newcommand{\DEF}[2]{\DEFNAME\I@optname{#1}~#2}
    85 \newcommand{\ATT}[1]{\ap [#1]}
    86 \newcommand{\CMT}[1]{\CMTNAME~\text{#1}}
    87 \newcommand{\ALSO}{\isarkeyword{also}}
    88 \newcommand{\FINALLY}{\isarkeyword{finally}}
    89 \newcommand{\OBTAIN}[3]{\OBTAINNAME~#1\isarkeyword{where}~\I@optname{#2}~#3}
    90 \newcommand{\BG}{\isarkeyword{\{\{}}
    91 \newcommand{\EN}{\isarkeyword{\}\}}}
    92 \newcommand{\NEXT}{\isarkeyword{next}}
    93 \newcommand{\SORRY}{\isarkeyword{sorry}}
    94 \newcommand{\OOPS}{\isarkeyword{oops}}