| author | wenzelm | 
| Sun, 30 Sep 2018 12:50:28 +0200 | |
| changeset 69091 | ce62fd14961a | 
| parent 67443 | 3abf6a722518 | 
| child 69505 | cc2d676d5395 | 
| permissions | -rw-r--r-- | 
| 11647 | 1 | (*<*) | 
| 16417 | 2 | theory Documents imports Main begin | 
| 11647 | 3 | (*>*) | 
| 4 | ||
| 67406 | 5 | section \<open>Concrete Syntax \label{sec:concrete-syntax}\<close>
 | 
| 12629 | 6 | |
| 67406 | 7 | text \<open> | 
| 12766 | 8 | The core concept of Isabelle's framework for concrete syntax is that | 
| 9 |   of \bfindex{mixfix annotations}.  Associated with any kind of
 | |
| 10 | constant declaration, mixfixes affect both the grammar productions | |
| 11 | for the parser and output templates for the pretty printer. | |
| 12629 | 12 | |
| 12743 | 13 | In full generality, parser and pretty printer configuration is a | 
| 58620 | 14 |   subtle affair~@{cite "isabelle-isar-ref"}.  Your syntax specifications need
 | 
| 12766 | 15 | to interact properly with the existing setup of Isabelle/Pure and | 
| 16 | Isabelle/HOL\@. To avoid creating ambiguities with existing | |
| 17 | elements, it is particularly important to give new syntactic | |
| 12764 | 18 | constructs the right precedence. | 
| 12629 | 19 | |
| 25338 | 20 | Below we introduce a few simple syntax declaration | 
| 12743 | 21 | forms that already cover many common situations fairly well. | 
| 67406 | 22 | \<close> | 
| 12629 | 23 | |
| 24 | ||
| 67406 | 25 | subsection \<open>Infix Annotations\<close> | 
| 12629 | 26 | |
| 67406 | 27 | text \<open> | 
| 12764 | 28 | Syntax annotations may be included wherever constants are declared, | 
| 27015 | 29 |   such as \isacommand{definition} and \isacommand{primrec} --- and also
 | 
| 12766 | 30 |   \isacommand{datatype}, which declares constructor operations.
 | 
| 31 | Type-constructors may be annotated as well, although this is less | |
| 32 |   frequently encountered in practice (the infix type @{text "\<times>"} comes
 | |
| 33 | to mind). | |
| 12629 | 34 | |
| 12645 | 35 |   Infix declarations\index{infix annotations} provide a useful special
 | 
| 12766 | 36 | case of mixfixes. The following example of the exclusive-or | 
| 37 | operation on boolean values illustrates typical infix declarations. | |
| 67406 | 38 | \<close> | 
| 12629 | 39 | |
| 27015 | 40 | definition xor :: "bool \<Rightarrow> bool \<Rightarrow> bool" (infixl "[+]" 60) | 
| 41 | where "A [+] B \<equiv> (A \<and> \<not> B) \<or> (\<not> A \<and> B)" | |
| 12629 | 42 | |
| 67406 | 43 | text \<open> | 
| 12653 | 44 |   \noindent Now @{text "xor A B"} and @{text "A [+] B"} refer to the
 | 
| 45 | same expression internally. Any curried function with at least two | |
| 12766 | 46 | arguments may be given infix syntax. For partial applications with | 
| 67398 | 47 | fewer than two operands, the operator is enclosed in parentheses. | 
| 48 |   For instance, @{text xor} without arguments is represented as
 | |
| 49 |   @{text "([+])"}; together with ordinary function application, this
 | |
| 50 |   turns @{text "xor A"} into @{text "([+]) A"}.
 | |
| 12629 | 51 | |
| 25338 | 52 |   The keyword \isakeyword{infixl} seen above specifies an
 | 
| 12746 | 53 |   infix operator that is nested to the \emph{left}: in iterated
 | 
