366 end} keyword). In the simplest case, $T$ is just the union of |
366 end} keyword). In the simplest case, $T$ is just the union of |
367 $S@1$,~\ldots,~$S@n$. New theories always extend one or more other |
367 $S@1$,~\ldots,~$S@n$. New theories always extend one or more other |
368 theories, inheriting their types, constants, syntax, etc. The theory |
368 theories, inheriting their types, constants, syntax, etc. The theory |
369 \thydx{Pure} contains nothing but Isabelle's meta-logic. The variant |
369 \thydx{Pure} contains nothing but Isabelle's meta-logic. The variant |
370 \thydx{CPure} offers the more usual higher-order function application |
370 \thydx{CPure} offers the more usual higher-order function application |
371 syntax $t\,u@1\ldots\,u@n$ instead of $t(u@1,\ldots,u@n)$. |
371 syntax $t\,u@1\ldots\,u@n$ instead of $t(u@1,\ldots,u@n)$ in \Pure. |
372 |
372 |
373 Each theory definition must reside in a separate file, whose name is |
373 Each theory definition must reside in a separate file, whose name is |
374 the theory's with {\tt.thy} appended. Calling |
374 the theory's with {\tt.thy} appended. Calling |
375 \ttindexbold{use_thy}~{\tt"{\it T\/}"} reads the definition from {\it |
375 \ttindexbold{use_thy}~{\tt"{\it T\/}"} reads the definition from {\it |
376 T}{\tt.thy}, writes a corresponding file of {\ML} code {\tt.{\it |
376 T}{\tt.thy}, writes a corresponding file of {\ML} code {\tt.{\it |
427 |
427 |
428 \indexbold{definitions} The {\bf definition part} is similar, but with |
428 \indexbold{definitions} The {\bf definition part} is similar, but with |
429 the keyword {\tt defs} instead of {\tt rules}. {\bf Definitions} are |
429 the keyword {\tt defs} instead of {\tt rules}. {\bf Definitions} are |
430 rules of the form $s \equiv t$, and should serve only as |
430 rules of the form $s \equiv t$, and should serve only as |
431 abbreviations. The simplest form of a definition is $f \equiv t$, |
431 abbreviations. The simplest form of a definition is $f \equiv t$, |
432 where $f$ is a constant. Also allowed are $\eta$-equivalent forms, |
432 where $f$ is a constant. Also allowed are $\eta$-equivalent forms of |
433 where the arguments of~$f$ appear applied on the left-hand side of the |
433 this, where the arguments of~$f$ appear applied on the left-hand side |
434 equation instead of abstracted on the right-hand side. |
434 of the equation instead of abstracted on the right-hand side. |
435 |
435 |
436 Isabelle checks for common errors in definitions, such as extra |
436 Isabelle checks for common errors in definitions, such as extra |
437 variables on the right-hand side, but currently does not a complete |
437 variables on the right-hand side, but currently does not a complete |
438 test of well-formedness. Thus determined users can write |
438 test of well-formedness. Thus determined users can write |
439 non-conservative `definitions' by using mutual recursion, for example; |
439 non-conservative `definitions' by using mutual recursion, for example; |