doc-src/TutorialI/Documents/document/Documents.tex
author wenzelm
Sat, 05 Jan 2002 21:41:38 +0100
changeset 12644 a107eeffd557
parent 12642 40fbd988b59b
child 12647 001d10bbc61b
permissions -rw-r--r--
updated;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11648
d78a82d112e4 *** empty log message ***
wenzelm
parents:
diff changeset
     1
%
d78a82d112e4 *** empty log message ***
wenzelm
parents:
diff changeset
     2
\begin{isabellebody}%
d78a82d112e4 *** empty log message ***
wenzelm
parents:
diff changeset
     3
\def\isabellecontext{Documents}%
11866
fbd097aec213 updated;
wenzelm
parents: 11648
diff changeset
     4
\isamarkupfalse%
12627
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
     5
%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
     6
\isamarkupsection{Concrete syntax \label{sec:concrete-syntax}%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
     7
}
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
     8
\isamarkuptrue%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
     9
%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    10
\begin{isamarkuptext}%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    11
Concerning Isabelle's ``inner'' language of simply-typed \isa{{\isasymlambda}}-calculus, the core concept of Isabelle's elaborate infrastructure
12644
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
    12
  for concrete syntax is that of general \bfindex{mixfix annotations}.
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
    13
  Associated with any kind of name and type declaration, mixfixes give
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
    14
  rise both to grammar productions for the parser and output templates
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
    15
  for the pretty printer.
12627
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    16
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    17
  In full generality, the whole affair of parser and pretty printer
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    18
  configuration is rather subtle.  Any syntax specifications given by
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    19
  end-users need to interact properly with the existing setup of
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    20
  Isabelle/Pure and Isabelle/HOL; see \cite{isabelle-ref} for further
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    21
  details.  It is particularly important to get the precedence of new
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    22
  syntactic constructs right, avoiding ambiguities with existing
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    23
  elements.
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    24
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    25
  \medskip Subsequently we introduce a few simple declaration forms
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    26
  that already cover the most common situations fairly well.%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    27
\end{isamarkuptext}%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    28
\isamarkuptrue%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    29
%
12644
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
    30
\isamarkupsubsection{Infix annotations%
12627
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    31
}
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    32
\isamarkuptrue%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    33
%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    34
\begin{isamarkuptext}%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    35
Syntax annotations may be included wherever constants are declared
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    36
  directly or indirectly, including \isacommand{consts},
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    37
  \isacommand{constdefs}, or \isacommand{datatype} (for the
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    38
  constructor operations).  Type-constructors may be annotated as
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    39
  well, although this is less frequently encountered in practice
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    40
  (\isa{{\isacharasterisk}} and \isa{{\isacharplus}} types may come to mind).
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    41
12644
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
    42
  Infix declarations\index{infix annotations} provide a useful special
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
    43
  case of mixfixes, where users need not care about the full details
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
    44
  of priorities, nesting, spacing, etc.  The subsequent example of the
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
    45
  exclusive-or operation on boolean values illustrates typical infix
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
    46
  declarations.%
