doc-src/isar.sty
author wenzelm
Sun, 21 May 2000 14:42:35 +0200
changeset 8900 e9f1cd37cba4
parent 8618 87cddace4432
child 8992 6addcdd363b7
permissions -rw-r--r--
improved \BG, \EN;


%% $Id$
%%
%% Isar language elements
%%

\usepackage{ifthen}

\newcommand{\isarkeyword}[1]{{\mathord{\mathbf{#1}}}}

\newcommand{\indexoutertoken}[1]{\index{#1 (syntax)|bold}\index{Syntax!#1|bold}}
\newcommand{\indexouternonterm}[1]{\index{#1 (syntax)|bold}\index{Syntax!#1|bold}}
\newcommand{\indexisarcmd}[1]{\index{#1 (command)|bold}\index{Commands!#1|bold}}
\newcommand{\indexisarmeth}[1]{\index{#1 (method)|bold}\index{Methods!#1|bold}}
\newcommand{\indexisaratt}[1]{\index{#1 (attribute)|bold}\index{Attributes!#1|bold}}
\newcommand{\indexisarthm}[1]{\index{#1 (theorem)|bold}\index{Theorems!#1|bold}}
\newcommand{\indexisarvar}[1]{\index{#1 (variable)|bold}\index{Variables!#1|bold}}

\newcommand{\isarcmd}[1]{\isarkeyword{#1}}
\newcommand{\isartrans}[2]{#1 \mathbin{\,\to\,} #2}
\newcommand{\isarkeep}[1]{#1 \mathbin{\,\to\,} #1}
\newcommand{\isarmeth}{method}
\newcommand{\isaratt}{attribute}

\newcommand{\I@optname}[1]{\ifthenelse{\equal{}{#1}}{}{~#1\colon}}
\newcommand{\I@optmeth}[1]{\ifthenelse{\equal{}{#1}}{}{~(#1)}}

\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{\CASENAME}{\isarkeyword{case}}
\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{\OBTAINNAME}{\isarkeyword{obtain}}
\newcommand{\CMTNAME}{\isarkeyword{-{}-}}

\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~\ifthenelse{\equal{}{#1}}{}{#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{\CASE}[1]{\CASENAME~#1}
\newcommand{\THEN}{\isarkeyword{then}}
\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{\QED}[1]{\QEDNAME\I@optmeth{#1}}
\newcommand{\BY}[1]{\BYNAME\I@optmeth{#1}}
\newcommand{\BYY}[2]{\BYNAME\I@optmeth{#1}\I@optmeth{#2}}
\newcommand{\DOT}{\isarkeyword{.}}
\newcommand{\DDOT}{\isarkeyword{.\,.}}
\newcommand{\DDDOT}{\dots}
\newcommand{\IS}[1]{(\ISNAME~#1)}
\newcommand{\ISS}[2]{(\ISNAME~#1~\ISNAME~#2)}
\newcommand{\LET}[1]{\LETNAME~#1}
\newcommand{\DEF}[2]{\DEFNAME\I@optname{#1}~#2}
\newcommand{\ATT}[1]{\ap [#1]}
\newcommand{\CMT}[1]{\CMTNAME~\text{#1}}
\newcommand{\ALSO}{\isarkeyword{also}}
\newcommand{\FINALLY}{\isarkeyword{finally}}
\newcommand{\MOREOVER}{\isarkeyword{moreover}}
\newcommand{\ULTIMATELY}{\isarkeyword{ultimately}}
\newcommand{\OBTAIN}[3]{\OBTAINNAME~#1~\isarkeyword{where}\I@optname{#2}~#3}
\newcommand{\BG}{\isarkeyword{\textbf{\{}}}
\newcommand{\EN}{\isarkeyword{\textbf{\}}}}
\newcommand{\NEXT}{\isarkeyword{next}}
\newcommand{\SORRY}{\isarkeyword{sorry}}
\newcommand{\OOPS}{\isarkeyword{oops}}