| author | bulwahn | 
| Wed, 25 Aug 2010 16:59:49 +0200 | |
| changeset 38730 | 5bbdd9a9df62 | 
| parent 31975 | 366ad09d39ef | 
| child 42062 | 9fe5daa2e705 | 
| permissions | -rw-r--r-- | 
| 15283 | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | 
| 2 | ||
| 10253 | 3 | <html> | 
| 4 | ||
| 15582 | 5 | <head> | 
| 6 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
| 7 | <title>HOL-Library/README</title> | |
| 8 | </head> | |
| 10253 | 9 | |
| 10 | <body> | |
| 11 | ||
| 12 | <h1>HOL-Library: supplemental theories for main Isabelle/HOL</h1> | |
| 13 | ||
| 14 | This is a collection of generic theories that may be used together | |
| 15 | with main Isabelle/HOL. Note that theory loader path already includes | |
| 16 | this directory by default. | |
| 17 | ||
| 18 | <p> | |
| 19 | ||
| 20 | Addition of new theories should be done with some care, as the | |
| 21 | ``module system'' of Isabelle is rather simplistic. The following | |
| 22 | guidelines may be helpful to achieve maximum re-usability and minimum | |
| 23 | clashes with existing developments. | |
| 24 | ||
| 25 | <dl> | |
| 26 | ||
| 27 | <dt><strong>Files</strong> | |
| 10282 | 28 | |
| 10253 | 29 | <dd>Avoid unnecessary scattering of theories over several files. Use | 
| 30 | new-style theories only, as old ones tend to clutter the file space | |
| 31 | with separate <tt>.thy</tt> and <tt>.ML</tt> files. | |
| 32 | ||
| 33 | <dt><strong>Examples</strong> | |
| 34 | ||
| 35 | <dd>Theories should be as ``generic'' as is sensible. Unused (or | |
| 10282 | 36 | rather unusable?) theories should be avoided; common applications | 
| 37 | should actually refer to the present theory. Small example uses may | |
| 38 | be included in the library as well, but should be put in a separate | |
| 10253 | 39 | theory, such as <tt>Foobar</tt> accompanied by | 
| 40 | <tt>Foobar_Examples</tt>. | |
| 41 | ||
| 42 | <dt><strong>Theory names</strong> | |
| 10282 | 43 | |
| 10253 | 44 | <dd>The theory loader name space is <em>flat</em>, so use sufficiently | 
| 45 | long and descriptive names to reduce the danger of clashes with the | |
| 46 | user's own theories. The convention for theory names is as follows: | |
| 47 | <tt>Foobar_Doobar</tt> (this looks best in LaTeX output). | |
| 48 | ||
| 49 | <dt><strong>Names of logical items</strong> | |
| 10282 | 50 | |
| 10253 | 51 | <dd>There are separate hierarchically structured name spaces for | 
| 52 | types, constants, theorems etc. Nevertheless, some care should be | |
| 53 | taken, as the name spaces are always ``open''. Use adequate names; | |
| 54 | avoid unreadable abbreviations. The general naming convention is to | |
| 55 | separate word constituents by underscores, as in <tt>foo_bar</tt> or | |
| 56 | <tt>Foo_Bar</tt> (this looks best in LaTeX output). | |
| 57 | ||
| 58 | <p> | |
| 59 | ||
| 26406 | 60 | Note that syntax is <em>global</em>; qualified names lose syntax on | 
| 10253 | 61 | output. Do not use ``exotic'' symbols for syntax (such as | 
| 62 | <tt>\<oplus></tt>), but leave these for user applications. | |
| 63 | ||
| 64 | <dt><strong>Global context declarations</strong> | |
| 10282 | 65 | |
| 10253 | 66 | <dd>Only items introduced in the present theory should be declared | 
| 10282 | 67 | globally (e.g. as Simplifier rules). Note that adding and deleting | 
| 68 | rules from parent theories may result in strange behavior later, | |
| 69 | depending on the user's arrangement of import lists. | |
| 10253 | 70 | |
| 71 | <dt><strong>Mathematical symbols</strong> | |
| 10282 | 72 | |
| 73 | <dd>Non-ASCII symbols should be used as appropriate, with some | |
| 74 | care. In particular, avoid unreadable arrows: <tt>==></tt> should | |
| 28504 
7ad7d7d6df47
simplified main Isabelle executables: removed Isabelle and isabelle (replaced by isabelle-process), renamed isatool to isabelle;
 wenzelm parents: 
26406diff
changeset | 75 | be preferred over <tt>\<Longrightarrow></tt>. Use <tt>isabelle | 
| 10282 | 76 | unsymbolize</tt> to clean up the sources. | 
| 10253 | 77 | |
| 78 | <p> | |
| 79 | ||
| 80 | The following ASCII symbols of HOL should be generally avoided: | |
| 81 | <tt>@</tt>, <tt>!</tt>, <tt>?</tt>, <tt>?!</tt>, <tt>%</tt>, better | |
| 82 | use <tt>SOME</tt>, <tt>ALL</tt> (or <tt>\<forall></tt>), | |
| 83 | <tt>EX</tt> (or <tt>\<exists></tt>), <tt>EX!</tt> (or | |
| 10282 | 84 | <tt>\<exists>!</tt>), <tt>\<lambda></tt>, respectively. | 
| 10253 | 85 | Note that bracket notation <tt>[| |]</tt> looks bad in LaTeX | 
| 86 | output. | |
| 87 | ||
| 88 | <p> | |
| 89 | ||
| 90 | Some additional mathematical symbols are quite suitable for both | |
| 10282 | 91 | readable sources and the output document: | 
| 10253 | 92 | <tt>\<Inter></tt>, | 
| 93 | <tt>\<Union></tt>, | |
| 94 | <tt>\<and></tt>, | |
| 95 | <tt>\<in></tt>, | |
| 96 | <tt>\<inter></tt>, | |
| 10334 | 97 | <tt>\<le></tt>, | 
| 10253 | 98 | <tt>\<not></tt>, | 
| 99 | <tt>\<noteq></tt>, | |
| 100 | <tt>\<notin></tt>, | |
| 101 | <tt>\<or></tt>, | |
| 102 | <tt>\<subset></tt>, | |
| 103 | <tt>\<subseteq></tt>, | |
| 104 | <tt>\<times></tt>, | |
| 105 | <tt>\<union></tt>. | |
| 106 | ||
| 107 | <dt><strong>Spacing</strong> | |
| 108 | ||
| 109 | <dd>Isabelle is able to produce a high-quality LaTeX document from the | |
| 110 | theory sources, provided some minor issues are taken care of. In | |
| 111 | particular, spacing and line breaks are directly taken from source | |
| 26406 | 112 | text. Incidentally, output looks very good if common type-setting | 
| 10253 | 113 | conventions are observed: put a single space <em>after</em> each | 
| 114 | punctuation character ("<tt>,</tt>", "<tt>.</tt>", etc.), but none
 | |
| 115 | before it; do not extra spaces inside of parentheses, unless the | |
| 116 | delimiters are composed of multiple symbols (as in | |
| 117 | <tt>[| |]</tt>); do not attempt to simulate table markup with | |
| 118 | spaces, avoid ``hanging'' indentations. | |
| 119 | ||
| 120 | </dl> | |
| 121 | ||
| 122 | </body> | |
| 123 | </html> |