12627
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    47
\end{isamarkuptext}%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    48
\isamarkuptrue%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    49
\isacommand{constdefs}\isanewline
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    50
\ \ xor\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}bool\ {\isasymRightarrow}\ bool\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infixl}\ {\isachardoublequote}{\isacharbrackleft}{\isacharplus}{\isacharbrackright}{\isachardoublequote}\ {\isadigit{6}}{\isadigit{0}}{\isacharparenright}\isanewline
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    51
\ \ {\isachardoublequote}A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ B\ {\isasymequiv}\ {\isacharparenleft}A\ {\isasymand}\ {\isasymnot}\ B{\isacharparenright}\ {\isasymor}\ {\isacharparenleft}{\isasymnot}\ A\ {\isasymand}\ B{\isacharparenright}{\isachardoublequote}\isamarkupfalse%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    52
%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    53
\begin{isamarkuptext}%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    54
Any curried function with at least two arguments may be associated
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    55
  with infix syntax: \isa{xor\ A\ B} and \isa{A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ B} refer to
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    56
  the same expression internally.  In partial applications with less
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    57
  than two operands there is a special notation with \isa{op} prefix:
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    58
  \isa{xor} without arguments is represented as \isa{op\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}};
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    59
  combined with plain prefix application this turns \isa{xor\ A}
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    60
  into \isa{op\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ A}.
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    61
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    62
  \medskip The string \isa{{\isachardoublequote}{\isacharbrackleft}{\isacharplus}{\isacharbrackright}{\isachardoublequote}} in the above declaration
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    63
  refers to the bit of concrete syntax to represent the operator,
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    64
  while the number \isa{{\isadigit{6}}{\isadigit{0}}} determines the precedence of the whole
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    65
  construct.
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    66
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    67
  As it happens, Isabelle/HOL already spends many popular combinations
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    68
  of ASCII symbols for its own use, including both \isa{{\isacharplus}} and
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    69
  \isa{{\isacharplus}{\isacharplus}}.  Slightly more awkward combinations like the present
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    70
  \isa{{\isacharbrackleft}{\isacharplus}{\isacharbrackright}} tend to be available for user extensions.  The current
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    71
  arrangement of inner syntax may be inspected via
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    72
  \commdx{print\protect\_syntax}, albeit its output is enormous.
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    73
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    74
  Operator precedence also needs some special considerations.  The
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    75
  admissible range is 0--1000.  Very low or high priorities are
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    76
  basically reserved for the meta-logic.  Syntax of Isabelle/HOL
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    77
  mainly uses the range of 10--100: the equality infix \isa{{\isacharequal}} is
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    78
  centered at 50, logical connectives (like \isa{{\isasymor}} and \isa{{\isasymand}}) are below 50, and algebraic ones (like \isa{{\isacharplus}} and \isa{{\isacharasterisk}}) above 50.  User syntax should strive to coexist with common
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    79
  HOL forms, or use the mostly unused range 100--900.
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    80
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    81
  \medskip The keyword \isakeyword{infixl} specifies an operator that
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    82
  is nested to the \emph{left}: in iterated applications the more
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    83
  complex expression appears on the left-hand side: \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,
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
    84
  \isakeyword{infixr} refers to nesting to the \emph{right}, reading
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
    85
  \isa{A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ B\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ C} as \isa{A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ {\isacharparenleft}B\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ C{\isacharparenright}}.  In contrast,
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
    86
  a \emph{non-oriented} declaration via \isakeyword{infix} would
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
    87
  always demand explicit parentheses.
12627
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    88
  
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    89
  Many binary operations observe the associative law, so the exact
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    90
  grouping does not matter.  Nevertheless, formal statements need be
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    91
  given in a particular format, associativity needs to be treated
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    92
  explicitly within the logic.  Exclusive-or is happens to be
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    93
  associative, as shown below.%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    94
\end{isamarkuptext}%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    95
\isamarkuptrue%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    96
\isacommand{lemma}\ xor{\isacharunderscore}assoc{\isacharcolon}\ {\isachardoublequote}{\isacharparenleft}A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ B{\isacharparenright}\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ C\ {\isacharequal}\ A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ {\isacharparenleft}B\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ C{\isacharparenright}{\isachardoublequote}\isanewline
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    97
\ \ \isamarkupfalse%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    98
\isacommand{by}\ {\isacharparenleft}auto\ simp\ add{\isacharcolon}\ xor{\isacharunderscore}def{\isacharparenright}\isamarkupfalse%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
    99
%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   100
\begin{isamarkuptext}%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   101
Such rules may be used in simplification to regroup nested
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   102
  expressions as required.  Note that the system would actually print
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   103
  the above statement as \isa{A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ B\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ C\ {\isacharequal}\ A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ {\isacharparenleft}B\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ C{\isacharparenright}}
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   104
  (due to nesting to the left).  We have preferred to give the fully
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   105
  parenthesized form in the text for clarity.  Only in rare situations
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   106
  one may consider to force parentheses by use of non-oriented infix
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   107
  syntax; equality would probably be a typical candidate.%
