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