doc-src/isar.sty
author wenzelm
Mon Oct 01 21:19:50 2007 +0200 (2007-10-01)
changeset 24803 38577b4b1fde
parent 20379 154d8c155a65
child 24991 c6f5cc939c29
permissions -rw-r--r--
Norbert Schirmer: record improvements;
     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{\indexisarelem}[1]{\index{#1 (element)|bold}\index{Elements!#1|bold}}
    15 \newcommand{\indexisarmeth}[1]{\index{#1 (method)|bold}\index{Methods!#1|bold}}
    16 \newcommand{\indexisaratt}[1]{\index{#1 (attribute)|bold}\index{Attributes!#1|bold}}
    17 \newcommand{\indexisarthm}[1]{\index{#1 (theorem)|bold}\index{Theorems!#1|bold}}
    18 \newcommand{\indexisarvar}[1]{\index{#1 (variable)|bold}\index{Variables!#1|bold}}
    19 \newcommand{\indexisarcase}[1]{\index{#1 (case)|bold}\index{Cases!#1|bold}}
    20 \newcommand{\indexisarant}[1]{\index{#1 (antiquotation)|bold}\index{Antiquotations!#1|bold}}
    21 
    22 \newcommand{\indexisarcmdof}[2]{\index{#2 (#1 command)|bold}\index{Commands!#2 (#1)|bold}}
    23 \newcommand{\indexisarmethof}[2]{\index{#2 (#1 method)|bold}\index{Methods!#2 (#1)|bold}}
    24 \newcommand{\indexisarattof}[2]{\index{#2 (#1 attribute)|bold}\index{Attributes!#2 (#1)|bold}}
    25 
    26 \newcommand{\isarcmd}[1]{\isarkeyword{#1}}
    27 \newcommand{\isartrans}[2]{#1 \mathbin{\,\to\,} #2}
    28 \newcommand{\isarkeep}[1]{#1 \mathbin{\,\to\,} #1}
    29 \newcommand{\isarantiq}{antiquotation}
    30 \newcommand{\isarmeth}{method}
    31 \newcommand{\isaratt}{attribute}
    32 
    33 \newcommand{\I@optname}[1]{\ifthenelse{\equal{}{#1}}{}{~#1\colon}}
    34 \newcommand{\I@optmeth}[1]{\ifthenelse{\equal{}{#1}}{}{~#1}}
    35 
    36 \newcommand{\AND}{\isarkeyword{and}}
    37 \newcommand{\IN}{\isarkeyword{in}}
    38 \newcommand{\COROLLARYNAME}{\isarkeyword{corollary}}
    39 \newcommand{\LEMMANAME}{\isarkeyword{lemma}}
    40 \newcommand{\THEOREMNAME}{\isarkeyword{theorem}}
    41 \newcommand{\NOTENAME}{\isarkeyword{note}}
    42 \newcommand{\FROMNAME}{\isarkeyword{from}}
    43 \newcommand{\WITHNAME}{\isarkeyword{with}}
    44 \newcommand{\USINGNAME}{\isarkeyword{using}}
    45 \newcommand{\UNFOLDINGNAME}{\isarkeyword{unfolding}}
    46 \newcommand{\FIXESNAME}{\isarkeyword{fixes}}
    47 \newcommand{\CONSTRAINSNAME}{\isarkeyword{constrains}}
    48 \newcommand{\ASSUMESNAME}{\isarkeyword{assumes}}
    49 \newcommand{\DEFINESNAME}{\isarkeyword{defines}}
    50 \newcommand{\NOTESNAME}{\isarkeyword{notes}}
    51 \newcommand{\INCLUDESNAME}{\isarkeyword{includes}}
    52 \newcommand{\FIXNAME}{\isarkeyword{fix}}
    53 \newcommand{\ASSUMENAME}{\isarkeyword{assume}}
    54 \newcommand{\PRESUMENAME}{\isarkeyword{presume}}
    55 \newcommand{\CASENAME}{\isarkeyword{case}}
    56 \newcommand{\HAVENAME}{\isarkeyword{have}}
    57 \newcommand{\SHOWNAME}{\isarkeyword{show}}
    58 \newcommand{\HENCENAME}{\isarkeyword{hence}}
    59 \newcommand{\THUSNAME}{\isarkeyword{thus}}
    60 \newcommand{\PROOFNAME}{\isarkeyword{proof}}
    61 \newcommand{\QEDNAME}{\isarkeyword{qed}}
    62 \newcommand{\BYNAME}{\isarkeyword{by}}
    63 \newcommand{\APPLYNAME}{\isarkeyword{apply}}
    64 \newcommand{\ISNAME}{\isarkeyword{is}}
    65 \newcommand{\CONCLNAME}{\isarkeyword{concl}}
    66 \newcommand{\LETNAME}{\isarkeyword{let}}
    67 \newcommand{\DEFNAME}{\isarkeyword{def}}
    68 \newcommand{\OBTAINNAME}{\isarkeyword{obtain}}
    69 \newcommand{\CMTNAME}{\textbf{---}}
    70 
    71 \newcommand{\THEORY}{\isarkeyword{theory}}
    72 \newcommand{\CONTEXT}{\isarkeyword{context}}
    73 \newcommand{\END}{\isarkeyword{end}}
    74 
    75 \newcommand{\TYPES}{\isarkeyword{types}}
    76 \newcommand{\CONSTS}{\isarkeyword{consts}}
    77 \newcommand{\CONSTDEFS}{\isarkeyword{constdefs}}
    78 \newcommand{\DEFS}{\isarkeyword{defs}}
    79 \newcommand{\AXCLASS}{\isarkeyword{axclass}}
    80 \newcommand{\INSTANCE}{\isarkeyword{instance}}
    81 \newcommand{\DECLARE}{\isarkeyword{declare}}
    82 \newcommand{\LEMMAS}{\isarkeyword{lemmas}}
    83 \newcommand{\THEOREMS}{\isarkeyword{theorems}}
    84 \newcommand{\LOCALE}{\isarkeyword{locale}}
    85 \newcommand{\CLASS}{\isarkeyword{class}}
    86 \newcommand{\TEXT}{\isarkeyword{text}}
    87 \newcommand{\TXT}{\isarkeyword{txt}}
    88 \newcommand{\NOTE}[2]{\NOTENAME~\ifthenelse{\equal{}{#1}}{}{#1=}#2}
    89 \newcommand{\FROM}[1]{\FROMNAME~#1}
    90 \newcommand{\WITH}[1]{\WITHNAME~#1}
    91 \newcommand{\USING}[1]{\USINGNAME~#1}
    92 \newcommand{\UNFOLDING}[1]{\UNFOLDINGNAME~#1}
    93 \newcommand{\FIXES}[1]{\FIXESNAME~#1}
    94 \newcommand{\CONSTRAINS}[1]{\CONSTRAINSNAME~#1}
    95 \newcommand{\ASSUMES}[2]{\ASSUMESNAME\I@optname{#1}~#2}
    96 \newcommand{\DEFINES}[2]{\DEFINESNAME\I@optname{#1}~#2}
    97 \newcommand{\NOTES}[2]{\NOTESNAME~\ifthenelse{\equal{}{#1}}{}{#1=}#2}
    98 \newcommand{\INCLUDES}[1]{\INCLUDESNAME~#1}
    99 \newcommand{\SHOWS}[2]{\isarkeyword{shows}\I@optname{#1}~#2}
   100 \newcommand{\FIX}[1]{\FIXNAME~#1}
   101 \newcommand{\ASSUME}[2]{\ASSUMENAME\I@optname{#1}~#2}
   102 \newcommand{\PRESUME}[2]{\PRESUMENAME\I@optname{#1}~#2}
   103 \newcommand{\CASE}[1]{\CASENAME~#1}
   104 \newcommand{\THEN}{\isarkeyword{then}}
   105 \newcommand{\HAVE}[2]{\isarkeyword{have}\I@optname{#1}~#2}
   106 \newcommand{\SHOW}[2]{\isarkeyword{show}\I@optname{#1}~#2}
   107 \newcommand{\HENCE}[2]{\isarkeyword{hence}\I@optname{#1}~#2}
   108 \newcommand{\THUS}[2]{\isarkeyword{thus}\I@optname{#1}~#2}
   109 \newcommand{\COROLLARY}[2]{\COROLLARYNAME\I@optname{#1}~#2}
   110 \newcommand{\LEMMA}[2]{\LEMMANAME\I@optname{#1}~#2}
   111 \newcommand{\THEOREM}[2]{\THEOREMNAME\I@optname{#1}~#2}
   112 \newcommand{\PROOF}[1]{\PROOFNAME\I@optmeth{#1}}
   113 \newcommand{\QED}[1]{\QEDNAME\I@optmeth{#1}}
   114 \newcommand{\BY}[1]{\BYNAME\I@optmeth{#1}}
   115 \newcommand{\BYY}[2]{\BYNAME\I@optmeth{#1}\I@optmeth{#2}}
   116 \newcommand{\APPLY}[1]{\APPLYNAME\I@optmeth{#1}}
   117 \newcommand{\DONE}{\isarkeyword{done}}
   118 \newcommand{\DOT}{\textbf{.}}
   119 \newcommand{\DDOT}{\textbf{.\,.}}
   120 \newcommand{\DDDOT}{\dots}
   121 \newcommand{\IS}[1]{(\ISNAME~#1)}
   122 \newcommand{\ISS}[2]{(\ISNAME~#1~\ISNAME~#2)}
   123 \newcommand{\LET}[1]{\LETNAME~#1}
   124 \newcommand{\DEF}[2]{\DEFNAME\I@optname{#1}~#2}
   125 \newcommand{\ATT}[1]{\ap [#1]}
   126 \newcommand{\CMT}[1]{\CMTNAME~\Text{#1}}
   127 \newcommand{\ALSO}{\isarkeyword{also}}
   128 \newcommand{\FINALLY}{\isarkeyword{finally}}
   129 \newcommand{\MOREOVER}{\isarkeyword{moreover}}
   130 \newcommand{\ULTIMATELY}{\isarkeyword{ultimately}}
   131 \newcommand{\OBTAIN}[3]{\OBTAINNAME~#1~\isarkeyword{where}\I@optname{#2}~#3}
   132 \newcommand{\BG}{\isarkeyword{\textbf{\{}}}
   133 \newcommand{\EN}{\isarkeyword{\textbf{\}}}}
   134 \newcommand{\NEXT}{\isarkeyword{next}}
   135 \newcommand{\SORRY}{\isarkeyword{sorry}}
   136 \newcommand{\OOPS}{\isarkeyword{oops}}