12627
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   108
\end{isamarkuptext}%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   109
\isamarkuptrue%
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   110
%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   111
\isamarkupsubsection{Mathematical symbols \label{sec:thy-present-symbols}%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   112
}
12627
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   113
\isamarkuptrue%
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   114
%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   115
\begin{isamarkuptext}%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   116
Concrete syntax based on plain ASCII characters has its inherent
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   117
  limitations.  Rich mathematical notation demands a larger repertoire
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   118
  of symbols.  Several standards of extended character sets have been
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   119
  proposed over decades, but none has become universally available so
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   120
  far, not even Unicode\index{Unicode}.
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   121
12644
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   122
  Isabelle supports a generic notion of \bfindex{symbols} as the
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   123
  smallest entities of source text, without referring to internal
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   124
  encodings.  Such ``generalized characters'' may be of one of the
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   125
  following three kinds:
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   126
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   127
  \begin{enumerate}
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   128
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   129
  \item Traditional 7-bit ASCII characters.
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   130
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   131
  \item Named symbols: \verb,\,\verb,<,$ident$\verb,>, (or
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   132
  \verb,\\,\verb,<,$ident$\verb,>,).
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   133
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   134
  \item Named control symbols: \verb,\,\verb,<^,$ident$\verb,>, (or
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   135
  \verb,\\,\verb,<^,$ident$\verb,>,).
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   136
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   137
  \end{enumerate}
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   138
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   139
  Here $ident$ may be any identifier according to the usual Isabelle
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   140
  conventions.  This results in an infinite store of symbols, whose
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   141
  interpretation is left to further front-end tools.  For example, the
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   142
  \verb,\,\verb,<forall>, symbol of Isabelle is really displayed as
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   143
  $\forall$ --- both by the user-interface of Proof~General + X-Symbol
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   144
  and the Isabelle document processor (see \S\ref{FIXME}).
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   145
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   146
  A list of standard Isabelle symbols is given in
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   147
  \cite[appendix~A]{isabelle-sys}.  Users may introduce their own
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   148
  interpretation of further symbols by configuring the appropriate
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   149
  front-end tool accordingly, e.g.\ defining appropriate {\LaTeX}
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   150
  macros for document preparation.  There are also a few predefined
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   151
  control symbols, such as \verb,\,\verb,<^sub>, and
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   152
  \verb,\,\verb,<^sup>, for sub- and superscript of the subsequent
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   153
  (printable) symbol, respectively.
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   154
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   155
  \medskip The following version of our \isa{xor} definition uses a
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   156
  standard Isabelle symbol to achieve typographically pleasing output.%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   157
\end{isamarkuptext}%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   158
\isamarkuptrue%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   159
\isamarkupfalse%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   160
\isamarkupfalse%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   161
\isacommand{constdefs}\isanewline
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   162
\ \ xor\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}bool\ {\isasymRightarrow}\ bool\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infixl}\ {\isachardoublequote}{\isasymoplus}{\isachardoublequote}\ {\isadigit{6}}{\isadigit{0}}{\isacharparenright}\isanewline
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   163
\ \ {\isachardoublequote}A\ {\isasymoplus}\ B\ {\isasymequiv}\ {\isacharparenleft}A\ {\isasymand}\ {\isasymnot}\ B{\isacharparenright}\ {\isasymor}\ {\isacharparenleft}{\isasymnot}\ A\ {\isasymand}\ B{\isacharparenright}{\isachardoublequote}\isamarkupfalse%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   164
\isamarkupfalse%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   165
%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   166
\begin{isamarkuptext}%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   167
The X-Symbol package within Proof~General provides several input
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   168
  methods to enter \isa{{\isasymoplus}} in the text.  If all fails one may just
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   169
  type \verb,\,\verb,<oplus>, by hand; the display is adapted
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   170
  immediately after continuing further input.
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   171
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   172
  \medskip A slightly more refined scheme is to provide alternative
12644
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   173
  syntax via the \bfindex{print mode} concept of Isabelle (see also
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   174
  \cite{isabelle-ref}).  By convention, the mode ``$xsymbols$'' is
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   175
  enabled whenever X-Symbol is active.  Consider the following hybrid
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   176
  declaration of \isa{xor}.%
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   177
\end{isamarkuptext}%
12627
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   178
\isamarkuptrue%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   179
\isamarkupfalse%
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   180
\isamarkupfalse%
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   181
\isacommand{constdefs}\isanewline
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   182
\ \ 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
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   183
\ \ {\isachardoublequote}A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}{\isasymignore}\ B\ {\isasymequiv}\ {\isacharparenleft}A\ {\isasymand}\ {\isasymnot}\ B{\isacharparenright}\ {\isasymor}\ {\isacharparenleft}{\isasymnot}\ A\ {\isasymand}\ B{\isacharparenright}{\isachardoublequote}\isanewline
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   184
\isanewline
12627
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   185
\isamarkupfalse%
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   186
\isacommand{syntax}\ {\isacharparenleft}xsymbols{\isacharparenright}\isanewline
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   187
\ \ xor\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}bool\ {\isasymRightarrow}\ bool\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infixl}\ {\isachardoublequote}{\isasymoplus}{\isasymignore}{\isachardoublequote}\ {\isadigit{6}}{\isadigit{0}}{\isacharparenright}\isamarkupfalse%
12627
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   188
\isamarkupfalse%
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   189
%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   190
\begin{isamarkuptext}%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   191
Here the \commdx{syntax} command acts like \isakeyword{consts}, but
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   192
  without declaring a logical constant, and with an optional print
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   193
  mode specification.  Note that the type declaration given here
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   194
  merely serves for syntactic purposes, and is not checked for
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   195
  consistency with the real constant.
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   196
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   197
  \medskip Now we may write either \isa{{\isacharbrackleft}{\isacharplus}{\isacharbrackright}} or \isa{{\isasymoplus}} in
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   198
  input, while output uses the nicer syntax of $xsymbols$, provided
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   199
  that print mode is presently active.  This scheme is particularly
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   200
  useful for interactive development, with the user typing plain ASCII
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   201
  text, but gaining improved visual feedback from the system (say in
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   202
  current goal output).
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   203
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   204
  \begin{warn}
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   205
  Using alternative syntax declarations easily results in varying
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   206
  versions of input sources.  Isabelle provides no systematic way to
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   207
  convert alternative expressions back and forth.  Print modes only
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   208
  affect situations where formal entities are pretty printed by the
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   209
  Isabelle process (e.g.\ output of terms and types), but not the
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   210
  original theory text.
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   211
  \end{warn}
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   212
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   213
  \medskip The following variant makes the alternative \isa{{\isasymoplus}}
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   214
  notation only available for output.  Thus we may enforce input
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   215
  sources to refer to plain ASCII only.%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   216
\end{isamarkuptext}%
12627
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   217
\isamarkuptrue%
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   218
\isacommand{syntax}\ {\isacharparenleft}xsymbols\ \isakeyword{output}{\isacharparenright}\isanewline
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   219
\ \ xor\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}bool\ {\isasymRightarrow}\ bool\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infixl}\ {\isachardoublequote}{\isasymoplus}{\isasymignore}{\isachardoublequote}\ {\isadigit{6}}{\isadigit{0}}{\isacharparenright}\isamarkupfalse%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   220
%
12644
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   221
\isamarkupsubsection{Prefix annotations%
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   222
}
12627
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   223
\isamarkuptrue%
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   224
%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   225
\begin{isamarkuptext}%
12644
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   226
Prefix syntax annotations\index{prefix annotation} are just a very
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   227
  degenerate of the general mixfix form \cite{isabelle-ref}, without
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   228
  any template arguments or priorities --- just some piece of literal
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   229
  syntax.
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   230
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   231
  The following example illustrates this idea idea by associating
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   232
  common symbols with the constructors of a currency datatype.%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   233
\end{isamarkuptext}%
12627
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   234
\isamarkuptrue%
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   235
\isacommand{datatype}\ currency\ {\isacharequal}\isanewline
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   236
\ \ \ \ Euro\ nat\ \ \ \ {\isacharparenleft}{\isachardoublequote}{\isasymeuro}{\isachardoublequote}{\isacharparenright}\isanewline
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   237
\ \ {\isacharbar}\ Pounds\ nat\ \ {\isacharparenleft}{\isachardoublequote}{\isasympounds}{\isachardoublequote}{\isacharparenright}\isanewline
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   238
\ \ {\isacharbar}\ Yen\ nat\ \ \ \ \ {\isacharparenleft}{\isachardoublequote}{\isasymyen}{\isachardoublequote}{\isacharparenright}\isanewline
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   239
\ \ {\isacharbar}\ Dollar\ nat\ \ {\isacharparenleft}{\isachardoublequote}{\isachardollar}{\isachardoublequote}{\isacharparenright}\isamarkupfalse%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   240
%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   241
\begin{isamarkuptext}%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   242
Here the degenerate mixfix annotations on the rightmost column
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   243
  happen to consist of a single Isabelle symbol each:
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   244
  \verb,\,\verb,<euro>,, \verb,\,\verb,<pounds>,,
