doc-src/TutorialI/Documents/document/Documents.tex
author nipkow
Mon, 16 Aug 2004 19:47:01 +0200
changeset 15136 1275417e3930
parent 14486 74c053a25513
child 15141 a95c2ff210ba
permissions -rw-r--r--
Adapted text to new theory header syntax.
     1 %
     2 \begin{isabellebody}%
     3 \def\isabellecontext{Documents}%
     4 \isamarkupfalse%
     5 %
     6 \isamarkupsection{Concrete Syntax \label{sec:concrete-syntax}%
     7 }
     8 \isamarkuptrue%
     9 %
    10 \begin{isamarkuptext}%
    11 The core concept of Isabelle's framework for concrete syntax is that
    12   of \bfindex{mixfix annotations}.  Associated with any kind of
    13   constant declaration, mixfixes affect both the grammar productions
    14   for the parser and output templates for the pretty printer.
    15 
    16   In full generality, parser and pretty printer configuration is a
    17   subtle affair \cite{isabelle-ref}.  Your syntax specifications need
    18   to interact properly with the existing setup of Isabelle/Pure and
    19   Isabelle/HOL\@.  To avoid creating ambiguities with existing
    20   elements, it is particularly important to give new syntactic
    21   constructs the right precedence.
    22 
    23   \medskip Subsequently we introduce a few simple syntax declaration
    24   forms that already cover many common situations fairly well.%
    25 \end{isamarkuptext}%
    26 \isamarkuptrue%
    27 %
    28 \isamarkupsubsection{Infix Annotations%
    29 }
    30 \isamarkuptrue%
    31 %
    32 \begin{isamarkuptext}%
    33 Syntax annotations may be included wherever constants are declared,
    34   such as \isacommand{consts} and \isacommand{constdefs} --- and also
    35   \isacommand{datatype}, which declares constructor operations.
    36   Type-constructors may be annotated as well, although this is less
    37   frequently encountered in practice (the infix type \isa{{\isasymtimes}} comes
    38   to mind).
    39 
    40   Infix declarations\index{infix annotations} provide a useful special
    41   case of mixfixes.  The following example of the exclusive-or
    42   operation on boolean values illustrates typical infix declarations.%
    43 \end{isamarkuptext}%
    44 \isamarkuptrue%
    45 \isacommand{constdefs}\isanewline
    46 \ \ xor\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}bool\ {\isasymRightarrow}\ bool\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infixl}\ {\isachardoublequote}{\isacharbrackleft}{\isacharplus}{\isacharbrackright}{\isachardoublequote}\ {\isadigit{6}}{\isadigit{0}}{\isacharparenright}\isanewline
    47 \ \ {\isachardoublequote}A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ B\ {\isasymequiv}\ {\isacharparenleft}A\ {\isasymand}\ {\isasymnot}\ B{\isacharparenright}\ {\isasymor}\ {\isacharparenleft}{\isasymnot}\ A\ {\isasymand}\ B{\isacharparenright}{\isachardoublequote}\isamarkupfalse%
    48 %
    49 \begin{isamarkuptext}%
    50 \noindent Now \isa{xor\ A\ B} and \isa{A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ B} refer to the
    51   same expression internally.  Any curried function with at least two
    52   arguments may be given infix syntax.  For partial applications with
    53   fewer than two operands, there is a notation using the prefix~\isa{op}.  For instance, \isa{xor} without arguments is represented as
    54   \isa{op\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}}; together with ordinary function application, this
    55   turns \isa{xor\ A} into \isa{op\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ A}.
    56 
    57   \medskip The keyword \isakeyword{infixl} seen above specifies an
    58   infix operator that is nested to the \emph{left}: in iterated
    59   applications the more complex expression appears on the left-hand
    60   side, and \isa{A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ B\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ C} stands for \isa{{\isacharparenleft}A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ B{\isacharparenright}\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ C}.  Similarly, \isakeyword{infixr} means nesting to the
    61   \emph{right}, reading \isa{A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ B\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ C} as \isa{A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ {\isacharparenleft}B\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ C{\isacharparenright}}.  A \emph{non-oriented} declaration via \isakeyword{infix}
    62   would render \isa{A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ B\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ C} illegal, but demand explicit
    63   parentheses to indicate the intended grouping.
    64 
    65   The string \isa{{\isachardoublequote}{\isacharbrackleft}{\isacharplus}{\isacharbrackright}{\isachardoublequote}} in our annotation refers to the
    66   concrete syntax to represent the operator (a literal token), while
    67   the number \isa{{\isadigit{6}}{\isadigit{0}}} determines the precedence of the construct:
    68   the syntactic priorities of the arguments and result.  Isabelle/HOL
    69   already uses up many popular combinations of ASCII symbols for its
    70   own use, including both \isa{{\isacharplus}} and \isa{{\isacharplus}{\isacharplus}}.  Longer
    71   character combinations are more likely to be still available for
    72   user extensions, such as our~\isa{{\isacharbrackleft}{\isacharplus}{\isacharbrackright}}.
    73 
    74   Operator precedences have a range of 0--1000.  Very low or high
    75   priorities are reserved for the meta-logic.  HOL syntax mainly uses
    76   the range of 10--100: the equality infix \isa{{\isacharequal}} is centered at
    77   50; logical connectives (like \isa{{\isasymor}} and \isa{{\isasymand}}) are
    78   below 50; algebraic ones (like \isa{{\isacharplus}} and \isa{{\isacharasterisk}}) are
    79   above 50.  User syntax should strive to coexist with common HOL
    80   forms, or use the mostly unused range 100--900.%
    81 \end{isamarkuptext}%
    82 \isamarkuptrue%
    83 %
    84 \isamarkupsubsection{Mathematical Symbols \label{sec:syntax-symbols}%
    85 }
    86 \isamarkuptrue%
    87 %
    88 \begin{isamarkuptext}%
    89 Concrete syntax based on ASCII characters has inherent limitations.
    90   Mathematical notation demands a larger repertoire of glyphs.
    91   Several standards of extended character sets have been proposed over
    92   decades, but none has become universally available so far.  Isabelle
    93   has its own notion of \bfindex{symbols} as the smallest entities of
    94   source text, without referring to internal encodings.  There are
    95   three kinds of such ``generalized characters'':
    96 
    97   \begin{enumerate}
    98 
    99   \item 7-bit ASCII characters
   100 
   101   \item named symbols: \verb,\,\verb,<,$ident$\verb,>,
   102 
   103   \item named control symbols: \verb,\,\verb,<^,$ident$\verb,>,
   104 
   105   \end{enumerate}
   106 
   107   Here $ident$ is any sequence of letters. 
   108   This results in an infinite store of symbols, whose
   109   interpretation is left to further front-end tools.  For example, the
   110   user-interface of Proof~General + X-Symbol and the Isabelle document
   111   processor (see \S\ref{sec:document-preparation}) display the
   112   \verb,\,\verb,<forall>, symbol as~\isa{{\isasymforall}}.
   113 
   114   A list of standard Isabelle symbols is given in
   115   \cite[appendix~A]{isabelle-sys}.  You may introduce your own
   116   interpretation of further symbols by configuring the appropriate
   117   front-end tool accordingly, e.g.\ by defining certain {\LaTeX}
   118   macros (see also \S\ref{sec:doc-prep-symbols}).  There are also a
   119   few predefined control symbols, such as \verb,\,\verb,<^sub>, and
   120   \verb,\,\verb,<^sup>, for sub- and superscript of the subsequent
   121   printable symbol, respectively.  For example, \verb,A\<^sup>\<star>, is
   122   output as \isa{A\isactrlsup {\isasymstar}}.
   123 
   124   A number of symbols are considered letters by the Isabelle lexer 
   125   and can be used as part of identifiers. These are the greek letters
   126   \isa{{\isasymalpha}} (\verb+\+\verb+<alpha>+), \isa{{\isasymbeta}}, etc apart from
   127   \isa{{\isasymlambda}}, caligraphic letters like \isa{{\isasymA}}
   128   (\verb+\+\verb+<A>+) and \isa{{\isasymAA}} (\verb+\+\verb+<AA>+), 
   129   and the special control symbols \verb+\+\verb+<^isub>+ and 
   130   \verb+\+\verb+<^isup>+ for single letter sub and super scripts. This
   131   means that the input 
   132 
   133   \medskip
   134   {\small\noindent \verb,\,\verb,<forall>\,\verb,<alpha>\<^isub>1.\,\verb,<alpha>\<^isub>1=\,\verb,<Pi>\<^isup>\<A>,}
   135 
   136   \medskip
   137   \noindent is recognized as the term \isa{{\isasymforall}{\isasymalpha}\isactrlisub {\isadigit{1}}{\isachardot}\ {\isasymalpha}\isactrlisub {\isadigit{1}}\ {\isacharequal}\ {\isasymPi}\isactrlisup {\isasymA}} 
   138   by Isabelle. Note that \isa{{\isasymPi}\isactrlisup {\isasymA}} is a single entity like 
   139   \isa{PA}, not an exponentiation.
   140 
   141 
   142   \medskip Replacing our definition of \isa{xor} by the following
   143   specifies an Isabelle symbol for the new operator:%
   144 \end{isamarkuptext}%
   145 \isamarkuptrue%
   146 \isamarkupfalse%
   147 \isamarkupfalse%
   148 \isacommand{constdefs}\isanewline
   149 \ \ xor\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}bool\ {\isasymRightarrow}\ bool\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infixl}\ {\isachardoublequote}{\isasymoplus}{\isachardoublequote}\ {\isadigit{6}}{\isadigit{0}}{\isacharparenright}\isanewline
   150 \ \ {\isachardoublequote}A\ {\isasymoplus}\ B\ {\isasymequiv}\ {\isacharparenleft}A\ {\isasymand}\ {\isasymnot}\ B{\isacharparenright}\ {\isasymor}\ {\isacharparenleft}{\isasymnot}\ A\ {\isasymand}\ B{\isacharparenright}{\isachardoublequote}\isamarkupfalse%
   151 \isamarkupfalse%
   152 %
   153 \begin{isamarkuptext}%
   154 \noindent The X-Symbol package within Proof~General provides several
   155   input methods to enter \isa{{\isasymoplus}} in the text.  If all fails one may
   156   just type a named entity \verb,\,\verb,<oplus>, by hand; the
   157   corresponding symbol will be displayed after further input.
   158 
   159   \medskip More flexible is to provide alternative syntax forms
   160   through the \bfindex{print mode} concept~\cite{isabelle-ref}.  By
   161   convention, the mode of ``$xsymbols$'' is enabled whenever
   162   Proof~General's X-Symbol mode or {\LaTeX} output is active.  Now
   163   consider the following hybrid declaration of \isa{xor}:%
   164 \end{isamarkuptext}%
   165 \isamarkuptrue%
   166 \isamarkupfalse%
   167 \isamarkupfalse%
   168 \isacommand{constdefs}\isanewline
   169 \ \ xor\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}bool\ {\isasymRightarrow}\ bool\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infixl}\ {\isachardoublequote}{\isacharbrackleft}{\isacharplus}{\isacharbrackright}{\isasymignore}{\isachardoublequote}\ {\isadigit{6}}{\isadigit{0}}{\isacharparenright}\isanewline
   170 \ \ {\isachardoublequote}A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}{\isasymignore}\ B\ {\isasymequiv}\ {\isacharparenleft}A\ {\isasymand}\ {\isasymnot}\ B{\isacharparenright}\ {\isasymor}\ {\isacharparenleft}{\isasymnot}\ A\ {\isasymand}\ B{\isacharparenright}{\isachardoublequote}\isanewline
   171 \isanewline
   172 \isamarkupfalse%
   173 \isacommand{syntax}\ {\isacharparenleft}xsymbols{\isacharparenright}\isanewline
   174 \ \ xor\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}bool\ {\isasymRightarrow}\ bool\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infixl}\ {\isachardoublequote}{\isasymoplus}{\isasymignore}{\isachardoublequote}\ {\isadigit{6}}{\isadigit{0}}{\isacharparenright}\isamarkupfalse%
   175 \isamarkupfalse%
   176 %
   177 \begin{isamarkuptext}%
   178 The \commdx{syntax} command introduced here acts like
   179   \isakeyword{consts}, but without declaring a logical constant.  The
   180   print mode specification of \isakeyword{syntax}, here \isa{{\isacharparenleft}xsymbols{\isacharparenright}}, is optional.  Also note that its type merely serves
   181   for syntactic purposes, and is \emph{not} checked for consistency
   182   with the real constant.
   183 
   184   \medskip We may now write \isa{A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ B} or \isa{A\ {\isasymoplus}\ B} in
   185   input, while output uses the nicer syntax of $xsymbols$ whenever
   186   that print mode is active.  Such an arrangement is particularly
   187   useful for interactive development, where users may type ASCII text
   188   and see mathematical symbols displayed during proofs.%
   189 \end{isamarkuptext}%
   190 \isamarkuptrue%
   191 %
   192 \isamarkupsubsection{Prefix Annotations%
   193 }
   194 \isamarkuptrue%
   195 %
   196 \begin{isamarkuptext}%
   197 Prefix syntax annotations\index{prefix annotation} are another form
   198   of mixfixes \cite{isabelle-ref}, without any template arguments or
   199   priorities --- just some literal syntax.  The following example
   200   associates common symbols with the constructors of a datatype.%
   201 \end{isamarkuptext}%
   202 \isamarkuptrue%
   203 \isacommand{datatype}\ currency\ {\isacharequal}\isanewline
   204 \ \ \ \ Euro\ nat\ \ \ \ {\isacharparenleft}{\isachardoublequote}{\isasymeuro}{\isachardoublequote}{\isacharparenright}\isanewline
   205 \ \ {\isacharbar}\ Pounds\ nat\ \ {\isacharparenleft}{\isachardoublequote}{\isasympounds}{\isachardoublequote}{\isacharparenright}\isanewline
   206 \ \ {\isacharbar}\ Yen\ nat\ \ \ \ \ {\isacharparenleft}{\isachardoublequote}{\isasymyen}{\isachardoublequote}{\isacharparenright}\isanewline
   207 \ \ {\isacharbar}\ Dollar\ nat\ \ {\isacharparenleft}{\isachardoublequote}{\isachardollar}{\isachardoublequote}{\isacharparenright}\isamarkupfalse%
   208 %
   209 \begin{isamarkuptext}%
   210 \noindent Here the mixfix annotations on the rightmost column happen
   211   to consist of a single Isabelle symbol each: \verb,\,\verb,<euro>,,
   212   \verb,\,\verb,<pounds>,, \verb,\,\verb,<yen>,, and \verb,$,.  Recall
   213   that a constructor like \isa{Euro} actually is a function \isa{nat\ {\isasymRightarrow}\ currency}.  The expression \isa{Euro\ {\isadigit{1}}{\isadigit{0}}} will be
   214   printed as \isa{{\isasymeuro}\ {\isadigit{1}}{\isadigit{0}}}; only the head of the application is
   215   subject to our concrete syntax.  This rather simple form already
   216   achieves conformance with notational standards of the European
   217   Commission.
   218 
   219   Prefix syntax works the same way for \isakeyword{consts} or
   220   \isakeyword{constdefs}.%
   221 \end{isamarkuptext}%
   222 \isamarkuptrue%
   223 %
   224 \isamarkupsubsection{Syntax Translations \label{sec:syntax-translations}%
   225 }
   226 \isamarkuptrue%
   227 %
   228 \begin{isamarkuptext}%
   229 Mixfix syntax annotations merely decorate particular constant
   230   application forms with concrete syntax, for instance replacing \
   231   \isa{xor\ A\ B} by \isa{A\ {\isasymoplus}\ B}.  Occasionally, the
   232   relationship between some piece of notation and its internal form is
   233   more complicated.  Here we need \bfindex{syntax translations}.
   234 
   235   Using the \isakeyword{syntax}\index{syntax (command)}, command we
   236   introduce uninterpreted notational elements.  Then
   237   \commdx{translations} relate input forms to complex logical
   238   expressions.  This provides a simple mechanism for syntactic macros;
   239   even heavier transformations may be written in ML
   240   \cite{isabelle-ref}.
   241 
   242   \medskip A typical use of syntax translations is to introduce
   243   relational notation for membership in a set of pair, replacing \
   244   \isa{{\isacharparenleft}x{\isacharcomma}\ y{\isacharparenright}\ {\isasymin}\ sim} by \isa{x\ {\isasymapprox}\ y}.%
   245 \end{isamarkuptext}%
   246 \isamarkuptrue%
   247 \isacommand{consts}\isanewline
   248 \ \ sim\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}{\isacharparenleft}{\isacharprime}a\ {\isasymtimes}\ {\isacharprime}a{\isacharparenright}\ set{\isachardoublequote}\isanewline
   249 \isanewline
   250 \isamarkupfalse%
   251 \isacommand{syntax}\isanewline
   252 \ \ {\isachardoublequote}{\isacharunderscore}sim{\isachardoublequote}\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}{\isacharprime}a\ {\isasymRightarrow}\ {\isacharprime}a\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infix}\ {\isachardoublequote}{\isasymapprox}{\isachardoublequote}\ {\isadigit{5}}{\isadigit{0}}{\isacharparenright}\isanewline
   253 \isamarkupfalse%
   254 \isacommand{translations}\isanewline
   255 \ \ {\isachardoublequote}x\ {\isasymapprox}\ y{\isachardoublequote}\ {\isasymrightleftharpoons}\ {\isachardoublequote}{\isacharparenleft}x{\isacharcomma}\ y{\isacharparenright}\ {\isasymin}\ sim{\isachardoublequote}\isamarkupfalse%
   256 %
   257 \begin{isamarkuptext}%
   258 \noindent Here the name of the dummy constant \isa{{\isacharunderscore}sim} does
   259   not matter, as long as it is not used elsewhere.  Prefixing an
   260   underscore is a common convention.  The \isakeyword{translations}
   261   declaration already uses concrete syntax on the left-hand side;
   262   internally we relate a raw application \isa{{\isacharunderscore}sim\ x\ y} with
   263   \isa{{\isacharparenleft}x{\isacharcomma}\ y{\isacharparenright}\ {\isasymin}\ sim}.
   264 
   265   \medskip Another common application of syntax translations is to
   266   provide variant versions of fundamental relational expressions, such
   267   as \isa{{\isasymnoteq}} for negated equalities.  The following declaration
   268   stems from Isabelle/HOL itself:%
   269 \end{isamarkuptext}%
   270 \isamarkuptrue%
   271 \isacommand{syntax}\ {\isachardoublequote}{\isacharunderscore}not{\isacharunderscore}equal{\isachardoublequote}\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}{\isacharprime}a\ {\isasymRightarrow}\ {\isacharprime}a\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infixl}\ {\isachardoublequote}{\isasymnoteq}{\isasymignore}{\isachardoublequote}\ {\isadigit{5}}{\isadigit{0}}{\isacharparenright}\isanewline
   272 \isamarkupfalse%
   273 \isacommand{translations}\ {\isachardoublequote}x\ {\isasymnoteq}{\isasymignore}\ y{\isachardoublequote}\ {\isasymrightleftharpoons}\ {\isachardoublequote}{\isasymnot}\ {\isacharparenleft}x\ {\isacharequal}\ y{\isacharparenright}{\isachardoublequote}\isamarkupfalse%
   274 %
   275 \begin{isamarkuptext}%
   276 \noindent Normally one would introduce derived concepts like this
   277   within the logic, using \isakeyword{consts} + \isakeyword{defs}
   278   instead of \isakeyword{syntax} + \isakeyword{translations}.  The
   279   present formulation has the virtue that expressions are immediately
   280   replaced by the ``definition'' upon parsing; the effect is reversed
   281   upon printing.
   282 
   283   This sort of translation is appropriate when the defined concept is
   284   a trivial variation on an existing one.  On the other hand, syntax
   285   translations do not scale up well to large hierarchies of concepts.
   286   Translations do not replace definitions!%
   287 \end{isamarkuptext}%
   288 \isamarkuptrue%
   289 %
   290 \isamarkupsection{Document Preparation \label{sec:document-preparation}%
   291 }
   292 \isamarkuptrue%
   293 %
   294 \begin{isamarkuptext}%
   295 Isabelle/Isar is centered around the concept of \bfindex{formal
   296   proof documents}\index{documents|bold}.  The outcome of a formal
   297   development effort is meant to be a human-readable record, presented
   298   as browsable PDF file or printed on paper.  The overall document
   299   structure follows traditional mathematical articles, with sections,
   300   intermediate explanations, definitions, theorems and proofs.
   301 
   302   \medskip The Isabelle document preparation system essentially acts
   303   as a front-end to {\LaTeX}.  After checking specifications and
   304   proofs formally, the theory sources are turned into typesetting
   305   instructions in a schematic manner.  This lets you write authentic
   306   reports on theory developments with little effort: many technical
   307   consistency checks are handled by the system.
   308 
   309   Here is an example to illustrate the idea of Isabelle document
   310   preparation.%
   311 \end{isamarkuptext}%
   312 \isamarkuptrue%
   313 %
   314 \begin{quotation}
   315 %
   316 \begin{isamarkuptext}%
   317 The following datatype definition of \isa{{\isacharprime}a\ bintree} models
   318   binary trees with nodes being decorated by elements of type \isa{{\isacharprime}a}.%
   319 \end{isamarkuptext}%
   320 \isamarkuptrue%
   321 \isacommand{datatype}\ {\isacharprime}a\ bintree\ {\isacharequal}\isanewline
   322 \ \ \ \ \ Leaf\ {\isacharbar}\ Branch\ {\isacharprime}a\ \ {\isachardoublequote}{\isacharprime}a\ bintree{\isachardoublequote}\ \ {\isachardoublequote}{\isacharprime}a\ bintree{\isachardoublequote}\isamarkupfalse%
   323 %
   324 \begin{isamarkuptext}%
   325 \noindent The datatype induction rule generated here is of the form
   326   \begin{isabelle}%
   327 \ {\isasymlbrakk}P\ Leaf{\isacharsemicolon}\isanewline
   328 \isaindent{\ \ }{\isasymAnd}a\ bintree{\isadigit{1}}\ bintree{\isadigit{2}}{\isachardot}\isanewline
   329 \isaindent{\ \ \ \ \ }{\isasymlbrakk}P\ bintree{\isadigit{1}}{\isacharsemicolon}\ P\ bintree{\isadigit{2}}{\isasymrbrakk}\ {\isasymLongrightarrow}\ P\ {\isacharparenleft}Branch\ a\ bintree{\isadigit{1}}\ bintree{\isadigit{2}}{\isacharparenright}{\isasymrbrakk}\isanewline
   330 \isaindent{\ }{\isasymLongrightarrow}\ P\ bintree%
   331 \end{isabelle}%
   332 \end{isamarkuptext}%
   333 \isamarkuptrue%
   334 %
   335 \end{quotation}
   336 %
   337 \begin{isamarkuptext}%
   338 \noindent The above document output has been produced as follows:
   339 
   340   \begin{ttbox}
   341   text {\ttlbrace}*
   342     The following datatype definition of {\at}{\ttlbrace}text "'a bintree"{\ttrbrace}
   343     models binary trees with nodes being decorated by elements
   344     of type {\at}{\ttlbrace}typ 'a{\ttrbrace}.
   345   *{\ttrbrace}
   346 
   347   datatype 'a bintree =
   348     Leaf | Branch 'a  "'a bintree"  "'a bintree"
   349   \end{ttbox}
   350   \begin{ttbox}
   351   text {\ttlbrace}*
   352     {\ttback}noindent The datatype induction rule generated here is
   353     of the form {\at}{\ttlbrace}thm [display] bintree.induct [no_vars]{\ttrbrace}
   354   *{\ttrbrace}
   355   \end{ttbox}\vspace{-\medskipamount}
   356 
   357   \noindent Here we have augmented the theory by formal comments
   358   (using \isakeyword{text} blocks), the informal parts may again refer
   359   to formal entities by means of ``antiquotations'' (such as
   360   \texttt{\at}\verb,{text "'a bintree"}, or
   361   \texttt{\at}\verb,{typ 'a},), see also \S\ref{sec:doc-prep-text}.%
   362 \end{isamarkuptext}%
   363 \isamarkuptrue%
   364 %
   365 \isamarkupsubsection{Isabelle Sessions%
   366 }
   367 \isamarkuptrue%
   368 %
   369 \begin{isamarkuptext}%
   370 In contrast to the highly interactive mode of Isabelle/Isar theory
   371   development, the document preparation stage essentially works in
   372   batch-mode.  An Isabelle \bfindex{session} consists of a collection
   373   of source files that may contribute to an output document.  Each
   374   session is derived from a single parent, usually an object-logic
   375   image like \texttt{HOL}.  This results in an overall tree structure,
   376   which is reflected by the output location in the file system
   377   (usually rooted at \verb,~/isabelle/browser_info,).
   378 
   379   \medskip The easiest way to manage Isabelle sessions is via
   380   \texttt{isatool mkdir} (generates an initial session source setup)
   381   and \texttt{isatool make} (run sessions controlled by
   382   \texttt{IsaMakefile}).  For example, a new session
   383   \texttt{MySession} derived from \texttt{HOL} may be produced as
   384   follows:
   385 
   386 \begin{verbatim}
   387   isatool mkdir HOL MySession
   388   isatool make
   389 \end{verbatim}
   390 
   391   The \texttt{isatool make} job also informs about the file-system
   392   location of the ultimate results.  The above dry run should be able
   393   to produce some \texttt{document.pdf} (with dummy title, empty table
   394   of contents etc.).  Any failure at this stage usually indicates
   395   technical problems of the {\LaTeX} installation.\footnote{Especially
   396   make sure that \texttt{pdflatex} is present; if in doubt one may
   397   fall back on DVI output by changing \texttt{usedir} options in
   398   \texttt{IsaMakefile} \cite{isabelle-sys}.}
   399 
   400   \medskip The detailed arrangement of the session sources is as
   401   follows.
   402 
   403   \begin{itemize}
   404 
   405   \item Directory \texttt{MySession} holds the required theory files
   406   $T@1$\texttt{.thy}, \dots, $T@n$\texttt{.thy}.
   407 
   408   \item File \texttt{MySession/ROOT.ML} holds appropriate ML commands
   409   for loading all wanted theories, usually just
   410   ``\texttt{use_thy"$T@i$";}'' for any $T@i$ in leaf position of the
   411   dependency graph.
   412 
   413   \item Directory \texttt{MySession/document} contains everything
   414   required for the {\LaTeX} stage; only \texttt{root.tex} needs to be
   415   provided initially.
   416 
   417   The latter file holds appropriate {\LaTeX} code to commence a
   418   document (\verb,\documentclass, etc.), and to include the generated
   419   files $T@i$\texttt{.tex} for each theory.  Isabelle will generate a
   420   file \texttt{session.tex} holding {\LaTeX} commands to include all
   421   generated theory output files in topologically sorted order, so
   422   \verb,\input{session}, in the body of \texttt{root.tex} does the job
   423   in most situations.
   424 
   425   \item \texttt{IsaMakefile} holds appropriate dependencies and
   426   invocations of Isabelle tools to control the batch job.  In fact,
   427   several sessions may be managed by the same \texttt{IsaMakefile}.
   428   See the \emph{Isabelle System Manual} \cite{isabelle-sys} 
   429   for further details, especially on
   430   \texttt{isatool usedir} and \texttt{isatool make}.
   431 
   432   \end{itemize}
   433 
   434   One may now start to populate the directory \texttt{MySession}, and
   435   the file \texttt{MySession/ROOT.ML} accordingly.  The file
   436   \texttt{MySession/document/root.tex} should also be adapted at some
   437   point; the default version is mostly self-explanatory.  Note that
   438   \verb,\isabellestyle, enables fine-tuning of the general appearance
   439   of characters and mathematical symbols (see also
   440   \S\ref{sec:doc-prep-symbols}).
   441 
   442   Especially observe the included {\LaTeX} packages \texttt{isabelle}
   443   (mandatory), \texttt{isabellesym} (required for mathematical
   444   symbols), and the final \texttt{pdfsetup} (provides sane defaults
   445   for \texttt{hyperref}, including URL markup).  All three are
   446   distributed with Isabelle. Further packages may be required in
   447   particular applications, say for unusual mathematical symbols.
   448 
   449   \medskip Any additional files for the {\LaTeX} stage go into the
   450   \texttt{MySession/document} directory as well.  In particular,
   451   adding a file named \texttt{root.bib} causes an automatic run of
   452   \texttt{bibtex} to process a bibliographic database; see also
   453   \texttt{isatool document} \cite{isabelle-sys}.
   454 
   455   \medskip Any failure of the document preparation phase in an
   456   Isabelle batch session leaves the generated sources in their target
   457   location, identified by the accompanying error message.  This lets
   458   you trace {\LaTeX} problems with the generated files at hand.%
   459 \end{isamarkuptext}%
   460 \isamarkuptrue%
   461 %
   462 \isamarkupsubsection{Structure Markup%
   463 }
   464 \isamarkuptrue%
   465 %
   466 \begin{isamarkuptext}%
   467 The large-scale structure of Isabelle documents follows existing
   468   {\LaTeX} conventions, with chapters, sections, subsubsections etc.
   469   The Isar language includes separate \bfindex{markup commands}, which
   470   do not affect the formal meaning of a theory (or proof), but result
   471   in corresponding {\LaTeX} elements.
   472 
   473   There are separate markup commands depending on the textual context:
   474   in header position (just before \isakeyword{theory}), within the
   475   theory body, or within a proof.  The header needs to be treated
   476   specially here, since ordinary theory and proof commands may only
   477   occur \emph{after} the initial \isakeyword{theory} specification.
   478 
   479   \medskip
   480 
   481   \begin{tabular}{llll}
   482   header & theory & proof & default meaning \\\hline
   483     & \commdx{chapter} & & \verb,\chapter, \\
   484   \commdx{header} & \commdx{section} & \commdx{sect} & \verb,\section, \\
   485     & \commdx{subsection} & \commdx{subsect} & \verb,\subsection, \\
   486     & \commdx{subsubsection} & \commdx{subsubsect} & \verb,\subsubsection, \\
   487   \end{tabular}
   488 
   489   \medskip
   490 
   491   From the Isabelle perspective, each markup command takes a single
   492   $text$ argument (delimited by \verb,",~\isa{{\isasymdots}}~\verb,", or
   493   \verb,{,\verb,*,~\isa{{\isasymdots}}~\verb,*,\verb,},).  After stripping any
   494   surrounding white space, the argument is passed to a {\LaTeX} macro
   495   \verb,\isamarkupXYZ, for command \isakeyword{XYZ}.  These macros are
   496   defined in \verb,isabelle.sty, according to the meaning given in the
   497   rightmost column above.
   498 
   499   \medskip The following source fragment illustrates structure markup
   500   of a theory.  Note that {\LaTeX} labels may be included inside of
   501   section headings as well.
   502 
   503   \begin{ttbox}
   504   header {\ttlbrace}* Some properties of Foo Bar elements *{\ttrbrace}
   505 
   506   theory Foo_Bar
   507   import Main
   508   begin
   509 
   510   subsection {\ttlbrace}* Basic definitions *{\ttrbrace}
   511 
   512   consts
   513     foo :: \dots
   514     bar :: \dots
   515 
   516   defs \dots
   517 
   518   subsection {\ttlbrace}* Derived rules *{\ttrbrace}
   519 
   520   lemma fooI: \dots
   521   lemma fooE: \dots
   522 
   523   subsection {\ttlbrace}* Main theorem {\ttback}label{\ttlbrace}sec:main-theorem{\ttrbrace} *{\ttrbrace}
   524 
   525   theorem main: \dots
   526 
   527   end
   528   \end{ttbox}\vspace{-\medskipamount}
   529 
   530   You may occasionally want to change the meaning of markup commands,
   531   say via \verb,\renewcommand, in \texttt{root.tex}.  For example,
   532   \verb,\isamarkupheader, is a good candidate for some tuning.  We
   533   could move it up in the hierarchy to become \verb,\chapter,.
   534 
   535 \begin{verbatim}
   536   \renewcommand{\isamarkupheader}[1]{\chapter{#1}}
   537 \end{verbatim}
   538 
   539   \noindent Now we must change the document class given in
   540   \texttt{root.tex} to something that supports chapters.  A suitable
   541   command is \verb,\documentclass{report},.
   542 
   543   \medskip The {\LaTeX} macro \verb,\isabellecontext, is maintained to
   544   hold the name of the current theory context.  This is particularly
   545   useful for document headings:
   546 
   547 \begin{verbatim}
   548   \renewcommand{\isamarkupheader}[1]
   549   {\chapter{#1}\markright{THEORY~\isabellecontext}}
   550 \end{verbatim}
   551 
   552   \noindent Make sure to include something like
   553   \verb,\pagestyle{headings}, in \texttt{root.tex}; the document
   554   should have more than two pages to show the effect.%
   555 \end{isamarkuptext}%
   556 \isamarkuptrue%
   557 %
   558 \isamarkupsubsection{Formal Comments and Antiquotations \label{sec:doc-prep-text}%
   559 }
   560 \isamarkuptrue%
   561 %
   562 \begin{isamarkuptext}%
   563 Isabelle \bfindex{source comments}, which are of the form
   564   \verb,(,\verb,*,~\isa{{\isasymdots}}~\verb,*,\verb,),, essentially act like
   565   white space and do not really contribute to the content.  They
   566   mainly serve technical purposes to mark certain oddities in the raw
   567   input text.  In contrast, \bfindex{formal comments} are portions of
   568   text that are associated with formal Isabelle/Isar commands
   569   (\bfindex{marginal comments}), or as standalone paragraphs within a
   570   theory or proof context (\bfindex{text blocks}).
   571 
   572   \medskip Marginal comments are part of each command's concrete
   573   syntax \cite{isabelle-ref}; the common form is ``\verb,--,~$text$''
   574   where $text$ is delimited by \verb,",\isa{{\isasymdots}}\verb,", or
   575   \verb,{,\verb,*,~\isa{{\isasymdots}}~\verb,*,\verb,}, as before.  Multiple
   576   marginal comments may be given at the same time.  Here is a simple
   577   example:%
   578 \end{isamarkuptext}%
   579 \isamarkuptrue%
   580 \isacommand{lemma}\ {\isachardoublequote}A\ {\isacharminus}{\isacharminus}{\isachargreater}\ A{\isachardoublequote}\isanewline
   581 \ \ %
   582 \isamarkupcmt{a triviality of propositional logic%
   583 }
   584 \isanewline
   585 \ \ %
   586 \isamarkupcmt{(should not really bother)%
   587 }
   588 \isanewline
   589 \ \ \isamarkupfalse%
   590 \isacommand{by}\ {\isacharparenleft}rule\ impI{\isacharparenright}\ %
   591 \isamarkupcmt{implicit assumption step involved here%
   592 }
   593 \isamarkupfalse%
   594 %
   595 \begin{isamarkuptext}%
   596 \noindent The above output has been produced as follows:
   597 
   598 \begin{verbatim}
   599   lemma "A --> A"
   600     -- "a triviality of propositional logic"
   601     -- "(should not really bother)"
   602     by (rule impI) -- "implicit assumption step involved here"
   603 \end{verbatim}
   604 
   605   From the {\LaTeX} viewpoint, ``\verb,--,'' acts like a markup
   606   command, associated with the macro \verb,\isamarkupcmt, (taking a
   607   single argument).
   608 
   609   \medskip Text blocks are introduced by the commands \bfindex{text}
   610   and \bfindex{txt}, for theory and proof contexts, respectively.
   611   Each takes again a single $text$ argument, which is interpreted as a
   612   free-form paragraph in {\LaTeX} (surrounded by some additional
   613   vertical space).  This behavior may be changed by redefining the
   614   {\LaTeX} environments of \verb,isamarkuptext, or
   615   \verb,isamarkuptxt,, respectively (via \verb,\renewenvironment,) The
   616   text style of the body is determined by \verb,\isastyletext, and
   617   \verb,\isastyletxt,; the default setup uses a smaller font within
   618   proofs.  This may be changed as follows:
   619 
   620 \begin{verbatim}
   621   \renewcommand{\isastyletxt}{\isastyletext}
   622 \end{verbatim}
   623 
   624   \medskip The $text$ part of Isabelle markup commands essentially
   625   inserts \emph{quoted material} into a formal text, mainly for
   626   instruction of the reader.  An \bfindex{antiquotation} is again a
   627   formal object embedded into such an informal portion.  The
   628   interpretation of antiquotations is limited to some well-formedness
   629   checks, with the result being pretty printed to the resulting
   630   document.  Quoted text blocks together with antiquotations provide
   631   an attractive means of referring to formal entities, with good
   632   confidence in getting the technical details right (especially syntax
   633   and types).
   634 
   635   The general syntax of antiquotations is as follows:
   636   \texttt{{\at}{\ttlbrace}$name$ $arguments${\ttrbrace}}, or
   637   \texttt{{\at}{\ttlbrace}$name$ [$options$] $arguments${\ttrbrace}}
   638   for a comma-separated list of options consisting of a $name$ or
   639   \texttt{$name$=$value$} each.  The syntax of $arguments$ depends on
   640   the kind of antiquotation, it generally follows the same conventions
   641   for types, terms, or theorems as in the formal part of a theory.
   642 
   643   \medskip This sentence demonstrates quotations and antiquotations:
   644   \isa{{\isasymlambda}x\ y{\isachardot}\ x} is a well-typed term.
   645 
   646   \medskip\noindent The output above was produced as follows:
   647   \begin{ttbox}
   648 text {\ttlbrace}*
   649   This sentence demonstrates quotations and antiquotations:
   650   {\at}{\ttlbrace}term "%x y. x"{\ttrbrace} is a well-typed term.
   651 *{\ttrbrace}
   652   \end{ttbox}\vspace{-\medskipamount}
   653 
   654   The notational change from the ASCII character~\verb,%, to the
   655   symbol~\isa{{\isasymlambda}} reveals that Isabelle printed this term, after
   656   parsing and type-checking.  Document preparation enables symbolic
   657   output by default.
   658 
   659   \medskip The next example includes an option to modify Isabelle's
   660   \verb,show_types, flag.  The antiquotation
   661   \texttt{{\at}}\verb,{term [show_types] "%x y. x"}, produces the
   662   output \isa{{\isasymlambda}{\isacharparenleft}x{\isasymColon}{\isacharprime}a{\isacharparenright}\ y{\isasymColon}{\isacharprime}b{\isachardot}\ x}.  Type inference has figured
   663   out the most general typings in the present theory context.  Terms
   664   may acquire different typings due to constraints imposed by their
   665   environment; within a proof, for example, variables are given the
   666   same types as they have in the main goal statement.
   667 
   668   \medskip Several further kinds of antiquotations and options are
   669   available \cite{isabelle-sys}.  Here are a few commonly used
   670   combinations:
   671 
   672   \medskip
   673 
   674   \begin{tabular}{ll}
   675   \texttt{\at}\verb,{typ,~$\tau$\verb,}, & print type $\tau$ \\
   676   \texttt{\at}\verb,{term,~$t$\verb,}, & print term $t$ \\
   677   \texttt{\at}\verb,{prop,~$\phi$\verb,}, & print proposition $\phi$ \\
   678   \texttt{\at}\verb,{prop [display],~$\phi$\verb,}, & print large proposition $\phi$ (with linebreaks) \\
   679   \texttt{\at}\verb,{prop [source],~$\phi$\verb,}, & check proposition $\phi$, print its input \\
   680   \texttt{\at}\verb,{thm,~$a$\verb,}, & print fact $a$ \\
   681   \texttt{\at}\verb,{thm,~$a$~\verb,[no_vars]}, & print fact $a$, fixing schematic variables \\
   682   \texttt{\at}\verb,{thm [source],~$a$\verb,}, & check availability of fact $a$, print its name \\
   683   \texttt{\at}\verb,{text,~$s$\verb,}, & print uninterpreted text $s$ \\
   684   \end{tabular}
   685 
   686   \medskip
   687 
   688   Note that \attrdx{no_vars} given above is \emph{not} an
   689   antiquotation option, but an attribute of the theorem argument given
   690   here.  This might be useful with a diagnostic command like
   691   \isakeyword{thm}, too.
   692 
   693   \medskip The \texttt{\at}\verb,{text, $s$\verb,}, antiquotation is
   694   particularly interesting.  Embedding uninterpreted text within an
   695   informal body might appear useless at first sight.  Here the key
   696   virtue is that the string $s$ is processed as Isabelle output,
   697   interpreting Isabelle symbols appropriately.
   698 
   699   For example, \texttt{\at}\verb,{text "\<forall>\<exists>"}, produces \isa{{\isasymforall}{\isasymexists}}, according to the standard interpretation of these symbol
   700   (cf.\ \S\ref{sec:doc-prep-symbols}).  Thus we achieve consistent
   701   mathematical notation in both the formal and informal parts of the
   702   document very easily, independently of the term language of
   703   Isabelle.  Manual {\LaTeX} code would leave more control over the
   704   typesetting, but is also slightly more tedious.%
   705 \end{isamarkuptext}%
   706 \isamarkuptrue%
   707 %
   708 \isamarkupsubsection{Interpretation of Symbols \label{sec:doc-prep-symbols}%
   709 }
   710 \isamarkuptrue%
   711 %
   712 \begin{isamarkuptext}%
   713 As has been pointed out before (\S\ref{sec:syntax-symbols}),
   714   Isabelle symbols are the smallest syntactic entities --- a
   715   straightforward generalization of ASCII characters.  While Isabelle
   716   does not impose any interpretation of the infinite collection of
   717   named symbols, {\LaTeX} documents use canonical glyphs for certain
   718   standard symbols \cite[appendix~A]{isabelle-sys}.
   719 
   720   The {\LaTeX} code produced from Isabelle text follows a simple
   721   scheme.  You can tune the final appearance by redefining certain
   722   macros, say in \texttt{root.tex} of the document.
   723 
   724   \begin{enumerate}
   725 
   726   \item 7-bit ASCII characters: letters \texttt{A\dots Z} and
   727   \texttt{a\dots z} are output directly, digits are passed as an
   728   argument to the \verb,\isadigit, macro, other characters are
   729   replaced by specifically named macros of the form
   730   \verb,\isacharXYZ,.
   731 
   732   \item Named symbols: \verb,\,\verb,<XYZ>, is turned into
   733   \verb,{\isasymXYZ},; note the additional braces.
   734 
   735   \item Named control symbols: \verb,\,\verb,<^XYZ>, is turned into
   736   \verb,\isactrlXYZ,; subsequent symbols may act as arguments if the
   737   control macro is defined accordingly.
   738 
   739   \end{enumerate}
   740 
   741   You may occasionally wish to give new {\LaTeX} interpretations of
   742   named symbols.  This merely requires an appropriate definition of
   743   \verb,\isasymXYZ,, for \verb,\,\verb,<XYZ>, (see
   744   \texttt{isabelle.sty} for working examples).  Control symbols are
   745   slightly more difficult to get right, though.
   746 
   747   \medskip The \verb,\isabellestyle, macro provides a high-level
   748   interface to tune the general appearance of individual symbols.  For
   749   example, \verb,\isabellestyle{it}, uses the italics text style to
   750   mimic the general appearance of the {\LaTeX} math mode; double
   751   quotes are not printed at all.  The resulting quality of typesetting
   752   is quite good, so this should be the default style for work that
   753   gets distributed to a broader audience.%
   754 \end{isamarkuptext}%
   755 \isamarkuptrue%
   756 %
   757 \isamarkupsubsection{Suppressing Output \label{sec:doc-prep-suppress}%
   758 }
   759 \isamarkuptrue%
   760 %
   761 \begin{isamarkuptext}%
   762 By default, Isabelle's document system generates a {\LaTeX} file for
   763   each theory that gets loaded while running the session.  The
   764   generated \texttt{session.tex} will include all of these in order of
   765   appearance, which in turn gets included by the standard
   766   \texttt{root.tex}.  Certainly one may change the order or suppress
   767   unwanted theories by ignoring \texttt{session.tex} and load
   768   individual files directly in \texttt{root.tex}.  On the other hand,
   769   such an arrangement requires additional maintenance whenever the
   770   collection of theories changes.
   771 
   772   Alternatively, one may tune the theory loading process in
   773   \texttt{ROOT.ML} itself: traversal of the theory dependency graph
   774   may be fine-tuned by adding \verb,use_thy, invocations, although
   775   topological sorting still has to be observed.  Moreover, the ML
   776   operator \verb,no_document, temporarily disables document generation
   777   while executing a theory loader command.  Its usage is like this:
   778 
   779 \begin{verbatim}
   780   no_document use_thy "T";
   781 \end{verbatim}
   782 
   783   \medskip Theory output may be suppressed more selectively.  Research
   784   articles and slides usually do not include the formal content in
   785   full.  Delimiting \bfindex{ignored material} by the special source
   786   comments \verb,(,\verb,*,\verb,<,\verb,*,\verb,), and
   787   \verb,(,\verb,*,\verb,>,\verb,*,\verb,), tells the document
   788   preparation system to suppress these parts; the formal checking of
   789   the theory is unchanged, of course.
   790 
   791   In this example, we hide a theory's \isakeyword{theory} and
   792   \isakeyword{end} brackets:
   793 
   794   \medskip
   795 
   796   \begin{tabular}{l}
   797   \verb,(,\verb,*,\verb,<,\verb,*,\verb,), \\
   798   \texttt{theory T} \\
   799   \texttt{import Main} \\
   800   \texttt{begin} \\
   801   \verb,(,\verb,*,\verb,>,\verb,*,\verb,), \\
   802   ~~$\vdots$ \\
   803   \verb,(,\verb,*,\verb,<,\verb,*,\verb,), \\
   804   \texttt{end} \\
   805   \verb,(,\verb,*,\verb,>,\verb,*,\verb,), \\
   806   \end{tabular}
   807 
   808   \medskip
   809 
   810   Text may be suppressed in a fine-grained manner.  We may even hide
   811   vital parts of a proof, pretending that things have been simpler
   812   than they really were.  For example, this ``fully automatic'' proof
   813   is actually a fake:%
   814 \end{isamarkuptext}%
   815 \isamarkuptrue%
   816 \isacommand{lemma}\ {\isachardoublequote}x\ {\isasymnoteq}\ {\isacharparenleft}{\isadigit{0}}{\isacharcolon}{\isacharcolon}int{\isacharparenright}\ {\isasymLongrightarrow}\ {\isadigit{0}}\ {\isacharless}\ x\ {\isacharasterisk}\ x{\isachardoublequote}\isanewline
   817 \ \ \isamarkupfalse%
   818 \isacommand{by}\ {\isacharparenleft}auto{\isacharparenright}\isamarkupfalse%
   819 %
   820 \begin{isamarkuptext}%
   821 \noindent Here the real source of the proof has been as follows:
   822 
   823 \begin{verbatim}
   824   by (auto(*<*)simp add: zero_less_mult_iff(*>*))
   825 \end{verbatim}
   826 %(*
   827 
   828   \medskip Suppressing portions of printed text demands care.  You
   829   should not misrepresent the underlying theory development.  It is
   830   easy to invalidate the visible text by hiding references to
   831   questionable axioms.
   832 
   833 % I removed this because the page overflowed and I disagree a little. TN
   834 %
   835 %  Authentic reports of Isabelle/Isar theories, say as part of a
   836 % library, should suppress nothing.  Other users may need the full
   837 % information for their own derivative work.  If a particular
   838 % formalization appears inadequate for general public coverage, it is
   839 % often more appropriate to think of a better way in the first place.
   840 
   841   \medskip Some technical subtleties of the
   842   \verb,(,\verb,*,\verb,<,\verb,*,\verb,),~\verb,(,\verb,*,\verb,>,\verb,*,\verb,),
   843   elements need to be kept in mind, too --- the system performs few
   844   sanity checks here.  Arguments of markup commands and formal
   845   comments must not be hidden, otherwise presentation fails.  Open and
   846   close parentheses need to be inserted carefully; it is easy to hide
   847   the wrong parts, especially after rearranging the theory text.%
   848 \end{isamarkuptext}%
   849 \isamarkuptrue%
   850 \isamarkupfalse%
   851 \end{isabellebody}%
   852 %%% Local Variables:
   853 %%% mode: latex
   854 %%% TeX-master: "root"
   855 %%% End: