doc-src/isar.sty
changeset 7138 0a17c2a93454
parent 7050 c70d3402fef5
child 7170 cb8afc731bee
--- a/doc-src/isar.sty	Fri Jul 30 15:56:58 1999 +0200
+++ b/doc-src/isar.sty	Fri Jul 30 15:57:27 1999 +0200
@@ -1,63 +1,75 @@
 
 %% $Id$
+%%
+%% Isar language elements
+%%
 
 \usepackage{ifthen}
 
-%Isar language elements
-\newcommand{\I@keyword}[1]{{\mathord{\mathbf{#1}}}}
+\newcommand{\isarkeyword}[1]{{\mathord{\mathbf{#1}}}}
+
+\newcommand{\indexisarcmd}[1]{\index{#1 (command)|bold}}
+\newcommand{\isarcmd}[1]{\isarkeyword{#1}}
+\newcommand{\isartrans}[2]{#1 \mathbin{\,\to\,} #2}
+\newcommand{\isarkeep}[1]{#1 \mathbin{\,\to\,} #1}
+
 \newcommand{\I@optname}[1]{\ifthenelse{\equal{}{#1}}{}{~#1\colon}}
 \newcommand{\I@optoptname}[1]{\ifthenelse{\equal{}{#1}}{}{~[#1\colon]}}
 \newcommand{\I@optmeth}[1]{\ifthenelse{\equal{}{#1}}{}{~(#1)}}
 \newcommand{\I@optoptmeth}[1]{\ifthenelse{\equal{}{#1}}{}{~[(#1)]}}
 
-\newcommand{\LEMMANAME}{\I@keyword{lemma}}
-\newcommand{\THEOREMNAME}{\I@keyword{theorem}}
-\newcommand{\NOTENAME}{\I@keyword{note}}
-\newcommand{\FROMNAME}{\I@keyword{from}}
-\newcommand{\WITHNAME}{\I@keyword{with}}
-\newcommand{\FIXNAME}{\I@keyword{fix}}
-\newcommand{\ASSUMENAME}{\I@keyword{assume}}
-\newcommand{\PRESUMENAME}{\I@keyword{presume}}
-\newcommand{\HAVENAME}{\I@keyword{have}}
-\newcommand{\SHOWNAME}{\I@keyword{show}}
-\newcommand{\HENCENAME}{\I@keyword{hence}}
-\newcommand{\THUSNAME}{\I@keyword{thus}}
-\newcommand{\PROOFNAME}{\I@keyword{proof}}
-\newcommand{\QEDNAME}{\I@keyword{qed}}
-\newcommand{\BYNAME}{\I@keyword{by}}
-\newcommand{\ISNAME}{\I@keyword{is}}
-\newcommand{\CONCLNAME}{\I@keyword{concl}}
-\newcommand{\LETNAME}{\I@keyword{let}}
-\newcommand{\DEFNAME}{\I@keyword{def}}
-\newcommand{\SUFFNAME}{\I@keyword{suffient}}
-\newcommand{\CMTNAME}{\I@keyword{-{}-}}
+\newcommand{\LEMMANAME}{\isarkeyword{lemma}}
+\newcommand{\THEOREMNAME}{\isarkeyword{theorem}}
+\newcommand{\NOTENAME}{\isarkeyword{note}}
+\newcommand{\FROMNAME}{\isarkeyword{from}}
+\newcommand{\WITHNAME}{\isarkeyword{with}}
+\newcommand{\FIXNAME}{\isarkeyword{fix}}
+\newcommand{\ASSUMENAME}{\isarkeyword{assume}}
+\newcommand{\PRESUMENAME}{\isarkeyword{presume}}
+\newcommand{\HAVENAME}{\isarkeyword{have}}
+\newcommand{\SHOWNAME}{\isarkeyword{show}}
+\newcommand{\HENCENAME}{\isarkeyword{hence}}
+\newcommand{\THUSNAME}{\isarkeyword{thus}}
+\newcommand{\PROOFNAME}{\isarkeyword{proof}}
+\newcommand{\QEDNAME}{\isarkeyword{qed}}
+\newcommand{\BYNAME}{\isarkeyword{by}}
+\newcommand{\ISNAME}{\isarkeyword{is}}
+\newcommand{\CONCLNAME}{\isarkeyword{concl}}
+\newcommand{\LETNAME}{\isarkeyword{let}}
+\newcommand{\DEFNAME}{\isarkeyword{def}}
+\newcommand{\SUFFNAME}{\isarkeyword{suffient}}
+\newcommand{\CMTNAME}{\isarkeyword{-{}-}}
 
-\newcommand{\TYPES}{\I@keyword{types}}
-\newcommand{\CONSTS}{\I@keyword{consts}}
-\newcommand{\DEFS}{\I@keyword{defs}}
+\newcommand{\THEORY}{\isarkeyword{theory}}
+\newcommand{\CONTEXT}{\isarkeyword{context}}
+\newcommand{\END}{\isarkeyword{end}}
+
+\newcommand{\TYPES}{\isarkeyword{types}}
+\newcommand{\CONSTS}{\isarkeyword{consts}}
+\newcommand{\DEFS}{\isarkeyword{defs}}
+\newcommand{\TEXT}{\isarkeyword{text}}
+\newcommand{\TXT}{\isarkeyword{txt}}
 \newcommand{\NOTE}[2]{\NOTENAME~#1=#2}
 \newcommand{\FROM}[1]{\FROMNAME~#1}
 \newcommand{\WITH}[1]{\WITHNAME~#1}
 \newcommand{\FIX}[1]{\FIXNAME~#1}
 \newcommand{\ASSUME}[2]{\ASSUMENAME\I@optname{#1}~#2}
 \newcommand{\PRESUME}[2]{\PRESUMENAME\I@optname{#1}~#2}
-\newcommand{\THEN}{\I@keyword{then}}
-\newcommand{\BEGIN}{\I@keyword{begin}}
-\newcommand{\END}{\I@keyword{end}}
-\newcommand{\BG}{\lceil}
-\newcommand{\EN}{\rfloor}
-\newcommand{\HAVE}[2]{\I@keyword{have}\I@optname{#1}~#2}
-\newcommand{\SHOW}[2]{\I@keyword{show}\I@optname{#1}~#2}
-\newcommand{\HENCE}[2]{\I@keyword{hence}\I@optname{#1}~#2}
-\newcommand{\THUS}[2]{\I@keyword{thus}\I@optname{#1}~#2}
+\newcommand{\THEN}{\isarkeyword{then}}
+\newcommand{\BG}{\{\{}
+\newcommand{\EN}{\}\}}
+\newcommand{\HAVE}[2]{\isarkeyword{have}\I@optname{#1}~#2}
+\newcommand{\SHOW}[2]{\isarkeyword{show}\I@optname{#1}~#2}
+\newcommand{\HENCE}[2]{\isarkeyword{hence}\I@optname{#1}~#2}
+\newcommand{\THUS}[2]{\isarkeyword{thus}\I@optname{#1}~#2}
 \newcommand{\LEMMA}[2]{\LEMMANAME\I@optname{#1}~#2}
 \newcommand{\THEOREM}[2]{\THEOREMNAME\I@optname{#1}~#2}
 \newcommand{\PROOF}[1]{\PROOFNAME\I@optmeth{#1}}
 \newcommand{\PPROOF}[1]{\PPROOFNAME\I@optmeth{#1}}
 \newcommand{\QED}[1]{\QEDNAME\I@optmeth{#1}}
 \newcommand{\BY}[1]{\BYNAME\I@optmeth{#1}}
-\newcommand{\DOT}{\I@keyword{.}}
-\newcommand{\DDOT}{\I@keyword{.\,.}}
+\newcommand{\DOT}{\isarkeyword{.}}
+\newcommand{\DDOT}{\isarkeyword{.\,.}}
 \newcommand{\DDDOT}{\dots}
 \newcommand{\IS}[1]{(\ISNAME~#1)}
 \newcommand{\LET}[1]{\LETNAME~#1}
@@ -66,5 +78,5 @@
 \newcommand{\SUFF}[1]{\SUFFNAME~#1}
 \newcommand{\ATT}[1]{\ap [#1]}
 \newcommand{\CMT}[1]{\CMTNAME~\text{#1}}
-\newcommand{\ALSO}{\I@keyword{also}}
-\newcommand{\FINALLY}{\I@keyword{finally}}
+\newcommand{\ALSO}{\isarkeyword{also}}
+\newcommand{\FINALLY}{\isarkeyword{finally}}