12644
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   245
  \verb,\,\verb,<yen>,, \verb,$,.
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   246
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   247
  Recall that a constructor like \isa{Euro} actually is a function
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   248
  \isa{nat\ {\isasymRightarrow}\ currency}.  An expression like \isa{Euro\ {\isadigit{1}}{\isadigit{0}}} will
12644
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   249
  be printed as \isa{{\isasymeuro}\ {\isadigit{1}}{\isadigit{0}}}.  Only the head of the application is
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   250
  subject to our concrete syntax; this simple form already achieves
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   251
  conformance with notational standards of the European Commission.
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   252
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   253
  \medskip Certainly, the same idea of prefix syntax also works for
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   254
  \isakeyword{consts}, \isakeyword{constdefs} etc.  For example, we
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   255
  might introduce a (slightly unrealistic) function to calculate an
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   256
  abstract currency value, by cases on the datatype constructors and
12644
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   257
  fixed exchange rates.  The funny symbol used here is that of
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   258
  \verb,\<currency>,.%
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   259
\end{isamarkuptext}%
12627
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   260
\isamarkuptrue%
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   261
\isacommand{consts}\isanewline
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   262
\ \ currency\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}currency\ {\isasymRightarrow}\ nat{\isachardoublequote}\ \ \ \ {\isacharparenleft}{\isachardoublequote}{\isasymcurrency}{\isachardoublequote}{\isacharparenright}\isamarkupfalse%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   263
%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   264
\isamarkupsubsection{Syntax translations \label{sec:def-translations}%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   265
}
12627
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   266
\isamarkuptrue%
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   267
%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   268
\begin{isamarkuptext}%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   269
FIXME
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   270
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   271
\index{syntax translations|(}%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   272
\index{translations@\isacommand {translations} (command)|(}
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   273
Isabelle offers an additional definitional facility,
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   274
\textbf{syntax translations}.
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   275
They resemble macros: upon parsing, the defined concept is immediately
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   276
replaced by its definition.  This effect is reversed upon printing.  For example,
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   277
the symbol \isa{{\isasymnoteq}} is defined via a syntax translation:%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   278
\end{isamarkuptext}%
12627
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   279
\isamarkuptrue%
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   280
\isacommand{translations}\ {\isachardoublequote}x\ {\isasymnoteq}\ y{\isachardoublequote}\ {\isasymrightleftharpoons}\ {\isachardoublequote}{\isasymnot}{\isacharparenleft}x\ {\isacharequal}\ y{\isacharparenright}{\isachardoublequote}\isamarkupfalse%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   281
%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   282
\begin{isamarkuptext}%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   283
\index{$IsaEqTrans@\isasymrightleftharpoons}
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   284
\noindent
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   285
Internally, \isa{{\isasymnoteq}} never appears.
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   286
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   287
In addition to \isa{{\isasymrightleftharpoons}} there are
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   288
\isa{{\isasymrightharpoonup}}\index{$IsaEqTrans1@\isasymrightharpoonup}
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   289
and \isa{{\isasymleftharpoondown}}\index{$IsaEqTrans2@\isasymleftharpoondown}
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   290
for uni-directional translations, which only affect
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   291
parsing or printing.  This tutorial will not cover the details of
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   292
translations.  We have mentioned the concept merely because it
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   293
crops up occasionally; a number of HOL's built-in constructs are defined
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   294
via translations.  Translations are preferable to definitions when the new 
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   295
concept is a trivial variation on an existing one.  For example, we
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   296
don't need to derive new theorems about \isa{{\isasymnoteq}}, since existing theorems
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   297
about \isa{{\isacharequal}} still apply.%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   298
\index{syntax translations|)}%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   299
\index{translations@\isacommand {translations} (command)|)}%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   300
\end{isamarkuptext}%
12627
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   301
\isamarkuptrue%
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   302
%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   303
\isamarkupsection{Document preparation%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   304
}
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   305
\isamarkuptrue%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   306
%
12644
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   307
\begin{isamarkuptext}%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   308
Isabelle/Isar is centered around a certain notion of \bfindex{formal
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   309
  proof documents}\index{documents|bold}: ultimately the result of the
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   310
  user's theory development efforts is a human-readable record --- as
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   311
  a browsable PDF file or printed on paper.  The overall document
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   312
  structure follows traditional mathematical articles, with
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   313
  sectioning, explanations, definitions, theorem statements, and
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   314
  proofs.
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   315
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   316
  The Isar proof language \cite{Wenzel-PhD}, which is not covered in
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   317
  this book, admits to write formal proof texts that are acceptable
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   318
  both to the machine and human readers at the same time.  Thus
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   319
  marginal comments and explanations may be kept at a minimum.
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   320
  Nevertheless, Isabelle document output is still useful without
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   321
  actual Isar proof texts; formal specifications usually deserve their
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   322
  own coverage in the text, while unstructured proof scripts may be
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   323
  just ignore by readers (or intentionally suppressed from the text).
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   324
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   325
  \medskip The Isabelle document preparation system essentially acts
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   326
  like a formal front-end for {\LaTeX}.  After checking definitions
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   327
  and proofs the theory sources are turned into typesetting
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   328
  instructions, so the final document is known to observe quite strong
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   329
  ``soundness'' properties.  This enables users to write authentic
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   330
  reports on formal theory developments with little additional effort,
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   331
  the most tedious consistency checks are handled by the system.%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   332
