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