doc-src/isar.sty
author wenzelm
Mon May 05 15:23:59 2008 +0200 (2008-05-05)
changeset 26783 1651ff6a34b5
parent 26769 5b8382d495be
child 26863 cc779d3da712
permissions -rw-r--r--
added isasymIN/STRUCTURE;
wenzelm@7050
     1
wenzelm@7050
     2
%% $Id$
wenzelm@7138
     3
%%
wenzelm@7138
     4
%% Isar language elements
wenzelm@7138
     5
%%
wenzelm@7050
     6
wenzelm@7050
     7
\usepackage{ifthen}
wenzelm@7050
     8
wenzelm@26745
     9
\newcommand{\indexdef}[3]%
wenzelm@26745
    10
{\ifthenelse{\equal{}{#1}}{\index{#3 (#2)|bold}}{\index{#3 (#1\ #2)|bold}}}
wenzelm@26745
    11
\newcommand{\indexref}[3]{\ifthenelse{\equal{}{#1}}{\index{#3 (#2)}}{\index{#3 (#1\ #2)}}}
wenzelm@7138
    12
wenzelm@26745
    13
\newcommand{\indexoutertoken}[1]{\indexdef{}{syntax}{#1}}
wenzelm@26745
    14
\newcommand{\indexouternonterm}[1]{\indexdef{}{syntax}{#1}}
wenzelm@26745
    15
\newcommand{\indexisarcmd}[1]{\indexdef{}{command}{#1}}
wenzelm@26745
    16
\newcommand{\indexisarelem}[1]{\indexdef{}{element}{#1}}
wenzelm@26745
    17
\newcommand{\indexisarmeth}[1]{\indexdef{}{method}{#1}}
wenzelm@26745
    18
\newcommand{\indexisaratt}[1]{\indexdef{}{attribute}{#1}}
wenzelm@26745
    19
\newcommand{\indexisarthm}[1]{\indexdef{}{fact}{#1}}
wenzelm@26745
    20
\newcommand{\indexisarvar}[1]{\indexdef{}{term}{#1}}
wenzelm@26745
    21
\newcommand{\indexisarcase}[1]{\indexdef{}{case}{#1}}
wenzelm@26745
    22
\newcommand{\indexisarant}[1]{\indexdef{}{antiquotation}{#1}}
wenzelm@26745
    23
\newcommand{\indexisarcmdof}[2]{\indexdef{#1}{command}{#2}}
wenzelm@26745
    24
\newcommand{\indexisarmethof}[2]{\indexdef{#1}{method}{#2}}
wenzelm@26745
    25
\newcommand{\indexisarattof}[2]{\indexdef{#1}{attribute}{#2}}
wenzelm@7170
    26
wenzelm@26755
    27
\newcommand{\isasymAND}{\isakeyword{and}}
wenzelm@26755
    28
\newcommand{\isasymIS}{\isakeyword{is}}
wenzelm@26755
    29
\newcommand{\isasymWHERE}{\isakeyword{where}}
wenzelm@26769
    30
\newcommand{\isasymBEGIN}{\isakeyword{begin}}
wenzelm@26769
    31
\newcommand{\isasymIMPORTS}{\isakeyword{imports}}
wenzelm@26783
    32
\newcommand{\isasymIN}{\isakeyword{in}}
wenzelm@26783
    33
\newcommand{\isasymSTRUCTURE}{\isakeyword{structure}}
wenzelm@26755
    34
wenzelm@26745
    35
\newcommand{\isarkeyword}[1]{{\mathord{\mathbf{#1}}}}
wenzelm@7138
    36
\newcommand{\isarcmd}[1]{\isarkeyword{#1}}
wenzelm@7138
    37
\newcommand{\isartrans}[2]{#1 \mathbin{\,\to\,} #2}
wenzelm@7138
    38
\newcommand{\isarkeep}[1]{#1 \mathbin{\,\to\,} #1}
wenzelm@10335
    39
\newcommand{\isarantiq}{antiquotation}
wenzelm@7170
    40
\newcommand{\isarmeth}{method}
wenzelm@7170
    41
\newcommand{\isaratt}{attribute}
wenzelm@7138
    42
wenzelm@7050
    43
\newcommand{\I@optname}[1]{\ifthenelse{\equal{}{#1}}{}{~#1\colon}}
wenzelm@13042
    44
\newcommand{\I@optmeth}[1]{\ifthenelse{\equal{}{#1}}{}{~#1}}
wenzelm@7050
    45
wenzelm@10238
    46
\newcommand{\AND}{\isarkeyword{and}}
wenzelm@12977
    47
\newcommand{\IN}{\isarkeyword{in}}
wenzelm@12615
    48
\newcommand{\COROLLARYNAME}{\isarkeyword{corollary}}
wenzelm@7138
    49
\newcommand{\LEMMANAME}{\isarkeyword{lemma}}
wenzelm@7138
    50
\newcommand{\THEOREMNAME}{\isarkeyword{theorem}}
wenzelm@7138
    51
\newcommand{\NOTENAME}{\isarkeyword{note}}
wenzelm@7138
    52
\newcommand{\FROMNAME}{\isarkeyword{from}}
wenzelm@7138
    53
\newcommand{\WITHNAME}{\isarkeyword{with}}
wenzelm@12966
    54
\newcommand{\USINGNAME}{\isarkeyword{using}}
wenzelm@19994
    55
\newcommand{\UNFOLDINGNAME}{\isarkeyword{unfolding}}
wenzelm@12977
    56
\newcommand{\FIXESNAME}{\isarkeyword{fixes}}
ballarin@16168
    57
\newcommand{\CONSTRAINSNAME}{\isarkeyword{constrains}}
wenzelm@12977
    58
\newcommand{\ASSUMESNAME}{\isarkeyword{assumes}}
wenzelm@12977
    59
\newcommand{\DEFINESNAME}{\isarkeyword{defines}}
wenzelm@12977
    60
\newcommand{\NOTESNAME}{\isarkeyword{notes}}
wenzelm@12977
    61
\newcommand{\INCLUDESNAME}{\isarkeyword{includes}}
wenzelm@7138
    62
\newcommand{\FIXNAME}{\isarkeyword{fix}}
wenzelm@7138
    63
\newcommand{\ASSUMENAME}{\isarkeyword{assume}}
wenzelm@7138
    64
\newcommand{\PRESUMENAME}{\isarkeyword{presume}}
wenzelm@8377
    65
\newcommand{\CASENAME}{\isarkeyword{case}}
wenzelm@7138
    66
\newcommand{\HAVENAME}{\isarkeyword{have}}
wenzelm@7138
    67
\newcommand{\SHOWNAME}{\isarkeyword{show}}
wenzelm@7138
    68
\newcommand{\HENCENAME}{\isarkeyword{hence}}
wenzelm@7138
    69
\newcommand{\THUSNAME}{\isarkeyword{thus}}
wenzelm@7138
    70
\newcommand{\PROOFNAME}{\isarkeyword{proof}}
wenzelm@7138
    71
\newcommand{\QEDNAME}{\isarkeyword{qed}}
wenzelm@7138
    72
\newcommand{\BYNAME}{\isarkeyword{by}}
wenzelm@10221
    73
\newcommand{\APPLYNAME}{\isarkeyword{apply}}
wenzelm@7138
    74
\newcommand{\ISNAME}{\isarkeyword{is}}
wenzelm@7138
    75
\newcommand{\CONCLNAME}{\isarkeyword{concl}}
wenzelm@7138
    76
\newcommand{\LETNAME}{\isarkeyword{let}}
wenzelm@7138
    77
\newcommand{\DEFNAME}{\isarkeyword{def}}
wenzelm@8377
    78
\newcommand{\OBTAINNAME}{\isarkeyword{obtain}}
wenzelm@10238
    79
\newcommand{\CMTNAME}{\textbf{---}}
wenzelm@7050
    80
wenzelm@7138
    81
\newcommand{\THEORY}{\isarkeyword{theory}}
wenzelm@7138
    82
\newcommand{\CONTEXT}{\isarkeyword{context}}
wenzelm@7138
    83
\newcommand{\END}{\isarkeyword{end}}
wenzelm@7138
    84
wenzelm@7138
    85
\newcommand{\TYPES}{\isarkeyword{types}}
wenzelm@7138
    86
\newcommand{\CONSTS}{\isarkeyword{consts}}
wenzelm@12623
    87
\newcommand{\CONSTDEFS}{\isarkeyword{constdefs}}
wenzelm@7138
    88
\newcommand{\DEFS}{\isarkeyword{defs}}
wenzelm@10221
    89
\newcommand{\AXCLASS}{\isarkeyword{axclass}}
wenzelm@10221
    90
\newcommand{\INSTANCE}{\isarkeyword{instance}}
haftmann@25533
    91
\newcommand{\INSTANTIATION}{\isarkeyword{instantiation}}
haftmann@25883
    92
\newcommand{\OVERLOADING}{\isarkeyword{overloading}}
wenzelm@10221
    93
\newcommand{\DECLARE}{\isarkeyword{declare}}
wenzelm@12977
    94
\newcommand{\LEMMAS}{\isarkeyword{lemmas}}
wenzelm@12977
    95
\newcommand{\THEOREMS}{\isarkeyword{theorems}}
wenzelm@12977
    96
\newcommand{\LOCALE}{\isarkeyword{locale}}
haftmann@20379
    97
\newcommand{\CLASS}{\isarkeyword{class}}
haftmann@24991
    98
\newcommand{\SUBCLASS}{\isarkeyword{subclass}}
wenzelm@7138
    99
\newcommand{\TEXT}{\isarkeyword{text}}
wenzelm@7138
   100
\newcommand{\TXT}{\isarkeyword{txt}}
wenzelm@7321
   101
\newcommand{\NOTE}[2]{\NOTENAME~\ifthenelse{\equal{}{#1}}{}{#1=}#2}
wenzelm@7050
   102
\newcommand{\FROM}[1]{\FROMNAME~#1}
wenzelm@7050
   103
\newcommand{\WITH}[1]{\WITHNAME~#1}
wenzelm@12966
   104
\newcommand{\USING}[1]{\USINGNAME~#1}
wenzelm@19994
   105
\newcommand{\UNFOLDING}[1]{\UNFOLDINGNAME~#1}
wenzelm@12977
   106
\newcommand{\FIXES}[1]{\FIXESNAME~#1}
ballarin@16168
   107
\newcommand{\CONSTRAINS}[1]{\CONSTRAINSNAME~#1}
wenzelm@12977
   108
\newcommand{\ASSUMES}[2]{\ASSUMESNAME\I@optname{#1}~#2}
wenzelm@12977
   109
\newcommand{\DEFINES}[2]{\DEFINESNAME\I@optname{#1}~#2}
wenzelm@12977
   110
\newcommand{\NOTES}[2]{\NOTESNAME~\ifthenelse{\equal{}{#1}}{}{#1=}#2}
wenzelm@12977
   111
\newcommand{\INCLUDES}[1]{\INCLUDESNAME~#1}
wenzelm@13011
   112
\newcommand{\SHOWS}[2]{\isarkeyword{shows}\I@optname{#1}~#2}
wenzelm@7050
   113
\newcommand{\FIX}[1]{\FIXNAME~#1}
wenzelm@7050
   114
\newcommand{\ASSUME}[2]{\ASSUMENAME\I@optname{#1}~#2}
wenzelm@7050
   115
\newcommand{\PRESUME}[2]{\PRESUMENAME\I@optname{#1}~#2}
wenzelm@8377
   116
\newcommand{\CASE}[1]{\CASENAME~#1}
wenzelm@7138
   117
\newcommand{\THEN}{\isarkeyword{then}}
wenzelm@7138
   118
\newcommand{\HAVE}[2]{\isarkeyword{have}\I@optname{#1}~#2}
wenzelm@7138
   119
\newcommand{\SHOW}[2]{\isarkeyword{show}\I@optname{#1}~#2}
wenzelm@7138
   120
\newcommand{\HENCE}[2]{\isarkeyword{hence}\I@optname{#1}~#2}
wenzelm@7138
   121
\newcommand{\THUS}[2]{\isarkeyword{thus}\I@optname{#1}~#2}
wenzelm@12615
   122
\newcommand{\COROLLARY}[2]{\COROLLARYNAME\I@optname{#1}~#2}
wenzelm@7050
   123
\newcommand{\LEMMA}[2]{\LEMMANAME\I@optname{#1}~#2}
wenzelm@7050
   124
\newcommand{\THEOREM}[2]{\THEOREMNAME\I@optname{#1}~#2}
wenzelm@7050
   125
\newcommand{\PROOF}[1]{\PROOFNAME\I@optmeth{#1}}
wenzelm@7050
   126
\newcommand{\QED}[1]{\QEDNAME\I@optmeth{#1}}
wenzelm@7050
   127
\newcommand{\BY}[1]{\BYNAME\I@optmeth{#1}}
wenzelm@7173
   128
\newcommand{\BYY}[2]{\BYNAME\I@optmeth{#1}\I@optmeth{#2}}
wenzelm@10221
   129
\newcommand{\APPLY}[1]{\APPLYNAME\I@optmeth{#1}}
wenzelm@10221
   130
\newcommand{\DONE}{\isarkeyword{done}}
wenzelm@10860
   131
\newcommand{\DOT}{\textbf{.}}
wenzelm@10860
   132
\newcommand{\DDOT}{\textbf{.\,.}}
wenzelm@7050
   133
\newcommand{\DDDOT}{\dots}
wenzelm@7050
   134
\newcommand{\IS}[1]{(\ISNAME~#1)}
wenzelm@7894
   135
\newcommand{\ISS}[2]{(\ISNAME~#1~\ISNAME~#2)}
wenzelm@7050
   136
\newcommand{\LET}[1]{\LETNAME~#1}
wenzelm@7050
   137
\newcommand{\DEF}[2]{\DEFNAME\I@optname{#1}~#2}
wenzelm@7050
   138
\newcommand{\ATT}[1]{\ap [#1]}
wenzelm@10238
   139
\newcommand{\CMT}[1]{\CMTNAME~\Text{#1}}
wenzelm@7138
   140
\newcommand{\ALSO}{\isarkeyword{also}}
wenzelm@7138
   141
\newcommand{\FINALLY}{\isarkeyword{finally}}
wenzelm@8618
   142
\newcommand{\MOREOVER}{\isarkeyword{moreover}}
wenzelm@8618
   143
\newcommand{\ULTIMATELY}{\isarkeyword{ultimately}}
wenzelm@8504
   144
\newcommand{\OBTAIN}[3]{\OBTAINNAME~#1~\isarkeyword{where}\I@optname{#2}~#3}
wenzelm@8900
   145
\newcommand{\BG}{\isarkeyword{\textbf{\{}}}
wenzelm@8900
   146
\newcommand{\EN}{\isarkeyword{\textbf{\}}}}
wenzelm@8446
   147
\newcommand{\NEXT}{\isarkeyword{next}}
wenzelm@8377
   148
\newcommand{\SORRY}{\isarkeyword{sorry}}
wenzelm@8377
   149
\newcommand{\OOPS}{\isarkeyword{oops}}