
wenzelm@26913: %%
wenzelm@26913: %% 
wenzelm@26913: %%
wenzelm@26913: %% macros for Isabelle generated LaTeX output
wenzelm@26913: %%
wenzelm@26913: 
wenzelm@26913: %%% Simple document preparation (based on theory token language and symbols)
wenzelm@26913: 
wenzelm@26913: % isabelle environments
wenzelm@26913: 
wenzelm@26913: \newcommand{\isabellecontext}{UNKNOWN}
wenzelm@26913: 
wenzelm@26913: \newcommand{\isastyle}{\UNDEF}
wenzelm@26913: \newcommand{\isastyleminor}{\UNDEF}
wenzelm@26913: \newcommand{\isastylescript}{\UNDEF}
wenzelm@26913: \newcommand{\isastyletext}{\normalsize\rm}
wenzelm@26913: \newcommand{\isastyletxt}{\rm}
wenzelm@26913: \newcommand{\isastylecmt}{\rm}
wenzelm@26913: 
wenzelm@26913: %symbol markup -- \emph achieves decent spacing via italic corrections
wenzelm@26913: \newcommand{\isamath}[1]{\emph{$#1$}}
wenzelm@26913: \newcommand{\isatext}[1]{\emph{#1}}
wenzelm@26913: \DeclareRobustCommand{\isascriptstyle}{\def\isamath##1{##1}\def\isatext##1{\mbox{\isastylescript##1}}}
wenzelm@26913: \newcommand{\isactrlsub}[1]{\emph{\isascriptstyle${}\sb{#1}$}}
wenzelm@26913: \newcommand{\isactrlsup}[1]{\emph{\isascriptstyle${}\sp{#1}$}}
wenzelm@26913: \newcommand{\isactrlisub}[1]{\emph{\isascriptstyle${}\sb{#1}$}}
wenzelm@26913: \newcommand{\isactrlisup}[1]{\emph{\isascriptstyle${}\sp{#1}$}}
wenzelm@26913: \DeclareRobustCommand{\isactrlbsub}{\emph\bgroup\math{}\sb\bgroup\mbox\bgroup\isastylescript}
wenzelm@26913: \DeclareRobustCommand{\isactrlesub}{\egroup\egroup\endmath\egroup}
wenzelm@26913: \DeclareRobustCommand{\isactrlbsup}{\emph\bgroup\math{}\sp\bgroup\mbox\bgroup\isastylescript}
wenzelm@26913: \DeclareRobustCommand{\isactrlesup}{\egroup\egroup\endmath\egroup}
wenzelm@26913: \newcommand{\isactrlbold}[1]{{\bfseries\upshape\boldmath#1}}
wenzelm@26913: \newcommand{\isactrlloc}[1]{{\bfseries\upshape\boldmath#1}}
wenzelm@27349: 
wenzelm@26913: \newenvironment{isaantiq}{{\isacharat\isacharbraceleft}}{{\isacharbraceright}}
wenzelm@27349: \newcommand{\isaantiqopen}{\isakeyword{\isacharbraceleft}}
wenzelm@27349: \newcommand{\isaantiqclose}{\isakeyword{\isacharbraceright}}
wenzelm@26913: 
wenzelm@26913: \newdimen\isa@parindent\newdimen\isa@parskip
wenzelm@26913: 
wenzelm@26913: \newenvironment{isabellebody}{%
wenzelm@26913: \isamarkuptrue\par%
wenzelm@26913: \isa@parindent\parindent\parindent0pt%
wenzelm@26913: \isa@parskip\parskip\parskip0pt%
wenzelm@26913: \isastyle}{\par}
wenzelm@26913: 
wenzelm@26913: \newenvironment{isabelle}
wenzelm@26913: {\begin{trivlist}\begin{isabellebody}\item\relax}
wenzelm@26913: {\end{isabellebody}\end{trivlist}}
wenzelm@26913: 
wenzelm@26913: \newcommand{\isa}[1]{\emph{\isastyleminor #1}}
wenzelm@26913: 
wenzelm@26913: \newcommand{\isaindent}[1]{\hphantom{#1}}
wenzelm@26913: \newcommand{\isanewline}{\mbox{}\par\mbox{}}
wenzelm@26913: \newcommand{\isasep}{}
wenzelm@26913: \newcommand{\isadigit}[1]{#1}
wenzelm@26913: 
wenzelm@26913: \newcommand{\isachardefaults}{%
wenzelm@26913: \chardef\isacharbang=`\!%
wenzelm@26913: \chardef\isachardoublequote=`\"%
wenzelm@26913: \chardef\isachardoublequoteopen=`\"%
wenzelm@26913: \chardef\isachardoublequoteclose=`\"%
wenzelm@26913: \chardef\isacharhash=`\#%
wenzelm@26913: \chardef\isachardollar=`\$%
wenzelm@26913: \chardef\isacharpercent=`\%%
wenzelm@26913: \chardef\isacharampersand=`\&%
wenzelm@26913: \chardef\isacharprime=`\'%
wenzelm@26913: \chardef\isacharparenleft=`\(%
wenzelm@26913: \chardef\isacharparenright=`\)%
wenzelm@26913: \chardef\isacharasterisk=`\*%
wenzelm@26913: \chardef\isacharplus=`\+%
wenzelm@26913: \chardef\isacharcomma=`\,%
wenzelm@26913: \chardef\isacharminus=`\-%
wenzelm@26913: \chardef\isachardot=`\.%
wenzelm@26913: \chardef\isacharslash=`\/%
wenzelm@26913: \chardef\isacharcolon=`\:%
wenzelm@26913: \chardef\isacharsemicolon=`\;%
wenzelm@26913: \chardef\isacharless=`\<%
wenzelm@26913: \chardef\isacharequal=`\=%
wenzelm@26913: \chardef\isachargreater=`\>%
wenzelm@26913: \chardef\isacharquery=`\?%
wenzelm@26913: \chardef\isacharat=`\@%
wenzelm@26913: \chardef\isacharbrackleft=`\[%
wenzelm@26913: \chardef\isacharbackslash=`\\%
wenzelm@26913: \chardef\isacharbrackright=`\]%
wenzelm@26913: \chardef\isacharcircum=`\^%
wenzelm@26913: \chardef\isacharunderscore=`\_%
wenzelm@26913: \def\isacharunderscorekeyword{\_}%
wenzelm@26913: \chardef\isacharbackquote=`\`%
wenzelm@26913: \chardef\isacharbackquoteopen=`\`%
wenzelm@26913: \chardef\isacharbackquoteclose=`\`%
wenzelm@26913: \chardef\isacharbraceleft=`\{%
wenzelm@26913: \chardef\isacharbar=`\|%
wenzelm@26913: \chardef\isacharbraceright=`\}%
wenzelm@26913: \chardef\isachartilde=`\~%
wenzelm@26913: \def\isacharverbatimopen{\isacharbraceleft\isacharasterisk}%
wenzelm@26913: \def\isacharverbatimclose{\isacharasterisk\isacharbraceright}%
wenzelm@26913: }
wenzelm@26913: 
wenzelm@26913: 
wenzelm@26913: % keyword and section markup
wenzelm@26913: 
wenzelm@26913: \newcommand{\isakeyword}[1]
wenzelm@26913: {\emph{\bf\def\isachardot{.}\def\isacharunderscore{\isacharunderscorekeyword}%
wenzelm@26913: \def\isacharbraceleft{\{}\def\isacharbraceright{\}}#1}}
wenzelm@26913: \newcommand{\isacommand}[1]{\isakeyword{#1}}
wenzelm@26913: 
wenzelm@26913: \newcommand{\isamarkupheader}[1]{\section{#1}}
wenzelm@26913: \newcommand{\isamarkupchapter}[1]{\chapter{#1}}
wenzelm@26913: \newcommand{\isamarkupsection}[1]{\section{#1}}
wenzelm@26913: \newcommand{\isamarkupsubsection}[1]{\subsection{#1}}
wenzelm@26913: \newcommand{\isamarkupsubsubsection}[1]{\subsubsection{#1}}
wenzelm@26913: \newcommand{\isamarkupsect}[1]{\section{#1}}
wenzelm@26913: \newcommand{\isamarkupsubsect}[1]{\subsection{#1}}
wenzelm@26913: \newcommand{\isamarkupsubsubsect}[1]{\subsubsection{#1}}
wenzelm@26913: 
wenzelm@26913: \newif\ifisamarkup
wenzelm@26913: \newcommand{\isabeginpar}{\par\ifisamarkup\relax\else\medskip\fi}
wenzelm@26913: \newcommand{\isaendpar}{\par\medskip}
wenzelm@26913: \newenvironment{isapar}{\parindent\isa@parindent\parskip\isa@parskip\isabeginpar}{\isaendpar}
wenzelm@26913: \newenvironment{isamarkuptext}{\par\isastyletext\begin{isapar}}{\end{isapar}}
wenzelm@26913: \newenvironment{isamarkuptxt}{\par\isastyletxt\begin{isapar}}{\end{isapar}}
wenzelm@26913: \newcommand{\isamarkupcmt}[1]{{\isastylecmt--- #1}}
wenzelm@26913: 
wenzelm@26913: 
wenzelm@26913: % styles
wenzelm@26913: 
wenzelm@26913: \def\isabellestyle#1{\csname isabellestyle#1\endcsname}
wenzelm@26913: 
wenzelm@26913: \newcommand{\isabellestyledefault}{%
wenzelm@26913: \renewcommand{\isastyle}{\small\tt\slshape}%
wenzelm@26913: \renewcommand{\isastyleminor}{\small\tt\slshape}%
wenzelm@26913: \renewcommand{\isastylescript}{\footnotesize\tt\slshape}%
wenzelm@26913: \isachardefaults%
wenzelm@26913: }
wenzelm@26913: \isabellestyledefault
wenzelm@26913: 
wenzelm@26913: \newcommand{\isabellestylett}{%
wenzelm@26913: \renewcommand{\isastyle}{\small\tt}%
wenzelm@26913: \renewcommand{\isastyleminor}{\small\tt}%
wenzelm@26913: \renewcommand{\isastylescript}{\footnotesize\tt}%
wenzelm@26913: \isachardefaults%
wenzelm@26913: }
wenzelm@26913: 
wenzelm@26913: \newcommand{\isabellestyleit}{%
wenzelm@26913: \renewcommand{\isastyle}{\small\it}%
wenzelm@26913: \renewcommand{\isastyleminor}{\it}%
wenzelm@26913: \renewcommand{\isastylescript}{\footnotesize\it}%
wenzelm@26913: \renewcommand{\isacharunderscorekeyword}{\mbox{-}}%
wenzelm@26913: \renewcommand{\isacharbang}{\isamath{!}}%
wenzelm@26913: \renewcommand{\isachardoublequote}{}%
wenzelm@26913: \renewcommand{\isachardoublequoteopen}{}%
wenzelm@26913: \renewcommand{\isachardoublequoteclose}{}%
wenzelm@26913: \renewcommand{\isacharhash}{\isamath{\#}}%
wenzelm@26913: \renewcommand{\isachardollar}{\isamath{\$}}%
wenzelm@26913: \renewcommand{\isacharpercent}{\isamath{\%}}%
wenzelm@26913: \renewcommand{\isacharampersand}{\isamath{\&}}%
wenzelm@26913: \renewcommand{\isacharprime}{\isamath{\mskip2mu{'}\mskip-2mu}}%
wenzelm@26913: \renewcommand{\isacharparenleft}{\isamath{(}}%
wenzelm@26913: \renewcommand{\isacharparenright}{\isamath{)}}%
wenzelm@26913: \renewcommand{\isacharasterisk}{\isamath{*}}%
wenzelm@26913: \renewcommand{\isacharplus}{\isamath{+}}%
wenzelm@26913: \renewcommand{\isacharcomma}{\isamath{\mathord,}}%
wenzelm@26913: \renewcommand{\isacharminus}{\isamath{-}}%
wenzelm@26913: \renewcommand{\isachardot}{\isamath{\mathord.}}%
wenzelm@26913: \renewcommand{\isacharslash}{\isamath{/}}%
wenzelm@26913: \renewcommand{\isacharcolon}{\isamath{\mathord:}}%
wenzelm@26913: \renewcommand{\isacharsemicolon}{\isamath{\mathord;}}%
wenzelm@26913: \renewcommand{\isacharless}{\isamath{<}}%
wenzelm@26913: \renewcommand{\isacharequal}{\isamath{=}}%
wenzelm@26913: \renewcommand{\isachargreater}{\isamath{>}}%
wenzelm@26913: \renewcommand{\isacharat}{\isamath{@}}%
wenzelm@26913: \renewcommand{\isacharbrackleft}{\isamath{[}}%
wenzelm@26913: \renewcommand{\isacharbackslash}{\isamath{\backslash}}%
wenzelm@26913: \renewcommand{\isacharbrackright}{\isamath{]}}%
wenzelm@26913: \renewcommand{\isacharunderscore}{\mbox{-}}%
wenzelm@26913: \renewcommand{\isacharbraceleft}{\isamath{\{}}%
wenzelm@26913: \renewcommand{\isacharbar}{\isamath{\mid}}%
wenzelm@26913: \renewcommand{\isacharbraceright}{\isamath{\}}}%
wenzelm@26913: \renewcommand{\isachartilde}{\isamath{{}\sp{\sim}}}%
wenzelm@26913: \renewcommand{\isacharbackquoteopen}{\isatext{\raise.3ex\hbox{$\scriptscriptstyle\langle$}}}%
wenzelm@26913: \renewcommand{\isacharbackquoteclose}{\isatext{\raise.3ex\hbox{$\scriptscriptstyle\rangle$}}}%
wenzelm@26913: \renewcommand{\isacharverbatimopen}{\isamath{\langle\!\langle}}%
wenzelm@26913: \renewcommand{\isacharverbatimclose}{\isamath{\rangle\!\rangle}}%
wenzelm@26913: }
wenzelm@26913: 
wenzelm@26913: \newcommand{\isabellestylesl}{%
wenzelm@26913: \isabellestyleit%
wenzelm@26913: \renewcommand{\isastyle}{\small\sl}%
wenzelm@26913: \renewcommand{\isastyleminor}{\sl}%
wenzelm@26913: \renewcommand{\isastylescript}{\footnotesize\sl}%
wenzelm@26913: }
wenzelm@26913: 
wenzelm@26913: 
wenzelm@26913: % tagged regions
wenzelm@26913: 
wenzelm@26913: %plain TeX version of comment package -- much faster!
wenzelm@26913: \let\isafmtname\fmtname\def\fmtname{plain}
wenzelm@26913: \usepackage{comment}
wenzelm@26913: \let\fmtname\isafmtname
wenzelm@26913: 
wenzelm@26913: \newcommand{\isafold}[1]{\emph{$\langle\mathord{\mathit{#1}}\rangle$}}
wenzelm@26913: 
wenzelm@26913: \newcommand{\isakeeptag}[1]%
wenzelm@26913: {\includecomment{isadelim#1}\includecomment{isatag#1}\csarg\def{isafold#1}{}}
wenzelm@26913: \newcommand{\isadroptag}[1]%
wenzelm@26913: {\excludecomment{isadelim#1}\excludecomment{isatag#1}\csarg\def{isafold#1}{}}
wenzelm@26913: \newcommand{\isafoldtag}[1]%
wenzelm@26913: {\includecomment{isadelim#1}\excludecomment{isatag#1}\csarg\def{isafold#1}{\isafold{#1}}}
wenzelm@26913: 
wenzelm@26913: \isakeeptag{theory}
wenzelm@26913: \isakeeptag{proof}
wenzelm@26913: \isakeeptag{ML}
wenzelm@26913: \isakeeptag{visible}
wenzelm@26913: \isadroptag{invisible}
wenzelm@26913: 
wenzelm@26913: \IfFileExists{isabelletags.sty}{\usepackage{isabelletags}}{}




