doc-src/IsarRef/syntax.tex
author wenzelm
Thu, 07 Mar 2002 19:04:00 +0100
changeset 13039 cfcc1f6f21df
parent 12976 5cfe2941a5db
child 13048 8b2eb3b78cc3
permissions -rw-r--r--
tuned;
     1 
     2 \chapter{Syntax Primitives}
     3 
     4 The rather generic framework of Isabelle/Isar syntax emerges from three main
     5 syntactic categories: \emph{commands} of the top-level Isar engine (covering
     6 theory and proof elements), \emph{methods} for general goal refinements
     7 (analogous to traditional ``tactics''), and \emph{attributes} for operations
     8 on facts (within a certain context).  Here we give a reference of basic
     9 syntactic entities underlying Isabelle/Isar syntax in a bottom-up manner.
    10 Concrete theory and proof language elements will be introduced later on.
    11 
    12 \medskip
    13 
    14 In order to get started with writing well-formed Isabelle/Isar documents, the
    15 most important aspect to be noted is the difference of \emph{inner} versus
    16 \emph{outer} syntax.  Inner syntax is that of Isabelle types and terms of the
    17 logic, while outer syntax is that of Isabelle/Isar theory sources (including
    18 proofs).  As a general rule, inner syntax entities may occur only as
    19 \emph{atomic entities} within outer syntax.  For example, the string
    20 \texttt{"x + y"} and identifier \texttt{z} are legal term specifications
    21 within a theory, while \texttt{x + y} is not.
    22 
    23 \begin{warn}
    24   Old-style Isabelle theories used to fake parts of the inner syntax of types,
    25   with rather complicated rules when quotes may be omitted.  Despite the minor
    26   drawback of requiring quotes more often, the syntax of Isabelle/Isar is
    27   somewhat simpler and more robust in that respect.
    28 \end{warn}
    29 
    30 Printed theory documents usually omit quotes to gain readability (this is a
    31 matter of {\LaTeX} macro setup, say via \verb,\isabellestyle,, see also
    32 \cite{isabelle-sys}).  Experienced users of Isabelle/Isar may easily
    33 reconstruct the lost technical information, while mere readers need not care
    34 about quotes at all.
    35 
    36 \medskip
    37 
    38 Isabelle/Isar input may contain any number of input termination characters
    39 ``\texttt{;}'' (semicolon) to separate commands explicitly.  This is
    40 particularly useful in interactive shell sessions to make clear where the
    41 current command is intended to end.  Otherwise, the interpreter loop will
    42 continue to issue a secondary prompt ``\verb,#,'' until an end-of-command is
    43 clearly recognized from the input syntax, e.g.\ encounter of the next command
    44 keyword.
    45 
    46 Advanced interfaces such as Proof~General \cite{proofgeneral} do not require
    47 explicit semicolons, the amount of input text is determined automatically by
    48 inspecting the present content of the Emacs text buffer.  In the printed
    49 presentation of Isabelle/Isar documents semicolons are omitted altogether for
    50 readability.
    51 
    52 \begin{warn}
    53   Proof~General requires certain syntax classification tables in order to
    54   achieve properly synchronized interaction with the Isabelle/Isar process.
    55   These tables need to be consistent with the Isabelle version and particular
    56   logic image to be used in a running session (common object-logics may well
    57   change the outer syntax).  The standard setup should work correctly with any
    58   of the ``official'' logic images derived from Isabelle/HOL (including HOLCF
    59   etc.).  Users of alternative logics may need to tell Proof~General
    60   explicitly, e.g.\ by giving an option \verb,-k ZF, (in conjunction with
    61   \verb,-l ZF, to specify the default logic image).
    62 \end{warn}
    63 
    64 \section{Lexical matters}\label{sec:lex-syntax}
    65 
    66 The Isabelle/Isar outer syntax provides token classes as presented below.
    67 Note that some of these coincide (by full intention) with the inner lexical
    68 syntax as presented in \cite{isabelle-ref}.
    69 
    70 \indexoutertoken{ident}\indexoutertoken{longident}\indexoutertoken{symident}
    71 \indexoutertoken{nat}\indexoutertoken{var}\indexoutertoken{typefree}
    72 \indexoutertoken{typevar}\indexoutertoken{string}\indexoutertoken{verbatim}
    73 \begin{matharray}{rcl}
    74   ident & = & letter~quasiletter^* \\
    75   longident & = & ident\verb,.,ident~\dots~ident \\
    76   symident & = & sym^+ ~|~ symbol \\
    77   nat & = & digit^+ \\
    78   var & = & \verb,?,ident ~|~ \verb,?,ident\verb,.,nat \\
    79   typefree & = & \verb,',ident \\
    80   typevar & = & \verb,?,typefree ~|~ \verb,?,typefree\verb,.,nat \\
    81   string & = & \verb,", ~\dots~ \verb,", \\
    82   verbatim & = & \verb,{*, ~\dots~ \verb,*}, \\
    83 \end{matharray}
    84 \begin{matharray}{rcl}
    85   letter & = & \verb,a, ~|~ \dots ~|~ \verb,z, ~|~ \verb,A, ~|~ \dots ~|~ \verb,Z, \\
    86   digit & = & \verb,0, ~|~ \dots ~|~ \verb,9, \\
    87   quasiletter & = & letter ~|~ digit ~|~ \verb,_, ~|~ \verb,', \\
    88   sym & = & \verb,!, ~|~ \verb,#, ~|~ \verb,$, ~|~ \verb,%, ~|~ \verb,&, ~|~  %$
    89    \verb,*, ~|~ \verb,+, ~|~ \verb,-, ~|~ \verb,/, ~|~ \verb,:, ~|~ \\
    90   & & \verb,<, ~|~ \verb,=, ~|~ \verb,>, ~|~ \verb,?, ~|~ \texttt{\at} ~|~
    91   \verb,^, ~|~ \verb,_, ~|~ \verb,`, ~|~ \verb,|, ~|~ \verb,~, \\
    92   symbol & = & {\forall} ~|~ {\exists} ~|~ {\land} ~|~ {\lor} ~|~ \dots
    93 \end{matharray}
    94 
    95 The syntax of $string$ admits any characters, including newlines; ``\verb|"|''
    96 (double-quote) and ``\verb|\|'' (backslash) need to be escaped by a backslash.
    97 Note that ML-style control characters are \emph{not} supported.  The body of
    98 $verbatim$ may consist of any text not containing ``\verb|*}|''; this allows
    99 convenient inclusion of quotes without further escapes.
   100 
   101 Comments take the form \texttt{(*~\dots~*)} and may in principle be nested,
   102 just as in ML.  Note that these are \emph{source} comments only, which are
   103 stripped after lexical analysis of the input.  The Isar document syntax also
   104 provides \emph{formal comments} that are considered as part of the text (see
   105 \S\ref{sec:comments}).
   106 
   107 \begin{warn}
   108   Proof~General does not handle nested comments properly; it is also unable to
   109   keep \verb,(*,\,/\,\verb,{*, and \verb,*),\,/\,\verb,*}, apart, despite
   110   their rather different meaning.  These are inherent problems of Emacs
   111   legacy.  Users should not be overly aggressive about nesting or alternating
   112   these delimiters.
   113 \end{warn}
   114 
   115 \medskip
   116 
   117 Mathematical symbols such as ``$\forall$'' are represented in plain ASCII as
   118 ``\verb,\<forall>,''.  Concerning Isabelle itself, any sequence of the form
   119 \verb,\<,$ident$\verb,>, (or \verb,\\<,$ident$\verb,>,) is a legal symbol.
   120 Display of appropriate glyphs is a matter of front-end tools, say the
   121 user-interface of Proof~General plus the X-Symbol package, or the {\LaTeX}
   122 macro setup of document output.  A list of predefined Isabelle symbols is
   123 given in \cite[appendix~A]{isabelle-sys}.
   124 
   125 
   126 \section{Common syntax entities}
   127 
   128 Subsequently, we introduce several basic syntactic entities, such as names,
   129 terms, and theorem specifications, which have been factored out of the actual
   130 Isar language elements to be described later.
   131 
   132 Note that some of the basic syntactic entities introduced below (e.g.\ 
   133 \railqtoken{name}) act much like tokens rather than plain nonterminals (e.g.\ 
   134 \railnonterm{sort}), especially for the sake of error messages.  E.g.\ syntax
   135 elements like $\CONSTS$ referring to \railqtoken{name} or \railqtoken{type}
   136 would really report a missing name or type rather than any of the constituent
   137 primitive tokens such as \railtoken{ident} or \railtoken{string}.
   138 
   139 
   140 \subsection{Names}
   141 
   142 Entity \railqtoken{name} usually refers to any name of types, constants,
   143 theorems etc.\ that are to be \emph{declared} or \emph{defined} (so qualified
   144 identifiers are excluded here).  Quoted strings provide an escape for
   145 non-identifier names or those ruled out by outer syntax keywords (e.g.\ 
   146 \verb|"let"|).  Already existing objects are usually referenced by
   147 \railqtoken{nameref}.
   148 
   149 \indexoutertoken{name}\indexoutertoken{parname}\indexoutertoken{nameref}
   150 \indexoutertoken{int}
   151 \begin{rail}
   152   name: ident | symident | string | nat
   153   ;
   154   parname: '(' name ')'
   155   ;
   156   nameref: name | longident
   157   ;
   158   int: nat | '-' nat
   159   ;
   160 \end{rail}
   161 
   162 
   163 \subsection{Comments}\label{sec:comments}
   164 
   165 Large chunks of plain \railqtoken{text} are usually given
   166 \railtoken{verbatim}, i.e.\ enclosed in \verb|{*|~\dots~\verb|*}|.  For
   167 convenience, any of the smaller text units conforming to \railqtoken{nameref}
   168 are admitted as well.  A marginal \railnonterm{comment} is of the form
   169 \texttt{--} \railqtoken{text}.  Any number of these may occur within
   170 Isabelle/Isar commands.
   171 
   172 \indexoutertoken{text}\indexouternonterm{comment}
   173 \begin{rail}
   174   text: verbatim | nameref
   175   ;
   176   comment: '--' text
   177   ;
   178 \end{rail}
   179 
   180 
   181 \subsection{Type classes, sorts and arities}
   182 
   183 Classes are specified by plain names.  Sorts have a very simple inner syntax,
   184 which is either a single class name $c$ or a list $\{c@1, \dots, c@n\}$
   185 referring to the intersection of these classes.  The syntax of type arities is
   186 given directly at the outer level.
   187 
   188 \railalias{subseteq}{\isasymsubseteq}
   189 \railterm{subseteq}
   190 
   191 \indexouternonterm{sort}\indexouternonterm{arity}\indexouternonterm{simplearity}
   192 \indexouternonterm{classdecl}
   193 \begin{rail}
   194   classdecl: name (('<' | subseteq) (nameref + ','))?
   195   ;
   196   sort: nameref
   197   ;
   198   arity: ('(' (sort + ',') ')')? sort
   199   ;
   200   simplearity: ('(' (sort + ',') ')')? nameref
   201   ;
   202 \end{rail}
   203 
   204 
   205 \subsection{Types and terms}\label{sec:types-terms}
   206 
   207 The actual inner Isabelle syntax, that of types and terms of the logic, is far
   208 too sophisticated in order to be modelled explicitly at the outer theory
   209 level.  Basically, any such entity has to be quoted to turn it into a single
   210 token (the parsing and type-checking is performed internally later).  For
   211 convenience, a slightly more liberal convention is adopted: quotes may be
   212 omitted for any type or term that is already atomic at the outer level.  For
   213 example, one may just write \texttt{x} instead of \texttt{"x"}.  Note that
   214 symbolic identifiers (e.g.\ \texttt{++} or $\forall$) are available as well,
   215 provided these have not been superseded by commands or other keywords already
   216 (e.g.\ \texttt{=} or \texttt{+}).
   217 
   218 \indexoutertoken{type}\indexoutertoken{term}\indexoutertoken{prop}
   219 \begin{rail}
   220   type: nameref | typefree | typevar
   221   ;
   222   term: nameref | var
   223   ;
   224   prop: term
   225   ;
   226 \end{rail}
   227 
   228 Positional instantiations are indicated by giving a sequence of terms, or the
   229 placeholder ``$\_$'' (underscore), which means to skip a position.
   230 
   231 \indexoutertoken{inst}\indexoutertoken{insts}
   232 \begin{rail}
   233   inst: underscore | term
   234   ;
   235   insts: (inst *)
   236   ;
   237 \end{rail}
   238 
   239 Type declarations and definitions usually refer to \railnonterm{typespec} on
   240 the left-hand side.  This models basic type constructor application at the
   241 outer syntax level.  Note that only plain postfix notation is available here,
   242 but no infixes.
   243 
   244 \indexouternonterm{typespec}
   245 \begin{rail}
   246   typespec: (() | typefree | '(' ( typefree + ',' ) ')') name
   247   ;
   248 \end{rail}
   249 
   250 
   251 \subsection{Mixfix annotations}
   252 
   253 Mixfix annotations specify concrete \emph{inner} syntax of Isabelle types and
   254 terms.  Some commands such as $\TYPES$ (see \S\ref{sec:types-pure}) admit
   255 infixes only, while $\CONSTS$ (see \S\ref{sec:consts}) and
   256 $\isarkeyword{syntax}$ (see \S\ref{sec:syn-trans}) support the full range of
   257 general mixfixes and binders.
   258 
   259 \indexouternonterm{infix}\indexouternonterm{mixfix}\indexouternonterm{structmixfix}
   260 \begin{rail}
   261   infix: '(' ('infix' | 'infixl' | 'infixr') string? nat ')'
   262   ;
   263   mixfix: infix | '(' string prios? nat? ')' | '(' 'binder' string prios? nat ')'
   264   ;
   265   structmixfix: mixfix | '(' 'structure' ')'
   266   ;
   267 
   268   prios: '[' (nat + ',') ']'
   269   ;
   270 \end{rail}
   271 
   272 Here the \railtoken{string} specifications refer to the actual mixfix template
   273 (see also \cite{isabelle-ref}), which may include literal text, spacing,
   274 blocks, and arguments (denoted by ``$_$''); the special symbol \verb,\<index>,
   275 (printed as ``\i'') represents an index argument that specifies an implicit
   276 structure reference (see also \S\ref{sec:locale}).  Infix and binder
   277 declarations provide common abbreviations for particular mixfix declarations.
   278 So in practice, mixfix templates mostly degenerate to literal text for
   279 concrete syntax, such as ``\verb,++,'' for an infix symbol, or ``\verb,++,\i''
   280 for an infix of an implicit structure.
   281 
   282 
   283 
   284 \subsection{Proof methods}\label{sec:syn-meth}
   285 
   286 Proof methods are either basic ones, or expressions composed of methods via
   287 ``\texttt{,}'' (sequential composition), ``\texttt{|}'' (alternative choices),
   288 ``\texttt{?}'' (try), ``\texttt{+}'' (repeat at least once).  In practice,
   289 proof methods are usually just a comma separated list of
   290 \railqtoken{nameref}~\railnonterm{args} specifications.  Note that parentheses
   291 may be dropped for single method specifications (with no arguments).
   292 
   293 \indexouternonterm{method}
   294 \begin{rail}
   295   method: (nameref | '(' methods ')') (() | '?' | '+')
   296   ;
   297   methods: (nameref args | method) + (',' | '|')
   298   ;
   299 \end{rail}
   300 
   301 Proper use of Isar proof methods does \emph{not} involve goal addressing.
   302 Nevertheless, specifying goal ranges may occasionally come in handy in
   303 emulating tactic scripts.  Note that $[n-]$ refers to all goals, starting from
   304 $n$.  All goals may be specified by $[!]$, which is the same as $[1-]$.
   305 
   306 \indexouternonterm{goalspec}
   307 \begin{rail}
   308   goalspec: '[' (nat '-' nat | nat '-' | nat | '!' ) ']'
   309   ;
   310 \end{rail}
   311 
   312 
   313 \subsection{Attributes and theorems}\label{sec:syn-att}
   314 
   315 Attributes (and proof methods, see \S\ref{sec:syn-meth}) have their own
   316 ``semi-inner'' syntax, in the sense that input conforming to
   317 \railnonterm{args} below is parsed by the attribute a second time.  The
   318 attribute argument specifications may be any sequence of atomic entities
   319 (identifiers, strings etc.), or properly bracketed argument lists.  Below
   320 \railqtoken{atom} refers to any atomic entity, including any
   321 \railtoken{keyword} conforming to \railtoken{symident}.
   322 
   323 \indexoutertoken{atom}\indexouternonterm{args}\indexouternonterm{attributes}
   324 \begin{rail}
   325   atom: nameref | typefree | typevar | var | nat | keyword
   326   ;
   327   arg: atom | '(' args ')' | '[' args ']'
   328   ;
   329   args: arg *
   330   ;
   331   attributes: '[' (nameref args * ',') ']'
   332   ;
   333 \end{rail}
   334 
   335 Theorem specifications come in several flavors: \railnonterm{axmdecl} and
   336 \railnonterm{thmdecl} usually refer to axioms, assumptions or results of goal
   337 statements, while \railnonterm{thmdef} collects lists of existing theorems.
   338 Existing theorems are given by \railnonterm{thmref} and \railnonterm{thmrefs},
   339 the former requires an actual singleton result.  Any of these theorem
   340 specifications may include lists of attributes both on the left and right hand
   341 sides; attributes are applied to any immediately preceding fact.  If names are
   342 omitted, the theorems are not stored within the theorem database of the theory
   343 or proof context; any given attributes are still applied, though.
   344 
   345 \indexouternonterm{thmdecl}\indexouternonterm{axmdecl}
   346 \indexouternonterm{thmdef}\indexouternonterm{thmrefs}
   347 \begin{rail}
   348   axmdecl: name attributes? ':'
   349   ;
   350   thmdecl: thmbind ':'
   351   ;
   352   thmdef: thmbind '='
   353   ;
   354   thmref: nameref attributes?
   355   ;
   356   thmrefs: thmref +
   357   ;
   358 
   359   thmbind: name attributes | name | attributes
   360   ;
   361 \end{rail}
   362 
   363 
   364 \subsection{Term patterns and declarations}\label{sec:term-decls}
   365 
   366 Wherever explicit propositions (or term fragments) occur in a proof text,
   367 casual binding of schematic term variables may be given specified via patterns
   368 of the form ``$\ISS{p@1\;\dots}{p@n}$''.  There are separate versions
   369 available for \railqtoken{term}s and \railqtoken{prop}s.  The latter provides
   370 a $\CONCLNAME$ part with patterns referring the (atomic) conclusion of a rule.
   371 
   372 \indexouternonterm{termpat}\indexouternonterm{proppat}
   373 \begin{rail}
   374   termpat: '(' ('is' term +) ')'
   375   ;
   376   proppat: '(' (('is' prop +) | 'concl' ('is' prop +) | ('is' prop +) 'concl' ('is' prop +)) ')'
   377   ;
   378 \end{rail}
   379 
   380 Declarations of local variables $x :: \tau$ and logical propositions $a :
   381 \phi$ represent different views on the same principle of introducing a local
   382 scope.  In practice, one may usually omit the typing of $vars$ (due to
   383 type-inference), and the naming of propositions (due to implicit references of
   384 current facts).  In any case, Isar proof elements usually admit to introduce
   385 multiple such items simultaneously.
   386 
   387 \indexouternonterm{vars}\indexouternonterm{props}
   388 \begin{rail}
   389   vars: (name+) ('::' type)?
   390   ;
   391   props: thmdecl? (prop proppat? +)
   392   ;
   393 \end{rail}
   394 
   395 The treatment of multiple declarations corresponds to the complementary focus
   396 of $vars$ versus $props$: in ``$x@1~\dots~x@n :: \tau$'' the typing refers to
   397 all variables, while in $a\colon \phi@1~\dots~\phi@n$ the naming refers to all
   398 propositions collectively.  Isar language elements that refer to $vars$ or
   399 $props$ typically admit separate typings or namings via another level of
   400 iteration, with explicit $\AND$ separators; e.g.\ see $\FIXNAME$ and
   401 $\ASSUMENAME$ in \S\ref{sec:proof-context}.
   402 
   403 
   404 \subsection{Antiquotations}\label{sec:antiq}
   405 
   406 \begin{matharray}{rcl}
   407   thm & : & \isarantiq \\
   408   prop & : & \isarantiq \\
   409   term & : & \isarantiq \\
   410   typ & : & \isarantiq \\
   411   text & : & \isarantiq \\
   412   goals & : & \isarantiq \\
   413   subgoals & : & \isarantiq \\
   414 \end{matharray}
   415 
   416 The text body of formal comments (see also \S\ref{sec:comments}) may contain
   417 antiquotations of logical entities, such as theorems, terms and types, which
   418 are to be presented in the final output produced by the Isabelle document
   419 preparation system (see also \S\ref{sec:document-prep}).
   420 
   421 Thus embedding of
   422 ``\texttt{{\at}{\ttlbrace}term~[show_types]~"f(x)~=~a~+~x"{\ttrbrace}}''
   423 within a text block would cause
   424 \isa{(f{\isasymColon}'a~{\isasymRightarrow}~'a)~(x{\isasymColon}'a)~=~(a{\isasymColon}'a)~+~x}
   425 to appear in the final {\LaTeX} document.  Also note that theorem
   426 antiquotations may involve attributes as well.  For example,
   427 \texttt{{\at}{\ttlbrace}thm~sym~[no_vars]{\ttrbrace}} would print the
   428 statement where all schematic variables have been replaced by fixed ones,
   429 which are easier to read.
   430 
   431 \indexisarant{thm}\indexisarant{prop}\indexisarant{term}
   432 \indexisarant{typ}\indexisarant{text}\indexisarant{goals}\indexisarant{subgoals}
   433 \begin{rail}
   434   atsign lbrace antiquotation rbrace
   435   ;
   436 
   437   antiquotation:
   438     'thm' options thmrefs |
   439     'prop' options prop |
   440     'term' options term |
   441     'typ' options type |
   442     'text' options name |
   443     'goals' options |
   444     'subgoals' options
   445   ;
   446   options: '[' (option * ',') ']'
   447   ;
   448   option: name | name '=' name
   449   ;
   450 \end{rail}
   451 
   452 Note that the syntax of antiquotations may \emph{not} include source comments
   453 \texttt{(*~\dots~*)} or verbatim text \verb|{*|~\dots~\verb|*}|.
   454 
   455 \begin{descr}
   456   
   457 \item [$\at\{thm~\vec a\}$] prints theorems $\vec a$. Note that attribute
   458   specifications may be included as well (see also \S\ref{sec:syn-att}); the
   459   $no_vars$ operation (see \S\ref{sec:misc-meth-att}) would be particularly
   460   useful to suppress printing of schematic variables.
   461 
   462 \item [$\at\{prop~\phi\}$] prints a well-typed proposition $\phi$.
   463 
   464 \item [$\at\{term~t\}$] prints a well-typed term $t$.
   465 
   466 \item [$\at\{typ~\tau\}$] prints a well-formed type $\tau$.
   467   
   468 \item [$\at\{text~s\}$] prints uninterpreted source text $s$.  This is
   469   particularly useful to print portions of text according to the Isabelle
   470   {\LaTeX} output style, without demanding well-formedness (e.g.\ small pieces
   471   of terms that should not be parsed or type-checked yet).
   472   
   473 \item [$\at\{goals\}$] prints the current \emph{dynamic} goal state.  This is
   474   mainly for support of tactic-emulation scripts within Isar --- presentation
   475   of goal states does not conform to actual human-readable proof documents.
   476   Please do not include goal states into document output unless you really
   477   know what you are doing!
   478 
   479 \item [$\at\{subgoals\}$] behaves almost like $goals$, except that it does not
   480   print the main goal.
   481 
   482 \end{descr}
   483 
   484 \medskip
   485 
   486 The following options are available to tune the output.  Note that most of
   487 these coincide with ML flags of the same names (see also \cite{isabelle-ref}).
   488 \begin{descr}
   489 \item[$show_types = bool$ and $show_sorts = bool$] control printing of
   490   explicit type and sort constraints.
   491 \item[$long_names = bool$] forces names of types and constants etc.\ to be
   492   printed in their fully qualified internal form.
   493 \item[$eta_contract = bool$] prints terms in $\eta$-contracted form.
   494 \item[$display = bool$] indicates if the text is to be output as multi-line
   495   ``display material'', rather than a small piece of text without line breaks
   496   (which is the default).
   497 \item[$quotes = bool$] indicates if the output should be enclosed in double
   498   quotes.
   499 \item[$mode = name$] adds $name$ to the print mode to be used for presentation
   500   (see also \cite{isabelle-ref}).  Note that the standard setup for {\LaTeX}
   501   output is already present by default, including the modes ``$latex$'',
   502   ``$xsymbols$'', ``$symbols$''.
   503 \item[$margin = nat$ and $indent = nat$] change the margin or indentation for
   504   pretty printing of display material.
   505 \item[$source = bool$] prints the source text of the antiquotation arguments,
   506   rather than the actual value.  Note that this does not affect
   507   well-formedness checks of $thm$, $term$, etc. (only the $text$ antiquotation
   508   admits arbitrary output).
   509 \item[$goals_limit = nat$] determines the maximum number of goals to be
   510   printed.
   511 \end{descr}
   512 
   513 For boolean flags, ``$name = true$'' may be abbreviated as ``$name$''.  All of
   514 the above flags are disabled by default, unless changed from ML.
   515 
   516 \medskip Note that antiquotations do not only spare the author from tedious
   517 typing of logical entities, but also achieve some degree of
   518 consistency-checking of informal explanations with formal developments:
   519 well-formedness of terms and types with respect to the current theory or proof
   520 context is ensured here.
   521 
   522 %%% Local Variables: 
   523 %%% mode: latex
   524 %%% TeX-master: "isar-ref"
   525 %%% End: