doc-src/IsarRef/syntax.tex
author wenzelm
Sat, 01 Jul 2000 20:01:36 +0200
changeset 9234 0013b2aa98dd
parent 9233 8c8399b9ecaa
child 9601 69d2fb3dc4c6
permissions -rw-r--r--
IGNORE last log message!
added antiquote options "long_names", "eta_contract";
wenzelm@7046
     1
wenzelm@7895
     2
\chapter{Isar Syntax Primitives}
wenzelm@7046
     3
wenzelm@7315
     4
We give a complete reference of all basic syntactic entities underlying the
wenzelm@7335
     5
Isabelle/Isar document syntax.  Actual theory and proof commands will be
wenzelm@7335
     6
introduced later on.
wenzelm@7134
     7
wenzelm@7315
     8
\medskip
wenzelm@7046
     9
wenzelm@7315
    10
In order to get started with writing well-formed Isabelle/Isar documents, the
wenzelm@7315
    11
most important aspect to be noted is the difference of \emph{inner} versus
wenzelm@7315
    12
\emph{outer} syntax.  Inner syntax is that of Isabelle types and terms of the
wenzelm@7895
    13
logic, while outer syntax is that of Isabelle/Isar theories (including
wenzelm@7895
    14
proofs).  As a general rule, inner syntax entities may occur only as
wenzelm@7895
    15
\emph{atomic entities} within outer syntax.  For example, the string
wenzelm@7895
    16
\texttt{"x + y"} and identifier \texttt{z} are legal term specifications
wenzelm@7895
    17
within a theory, while \texttt{x + y} is not.
wenzelm@7315
    18
wenzelm@7315
    19
\begin{warn}
wenzelm@8378
    20
  Note that classic Isabelle theories used to fake parts of the inner syntax
wenzelm@8378
    21
  of types, with rather complicated rules when quotes may be omitted.  Despite
wenzelm@7981
    22
  the minor drawback of requiring quotes more often, the syntax of
wenzelm@8548
    23
  Isabelle/Isar is much simpler and more robust in that respect.
wenzelm@7315
    24
\end{warn}
wenzelm@7315
    25
wenzelm@7466
    26
\medskip
wenzelm@7466
    27
wenzelm@7466
    28
Another notable point is proper input termination.  Proof~General demands any
wenzelm@7466
    29
command to be terminated by ``\texttt{;}''
wenzelm@7466
    30
(semicolon)\index{semicolon}\index{*;}.  As far as plain Isabelle/Isar is
wenzelm@7981
    31
concerned, commands may be directly run together, though.  In the presentation
wenzelm@7981
    32
of Isabelle/Isar documents, semicolons are omitted in order to gain
wenzelm@7981
    33
readability.
wenzelm@7466
    34
wenzelm@7315
    35
wenzelm@7315
    36
\section{Lexical matters}\label{sec:lex-syntax}
wenzelm@7315
    37
wenzelm@7315
    38
The Isabelle/Isar outer syntax provides token classes as presented below.
wenzelm@7895
    39
Note that some of these coincide (by full intention) with the inner lexical
wenzelm@7895
    40
syntax as presented in \cite{isabelle-ref}.  These different levels of syntax
wenzelm@7895
    41
should not be confused, though.
wenzelm@7315
    42
wenzelm@7335
    43
%FIXME keyword, command
wenzelm@7315
    44
\begin{matharray}{rcl}
wenzelm@7315
    45
  ident & = & letter~quasiletter^* \\
wenzelm@7315
    46
  longident & = & ident\verb,.,ident~\dots~ident \\
wenzelm@8548
    47
  symident & = & sym^+ ~|~ symbol \\
wenzelm@7315
    48
  nat & = & digit^+ \\
wenzelm@7315
    49
  var & = & \verb,?,ident ~|~ \verb,?,ident\verb,.,nat \\
wenzelm@7315
    50
  typefree & = & \verb,',ident \\
wenzelm@7315
    51
  typevar & = & \verb,?,typefree ~|~ \verb,?,typefree\verb,.,nat \\
wenzelm@7315
    52
  string & = & \verb,", ~\dots~ \verb,", \\
wenzelm@7319
    53
  verbatim & = & \verb,{*, ~\dots~ \verb,*}, \\
wenzelm@7319
    54
\end{matharray}
wenzelm@7319
    55
\begin{matharray}{rcl}
wenzelm@7315
    56
  letter & = & \verb,a, ~|~ \dots ~|~ \verb,z, ~|~ \verb,A, ~|~ \dots ~|~ \verb,Z, \\
wenzelm@7315
    57
  digit & = & \verb,0, ~|~ \dots ~|~ \verb,9, \\
wenzelm@7315
    58
  quasiletter & = & letter ~|~ digit ~|~ \verb,_, ~|~ \verb,', \\
wenzelm@7315
    59
  sym & = & \verb,!, ~|~ \verb,#, ~|~ \verb,$, ~|~ \verb,%, ~|~ \verb,&, ~|~  %$
wenzelm@7319
    60
   \verb,*, ~|~ \verb,+, ~|~ \verb,-, ~|~ \verb,/, ~|~ \verb,:, ~|~
wenzelm@7319
    61
   \verb,<, ~|~ \verb,=, ~|~ \verb,>, ~|~ \verb,?, ~|~ \mathtt{\at} ~|~ \\
