39 |
52 |
40 Infix declarations\index{infix annotations} provide a useful special |
53 Infix declarations\index{infix annotations} provide a useful special |
41 case of mixfixes. The following example of the exclusive-or |
54 case of mixfixes. The following example of the exclusive-or |
42 operation on boolean values illustrates typical infix declarations.% |
55 operation on boolean values illustrates typical infix declarations.% |
43 \end{isamarkuptext}% |
56 \end{isamarkuptext}% |
44 \isamarkuptrue% |
57 \isamarkupfalse% |
45 \isacommand{constdefs}\isanewline |
58 \isacommand{constdefs}\isanewline |
46 \ \ xor\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}bool\ {\isasymRightarrow}\ bool\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infixl}\ {\isachardoublequote}{\isacharbrackleft}{\isacharplus}{\isacharbrackright}{\isachardoublequote}\ {\isadigit{6}}{\isadigit{0}}{\isacharparenright}\isanewline |
59 \ \ xor\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}bool\ {\isasymRightarrow}\ bool\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infixl}\ {\isachardoublequote}{\isacharbrackleft}{\isacharplus}{\isacharbrackright}{\isachardoublequote}\ {\isadigit{6}}{\isadigit{0}}{\isacharparenright}\isanewline |
47 \ \ {\isachardoublequote}A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ B\ {\isasymequiv}\ {\isacharparenleft}A\ {\isasymand}\ {\isasymnot}\ B{\isacharparenright}\ {\isasymor}\ {\isacharparenleft}{\isasymnot}\ A\ {\isasymand}\ B{\isacharparenright}{\isachardoublequote}\isamarkupfalse% |
60 \ \ {\isachardoublequote}A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ B\ {\isasymequiv}\ {\isacharparenleft}A\ {\isasymand}\ {\isasymnot}\ B{\isacharparenright}\ {\isasymor}\ {\isacharparenleft}{\isasymnot}\ A\ {\isasymand}\ B{\isacharparenright}{\isachardoublequote}\isamarkuptrue% |
48 % |
61 % |
49 \begin{isamarkuptext}% |
62 \begin{isamarkuptext}% |
50 \noindent Now \isa{xor\ A\ B} and \isa{A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ B} refer to the |
63 \noindent Now \isa{xor\ A\ B} and \isa{A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}\ B} refer to the |
51 same expression internally. Any curried function with at least two |
64 same expression internally. Any curried function with at least two |
52 arguments may be given infix syntax. For partial applications with |
65 arguments may be given infix syntax. For partial applications with |
140 |
153 |
141 |
154 |
142 \medskip Replacing our definition of \isa{xor} by the following |
155 \medskip Replacing our definition of \isa{xor} by the following |
143 specifies an Isabelle symbol for the new operator:% |
156 specifies an Isabelle symbol for the new operator:% |
144 \end{isamarkuptext}% |
157 \end{isamarkuptext}% |
145 \isamarkuptrue% |
158 % |
146 \isamarkupfalse% |
159 \isadelimML |
|
160 % |
|
161 \endisadelimML |
|
162 % |
|
163 \isatagML |
|
164 % |
|
165 \endisatagML |
|
166 {\isafoldML}% |
|
167 % |
|
168 \isadelimML |
|
169 % |
|
170 \endisadelimML |
147 \isamarkupfalse% |
171 \isamarkupfalse% |
148 \isacommand{constdefs}\isanewline |
172 \isacommand{constdefs}\isanewline |
149 \ \ xor\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}bool\ {\isasymRightarrow}\ bool\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infixl}\ {\isachardoublequote}{\isasymoplus}{\isachardoublequote}\ {\isadigit{6}}{\isadigit{0}}{\isacharparenright}\isanewline |
173 \ \ xor\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}bool\ {\isasymRightarrow}\ bool\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infixl}\ {\isachardoublequote}{\isasymoplus}{\isachardoublequote}\ {\isadigit{6}}{\isadigit{0}}{\isacharparenright}\isanewline |
150 \ \ {\isachardoublequote}A\ {\isasymoplus}\ B\ {\isasymequiv}\ {\isacharparenleft}A\ {\isasymand}\ {\isasymnot}\ B{\isacharparenright}\ {\isasymor}\ {\isacharparenleft}{\isasymnot}\ A\ {\isasymand}\ B{\isacharparenright}{\isachardoublequote}\isamarkupfalse% |
174 \ \ {\isachardoublequote}A\ {\isasymoplus}\ B\ {\isasymequiv}\ {\isacharparenleft}A\ {\isasymand}\ {\isasymnot}\ B{\isacharparenright}\ {\isasymor}\ {\isacharparenleft}{\isasymnot}\ A\ {\isasymand}\ B{\isacharparenright}{\isachardoublequote}\isamarkuptrue% |
151 \isamarkupfalse% |
|
152 % |
175 % |
153 \begin{isamarkuptext}% |
176 \begin{isamarkuptext}% |
154 \noindent The X-Symbol package within Proof~General provides several |
177 \noindent The X-Symbol package within Proof~General provides several |
155 input methods to enter \isa{{\isasymoplus}} in the text. If all fails one may |
178 input methods to enter \isa{{\isasymoplus}} in the text. If all fails one may |
156 just type a named entity \verb,\,\verb,<oplus>, by hand; the |
179 just type a named entity \verb,\,\verb,<oplus>, by hand; the |
160 through the \bfindex{print mode} concept~\cite{isabelle-ref}. By |
183 through the \bfindex{print mode} concept~\cite{isabelle-ref}. By |
161 convention, the mode of ``$xsymbols$'' is enabled whenever |
184 convention, the mode of ``$xsymbols$'' is enabled whenever |
162 Proof~General's X-Symbol mode or {\LaTeX} output is active. Now |
185 Proof~General's X-Symbol mode or {\LaTeX} output is active. Now |
163 consider the following hybrid declaration of \isa{xor}:% |
186 consider the following hybrid declaration of \isa{xor}:% |
164 \end{isamarkuptext}% |
187 \end{isamarkuptext}% |
165 \isamarkuptrue% |
188 % |
166 \isamarkupfalse% |
189 \isadelimML |
|
190 % |
|
191 \endisadelimML |
|
192 % |
|
193 \isatagML |
|
194 % |
|
195 \endisatagML |
|
196 {\isafoldML}% |
|
197 % |
|
198 \isadelimML |
|
199 % |
|
200 \endisadelimML |
167 \isamarkupfalse% |
201 \isamarkupfalse% |
168 \isacommand{constdefs}\isanewline |
202 \isacommand{constdefs}\isanewline |
169 \ \ 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 |
203 \ \ 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 |
170 \ \ {\isachardoublequote}A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}{\isasymignore}\ B\ {\isasymequiv}\ {\isacharparenleft}A\ {\isasymand}\ {\isasymnot}\ B{\isacharparenright}\ {\isasymor}\ {\isacharparenleft}{\isasymnot}\ A\ {\isasymand}\ B{\isacharparenright}{\isachardoublequote}\isanewline |
204 \ \ {\isachardoublequote}A\ {\isacharbrackleft}{\isacharplus}{\isacharbrackright}{\isasymignore}\ B\ {\isasymequiv}\ {\isacharparenleft}A\ {\isasymand}\ {\isasymnot}\ B{\isacharparenright}\ {\isasymor}\ {\isacharparenleft}{\isasymnot}\ A\ {\isasymand}\ B{\isacharparenright}{\isachardoublequote}\isanewline |
171 \isanewline |
205 \isanewline |
172 \isamarkupfalse% |
206 \isamarkupfalse% |
173 \isacommand{syntax}\ {\isacharparenleft}xsymbols{\isacharparenright}\isanewline |
207 \isacommand{syntax}\ {\isacharparenleft}xsymbols{\isacharparenright}\isanewline |
174 \ \ xor\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}bool\ {\isasymRightarrow}\ bool\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infixl}\ {\isachardoublequote}{\isasymoplus}{\isasymignore}{\isachardoublequote}\ {\isadigit{6}}{\isadigit{0}}{\isacharparenright}\isamarkupfalse% |
208 \ \ xor\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}bool\ {\isasymRightarrow}\ bool\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infixl}\ {\isachardoublequote}{\isasymoplus}{\isasymignore}{\isachardoublequote}\ {\isadigit{6}}{\isadigit{0}}{\isacharparenright}\isamarkuptrue% |
175 \isamarkupfalse% |
|
176 % |
209 % |
177 \begin{isamarkuptext}% |
210 \begin{isamarkuptext}% |
178 The \commdx{syntax} command introduced here acts like |
211 The \commdx{syntax} command introduced here acts like |
179 \isakeyword{consts}, but without declaring a logical constant. The |
212 \isakeyword{consts}, but without declaring a logical constant. The |
180 print mode specification of \isakeyword{syntax}, here \isa{{\isacharparenleft}xsymbols{\isacharparenright}}, is optional. Also note that its type merely serves |
213 print mode specification of \isakeyword{syntax}, here \isa{{\isacharparenleft}xsymbols{\isacharparenright}}, is optional. Also note that its type merely serves |
197 Prefix syntax annotations\index{prefix annotation} are another form |
230 Prefix syntax annotations\index{prefix annotation} are another form |
198 of mixfixes \cite{isabelle-ref}, without any template arguments or |
231 of mixfixes \cite{isabelle-ref}, without any template arguments or |
199 priorities --- just some literal syntax. The following example |
232 priorities --- just some literal syntax. The following example |
200 associates common symbols with the constructors of a datatype.% |
233 associates common symbols with the constructors of a datatype.% |
201 \end{isamarkuptext}% |
234 \end{isamarkuptext}% |
202 \isamarkuptrue% |
235 \isamarkupfalse% |
203 \isacommand{datatype}\ currency\ {\isacharequal}\isanewline |
236 \isacommand{datatype}\ currency\ {\isacharequal}\isanewline |
204 \ \ \ \ Euro\ nat\ \ \ \ {\isacharparenleft}{\isachardoublequote}{\isasymeuro}{\isachardoublequote}{\isacharparenright}\isanewline |
237 \ \ \ \ Euro\ nat\ \ \ \ {\isacharparenleft}{\isachardoublequote}{\isasymeuro}{\isachardoublequote}{\isacharparenright}\isanewline |
205 \ \ {\isacharbar}\ Pounds\ nat\ \ {\isacharparenleft}{\isachardoublequote}{\isasympounds}{\isachardoublequote}{\isacharparenright}\isanewline |
238 \ \ {\isacharbar}\ Pounds\ nat\ \ {\isacharparenleft}{\isachardoublequote}{\isasympounds}{\isachardoublequote}{\isacharparenright}\isanewline |
206 \ \ {\isacharbar}\ Yen\ nat\ \ \ \ \ {\isacharparenleft}{\isachardoublequote}{\isasymyen}{\isachardoublequote}{\isacharparenright}\isanewline |
239 \ \ {\isacharbar}\ Yen\ nat\ \ \ \ \ {\isacharparenleft}{\isachardoublequote}{\isasymyen}{\isachardoublequote}{\isacharparenright}\isanewline |
207 \ \ {\isacharbar}\ Dollar\ nat\ \ {\isacharparenleft}{\isachardoublequote}{\isachardollar}{\isachardoublequote}{\isacharparenright}\isamarkupfalse% |
240 \ \ {\isacharbar}\ Dollar\ nat\ \ {\isacharparenleft}{\isachardoublequote}{\isachardollar}{\isachardoublequote}{\isacharparenright}\isamarkuptrue% |
208 % |
241 % |
209 \begin{isamarkuptext}% |
242 \begin{isamarkuptext}% |
210 \noindent Here the mixfix annotations on the rightmost column happen |
243 \noindent Here the mixfix annotations on the rightmost column happen |
211 to consist of a single Isabelle symbol each: \verb,\,\verb,<euro>,, |
244 to consist of a single Isabelle symbol each: \verb,\,\verb,<euro>,, |
212 \verb,\,\verb,<pounds>,, \verb,\,\verb,<yen>,, and \verb,$,. Recall |
245 \verb,\,\verb,<pounds>,, \verb,\,\verb,<yen>,, and \verb,$,. Recall |
241 |
274 |
242 \medskip A typical use of syntax translations is to introduce |
275 \medskip A typical use of syntax translations is to introduce |
243 relational notation for membership in a set of pair, replacing \ |
276 relational notation for membership in a set of pair, replacing \ |
244 \isa{{\isacharparenleft}x{\isacharcomma}\ y{\isacharparenright}\ {\isasymin}\ sim} by \isa{x\ {\isasymapprox}\ y}.% |
277 \isa{{\isacharparenleft}x{\isacharcomma}\ y{\isacharparenright}\ {\isasymin}\ sim} by \isa{x\ {\isasymapprox}\ y}.% |
245 \end{isamarkuptext}% |
278 \end{isamarkuptext}% |
246 \isamarkuptrue% |
279 \isamarkupfalse% |
247 \isacommand{consts}\isanewline |
280 \isacommand{consts}\isanewline |
248 \ \ sim\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}{\isacharparenleft}{\isacharprime}a\ {\isasymtimes}\ {\isacharprime}a{\isacharparenright}\ set{\isachardoublequote}\isanewline |
281 \ \ sim\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}{\isacharparenleft}{\isacharprime}a\ {\isasymtimes}\ {\isacharprime}a{\isacharparenright}\ set{\isachardoublequote}\isanewline |
249 \isanewline |
282 \isanewline |
250 \isamarkupfalse% |
283 \isamarkupfalse% |
251 \isacommand{syntax}\isanewline |
284 \isacommand{syntax}\isanewline |
252 \ \ {\isachardoublequote}{\isacharunderscore}sim{\isachardoublequote}\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}{\isacharprime}a\ {\isasymRightarrow}\ {\isacharprime}a\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infix}\ {\isachardoublequote}{\isasymapprox}{\isachardoublequote}\ {\isadigit{5}}{\isadigit{0}}{\isacharparenright}\isanewline |
285 \ \ {\isachardoublequote}{\isacharunderscore}sim{\isachardoublequote}\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}{\isacharprime}a\ {\isasymRightarrow}\ {\isacharprime}a\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infix}\ {\isachardoublequote}{\isasymapprox}{\isachardoublequote}\ {\isadigit{5}}{\isadigit{0}}{\isacharparenright}\isanewline |
253 \isamarkupfalse% |
286 \isamarkupfalse% |
254 \isacommand{translations}\isanewline |
287 \isacommand{translations}\isanewline |
255 \ \ {\isachardoublequote}x\ {\isasymapprox}\ y{\isachardoublequote}\ {\isasymrightleftharpoons}\ {\isachardoublequote}{\isacharparenleft}x{\isacharcomma}\ y{\isacharparenright}\ {\isasymin}\ sim{\isachardoublequote}\isamarkupfalse% |
288 \ \ {\isachardoublequote}x\ {\isasymapprox}\ y{\isachardoublequote}\ {\isasymrightleftharpoons}\ {\isachardoublequote}{\isacharparenleft}x{\isacharcomma}\ y{\isacharparenright}\ {\isasymin}\ sim{\isachardoublequote}\isamarkuptrue% |
256 % |
289 % |
257 \begin{isamarkuptext}% |
290 \begin{isamarkuptext}% |
258 \noindent Here the name of the dummy constant \isa{{\isacharunderscore}sim} does |
291 \noindent Here the name of the dummy constant \isa{{\isacharunderscore}sim} does |
259 not matter, as long as it is not used elsewhere. Prefixing an |
292 not matter, as long as it is not used elsewhere. Prefixing an |
260 underscore is a common convention. The \isakeyword{translations} |
293 underscore is a common convention. The \isakeyword{translations} |
265 \medskip Another common application of syntax translations is to |
298 \medskip Another common application of syntax translations is to |
266 provide variant versions of fundamental relational expressions, such |
299 provide variant versions of fundamental relational expressions, such |
267 as \isa{{\isasymnoteq}} for negated equalities. The following declaration |
300 as \isa{{\isasymnoteq}} for negated equalities. The following declaration |
268 stems from Isabelle/HOL itself:% |
301 stems from Isabelle/HOL itself:% |
269 \end{isamarkuptext}% |
302 \end{isamarkuptext}% |
270 \isamarkuptrue% |
303 \isamarkupfalse% |
271 \isacommand{syntax}\ {\isachardoublequote}{\isacharunderscore}not{\isacharunderscore}equal{\isachardoublequote}\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}{\isacharprime}a\ {\isasymRightarrow}\ {\isacharprime}a\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infixl}\ {\isachardoublequote}{\isasymnoteq}{\isasymignore}{\isachardoublequote}\ {\isadigit{5}}{\isadigit{0}}{\isacharparenright}\isanewline |
304 \isacommand{syntax}\ {\isachardoublequote}{\isacharunderscore}not{\isacharunderscore}equal{\isachardoublequote}\ {\isacharcolon}{\isacharcolon}\ {\isachardoublequote}{\isacharprime}a\ {\isasymRightarrow}\ {\isacharprime}a\ {\isasymRightarrow}\ bool{\isachardoublequote}\ \ \ \ {\isacharparenleft}\isakeyword{infixl}\ {\isachardoublequote}{\isasymnoteq}{\isasymignore}{\isachardoublequote}\ {\isadigit{5}}{\isadigit{0}}{\isacharparenright}\isanewline |
272 \isamarkupfalse% |
305 \isamarkupfalse% |
273 \isacommand{translations}\ {\isachardoublequote}x\ {\isasymnoteq}{\isasymignore}\ y{\isachardoublequote}\ {\isasymrightleftharpoons}\ {\isachardoublequote}{\isasymnot}\ {\isacharparenleft}x\ {\isacharequal}\ y{\isacharparenright}{\isachardoublequote}\isamarkupfalse% |
306 \isacommand{translations}\ {\isachardoublequote}x\ {\isasymnoteq}{\isasymignore}\ y{\isachardoublequote}\ {\isasymrightleftharpoons}\ {\isachardoublequote}{\isasymnot}\ {\isacharparenleft}x\ {\isacharequal}\ y{\isacharparenright}{\isachardoublequote}\isamarkuptrue% |
274 % |
307 % |
275 \begin{isamarkuptext}% |
308 \begin{isamarkuptext}% |
276 \noindent Normally one would introduce derived concepts like this |
309 \noindent Normally one would introduce derived concepts like this |
277 within the logic, using \isakeyword{consts} + \isakeyword{defs} |
310 within the logic, using \isakeyword{consts} + \isakeyword{defs} |
278 instead of \isakeyword{syntax} + \isakeyword{translations}. The |
311 instead of \isakeyword{syntax} + \isakeyword{translations}. The |
307 consistency checks are handled by the system. |
340 consistency checks are handled by the system. |
308 |
341 |
309 Here is an example to illustrate the idea of Isabelle document |
342 Here is an example to illustrate the idea of Isabelle document |
310 preparation.% |
343 preparation.% |
311 \end{isamarkuptext}% |
344 \end{isamarkuptext}% |
312 \isamarkuptrue% |
|
313 % |
345 % |
314 \begin{quotation} |
346 \begin{quotation} |
|
347 \isamarkuptrue% |
315 % |
348 % |
316 \begin{isamarkuptext}% |
349 \begin{isamarkuptext}% |
317 The following datatype definition of \isa{{\isacharprime}a\ bintree} models |
350 The following datatype definition of \isa{{\isacharprime}a\ bintree} models |
318 binary trees with nodes being decorated by elements of type \isa{{\isacharprime}a}.% |
351 binary trees with nodes being decorated by elements of type \isa{{\isacharprime}a}.% |
319 \end{isamarkuptext}% |
352 \end{isamarkuptext}% |
320 \isamarkuptrue% |
353 \isamarkupfalse% |
321 \isacommand{datatype}\ {\isacharprime}a\ bintree\ {\isacharequal}\isanewline |
354 \isacommand{datatype}\ {\isacharprime}a\ bintree\ {\isacharequal}\isanewline |
322 \ \ \ \ \ Leaf\ {\isacharbar}\ Branch\ {\isacharprime}a\ \ {\isachardoublequote}{\isacharprime}a\ bintree{\isachardoublequote}\ \ {\isachardoublequote}{\isacharprime}a\ bintree{\isachardoublequote}\isamarkupfalse% |
355 \ \ \ \ \ Leaf\ {\isacharbar}\ Branch\ {\isacharprime}a\ \ {\isachardoublequote}{\isacharprime}a\ bintree{\isachardoublequote}\ \ {\isachardoublequote}{\isacharprime}a\ bintree{\isachardoublequote}\isamarkuptrue% |
323 % |
356 % |
324 \begin{isamarkuptext}% |
357 \begin{isamarkuptext}% |
325 \noindent The datatype induction rule generated here is of the form |
358 \noindent The datatype induction rule generated here is of the form |
326 \begin{isabelle}% |
359 \begin{isabelle}% |
327 \ {\isasymlbrakk}P\ Leaf{\isacharsemicolon}\isanewline |
360 \ {\isasymlbrakk}P\ Leaf{\isacharsemicolon}\isanewline |
328 \isaindent{\ \ }{\isasymAnd}a\ bintree{\isadigit{1}}\ bintree{\isadigit{2}}{\isachardot}\isanewline |
361 \isaindent{\ \ }{\isasymAnd}a\ bintree{\isadigit{1}}\ bintree{\isadigit{2}}{\isachardot}\isanewline |
329 \isaindent{\ \ \ \ \ }{\isasymlbrakk}P\ bintree{\isadigit{1}}{\isacharsemicolon}\ P\ bintree{\isadigit{2}}{\isasymrbrakk}\ {\isasymLongrightarrow}\ P\ {\isacharparenleft}Branch\ a\ bintree{\isadigit{1}}\ bintree{\isadigit{2}}{\isacharparenright}{\isasymrbrakk}\isanewline |
362 \isaindent{\ \ \ \ \ }{\isasymlbrakk}P\ bintree{\isadigit{1}}{\isacharsemicolon}\ P\ bintree{\isadigit{2}}{\isasymrbrakk}\ {\isasymLongrightarrow}\ P\ {\isacharparenleft}Branch\ a\ bintree{\isadigit{1}}\ bintree{\isadigit{2}}{\isacharparenright}{\isasymrbrakk}\isanewline |
330 \isaindent{\ }{\isasymLongrightarrow}\ P\ bintree% |
363 \isaindent{\ }{\isasymLongrightarrow}\ P\ bintree% |
331 \end{isabelle}% |
364 \end{isabelle}% |
332 \end{isamarkuptext}% |
365 \end{isamarkuptext}% |
333 \isamarkuptrue% |
|
334 % |
366 % |
335 \end{quotation} |
367 \end{quotation} |
|
368 \isamarkuptrue% |
336 % |
369 % |
337 \begin{isamarkuptext}% |
370 \begin{isamarkuptext}% |
338 \noindent The above document output has been produced as follows: |
371 \noindent The above document output has been produced as follows: |
339 |
372 |
340 \begin{ttbox} |
373 \begin{ttbox} |
574 where $text$ is delimited by \verb,",\isa{{\isasymdots}}\verb,", or |
607 where $text$ is delimited by \verb,",\isa{{\isasymdots}}\verb,", or |
575 \verb,{,\verb,*,~\isa{{\isasymdots}}~\verb,*,\verb,}, as before. Multiple |
608 \verb,{,\verb,*,~\isa{{\isasymdots}}~\verb,*,\verb,}, as before. Multiple |
576 marginal comments may be given at the same time. Here is a simple |
609 marginal comments may be given at the same time. Here is a simple |
577 example:% |
610 example:% |
578 \end{isamarkuptext}% |
611 \end{isamarkuptext}% |
579 \isamarkuptrue% |
612 \isamarkupfalse% |
580 \isacommand{lemma}\ {\isachardoublequote}A\ {\isacharminus}{\isacharminus}{\isachargreater}\ A{\isachardoublequote}\isanewline |
613 \isacommand{lemma}\ {\isachardoublequote}A\ {\isacharminus}{\isacharminus}{\isachargreater}\ A{\isachardoublequote}\isanewline |
581 \ \ % |
614 \ \ % |
582 \isamarkupcmt{a triviality of propositional logic% |
615 \isamarkupcmt{a triviality of propositional logic% |
583 } |
616 } |
584 \isanewline |
617 \isanewline |
585 \ \ % |
618 \ \ % |
586 \isamarkupcmt{(should not really bother)% |
619 \isamarkupcmt{(should not really bother)% |
587 } |
620 } |
588 \isanewline |
621 \isanewline |
589 \ \ \isamarkupfalse% |
622 % |
|
623 \isadelimproof |
|
624 \ \ % |
|
625 \endisadelimproof |
|
626 % |
|
627 \isatagproof |
|
628 \isamarkupfalse% |
590 \isacommand{by}\ {\isacharparenleft}rule\ impI{\isacharparenright}\ % |
629 \isacommand{by}\ {\isacharparenleft}rule\ impI{\isacharparenright}\ % |
591 \isamarkupcmt{implicit assumption step involved here% |
630 \isamarkupcmt{implicit assumption step involved here% |
592 } |
631 } |
593 \isamarkupfalse% |
632 % |
|
633 \endisatagproof |
|
634 {\isafoldproof}% |
|
635 % |
|
636 \isadelimproof |
|
637 % |
|
638 \endisadelimproof |
|
639 \isamarkuptrue% |
594 % |
640 % |
595 \begin{isamarkuptext}% |
641 \begin{isamarkuptext}% |
596 \noindent The above output has been produced as follows: |
642 \noindent The above output has been produced as follows: |
597 |
643 |
598 \begin{verbatim} |
644 \begin{verbatim} |
810 Text may be suppressed in a fine-grained manner. We may even hide |
856 Text may be suppressed in a fine-grained manner. We may even hide |
811 vital parts of a proof, pretending that things have been simpler |
857 vital parts of a proof, pretending that things have been simpler |
812 than they really were. For example, this ``fully automatic'' proof |
858 than they really were. For example, this ``fully automatic'' proof |
813 is actually a fake:% |
859 is actually a fake:% |
814 \end{isamarkuptext}% |
860 \end{isamarkuptext}% |
815 \isamarkuptrue% |
861 \isamarkupfalse% |
816 \isacommand{lemma}\ {\isachardoublequote}x\ {\isasymnoteq}\ {\isacharparenleft}{\isadigit{0}}{\isacharcolon}{\isacharcolon}int{\isacharparenright}\ {\isasymLongrightarrow}\ {\isadigit{0}}\ {\isacharless}\ x\ {\isacharasterisk}\ x{\isachardoublequote}\isanewline |
862 \isacommand{lemma}\ {\isachardoublequote}x\ {\isasymnoteq}\ {\isacharparenleft}{\isadigit{0}}{\isacharcolon}{\isacharcolon}int{\isacharparenright}\ {\isasymLongrightarrow}\ {\isadigit{0}}\ {\isacharless}\ x\ {\isacharasterisk}\ x{\isachardoublequote}\isanewline |
817 \ \ \isamarkupfalse% |
863 % |
818 \isacommand{by}\ {\isacharparenleft}auto{\isacharparenright}\isamarkupfalse% |
864 \isadelimproof |
|
865 \ \ % |
|
866 \endisadelimproof |
|
867 % |
|
868 \isatagproof |
|
869 \isamarkupfalse% |
|
870 \isacommand{by}\ {\isacharparenleft}auto{\isacharparenright}% |
|
871 \endisatagproof |
|
872 {\isafoldproof}% |
|
873 % |
|
874 \isadelimproof |
|
875 % |
|
876 \endisadelimproof |
|
877 \isamarkuptrue% |
819 % |
878 % |
820 \begin{isamarkuptext}% |
879 \begin{isamarkuptext}% |
821 \noindent Here the real source of the proof has been as follows: |
880 \noindent Here the real source of the proof has been as follows: |
822 |
881 |
823 \begin{verbatim} |
882 \begin{verbatim} |
844 sanity checks here. Arguments of markup commands and formal |
903 sanity checks here. Arguments of markup commands and formal |
845 comments must not be hidden, otherwise presentation fails. Open and |
904 comments must not be hidden, otherwise presentation fails. Open and |
846 close parentheses need to be inserted carefully; it is easy to hide |
905 close parentheses need to be inserted carefully; it is easy to hide |
847 the wrong parts, especially after rearranging the theory text.% |
906 the wrong parts, especially after rearranging the theory text.% |
848 \end{isamarkuptext}% |
907 \end{isamarkuptext}% |
849 \isamarkuptrue% |
908 % |
850 \isamarkupfalse% |
909 \isadelimtheory |
|
910 % |
|
911 \endisadelimtheory |
|
912 % |
|
913 \isatagtheory |
|
914 % |
|
915 \endisatagtheory |
|
916 {\isafoldtheory}% |
|
917 % |
|
918 \isadelimtheory |
|
919 % |
|
920 \endisadelimtheory |
851 \end{isabellebody}% |
921 \end{isabellebody}% |
852 %%% Local Variables: |
922 %%% Local Variables: |
853 %%% mode: latex |
923 %%% mode: latex |
854 %%% TeX-master: "root" |
924 %%% TeX-master: "root" |
855 %%% End: |
925 %%% End: |