| 54 | applications the more complex expression appears on the left-hand | |
| 12766 | 55 |   side, and @{term "A [+] B [+] C"} stands for @{text "(A [+] B) [+]
 | 
| 56 |   C"}.  Similarly, \isakeyword{infixr} means nesting to the
 | |
| 12746 | 57 |   \emph{right}, reading @{term "A [+] B [+] C"} as @{text "A [+] (B
 | 
| 12766 | 58 |   [+] C)"}.  A \emph{non-oriented} declaration via \isakeyword{infix}
 | 
| 59 |   would render @{term "A [+] B [+] C"} illegal, but demand explicit
 | |
| 60 | parentheses to indicate the intended grouping. | |
| 12743 | 61 | |
| 12746 | 62 |   The string @{text [source] "[+]"} in our annotation refers to the
 | 
| 63 | concrete syntax to represent the operator (a literal token), while | |
| 12764 | 64 |   the number @{text 60} determines the precedence of the construct:
 | 
| 12766 | 65 | the syntactic priorities of the arguments and result. Isabelle/HOL | 
| 66 | already uses up many popular combinations of ASCII symbols for its | |
| 67 |   own use, including both @{text "+"} and @{text "++"}.  Longer
 | |
| 68 | character combinations are more likely to be still available for | |
| 69 |   user extensions, such as our~@{text "[+]"}.
 | |
| 12629 | 70 | |
| 12766 | 71 | Operator precedences have a range of 0--1000. Very low or high | 
| 72 | priorities are reserved for the meta-logic. HOL syntax mainly uses | |
| 73 |   the range of 10--100: the equality infix @{text "="} is centered at
 | |
| 74 |   50; logical connectives (like @{text "\<or>"} and @{text "\<and>"}) are
 | |
| 75 |   below 50; algebraic ones (like @{text "+"} and @{text "*"}) are
 | |
| 76 | above 50. User syntax should strive to coexist with common HOL | |
| 77 | forms, or use the mostly unused range 100--900. | |
| 67406 | 78 | \<close> | 
| 12629 | 79 | |
| 12635 | 80 | |
| 67406 | 81 | subsection \<open>Mathematical Symbols \label{sec:syntax-symbols}\<close>
 | 
| 12629 | 82 | |
| 67406 | 83 | text \<open> | 
| 12766 | 84 | Concrete syntax based on ASCII characters has inherent limitations. | 
| 85 | Mathematical notation demands a larger repertoire of glyphs. | |
| 86 | Several standards of extended character sets have been proposed over | |
| 87 | decades, but none has become universally available so far. Isabelle | |
| 88 |   has its own notion of \bfindex{symbols} as the smallest entities of
 | |
| 89 | source text, without referring to internal encodings. There are | |
| 90 | three kinds of such ``generalized characters'': | |
| 12635 | 91 | |
| 92 |   \begin{enumerate}
 | |
| 93 | ||
| 12653 | 94 | \item 7-bit ASCII characters | 
| 12635 | 95 | |
| 12653 | 96 | \item named symbols: \verb,\,\verb,<,$ident$\verb,>, | 
| 12629 | 97 | |
| 12653 | 98 | \item named control symbols: \verb,\,\verb,<^,$ident$\verb,>, | 
| 12635 | 99 | |
| 100 |   \end{enumerate}
 | |
| 101 | ||
| 14486 | 102 | Here $ident$ is any sequence of letters. | 
| 103 | This results in an infinite store of symbols, whose | |
| 12766 | 104 | interpretation is left to further front-end tools. For example, the | 
| 58842 | 105 |   Isabelle document processor (see \S\ref{sec:document-preparation})
 | 
| 106 |   display the \verb,\,\verb,<forall>, symbol as~@{text \<forall>}.
 | |
| 12635 | 107 | |
| 108 | A list of standard Isabelle symbols is given in | |
| 58620 | 109 |   @{cite "isabelle-isar-ref"}.  You may introduce your own
 | 
| 12635 | 110 | interpretation of further symbols by configuring the appropriate | 
| 12653 | 111 |   front-end tool accordingly, e.g.\ by defining certain {\LaTeX}
 | 
| 112 |   macros (see also \S\ref{sec:doc-prep-symbols}).  There are also a
 | |
| 113 | few predefined control symbols, such as \verb,\,\verb,<^sub>, and | |
| 12635 | 114 | \verb,\,\verb,<^sup>, for sub- and superscript of the subsequent | 
| 61593 | 115 | printable symbol, respectively. For example, \<^verbatim>\<open>A\<^sup>\<star>\<close>, is | 
| 12670 | 116 |   output as @{text "A\<^sup>\<star>"}.
 | 
| 12635 | 117 | |
| 17183 | 118 | A number of symbols are considered letters by the Isabelle lexer and | 
| 119 | can be used as part of identifiers. These are the greek letters | |
| 120 |   @{text "\<alpha>"} (\verb+\+\verb+<alpha>+), @{text "\<beta>"}
 | |
| 121 |   (\verb+\+\verb+<beta>+), etc. (excluding @{text "\<lambda>"}),
 | |
| 122 |   special letters like @{text "\<A>"} (\verb+\+\verb+<A>+) and @{text
 | |
| 52919 | 123 | "\<AA>"} (\verb+\+\verb+<AA>+). Moreover the control symbol | 
| 124 | \verb+\+\verb+<^sub>+ may be used to subscript a single letter or digit | |
| 125 | in the trailing part of an identifier. This means that the input | |
| 14486 | 126 | |
| 127 | \medskip | |
| 61593 | 128 |   {\small\noindent \<^verbatim>\<open>\<forall>\<alpha>\<^sub>1. \<alpha>\<^sub>1 = \<Pi>\<^sub>\<A>\<close>}
 | 
| 14486 | 129 | |
| 130 | \medskip | |
| 53015 
a1119cf551e8
standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
 wenzelm parents: 
52919diff
changeset | 131 |   \noindent is recognized as the term @{term "\<forall>\<alpha>\<^sub>1. \<alpha>\<^sub>1 = \<Pi>\<^sub>\<A>"} 
 | 
| 52919 | 132 | by Isabelle. | 
| 14486 | 133 | |
| 25338 | 134 |   Replacing our previous definition of @{text xor} by the
 | 
| 17183 | 135 | following specifies an Isabelle symbol for the new operator: | 
| 67406 | 136 | \<close> | 
| 12629 | 137 | |
| 138 | (*<*) | |
| 36176 
3fe7e97ccca8
replaced generic 'hide' command by more conventional 'hide_class', 'hide_type', 'hide_const', 'hide_fact' -- frees some popular keywords;
 wenzelm parents: 
30649diff
changeset | 139 | hide_const xor | 
| 67406 | 140 | setup \<open>Sign.add_path "version1"\<close> | 
| 12629 | 141 | (*>*) | 
| 27015 | 142 | definition xor :: "bool \<Rightarrow> bool \<Rightarrow> bool" (infixl "\<oplus>" 60) | 
| 143 | where "A \<oplus> B \<equiv> (A \<and> \<not> B) \<or> (\<not> A \<and> B)" | |
| 12635 | 144 | (*<*) | 
| 67406 | 145 | setup \<open>Sign.local_path\<close> | 
| 12635 | 146 | (*>*) | 
| 12629 | 147 | |
| 67406 | 148 | text \<open> | 
| 58842 | 149 | It is possible to provide alternative syntax forms | 
| 58620 | 150 |   through the \bfindex{print mode} concept~@{cite "isabelle-isar-ref"}.  By
 | 
| 12766 | 151 | convention, the mode of ``$xsymbols$'' is enabled whenever | 
| 152 |   Proof~General's X-Symbol mode or {\LaTeX} output is active.  Now
 | |
| 153 |   consider the following hybrid declaration of @{text xor}:
 | |
| 67406 | 154 | \<close> | 
| 12635 | 155 | |
| 156 | (*<*) | |
| 36176 
3fe7e97ccca8
replaced generic 'hide' command by more conventional 'hide_class', 'hide_type', 'hide_const', 'hide_fact' -- frees some popular keywords;
 wenzelm parents: 
30649diff
changeset | 157 | hide_const xor | 
| 67406 | 158 | setup \<open>Sign.add_path "version2"\<close> | 
| 12635 | 159 | (*>*) | 
| 27015 | 160 | definition xor :: "bool \<Rightarrow> bool \<Rightarrow> bool" (infixl "[+]\<ignore>" 60) | 
| 161 | where "A [+]\<ignore> B \<equiv> (A \<and> \<not> B) \<or> (\<not> A \<and> B)" | |
| 12635 | 162 | |
| 25338 | 163 | notation (xsymbols) xor (infixl "\<oplus>\<ignore>" 60) | 
| 12629 | 164 | (*<*) | 
| 67406 | 165 | setup \<open>Sign.local_path\<close> | 
| 12629 | 166 | (*>*) | 
| 167 | ||
| 67406 | 168 | text \<open>\noindent | 
| 27015 | 169 | The \commdx{notation} command associates a mixfix
 | 
| 170 | annotation with a known constant. The print mode specification, | |
| 171 | here @{text "(xsymbols)"}, is optional.
 | |
| 12635 | 172 | |
| 25338 | 173 | We may now write @{text "A [+] B"} or @{text "A \<oplus> B"} in input, while
 | 
| 174 | output uses the nicer syntax of $xsymbols$ whenever that print mode is | |
| 175 | active. Such an arrangement is particularly useful for interactive | |
| 176 | development, where users may type ASCII text and see mathematical | |
| 67406 | 177 | symbols displayed during proofs.\<close> | 
| 12635 | 178 | |
| 12629 | 179 | |
| 67406 | 180 | subsection \<open>Prefix Annotations\<close> | 
| 12629 | 181 | |
| 67406 | 182 | text \<open> | 
| 12766 | 183 |   Prefix syntax annotations\index{prefix annotation} are another form
 | 
| 58620 | 184 |   of mixfixes @{cite "isabelle-isar-ref"}, without any template arguments or
 | 
| 12766 | 185 | priorities --- just some literal syntax. The following example | 
| 186 | associates common symbols with the constructors of a datatype. | |
| 67406 | 187 | \<close> | 
| 12629 | 188 | |
| 189 | datatype currency = | |
| 190 |     Euro nat    ("\<euro>")
 | |
| 191 |   | Pounds nat  ("\<pounds>")
 | |
| 192 |   | Yen nat     ("\<yen>")
 | |
| 193 |   | Dollar nat  ("$")
 | |
| 194 | ||
| 67406 | 195 | text \<open> | 
| 12653 | 196 | \noindent Here the mixfix annotations on the rightmost column happen | 
| 197 | to consist of a single Isabelle symbol each: \verb,\,\verb,<euro>,, | |
| 198 | \verb,\,\verb,<pounds>,, \verb,\,\verb,<yen>,, and \verb,$,. Recall | |
| 199 |   that a constructor like @{text Euro} actually is a function @{typ
 | |
| 12746 | 200 |   "nat \<Rightarrow> currency"}.  The expression @{text "Euro 10"} will be
 | 
| 12653 | 201 |   printed as @{term "\<euro> 10"}; only the head of the application is
 | 
| 12743 | 202 | subject to our concrete syntax. This rather simple form already | 
| 203 | achieves conformance with notational standards of the European | |
| 204 | Commission. | |
| 12629 | 205 | |
| 27015 | 206 |   Prefix syntax works the same way for other commands that introduce new constants, e.g. \isakeyword{primrec}.
 | 
| 67406 | 207 | \<close> | 
| 12651 | 208 | |
| 209 | ||
| 67406 | 210 | subsection \<open>Abbreviations \label{sec:abbreviations}\<close>
 | 
| 12651 | 211 | |
| 67406 | 212 | text\<open>Mixfix syntax annotations merely decorate particular constant | 
| 25338 | 213 | application forms with concrete syntax, for instance replacing | 
| 214 | @{text "xor A B"} by @{text "A \<oplus> B"}.  Occasionally, the relationship
 | |
| 215 | between some piece of notation and its internal form is more | |
| 216 | complicated.  Here we need \emph{abbreviations}.
 | |
| 217 | ||
| 218 | Command \commdx{abbreviation} introduces an uninterpreted notational
 | |
| 219 | constant as an abbreviation for a complex term. Abbreviations are | |
| 220 | unfolded upon parsing and re-introduced upon printing. This provides a | |
| 221 | simple mechanism for syntactic macros. | |
| 12651 | 222 | |
| 25338 | 223 | A typical use of abbreviations is to introduce relational notation for | 
| 224 | membership in a set of pairs, replacing @{text "(x, y) \<in> sim"} by
 | |
| 27015 | 225 | @{text "x \<approx> y"}. We assume that a constant @{text sim } of type
 | 
| 67406 | 226 | @{typ"('a \<times> 'a) set"} has been introduced at this point.\<close>
 | 
| 27015 | 227 | (*<*)consts sim :: "('a \<times> 'a) set"(*>*)
 | 
| 25338 | 228 | abbreviation sim2 :: "'a \<Rightarrow> 'a \<Rightarrow> bool" (infix "\<approx>" 50) | 
| 229 | where "x \<approx> y \<equiv> (x, y) \<in> sim" | |
| 12651 | 230 | |
| 67406 | 231 | text \<open>\noindent The given meta-equality is used as a rewrite rule | 
| 25338 | 232 | after parsing (replacing \mbox{@{prop"x \<approx> y"}} by @{text"(x,y) \<in>
 | 
| 233 | sim"}) and before printing (turning @{text"(x,y) \<in> sim"} back into
 | |
| 234 | \mbox{@{prop"x \<approx> y"}}). The name of the dummy constant @{text "sim2"}
 | |
| 235 | does not matter, as long as it is unique. | |
| 236 | ||
| 237 | Another common application of abbreviations is to | |
| 238 | provide variant versions of fundamental relational expressions, such | |
| 239 | as @{text \<noteq>} for negated equalities.  The following declaration
 | |
| 240 | stems from Isabelle/HOL itself: | |
| 67406 | 241 | \<close> | 
| 12635 | 242 | |
| 25338 | 243 | abbreviation not_equal :: "'a \<Rightarrow> 'a \<Rightarrow> bool" (infixl "~=\<ignore>" 50) | 
| 244 | where "x ~=\<ignore> y \<equiv> \<not> (x = y)" | |
| 12629 | 245 | |
| 25338 | 246 | notation (xsymbols) not_equal (infix "\<noteq>\<ignore>" 50) | 
| 247 | ||
| 67406 | 248 | text \<open>\noindent The notation @{text \<noteq>} is introduced separately to restrict it
 | 
| 25338 | 249 | to the \emph{xsymbols} mode.
 | 
| 12651 | 250 | |
| 27015 | 251 | Abbreviations are appropriate when the defined concept is a | 
| 25338 | 252 | simple variation on an existing one. But because of the automatic | 
| 253 | folding and unfolding of abbreviations, they do not scale up well to | |
| 254 | large hierarchies of concepts. Abbreviations do not replace | |
| 255 | definitions. | |
| 12629 | 256 | |
| 25338 | 257 | Abbreviations are a simplified form of the general concept of | 
| 258 | \emph{syntax translations}; even heavier transformations may be
 | |
| 58620 | 259 | written in ML @{cite "isabelle-isar-ref"}.
 | 
| 67406 | 260 | \<close> | 
| 12629 | 261 | |
| 262 | ||
| 67406 | 263 | section \<open>Document Preparation \label{sec:document-preparation}\<close>
 | 
| 12629 | 264 | |
| 67406 | 265 | text \<open> | 
| 12653 | 266 |   Isabelle/Isar is centered around the concept of \bfindex{formal
 | 
| 12766 | 267 |   proof documents}\index{documents|bold}.  The outcome of a formal
 | 
| 268 | development effort is meant to be a human-readable record, presented | |
| 269 | as browsable PDF file or printed on paper. The overall document | |
| 270 | structure follows traditional mathematical articles, with sections, | |
| 271 | intermediate explanations, definitions, theorems and proofs. | |
| 12629 | 272 | |
| 12645 | 273 | \medskip The Isabelle document preparation system essentially acts | 
| 12670 | 274 |   as a front-end to {\LaTeX}.  After checking specifications and
 | 
| 275 | proofs formally, the theory sources are turned into typesetting | |
| 12766 | 276 | instructions in a schematic manner. This lets you write authentic | 
| 277 | reports on theory developments with little effort: many technical | |
| 278 | consistency checks are handled by the system. | |
| 12744 | 279 | |
| 280 | Here is an example to illustrate the idea of Isabelle document | |
| 281 | preparation. | |
| 67406 | 282 | \<close> | 
| 12744 | 283 | |
| 67406 | 284 | text_raw \<open>\begin{quotation}\<close>
 | 
| 12746 | 285 | |
| 67406 | 286 | text \<open> | 
| 12746 | 287 |   The following datatype definition of @{text "'a bintree"} models
 | 
| 288 |   binary trees with nodes being decorated by elements of type @{typ
 | |
| 289 | 'a}. | |
| 67406 | 290 | \<close> | 
| 12744 | 291 | |
| 292 | datatype 'a bintree = | |
| 12746 | 293 | Leaf | Branch 'a "'a bintree" "'a bintree" | 
| 12744 | 294 | |
| 67406 | 295 | text \<open> | 
| 12744 | 296 | \noindent The datatype induction rule generated here is of the form | 
| 12746 | 297 |   @{thm [indent = 1, display] bintree.induct [no_vars]}
 | 
| 67406 | 298 | \<close> | 
| 12744 | 299 | |
| 67406 | 300 | text_raw \<open>\end{quotation}\<close>
 | 
| 12746 | 301 | |
| 67406 | 302 | text \<open> | 
| 12766 | 303 | \noindent The above document output has been produced as follows: | 
| 12744 | 304 | |
| 305 |   \begin{ttbox}
 | |
| 306 |   text {\ttlbrace}*
 | |
| 307 |     The following datatype definition of {\at}{\ttlbrace}text "'a bintree"{\ttrbrace}
 | |
| 308 | models binary trees with nodes being decorated by elements | |
| 309 |     of type {\at}{\ttlbrace}typ 'a{\ttrbrace}.
 | |
| 310 |   *{\ttrbrace}
 | |
| 311 | ||
| 312 | datatype 'a bintree = | |
| 313 | Leaf | Branch 'a "'a bintree" "'a bintree" | |
| 12766 | 314 |   \end{ttbox}
 | 
| 315 |   \begin{ttbox}
 | |
| 12744 | 316 |   text {\ttlbrace}*
 | 
| 317 |     {\ttback}noindent The datatype induction rule generated here is
 | |
| 318 |     of the form {\at}{\ttlbrace}thm [display] bintree.induct [no_vars]{\ttrbrace}
 | |
| 319 |   *{\ttrbrace}
 | |
| 12766 | 320 |   \end{ttbox}\vspace{-\medskipamount}
 | 
| 12744 | 321 | |
| 12746 | 322 | \noindent Here we have augmented the theory by formal comments | 
| 12766 | 323 |   (using \isakeyword{text} blocks), the informal parts may again refer
 | 
| 324 | to formal entities by means of ``antiquotations'' (such as | |
| 12744 | 325 |   \texttt{\at}\verb,{text "'a bintree"}, or
 | 
| 12746 | 326 |   \texttt{\at}\verb,{typ 'a},), see also \S\ref{sec:doc-prep-text}.
 | 
| 67406 | 327 | \<close> | 
| 12645 | 328 | |
| 329 | ||
| 67406 | 330 | subsection \<open>Isabelle Sessions\<close> | 
| 12629 | 331 | |
| 67406 | 332 | text \<open> | 
| 12653 | 333 | In contrast to the highly interactive mode of Isabelle/Isar theory | 
| 334 | development, the document preparation stage essentially works in | |
| 12670 | 335 |   batch-mode.  An Isabelle \bfindex{session} consists of a collection
 | 
| 12766 | 336 | of source files that may contribute to an output document. Each | 
| 337 | session is derived from a single parent, usually an object-logic | |
| 338 |   image like \texttt{HOL}.  This results in an overall tree structure,
 | |
| 339 | which is reflected by the output location in the file system | |
| 54936 | 340 | (the root directory is determined by the Isabelle settings variable | 
| 341 | \verb,ISABELLE_BROWSER_INFO,). | |
| 12645 | 342 | |
| 12683 | 343 | \medskip The easiest way to manage Isabelle sessions is via | 
| 51057 | 344 |   \texttt{isabelle mkroot} (to generate an initial session source
 | 
| 345 |   setup) and \texttt{isabelle build} (to run sessions as specified in
 | |
| 346 |   the corresponding \texttt{ROOT} file).  These Isabelle tools are
 | |
| 347 |   described in further detail in the \emph{Isabelle System Manual}
 | |
| 60270 | 348 |   @{cite "isabelle-system"}.
 | 
| 51057 | 349 | |
| 350 |   For example, a new session \texttt{MySession} (with document
 | |
| 351 | preparation) may be produced as follows: | |
| 12683 | 352 | |
| 353 | \begin{verbatim}
 | |
| 67042 
677cab7c2b85
adapted to changed ROOT syntax (see 13857f49d215);
 wenzelm parents: 
61593diff
changeset | 354 | isabelle mkroot MySession | 
| 51057 | 355 | isabelle build -D MySession | 
| 12683 | 356 | \end{verbatim}
 | 
| 357 | ||
| 51057 | 358 |   The \texttt{isabelle build} job also informs about the file-system
 | 
| 12685 | 359 | location of the ultimate results. The above dry run should be able | 
| 360 |   to produce some \texttt{document.pdf} (with dummy title, empty table
 | |
| 12743 | 361 | of contents etc.). Any failure at this stage usually indicates | 
| 17183 | 362 |   technical problems of the {\LaTeX} installation.
 | 
| 12683 | 363 | |
| 364 | \medskip The detailed arrangement of the session sources is as | |
| 12746 | 365 | follows. | 
| 12645 | 366 | |
| 367 |   \begin{itemize}
 | |
| 368 | ||
| 12670 | 369 |   \item Directory \texttt{MySession} holds the required theory files
 | 
| 370 |   $T@1$\texttt{.thy}, \dots, $T@n$\texttt{.thy}.
 | |
| 12645 | 371 | |
| 51057 | 372 |   \item File \texttt{MySession/ROOT} specifies the session options and
 | 
| 373 | content, with declarations for all wanted theories; it is sufficient | |
| 374 | to specify the terminal nodes of the theory dependency graph. | |
| 12645 | 375 | |
| 376 |   \item Directory \texttt{MySession/document} contains everything
 | |
| 12653 | 377 |   required for the {\LaTeX} stage; only \texttt{root.tex} needs to be
 | 
| 378 | provided initially. | |
| 12645 | 379 | |
| 12653 | 380 |   The latter file holds appropriate {\LaTeX} code to commence a
 | 
| 381 | document (\verb,\documentclass, etc.), and to include the generated | |
| 12743 | 382 |   files $T@i$\texttt{.tex} for each theory.  Isabelle will generate a
 | 
| 383 |   file \texttt{session.tex} holding {\LaTeX} commands to include all
 | |
| 12746 | 384 | generated theory output files in topologically sorted order, so | 
| 385 |   \verb,\input{session}, in the body of \texttt{root.tex} does the job
 | |
| 386 | in most situations. | |
| 12653 | 387 | |
| 12645 | 388 |   \end{itemize}
 | 
| 389 | ||
| 51057 | 390 |   One may now start to populate the directory \texttt{MySession} and
 | 
| 391 |   its \texttt{ROOT} file accordingly.  The file
 | |
| 12766 | 392 |   \texttt{MySession/document/root.tex} should also be adapted at some
 | 
| 12685 | 393 | point; the default version is mostly self-explanatory. Note that | 
| 394 | \verb,\isabellestyle, enables fine-tuning of the general appearance | |
| 395 | of characters and mathematical symbols (see also | |
| 396 |   \S\ref{sec:doc-prep-symbols}).
 | |
| 12653 | 397 | |
| 12685 | 398 |   Especially observe the included {\LaTeX} packages \texttt{isabelle}
 | 
| 399 |   (mandatory), \texttt{isabellesym} (required for mathematical
 | |
| 12743 | 400 |   symbols), and the final \texttt{pdfsetup} (provides sane defaults
 | 
| 12764 | 401 |   for \texttt{hyperref}, including URL markup).  All three are
 | 
| 12743 | 402 | distributed with Isabelle. Further packages may be required in | 
| 12764 | 403 | particular applications, say for unusual mathematical symbols. | 
| 12645 | 404 | |
| 12746 | 405 |   \medskip Any additional files for the {\LaTeX} stage go into the
 | 
| 406 |   \texttt{MySession/document} directory as well.  In particular,
 | |
| 12766 | 407 |   adding a file named \texttt{root.bib} causes an automatic run of
 | 
| 408 |   \texttt{bibtex} to process a bibliographic database; see also
 | |
| 60270 | 409 |   \texttt{isabelle document} @{cite "isabelle-system"}.
 | 
| 12645 | 410 | |
| 12653 | 411 | \medskip Any failure of the document preparation phase in an | 
| 12670 | 412 | Isabelle batch session leaves the generated sources in their target | 
| 12766 | 413 | location, identified by the accompanying error message. This lets | 
| 414 |   you trace {\LaTeX} problems with the generated files at hand.
 | |
| 67406 | 415 | \<close> | 
| 12645 | 416 | |
| 417 | ||
| 67406 | 418 | subsection \<open>Structure Markup\<close> | 
| 12645 | 419 | |
| 67406 | 420 | text \<open> | 
| 12653 | 421 | The large-scale structure of Isabelle documents follows existing | 
| 422 |   {\LaTeX} conventions, with chapters, sections, subsubsections etc.
 | |
| 423 |   The Isar language includes separate \bfindex{markup commands}, which
 | |
| 12681 | 424 | do not affect the formal meaning of a theory (or proof), but result | 
| 12665 | 425 |   in corresponding {\LaTeX} elements.
 | 
| 12645 | 426 | |
| 427 | From the Isabelle perspective, each markup command takes a single | |
| 12746 | 428 |   $text$ argument (delimited by \verb,",~@{text \<dots>}~\verb,", or
 | 
| 429 |   \verb,{,\verb,*,~@{text \<dots>}~\verb,*,\verb,},).  After stripping any
 | |
| 12645 | 430 |   surrounding white space, the argument is passed to a {\LaTeX} macro
 | 
| 12766 | 431 |   \verb,\isamarkupXYZ, for command \isakeyword{XYZ}.  These macros are
 | 
| 432 | defined in \verb,isabelle.sty, according to the meaning given in the | |
| 433 | rightmost column above. | |
| 12645 | 434 | |
| 435 | \medskip The following source fragment illustrates structure markup | |
| 12653 | 436 |   of a theory.  Note that {\LaTeX} labels may be included inside of
 | 
| 437 | section headings as well. | |
| 12645 | 438 | |
| 439 |   \begin{ttbox}
 | |
| 58869 | 440 |   section {\ttlbrace}* Some properties of Foo Bar elements *{\ttrbrace}
 | 
| 12645 | 441 | |
| 15136 | 442 | theory Foo_Bar | 
| 15141 | 443 | imports Main | 
| 15136 | 444 | begin | 
| 12645 | 445 | |
| 446 |   subsection {\ttlbrace}* Basic definitions *{\ttrbrace}
 | |
| 447 | ||
| 27027 | 448 | definition foo :: \dots | 
| 12648 | 449 | |
| 27027 | 450 | definition bar :: \dots | 
| 12648 | 451 | |
| 12645 | 452 |   subsection {\ttlbrace}* Derived rules *{\ttrbrace}
 | 
| 453 | ||
| 454 | lemma fooI: \dots | |
| 455 | lemma fooE: \dots | |
| 456 | ||
| 12648 | 457 |   subsection {\ttlbrace}* Main theorem {\ttback}label{\ttlbrace}sec:main-theorem{\ttrbrace} *{\ttrbrace}
 | 
| 12645 | 458 | |
| 459 | theorem main: \dots | |
| 460 | ||
| 461 | end | |
| 58869 | 462 |   \end{ttbox}
 | 
| 67406 | 463 | \<close> | 
| 12645 | 464 | |
| 465 | ||
| 67406 | 466 | subsection \<open>Formal Comments and Antiquotations \label{sec:doc-prep-text}\<close>
 | 
| 12645 | 467 | |
| 67406 | 468 | text \<open> | 
| 12744 | 469 |   Isabelle \bfindex{source comments}, which are of the form
 | 
| 12746 | 470 |   \verb,(,\verb,*,~@{text \<dots>}~\verb,*,\verb,),, essentially act like
 | 
| 471 | white space and do not really contribute to the content. They | |
| 472 | mainly serve technical purposes to mark certain oddities in the raw | |
| 473 |   input text.  In contrast, \bfindex{formal comments} are portions of
 | |
| 474 | text that are associated with formal Isabelle/Isar commands | |
| 12681 | 475 |   (\bfindex{marginal comments}), or as standalone paragraphs within a
 | 
| 12665 | 476 |   theory or proof context (\bfindex{text blocks}).
 | 
| 12659 | 477 | |
| 478 | \medskip Marginal comments are part of each command's concrete | |
| 58620 | 479 |   syntax @{cite "isabelle-isar-ref"}; the common form is ``\verb,--,~$text$''
 | 
| 12746 | 480 |   where $text$ is delimited by \verb,",@{text \<dots>}\verb,", or
 | 
| 481 |   \verb,{,\verb,*,~@{text \<dots>}~\verb,*,\verb,}, as before.  Multiple
 | |
| 12670 | 482 | marginal comments may be given at the same time. Here is a simple | 
| 483 | example: | |
| 67406 | 484 | \<close> | 
| 12665 | 485 | |
| 486 | lemma "A --> A" | |
| 67443 
3abf6a722518
standardized towards new-style formal comments: isabelle update_comments;
 wenzelm parents: 
67406diff
changeset | 487 | \<comment> \<open>a triviality of propositional logic\<close> | 
| 
3abf6a722518
standardized towards new-style formal comments: isabelle update_comments;
 wenzelm parents: 
67406diff
changeset | 488 | \<comment> \<open>(should not really bother)\<close> | 
| 
3abf6a722518
standardized towards new-style formal comments: isabelle update_comments;
 wenzelm parents: 
67406diff
changeset | 489 | by (rule impI) \<comment> \<open>implicit assumption step involved here\<close> | 
| 12665 | 490 | |
| 67406 | 491 | text \<open> | 
| 12665 | 492 | \noindent The above output has been produced as follows: | 
| 12659 | 493 | |
| 494 | \begin{verbatim}
 | |
| 495 | lemma "A --> A" | |
| 496 | -- "a triviality of propositional logic" | |
| 497 | -- "(should not really bother)" | |
| 498 | by (rule impI) -- "implicit assumption step involved here" | |
| 499 | \end{verbatim}
 | |
| 500 | ||
| 12670 | 501 |   From the {\LaTeX} viewpoint, ``\verb,--,'' acts like a markup
 | 
| 502 | command, associated with the macro \verb,\isamarkupcmt, (taking a | |
| 503 | single argument). | |
| 12659 | 504 | |
| 12665 | 505 |   \medskip Text blocks are introduced by the commands \bfindex{text}
 | 
| 59005 | 506 |   and \bfindex{txt}. Each takes again a single $text$ argument,
 | 
| 507 |   which is interpreted as a free-form paragraph in {\LaTeX}
 | |
| 508 | (surrounded by some additional vertical space). The typesetting | |
| 509 |   may be changed by redefining the {\LaTeX} environments of
 | |
| 510 | \verb,isamarkuptext, or \verb,isamarkuptxt,, respectively | |
| 511 | (via \verb,\renewenvironment,). | |
| 12659 | 512 | |
| 12766 | 513 | \medskip The $text$ part of Isabelle markup commands essentially | 
| 514 |   inserts \emph{quoted material} into a formal text, mainly for
 | |
| 515 |   instruction of the reader.  An \bfindex{antiquotation} is again a
 | |
| 516 | formal object embedded into such an informal portion. The | |
| 517 | interpretation of antiquotations is limited to some well-formedness | |
| 518 | checks, with the result being pretty printed to the resulting | |
| 519 | document. Quoted text blocks together with antiquotations provide | |
| 520 | an attractive means of referring to formal entities, with good | |
| 521 | confidence in getting the technical details right (especially syntax | |
| 522 | and types). | |
| 12659 | 523 | |
| 12665 | 524 | The general syntax of antiquotations is as follows: | 
| 12659 | 525 |   \texttt{{\at}{\ttlbrace}$name$ $arguments${\ttrbrace}}, or
 | 
| 526 |   \texttt{{\at}{\ttlbrace}$name$ [$options$] $arguments${\ttrbrace}}
 | |
| 12665 | 527 | for a comma-separated list of options consisting of a $name$ or | 
| 12766 | 528 |   \texttt{$name$=$value$} each.  The syntax of $arguments$ depends on
 | 
| 529 | the kind of antiquotation, it generally follows the same conventions | |
| 530 | for types, terms, or theorems as in the formal part of a theory. | |
| 12645 | 531 | |
| 12766 | 532 | \medskip This sentence demonstrates quotations and antiquotations: | 
| 533 |   @{term "%x y. x"} is a well-typed term.
 | |
| 12659 | 534 | |
| 12764 | 535 | \medskip\noindent The output above was produced as follows: | 
| 12659 | 536 |   \begin{ttbox}
 | 
| 537 | text {\ttlbrace}*
 | |
| 12764 | 538 | This sentence demonstrates quotations and antiquotations: | 
| 12659 | 539 |   {\at}{\ttlbrace}term "%x y. x"{\ttrbrace} is a well-typed term.
 | 
| 540 | *{\ttrbrace}
 | |
| 12766 | 541 |   \end{ttbox}\vspace{-\medskipamount}
 | 
| 12659 | 542 | |
| 12764 | 543 | The notational change from the ASCII character~\verb,%, to the | 
| 12766 | 544 |   symbol~@{text \<lambda>} reveals that Isabelle printed this term, after
 | 
| 545 | parsing and type-checking. Document preparation enables symbolic | |
| 546 | output by default. | |
| 12659 | 547 | |
| 16523 | 548 | \medskip The next example includes an option to show the type of all | 
| 549 | variables. The antiquotation | |
| 12766 | 550 |   \texttt{{\at}}\verb,{term [show_types] "%x y. x"}, produces the
 | 
| 551 |   output @{term [show_types] "%x y. x"}.  Type inference has figured
 | |
| 552 | out the most general typings in the present theory context. Terms | |
| 553 | may acquire different typings due to constraints imposed by their | |
| 554 | environment; within a proof, for example, variables are given the | |
| 555 | same types as they have in the main goal statement. | |
| 12659 | 556 | |
| 12764 | 557 | \medskip Several further kinds of antiquotations and options are | 
| 58620 | 558 |   available @{cite "isabelle-isar-ref"}.  Here are a few commonly used
 | 
| 12670 | 559 | combinations: | 
| 12659 | 560 | |
| 561 | \medskip | |
| 12651 | 562 | |
| 12659 | 563 |   \begin{tabular}{ll}
 | 
| 564 |   \texttt{\at}\verb,{typ,~$\tau$\verb,}, & print type $\tau$ \\
 | |
| 25338 | 565 |   \texttt{\at}\verb,{const,~$c$\verb,}, & check existence of $c$ and print it \\
 | 
| 12659 | 566 |   \texttt{\at}\verb,{term,~$t$\verb,}, & print term $t$ \\
 | 
| 567 |   \texttt{\at}\verb,{prop,~$\phi$\verb,}, & print proposition $\phi$ \\
 | |
| 12665 | 568 |   \texttt{\at}\verb,{prop [display],~$\phi$\verb,}, & print large proposition $\phi$ (with linebreaks) \\
 | 
| 12659 | 569 |   \texttt{\at}\verb,{prop [source],~$\phi$\verb,}, & check proposition $\phi$, print its input \\
 | 
| 570 |   \texttt{\at}\verb,{thm,~$a$\verb,}, & print fact $a$ \\
 | |
| 571 |   \texttt{\at}\verb,{thm,~$a$~\verb,[no_vars]}, & print fact $a$, fixing schematic variables \\
 | |
| 12746 | 572 |   \texttt{\at}\verb,{thm [source],~$a$\verb,}, & check availability of fact $a$, print its name \\
 | 
| 12659 | 573 |   \texttt{\at}\verb,{text,~$s$\verb,}, & print uninterpreted text $s$ \\
 | 
| 574 |   \end{tabular}
 | |
| 575 | ||
| 576 | \medskip | |
| 577 | ||
| 12665 | 578 |   Note that \attrdx{no_vars} given above is \emph{not} an
 | 
| 579 | antiquotation option, but an attribute of the theorem argument given | |
| 580 | here. This might be useful with a diagnostic command like | |
| 581 |   \isakeyword{thm}, too.
 | |
| 12659 | 582 | |
| 12665 | 583 |   \medskip The \texttt{\at}\verb,{text, $s$\verb,}, antiquotation is
 | 
| 12659 | 584 | particularly interesting. Embedding uninterpreted text within an | 
| 12665 | 585 | informal body might appear useless at first sight. Here the key | 
| 586 | virtue is that the string $s$ is processed as Isabelle output, | |
| 587 | interpreting Isabelle symbols appropriately. | |
| 12659 | 588 | |
| 12665 | 589 |   For example, \texttt{\at}\verb,{text "\<forall>\<exists>"}, produces @{text
 | 
| 590 | "\<forall>\<exists>"}, according to the standard interpretation of these symbol | |
| 591 |   (cf.\ \S\ref{sec:doc-prep-symbols}).  Thus we achieve consistent
 | |
| 12659 | 592 | mathematical notation in both the formal and informal parts of the | 
| 12766 | 593 | document very easily, independently of the term language of | 
| 594 |   Isabelle.  Manual {\LaTeX} code would leave more control over the
 | |
| 595 | typesetting, but is also slightly more tedious. | |
| 67406 | 596 | \<close> | 
| 12645 | 597 | |
| 598 | ||
| 67406 | 599 | subsection \<open>Interpretation of Symbols \label{sec:doc-prep-symbols}\<close>
 | 
| 12645 | 600 | |
| 67406 | 601 | text \<open> | 
| 12665 | 602 |   As has been pointed out before (\S\ref{sec:syntax-symbols}),
 | 
| 12670 | 603 | Isabelle symbols are the smallest syntactic entities --- a | 
| 12681 | 604 | straightforward generalization of ASCII characters. While Isabelle | 
| 12665 | 605 | does not impose any interpretation of the infinite collection of | 
| 12764 | 606 |   named symbols, {\LaTeX} documents use canonical glyphs for certain
 | 
| 58620 | 607 |   standard symbols @{cite "isabelle-isar-ref"}.
 | 
| 12659 | 608 | |
| 12766 | 609 |   The {\LaTeX} code produced from Isabelle text follows a simple
 | 
| 610 | scheme. You can tune the final appearance by redefining certain | |
| 611 |   macros, say in \texttt{root.tex} of the document.
 | |
| 12670 | 612 | |
| 613 |   \begin{enumerate}
 | |
| 12659 | 614 | |
| 12670 | 615 |   \item 7-bit ASCII characters: letters \texttt{A\dots Z} and
 | 
| 12746 | 616 |   \texttt{a\dots z} are output directly, digits are passed as an
 | 
| 12670 | 617 | argument to the \verb,\isadigit, macro, other characters are | 
| 618 | replaced by specifically named macros of the form | |
| 12665 | 619 | \verb,\isacharXYZ,. | 
| 12659 | 620 | |
| 12766 | 621 | \item Named symbols: \verb,\,\verb,<XYZ>, is turned into | 
| 622 |   \verb,{\isasymXYZ},; note the additional braces.
 | |
| 12659 | 623 | |
| 12766 | 624 | \item Named control symbols: \verb,\,\verb,<^XYZ>, is turned into | 
| 625 | \verb,\isactrlXYZ,; subsequent symbols may act as arguments if the | |
| 626 | control macro is defined accordingly. | |
| 12670 | 627 | |
| 12659 | 628 |   \end{enumerate}
 | 
| 12665 | 629 | |
| 12764 | 630 |   You may occasionally wish to give new {\LaTeX} interpretations of
 | 
| 631 | named symbols. This merely requires an appropriate definition of | |
| 12766 | 632 | \verb,\isasymXYZ,, for \verb,\,\verb,<XYZ>, (see | 
| 12746 | 633 |   \texttt{isabelle.sty} for working examples).  Control symbols are
 | 
| 634 | slightly more difficult to get right, though. | |
| 12665 | 635 | |
| 636 | \medskip The \verb,\isabellestyle, macro provides a high-level | |
| 637 | interface to tune the general appearance of individual symbols. For | |
| 12670 | 638 |   example, \verb,\isabellestyle{it}, uses the italics text style to
 | 
| 639 |   mimic the general appearance of the {\LaTeX} math mode; double
 | |
| 12743 | 640 | quotes are not printed at all. The resulting quality of typesetting | 
| 641 | is quite good, so this should be the default style for work that | |
| 642 | gets distributed to a broader audience. | |
| 67406 | 643 | \<close> | 
| 12645 | 644 | |
| 645 | ||
| 67406 | 646 | subsection \<open>Suppressing Output \label{sec:doc-prep-suppress}\<close>
 | 
| 12645 | 647 | |
| 67406 | 648 | text \<open> | 
| 12748 | 649 |   By default, Isabelle's document system generates a {\LaTeX} file for
 | 
| 650 | each theory that gets loaded while running the session. The | |
| 651 |   generated \texttt{session.tex} will include all of these in order of
 | |
| 652 | appearance, which in turn gets included by the standard | |
| 12743 | 653 |   \texttt{root.tex}.  Certainly one may change the order or suppress
 | 
| 12746 | 654 |   unwanted theories by ignoring \texttt{session.tex} and load
 | 
| 655 |   individual files directly in \texttt{root.tex}.  On the other hand,
 | |
| 656 | such an arrangement requires additional maintenance whenever the | |
| 657 | collection of theories changes. | |
| 12648 | 658 | |
| 659 | Alternatively, one may tune the theory loading process in | |
| 51057 | 660 |   \texttt{ROOT} itself: some sequential order of \textbf{theories}
 | 
| 661 | sections may enforce a certain traversal of the dependency graph, | |
| 662 | although this could degrade parallel processing. The nodes of each | |
| 663 | sub-graph that is specified here are presented in some topological | |
| 664 | order of their formal dependencies. | |
| 665 | ||
| 666 | Moreover, the system build option \verb,document=false, allows to | |
| 667 | disable document generation for some theories. Its usage in the | |
| 668 |   session \texttt{ROOT} is like this:
 | |
| 12648 | 669 | |
| 670 | \begin{verbatim}
 | |
| 51057 | 671 | theories [document = false] T | 
| 12648 | 672 | \end{verbatim}
 | 
| 12645 | 673 | |
| 17183 | 674 | \medskip Theory output may be suppressed more selectively, either | 
| 675 |   via \bfindex{tagged command regions} or \bfindex{ignored material}.
 | |
| 12648 | 676 | |
| 17183 | 677 | Tagged command regions works by annotating commands with named tags, | 
| 678 |   which correspond to certain {\LaTeX} markup that tells how to treat
 | |
| 679 | particular parts of a document when doing the actual type-setting. | |
| 680 | By default, certain Isabelle/Isar commands are implicitly marked up | |
| 681 |   using the predefined tags ``\emph{theory}'' (for theory begin and
 | |
| 682 |   end), ``\emph{proof}'' (for proof commands), and ``\emph{ML}'' (for
 | |
| 683 | commands involving ML code). Users may add their own tags using the | |
| 684 |   \verb,%,\emph{tag} notation right after a command name.  In the
 | |
| 685 | subsequent example we hide a particularly irrelevant proof: | |
| 67406 | 686 | \<close> | 
| 12648 | 687 | |
| 17183 | 688 | lemma "x = x" by %invisible (simp) | 
| 12648 | 689 | |
| 67406 | 690 | text \<open> | 
| 17183 | 691 | The original source has been ``\verb,lemma "x = x" by %invisible (simp),''. | 
| 692 | Tags observe the structure of proofs; adjacent commands with the | |
| 693 | same tag are joined into a single region. The Isabelle document | |
| 694 | preparation system allows the user to specify how to interpret a | |
| 695 | tagged region, in order to keep, drop, or fold the corresponding | |
| 696 |   parts of the document.  See the \emph{Isabelle System Manual}
 | |
| 60270 | 697 |   @{cite "isabelle-system"} for further details, especially on
 | 
| 51057 | 698 |   \texttt{isabelle build} and \texttt{isabelle document}.
 | 
| 12648 | 699 | |
| 17183 | 700 | Ignored material is specified by delimiting the original formal | 
| 701 | source with special source comments | |
| 702 | \verb,(,\verb,*,\verb,<,\verb,*,\verb,), and | |
| 703 | \verb,(,\verb,*,\verb,>,\verb,*,\verb,),. These parts are stripped | |
| 704 | before the type-setting phase, without affecting the formal checking | |
| 705 | of the theory, of course. For example, we may hide parts of a proof | |
| 706 | that seem unfit for general public inspection. The following | |
| 707 | ``fully automatic'' proof is actually a fake: | |
| 67406 | 708 | \<close> | 
| 12651 | 709 | |
| 710 | lemma "x \<noteq> (0::int) \<Longrightarrow> 0 < x * x" | |
| 14353 
79f9fbef9106
Added lemmas to Ring_and_Field with slightly modified simplification rules
 paulson parents: 
13439diff
changeset | 711 | by (auto(*<*)simp add: zero_less_mult_iff(*>*)) | 
| 12651 | 712 | |
| 67406 | 713 | text \<open> | 
| 17183 | 714 | \noindent The real source of the proof has been as follows: | 
| 12651 | 715 | |
| 716 | \begin{verbatim}
 | |
| 14353 
79f9fbef9106
Added lemmas to Ring_and_Field with slightly modified simplification rules
 paulson parents: 
13439diff
changeset | 717 | by (auto(*<*)simp add: zero_less_mult_iff(*>*)) | 
| 12659 | 718 | \end{verbatim}
 | 
| 719 | %(* | |
| 12651 | 720 | |
| 12766 | 721 | \medskip Suppressing portions of printed text demands care. You | 
| 722 | should not misrepresent the underlying theory development. It is | |
| 723 | easy to invalidate the visible text by hiding references to | |
| 17183 | 724 | questionable axioms, for example. | 
| 67406 | 725 | \<close> | 
| 12629 | 726 | |
| 11647 | 727 | (*<*) | 
| 728 | end | |
| 729 | (*>*) |