wenzelm@7319
    62
  & & \verb,^, ~|~ \verb,_, ~|~ \verb,`, ~|~ \verb,|, ~|~ \verb,~, \\
wenzelm@8548
    63
  symbol & = & {\forall} ~|~ {\exists} ~|~ \dots
wenzelm@7315
    64
\end{matharray}
wenzelm@7315
    65
wenzelm@7315
    66
The syntax of \texttt{string} admits any characters, including newlines;
wenzelm@7895
    67
``\verb|"|'' (double-quote) and ``\verb|\|'' (backslash) have to be escaped by
wenzelm@9051
    68
a backslash; newlines need not be escaped.  Note that ML-style control
wenzelm@9051
    69
characters are \emph{not} supported.  The body of \texttt{verbatim} may
wenzelm@9051
    70
consist of any text not containing ``\verb|*}|''.
wenzelm@7315
    71
wenzelm@7895
    72
Comments take the form \texttt{(*~\dots~*)} and may be
wenzelm@8378
    73
nested\footnote{Proof~General may occasionally get confused by nested
wenzelm@8378
    74
  comments.}, just as in ML. Note that these are \emph{source} comments only,
wenzelm@8378
    75
which are stripped after lexical analysis of the input.  The Isar document
wenzelm@8378
    76
syntax also provides \emph{formal comments} that are actually part of the text
wenzelm@8378
    77
(see \S\ref{sec:comments}).
wenzelm@7315
    78
wenzelm@7046
    79
wenzelm@7046
    80
\section{Common syntax entities}
wenzelm@7046
    81
wenzelm@7335
    82
Subsequently, we introduce several basic syntactic entities, such as names,
wenzelm@7895
    83
terms, and theorem specifications, which have been factored out of the actual
wenzelm@7895
    84
Isar language elements to be described later.
wenzelm@7134
    85
wenzelm@7981
    86
Note that some of the basic syntactic entities introduced below (e.g.\ 
wenzelm@7895
    87
\railqtoken{name}) act much like tokens rather than plain nonterminals (e.g.\ 
wenzelm@7895
    88
\railnonterm{sort}), especially for the sake of error messages.  E.g.\ syntax
wenzelm@7895
    89
elements such as $\CONSTS$ referring to \railqtoken{name} or \railqtoken{type}
wenzelm@7895
    90
would really report a missing name or type rather than any of the constituent
wenzelm@7895
    91
primitive tokens such as \railtoken{ident} or \railtoken{string}.
wenzelm@7046
    92
wenzelm@7050
    93
wenzelm@7050
    94
\subsection{Names}
wenzelm@7050
    95
wenzelm@7134
    96
Entity \railqtoken{name} usually refers to any name of types, constants,
wenzelm@7167
    97
theorems etc.\ that are to be \emph{declared} or \emph{defined} (so qualified
wenzelm@8548
    98
identifiers are excluded here).  Quoted strings provide an escape for
wenzelm@7134
    99
non-identifier names or those ruled out by outer syntax keywords (e.g.\ 
wenzelm@7134
   100
\verb|"let"|).  Already existing objects are usually referenced by
wenzelm@7134
   101
\railqtoken{nameref}.
wenzelm@7050
   102
wenzelm@7141
   103
\indexoutertoken{name}\indexoutertoken{parname}\indexoutertoken{nameref}
wenzelm@7046
   104
\begin{rail}
wenzelm@8145
   105
  name: ident | symident | string | nat
wenzelm@7046
   106
  ;
wenzelm@7167
   107
  parname: '(' name ')'
wenzelm@7141
   108
  ;
wenzelm@7167
   109
  nameref: name | longident
wenzelm@7046
   110
  ;
wenzelm@7046
   111
\end{rail}
wenzelm@7046
   112
wenzelm@7050
   113
wenzelm@7315
   114
\subsection{Comments}\label{sec:comments}
wenzelm@7046
   115
wenzelm@7167
   116
Large chunks of plain \railqtoken{text} are usually given
wenzelm@7895
   117
\railtoken{verbatim}, i.e.\ enclosed in \verb|{*|~\dots~\verb|*}|.  For
wenzelm@7175
   118
convenience, any of the smaller text units conforming to \railqtoken{nameref}
wenzelm@8102
   119
are admitted as well.  Almost any of the Isar commands may be annotated by
wenzelm@7466
   120
marginal \railnonterm{comment} of the form \texttt{--} \railqtoken{text}.
wenzelm@7466
   121
Note that the latter kind of comment is actually part of the language, while
wenzelm@7895
   122
source level comments \verb|(*|~\dots~\verb|*)| are stripped at the lexical
wenzelm@7466
   123
level.  A few commands such as $\PROOFNAME$ admit additional markup with a
wenzelm@7466
   124
``level of interest'': \texttt{\%} followed by an optional number $n$ (default
wenzelm@7466
   125
$n = 1$) indicates that the respective part of the document becomes $n$ levels
wenzelm@7466
   126
more obscure; \texttt{\%\%} means that interest drops by $\infty$ --- abandon
wenzelm@7466
   127
every hope, who enter here.
wenzelm@7050
   128
wenzelm@7050
   129
\indexoutertoken{text}\indexouternonterm{comment}\indexouternonterm{interest}
wenzelm@7046
   130
\begin{rail}
wenzelm@7167
   131
  text: verbatim | nameref
wenzelm@7050
   132
  ;
wenzelm@8102
   133
  comment: ('--' text +)
wenzelm@7046
   134
  ;
wenzelm@7167
   135
  interest: percent nat? | ppercent
wenzelm@7046
   136
  ;
wenzelm@7046
   137
\end{rail}
wenzelm@7046
   138
wenzelm@7046
   139
wenzelm@7335
   140
\subsection{Type classes, sorts and arities}
wenzelm@7046
   141
wenzelm@8896
   142
Classes are specified by plain names.  Sorts have a very simple inner syntax,
wenzelm@8896
   143
which is either a single class name $c$ or a list $\{c@1, \dots, c@n\}$
wenzelm@8896
   144
referring to the intersection of these classes.  The syntax of type arities is
wenzelm@8896
   145
given directly at the outer level.
wenzelm@7050
   146
wenzelm@7050
   147
\indexouternonterm{sort}\indexouternonterm{arity}\indexouternonterm{simplearity}
wenzelm@7135
   148
\indexouternonterm{classdecl}
wenzelm@7046
   149
\begin{rail}
wenzelm@7321
   150
  classdecl: name ('<' (nameref + ','))?
wenzelm@7046
   151
  ;
wenzelm@8896
   152
  sort: nameref
wenzelm@7046
   153
  ;
wenzelm@7167
   154
  arity: ('(' (sort + ',') ')')? sort
wenzelm@7046
   155
  ;
wenzelm@7167
   156
  simplearity: ('(' (sort + ',') ')')? nameref
wenzelm@7167
   157
  ;
wenzelm@7046
   158
\end{rail}
wenzelm@7046
   159
wenzelm@7046
   160
wenzelm@7167
   161
\subsection{Types and terms}\label{sec:types-terms}
wenzelm@7046
   162
wenzelm@7167
   163
The actual inner Isabelle syntax, that of types and terms of the logic, is far
wenzelm@7895
   164
too sophisticated in order to be modelled explicitly at the outer theory
wenzelm@8548
   165
level.  Basically, any such entity has to be quoted to turn it into a single
wenzelm@8548
   166
token (the parsing and type-checking is performed internally later).  For
wenzelm@8548
   167
convenience, a slightly more liberal convention is adopted: quotes may be
wenzelm@7895
   168
omitted for any type or term that is already \emph{atomic} at the outer level.
wenzelm@7895
   169
For example, one may write just \texttt{x} instead of \texttt{"x"}.  Note that
wenzelm@8548
   170
symbolic identifiers (e.g.\ \texttt{++} or $\forall$) are available as well,
wenzelm@8548
   171
provided these are not superseded by commands or keywords (e.g.\ \texttt{+}).
wenzelm@7050
   172
wenzelm@7050
   173
\indexoutertoken{type}\indexoutertoken{term}\indexoutertoken{prop}
wenzelm@7046
   174
\begin{rail}
wenzelm@7167
   175
  type: nameref | typefree | typevar
wenzelm@7050
   176
  ;
wenzelm@8593
   177
  term: nameref | var
wenzelm@7050
   178
  ;
wenzelm@7167
   179
  prop: term
wenzelm@7050
   180
  ;
wenzelm@7046
   181
\end{rail}
wenzelm@7046
   182
wenzelm@8690
   183
Positional instantiations are indicated by giving a sequence of terms, or the
wenzelm@8690
   184
placeholder ``$\_$'' (underscore), which means to skip a position.
wenzelm@8690
   185
wenzelm@8690
   186
\indexoutertoken{inst}\indexoutertoken{insts}
wenzelm@8690
   187
\begin{rail}
wenzelm@8690
   188
  inst: underscore | term
wenzelm@8690
   189
  ;
wenzelm@8690
   190
  insts: (inst *)
wenzelm@8690
   191
  ;
wenzelm@8690
   192
\end{rail}
wenzelm@8690
   193
wenzelm@7167
   194
Type declarations and definitions usually refer to \railnonterm{typespec} on
wenzelm@7167
   195
the left-hand side.  This models basic type constructor application at the
wenzelm@7167
   196
outer syntax level.  Note that only plain postfix notation is available here,
wenzelm@7167
   197
but no infixes.
wenzelm@7050
   198
wenzelm@7050
   199
\indexouternonterm{typespec}
wenzelm@7050
   200
\begin{rail}
wenzelm@7167
   201
  typespec: (() | typefree | '(' ( typefree + ',' ) ')') name
wenzelm@7050
   202
  ;
wenzelm@7050
   203
\end{rail}
wenzelm@7050
   204
wenzelm@7050
   205
wenzelm@7315
   206
\subsection{Term patterns}\label{sec:term-pats}
wenzelm@7050
   207
wenzelm@7895
   208
Assumptions and goal statements usually admit casual binding of schematic term
wenzelm@7981
   209
variables by giving (optional) patterns of the form $\ISS{p@1\;\dots}{p@n}$.
wenzelm@7167
   210
There are separate versions available for \railqtoken{term}s and
wenzelm@7167
   211
\railqtoken{prop}s.  The latter provides a $\CONCLNAME$ part with patterns
wenzelm@7167
   212
referring the (atomic) conclusion of a rule.
wenzelm@7050
   213
wenzelm@7050
   214
\indexouternonterm{termpat}\indexouternonterm{proppat}
wenzelm@7050
   215
\begin{rail}
wenzelm@7167
   216
  termpat: '(' ('is' term +) ')'
wenzelm@7050
   217
  ;
wenzelm@7167
   218
  proppat: '(' (('is' prop +) | 'concl' ('is' prop +) | ('is' prop +) 'concl' ('is' prop +)) ')'
wenzelm@7050
   219
  ;
wenzelm@7050
   220
\end{rail}
wenzelm@7050
   221
wenzelm@7050
   222
wenzelm@7046
   223
\subsection{Mixfix annotations}
wenzelm@7046
   224
wenzelm@7134
   225
Mixfix annotations specify concrete \emph{inner} syntax of Isabelle types and
wenzelm@8548
   226
terms (see also \cite{isabelle-ref}).  Some commands such as $\TYPES$ (see
wenzelm@8548
   227
\S\ref{sec:types-pure}) admit infixes only, while $\CONSTS$ (see
wenzelm@8548
   228
\S\ref{sec:consts}) and $\isarkeyword{syntax}$ (see \S\ref{sec:syn-trans})
wenzelm@8548
   229
support the full range of general mixfixes and binders.
wenzelm@7046
   230
wenzelm@7050
   231
\indexouternonterm{infix}\indexouternonterm{mixfix}
wenzelm@7050
   232
\begin{rail}
wenzelm@7167
   233
  infix: '(' ('infixl' | 'infixr') string? nat ')'
wenzelm@7167
   234
  ;
wenzelm@7175
   235
  mixfix: infix | '(' string prios? nat? ')' | '(' 'binder' string prios? nat ')'
wenzelm@7050
   236
  ;
wenzelm@7046
   237
wenzelm@7175
   238
  prios: '[' (nat + ',') ']'
wenzelm@7050
   239
  ;
wenzelm@7050
   240
\end{rail}
wenzelm@7046
   241
wenzelm@7050
   242
wenzelm@7134
   243
\subsection{Attributes and theorems}\label{sec:syn-att}
wenzelm@7050
   244
wenzelm@7050
   245
Attributes (and proof methods, see \S\ref{sec:syn-meth}) have their own
wenzelm@7335
   246
``semi-inner'' syntax, in the sense that input conforming to
wenzelm@7335
   247
\railnonterm{args} below is parsed by the attribute a second time.  The
wenzelm@7335
   248
attribute argument specifications may be any sequence of atomic entities
wenzelm@7335
   249
(identifiers, strings etc.), or properly bracketed argument lists.  Below
wenzelm@7981
   250
\railqtoken{atom} refers to any atomic entity, including any
wenzelm@7981
   251
\railtoken{keyword} conforming to \railtoken{symident}.
wenzelm@7050
   252
wenzelm@7050
   253
\indexoutertoken{atom}\indexouternonterm{args}\indexouternonterm{attributes}
wenzelm@7050
   254
\begin{rail}
wenzelm@7466
   255
  atom: nameref | typefree | typevar | var | nat | keyword
wenzelm@7050
   256
  ;
wenzelm@8896
   257
  arg: atom | '(' args ')' | '[' args ']'
wenzelm@7134
   258
  ;
wenzelm@7167
   259
  args: arg *
wenzelm@7134
   260
  ;
wenzelm@7167
   261
  attributes: '[' (nameref args * ',') ']'
wenzelm@7050
   262
  ;
wenzelm@7050
   263
\end{rail}
wenzelm@7050
   264
wenzelm@7895
   265
Theorem specifications come in several flavors: \railnonterm{axmdecl} and
wenzelm@7175
   266
\railnonterm{thmdecl} usually refer to axioms, assumptions or results of goal
wenzelm@7981
   267
statements, while \railnonterm{thmdef} collects lists of existing theorems.
wenzelm@7981
   268
Existing theorems are given by \railnonterm{thmref} and \railnonterm{thmrefs},
wenzelm@7981
   269
the former requires an actual singleton result.  Any of these theorem
wenzelm@7175
   270
specifications may include lists of attributes both on the left and right hand
wenzelm@7466
   271
sides; attributes are applied to any immediately preceding theorem.  If names
wenzelm@7981
   272
are omitted, the theorems are not stored within the theorem database of the
wenzelm@7981
   273
theory or proof context; any given attributes are still applied, though.
wenzelm@7050
   274
wenzelm@7135
   275
\indexouternonterm{thmdecl}\indexouternonterm{axmdecl}
wenzelm@7135
   276
\indexouternonterm{thmdef}\indexouternonterm{thmrefs}
wenzelm@7050
   277
\begin{rail}
wenzelm@7167
   278
  axmdecl: name attributes? ':'
wenzelm@7050
   279
  ;
wenzelm@9200
   280
  thmdecl: thmbind ':'
wenzelm@7135
   281
  ;
wenzelm@9200
   282
  thmdef: thmbind '='
wenzelm@7050
   283
  ;
wenzelm@7175
   284
  thmref: nameref attributes?
wenzelm@7175
   285
  ;
wenzelm@7175
   286
  thmrefs: thmref +
wenzelm@7134
   287
  ;
wenzelm@7167
   288
wenzelm@9200
   289
  thmbind: name attributes | name | attributes
wenzelm@7050
   290
  ;
wenzelm@7050
   291
\end{rail}
wenzelm@7050
   292
wenzelm@7050
   293
wenzelm@7050
   294
\subsection{Proof methods}\label{sec:syn-meth}
wenzelm@7050
   295
wenzelm@7050
   296
Proof methods are either basic ones, or expressions composed of methods via
wenzelm@7175
   297
``\texttt{,}'' (sequential composition), ``\texttt{|}'' (alternative choices),
wenzelm@7981
   298
``\texttt{?}'' (try), ``\texttt{+}'' (repeat at least once).  In practice,
wenzelm@7981
   299
proof methods are usually just a comma separated list of
wenzelm@7981
   300
\railqtoken{nameref}~\railnonterm{args} specifications.  Note that parentheses
wenzelm@7981
   301
may be dropped for single method specifications (with no arguments).
wenzelm@7050
   302
wenzelm@7050
   303
\indexouternonterm{method}
wenzelm@7050
   304
\begin{rail}
wenzelm@7430
   305
  method: (nameref | '(' methods ')') (() | '?' | '+')
wenzelm@7134
   306
  ;
wenzelm@7167
   307
  methods: (nameref args | method) + (',' | '|')
wenzelm@7050
   308
  ;
wenzelm@7050
   309
\end{rail}
wenzelm@7046
   310
wenzelm@8532
   311
Proper use of Isar proof methods does \emph{not} involve goal addressing.
wenzelm@8532
   312
Nevertheless, specifying goal ranges may occasionally come in handy in
wenzelm@8532
   313
emulating tactic scripts.  Note that $[n-]$ refers to all goals, starting from
wenzelm@8548
   314
$n$.  All goals may be specified by $[!]$, which is the same as $[1-]$.
wenzelm@8532
   315
wenzelm@8532
   316
\indexouternonterm{goalspec}
wenzelm@8532
   317
\begin{rail}
wenzelm@8548
   318
  goalspec: '[' (nat '-' nat | nat '-' | nat | '!' ) ']'
wenzelm@8532
   319
  ;
wenzelm@8532
   320
\end{rail}
wenzelm@8532
   321
wenzelm@7046
   322
wenzelm@9200
   323
\subsection{Antiquotations}\label{sec:antiq}
wenzelm@9200
   324
wenzelm@9200
   325
The text body of formal comments (see also \S\ref{sec:comments}) may contain
wenzelm@9200
   326
antiquotations of logical entities, such as theorems, terms and types, which
wenzelm@9200
   327
are to be presented in the final output produced by the Isabelle document
wenzelm@9200
   328
preparation system (see also \S\ref{sec:document-prep}).
wenzelm@9200
   329
wenzelm@9200
   330
Thus embedding something like
wenzelm@9200
   331
\texttt{{\at}{\ttlbrace}term[show_types]~"f(x)~=~a~+~x"{\ttrbrace}} within
wenzelm@9200
   332
some text block would cause
wenzelm@9200
   333
\isa{(f{\isasymColon}'a~{\isasymRightarrow}~'a)~(x{\isasymColon}'a)~=~(a{\isasymColon}'a)~+~x}
wenzelm@9200
   334
to appear in the final {\LaTeX} document.
wenzelm@9200
   335
wenzelm@9200
   336
\medskip
wenzelm@9200
   337
wenzelm@9200
   338
Antiquotations do not only spare the author from tedious typing, but also
wenzelm@9200
   339
achieve some degree of consistency-checking of informal explanations with
wenzelm@9200
   340
formal developments, since well-formedness of terms and types with respect to
wenzelm@9200
   341
the current theory or proof context can be ensured.
wenzelm@9200
   342
wenzelm@9200
   343
\indexisarant{thm}\indexisarant{prop}\indexisarant{term}\indexisarant{typ}
wenzelm@9200
   344
\begin{rail}
wenzelm@9200
   345
  atsign lbrace antiquotation rbrace
wenzelm@9200
   346
  ;
wenzelm@9200
   347
wenzelm@9200
   348
  antiquotation:
wenzelm@9200
   349
    'thm' options thmrefs |
wenzelm@9200
   350
    'prop' options prop |
wenzelm@9200
   351
    'term' options term |
wenzelm@9200
   352
    'typ' options type
wenzelm@9200
   353
  ;
wenzelm@9200
   354
  options: '[' (option * ',') ']'
wenzelm@9200
   355
  ;
wenzelm@9200
   356
  option: name | name '=' name
wenzelm@9200
   357
  ;
wenzelm@9200
   358
\end{rail}
wenzelm@9200
   359
wenzelm@9200
   360
Note that the syntax of antiquotations may \emph{not} include source comments
wenzelm@9200
   361
\texttt{(*~\dots~*)} or verbatim text \verb|{*|~\dots~\verb|*}|.
wenzelm@9200
   362
wenzelm@9200
   363
\medskip
wenzelm@9200
   364
wenzelm@9233
   365
The following options are available to tune the output.  Note that some of
wenzelm@9233
   366
these coincide with ML flags of the same names (see also \cite{isabelle-ref}).
wenzelm@9200
   367
\begin{descr}
wenzelm@9233
   368
\item[$show_types = bool$ and $show_sorts = bool$] control printing of
wenzelm@9234
   369
  explicit type and sort constraints.
wenzelm@9233
   370
\item[$long_names = bool$] forces names of types and constants etc.\ to be
wenzelm@9233
   371
  printed in their fully qualified internal form.
wenzelm@9233
   372
\item[$eta_contract = bool$] prints terms in $\eta$-contracted form.
wenzelm@9200
   373
\item[$display = bool$] indicates if the text is to be output as multi-line
wenzelm@9200
   374
  ``display material'', rather than a small piece of text without line breaks
wenzelm@9200
   375
  (which is the default).
wenzelm@9200
   376
\item[$quotes = bool$] indicates if the output should be enclosed in double
wenzelm@9200
   377
  quotes.
wenzelm@9233
   378
\item[$mode = name$] adds $name$ to the print mode to be used for presentation
wenzelm@9233
   379
  (see also \cite{isabelle-ref}).  Note that the standard setup for {\LaTeX}
wenzelm@9233
   380
  output is already present by default, including the modes ``$latex$'',
wenzelm@9233
   381
  ``$xsymbols$'', ``$symbols$''.
wenzelm@9200
   382
\item[$margin = nat$] changes the margin for pretty printing of display
wenzelm@9200
   383
  material.
wenzelm@9200
   384
\end{descr}
wenzelm@9200
   385
wenzelm@9200
   386
For boolean flags, ``$name = true$'' may be abbreviated as ``$name$''.  All of
wenzelm@9200
   387
the above flags are disabled by default, unless changed from ML.
wenzelm@9200
   388
wenzelm@9200
   389
wenzelm@7046
   390
%%% Local Variables: 
wenzelm@7046
   391
%%% mode: latex
wenzelm@7046
   392
%%% TeX-master: "isar-ref"
wenzelm@7046
   393
%%% End: