doc-src/isar.sty
author wenzelm
Thu, 06 May 2004 14:14:18 +0200
changeset 14706 71590b7733b7
parent 13042 d8a345d9e067
child 16168 adb83939177f
permissions -rw-r--r--
tuned document;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7050
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
     1
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
     2
%% $Id$
7138
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
     3
%%
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
     4
%% Isar language elements
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
     5
%%
7050
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
     6
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
     7
\usepackage{ifthen}
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
     8
7138
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
     9
\newcommand{\isarkeyword}[1]{{\mathord{\mathbf{#1}}}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    10
7456
de9e73baa5f8 permuted index;
wenzelm
parents: 7388
diff changeset
    11
\newcommand{\indexoutertoken}[1]{\index{#1 (syntax)|bold}\index{Syntax!#1|bold}}
de9e73baa5f8 permuted index;
wenzelm
parents: 7388
diff changeset
    12
\newcommand{\indexouternonterm}[1]{\index{#1 (syntax)|bold}\index{Syntax!#1|bold}}
de9e73baa5f8 permuted index;
wenzelm
parents: 7388
diff changeset
    13
\newcommand{\indexisarcmd}[1]{\index{#1 (command)|bold}\index{Commands!#1|bold}}
7511
85cf7fa5b138 \indexisarmeth: "Methods";
wenzelm
parents: 7465
diff changeset
    14
\newcommand{\indexisarmeth}[1]{\index{#1 (method)|bold}\index{Methods!#1|bold}}
7456
de9e73baa5f8 permuted index;
wenzelm
parents: 7388
diff changeset
    15
\newcommand{\indexisaratt}[1]{\index{#1 (attribute)|bold}\index{Attributes!#1|bold}}
de9e73baa5f8 permuted index;
wenzelm
parents: 7388
diff changeset
    16
\newcommand{\indexisarthm}[1]{\index{#1 (theorem)|bold}\index{Theorems!#1|bold}}
7465
a987f4ff5bd3 added \indexisarvar;
wenzelm
parents: 7456
diff changeset
    17
\newcommand{\indexisarvar}[1]{\index{#1 (variable)|bold}\index{Variables!#1|bold}}
8992
6addcdd363b7 \newcommand{\indexisarcase};
wenzelm
parents: 8900
diff changeset
    18
\newcommand{\indexisarcase}[1]{\index{#1 (case)|bold}\index{Cases!#1|bold}}
9202
738056d60a2a added \indexisarant;
wenzelm
parents: 8992
diff changeset
    19
\newcommand{\indexisarant}[1]{\index{#1 (antiquotation)|bold}\index{Antiquotations!#1|bold}}
7170
wenzelm
parents: 7138
diff changeset
    20
12615
3ef6235a4a75 added \indexisarcmdof, \indexisarmethof, \indexisarattof;
wenzelm
parents: 10860
diff changeset
    21
\newcommand{\indexisarcmdof}[2]{\index{#2 (#1 command)|bold}\index{Commands!#2 (#1)|bold}}
3ef6235a4a75 added \indexisarcmdof, \indexisarmethof, \indexisarattof;
wenzelm
parents: 10860
diff changeset
    22
\newcommand{\indexisarmethof}[2]{\index{#2 (#1 method)|bold}\index{Methods!#2 (#1)|bold}}
3ef6235a4a75 added \indexisarcmdof, \indexisarmethof, \indexisarattof;
wenzelm
parents: 10860
diff changeset
    23
\newcommand{\indexisarattof}[2]{\index{#2 (#1 attribute)|bold}\index{Attributes!#2 (#1)|bold}}
3ef6235a4a75 added \indexisarcmdof, \indexisarmethof, \indexisarattof;
wenzelm
parents: 10860
diff changeset
    24
7138
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    25
\newcommand{\isarcmd}[1]{\isarkeyword{#1}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    26
\newcommand{\isartrans}[2]{#1 \mathbin{\,\to\,} #2}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    27
\newcommand{\isarkeep}[1]{#1 \mathbin{\,\to\,} #1}
10335
ccdbf0657982 added \isarantiq;
wenzelm
parents: 10238
diff changeset
    28
\newcommand{\isarantiq}{antiquotation}
7170
wenzelm
parents: 7138
diff changeset
    29
\newcommand{\isarmeth}{method}
wenzelm
parents: 7138
diff changeset
    30
\newcommand{\isaratt}{attribute}
7138
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    31
7050
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
    32
\newcommand{\I@optname}[1]{\ifthenelse{\equal{}{#1}}{}{~#1\colon}}
13042
wenzelm
parents: 13011
diff changeset
    33
\newcommand{\I@optmeth}[1]{\ifthenelse{\equal{}{#1}}{}{~#1}}
7050
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
    34
10238
9dc33c6c5df9 improved;
wenzelm
parents: 10221
diff changeset
    35
\newcommand{\AND}{\isarkeyword{and}}
12977
fcc9a30a7ef2 updated;
wenzelm
parents: 12966
diff changeset
    36
\newcommand{\IN}{\isarkeyword{in}}
12615
3ef6235a4a75 added \indexisarcmdof, \indexisarmethof, \indexisarattof;
wenzelm
parents: 10860
diff changeset
    37
\newcommand{\COROLLARYNAME}{\isarkeyword{corollary}}
7138
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    38
\newcommand{\LEMMANAME}{\isarkeyword{lemma}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    39
\newcommand{\THEOREMNAME}{\isarkeyword{theorem}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    40
\newcommand{\NOTENAME}{\isarkeyword{note}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    41
\newcommand{\FROMNAME}{\isarkeyword{from}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    42
\newcommand{\WITHNAME}{\isarkeyword{with}}
12966
6373b4d09325 'using' command;
wenzelm
parents: 12623
diff changeset
    43
\newcommand{\USINGNAME}{\isarkeyword{using}}
12977
fcc9a30a7ef2 updated;
wenzelm
parents: 12966
diff changeset
    44
\newcommand{\FIXESNAME}{\isarkeyword{fixes}}
fcc9a30a7ef2 updated;
wenzelm
parents: 12966
diff changeset
    45
\newcommand{\ASSUMESNAME}{\isarkeyword{assumes}}
fcc9a30a7ef2 updated;
wenzelm
parents: 12966
diff changeset
    46
\newcommand{\DEFINESNAME}{\isarkeyword{defines}}
fcc9a30a7ef2 updated;
wenzelm
parents: 12966
diff changeset
    47
\newcommand{\NOTESNAME}{\isarkeyword{notes}}
fcc9a30a7ef2 updated;
wenzelm
parents: 12966
diff changeset
    48
\newcommand{\INCLUDESNAME}{\isarkeyword{includes}}
7138
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    49
\newcommand{\FIXNAME}{\isarkeyword{fix}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    50
\newcommand{\ASSUMENAME}{\isarkeyword{assume}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    51
\newcommand{\PRESUMENAME}{\isarkeyword{presume}}
8377
def06c441893 added \CASE, \OBTAIN, \SORRY, \OOPS;
wenzelm
parents: 7976
diff changeset
    52
\newcommand{\CASENAME}{\isarkeyword{case}}
7138
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    53
\newcommand{\HAVENAME}{\isarkeyword{have}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    54
\newcommand{\SHOWNAME}{\isarkeyword{show}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    55
\newcommand{\HENCENAME}{\isarkeyword{hence}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    56
\newcommand{\THUSNAME}{\isarkeyword{thus}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    57
\newcommand{\PROOFNAME}{\isarkeyword{proof}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    58
\newcommand{\QEDNAME}{\isarkeyword{qed}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    59
\newcommand{\BYNAME}{\isarkeyword{by}}
10221
7171f8ace3c1 more elements;
wenzelm
parents: 9202
diff changeset
    60
\newcommand{\APPLYNAME}{\isarkeyword{apply}}
7138
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    61
\newcommand{\ISNAME}{\isarkeyword{is}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    62
\newcommand{\CONCLNAME}{\isarkeyword{concl}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    63
\newcommand{\LETNAME}{\isarkeyword{let}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    64
\newcommand{\DEFNAME}{\isarkeyword{def}}
8377
def06c441893 added \CASE, \OBTAIN, \SORRY, \OOPS;
wenzelm
parents: 7976
diff changeset
    65
\newcommand{\OBTAINNAME}{\isarkeyword{obtain}}
10238
9dc33c6c5df9 improved;
wenzelm
parents: 10221
diff changeset
    66
\newcommand{\CMTNAME}{\textbf{---}}
7050
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
    67
7138
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    68
\newcommand{\THEORY}{\isarkeyword{theory}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    69
\newcommand{\CONTEXT}{\isarkeyword{context}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    70
\newcommand{\END}{\isarkeyword{end}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    71
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    72
\newcommand{\TYPES}{\isarkeyword{types}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    73
\newcommand{\CONSTS}{\isarkeyword{consts}}
12623
7a33541fd81b \CONSTDEFS;
wenzelm
parents: 12615
diff changeset
    74
\newcommand{\CONSTDEFS}{\isarkeyword{constdefs}}
7138
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    75
\newcommand{\DEFS}{\isarkeyword{defs}}
10221
7171f8ace3c1 more elements;
wenzelm
parents: 9202
diff changeset
    76
\newcommand{\AXCLASS}{\isarkeyword{axclass}}
7171f8ace3c1 more elements;
wenzelm
parents: 9202
diff changeset
    77
\newcommand{\INSTANCE}{\isarkeyword{instance}}
7171f8ace3c1 more elements;
wenzelm
parents: 9202
diff changeset
    78
\newcommand{\DECLARE}{\isarkeyword{declare}}
12977
fcc9a30a7ef2 updated;
wenzelm
parents: 12966
diff changeset
    79
\newcommand{\LEMMAS}{\isarkeyword{lemmas}}
fcc9a30a7ef2 updated;
wenzelm
parents: 12966
diff changeset
    80
\newcommand{\THEOREMS}{\isarkeyword{theorems}}
fcc9a30a7ef2 updated;
wenzelm
parents: 12966
diff changeset
    81
\newcommand{\LOCALE}{\isarkeyword{locale}}
7138
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    82
\newcommand{\TEXT}{\isarkeyword{text}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    83
\newcommand{\TXT}{\isarkeyword{txt}}
7321
wenzelm
parents: 7317
diff changeset
    84
\newcommand{\NOTE}[2]{\NOTENAME~\ifthenelse{\equal{}{#1}}{}{#1=}#2}
7050
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
    85
\newcommand{\FROM}[1]{\FROMNAME~#1}
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
    86
\newcommand{\WITH}[1]{\WITHNAME~#1}
12966
6373b4d09325 'using' command;
wenzelm
parents: 12623
diff changeset
    87
\newcommand{\USING}[1]{\USINGNAME~#1}
12977
fcc9a30a7ef2 updated;
wenzelm
parents: 12966
diff changeset
    88
\newcommand{\FIXES}[1]{\FIXESNAME~#1}
fcc9a30a7ef2 updated;
wenzelm
parents: 12966
diff changeset
    89
\newcommand{\ASSUMES}[2]{\ASSUMESNAME\I@optname{#1}~#2}
fcc9a30a7ef2 updated;
wenzelm
parents: 12966
diff changeset
    90
\newcommand{\DEFINES}[2]{\DEFINESNAME\I@optname{#1}~#2}
fcc9a30a7ef2 updated;
wenzelm
parents: 12966
diff changeset
    91
\newcommand{\NOTES}[2]{\NOTESNAME~\ifthenelse{\equal{}{#1}}{}{#1=}#2}
fcc9a30a7ef2 updated;
wenzelm
parents: 12966
diff changeset
    92
\newcommand{\INCLUDES}[1]{\INCLUDESNAME~#1}
13011
a474097a4c65 \SHOWS;
wenzelm
parents: 12977
diff changeset
    93
\newcommand{\SHOWS}[2]{\isarkeyword{shows}\I@optname{#1}~#2}
7050
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
    94
\newcommand{\FIX}[1]{\FIXNAME~#1}
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
    95
\newcommand{\ASSUME}[2]{\ASSUMENAME\I@optname{#1}~#2}
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
    96
\newcommand{\PRESUME}[2]{\PRESUMENAME\I@optname{#1}~#2}
8377
def06c441893 added \CASE, \OBTAIN, \SORRY, \OOPS;
wenzelm
parents: 7976
diff changeset
    97
\newcommand{\CASE}[1]{\CASENAME~#1}
7138
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    98
\newcommand{\THEN}{\isarkeyword{then}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
    99
\newcommand{\HAVE}[2]{\isarkeyword{have}\I@optname{#1}~#2}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
   100
\newcommand{\SHOW}[2]{\isarkeyword{show}\I@optname{#1}~#2}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
   101
\newcommand{\HENCE}[2]{\isarkeyword{hence}\I@optname{#1}~#2}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
   102
\newcommand{\THUS}[2]{\isarkeyword{thus}\I@optname{#1}~#2}
12615
3ef6235a4a75 added \indexisarcmdof, \indexisarmethof, \indexisarattof;
wenzelm
parents: 10860
diff changeset
   103
\newcommand{\COROLLARY}[2]{\COROLLARYNAME\I@optname{#1}~#2}
7050
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
   104
\newcommand{\LEMMA}[2]{\LEMMANAME\I@optname{#1}~#2}
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
   105
\newcommand{\THEOREM}[2]{\THEOREMNAME\I@optname{#1}~#2}
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
   106
\newcommand{\PROOF}[1]{\PROOFNAME\I@optmeth{#1}}
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
   107
\newcommand{\QED}[1]{\QEDNAME\I@optmeth{#1}}
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
   108
\newcommand{\BY}[1]{\BYNAME\I@optmeth{#1}}
7173
bd1749e3a583 improved \NOTE;
wenzelm
parents: 7170
diff changeset
   109
\newcommand{\BYY}[2]{\BYNAME\I@optmeth{#1}\I@optmeth{#2}}
10221
7171f8ace3c1 more elements;
wenzelm
parents: 9202
diff changeset
   110
\newcommand{\APPLY}[1]{\APPLYNAME\I@optmeth{#1}}
7171f8ace3c1 more elements;
wenzelm
parents: 9202
diff changeset
   111
\newcommand{\DONE}{\isarkeyword{done}}
10860
12f45010ecb5 tuned \DOT, \DDOT;
wenzelm
parents: 10335
diff changeset
   112
\newcommand{\DOT}{\textbf{.}}
12f45010ecb5 tuned \DOT, \DDOT;
wenzelm
parents: 10335
diff changeset
   113
\newcommand{\DDOT}{\textbf{.\,.}}
7050
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
   114
\newcommand{\DDDOT}{\dots}
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
   115
\newcommand{\IS}[1]{(\ISNAME~#1)}
7894
2ccfea468b24 added \ISS;
wenzelm
parents: 7511
diff changeset
   116
\newcommand{\ISS}[2]{(\ISNAME~#1~\ISNAME~#2)}
7050
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
   117
\newcommand{\LET}[1]{\LETNAME~#1}
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
   118
\newcommand{\DEF}[2]{\DEFNAME\I@optname{#1}~#2}
c70d3402fef5 checkpoint;
wenzelm
parents:
diff changeset
   119
\newcommand{\ATT}[1]{\ap [#1]}
10238
9dc33c6c5df9 improved;
wenzelm
parents: 10221
diff changeset
   120
\newcommand{\CMT}[1]{\CMTNAME~\Text{#1}}
7138
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
   121
\newcommand{\ALSO}{\isarkeyword{also}}
0a17c2a93454 Isabelle/Isar macros;
wenzelm
parents: 7050
diff changeset
   122
\newcommand{\FINALLY}{\isarkeyword{finally}}
8618
87cddace4432 added \MOREOVER, \ULTIMATELY;
wenzelm
parents: 8504
diff changeset
   123
\newcommand{\MOREOVER}{\isarkeyword{moreover}}
87cddace4432 added \MOREOVER, \ULTIMATELY;
wenzelm
parents: 8504
diff changeset
   124
\newcommand{\ULTIMATELY}{\isarkeyword{ultimately}}
8504
242527763a16 fixed \OBTAIN;
wenzelm
parents: 8446
diff changeset
   125
\newcommand{\OBTAIN}[3]{\OBTAINNAME~#1~\isarkeyword{where}\I@optname{#2}~#3}
8900
e9f1cd37cba4 improved \BG, \EN;
wenzelm
parents: 8618
diff changeset
   126
\newcommand{\BG}{\isarkeyword{\textbf{\{}}}
e9f1cd37cba4 improved \BG, \EN;
wenzelm
parents: 8618
diff changeset
   127
\newcommand{\EN}{\isarkeyword{\textbf{\}}}}
8446
fb73f193e577 added \NEXT;
wenzelm
parents: 8377
diff changeset
   128
\newcommand{\NEXT}{\isarkeyword{next}}
8377
def06c441893 added \CASE, \OBTAIN, \SORRY, \OOPS;
wenzelm
parents: 7976
diff changeset
   129
\newcommand{\SORRY}{\isarkeyword{sorry}}
def06c441893 added \CASE, \OBTAIN, \SORRY, \OOPS;
wenzelm
parents: 7976
diff changeset
   130
\newcommand{\OOPS}{\isarkeyword{oops}}