52 taken, as the name spaces are always ``open''. Use adequate names; |
46 taken, as the name spaces are always ``open''. Use adequate names; |
53 avoid unreadable abbreviations. The general naming convention is to |
47 avoid unreadable abbreviations. The general naming convention is to |
54 separate word constituents by underscores, as in <tt>foo_bar</tt> or |
48 separate word constituents by underscores, as in <tt>foo_bar</tt> or |
55 <tt>Foo_Bar</tt> (this looks best in LaTeX output). |
49 <tt>Foo_Bar</tt> (this looks best in LaTeX output). |
56 |
50 |
57 <p> |
|
58 |
|
59 Note that syntax is <em>global</em>; qualified names lose syntax on |
|
60 output. Do not use ``exotic'' symbols for syntax (such as |
|
61 <tt>\<oplus></tt>), but leave these for user applications. |
|
62 |
|
63 <dt><strong>Global context declarations</strong> |
51 <dt><strong>Global context declarations</strong> |
64 |
52 |
65 <dd>Only items introduced in the present theory should be declared |
53 <dd>Only items introduced in the present theory should be declared |
66 globally (e.g. as Simplifier rules). Note that adding and deleting |
54 globally (e.g. as Simplifier rules). Note that adding and deleting |
67 rules from parent theories may result in strange behavior later, |
55 rules from parent theories may result in strange behavior later, |
68 depending on the user's arrangement of import lists. |
56 depending on the user's arrangement of import lists. |
69 |
|
70 <dt><strong>Mathematical symbols</strong> |
|
71 |
|
72 <dd>Non-ASCII symbols should be used as appropriate, with some |
|
73 care. In particular, avoid unreadable arrows: <tt>==></tt> should |
|
74 be preferred over <tt>\<Longrightarrow></tt>. Use <tt>isabelle |
|
75 unsymbolize</tt> to clean up the sources. |
|
76 |
|
77 <p> |
|
78 |
|
79 The following ASCII symbols of HOL should be generally avoided: |
|
80 <tt>@</tt>, <tt>!</tt>, <tt>?</tt>, <tt>?!</tt>, <tt>%</tt>, better |
|
81 use <tt>SOME</tt>, <tt>ALL</tt> (or <tt>\<forall></tt>), |
|
82 <tt>EX</tt> (or <tt>\<exists></tt>), <tt>EX!</tt> (or |
|
83 <tt>\<exists>!</tt>), <tt>\<lambda></tt>, respectively. |
|
84 Note that bracket notation <tt>[| |]</tt> looks bad in LaTeX |
|
85 output. |
|
86 |
|
87 <p> |
|
88 |
|
89 Some additional mathematical symbols are quite suitable for both |
|
90 readable sources and the output document: |
|
91 <tt>\<Inter></tt>, |
|
92 <tt>\<Union></tt>, |
|
93 <tt>\<and></tt>, |
|
94 <tt>\<in></tt>, |
|
95 <tt>\<inter></tt>, |
|
96 <tt>\<le></tt>, |
|
97 <tt>\<not></tt>, |
|
98 <tt>\<noteq></tt>, |
|
99 <tt>\<notin></tt>, |
|
100 <tt>\<or></tt>, |
|
101 <tt>\<subset></tt>, |
|
102 <tt>\<subseteq></tt>, |
|
103 <tt>\<times></tt>, |
|
104 <tt>\<union></tt>. |
|
105 |
57 |
106 <dt><strong>Spacing</strong> |
58 <dt><strong>Spacing</strong> |
107 |
59 |
108 <dd>Isabelle is able to produce a high-quality LaTeX document from the |
60 <dd>Isabelle is able to produce a high-quality LaTeX document from the |
109 theory sources, provided some minor issues are taken care of. In |
61 theory sources, provided some minor issues are taken care of. In |
110 particular, spacing and line breaks are directly taken from source |
62 particular, spacing and line breaks are directly taken from source |
111 text. Incidentally, output looks very good if common type-setting |
63 text. Incidentally, output looks very good if common type-setting |
112 conventions are observed: put a single space <em>after</em> each |
64 conventions are observed: put a single space <em>after</em> each |
113 punctuation character ("<tt>,</tt>", "<tt>.</tt>", etc.), but none |
65 punctuation character ("<tt>,</tt>", "<tt>.</tt>", etc.), but none |
114 before it; do not extra spaces inside of parentheses, unless the |
66 before it; do not extra spaces inside of parentheses; do not attempt |
115 delimiters are composed of multiple symbols (as in |
67 to simulate table markup with spaces, avoid ``hanging'' indentations. |
116 <tt>[| |]</tt>); do not attempt to simulate table markup with |
|
117 spaces, avoid ``hanging'' indentations. |
|
118 |
68 |
119 </dl> |
69 </dl> |
120 |
70 |
121 </body> |
71 </body> |
122 </html> |
72 </html> |