\end{isamarkuptext}%
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   333
\isamarkuptrue%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   334
%
12644
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   335
\isamarkupsubsection{Isabelle sessions%
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   336
}
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   337
\isamarkuptrue%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   338
%
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   339
\begin{isamarkuptext}%
12644
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   340
In contrast to the highly interactive mode of the formal parts of
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   341
  Isabelle/Isar theory development, the document preparation stage
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   342
  essentially works in batch-mode.  This revolves around the concept
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   343
  of a \bfindex{session}, which essentially consists of a collection
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   344
  of theory source files that contribute to a single output document.
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   345
  Each session is derived from a parent one (usually an object-logic
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   346
  image such as \texttt{HOL}); this results in an overall tree
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   347
  structure of Isabelle sessions.
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   348
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   349
  The canonical arrangement of source files of a session called
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   350
  \texttt{MySession} is as follows:
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   351
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   352
  \begin{itemize}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   353
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   354
  \item Directory \texttt{MySession} contains the required theory
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   355
  files, say $A@1$\texttt{.thy}, \dots, $A@n$\texttt{.thy}.
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   356
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   357
  \item File \texttt{MySession/ROOT.ML} holds appropriate ML commands
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   358
  for loading all wanted theories, usually just
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   359
  \texttt{use_thy~"$A@i$"} for any $A@i$ in leaf position of the
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   360
  theory dependency graph.
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   361
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   362
  \item Directory \texttt{MySession/document} contains everything
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   363
  required for the {\LaTeX} stage, but only \texttt{root.tex} needs to
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   364
  be provided initially.  The latter file holds appropriate {\LaTeX}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   365
  code to commence a document (\verb,\documentclass, etc.), and to
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   366
  include the generated files $A@i$\texttt{.tex} for each theory.  The
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   367
  generated file \texttt{session.tex} holds {\LaTeX} commands to
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   368
  include \emph{all} theory output files in topologically sorted
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   369
  order.
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   370
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   371
  \item In addition an \texttt{IsaMakefile} outside of directory
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   372
  \texttt{MySession} holds appropriate dependencies and invocations of
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   373
  Isabelle tools to control the batch job.  The details are covered in
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   374
  \cite{isabelle-sys}; \texttt{isatool usedir} is the most important
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   375
  entry point.
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   376
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   377
  \end{itemize}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   378
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   379
  With everything put in its proper place, \texttt{isatool make}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   380
  should be sufficient to process the Isabelle session completely,
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   381
  with the generated document appearing in its proper place (within
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   382
  \verb,~/isabelle/browser_info,).
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   383
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   384
  In practive, users may want to have \texttt{isatool mkdir} generate
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   385
  an initial working setup without further ado.  For example, an empty
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   386
  session \texttt{MySession} derived from \texttt{HOL} may be produced
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   387
  as follows:
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   388
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   389
\begin{verbatim}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   390
  isatool mkdir HOL MySession
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   391
  isatool make
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   392
\end{verbatim}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   393
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   394
  This runs the session with sensible default options, including
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   395
  verbose mode to tell the user where the result will appear.  The
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   396
  above dry run should produce should produce a single page of output
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   397
  (with a dummy title, empty table of contents etc.).  Any failure at
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   398
  that stage is likely to indicate some technical problems with your
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   399
  {\LaTeX} installation.\footnote{Especially make sure that
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   400
  \texttt{pdflatex} is present.}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   401
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   402
  \medskip Users may now start to populate the directory
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   403
  \texttt{MySession}, and the file \texttt{MySession/ROOT.ML}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   404
  accordingly.  \texttt{MySession/document/root.tex} should be also
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   405
  adapted at some point; the generated version is mostly
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   406
  self-explanatory.
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   407
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   408
  Realistic applications may demand additional files in
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   409
  \texttt{MySession/document} for the {\LaTeX} stage, such as
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   410
  \texttt{root.bib} for the bibliographic database.\footnote{Using
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   411
  that particular name of \texttt{root.bib}, the Isabelle document
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   412
  processor (actually \texttt{isatool document} \cite{isabelle-sys})
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   413
  will be smart enough to invoke \texttt{bibtex} accordingly.}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   414
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   415
  \medskip Failure of the document preparation phase in an Isabelle
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   416
  batch session leaves the generated sources in there target location
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   417
  (as pointed out by the accompanied error message).  In case of
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   418
  {\LaTeX} errors, users may trace error messages at the file position
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   419
  of the generated text.%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   420
\end{isamarkuptext}%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   421
\isamarkuptrue%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   422
%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   423
\isamarkupsubsection{Structure markup%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   424
}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   425
\isamarkuptrue%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   426
%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   427
\isamarkupsubsubsection{Sections%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   428
}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   429
\isamarkuptrue%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   430
%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   431
\begin{isamarkuptext}%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   432
The large-scale structure of Isabelle documents closely follows
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   433
  {\LaTeX} convention, with chapters, sections, subsubsections etc.
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   434
  The formal Isar language includes separate structure \bfindex{markup
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   435
  commands}, which do not effect the formal content of a theory (or
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   436
  proof), but results in corresponding {\LaTeX} elements issued to the
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   437
  output.
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   438
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   439
  There are different markup commands for different formal contexts:
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   440
  in header position (just before a \isakeyword{theory} command),
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   441
  within the theory body, or within a proof.  Note that the header
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   442
  needs to be treated specially, since ordinary theory and proof
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   443
  commands may only occur \emph{after} the initial \isakeyword{theory}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   444
  specification.
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   445
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   446
  \smallskip
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   447
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   448
  \begin{tabular}{llll}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   449
  header & theory & proof & default meaning \\\hline
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   450
    & \commdx{chapter} & & \verb,\chapter, \\
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   451
  \commdx{header} & \commdx{section} & \commdx{sect} & \verb,\section, \\
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   452
    & \commdx{subsection} & \commdx{subsect} & \verb,\subsection, \\
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   453
    & \commdx{subsubsection} & \commdx{subsubsect} & \verb,\subsubsection, \\
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   454
  \end{tabular}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   455
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   456
  \medskip
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   457
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   458
  From the Isabelle perspective, each markup command takes a single
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   459
  text argument (delimited by \verb,",\dots\verb,", or
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   460
  \verb,{,\verb,*,~\dots~\verb,*,\verb,},).  After stripping
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   461
  surrounding white space, the argument is passed to a {\LaTeX} macro
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   462
  \verb,\isamarkupXXX, for any command \isakeyword{XXX}.  The latter
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   463
  are defined in \verb,isabelle.sty, according to the rightmost column
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   464
  above.
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   465
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   466
  \medskip The following source fragment illustrates structure markup
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   467
  of a theory.
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   468
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   469
  \begin{ttbox}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   470
  header {\ttlbrace}* Some properties of Foo Bar elements *{\ttrbrace}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   471
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   472
  theory Foo_Bar = Main:
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   473
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   474
  subsection {\ttlbrace}* Basic definitions *{\ttrbrace}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   475
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   476
  consts
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   477
    foo :: \dots
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   478
    bar :: \dots
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   479
  defs \dots
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   480
    
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   481
  subsection {\ttlbrace}* Derived rules *{\ttrbrace}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   482
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   483
  lemma fooI: \dots
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   484
  lemma fooE: \dots
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   485
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   486
  subsection {\ttlbrace}* Main theorem *{\ttrbrace}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   487
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   488
  theorem main: \dots
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   489
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   490
  end
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   491
  \end{ttbox}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   492
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   493
  \medskip In realistic applications, users may well want to change
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   494
  the meaning of some markup commands, typically via appropriate use
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   495
  of \verb,\renewcommand, in \texttt{root.tex}.  The
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   496
  \verb,\isamarkupheader, is a good candidate for some adaption, e.g.\
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   497
  moving it up in the hierarchy to become \verb,\chapter,.
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   498
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   499
\begin{verbatim}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   500
  \renewcommand{\isamarkupheader}[1]{\chapter{#1}}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   501
\end{verbatim}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   502
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   503
  Certainly, this requires to change the default
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   504
  \verb,\documentclass{article}, in \texttt{root.tex} to something
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   505
  that supports the notion of chapters in the first place, e.g.\
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   506
  \texttt{report} or \texttt{book}.
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   507
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   508
  \medskip For each generated theory output the {\LaTeX} macro
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   509
  \verb,\isabellecontext, holds the name of the formal context.  This
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   510
  is particularly useful for document headings or footings, e.g.\ like
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   511
  this:
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   512
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   513
\begin{verbatim}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   514
  \renewcommand{\isamarkupheader}[1]%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   515
  {\chapter{#1}\markright{THEORY~\isabellecontext}}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   516
\end{verbatim}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   517
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   518
  \noindent Make sure to include something like
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   519
  \verb,\pagestyle{headings}, in \texttt{root.tex} as well.  Moreover,
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   520
  the document should have more than 2 pages.%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   521
\end{isamarkuptext}%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   522
\isamarkuptrue%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   523
%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   524
\isamarkupsubsection{Formal comments and antiquotations%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   525
}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   526
\isamarkuptrue%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   527
%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   528
\begin{isamarkuptext}%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   529
Comments of the form \verb,(*,~\dots~\verb,*),%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   530
\end{isamarkuptext}%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   531
\isamarkuptrue%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   532
%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   533
\isamarkupsubsection{Symbols and characters%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   534
}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   535
\isamarkuptrue%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   536
%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   537
\begin{isamarkuptext}%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   538
FIXME \verb,\isabellestyle,%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   539
\end{isamarkuptext}%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   540
\isamarkuptrue%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   541
%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   542
\isamarkupsubsection{Suppressing output%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   543
}
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   544
\isamarkuptrue%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   545
%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   546
\begin{isamarkuptext}%
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   547
FIXME \verb,no_document,
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   548
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   549
  FIXME \verb,(,\verb,*,\verb,<,\verb,*,\verb,),
a107eeffd557 updated;
wenzelm
parents: 12642
diff changeset
   550
  \verb,(,\verb,*,\verb,>,\verb,*,\verb,),%
12635
e2d44df29c94 more on concrete syntax;
wenzelm
parents: 12627
diff changeset
   551
\end{isamarkuptext}%
12627
08eee994bf99 updated;
wenzelm
parents: 11866
diff changeset
   552
\isamarkuptrue%
11866
fbd097aec213 updated;
wenzelm
parents: 11648
diff changeset
   553
\isamarkupfalse%
11648
d78a82d112e4 *** empty log message ***
wenzelm
parents:
diff changeset
   554
\end{isabellebody}%
d78a82d112e4 *** empty log message ***
wenzelm
parents:
diff changeset
   555
%%% Local Variables:
d78a82d112e4 *** empty log message ***
wenzelm
parents:
diff changeset
   556
%%% mode: latex
d78a82d112e4 *** empty log message ***
wenzelm
parents:
diff changeset
   557
%%% TeX-master: "root"
d78a82d112e4 *** empty log message ***
wenzelm
parents:
diff changeset
   558
%%% End: