| author | blanchet | 
| Mon, 02 May 2011 12:09:33 +0200 | |
| changeset 42601 | cddab94eeb14 | 
| parent 42596 | 6c621a9d612a | 
| child 42617 | 77d239840285 | 
| permissions | -rw-r--r-- | 
| 26840 | 1  | 
%  | 
2  | 
\begin{isabellebody}%
 | 
|
| 40406 | 3  | 
\def\isabellecontext{HOL{\isaliteral{5F}{\isacharunderscore}}Specific}%
 | 
| 26840 | 4  | 
%  | 
5  | 
\isadelimtheory  | 
|
6  | 
%  | 
|
7  | 
\endisadelimtheory  | 
|
8  | 
%  | 
|
9  | 
\isatagtheory  | 
|
10  | 
\isacommand{theory}\isamarkupfalse%
 | 
|
| 40406 | 11  | 
\ HOL{\isaliteral{5F}{\isacharunderscore}}Specific\isanewline
 | 
| 26849 | 12  | 
\isakeyword{imports}\ Main\isanewline
 | 
13  | 
\isakeyword{begin}%
 | 
|
14  | 
\endisatagtheory  | 
|
15  | 
{\isafoldtheory}%
 | 
|
16  | 
%  | 
|
17  | 
\isadelimtheory  | 
|
18  | 
%  | 
|
19  | 
\endisadelimtheory  | 
|
20  | 
%  | 
|
| 26852 | 21  | 
\isamarkupchapter{Isabelle/HOL \label{ch:hol}%
 | 
| 26849 | 22  | 
}  | 
23  | 
\isamarkuptrue%  | 
|
24  | 
%  | 
|
| 35744 | 25  | 
\isamarkupsection{Typedef axiomatization \label{sec:hol-typedef}%
 | 
| 26849 | 26  | 
}  | 
27  | 
\isamarkuptrue%  | 
|
28  | 
%  | 
|
29  | 
\begin{isamarkuptext}%
 | 
|
30  | 
\begin{matharray}{rcl}
 | 
|
| 40406 | 31  | 
    \indexdef{HOL}{command}{typedef}\hypertarget{command.HOL.typedef}{\hyperlink{command.HOL.typedef}{\mbox{\isa{\isacommand{typedef}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ proof{\isaliteral{28}{\isacharparenleft}}prove{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
| 26849 | 32  | 
  \end{matharray}
 | 
33  | 
||
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
34  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
35  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
36  | 
\rail@term{\hyperlink{command.HOL.typedef}{\mbox{\isa{\isacommand{typedef}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
37  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
38  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
39  | 
\rail@nont{\isa{altname}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
40  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
41  | 
\rail@nont{\isa{abstype}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
42  | 
\rail@term{\isa{{\isaliteral{3D}{\isacharequal}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
43  | 
\rail@nont{\isa{repset}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
44  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
45  | 
\rail@begin{3}{\isa{altname}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
46  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
47  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
48  | 
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
49  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
50  | 
\rail@term{\isa{\isakeyword{open}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
51  | 
\rail@nextbar{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
52  | 
\rail@term{\isa{\isakeyword{open}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
53  | 
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
54  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
55  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
56  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
57  | 
\rail@begin{2}{\isa{abstype}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
58  | 
\rail@nont{\hyperlink{syntax.typespecsorts}{\mbox{\isa{typespecsorts}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
59  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
60  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
61  | 
\rail@nont{\hyperlink{syntax.mixfix}{\mbox{\isa{mixfix}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
62  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
63  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
64  | 
\rail@begin{2}{\isa{repset}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
65  | 
\rail@nont{\hyperlink{syntax.term}{\mbox{\isa{term}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
66  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
67  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
68  | 
\rail@term{\isa{\isakeyword{morphisms}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
69  | 
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
70  | 
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
71  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
72  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
73  | 
\end{railoutput}
 | 
| 26849 | 74  | 
|
75  | 
||
| 28788 | 76  | 
  \begin{description}
 | 
| 42123 | 77  | 
|
| 40406 | 78  | 
  \item \hyperlink{command.HOL.typedef}{\mbox{\isa{\isacommand{typedef}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{29}{\isacharparenright}}\ t\ {\isaliteral{3D}{\isacharequal}}\ A{\isaliteral{22}{\isachardoublequote}}}
 | 
| 35744 | 79  | 
axiomatizes a Gordon/HOL-style type definition in the background  | 
80  | 
theory of the current context, depending on a non-emptiness result  | 
|
81  | 
  of the set \isa{A} (which needs to be proven interactively).
 | 
|
82  | 
||
83  | 
The raw type may not depend on parameters or assumptions of the  | 
|
84  | 
context --- this is logically impossible in Isabelle/HOL --- but the  | 
|
85  | 
non-emptiness property can be local, potentially resulting in  | 
|
86  | 
multiple interpretations in target contexts. Thus the established  | 
|
87  | 
  bijection between the representing set \isa{A} and the new type
 | 
|
88  | 
  \isa{t} may semantically depend on local assumptions.
 | 
|
| 42123 | 89  | 
|
| 35744 | 90  | 
  By default, \hyperlink{command.HOL.typedef}{\mbox{\isa{\isacommand{typedef}}}} defines both a type \isa{t}
 | 
91  | 
and a set (term constant) of the same name, unless an alternative  | 
|
| 40406 | 92  | 
  base name is given in parentheses, or the ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}open{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}''
 | 
| 35744 | 93  | 
declaration is used to suppress a separate constant definition  | 
| 40406 | 94  | 
  altogether.  The injection from type to set is called \isa{Rep{\isaliteral{5F}{\isacharunderscore}}t},
 | 
95  | 
  its inverse \isa{Abs{\isaliteral{5F}{\isacharunderscore}}t} --- this may be changed via an explicit
 | 
|
| 35744 | 96  | 
  \hyperlink{keyword.HOL.morphisms}{\mbox{\isa{\isakeyword{morphisms}}}} declaration.
 | 
| 42123 | 97  | 
|
| 40406 | 98  | 
  Theorems \isa{Rep{\isaliteral{5F}{\isacharunderscore}}t}, \isa{Rep{\isaliteral{5F}{\isacharunderscore}}t{\isaliteral{5F}{\isacharunderscore}}inverse}, and \isa{Abs{\isaliteral{5F}{\isacharunderscore}}t{\isaliteral{5F}{\isacharunderscore}}inverse} provide the most basic characterization as a
 | 
| 26849 | 99  | 
corresponding injection/surjection pair (in both directions). Rules  | 
| 40406 | 100  | 
  \isa{Rep{\isaliteral{5F}{\isacharunderscore}}t{\isaliteral{5F}{\isacharunderscore}}inject} and \isa{Abs{\isaliteral{5F}{\isacharunderscore}}t{\isaliteral{5F}{\isacharunderscore}}inject} provide a slightly
 | 
| 26849 | 101  | 
more convenient view on the injectivity part, suitable for automated  | 
| 26902 | 102  | 
  proof tools (e.g.\ in \hyperlink{attribute.simp}{\mbox{\isa{simp}}} or \hyperlink{attribute.iff}{\mbox{\isa{iff}}}
 | 
| 40406 | 103  | 
  declarations).  Rules \isa{Rep{\isaliteral{5F}{\isacharunderscore}}t{\isaliteral{5F}{\isacharunderscore}}cases}/\isa{Rep{\isaliteral{5F}{\isacharunderscore}}t{\isaliteral{5F}{\isacharunderscore}}induct}, and
 | 
104  | 
  \isa{Abs{\isaliteral{5F}{\isacharunderscore}}t{\isaliteral{5F}{\isacharunderscore}}cases}/\isa{Abs{\isaliteral{5F}{\isacharunderscore}}t{\isaliteral{5F}{\isacharunderscore}}induct} provide alternative views
 | 
|
| 26895 | 105  | 
on surjectivity; these are already declared as set or type rules for  | 
| 26902 | 106  | 
  the generic \hyperlink{method.cases}{\mbox{\isa{cases}}} and \hyperlink{method.induct}{\mbox{\isa{induct}}} methods.
 | 
| 42123 | 107  | 
|
| 35744 | 108  | 
An alternative name for the set definition (and other derived  | 
109  | 
entities) may be specified in parentheses; the default is to use  | 
|
110  | 
  \isa{t} as indicated before.
 | 
|
| 26849 | 111  | 
|
| 35744 | 112  | 
  \end{description}%
 | 
| 26849 | 113  | 
\end{isamarkuptext}%
 | 
114  | 
\isamarkuptrue%  | 
|
115  | 
%  | 
|
116  | 
\isamarkupsection{Adhoc tuples%
 | 
|
117  | 
}  | 
|
118  | 
\isamarkuptrue%  | 
|
119  | 
%  | 
|
120  | 
\begin{isamarkuptext}%
 | 
|
121  | 
\begin{matharray}{rcl}
 | 
|
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
122  | 
    \indexdef{HOL}{attribute}{split\_format}\hypertarget{attribute.HOL.split-format}{\hyperlink{attribute.HOL.split-format}{\mbox{\isa{split{\isaliteral{5F}{\isacharunderscore}}format}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{attribute} \\
 | 
| 26849 | 123  | 
  \end{matharray}
 | 
124  | 
||
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
125  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
126  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
127  | 
\rail@term{\hyperlink{attribute.HOL.split-format}{\mbox{\isa{split{\isaliteral{5F}{\isacharunderscore}}format}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
128  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
129  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
130  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
131  | 
\rail@term{\isa{complete}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
132  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
133  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
134  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
135  | 
\end{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
136  | 
|
| 26849 | 137  | 
|
| 28788 | 138  | 
  \begin{description}
 | 
| 42123 | 139  | 
|
| 40406 | 140  | 
  \item \hyperlink{attribute.HOL.split-format}{\mbox{\isa{split{\isaliteral{5F}{\isacharunderscore}}format}}}\ \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}complete{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} causes
 | 
| 28788 | 141  | 
arguments in function applications to be represented canonically  | 
142  | 
according to their tuple type structure.  | 
|
| 26849 | 143  | 
|
| 
40388
 
cb9fd7dd641c
abolished obscure goal variant of [split_format] -- unused (cf. d1c14898fd04), unrelated to '(complete)' variant, and not at all canonical
 
krauss 
parents: 
40380 
diff
changeset
 | 
144  | 
Note that this operation tends to invent funny names for new local  | 
| 
 
cb9fd7dd641c
abolished obscure goal variant of [split_format] -- unused (cf. d1c14898fd04), unrelated to '(complete)' variant, and not at all canonical
 
krauss 
parents: 
40380 
diff
changeset
 | 
145  | 
parameters introduced.  | 
| 26849 | 146  | 
|
| 28788 | 147  | 
  \end{description}%
 | 
| 26849 | 148  | 
\end{isamarkuptext}%
 | 
149  | 
\isamarkuptrue%  | 
|
150  | 
%  | 
|
151  | 
\isamarkupsection{Records \label{sec:hol-record}%
 | 
|
152  | 
}  | 
|
153  | 
\isamarkuptrue%  | 
|
154  | 
%  | 
|
155  | 
\begin{isamarkuptext}%
 | 
|
156  | 
In principle, records merely generalize the concept of tuples, where  | 
|
157  | 
components may be addressed by labels instead of just position. The  | 
|
158  | 
logical infrastructure of records in Isabelle/HOL is slightly more  | 
|
159  | 
advanced, though, supporting truly extensible record schemes. This  | 
|
160  | 
admits operations that are polymorphic with respect to record  | 
|
161  | 
extension, yielding ``object-oriented'' effects like (single)  | 
|
162  | 
  inheritance.  See also \cite{NaraschewskiW-TPHOLs98} for more
 | 
|
163  | 
details on object-oriented verification and record subtyping in HOL.%  | 
|
164  | 
\end{isamarkuptext}%
 | 
|
165  | 
\isamarkuptrue%  | 
|
166  | 
%  | 
|
167  | 
\isamarkupsubsection{Basic concepts%
 | 
|
168  | 
}  | 
|
169  | 
\isamarkuptrue%  | 
|
170  | 
%  | 
|
171  | 
\begin{isamarkuptext}%
 | 
|
172  | 
Isabelle/HOL supports both \emph{fixed} and \emph{schematic} records
 | 
|
173  | 
at the level of terms and types. The notation is as follows:  | 
|
174  | 
||
175  | 
  \begin{center}
 | 
|
176  | 
  \begin{tabular}{l|l|l}
 | 
|
177  | 
& record terms & record types \\ \hline  | 
|
| 40406 | 178  | 
    fixed & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}x\ {\isaliteral{3D}{\isacharequal}}\ a{\isaliteral{2C}{\isacharcomma}}\ y\ {\isaliteral{3D}{\isacharequal}}\ b{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}x\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ A{\isaliteral{2C}{\isacharcomma}}\ y\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ B{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
179  | 
    schematic & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}x\ {\isaliteral{3D}{\isacharequal}}\ a{\isaliteral{2C}{\isacharcomma}}\ y\ {\isaliteral{3D}{\isacharequal}}\ b{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{3D}{\isacharequal}}\ m{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}} &
 | 
|
180  | 
      \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}x\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ A{\isaliteral{2C}{\isacharcomma}}\ y\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ B{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ M{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
| 26849 | 181  | 
  \end{tabular}
 | 
182  | 
  \end{center}
 | 
|
183  | 
||
| 40406 | 184  | 
  \noindent The ASCII representation of \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}x\ {\isaliteral{3D}{\isacharequal}}\ a{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}} is \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{7C}{\isacharbar}}\ x\ {\isaliteral{3D}{\isacharequal}}\ a\ {\isaliteral{7C}{\isacharbar}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}.
 | 
| 26849 | 185  | 
|
| 40406 | 186  | 
  A fixed record \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}x\ {\isaliteral{3D}{\isacharequal}}\ a{\isaliteral{2C}{\isacharcomma}}\ y\ {\isaliteral{3D}{\isacharequal}}\ b{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}} has field \isa{x} of value
 | 
| 26849 | 187  | 
  \isa{a} and field \isa{y} of value \isa{b}.  The corresponding
 | 
| 40406 | 188  | 
  type is \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}x\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ A{\isaliteral{2C}{\isacharcomma}}\ y\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ B{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}}, assuming that \isa{{\isaliteral{22}{\isachardoublequote}}a\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ A{\isaliteral{22}{\isachardoublequote}}}
 | 
189  | 
  and \isa{{\isaliteral{22}{\isachardoublequote}}b\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ B{\isaliteral{22}{\isachardoublequote}}}.
 | 
|
| 26849 | 190  | 
|
| 40406 | 191  | 
  A record scheme like \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}x\ {\isaliteral{3D}{\isacharequal}}\ a{\isaliteral{2C}{\isacharcomma}}\ y\ {\isaliteral{3D}{\isacharequal}}\ b{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{3D}{\isacharequal}}\ m{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}} contains fields
 | 
| 26849 | 192  | 
  \isa{x} and \isa{y} as before, but also possibly further fields
 | 
| 40406 | 193  | 
  as indicated by the ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}}'' notation (which is actually part
 | 
194  | 
  of the syntax).  The improper field ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}}'' of a record
 | 
|
| 26849 | 195  | 
  scheme is called the \emph{more part}.  Logically it is just a free
 | 
196  | 
variable, which is occasionally referred to as ``row variable'' in  | 
|
197  | 
the literature. The more part of a record scheme may be  | 
|
198  | 
instantiated by zero or more further components. For example, the  | 
|
| 40406 | 199  | 
  previous scheme may get instantiated to \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}x\ {\isaliteral{3D}{\isacharequal}}\ a{\isaliteral{2C}{\isacharcomma}}\ y\ {\isaliteral{3D}{\isacharequal}}\ b{\isaliteral{2C}{\isacharcomma}}\ z\ {\isaliteral{3D}{\isacharequal}}\ c{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{3D}{\isacharequal}}\ m{\isaliteral{27}{\isacharprime}}{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}}, where \isa{m{\isaliteral{27}{\isacharprime}}} refers to a different more part.
 | 
| 26849 | 200  | 
Fixed records are special instances of record schemes, where  | 
| 40406 | 201  | 
  ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}}'' is properly terminated by the \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ unit{\isaliteral{22}{\isachardoublequote}}}
 | 
202  | 
  element.  In fact, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}x\ {\isaliteral{3D}{\isacharequal}}\ a{\isaliteral{2C}{\isacharcomma}}\ y\ {\isaliteral{3D}{\isacharequal}}\ b{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}} is just an abbreviation
 | 
|
203  | 
  for \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}x\ {\isaliteral{3D}{\isacharequal}}\ a{\isaliteral{2C}{\isacharcomma}}\ y\ {\isaliteral{3D}{\isacharequal}}\ b{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{3D}{\isacharequal}}\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{29}{\isacharparenright}}{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}}.
 | 
|
| 42123 | 204  | 
|
| 26849 | 205  | 
\medskip Two key observations make extensible records in a simply  | 
206  | 
typed language like HOL work out:  | 
|
207  | 
||
208  | 
  \begin{enumerate}
 | 
|
209  | 
||
210  | 
\item the more part is internalized, as a free term or type  | 
|
211  | 
variable,  | 
|
212  | 
||
| 26852 | 213  | 
\item field names are externalized, they cannot be accessed within  | 
214  | 
the logic as first-class values.  | 
|
| 26849 | 215  | 
|
216  | 
  \end{enumerate}
 | 
|
217  | 
||
218  | 
\medskip In Isabelle/HOL record types have to be defined explicitly,  | 
|
219  | 
fixing their field names and types, and their (optional) parent  | 
|
220  | 
record. Afterwards, records may be formed using above syntax, while  | 
|
221  | 
obeying the canonical order of fields as given by their declaration.  | 
|
222  | 
The record package provides several standard operations like  | 
|
223  | 
selectors and updates. The common setup for various generic proof  | 
|
224  | 
tools enable succinct reasoning patterns. See also the Isabelle/HOL  | 
|
225  | 
  tutorial \cite{isabelle-hol-book} for further instructions on using
 | 
|
226  | 
records in practice.%  | 
|
227  | 
\end{isamarkuptext}%
 | 
|
228  | 
\isamarkuptrue%  | 
|
229  | 
%  | 
|
230  | 
\isamarkupsubsection{Record specifications%
 | 
|
231  | 
}  | 
|
232  | 
\isamarkuptrue%  | 
|
233  | 
%  | 
|
234  | 
\begin{isamarkuptext}%
 | 
|
235  | 
\begin{matharray}{rcl}
 | 
|
| 40406 | 236  | 
    \indexdef{HOL}{command}{record}\hypertarget{command.HOL.record}{\hyperlink{command.HOL.record}{\mbox{\isa{\isacommand{record}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
| 26849 | 237  | 
  \end{matharray}
 | 
238  | 
||
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
239  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
240  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
241  | 
\rail@term{\hyperlink{command.HOL.record}{\mbox{\isa{\isacommand{record}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
242  | 
\rail@nont{\hyperlink{syntax.typespecsorts}{\mbox{\isa{typespecsorts}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
243  | 
\rail@term{\isa{{\isaliteral{3D}{\isacharequal}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
244  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
245  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
246  | 
\rail@nont{\hyperlink{syntax.type}{\mbox{\isa{type}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
247  | 
\rail@term{\isa{{\isaliteral{2B}{\isacharplus}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
248  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
249  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
250  | 
\rail@nont{\hyperlink{syntax.constdecl}{\mbox{\isa{constdecl}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
251  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
252  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
253  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
254  | 
\end{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
255  | 
|
| 26849 | 256  | 
|
| 28788 | 257  | 
  \begin{description}
 | 
| 26849 | 258  | 
|
| 40406 | 259  | 
  \item \hyperlink{command.HOL.record}{\mbox{\isa{\isacommand{record}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E7375623E}{}\isactrlsub m{\isaliteral{29}{\isacharparenright}}\ t\ {\isaliteral{3D}{\isacharequal}}\ {\isaliteral{5C3C7461753E}{\isasymtau}}\ {\isaliteral{2B}{\isacharplus}}\ c\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ c\isaliteral{5C3C5E7375623E}{}\isactrlsub n\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}} defines extensible record type \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E7375623E}{}\isactrlsub m{\isaliteral{29}{\isacharparenright}}\ t{\isaliteral{22}{\isachardoublequote}}},
 | 
260  | 
  derived from the optional parent record \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7461753E}{\isasymtau}}{\isaliteral{22}{\isachardoublequote}}} by adding new
 | 
|
261  | 
  field components \isa{{\isaliteral{22}{\isachardoublequote}}c\isaliteral{5C3C5E7375623E}{}\isactrlsub i\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub i{\isaliteral{22}{\isachardoublequote}}} etc.
 | 
|
| 26849 | 262  | 
|
| 40406 | 263  | 
  The type variables of \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7461753E}{\isasymtau}}{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub i{\isaliteral{22}{\isachardoublequote}}} need to be
 | 
264  | 
  covered by the (distinct) parameters \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E7375623E}{}\isactrlsub m{\isaliteral{22}{\isachardoublequote}}}.  Type constructor \isa{t} has to be new, while \isa{{\isaliteral{5C3C7461753E}{\isasymtau}}} needs to specify an instance of an existing record type.  At
 | 
|
265  | 
  least one new field \isa{{\isaliteral{22}{\isachardoublequote}}c\isaliteral{5C3C5E7375623E}{}\isactrlsub i{\isaliteral{22}{\isachardoublequote}}} has to be specified.
 | 
|
| 26849 | 266  | 
Basically, field names need to belong to a unique record. This is  | 
267  | 
not a real restriction in practice, since fields are qualified by  | 
|
268  | 
the record name internally.  | 
|
269  | 
||
| 40406 | 270  | 
  The parent record specification \isa{{\isaliteral{5C3C7461753E}{\isasymtau}}} is optional; if omitted
 | 
| 26849 | 271  | 
  \isa{t} becomes a root record.  The hierarchy of all records
 | 
272  | 
declared within a theory context forms a forest structure, i.e.\ a  | 
|
273  | 
set of trees starting with a root record each. There is no way to  | 
|
274  | 
merge multiple parent records!  | 
|
275  | 
||
| 40406 | 276  | 
  For convenience, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E7375623E}{}\isactrlsub m{\isaliteral{29}{\isacharparenright}}\ t{\isaliteral{22}{\isachardoublequote}}} is made a
 | 
277  | 
  type abbreviation for the fixed record type \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}c\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ c\isaliteral{5C3C5E7375623E}{}\isactrlsub n\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}}, likewise is \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E7375623E}{}\isactrlsub m{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C7A6574613E}{\isasymzeta}}{\isaliteral{29}{\isacharparenright}}\ t{\isaliteral{5F}{\isacharunderscore}}scheme{\isaliteral{22}{\isachardoublequote}}} made an abbreviation for
 | 
|
278  | 
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}c\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ c\isaliteral{5C3C5E7375623E}{}\isactrlsub n\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7A6574613E}{\isasymzeta}}{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}}.
 | 
|
| 26849 | 279  | 
|
| 28788 | 280  | 
  \end{description}%
 | 
| 26849 | 281  | 
\end{isamarkuptext}%
 | 
282  | 
\isamarkuptrue%  | 
|
283  | 
%  | 
|
284  | 
\isamarkupsubsection{Record operations%
 | 
|
285  | 
}  | 
|
286  | 
\isamarkuptrue%  | 
|
287  | 
%  | 
|
288  | 
\begin{isamarkuptext}%
 | 
|
289  | 
Any record definition of the form presented above produces certain  | 
|
290  | 
standard operations. Selectors and updates are provided for any  | 
|
291  | 
  field, including the improper one ``\isa{more}''.  There are also
 | 
|
292  | 
cumulative record constructor functions. To simplify the  | 
|
| 40406 | 293  | 
  presentation below, we assume for now that \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E7375623E}{}\isactrlsub m{\isaliteral{29}{\isacharparenright}}\ t{\isaliteral{22}{\isachardoublequote}}} is a root record with fields \isa{{\isaliteral{22}{\isachardoublequote}}c\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ c\isaliteral{5C3C5E7375623E}{}\isactrlsub n\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}}.
 | 
| 26849 | 294  | 
|
295  | 
  \medskip \textbf{Selectors} and \textbf{updates} are available for
 | 
|
296  | 
  any field (including ``\isa{more}''):
 | 
|
297  | 
||
298  | 
  \begin{matharray}{lll}
 | 
|
| 40406 | 299  | 
    \isa{{\isaliteral{22}{\isachardoublequote}}c\isaliteral{5C3C5E7375623E}{}\isactrlsub i{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}\isaliteral{5C3C5E7665633E}{}\isactrlvec c\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C7369676D613E}{\isasymsigma}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7A6574613E}{\isasymzeta}}{\isaliteral{5C3C72706172723E}{\isasymrparr}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub i{\isaliteral{22}{\isachardoublequote}}} \\
 | 
300  | 
    \isa{{\isaliteral{22}{\isachardoublequote}}c\isaliteral{5C3C5E7375623E}{}\isactrlsub i{\isaliteral{5F}{\isacharunderscore}}update{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub i\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C6C706172723E}{\isasymlparr}}\isaliteral{5C3C5E7665633E}{}\isactrlvec c\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C7369676D613E}{\isasymsigma}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7A6574613E}{\isasymzeta}}{\isaliteral{5C3C72706172723E}{\isasymrparr}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C6C706172723E}{\isasymlparr}}\isaliteral{5C3C5E7665633E}{}\isactrlvec c\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C7369676D613E}{\isasymsigma}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7A6574613E}{\isasymzeta}}{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
| 26849 | 301  | 
  \end{matharray}
 | 
302  | 
||
| 40406 | 303  | 
  There is special syntax for application of updates: \isa{{\isaliteral{22}{\isachardoublequote}}r{\isaliteral{5C3C6C706172723E}{\isasymlparr}}x\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3D}{\isacharequal}}\ a{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}} abbreviates term \isa{{\isaliteral{22}{\isachardoublequote}}x{\isaliteral{5F}{\isacharunderscore}}update\ a\ r{\isaliteral{22}{\isachardoublequote}}}.  Further notation for
 | 
304  | 
  repeated updates is also available: \isa{{\isaliteral{22}{\isachardoublequote}}r{\isaliteral{5C3C6C706172723E}{\isasymlparr}}x\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3D}{\isacharequal}}\ a{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}y\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3D}{\isacharequal}}\ b{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}z\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3D}{\isacharequal}}\ c{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}} may be written \isa{{\isaliteral{22}{\isachardoublequote}}r{\isaliteral{5C3C6C706172723E}{\isasymlparr}}x\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3D}{\isacharequal}}\ a{\isaliteral{2C}{\isacharcomma}}\ y\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3D}{\isacharequal}}\ b{\isaliteral{2C}{\isacharcomma}}\ z\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3D}{\isacharequal}}\ c{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}}.  Note that
 | 
|
| 26849 | 305  | 
because of postfix notation the order of fields shown here is  | 
306  | 
reverse than in the actual term. Since repeated updates are just  | 
|
| 40406 | 307  | 
  function applications, fields may be freely permuted in \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}x\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3D}{\isacharequal}}\ a{\isaliteral{2C}{\isacharcomma}}\ y\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3D}{\isacharequal}}\ b{\isaliteral{2C}{\isacharcomma}}\ z\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3D}{\isacharequal}}\ c{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}}, as far as logical equality is concerned.
 | 
| 26849 | 308  | 
Thus commutativity of independent updates can be proven within the  | 
309  | 
logic for any two fields, but not as a general theorem.  | 
|
310  | 
||
311  | 
  \medskip The \textbf{make} operation provides a cumulative record
 | 
|
312  | 
constructor function:  | 
|
313  | 
||
314  | 
  \begin{matharray}{lll}
 | 
|
| 40406 | 315  | 
    \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{2E}{\isachardot}}make{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub n\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C6C706172723E}{\isasymlparr}}\isaliteral{5C3C5E7665633E}{}\isactrlvec c\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C7369676D613E}{\isasymsigma}}{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
| 26849 | 316  | 
  \end{matharray}
 | 
317  | 
||
318  | 
\medskip We now reconsider the case of non-root records, which are  | 
|
319  | 
derived of some parent. In general, the latter may depend on  | 
|
320  | 
  another parent as well, resulting in a list of \emph{ancestor
 | 
|
321  | 
records}. Appending the lists of fields of all ancestors results in  | 
|
322  | 
a certain field prefix. The record package automatically takes care  | 
|
323  | 
of this by lifting operations over this context of ancestor fields.  | 
|
| 40406 | 324  | 
  Assuming that \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E7375623E}{}\isactrlsub m{\isaliteral{29}{\isacharparenright}}\ t{\isaliteral{22}{\isachardoublequote}}} has ancestor
 | 
325  | 
  fields \isa{{\isaliteral{22}{\isachardoublequote}}b\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C72686F3E}{\isasymrho}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ b\isaliteral{5C3C5E7375623E}{}\isactrlsub k\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C72686F3E}{\isasymrho}}\isaliteral{5C3C5E7375623E}{}\isactrlsub k{\isaliteral{22}{\isachardoublequote}}},
 | 
|
| 26849 | 326  | 
the above record operations will get the following types:  | 
327  | 
||
| 26852 | 328  | 
\medskip  | 
329  | 
  \begin{tabular}{lll}
 | 
|
| 40406 | 330  | 
    \isa{{\isaliteral{22}{\isachardoublequote}}c\isaliteral{5C3C5E7375623E}{}\isactrlsub i{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}\isaliteral{5C3C5E7665633E}{}\isactrlvec b\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C72686F3E}{\isasymrho}}{\isaliteral{2C}{\isacharcomma}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec c\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C7369676D613E}{\isasymsigma}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7A6574613E}{\isasymzeta}}{\isaliteral{5C3C72706172723E}{\isasymrparr}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub i{\isaliteral{22}{\isachardoublequote}}} \\
 | 
331  | 
    \isa{{\isaliteral{22}{\isachardoublequote}}c\isaliteral{5C3C5E7375623E}{}\isactrlsub i{\isaliteral{5F}{\isacharunderscore}}update{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub i\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C6C706172723E}{\isasymlparr}}\isaliteral{5C3C5E7665633E}{}\isactrlvec b\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C72686F3E}{\isasymrho}}{\isaliteral{2C}{\isacharcomma}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec c\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C7369676D613E}{\isasymsigma}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7A6574613E}{\isasymzeta}}{\isaliteral{5C3C72706172723E}{\isasymrparr}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C6C706172723E}{\isasymlparr}}\isaliteral{5C3C5E7665633E}{}\isactrlvec b\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C72686F3E}{\isasymrho}}{\isaliteral{2C}{\isacharcomma}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec c\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C7369676D613E}{\isasymsigma}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7A6574613E}{\isasymzeta}}{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
332  | 
    \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{2E}{\isachardot}}make{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C72686F3E}{\isasymrho}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{5C3C72686F3E}{\isasymrho}}\isaliteral{5C3C5E7375623E}{}\isactrlsub k\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub n\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C6C706172723E}{\isasymlparr}}\isaliteral{5C3C5E7665633E}{}\isactrlvec b\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C72686F3E}{\isasymrho}}{\isaliteral{2C}{\isacharcomma}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec c\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C7369676D613E}{\isasymsigma}}{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
| 26852 | 333  | 
  \end{tabular}
 | 
334  | 
\medskip  | 
|
| 26849 | 335  | 
|
| 26852 | 336  | 
\noindent Some further operations address the extension aspect of a  | 
| 40406 | 337  | 
  derived record scheme specifically: \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{2E}{\isachardot}}fields{\isaliteral{22}{\isachardoublequote}}} produces a
 | 
| 26849 | 338  | 
record fragment consisting of exactly the new fields introduced here  | 
| 40406 | 339  | 
  (the result may serve as a more part elsewhere); \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{2E}{\isachardot}}extend{\isaliteral{22}{\isachardoublequote}}}
 | 
340  | 
  takes a fixed record and adds a given more part; \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{2E}{\isachardot}}truncate{\isaliteral{22}{\isachardoublequote}}} restricts a record scheme to a fixed record.
 | 
|
| 26849 | 341  | 
|
| 26852 | 342  | 
\medskip  | 
343  | 
  \begin{tabular}{lll}
 | 
|
| 40406 | 344  | 
    \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{2E}{\isachardot}}fields{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E7375623E}{}\isactrlsub n\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C6C706172723E}{\isasymlparr}}\isaliteral{5C3C5E7665633E}{}\isactrlvec c\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C7369676D613E}{\isasymsigma}}{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
345  | 
    \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{2E}{\isachardot}}extend{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}\isaliteral{5C3C5E7665633E}{}\isactrlvec b\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C72686F3E}{\isasymrho}}{\isaliteral{2C}{\isacharcomma}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec c\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C7369676D613E}{\isasymsigma}}{\isaliteral{5C3C72706172723E}{\isasymrparr}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C7A6574613E}{\isasymzeta}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C6C706172723E}{\isasymlparr}}\isaliteral{5C3C5E7665633E}{}\isactrlvec b\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C72686F3E}{\isasymrho}}{\isaliteral{2C}{\isacharcomma}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec c\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C7369676D613E}{\isasymsigma}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7A6574613E}{\isasymzeta}}{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
346  | 
    \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{2E}{\isachardot}}truncate{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6C706172723E}{\isasymlparr}}\isaliteral{5C3C5E7665633E}{}\isactrlvec b\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C72686F3E}{\isasymrho}}{\isaliteral{2C}{\isacharcomma}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec c\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C7369676D613E}{\isasymsigma}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ {\isaliteral{5C3C7A6574613E}{\isasymzeta}}{\isaliteral{5C3C72706172723E}{\isasymrparr}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C6C706172723E}{\isasymlparr}}\isaliteral{5C3C5E7665633E}{}\isactrlvec b\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C72686F3E}{\isasymrho}}{\isaliteral{2C}{\isacharcomma}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec c\ {\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}\ \isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C7369676D613E}{\isasymsigma}}{\isaliteral{5C3C72706172723E}{\isasymrparr}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
| 26852 | 347  | 
  \end{tabular}
 | 
348  | 
\medskip  | 
|
| 26849 | 349  | 
|
| 40406 | 350  | 
  \noindent Note that \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{2E}{\isachardot}}make{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{2E}{\isachardot}}fields{\isaliteral{22}{\isachardoublequote}}} coincide
 | 
| 26849 | 351  | 
for root records.%  | 
352  | 
\end{isamarkuptext}%
 | 
|
353  | 
\isamarkuptrue%  | 
|
354  | 
%  | 
|
355  | 
\isamarkupsubsection{Derived rules and proof tools%
 | 
|
356  | 
}  | 
|
357  | 
\isamarkuptrue%  | 
|
358  | 
%  | 
|
359  | 
\begin{isamarkuptext}%
 | 
|
360  | 
The record package proves several results internally, declaring  | 
|
361  | 
these facts to appropriate proof tools. This enables users to  | 
|
362  | 
reason about record structures quite conveniently. Assume that  | 
|
363  | 
  \isa{t} is a record type as specified above.
 | 
|
364  | 
||
365  | 
  \begin{enumerate}
 | 
|
| 42123 | 366  | 
|
| 26849 | 367  | 
\item Standard conversions for selectors or updates applied to  | 
368  | 
record constructor terms are made part of the default Simplifier  | 
|
369  | 
context; thus proofs by reduction of basic operations merely require  | 
|
| 26902 | 370  | 
  the \hyperlink{method.simp}{\mbox{\isa{simp}}} method without further arguments.  These rules
 | 
| 40406 | 371  | 
  are available as \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{2E}{\isachardot}}simps{\isaliteral{22}{\isachardoublequote}}}, too.
 | 
| 42123 | 372  | 
|
| 26849 | 373  | 
\item Selectors applied to updated records are automatically reduced  | 
374  | 
by an internal simplification procedure, which is also part of the  | 
|
375  | 
standard Simplifier setup.  | 
|
376  | 
||
| 40406 | 377  | 
  \item Inject equations of a form analogous to \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}x{\isaliteral{2C}{\isacharcomma}}\ y{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{3D}{\isacharequal}}\ {\isaliteral{28}{\isacharparenleft}}x{\isaliteral{27}{\isacharprime}}{\isaliteral{2C}{\isacharcomma}}\ y{\isaliteral{27}{\isacharprime}}{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C65717569763E}{\isasymequiv}}\ x\ {\isaliteral{3D}{\isacharequal}}\ x{\isaliteral{27}{\isacharprime}}\ {\isaliteral{5C3C616E643E}{\isasymand}}\ y\ {\isaliteral{3D}{\isacharequal}}\ y{\isaliteral{27}{\isacharprime}}{\isaliteral{22}{\isachardoublequote}}} are declared to the Simplifier and Classical
 | 
| 26902 | 378  | 
  Reasoner as \hyperlink{attribute.iff}{\mbox{\isa{iff}}} rules.  These rules are available as
 | 
| 40406 | 379  | 
  \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{2E}{\isachardot}}iffs{\isaliteral{22}{\isachardoublequote}}}.
 | 
| 26849 | 380  | 
|
| 40406 | 381  | 
  \item The introduction rule for record equality analogous to \isa{{\isaliteral{22}{\isachardoublequote}}x\ r\ {\isaliteral{3D}{\isacharequal}}\ x\ r{\isaliteral{27}{\isacharprime}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ y\ r\ {\isaliteral{3D}{\isacharequal}}\ y\ r{\isaliteral{27}{\isacharprime}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ r\ {\isaliteral{3D}{\isacharequal}}\ r{\isaliteral{27}{\isacharprime}}{\isaliteral{22}{\isachardoublequote}}} is declared to the Simplifier,
 | 
382  | 
  and as the basic rule context as ``\hyperlink{attribute.intro}{\mbox{\isa{intro}}}\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3F}{\isacharquery}}{\isaliteral{22}{\isachardoublequote}}}''.
 | 
|
383  | 
  The rule is called \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{2E}{\isachardot}}equality{\isaliteral{22}{\isachardoublequote}}}.
 | 
|
| 26849 | 384  | 
|
385  | 
\item Representations of arbitrary record expressions as canonical  | 
|
| 26902 | 386  | 
  constructor terms are provided both in \hyperlink{method.cases}{\mbox{\isa{cases}}} and \hyperlink{method.induct}{\mbox{\isa{induct}}} format (cf.\ the generic proof methods of the same name,
 | 
| 26849 | 387  | 
  \secref{sec:cases-induct}).  Several variations are available, for
 | 
388  | 
fixed records, record schemes, more parts etc.  | 
|
| 42123 | 389  | 
|
| 26849 | 390  | 
The generic proof methods are sufficiently smart to pick the most  | 
391  | 
sensible rule according to the type of the indicated record  | 
|
| 40406 | 392  | 
  expression: users just need to apply something like ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}cases\ r{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}'' to a certain proof problem.
 | 
| 26849 | 393  | 
|
| 40406 | 394  | 
  \item The derived record operations \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{2E}{\isachardot}}make{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{2E}{\isachardot}}fields{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{2E}{\isachardot}}extend{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{2E}{\isachardot}}truncate{\isaliteral{22}{\isachardoublequote}}} are \emph{not}
 | 
| 26849 | 395  | 
treated automatically, but usually need to be expanded by hand,  | 
| 40406 | 396  | 
  using the collective fact \isa{{\isaliteral{22}{\isachardoublequote}}t{\isaliteral{2E}{\isachardot}}defs{\isaliteral{22}{\isachardoublequote}}}.
 | 
| 26849 | 397  | 
|
398  | 
  \end{enumerate}%
 | 
|
399  | 
\end{isamarkuptext}%
 | 
|
400  | 
\isamarkuptrue%  | 
|
401  | 
%  | 
|
402  | 
\isamarkupsection{Datatypes \label{sec:hol-datatype}%
 | 
|
403  | 
}  | 
|
404  | 
\isamarkuptrue%  | 
|
405  | 
%  | 
|
406  | 
\begin{isamarkuptext}%
 | 
|
407  | 
\begin{matharray}{rcl}
 | 
|
| 40406 | 408  | 
    \indexdef{HOL}{command}{datatype}\hypertarget{command.HOL.datatype}{\hyperlink{command.HOL.datatype}{\mbox{\isa{\isacommand{datatype}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
| 41396 | 409  | 
    \indexdef{HOL}{command}{rep\_datatype}\hypertarget{command.HOL.rep-datatype}{\hyperlink{command.HOL.rep-datatype}{\mbox{\isa{\isacommand{rep{\isaliteral{5F}{\isacharunderscore}}datatype}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ proof{\isaliteral{28}{\isacharparenleft}}prove{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
| 26849 | 410  | 
  \end{matharray}
 | 
411  | 
||
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
412  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
413  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
414  | 
\rail@term{\hyperlink{command.HOL.datatype}{\mbox{\isa{\isacommand{datatype}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
415  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
416  | 
\rail@nont{\isa{dtspec}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
417  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
418  | 
\rail@cterm{\isa{\isakeyword{and}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
419  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
420  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
421  | 
\rail@begin{3}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
422  | 
\rail@term{\hyperlink{command.HOL.rep-datatype}{\mbox{\isa{\isacommand{rep{\isaliteral{5F}{\isacharunderscore}}datatype}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
423  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
424  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
425  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
426  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
427  | 
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
428  | 
\rail@nextplus{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
429  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
430  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
431  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
432  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
433  | 
\rail@nont{\hyperlink{syntax.term}{\mbox{\isa{term}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
434  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
435  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
436  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
437  | 
\rail@begin{2}{\isa{dtspec}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
438  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
439  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
440  | 
\rail@nont{\hyperlink{syntax.parname}{\mbox{\isa{parname}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
441  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
442  | 
\rail@nont{\hyperlink{syntax.typespec}{\mbox{\isa{typespec}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
443  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
444  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
445  | 
\rail@nont{\hyperlink{syntax.mixfix}{\mbox{\isa{mixfix}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
446  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
447  | 
\rail@term{\isa{{\isaliteral{3D}{\isacharequal}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
448  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
449  | 
\rail@nont{\isa{cons}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
450  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
451  | 
\rail@cterm{\isa{{\isaliteral{7C}{\isacharbar}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
452  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
453  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
454  | 
\rail@begin{2}{\isa{cons}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
455  | 
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
456  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
457  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
458  | 
\rail@cnont{\hyperlink{syntax.type}{\mbox{\isa{type}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
459  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
460  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
461  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
462  | 
\rail@nont{\hyperlink{syntax.mixfix}{\mbox{\isa{mixfix}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
463  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
464  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
465  | 
\end{railoutput}
 | 
| 26849 | 466  | 
|
467  | 
||
| 28788 | 468  | 
  \begin{description}
 | 
| 26849 | 469  | 
|
| 28788 | 470  | 
  \item \hyperlink{command.HOL.datatype}{\mbox{\isa{\isacommand{datatype}}}} defines inductive datatypes in
 | 
| 26849 | 471  | 
HOL.  | 
472  | 
||
| 40406 | 473  | 
  \item \hyperlink{command.HOL.rep-datatype}{\mbox{\isa{\isacommand{rep{\isaliteral{5F}{\isacharunderscore}}datatype}}}} represents existing types as
 | 
| 26849 | 474  | 
inductive ones, generating the standard infrastructure of derived  | 
475  | 
concepts (primitive recursion etc.).  | 
|
476  | 
||
| 28788 | 477  | 
  \end{description}
 | 
| 26849 | 478  | 
|
479  | 
The induction and exhaustion theorems generated provide case names  | 
|
480  | 
according to the constructors involved, while parameters are named  | 
|
481  | 
  after the types (see also \secref{sec:cases-induct}).
 | 
|
482  | 
||
483  | 
  See \cite{isabelle-HOL} for more details on datatypes, but beware of
 | 
|
484  | 
the old-style theory syntax being used there! Apart from proper  | 
|
485  | 
proof methods for case-analysis and induction, there are also  | 
|
| 40406 | 486  | 
  emulations of ML tactics \hyperlink{method.HOL.case-tac}{\mbox{\isa{case{\isaliteral{5F}{\isacharunderscore}}tac}}} and \hyperlink{method.HOL.induct-tac}{\mbox{\isa{induct{\isaliteral{5F}{\isacharunderscore}}tac}}} available, see \secref{sec:hol-induct-tac}; these admit
 | 
| 26849 | 487  | 
to refer directly to the internal structure of subgoals (including  | 
488  | 
internally bound parameters).%  | 
|
489  | 
\end{isamarkuptext}%
 | 
|
490  | 
\isamarkuptrue%  | 
|
491  | 
%  | 
|
| 41396 | 492  | 
\isamarkupsection{Functorial structure of types%
 | 
493  | 
}  | 
|
494  | 
\isamarkuptrue%  | 
|
495  | 
%  | 
|
496  | 
\begin{isamarkuptext}%
 | 
|
497  | 
\begin{matharray}{rcl}
 | 
|
| 41506 | 498  | 
    \indexdef{HOL}{command}{enriched\_type}\hypertarget{command.HOL.enriched-type}{\hyperlink{command.HOL.enriched-type}{\mbox{\isa{\isacommand{enriched{\isaliteral{5F}{\isacharunderscore}}type}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ proof{\isaliteral{28}{\isacharparenleft}}prove{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}
 | 
| 41396 | 499  | 
  \end{matharray}
 | 
500  | 
||
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
501  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
502  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
503  | 
\rail@term{\hyperlink{command.HOL.enriched-type}{\mbox{\isa{\isacommand{enriched{\isaliteral{5F}{\isacharunderscore}}type}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
504  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
505  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
506  | 
\rail@nont{\isa{prefix}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
507  | 
\rail@term{\isa{{\isaliteral{3A}{\isacharcolon}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
508  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
509  | 
\rail@nont{\hyperlink{syntax.term}{\mbox{\isa{term}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
510  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
511  | 
\end{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
512  | 
% FIXME check prefix  | 
| 41396 | 513  | 
|
514  | 
  \begin{description}
 | 
|
515  | 
||
| 41506 | 516  | 
  \item \hyperlink{command.HOL.enriched-type}{\mbox{\isa{\isacommand{enriched{\isaliteral{5F}{\isacharunderscore}}type}}}} allows to prove and register
 | 
517  | 
properties about the functorial structure of type constructors;  | 
|
518  | 
these properties then can be used by other packages to  | 
|
| 41396 | 519  | 
deal with those type constructors in certain type constructions.  | 
520  | 
Characteristic theorems are noted in the current local theory; by  | 
|
| 41506 | 521  | 
default, they are prefixed with the base name of the type constructor,  | 
| 41396 | 522  | 
an explicit prefix can be given alternatively.  | 
523  | 
||
524  | 
  The given term \isa{{\isaliteral{22}{\isachardoublequote}}m{\isaliteral{22}{\isachardoublequote}}} is considered as \emph{mapper} for the
 | 
|
525  | 
corresponding type constructor and must conform to the following  | 
|
526  | 
type pattern:  | 
|
527  | 
||
528  | 
  \begin{matharray}{lll}
 | 
|
529  | 
    \isa{{\isaliteral{22}{\isachardoublequote}}m{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} &
 | 
|
530  | 
      \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E697375623E}{}\isactrlisub {\isadigit{1}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E697375623E}{}\isactrlisub k\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E697375623E}{}\isactrlisub n{\isaliteral{29}{\isacharparenright}}\ t\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{28}{\isacharparenleft}}\isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C626574613E}{\isasymbeta}}\isaliteral{5C3C5E697375623E}{}\isactrlisub n{\isaliteral{29}{\isacharparenright}}\ t{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
531  | 
  \end{matharray}
 | 
|
532  | 
||
533  | 
  \noindent where \isa{t} is the type constructor, \isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E697375623E}{}\isactrlisub n{\isaliteral{22}{\isachardoublequote}}} and \isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7665633E}{}\isactrlvec {\isaliteral{5C3C626574613E}{\isasymbeta}}\isaliteral{5C3C5E697375623E}{}\isactrlisub n{\isaliteral{22}{\isachardoublequote}}} are distinct
 | 
|
534  | 
  type variables free in the local theory and \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E697375623E}{}\isactrlisub {\isadigit{1}}{\isaliteral{22}{\isachardoublequote}}},
 | 
|
535  | 
  \ldots, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C7369676D613E}{\isasymsigma}}\isaliteral{5C3C5E697375623E}{}\isactrlisub k{\isaliteral{22}{\isachardoublequote}}} is a subsequence of \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E697375623E}{}\isactrlisub {\isadigit{1}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C626574613E}{\isasymbeta}}\isaliteral{5C3C5E697375623E}{}\isactrlisub {\isadigit{1}}{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C626574613E}{\isasymbeta}}\isaliteral{5C3C5E697375623E}{}\isactrlisub {\isadigit{1}}\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E697375623E}{}\isactrlisub {\isadigit{1}}{\isaliteral{22}{\isachardoublequote}}}, \ldots,
 | 
|
536  | 
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E697375623E}{}\isactrlisub n\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C626574613E}{\isasymbeta}}\isaliteral{5C3C5E697375623E}{}\isactrlisub n{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C626574613E}{\isasymbeta}}\isaliteral{5C3C5E697375623E}{}\isactrlisub n\ {\isaliteral{5C3C52696768746172726F773E}{\isasymRightarrow}}\ {\isaliteral{5C3C616C7068613E}{\isasymalpha}}\isaliteral{5C3C5E697375623E}{}\isactrlisub n{\isaliteral{22}{\isachardoublequote}}}.
 | 
|
537  | 
||
538  | 
  \end{description}%
 | 
|
539  | 
\end{isamarkuptext}%
 | 
|
540  | 
\isamarkuptrue%  | 
|
541  | 
%  | 
|
| 26849 | 542  | 
\isamarkupsection{Recursive functions \label{sec:recursion}%
 | 
543  | 
}  | 
|
544  | 
\isamarkuptrue%  | 
|
545  | 
%  | 
|
546  | 
\begin{isamarkuptext}%
 | 
|
547  | 
\begin{matharray}{rcl}
 | 
|
| 40406 | 548  | 
    \indexdef{HOL}{command}{primrec}\hypertarget{command.HOL.primrec}{\hyperlink{command.HOL.primrec}{\mbox{\isa{\isacommand{primrec}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
549  | 
    \indexdef{HOL}{command}{fun}\hypertarget{command.HOL.fun}{\hyperlink{command.HOL.fun}{\mbox{\isa{\isacommand{fun}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
550  | 
    \indexdef{HOL}{command}{function}\hypertarget{command.HOL.function}{\hyperlink{command.HOL.function}{\mbox{\isa{\isacommand{function}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ proof{\isaliteral{28}{\isacharparenleft}}prove{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
551  | 
    \indexdef{HOL}{command}{termination}\hypertarget{command.HOL.termination}{\hyperlink{command.HOL.termination}{\mbox{\isa{\isacommand{termination}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ proof{\isaliteral{28}{\isacharparenleft}}prove{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
| 26849 | 552  | 
  \end{matharray}
 | 
553  | 
||
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
554  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
555  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
556  | 
\rail@term{\hyperlink{command.HOL.primrec}{\mbox{\isa{\isacommand{primrec}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
557  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
558  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
559  | 
\rail@nont{\hyperlink{syntax.target}{\mbox{\isa{target}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
560  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
561  | 
\rail@nont{\hyperlink{syntax.fixes}{\mbox{\isa{fixes}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
562  | 
\rail@term{\isa{\isakeyword{where}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
563  | 
\rail@nont{\isa{equations}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
564  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
565  | 
\rail@begin{4}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
566  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
567  | 
\rail@term{\hyperlink{command.HOL.fun}{\mbox{\isa{\isacommand{fun}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
568  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
569  | 
\rail@term{\hyperlink{command.HOL.function}{\mbox{\isa{\isacommand{function}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
570  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
571  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
572  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
573  | 
\rail@nont{\hyperlink{syntax.target}{\mbox{\isa{target}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
574  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
575  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
576  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
577  | 
\rail@nont{\isa{functionopts}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
578  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
579  | 
\rail@nont{\hyperlink{syntax.fixes}{\mbox{\isa{fixes}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
580  | 
\rail@cr{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
581  | 
\rail@term{\isa{\isakeyword{where}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
582  | 
\rail@nont{\isa{equations}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
583  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
584  | 
\rail@begin{3}{\isa{equations}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
585  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
586  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
587  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
588  | 
\rail@nont{\hyperlink{syntax.thmdecl}{\mbox{\isa{thmdecl}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
589  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
590  | 
\rail@nont{\hyperlink{syntax.prop}{\mbox{\isa{prop}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
591  | 
\rail@nextplus{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
592  | 
\rail@cterm{\isa{{\isaliteral{7C}{\isacharbar}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
593  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
594  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
595  | 
\rail@begin{3}{\isa{functionopts}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
596  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
597  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
598  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
599  | 
\rail@term{\isa{sequential}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
600  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
601  | 
\rail@term{\isa{domintros}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
602  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
603  | 
\rail@nextplus{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
604  | 
\rail@cterm{\isa{{\isaliteral{2C}{\isacharcomma}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
605  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
606  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
607  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
608  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
609  | 
\rail@term{\hyperlink{command.HOL.termination}{\mbox{\isa{\isacommand{termination}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
610  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
611  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
612  | 
\rail@nont{\hyperlink{syntax.term}{\mbox{\isa{term}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
613  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
614  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
615  | 
\end{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
616  | 
|
| 26849 | 617  | 
|
| 28788 | 618  | 
  \begin{description}
 | 
| 26849 | 619  | 
|
| 28788 | 620  | 
  \item \hyperlink{command.HOL.primrec}{\mbox{\isa{\isacommand{primrec}}}} defines primitive recursive
 | 
| 26849 | 621  | 
  functions over datatypes, see also \cite{isabelle-HOL}.
 | 
622  | 
||
| 28788 | 623  | 
  \item \hyperlink{command.HOL.function}{\mbox{\isa{\isacommand{function}}}} defines functions by general
 | 
| 26849 | 624  | 
wellfounded recursion. A detailed description with examples can be  | 
625  | 
  found in \cite{isabelle-function}. The function is specified by a
 | 
|
626  | 
set of (possibly conditional) recursive equations with arbitrary  | 
|
627  | 
pattern matching. The command generates proof obligations for the  | 
|
628  | 
completeness and the compatibility of patterns.  | 
|
629  | 
||
630  | 
The defined function is considered partial, and the resulting  | 
|
| 40406 | 631  | 
  simplification rules (named \isa{{\isaliteral{22}{\isachardoublequote}}f{\isaliteral{2E}{\isachardot}}psimps{\isaliteral{22}{\isachardoublequote}}}) and induction rule
 | 
632  | 
  (named \isa{{\isaliteral{22}{\isachardoublequote}}f{\isaliteral{2E}{\isachardot}}pinduct{\isaliteral{22}{\isachardoublequote}}}) are guarded by a generated domain
 | 
|
633  | 
  predicate \isa{{\isaliteral{22}{\isachardoublequote}}f{\isaliteral{5F}{\isacharunderscore}}dom{\isaliteral{22}{\isachardoublequote}}}. The \hyperlink{command.HOL.termination}{\mbox{\isa{\isacommand{termination}}}}
 | 
|
| 26849 | 634  | 
command can then be used to establish that the function is total.  | 
635  | 
||
| 40406 | 636  | 
  \item \hyperlink{command.HOL.fun}{\mbox{\isa{\isacommand{fun}}}} is a shorthand notation for ``\hyperlink{command.HOL.function}{\mbox{\isa{\isacommand{function}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}sequential{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}, followed by automated
 | 
| 28788 | 637  | 
proof attempts regarding pattern matching and termination. See  | 
638  | 
  \cite{isabelle-function} for further details.
 | 
|
| 26849 | 639  | 
|
| 28788 | 640  | 
  \item \hyperlink{command.HOL.termination}{\mbox{\isa{\isacommand{termination}}}}~\isa{f} commences a
 | 
| 26849 | 641  | 
  termination proof for the previously defined function \isa{f}.  If
 | 
642  | 
this is omitted, the command refers to the most recent function  | 
|
643  | 
definition. After the proof is closed, the recursive equations and  | 
|
644  | 
the induction principle is established.  | 
|
645  | 
||
| 28788 | 646  | 
  \end{description}
 | 
| 26849 | 647  | 
|
| 27452 | 648  | 
  Recursive definitions introduced by the \hyperlink{command.HOL.function}{\mbox{\isa{\isacommand{function}}}}
 | 
649  | 
command accommodate  | 
|
| 40406 | 650  | 
  reasoning by induction (cf.\ \secref{sec:cases-induct}): rule \isa{{\isaliteral{22}{\isachardoublequote}}c{\isaliteral{2E}{\isachardot}}induct{\isaliteral{22}{\isachardoublequote}}} (where \isa{c} is the name of the function definition)
 | 
| 26849 | 651  | 
refers to a specific induction rule, with parameters named according  | 
| 33857 | 652  | 
to the user-specified equations. Cases are numbered (starting from 1).  | 
653  | 
||
654  | 
  For \hyperlink{command.HOL.primrec}{\mbox{\isa{\isacommand{primrec}}}}, the induction principle coincides
 | 
|
| 27452 | 655  | 
with structural recursion on the datatype the recursion is carried  | 
656  | 
out.  | 
|
| 26849 | 657  | 
|
658  | 
The equations provided by these packages may be referred later as  | 
|
| 40406 | 659  | 
  theorem list \isa{{\isaliteral{22}{\isachardoublequote}}f{\isaliteral{2E}{\isachardot}}simps{\isaliteral{22}{\isachardoublequote}}}, where \isa{f} is the (collective)
 | 
| 26849 | 660  | 
name of the functions defined. Individual equations may be named  | 
661  | 
explicitly as well.  | 
|
662  | 
||
| 26902 | 663  | 
  The \hyperlink{command.HOL.function}{\mbox{\isa{\isacommand{function}}}} command accepts the following
 | 
| 26849 | 664  | 
options.  | 
665  | 
||
| 28788 | 666  | 
  \begin{description}
 | 
| 26849 | 667  | 
|
| 28788 | 668  | 
  \item \isa{sequential} enables a preprocessor which disambiguates
 | 
669  | 
overlapping patterns by making them mutually disjoint. Earlier  | 
|
670  | 
equations take precedence over later ones. This allows to give the  | 
|
671  | 
specification in a format very similar to functional programming.  | 
|
672  | 
Note that the resulting simplification and induction rules  | 
|
673  | 
correspond to the transformed specification, not the one given  | 
|
| 26849 | 674  | 
originally. This usually means that each equation given by the user  | 
| 36139 | 675  | 
may result in several theorems. Also note that this automatic  | 
| 26849 | 676  | 
transformation only works for ML-style datatype patterns.  | 
677  | 
||
| 28788 | 678  | 
  \item \isa{domintros} enables the automated generation of
 | 
| 26849 | 679  | 
introduction rules for the domain predicate. While mostly not  | 
680  | 
needed, they can be helpful in some proofs about partial functions.  | 
|
681  | 
||
| 28788 | 682  | 
  \end{description}%
 | 
| 26849 | 683  | 
\end{isamarkuptext}%
 | 
684  | 
\isamarkuptrue%  | 
|
685  | 
%  | 
|
686  | 
\isamarkupsubsection{Proof methods related to recursive definitions%
 | 
|
687  | 
}  | 
|
688  | 
\isamarkuptrue%  | 
|
689  | 
%  | 
|
690  | 
\begin{isamarkuptext}%
 | 
|
691  | 
\begin{matharray}{rcl}
 | 
|
| 40406 | 692  | 
    \indexdef{HOL}{method}{pat\_completeness}\hypertarget{method.HOL.pat-completeness}{\hyperlink{method.HOL.pat-completeness}{\mbox{\isa{pat{\isaliteral{5F}{\isacharunderscore}}completeness}}}} & : & \isa{method} \\
 | 
| 28788 | 693  | 
    \indexdef{HOL}{method}{relation}\hypertarget{method.HOL.relation}{\hyperlink{method.HOL.relation}{\mbox{\isa{relation}}}} & : & \isa{method} \\
 | 
| 40406 | 694  | 
    \indexdef{HOL}{method}{lexicographic\_order}\hypertarget{method.HOL.lexicographic-order}{\hyperlink{method.HOL.lexicographic-order}{\mbox{\isa{lexicographic{\isaliteral{5F}{\isacharunderscore}}order}}}} & : & \isa{method} \\
 | 
695  | 
    \indexdef{HOL}{method}{size\_change}\hypertarget{method.HOL.size-change}{\hyperlink{method.HOL.size-change}{\mbox{\isa{size{\isaliteral{5F}{\isacharunderscore}}change}}}} & : & \isa{method} \\
 | 
|
| 26849 | 696  | 
  \end{matharray}
 | 
697  | 
||
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
698  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
699  | 
\rail@begin{1}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
700  | 
\rail@term{\hyperlink{method.HOL.relation}{\mbox{\isa{relation}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
701  | 
\rail@nont{\hyperlink{syntax.term}{\mbox{\isa{term}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
702  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
703  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
704  | 
\rail@term{\hyperlink{method.HOL.lexicographic-order}{\mbox{\isa{lexicographic{\isaliteral{5F}{\isacharunderscore}}order}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
705  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
706  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
707  | 
\rail@cnont{\hyperlink{syntax.clasimpmod}{\mbox{\isa{clasimpmod}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
708  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
709  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
710  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
711  | 
\rail@term{\hyperlink{method.HOL.size-change}{\mbox{\isa{size{\isaliteral{5F}{\isacharunderscore}}change}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
712  | 
\rail@nont{\isa{orders}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
713  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
714  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
715  | 
\rail@cnont{\hyperlink{syntax.clasimpmod}{\mbox{\isa{clasimpmod}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
716  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
717  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
718  | 
\rail@begin{4}{\isa{orders}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
719  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
720  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
721  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
722  | 
\rail@term{\isa{max}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
723  | 
\rail@nextbar{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
724  | 
\rail@term{\isa{min}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
725  | 
\rail@nextbar{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
726  | 
\rail@term{\isa{ms}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
727  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
728  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
729  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
730  | 
\end{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
731  | 
|
| 26849 | 732  | 
|
| 28788 | 733  | 
  \begin{description}
 | 
| 26849 | 734  | 
|
| 40406 | 735  | 
  \item \hyperlink{method.HOL.pat-completeness}{\mbox{\isa{pat{\isaliteral{5F}{\isacharunderscore}}completeness}}} is a specialized method to
 | 
| 26849 | 736  | 
solve goals regarding the completeness of pattern matching, as  | 
| 26902 | 737  | 
  required by the \hyperlink{command.HOL.function}{\mbox{\isa{\isacommand{function}}}} package (cf.\
 | 
| 26849 | 738  | 
  \cite{isabelle-function}).
 | 
739  | 
||
| 28788 | 740  | 
  \item \hyperlink{method.HOL.relation}{\mbox{\isa{relation}}}~\isa{R} introduces a termination
 | 
| 26849 | 741  | 
  proof using the relation \isa{R}.  The resulting proof state will
 | 
742  | 
  contain goals expressing that \isa{R} is wellfounded, and that the
 | 
|
743  | 
  arguments of recursive calls decrease with respect to \isa{R}.
 | 
|
744  | 
Usually, this method is used as the initial proof step of manual  | 
|
745  | 
termination proofs.  | 
|
746  | 
||
| 40406 | 747  | 
  \item \hyperlink{method.HOL.lexicographic-order}{\mbox{\isa{lexicographic{\isaliteral{5F}{\isacharunderscore}}order}}} attempts a fully
 | 
| 26849 | 748  | 
automated termination proof by searching for a lexicographic  | 
749  | 
combination of size measures on the arguments of the function. The  | 
|
| 26902 | 750  | 
  method accepts the same arguments as the \hyperlink{method.auto}{\mbox{\isa{auto}}} method,
 | 
| 26849 | 751  | 
which it uses internally to prove local descents. The same context  | 
| 26902 | 752  | 
  modifiers as for \hyperlink{method.auto}{\mbox{\isa{auto}}} are accepted, see
 | 
| 26849 | 753  | 
  \secref{sec:clasimp}.
 | 
754  | 
||
755  | 
In case of failure, extensive information is printed, which can help  | 
|
756  | 
  to analyse the situation (cf.\ \cite{isabelle-function}).
 | 
|
757  | 
||
| 40406 | 758  | 
  \item \hyperlink{method.HOL.size-change}{\mbox{\isa{size{\isaliteral{5F}{\isacharunderscore}}change}}} also works on termination goals,
 | 
| 33858 | 759  | 
using a variation of the size-change principle, together with a  | 
760  | 
  graph decomposition technique (see \cite{krauss_phd} for details).
 | 
|
761  | 
  Three kinds of orders are used internally: \isa{max}, \isa{min},
 | 
|
762  | 
  and \isa{ms} (multiset), which is only available when the theory
 | 
|
763  | 
  \isa{Multiset} is loaded. When no order kinds are given, they are
 | 
|
764  | 
tried in order. The search for a termination proof uses SAT solving  | 
|
765  | 
internally.  | 
|
766  | 
||
767  | 
 For local descent proofs, the same context modifiers as for \hyperlink{method.auto}{\mbox{\isa{auto}}} are accepted, see \secref{sec:clasimp}.
 | 
|
768  | 
||
| 28788 | 769  | 
  \end{description}%
 | 
| 26849 | 770  | 
\end{isamarkuptext}%
 | 
771  | 
\isamarkuptrue%  | 
|
772  | 
%  | 
|
| 40171 | 773  | 
\isamarkupsubsection{Functions with explicit partiality%
 | 
774  | 
}  | 
|
775  | 
\isamarkuptrue%  | 
|
776  | 
%  | 
|
777  | 
\begin{isamarkuptext}%
 | 
|
778  | 
\begin{matharray}{rcl}
 | 
|
| 40406 | 779  | 
    \indexdef{HOL}{command}{partial\_function}\hypertarget{command.HOL.partial-function}{\hyperlink{command.HOL.partial-function}{\mbox{\isa{\isacommand{partial{\isaliteral{5F}{\isacharunderscore}}function}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
780  | 
    \indexdef{HOL}{attribute}{partial\_function\_mono}\hypertarget{attribute.HOL.partial-function-mono}{\hyperlink{attribute.HOL.partial-function-mono}{\mbox{\isa{partial{\isaliteral{5F}{\isacharunderscore}}function{\isaliteral{5F}{\isacharunderscore}}mono}}}} & : & \isa{attribute} \\
 | 
|
| 40171 | 781  | 
  \end{matharray}
 | 
782  | 
||
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
783  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
784  | 
\rail@begin{5}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
785  | 
\rail@term{\hyperlink{command.HOL.partial-function}{\mbox{\isa{\isacommand{partial{\isaliteral{5F}{\isacharunderscore}}function}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
786  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
787  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
788  | 
\rail@nont{\hyperlink{syntax.target}{\mbox{\isa{target}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
789  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
790  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
791  | 
\rail@nont{\isa{mode}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
792  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
793  | 
\rail@nont{\hyperlink{syntax.fixes}{\mbox{\isa{fixes}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
794  | 
\rail@cr{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
795  | 
\rail@term{\isa{\isakeyword{where}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
796  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
797  | 
\rail@nextbar{4}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
798  | 
\rail@nont{\hyperlink{syntax.thmdecl}{\mbox{\isa{thmdecl}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
799  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
800  | 
\rail@nont{\hyperlink{syntax.prop}{\mbox{\isa{prop}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
801  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
802  | 
\end{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
803  | 
% FIXME check mode  | 
| 40171 | 804  | 
|
805  | 
  \begin{description}
 | 
|
806  | 
||
| 40406 | 807  | 
  \item \hyperlink{command.HOL.partial-function}{\mbox{\isa{\isacommand{partial{\isaliteral{5F}{\isacharunderscore}}function}}}} defines recursive
 | 
| 40171 | 808  | 
functions based on fixpoints in complete partial orders. No  | 
809  | 
termination proof is required from the user or constructed  | 
|
810  | 
internally. Instead, the possibility of non-termination is modelled  | 
|
811  | 
explicitly in the result type, which contains an explicit bottom  | 
|
812  | 
element.  | 
|
813  | 
||
814  | 
Pattern matching and mutual recursion are currently not supported.  | 
|
815  | 
Thus, the specification consists of a single function described by a  | 
|
816  | 
single recursive equation.  | 
|
817  | 
||
818  | 
There are no fixed syntactic restrictions on the body of the  | 
|
819  | 
function, but the induced functional must be provably monotonic  | 
|
820  | 
wrt.\ the underlying order. The monotonicitity proof is performed  | 
|
821  | 
internally, and the definition is rejected when it fails. The proof  | 
|
822  | 
can be influenced by declaring hints using the  | 
|
| 40406 | 823  | 
  \hyperlink{attribute.HOL.partial-function-mono}{\mbox{\isa{partial{\isaliteral{5F}{\isacharunderscore}}function{\isaliteral{5F}{\isacharunderscore}}mono}}} attribute.
 | 
| 40171 | 824  | 
|
825  | 
  The mandatory \isa{mode} argument specifies the mode of operation
 | 
|
826  | 
of the command, which directly corresponds to a complete partial  | 
|
827  | 
order on the result type. By default, the following modes are  | 
|
| 42123 | 828  | 
defined:  | 
| 40171 | 829  | 
|
830  | 
  \begin{description}
 | 
|
831  | 
  \item \isa{option} defines functions that map into the \isa{option} type. Here, the value \isa{None} is used to model a
 | 
|
832  | 
  non-terminating computation. Monotonicity requires that if \isa{None} is returned by a recursive call, then the overall result
 | 
|
833  | 
  must also be \isa{None}. This is best achieved through the use of
 | 
|
| 40406 | 834  | 
  the monadic operator \isa{{\isaliteral{22}{\isachardoublequote}}Option{\isaliteral{2E}{\isachardot}}bind{\isaliteral{22}{\isachardoublequote}}}.
 | 
| 42123 | 835  | 
|
| 40171 | 836  | 
  \item \isa{tailrec} defines functions with an arbitrary result
 | 
| 40406 | 837  | 
  type and uses the slightly degenerated partial order where \isa{{\isaliteral{22}{\isachardoublequote}}undefined{\isaliteral{22}{\isachardoublequote}}} is the bottom element.  Now, monotonicity requires that
 | 
| 40171 | 838  | 
  if \isa{undefined} is returned by a recursive call, then the
 | 
839  | 
  overall result must also be \isa{undefined}. In practice, this is
 | 
|
840  | 
only satisfied when each recursive call is a tail call, whose result  | 
|
841  | 
is directly returned. Thus, this mode of operation allows the  | 
|
842  | 
definition of arbitrary tail-recursive functions.  | 
|
843  | 
  \end{description}
 | 
|
844  | 
||
845  | 
Experienced users may define new modes by instantiating the locale  | 
|
| 40406 | 846  | 
  \isa{{\isaliteral{22}{\isachardoublequote}}partial{\isaliteral{5F}{\isacharunderscore}}function{\isaliteral{5F}{\isacharunderscore}}definitions{\isaliteral{22}{\isachardoublequote}}} appropriately.
 | 
| 40171 | 847  | 
|
| 40406 | 848  | 
  \item \hyperlink{attribute.HOL.partial-function-mono}{\mbox{\isa{partial{\isaliteral{5F}{\isacharunderscore}}function{\isaliteral{5F}{\isacharunderscore}}mono}}} declares rules for
 | 
| 40171 | 849  | 
use in the internal monononicity proofs of partial function  | 
850  | 
definitions.  | 
|
851  | 
||
852  | 
  \end{description}%
 | 
|
853  | 
\end{isamarkuptext}%
 | 
|
854  | 
\isamarkuptrue%  | 
|
855  | 
%  | 
|
| 26849 | 856  | 
\isamarkupsubsection{Old-style recursive function definitions (TFL)%
 | 
857  | 
}  | 
|
858  | 
\isamarkuptrue%  | 
|
859  | 
%  | 
|
860  | 
\begin{isamarkuptext}%
 | 
|
| 40406 | 861  | 
The old TFL commands \hyperlink{command.HOL.recdef}{\mbox{\isa{\isacommand{recdef}}}} and \hyperlink{command.HOL.recdef-tc}{\mbox{\isa{\isacommand{recdef{\isaliteral{5F}{\isacharunderscore}}tc}}}} for defining recursive are mostly obsolete; \hyperlink{command.HOL.function}{\mbox{\isa{\isacommand{function}}}} or \hyperlink{command.HOL.fun}{\mbox{\isa{\isacommand{fun}}}} should be used instead.
 | 
| 26849 | 862  | 
|
863  | 
  \begin{matharray}{rcl}
 | 
|
| 40406 | 864  | 
    \indexdef{HOL}{command}{recdef}\hypertarget{command.HOL.recdef}{\hyperlink{command.HOL.recdef}{\mbox{\isa{\isacommand{recdef}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
865  | 
    \indexdef{HOL}{command}{recdef\_tc}\hypertarget{command.HOL.recdef-tc}{\hyperlink{command.HOL.recdef-tc}{\mbox{\isa{\isacommand{recdef{\isaliteral{5F}{\isacharunderscore}}tc}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ proof{\isaliteral{28}{\isacharparenleft}}prove{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
| 26849 | 866  | 
  \end{matharray}
 | 
867  | 
||
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
868  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
869  | 
\rail@begin{5}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
870  | 
\rail@term{\hyperlink{command.HOL.recdef}{\mbox{\isa{\isacommand{recdef}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
871  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
872  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
873  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
874  | 
\rail@term{\isa{\isakeyword{permissive}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
875  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
876  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
877  | 
\rail@cr{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
878  | 
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
879  | 
\rail@nont{\hyperlink{syntax.term}{\mbox{\isa{term}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
880  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
881  | 
\rail@nont{\hyperlink{syntax.prop}{\mbox{\isa{prop}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
882  | 
\rail@nextplus{4}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
883  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
884  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
885  | 
\rail@nextbar{4}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
886  | 
\rail@nont{\isa{hints}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
887  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
888  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
889  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
890  | 
\rail@nont{\isa{recdeftc}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
891  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
892  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
893  | 
\rail@nont{\hyperlink{syntax.thmdecl}{\mbox{\isa{thmdecl}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
894  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
895  | 
\rail@nont{\isa{tc}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
896  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
897  | 
\rail@begin{2}{\isa{hints}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
898  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
899  | 
\rail@term{\isa{\isakeyword{hints}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
900  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
901  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
902  | 
\rail@cnont{\isa{recdefmod}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
903  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
904  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
905  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
906  | 
\rail@begin{4}{\isa{recdefmod}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
907  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
908  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
909  | 
\rail@term{\isa{recdef{\isaliteral{5F}{\isacharunderscore}}simp}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
910  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
911  | 
\rail@term{\isa{recdef{\isaliteral{5F}{\isacharunderscore}}cong}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
912  | 
\rail@nextbar{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
913  | 
\rail@term{\isa{recdef{\isaliteral{5F}{\isacharunderscore}}wf}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
914  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
915  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
916  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
917  | 
\rail@term{\isa{add}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
918  | 
\rail@nextbar{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
919  | 
\rail@term{\isa{del}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
920  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
921  | 
\rail@term{\isa{{\isaliteral{3A}{\isacharcolon}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
922  | 
\rail@nont{\hyperlink{syntax.thmrefs}{\mbox{\isa{thmrefs}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
923  | 
\rail@nextbar{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
924  | 
\rail@nont{\hyperlink{syntax.clasimpmod}{\mbox{\isa{clasimpmod}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
925  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
926  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
927  | 
\rail@begin{2}{\isa{tc}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
928  | 
\rail@nont{\hyperlink{syntax.nameref}{\mbox{\isa{nameref}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
929  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
930  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
931  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
932  | 
\rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
933  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
934  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
935  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
936  | 
\end{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
937  | 
|
| 26849 | 938  | 
|
| 28788 | 939  | 
  \begin{description}
 | 
| 42123 | 940  | 
|
| 28788 | 941  | 
  \item \hyperlink{command.HOL.recdef}{\mbox{\isa{\isacommand{recdef}}}} defines general well-founded
 | 
| 26849 | 942  | 
recursive functions (using the TFL package), see also  | 
| 40406 | 943  | 
  \cite{isabelle-HOL}.  The ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}permissive{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}}'' option tells
 | 
| 26849 | 944  | 
TFL to recover from failed proof attempts, returning unfinished  | 
| 40406 | 945  | 
  results.  The \isa{recdef{\isaliteral{5F}{\isacharunderscore}}simp}, \isa{recdef{\isaliteral{5F}{\isacharunderscore}}cong}, and \isa{recdef{\isaliteral{5F}{\isacharunderscore}}wf} hints refer to auxiliary rules to be used in the internal
 | 
| 26902 | 946  | 
  automated proof process of TFL.  Additional \hyperlink{syntax.clasimpmod}{\mbox{\isa{clasimpmod}}}
 | 
| 26849 | 947  | 
  declarations (cf.\ \secref{sec:clasimp}) may be given to tune the
 | 
948  | 
  context of the Simplifier (cf.\ \secref{sec:simplifier}) and
 | 
|
949  | 
  Classical reasoner (cf.\ \secref{sec:classical}).
 | 
|
| 42123 | 950  | 
|
| 40406 | 951  | 
  \item \hyperlink{command.HOL.recdef-tc}{\mbox{\isa{\isacommand{recdef{\isaliteral{5F}{\isacharunderscore}}tc}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}c\ {\isaliteral{28}{\isacharparenleft}}i{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} recommences the
 | 
| 26849 | 952  | 
  proof for leftover termination condition number \isa{i} (default
 | 
| 26902 | 953  | 
  1) as generated by a \hyperlink{command.HOL.recdef}{\mbox{\isa{\isacommand{recdef}}}} definition of
 | 
| 26849 | 954  | 
  constant \isa{c}.
 | 
| 42123 | 955  | 
|
| 26902 | 956  | 
  Note that in most cases, \hyperlink{command.HOL.recdef}{\mbox{\isa{\isacommand{recdef}}}} is able to finish
 | 
| 26849 | 957  | 
its internal proofs without manual intervention.  | 
958  | 
||
| 28788 | 959  | 
  \end{description}
 | 
| 26849 | 960  | 
|
| 26902 | 961  | 
  \medskip Hints for \hyperlink{command.HOL.recdef}{\mbox{\isa{\isacommand{recdef}}}} may be also declared
 | 
| 26849 | 962  | 
globally, using the following attributes.  | 
963  | 
||
964  | 
  \begin{matharray}{rcl}
 | 
|
| 40406 | 965  | 
    \indexdef{HOL}{attribute}{recdef\_simp}\hypertarget{attribute.HOL.recdef-simp}{\hyperlink{attribute.HOL.recdef-simp}{\mbox{\isa{recdef{\isaliteral{5F}{\isacharunderscore}}simp}}}} & : & \isa{attribute} \\
 | 
966  | 
    \indexdef{HOL}{attribute}{recdef\_cong}\hypertarget{attribute.HOL.recdef-cong}{\hyperlink{attribute.HOL.recdef-cong}{\mbox{\isa{recdef{\isaliteral{5F}{\isacharunderscore}}cong}}}} & : & \isa{attribute} \\
 | 
|
967  | 
    \indexdef{HOL}{attribute}{recdef\_wf}\hypertarget{attribute.HOL.recdef-wf}{\hyperlink{attribute.HOL.recdef-wf}{\mbox{\isa{recdef{\isaliteral{5F}{\isacharunderscore}}wf}}}} & : & \isa{attribute} \\
 | 
|
| 26849 | 968  | 
  \end{matharray}
 | 
969  | 
||
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
970  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
971  | 
\rail@begin{3}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
972  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
973  | 
\rail@term{\hyperlink{attribute.HOL.recdef-simp}{\mbox{\isa{recdef{\isaliteral{5F}{\isacharunderscore}}simp}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
974  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
975  | 
\rail@term{\hyperlink{attribute.HOL.recdef-cong}{\mbox{\isa{recdef{\isaliteral{5F}{\isacharunderscore}}cong}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
976  | 
\rail@nextbar{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
977  | 
\rail@term{\hyperlink{attribute.HOL.recdef-wf}{\mbox{\isa{recdef{\isaliteral{5F}{\isacharunderscore}}wf}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
978  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
979  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
980  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
981  | 
\rail@term{\isa{add}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
982  | 
\rail@nextbar{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
983  | 
\rail@term{\isa{del}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
984  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
985  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
986  | 
\end{railoutput}%
 | 
| 26849 | 987  | 
\end{isamarkuptext}%
 | 
988  | 
\isamarkuptrue%  | 
|
989  | 
%  | 
|
990  | 
\isamarkupsection{Inductive and coinductive definitions \label{sec:hol-inductive}%
 | 
|
991  | 
}  | 
|
992  | 
\isamarkuptrue%  | 
|
993  | 
%  | 
|
994  | 
\begin{isamarkuptext}%
 | 
|
995  | 
An \textbf{inductive definition} specifies the least predicate (or
 | 
|
996  | 
  set) \isa{R} closed under given rules: applying a rule to elements
 | 
|
997  | 
  of \isa{R} yields a result within \isa{R}.  For example, a
 | 
|
998  | 
structural operational semantics is an inductive definition of an  | 
|
999  | 
evaluation relation.  | 
|
1000  | 
||
1001  | 
  Dually, a \textbf{coinductive definition} specifies the greatest
 | 
|
1002  | 
  predicate~/ set \isa{R} that is consistent with given rules: every
 | 
|
1003  | 
  element of \isa{R} can be seen as arising by applying a rule to
 | 
|
1004  | 
  elements of \isa{R}.  An important example is using bisimulation
 | 
|
1005  | 
relations to formalise equivalence of processes and infinite data  | 
|
1006  | 
structures.  | 
|
1007  | 
||
1008  | 
\medskip The HOL package is related to the ZF one, which is  | 
|
1009  | 
  described in a separate paper,\footnote{It appeared in CADE
 | 
|
1010  | 
  \cite{paulson-CADE}; a longer version is distributed with Isabelle.}
 | 
|
1011  | 
which you should refer to in case of difficulties. The package is  | 
|
1012  | 
simpler than that of ZF thanks to implicit type-checking in HOL.  | 
|
1013  | 
The types of the (co)inductive predicates (or sets) determine the  | 
|
1014  | 
domain of the fixedpoint definition, and the package does not have  | 
|
1015  | 
to use inference rules for type-checking.  | 
|
1016  | 
||
1017  | 
  \begin{matharray}{rcl}
 | 
|
| 40406 | 1018  | 
    \indexdef{HOL}{command}{inductive}\hypertarget{command.HOL.inductive}{\hyperlink{command.HOL.inductive}{\mbox{\isa{\isacommand{inductive}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
1019  | 
    \indexdef{HOL}{command}{inductive\_set}\hypertarget{command.HOL.inductive-set}{\hyperlink{command.HOL.inductive-set}{\mbox{\isa{\isacommand{inductive{\isaliteral{5F}{\isacharunderscore}}set}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
1020  | 
    \indexdef{HOL}{command}{coinductive}\hypertarget{command.HOL.coinductive}{\hyperlink{command.HOL.coinductive}{\mbox{\isa{\isacommand{coinductive}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
1021  | 
    \indexdef{HOL}{command}{coinductive\_set}\hypertarget{command.HOL.coinductive-set}{\hyperlink{command.HOL.coinductive-set}{\mbox{\isa{\isacommand{coinductive{\isaliteral{5F}{\isacharunderscore}}set}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
| 28788 | 1022  | 
    \indexdef{HOL}{attribute}{mono}\hypertarget{attribute.HOL.mono}{\hyperlink{attribute.HOL.mono}{\mbox{\isa{mono}}}} & : & \isa{attribute} \\
 | 
| 26849 | 1023  | 
  \end{matharray}
 | 
1024  | 
||
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1025  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1026  | 
\rail@begin{7}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1027  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1028  | 
\rail@term{\hyperlink{command.HOL.inductive}{\mbox{\isa{\isacommand{inductive}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1029  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1030  | 
\rail@term{\hyperlink{command.HOL.inductive-set}{\mbox{\isa{\isacommand{inductive{\isaliteral{5F}{\isacharunderscore}}set}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1031  | 
\rail@nextbar{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1032  | 
\rail@term{\hyperlink{command.HOL.coinductive}{\mbox{\isa{\isacommand{coinductive}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1033  | 
\rail@nextbar{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1034  | 
\rail@term{\hyperlink{command.HOL.coinductive-set}{\mbox{\isa{\isacommand{coinductive{\isaliteral{5F}{\isacharunderscore}}set}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1035  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1036  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1037  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1038  | 
\rail@nont{\hyperlink{syntax.target}{\mbox{\isa{target}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1039  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1040  | 
\rail@nont{\hyperlink{syntax.fixes}{\mbox{\isa{fixes}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1041  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1042  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1043  | 
\rail@term{\isa{\isakeyword{for}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1044  | 
\rail@nont{\hyperlink{syntax.fixes}{\mbox{\isa{fixes}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1045  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1046  | 
\rail@cr{5}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1047  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1048  | 
\rail@nextbar{6}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1049  | 
\rail@term{\isa{\isakeyword{where}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1050  | 
\rail@nont{\isa{clauses}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1051  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1052  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1053  | 
\rail@nextbar{6}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1054  | 
\rail@term{\isa{\isakeyword{monos}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1055  | 
\rail@nont{\hyperlink{syntax.thmrefs}{\mbox{\isa{thmrefs}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1056  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1057  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1058  | 
\rail@begin{3}{\isa{clauses}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1059  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1060  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1061  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1062  | 
\rail@nont{\hyperlink{syntax.thmdecl}{\mbox{\isa{thmdecl}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1063  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1064  | 
\rail@nont{\hyperlink{syntax.prop}{\mbox{\isa{prop}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1065  | 
\rail@nextplus{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1066  | 
\rail@cterm{\isa{{\isaliteral{7C}{\isacharbar}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1067  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1068  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1069  | 
\rail@begin{3}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1070  | 
\rail@term{\hyperlink{attribute.HOL.mono}{\mbox{\isa{mono}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1071  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1072  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1073  | 
\rail@term{\isa{add}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1074  | 
\rail@nextbar{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1075  | 
\rail@term{\isa{del}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1076  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1077  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1078  | 
\end{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1079  | 
|
| 26849 | 1080  | 
|
| 28788 | 1081  | 
  \begin{description}
 | 
| 26849 | 1082  | 
|
| 28788 | 1083  | 
  \item \hyperlink{command.HOL.inductive}{\mbox{\isa{\isacommand{inductive}}}} and \hyperlink{command.HOL.coinductive}{\mbox{\isa{\isacommand{coinductive}}}} define (co)inductive predicates from the
 | 
| 26902 | 1084  | 
  introduction rules given in the \hyperlink{keyword.where}{\mbox{\isa{\isakeyword{where}}}} part.  The
 | 
1085  | 
  optional \hyperlink{keyword.for}{\mbox{\isa{\isakeyword{for}}}} part contains a list of parameters of the
 | 
|
| 26849 | 1086  | 
(co)inductive predicates that remain fixed throughout the  | 
| 26902 | 1087  | 
  definition.  The optional \hyperlink{keyword.monos}{\mbox{\isa{\isakeyword{monos}}}} section contains
 | 
| 26849 | 1088  | 
  \emph{monotonicity theorems}, which are required for each operator
 | 
1089  | 
applied to a recursive set in the introduction rules. There  | 
|
| 40406 | 1090  | 
  \emph{must} be a theorem of the form \isa{{\isaliteral{22}{\isachardoublequote}}A\ {\isaliteral{5C3C6C653E}{\isasymle}}\ B\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ M\ A\ {\isaliteral{5C3C6C653E}{\isasymle}}\ M\ B{\isaliteral{22}{\isachardoublequote}}},
 | 
1091  | 
  for each premise \isa{{\isaliteral{22}{\isachardoublequote}}M\ R\isaliteral{5C3C5E7375623E}{}\isactrlsub i\ t{\isaliteral{22}{\isachardoublequote}}} in an introduction rule!
 | 
|
| 26849 | 1092  | 
|
| 40406 | 1093  | 
  \item \hyperlink{command.HOL.inductive-set}{\mbox{\isa{\isacommand{inductive{\isaliteral{5F}{\isacharunderscore}}set}}}} and \hyperlink{command.HOL.coinductive-set}{\mbox{\isa{\isacommand{coinductive{\isaliteral{5F}{\isacharunderscore}}set}}}} are wrappers for to the previous commands,
 | 
| 26849 | 1094  | 
allowing the definition of (co)inductive sets.  | 
1095  | 
||
| 28788 | 1096  | 
  \item \hyperlink{attribute.HOL.mono}{\mbox{\isa{mono}}} declares monotonicity rules.  These
 | 
| 26902 | 1097  | 
  rule are involved in the automated monotonicity proof of \hyperlink{command.HOL.inductive}{\mbox{\isa{\isacommand{inductive}}}}.
 | 
| 26849 | 1098  | 
|
| 28788 | 1099  | 
  \end{description}%
 | 
| 26849 | 1100  | 
\end{isamarkuptext}%
 | 
1101  | 
\isamarkuptrue%  | 
|
1102  | 
%  | 
|
1103  | 
\isamarkupsubsection{Derived rules%
 | 
|
1104  | 
}  | 
|
1105  | 
\isamarkuptrue%  | 
|
1106  | 
%  | 
|
1107  | 
\begin{isamarkuptext}%
 | 
|
1108  | 
Each (co)inductive definition \isa{R} adds definitions to the
 | 
|
1109  | 
theory and also proves some theorems:  | 
|
1110  | 
||
1111  | 
  \begin{description}
 | 
|
1112  | 
||
| 40406 | 1113  | 
  \item \isa{R{\isaliteral{2E}{\isachardot}}intros} is the list of introduction rules as proven
 | 
| 26849 | 1114  | 
theorems, for the recursive predicates (or sets). The rules are  | 
1115  | 
also available individually, using the names given them in the  | 
|
1116  | 
theory file;  | 
|
1117  | 
||
| 40406 | 1118  | 
  \item \isa{R{\isaliteral{2E}{\isachardot}}cases} is the case analysis (or elimination) rule;
 | 
| 26849 | 1119  | 
|
| 40406 | 1120  | 
  \item \isa{R{\isaliteral{2E}{\isachardot}}induct} or \isa{R{\isaliteral{2E}{\isachardot}}coinduct} is the (co)induction
 | 
| 26849 | 1121  | 
rule.  | 
1122  | 
||
1123  | 
  \end{description}
 | 
|
1124  | 
||
| 40406 | 1125  | 
  When several predicates \isa{{\isaliteral{22}{\isachardoublequote}}R\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ R\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{22}{\isachardoublequote}}} are
 | 
| 26849 | 1126  | 
defined simultaneously, the list of introduction rules is called  | 
| 40406 | 1127  | 
  \isa{{\isaliteral{22}{\isachardoublequote}}R\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{5F}{\isacharunderscore}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{5F}{\isacharunderscore}}R\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{2E}{\isachardot}}intros{\isaliteral{22}{\isachardoublequote}}}, the case analysis rules are
 | 
1128  | 
  called \isa{{\isaliteral{22}{\isachardoublequote}}R\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{2E}{\isachardot}}cases{\isaliteral{2C}{\isacharcomma}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{2C}{\isacharcomma}}\ R\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{2E}{\isachardot}}cases{\isaliteral{22}{\isachardoublequote}}}, and the list
 | 
|
1129  | 
  of mutual induction rules is called \isa{{\isaliteral{22}{\isachardoublequote}}R\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{5F}{\isacharunderscore}}{\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{5F}{\isacharunderscore}}R\isaliteral{5C3C5E7375623E}{}\isactrlsub n{\isaliteral{2E}{\isachardot}}inducts{\isaliteral{22}{\isachardoublequote}}}.%
 | 
|
| 26849 | 1130  | 
\end{isamarkuptext}%
 | 
1131  | 
\isamarkuptrue%  | 
|
1132  | 
%  | 
|
1133  | 
\isamarkupsubsection{Monotonicity theorems%
 | 
|
1134  | 
}  | 
|
1135  | 
\isamarkuptrue%  | 
|
1136  | 
%  | 
|
1137  | 
\begin{isamarkuptext}%
 | 
|
1138  | 
Each theory contains a default set of theorems that are used in  | 
|
1139  | 
monotonicity proofs. New rules can be added to this set via the  | 
|
| 26902 | 1140  | 
  \hyperlink{attribute.HOL.mono}{\mbox{\isa{mono}}} attribute.  The HOL theory \isa{Inductive}
 | 
| 26849 | 1141  | 
shows how this is done. In general, the following monotonicity  | 
1142  | 
theorems may be added:  | 
|
1143  | 
||
1144  | 
  \begin{itemize}
 | 
|
1145  | 
||
| 40406 | 1146  | 
  \item Theorems of the form \isa{{\isaliteral{22}{\isachardoublequote}}A\ {\isaliteral{5C3C6C653E}{\isasymle}}\ B\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ M\ A\ {\isaliteral{5C3C6C653E}{\isasymle}}\ M\ B{\isaliteral{22}{\isachardoublequote}}}, for proving
 | 
| 26849 | 1147  | 
monotonicity of inductive definitions whose introduction rules have  | 
| 40406 | 1148  | 
  premises involving terms such as \isa{{\isaliteral{22}{\isachardoublequote}}M\ R\isaliteral{5C3C5E7375623E}{}\isactrlsub i\ t{\isaliteral{22}{\isachardoublequote}}}.
 | 
| 26849 | 1149  | 
|
1150  | 
\item Monotonicity theorems for logical operators, which are of the  | 
|
| 40406 | 1151  | 
  general form \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{28}{\isacharparenleft}}{\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C4C6F6E6772696768746172726F773E}{\isasymLongrightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ {\isaliteral{5C3C646F74733E}{\isasymdots}}{\isaliteral{22}{\isachardoublequote}}}.  For example, in
 | 
1152  | 
  the case of the operator \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6F723E}{\isasymor}}{\isaliteral{22}{\isachardoublequote}}}, the corresponding theorem is
 | 
|
| 26849 | 1153  | 
\[  | 
| 40406 | 1154  | 
  \infer{\isa{{\isaliteral{22}{\isachardoublequote}}P\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C6F723E}{\isasymor}}\ P\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{2}}\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ Q\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C6F723E}{\isasymor}}\ Q\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{2}}{\isaliteral{22}{\isachardoublequote}}}}{\isa{{\isaliteral{22}{\isachardoublequote}}P\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ Q\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{1}}{\isaliteral{22}{\isachardoublequote}}} & \isa{{\isaliteral{22}{\isachardoublequote}}P\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{2}}\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ Q\isaliteral{5C3C5E7375623E}{}\isactrlsub {\isadigit{2}}{\isaliteral{22}{\isachardoublequote}}}}
 | 
| 26849 | 1155  | 
\]  | 
1156  | 
||
1157  | 
\item De Morgan style equations for reasoning about the ``polarity''  | 
|
1158  | 
of expressions, e.g.  | 
|
1159  | 
\[  | 
|
| 40406 | 1160  | 
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ {\isaliteral{5C3C6E6F743E}{\isasymnot}}\ P\ {\isaliteral{5C3C6C6F6E676C65667472696768746172726F773E}{\isasymlongleftrightarrow}}\ P{\isaliteral{22}{\isachardoublequote}}} \qquad\qquad
 | 
1161  | 
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{5C3C6E6F743E}{\isasymnot}}\ {\isaliteral{28}{\isacharparenleft}}P\ {\isaliteral{5C3C616E643E}{\isasymand}}\ Q{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C6C6F6E676C65667472696768746172726F773E}{\isasymlongleftrightarrow}}\ {\isaliteral{5C3C6E6F743E}{\isasymnot}}\ P\ {\isaliteral{5C3C6F723E}{\isasymor}}\ {\isaliteral{5C3C6E6F743E}{\isasymnot}}\ Q{\isaliteral{22}{\isachardoublequote}}}
 | 
|
| 26849 | 1162  | 
\]  | 
1163  | 
||
1164  | 
\item Equations for reducing complex operators to more primitive  | 
|
1165  | 
ones whose monotonicity can easily be proved, e.g.  | 
|
1166  | 
\[  | 
|
| 40406 | 1167  | 
  \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{28}{\isacharparenleft}}P\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ Q{\isaliteral{29}{\isacharparenright}}\ {\isaliteral{5C3C6C6F6E676C65667472696768746172726F773E}{\isasymlongleftrightarrow}}\ {\isaliteral{5C3C6E6F743E}{\isasymnot}}\ P\ {\isaliteral{5C3C6F723E}{\isasymor}}\ Q{\isaliteral{22}{\isachardoublequote}}} \qquad\qquad
 | 
1168  | 
  \isa{{\isaliteral{22}{\isachardoublequote}}Ball\ A\ P\ {\isaliteral{5C3C65717569763E}{\isasymequiv}}\ {\isaliteral{5C3C666F72616C6C3E}{\isasymforall}}x{\isaliteral{2E}{\isachardot}}\ x\ {\isaliteral{5C3C696E3E}{\isasymin}}\ A\ {\isaliteral{5C3C6C6F6E6772696768746172726F773E}{\isasymlongrightarrow}}\ P\ x{\isaliteral{22}{\isachardoublequote}}}
 | 
|
| 26849 | 1169  | 
\]  | 
1170  | 
||
1171  | 
  \end{itemize}
 | 
|
1172  | 
||
1173  | 
%FIXME: Example of an inductive definition%  | 
|
1174  | 
\end{isamarkuptext}%
 | 
|
1175  | 
\isamarkuptrue%  | 
|
1176  | 
%  | 
|
1177  | 
\isamarkupsection{Arithmetic proof support%
 | 
|
1178  | 
}  | 
|
1179  | 
\isamarkuptrue%  | 
|
1180  | 
%  | 
|
1181  | 
\begin{isamarkuptext}%
 | 
|
1182  | 
\begin{matharray}{rcl}
 | 
|
| 28788 | 1183  | 
    \indexdef{HOL}{method}{arith}\hypertarget{method.HOL.arith}{\hyperlink{method.HOL.arith}{\mbox{\isa{arith}}}} & : & \isa{method} \\
 | 
| 30863 | 1184  | 
    \indexdef{HOL}{attribute}{arith}\hypertarget{attribute.HOL.arith}{\hyperlink{attribute.HOL.arith}{\mbox{\isa{arith}}}} & : & \isa{attribute} \\
 | 
| 40406 | 1185  | 
    \indexdef{HOL}{attribute}{arith\_split}\hypertarget{attribute.HOL.arith-split}{\hyperlink{attribute.HOL.arith-split}{\mbox{\isa{arith{\isaliteral{5F}{\isacharunderscore}}split}}}} & : & \isa{attribute} \\
 | 
| 26849 | 1186  | 
  \end{matharray}
 | 
1187  | 
||
| 26902 | 1188  | 
  The \hyperlink{method.HOL.arith}{\mbox{\isa{arith}}} method decides linear arithmetic problems
 | 
| 26849 | 1189  | 
  (on types \isa{nat}, \isa{int}, \isa{real}).  Any current
 | 
1190  | 
facts are inserted into the goal before running the procedure.  | 
|
1191  | 
||
| 30863 | 1192  | 
  The \hyperlink{attribute.HOL.arith}{\mbox{\isa{arith}}} attribute declares facts that are
 | 
1193  | 
always supplied to the arithmetic provers implicitly.  | 
|
| 26849 | 1194  | 
|
| 40406 | 1195  | 
  The \hyperlink{attribute.HOL.arith-split}{\mbox{\isa{arith{\isaliteral{5F}{\isacharunderscore}}split}}} attribute declares case split
 | 
| 30865 | 1196  | 
  rules to be expanded before \hyperlink{method.HOL.arith}{\mbox{\isa{arith}}} is invoked.
 | 
| 30863 | 1197  | 
|
1198  | 
Note that a simpler (but faster) arithmetic prover is  | 
|
1199  | 
already invoked by the Simplifier.%  | 
|
| 26849 | 1200  | 
\end{isamarkuptext}%
 | 
1201  | 
\isamarkuptrue%  | 
|
1202  | 
%  | 
|
| 30172 | 1203  | 
\isamarkupsection{Intuitionistic proof search%
 | 
1204  | 
}  | 
|
1205  | 
\isamarkuptrue%  | 
|
1206  | 
%  | 
|
1207  | 
\begin{isamarkuptext}%
 | 
|
1208  | 
\begin{matharray}{rcl}
 | 
|
1209  | 
    \indexdef{HOL}{method}{iprover}\hypertarget{method.HOL.iprover}{\hyperlink{method.HOL.iprover}{\mbox{\isa{iprover}}}} & : & \isa{method} \\
 | 
|
1210  | 
  \end{matharray}
 | 
|
1211  | 
||
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1212  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1213  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1214  | 
\rail@term{\hyperlink{method.HOL.iprover}{\mbox{\isa{iprover}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1215  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1216  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1217  | 
\rail@cnont{\hyperlink{syntax.rulemod}{\mbox{\isa{rulemod}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1218  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1219  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1220  | 
\end{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1221  | 
|
| 30172 | 1222  | 
|
1223  | 
  The \hyperlink{method.HOL.iprover}{\mbox{\isa{iprover}}} method performs intuitionistic proof
 | 
|
1224  | 
search, depending on specifically declared rules from the context,  | 
|
1225  | 
or given as explicit arguments. Chained facts are inserted into the  | 
|
| 35613 | 1226  | 
goal before commencing proof search.  | 
1227  | 
||
| 30172 | 1228  | 
  Rules need to be classified as \hyperlink{attribute.Pure.intro}{\mbox{\isa{intro}}},
 | 
1229  | 
  \hyperlink{attribute.Pure.elim}{\mbox{\isa{elim}}}, or \hyperlink{attribute.Pure.dest}{\mbox{\isa{dest}}}; here the
 | 
|
| 40406 | 1230  | 
  ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{21}{\isacharbang}}{\isaliteral{22}{\isachardoublequote}}}'' indicator refers to ``safe'' rules, which may be
 | 
| 30172 | 1231  | 
applied aggressively (without considering back-tracking later).  | 
| 40406 | 1232  | 
  Rules declared with ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{3F}{\isacharquery}}{\isaliteral{22}{\isachardoublequote}}}'' are ignored in proof search (the
 | 
| 30172 | 1233  | 
  single-step \hyperlink{method.rule}{\mbox{\isa{rule}}} method still observes these).  An
 | 
1234  | 
explicit weight annotation may be given as well; otherwise the  | 
|
1235  | 
number of rule premises will be taken into account here.%  | 
|
1236  | 
\end{isamarkuptext}%
 | 
|
1237  | 
\isamarkuptrue%  | 
|
1238  | 
%  | 
|
1239  | 
\isamarkupsection{Coherent Logic%
 | 
|
1240  | 
}  | 
|
1241  | 
\isamarkuptrue%  | 
|
1242  | 
%  | 
|
1243  | 
\begin{isamarkuptext}%
 | 
|
1244  | 
\begin{matharray}{rcl}
 | 
|
1245  | 
    \indexdef{HOL}{method}{coherent}\hypertarget{method.HOL.coherent}{\hyperlink{method.HOL.coherent}{\mbox{\isa{coherent}}}} & : & \isa{method} \\
 | 
|
1246  | 
  \end{matharray}
 | 
|
1247  | 
||
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1248  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1249  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1250  | 
\rail@term{\hyperlink{method.HOL.coherent}{\mbox{\isa{coherent}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1251  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1252  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1253  | 
\rail@nont{\hyperlink{syntax.thmrefs}{\mbox{\isa{thmrefs}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1254  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1255  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1256  | 
\end{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1257  | 
|
| 30172 | 1258  | 
|
1259  | 
  The \hyperlink{method.HOL.coherent}{\mbox{\isa{coherent}}} method solves problems of
 | 
|
1260  | 
  \emph{Coherent Logic} \cite{Bezem-Coquand:2005}, which covers
 | 
|
1261  | 
applications in confluence theory, lattice theory and projective  | 
|
| 40802 | 1262  | 
geometry. See \verb|~~/src/HOL/ex/Coherent.thy| for some  | 
| 30172 | 1263  | 
examples.%  | 
1264  | 
\end{isamarkuptext}%
 | 
|
1265  | 
\isamarkuptrue%  | 
|
1266  | 
%  | 
|
| 
42215
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1267  | 
\isamarkupsection{Proving propositions%
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1268  | 
}  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1269  | 
\isamarkuptrue%  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1270  | 
%  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1271  | 
\begin{isamarkuptext}%
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1272  | 
In addition to the standard proof methods, a number of diagnosis  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1273  | 
tools search for proofs and provide an Isar proof snippet on success.  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1274  | 
These tools are available via the following commands.  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1275  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1276  | 
  \begin{matharray}{rcl}
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1277  | 
    \indexdef{HOL}{command}{solve\_direct}\hypertarget{command.HOL.solve-direct}{\hyperlink{command.HOL.solve-direct}{\mbox{\isa{\isacommand{solve{\isaliteral{5F}{\isacharunderscore}}direct}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}proof\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1278  | 
    \indexdef{HOL}{command}{try}\hypertarget{command.HOL.try}{\hyperlink{command.HOL.try}{\mbox{\isa{\isacommand{try}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}proof\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1279  | 
    \indexdef{HOL}{command}{sledgehammer}\hypertarget{command.HOL.sledgehammer}{\hyperlink{command.HOL.sledgehammer}{\mbox{\isa{\isacommand{sledgehammer}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}proof\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1280  | 
    \indexdef{HOL}{command}{sledgehammer\_params}\hypertarget{command.HOL.sledgehammer-params}{\hyperlink{command.HOL.sledgehammer-params}{\mbox{\isa{\isacommand{sledgehammer{\isaliteral{5F}{\isacharunderscore}}params}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}}
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1281  | 
  \end{matharray}
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1282  | 
|
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1283  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1284  | 
\rail@begin{6}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1285  | 
\rail@term{\hyperlink{command.HOL.try}{\mbox{\isa{\isacommand{try}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1286  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1287  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1288  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1289  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1290  | 
\rail@term{\isa{simp}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1291  | 
\rail@nextbar{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1292  | 
\rail@term{\isa{intro}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1293  | 
\rail@nextbar{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1294  | 
\rail@term{\isa{elim}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1295  | 
\rail@nextbar{4}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1296  | 
\rail@term{\isa{dest}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1297  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1298  | 
\rail@term{\isa{{\isaliteral{3A}{\isacharcolon}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1299  | 
\rail@nont{\hyperlink{syntax.thmrefs}{\mbox{\isa{thmrefs}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1300  | 
\rail@nextplus{5}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1301  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1302  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1303  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1304  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1305  | 
\rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1306  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1307  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1308  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1309  | 
\rail@term{\hyperlink{command.HOL.sledgehammer}{\mbox{\isa{\isacommand{sledgehammer}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1310  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1311  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1312  | 
\rail@term{\isa{{\isaliteral{5B}{\isacharbrackleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1313  | 
\rail@nont{\isa{args}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1314  | 
\rail@term{\isa{{\isaliteral{5D}{\isacharbrackright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1315  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1316  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1317  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1318  | 
\rail@nont{\isa{facts}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1319  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1320  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1321  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1322  | 
\rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1323  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1324  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1325  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1326  | 
\rail@term{\hyperlink{command.HOL.sledgehammer-params}{\mbox{\isa{\isacommand{sledgehammer{\isaliteral{5F}{\isacharunderscore}}params}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1327  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1328  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1329  | 
\rail@term{\isa{{\isaliteral{5B}{\isacharbrackleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1330  | 
\rail@nont{\isa{args}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1331  | 
\rail@term{\isa{{\isaliteral{5D}{\isacharbrackright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1332  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1333  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1334  | 
\rail@begin{2}{\isa{args}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1335  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1336  | 
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1337  | 
\rail@term{\isa{{\isaliteral{3D}{\isacharequal}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1338  | 
\rail@nont{\isa{value}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1339  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1340  | 
\rail@cterm{\isa{{\isaliteral{2C}{\isacharcomma}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1341  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1342  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1343  | 
\rail@begin{5}{\isa{facts}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1344  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1345  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1346  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1347  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1348  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1349  | 
\rail@nextbar{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1350  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1351  | 
\rail@term{\isa{add}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1352  | 
\rail@nextbar{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1353  | 
\rail@term{\isa{del}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1354  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1355  | 
\rail@term{\isa{{\isaliteral{3A}{\isacharcolon}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1356  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1357  | 
\rail@nont{\hyperlink{syntax.thmrefs}{\mbox{\isa{thmrefs}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1358  | 
\rail@nextplus{4}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1359  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1360  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1361  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1362  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1363  | 
\end{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1364  | 
% FIXME try: proper clasimpmod!?  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1365  | 
% FIXME check args "value"  | 
| 
42215
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1366  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1367  | 
  \begin{description}
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1368  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1369  | 
  \item \hyperlink{command.HOL.solve-direct}{\mbox{\isa{\isacommand{solve{\isaliteral{5F}{\isacharunderscore}}direct}}}} checks whether the current subgoals can
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1370  | 
be solved directly by an existing theorem. Duplicate lemmas can be detected  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1371  | 
in this way.  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1372  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1373  | 
  \item \hyperlink{command.HOL.try}{\mbox{\isa{\isacommand{try}}}} attempts to prove a subgoal using a combination
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1374  | 
    of standard proof methods (\isa{auto}, \isa{simp}, \isa{blast}, etc.).
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1375  | 
    Additional facts supplied via \isa{{\isaliteral{22}{\isachardoublequote}}simp{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}}, \isa{{\isaliteral{22}{\isachardoublequote}}intro{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}},
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1376  | 
    \isa{{\isaliteral{22}{\isachardoublequote}}elim{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}}, and \isa{{\isaliteral{22}{\isachardoublequote}}dest{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}} are passed to the appropriate proof
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1377  | 
methods.  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1378  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1379  | 
  \item \hyperlink{command.HOL.sledgehammer}{\mbox{\isa{\isacommand{sledgehammer}}}} attempts to prove a subgoal using external
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1380  | 
automatic provers (resolution provers and SMT solvers). See the Sledgehammer  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1381  | 
    manual \cite{isabelle-sledgehammer} for details.
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1382  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1383  | 
  \item \hyperlink{command.HOL.sledgehammer-params}{\mbox{\isa{\isacommand{sledgehammer{\isaliteral{5F}{\isacharunderscore}}params}}}} changes
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1384  | 
    \hyperlink{command.HOL.sledgehammer}{\mbox{\isa{\isacommand{sledgehammer}}}} configuration options persistently.
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1385  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1386  | 
  \end{description}%
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1387  | 
\end{isamarkuptext}%
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1388  | 
\isamarkuptrue%  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1389  | 
%  | 
| 31913 | 1390  | 
\isamarkupsection{Checking and refuting propositions%
 | 
1391  | 
}  | 
|
1392  | 
\isamarkuptrue%  | 
|
1393  | 
%  | 
|
1394  | 
\begin{isamarkuptext}%
 | 
|
1395  | 
Identifying incorrect propositions usually involves evaluation of  | 
|
| 
42215
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1396  | 
particular assignments and systematic counterexample search. This  | 
| 31913 | 1397  | 
is supported by the following commands.  | 
1398  | 
||
1399  | 
  \begin{matharray}{rcl}
 | 
|
| 40406 | 1400  | 
    \indexdef{HOL}{command}{value}\hypertarget{command.HOL.value}{\hyperlink{command.HOL.value}{\mbox{\isa{\isacommand{value}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}context\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
1401  | 
    \indexdef{HOL}{command}{quickcheck}\hypertarget{command.HOL.quickcheck}{\hyperlink{command.HOL.quickcheck}{\mbox{\isa{\isacommand{quickcheck}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}proof\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
| 
42215
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1402  | 
    \indexdef{HOL}{command}{refute}\hypertarget{command.HOL.refute}{\hyperlink{command.HOL.refute}{\mbox{\isa{\isacommand{refute}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}proof\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1403  | 
    \indexdef{HOL}{command}{nitpick}\hypertarget{command.HOL.nitpick}{\hyperlink{command.HOL.nitpick}{\mbox{\isa{\isacommand{nitpick}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}proof\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1404  | 
    \indexdef{HOL}{command}{quickcheck\_params}\hypertarget{command.HOL.quickcheck-params}{\hyperlink{command.HOL.quickcheck-params}{\mbox{\isa{\isacommand{quickcheck{\isaliteral{5F}{\isacharunderscore}}params}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1405  | 
    \indexdef{HOL}{command}{refute\_params}\hypertarget{command.HOL.refute-params}{\hyperlink{command.HOL.refute-params}{\mbox{\isa{\isacommand{refute{\isaliteral{5F}{\isacharunderscore}}params}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1406  | 
    \indexdef{HOL}{command}{nitpick\_params}\hypertarget{command.HOL.nitpick-params}{\hyperlink{command.HOL.nitpick-params}{\mbox{\isa{\isacommand{nitpick{\isaliteral{5F}{\isacharunderscore}}params}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}}
 | 
| 31913 | 1407  | 
  \end{matharray}
 | 
1408  | 
||
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1409  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1410  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1411  | 
\rail@term{\hyperlink{command.HOL.value}{\mbox{\isa{\isacommand{value}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1412  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1413  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1414  | 
\rail@term{\isa{{\isaliteral{5B}{\isacharbrackleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1415  | 
\rail@nont{\isa{name}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1416  | 
\rail@term{\isa{{\isaliteral{5D}{\isacharbrackright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1417  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1418  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1419  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1420  | 
\rail@nont{\isa{modes}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1421  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1422  | 
\rail@nont{\hyperlink{syntax.term}{\mbox{\isa{term}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1423  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1424  | 
\rail@begin{3}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1425  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1426  | 
\rail@term{\hyperlink{command.HOL.quickcheck}{\mbox{\isa{\isacommand{quickcheck}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1427  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1428  | 
\rail@term{\hyperlink{command.HOL.refute}{\mbox{\isa{\isacommand{refute}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1429  | 
\rail@nextbar{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1430  | 
\rail@term{\hyperlink{command.HOL.nitpick}{\mbox{\isa{\isacommand{nitpick}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1431  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1432  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1433  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1434  | 
\rail@term{\isa{{\isaliteral{5B}{\isacharbrackleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1435  | 
\rail@nont{\isa{args}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1436  | 
\rail@term{\isa{{\isaliteral{5D}{\isacharbrackright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1437  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1438  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1439  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1440  | 
\rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1441  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1442  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1443  | 
\rail@begin{3}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1444  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1445  | 
\rail@term{\hyperlink{command.HOL.quickcheck-params}{\mbox{\isa{\isacommand{quickcheck{\isaliteral{5F}{\isacharunderscore}}params}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1446  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1447  | 
\rail@term{\hyperlink{command.HOL.refute-params}{\mbox{\isa{\isacommand{refute{\isaliteral{5F}{\isacharunderscore}}params}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1448  | 
\rail@nextbar{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1449  | 
\rail@term{\hyperlink{command.HOL.nitpick-params}{\mbox{\isa{\isacommand{nitpick{\isaliteral{5F}{\isacharunderscore}}params}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1450  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1451  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1452  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1453  | 
\rail@term{\isa{{\isaliteral{5B}{\isacharbrackleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1454  | 
\rail@nont{\isa{args}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1455  | 
\rail@term{\isa{{\isaliteral{5D}{\isacharbrackright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1456  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1457  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1458  | 
\rail@begin{2}{\isa{modes}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1459  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1460  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1461  | 
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1462  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1463  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1464  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1465  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1466  | 
\rail@begin{2}{\isa{args}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1467  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1468  | 
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1469  | 
\rail@term{\isa{{\isaliteral{3D}{\isacharequal}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1470  | 
\rail@nont{\isa{value}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1471  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1472  | 
\rail@cterm{\isa{{\isaliteral{2C}{\isacharcomma}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1473  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1474  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1475  | 
\end{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1476  | 
% FIXME check "value"  | 
| 31913 | 1477  | 
|
1478  | 
  \begin{description}
 | 
|
1479  | 
||
1480  | 
  \item \hyperlink{command.HOL.value}{\mbox{\isa{\isacommand{value}}}}~\isa{t} evaluates and prints a
 | 
|
1481  | 
    term; optionally \isa{modes} can be specified, which are
 | 
|
1482  | 
    appended to the current print mode (see also \cite{isabelle-ref}).
 | 
|
1483  | 
Internally, the evaluation is performed by registered evaluators,  | 
|
1484  | 
which are invoked sequentially until a result is returned.  | 
|
1485  | 
Alternatively a specific evaluator can be selected using square  | 
|
| 37444 | 1486  | 
brackets; typical evaluators use the current set of code equations  | 
1487  | 
    to normalize and include \isa{simp} for fully symbolic evaluation
 | 
|
1488  | 
    using the simplifier, \isa{nbe} for \emph{normalization by evaluation}
 | 
|
1489  | 
    and \emph{code} for code generation in SML.
 | 
|
| 31913 | 1490  | 
|
1491  | 
  \item \hyperlink{command.HOL.quickcheck}{\mbox{\isa{\isacommand{quickcheck}}}} tests the current goal for
 | 
|
| 
42215
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1492  | 
counterexamples using a series of assignments for its  | 
| 31913 | 1493  | 
free variables; by default the first subgoal is tested, an other  | 
1494  | 
can be selected explicitly using an optional goal index.  | 
|
| 40937 | 1495  | 
Assignments can be chosen exhausting the search space upto a given  | 
1496  | 
size or using a fixed number of random assignments in the search space.  | 
|
1497  | 
By default, quickcheck uses exhaustive testing.  | 
|
| 31913 | 1498  | 
A number of configuration options are supported for  | 
1499  | 
    \hyperlink{command.HOL.quickcheck}{\mbox{\isa{\isacommand{quickcheck}}}}, notably:
 | 
|
1500  | 
||
1501  | 
    \begin{description}
 | 
|
1502  | 
||
| 40937 | 1503  | 
    \item[\isa{tester}] specifies how to explore the search space
 | 
1504  | 
(e.g. exhaustive or random).  | 
|
1505  | 
An unknown configuration option is treated as an argument to tester,  | 
|
1506  | 
      making \isa{{\isaliteral{22}{\isachardoublequote}}tester\ {\isaliteral{3D}{\isacharequal}}{\isaliteral{22}{\isachardoublequote}}} optional.
 | 
|
| 40254 | 1507  | 
    \item[\isa{size}] specifies the maximum size of the search space
 | 
1508  | 
for assignment values.  | 
|
1509  | 
||
| 42123 | 1510  | 
    \item[\isa{eval}] takes a term or a list of terms and evaluates
 | 
1511  | 
these terms under the variable assignment found by quickcheck.  | 
|
1512  | 
||
| 40254 | 1513  | 
    \item[\isa{iterations}] sets how many sets of assignments are
 | 
1514  | 
generated for each particular size.  | 
|
1515  | 
||
| 40406 | 1516  | 
    \item[\isa{no{\isaliteral{5F}{\isacharunderscore}}assms}] specifies whether assumptions in
 | 
| 40254 | 1517  | 
structured proofs should be ignored.  | 
1518  | 
||
1519  | 
    \item[\isa{timeout}] sets the time limit in seconds.
 | 
|
| 31913 | 1520  | 
|
| 40406 | 1521  | 
    \item[\isa{default{\isaliteral{5F}{\isacharunderscore}}type}] sets the type(s) generally used to
 | 
| 40254 | 1522  | 
instantiate type variables.  | 
1523  | 
||
1524  | 
    \item[\isa{report}] if set quickcheck reports how many tests
 | 
|
1525  | 
fulfilled the preconditions.  | 
|
| 31913 | 1526  | 
|
| 40254 | 1527  | 
    \item[\isa{quiet}] if not set quickcheck informs about the
 | 
1528  | 
current size for assignment values.  | 
|
1529  | 
||
1530  | 
    \item[\isa{expect}] can be used to check if the user's
 | 
|
| 40406 | 1531  | 
    expectation was met (\isa{no{\isaliteral{5F}{\isacharunderscore}}expectation}, \isa{no{\isaliteral{5F}{\isacharunderscore}}counterexample}, or \isa{counterexample}).
 | 
| 
35351
 
7425aece4ee3
allow general mixfix syntax for type constructors;
 
wenzelm 
parents: 
34172 
diff
changeset
 | 
1532  | 
|
| 31913 | 1533  | 
    \end{description}
 | 
1534  | 
||
1535  | 
These option can be given within square brackets.  | 
|
1536  | 
||
| 
42215
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1537  | 
  \item \hyperlink{command.HOL.quickcheck-params}{\mbox{\isa{\isacommand{quickcheck{\isaliteral{5F}{\isacharunderscore}}params}}}} changes
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1538  | 
    \hyperlink{command.HOL.quickcheck}{\mbox{\isa{\isacommand{quickcheck}}}} configuration options persistently.
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1539  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1540  | 
  \item \hyperlink{command.HOL.refute}{\mbox{\isa{\isacommand{refute}}}} tests the current goal for
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1541  | 
counterexamples using a reduction to SAT. The following configuration  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1542  | 
options are supported:  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1543  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1544  | 
    \begin{description}
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1545  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1546  | 
    \item[\isa{minsize}] specifies the minimum size (cardinality) of the
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1547  | 
models to search for.  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1548  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1549  | 
    \item[\isa{maxsize}] specifies the maximum size (cardinality) of the
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1550  | 
models to search for. Nonpositive values mean $\infty$.  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1551  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1552  | 
    \item[\isa{maxvars}] specifies the maximum number of Boolean variables
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1553  | 
to use when transforming the term into a propositional formula.  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1554  | 
Nonpositive values mean $\infty$.  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1555  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1556  | 
    \item[\isa{satsolver}] specifies the SAT solver to use.
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1557  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1558  | 
    \item[\isa{no{\isaliteral{5F}{\isacharunderscore}}assms}] specifies whether assumptions in
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1559  | 
structured proofs should be ignored.  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1560  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1561  | 
    \item[\isa{maxtime}] sets the time limit in seconds.
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1562  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1563  | 
    \item[\isa{expect}] can be used to check if the user's
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1564  | 
    expectation was met (\isa{genuine}, \isa{potential},
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1565  | 
    \isa{none}, or \isa{unknown}).
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1566  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1567  | 
    \end{description}
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1568  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1569  | 
These option can be given within square brackets.  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1570  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1571  | 
  \item \hyperlink{command.HOL.refute-params}{\mbox{\isa{\isacommand{refute{\isaliteral{5F}{\isacharunderscore}}params}}}} changes
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1572  | 
    \hyperlink{command.HOL.refute}{\mbox{\isa{\isacommand{refute}}}} configuration options persistently.
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1573  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1574  | 
  \item \hyperlink{command.HOL.nitpick}{\mbox{\isa{\isacommand{nitpick}}}} tests the current goal for counterexamples
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1575  | 
using a reduction to first-order relational logic. See the Nitpick manual  | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1576  | 
    \cite{isabelle-nitpick} for details.
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1577  | 
|
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1578  | 
  \item \hyperlink{command.HOL.nitpick-params}{\mbox{\isa{\isacommand{nitpick{\isaliteral{5F}{\isacharunderscore}}params}}}} changes
 | 
| 
 
de9d43c427ae
document "nitpick(_params)", "refute(_params)", "try", "sledgehammer(_params)", and "solve_direct"
 
blanchet 
parents: 
42123 
diff
changeset
 | 
1579  | 
    \hyperlink{command.HOL.nitpick}{\mbox{\isa{\isacommand{nitpick}}}} configuration options persistently.
 | 
| 31913 | 1580  | 
|
1581  | 
  \end{description}%
 | 
|
1582  | 
\end{isamarkuptext}%
 | 
|
1583  | 
\isamarkuptrue%  | 
|
1584  | 
%  | 
|
| 28788 | 1585  | 
\isamarkupsection{Unstructured case analysis and induction \label{sec:hol-induct-tac}%
 | 
| 26849 | 1586  | 
}  | 
1587  | 
\isamarkuptrue%  | 
|
1588  | 
%  | 
|
1589  | 
\begin{isamarkuptext}%
 | 
|
| 27124 | 1590  | 
The following tools of Isabelle/HOL support cases analysis and  | 
1591  | 
induction in unstructured tactic scripts; see also  | 
|
1592  | 
  \secref{sec:cases-induct} for proper Isar versions of similar ideas.
 | 
|
| 26849 | 1593  | 
|
1594  | 
  \begin{matharray}{rcl}
 | 
|
| 40406 | 1595  | 
    \indexdef{HOL}{method}{case\_tac}\hypertarget{method.HOL.case-tac}{\hyperlink{method.HOL.case-tac}{\mbox{\isa{case{\isaliteral{5F}{\isacharunderscore}}tac}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{method} \\
 | 
1596  | 
    \indexdef{HOL}{method}{induct\_tac}\hypertarget{method.HOL.induct-tac}{\hyperlink{method.HOL.induct-tac}{\mbox{\isa{induct{\isaliteral{5F}{\isacharunderscore}}tac}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{method} \\
 | 
|
1597  | 
    \indexdef{HOL}{method}{ind\_cases}\hypertarget{method.HOL.ind-cases}{\hyperlink{method.HOL.ind-cases}{\mbox{\isa{ind{\isaliteral{5F}{\isacharunderscore}}cases}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{method} \\
 | 
|
1598  | 
    \indexdef{HOL}{command}{inductive\_cases}\hypertarget{command.HOL.inductive-cases}{\hyperlink{command.HOL.inductive-cases}{\mbox{\isa{\isacommand{inductive{\isaliteral{5F}{\isacharunderscore}}cases}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}local{\isaliteral{5F}{\isacharunderscore}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ local{\isaliteral{5F}{\isacharunderscore}}theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
| 26849 | 1599  | 
  \end{matharray}
 | 
1600  | 
||
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1601  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1602  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1603  | 
\rail@term{\hyperlink{method.HOL.case-tac}{\mbox{\isa{case{\isaliteral{5F}{\isacharunderscore}}tac}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1604  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1605  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1606  | 
\rail@nont{\hyperlink{syntax.goalspec}{\mbox{\isa{goalspec}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1607  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1608  | 
\rail@nont{\hyperlink{syntax.term}{\mbox{\isa{term}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1609  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1610  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1611  | 
\rail@nont{\isa{rule}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1612  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1613  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1614  | 
\rail@begin{3}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1615  | 
\rail@term{\hyperlink{method.HOL.induct-tac}{\mbox{\isa{induct{\isaliteral{5F}{\isacharunderscore}}tac}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1616  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1617  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1618  | 
\rail@nont{\hyperlink{syntax.goalspec}{\mbox{\isa{goalspec}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1619  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1620  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1621  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1622  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1623  | 
\rail@nont{\hyperlink{syntax.insts}{\mbox{\isa{insts}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1624  | 
\rail@nextplus{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1625  | 
\rail@cterm{\isa{\isakeyword{and}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1626  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1627  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1628  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1629  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1630  | 
\rail@nont{\isa{rule}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1631  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1632  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1633  | 
\rail@begin{3}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1634  | 
\rail@term{\hyperlink{method.HOL.ind-cases}{\mbox{\isa{ind{\isaliteral{5F}{\isacharunderscore}}cases}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1635  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1636  | 
\rail@nont{\hyperlink{syntax.prop}{\mbox{\isa{prop}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1637  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1638  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1639  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1640  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1641  | 
\rail@term{\isa{\isakeyword{for}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1642  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1643  | 
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1644  | 
\rail@nextplus{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1645  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1646  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1647  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1648  | 
\rail@begin{3}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1649  | 
\rail@term{\hyperlink{command.HOL.inductive-cases}{\mbox{\isa{\isacommand{inductive{\isaliteral{5F}{\isacharunderscore}}cases}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1650  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1651  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1652  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1653  | 
\rail@nont{\hyperlink{syntax.thmdecl}{\mbox{\isa{thmdecl}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1654  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1655  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1656  | 
\rail@nont{\hyperlink{syntax.prop}{\mbox{\isa{prop}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1657  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1658  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1659  | 
\rail@nextplus{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1660  | 
\rail@cterm{\isa{\isakeyword{and}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1661  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1662  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1663  | 
\rail@begin{1}{\isa{rule}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1664  | 
\rail@term{\isa{rule}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1665  | 
\rail@term{\isa{{\isaliteral{3A}{\isacharcolon}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1666  | 
\rail@nont{\hyperlink{syntax.thmref}{\mbox{\isa{thmref}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1667  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1668  | 
\end{railoutput}
 | 
| 26849 | 1669  | 
|
1670  | 
||
| 28788 | 1671  | 
  \begin{description}
 | 
| 26849 | 1672  | 
|
| 40406 | 1673  | 
  \item \hyperlink{method.HOL.case-tac}{\mbox{\isa{case{\isaliteral{5F}{\isacharunderscore}}tac}}} and \hyperlink{method.HOL.induct-tac}{\mbox{\isa{induct{\isaliteral{5F}{\isacharunderscore}}tac}}} admit
 | 
| 28788 | 1674  | 
to reason about inductive types. Rules are selected according to  | 
1675  | 
  the declarations by the \hyperlink{attribute.cases}{\mbox{\isa{cases}}} and \hyperlink{attribute.induct}{\mbox{\isa{induct}}}
 | 
|
1676  | 
  attributes, cf.\ \secref{sec:cases-induct}.  The \hyperlink{command.HOL.datatype}{\mbox{\isa{\isacommand{datatype}}}} package already takes care of this.
 | 
|
| 27124 | 1677  | 
|
1678  | 
These unstructured tactics feature both goal addressing and dynamic  | 
|
| 26849 | 1679  | 
  instantiation.  Note that named rule cases are \emph{not} provided
 | 
| 27124 | 1680  | 
  as would be by the proper \hyperlink{method.cases}{\mbox{\isa{cases}}} and \hyperlink{method.induct}{\mbox{\isa{induct}}} proof
 | 
| 40406 | 1681  | 
  methods (see \secref{sec:cases-induct}).  Unlike the \hyperlink{method.induct}{\mbox{\isa{induct}}} method, \hyperlink{method.induct-tac}{\mbox{\isa{induct{\isaliteral{5F}{\isacharunderscore}}tac}}} does not handle structured rule
 | 
| 27124 | 1682  | 
statements, only the compact object-logic conclusion of the subgoal  | 
1683  | 
being addressed.  | 
|
| 42123 | 1684  | 
|
| 40406 | 1685  | 
  \item \hyperlink{method.HOL.ind-cases}{\mbox{\isa{ind{\isaliteral{5F}{\isacharunderscore}}cases}}} and \hyperlink{command.HOL.inductive-cases}{\mbox{\isa{\isacommand{inductive{\isaliteral{5F}{\isacharunderscore}}cases}}}} provide an interface to the internal \verb|mk_cases| operation.  Rules are simplified in an unrestricted
 | 
| 26861 | 1686  | 
forward manner.  | 
| 26849 | 1687  | 
|
| 40406 | 1688  | 
  While \hyperlink{method.HOL.ind-cases}{\mbox{\isa{ind{\isaliteral{5F}{\isacharunderscore}}cases}}} is a proof method to apply the
 | 
1689  | 
  result immediately as elimination rules, \hyperlink{command.HOL.inductive-cases}{\mbox{\isa{\isacommand{inductive{\isaliteral{5F}{\isacharunderscore}}cases}}}} provides case split theorems at the theory level
 | 
|
1690  | 
  for later use.  The \hyperlink{keyword.for}{\mbox{\isa{\isakeyword{for}}}} argument of the \hyperlink{method.HOL.ind-cases}{\mbox{\isa{ind{\isaliteral{5F}{\isacharunderscore}}cases}}} method allows to specify a list of variables that should
 | 
|
| 26849 | 1691  | 
be generalized before applying the resulting rule.  | 
1692  | 
||
| 28788 | 1693  | 
  \end{description}%
 | 
| 26849 | 1694  | 
\end{isamarkuptext}%
 | 
1695  | 
\isamarkuptrue%  | 
|
1696  | 
%  | 
|
1697  | 
\isamarkupsection{Executable code%
 | 
|
1698  | 
}  | 
|
1699  | 
\isamarkuptrue%  | 
|
1700  | 
%  | 
|
1701  | 
\begin{isamarkuptext}%
 | 
|
1702  | 
Isabelle/Pure provides two generic frameworks to support code  | 
|
1703  | 
generation from executable specifications. Isabelle/HOL  | 
|
1704  | 
instantiates these mechanisms in a way that is amenable to end-user  | 
|
1705  | 
applications.  | 
|
1706  | 
||
| 37422 | 1707  | 
\medskip One framework generates code from functional programs  | 
1708  | 
  (including overloading using type classes) to SML \cite{SML}, OCaml
 | 
|
| 38813 | 1709  | 
  \cite{OCaml}, Haskell \cite{haskell-revised-report} and Scala
 | 
1710  | 
  \cite{scala-overview-tech-report}.
 | 
|
| 37422 | 1711  | 
Conceptually, code generation is split up in three steps:  | 
1712  | 
  \emph{selection} of code theorems, \emph{translation} into an
 | 
|
1713  | 
  abstract executable view and \emph{serialization} to a specific
 | 
|
1714  | 
  \emph{target language}.  Inductive specifications can be executed
 | 
|
1715  | 
using the predicate compiler which operates within HOL.  | 
|
1716  | 
  See \cite{isabelle-codegen} for an introduction.
 | 
|
1717  | 
||
1718  | 
  \begin{matharray}{rcl}
 | 
|
| 40406 | 1719  | 
    \indexdef{HOL}{command}{export\_code}\hypertarget{command.HOL.export-code}{\hyperlink{command.HOL.export-code}{\mbox{\isa{\isacommand{export{\isaliteral{5F}{\isacharunderscore}}code}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}context\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
| 37422 | 1720  | 
    \indexdef{HOL}{attribute}{code}\hypertarget{attribute.HOL.code}{\hyperlink{attribute.HOL.code}{\mbox{\isa{code}}}} & : & \isa{attribute} \\
 | 
| 40406 | 1721  | 
    \indexdef{HOL}{command}{code\_abort}\hypertarget{command.HOL.code-abort}{\hyperlink{command.HOL.code-abort}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}abort}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
1722  | 
    \indexdef{HOL}{command}{code\_datatype}\hypertarget{command.HOL.code-datatype}{\hyperlink{command.HOL.code-datatype}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}datatype}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
1723  | 
    \indexdef{HOL}{command}{print\_codesetup}\hypertarget{command.HOL.print-codesetup}{\hyperlink{command.HOL.print-codesetup}{\mbox{\isa{\isacommand{print{\isaliteral{5F}{\isacharunderscore}}codesetup}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}context\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
1724  | 
    \indexdef{HOL}{attribute}{code\_inline}\hypertarget{attribute.HOL.code-inline}{\hyperlink{attribute.HOL.code-inline}{\mbox{\isa{code{\isaliteral{5F}{\isacharunderscore}}inline}}}} & : & \isa{attribute} \\
 | 
|
1725  | 
    \indexdef{HOL}{attribute}{code\_post}\hypertarget{attribute.HOL.code-post}{\hyperlink{attribute.HOL.code-post}{\mbox{\isa{code{\isaliteral{5F}{\isacharunderscore}}post}}}} & : & \isa{attribute} \\
 | 
|
1726  | 
    \indexdef{HOL}{command}{print\_codeproc}\hypertarget{command.HOL.print-codeproc}{\hyperlink{command.HOL.print-codeproc}{\mbox{\isa{\isacommand{print{\isaliteral{5F}{\isacharunderscore}}codeproc}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}context\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
1727  | 
    \indexdef{HOL}{command}{code\_thms}\hypertarget{command.HOL.code-thms}{\hyperlink{command.HOL.code-thms}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}thms}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}context\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
1728  | 
    \indexdef{HOL}{command}{code\_deps}\hypertarget{command.HOL.code-deps}{\hyperlink{command.HOL.code-deps}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}deps}}}}}\isa{{\isaliteral{22}{\isachardoublequote}}\isaliteral{5C3C5E7375703E}{}\isactrlsup {\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}context\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
1729  | 
    \indexdef{HOL}{command}{code\_const}\hypertarget{command.HOL.code-const}{\hyperlink{command.HOL.code-const}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}const}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
1730  | 
    \indexdef{HOL}{command}{code\_type}\hypertarget{command.HOL.code-type}{\hyperlink{command.HOL.code-type}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}type}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
1731  | 
    \indexdef{HOL}{command}{code\_class}\hypertarget{command.HOL.code-class}{\hyperlink{command.HOL.code-class}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}class}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
1732  | 
    \indexdef{HOL}{command}{code\_instance}\hypertarget{command.HOL.code-instance}{\hyperlink{command.HOL.code-instance}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}instance}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
1733  | 
    \indexdef{HOL}{command}{code\_reserved}\hypertarget{command.HOL.code-reserved}{\hyperlink{command.HOL.code-reserved}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}reserved}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
1734  | 
    \indexdef{HOL}{command}{code\_monad}\hypertarget{command.HOL.code-monad}{\hyperlink{command.HOL.code-monad}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}monad}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
1735  | 
    \indexdef{HOL}{command}{code\_include}\hypertarget{command.HOL.code-include}{\hyperlink{command.HOL.code-include}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}include}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
1736  | 
    \indexdef{HOL}{command}{code\_modulename}\hypertarget{command.HOL.code-modulename}{\hyperlink{command.HOL.code-modulename}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}modulename}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
1737  | 
    \indexdef{HOL}{command}{code\_reflect}\hypertarget{command.HOL.code-reflect}{\hyperlink{command.HOL.code-reflect}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}reflect}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}}
 | 
|
| 37422 | 1738  | 
  \end{matharray}
 | 
1739  | 
||
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1740  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1741  | 
\rail@begin{11}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1742  | 
\rail@term{\hyperlink{command.HOL.export-code}{\mbox{\isa{\isacommand{export{\isaliteral{5F}{\isacharunderscore}}code}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1743  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1744  | 
\rail@nont{\isa{constexpr}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1745  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1746  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1747  | 
\rail@cr{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1748  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1749  | 
\rail@nextbar{4}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1750  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1751  | 
\rail@term{\isa{\isakeyword{in}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1752  | 
\rail@nont{\isa{target}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1753  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1754  | 
\rail@nextbar{5}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1755  | 
\rail@term{\isa{\isakeyword{module{\isaliteral{5F}{\isacharunderscore}}name}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1756  | 
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1757  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1758  | 
\rail@cr{7}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1759  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1760  | 
\rail@nextbar{8}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1761  | 
\rail@term{\isa{\isakeyword{file}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1762  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1763  | 
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1764  | 
\rail@nextbar{9}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1765  | 
\rail@term{\isa{{\isaliteral{2D}{\isacharminus}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1766  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1767  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1768  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1769  | 
\rail@nextbar{8}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1770  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1771  | 
\rail@nont{\isa{args}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1772  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1773  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1774  | 
\rail@nextplus{10}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1775  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1776  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1777  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1778  | 
\rail@begin{1}{\isa{const}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1779  | 
\rail@nont{\hyperlink{syntax.term}{\mbox{\isa{term}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1780  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1781  | 
\rail@begin{3}{\isa{constexpr}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1782  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1783  | 
\rail@nont{\isa{const}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1784  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1785  | 
\rail@term{\isa{name{\isaliteral{2E}{\isachardot}}{\isaliteral{5F}{\isacharunderscore}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1786  | 
\rail@nextbar{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1787  | 
\rail@term{\isa{{\isaliteral{5F}{\isacharunderscore}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1788  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1789  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1790  | 
\rail@begin{1}{\isa{typeconstructor}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1791  | 
\rail@nont{\hyperlink{syntax.nameref}{\mbox{\isa{nameref}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1792  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1793  | 
\rail@begin{1}{\isa{class}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1794  | 
\rail@nont{\hyperlink{syntax.nameref}{\mbox{\isa{nameref}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1795  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1796  | 
\rail@begin{4}{\isa{target}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1797  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1798  | 
\rail@term{\isa{SML}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1799  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1800  | 
\rail@term{\isa{OCaml}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1801  | 
\rail@nextbar{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1802  | 
\rail@term{\isa{Haskell}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1803  | 
\rail@nextbar{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1804  | 
\rail@term{\isa{Scala}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1805  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1806  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1807  | 
\rail@begin{4}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1808  | 
\rail@term{\hyperlink{attribute.HOL.code}{\mbox{\isa{code}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1809  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1810  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1811  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1812  | 
\rail@term{\isa{del}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1813  | 
\rail@nextbar{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1814  | 
\rail@term{\isa{abstype}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1815  | 
\rail@nextbar{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1816  | 
\rail@term{\isa{abstract}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1817  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1818  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1819  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1820  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1821  | 
\rail@term{\hyperlink{command.HOL.code-abort}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}abort}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1822  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1823  | 
\rail@nont{\isa{const}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1824  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1825  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1826  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1827  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1828  | 
\rail@term{\hyperlink{command.HOL.code-datatype}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}datatype}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1829  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1830  | 
\rail@nont{\isa{const}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1831  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1832  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1833  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1834  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1835  | 
\rail@term{\hyperlink{attribute.HOL.code-inline}{\mbox{\isa{code{\isaliteral{5F}{\isacharunderscore}}inline}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1836  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1837  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1838  | 
\rail@term{\isa{del}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1839  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1840  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1841  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1842  | 
\rail@term{\hyperlink{attribute.HOL.code-post}{\mbox{\isa{code{\isaliteral{5F}{\isacharunderscore}}post}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1843  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1844  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1845  | 
\rail@term{\isa{del}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1846  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1847  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1848  | 
\rail@begin{3}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1849  | 
\rail@term{\hyperlink{command.HOL.code-thms}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}thms}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1850  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1851  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1852  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1853  | 
\rail@nont{\isa{constexpr}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1854  | 
\rail@nextplus{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1855  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1856  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1857  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1858  | 
\rail@begin{3}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1859  | 
\rail@term{\hyperlink{command.HOL.code-deps}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}deps}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1860  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1861  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1862  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1863  | 
\rail@nont{\isa{constexpr}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1864  | 
\rail@nextplus{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1865  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1866  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1867  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1868  | 
\rail@begin{7}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1869  | 
\rail@term{\hyperlink{command.HOL.code-const}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}const}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1870  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1871  | 
\rail@nont{\isa{const}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1872  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1873  | 
\rail@cterm{\isa{\isakeyword{and}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1874  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1875  | 
\rail@cr{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1876  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1877  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1878  | 
\rail@nont{\isa{target}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1879  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1880  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1881  | 
\rail@nextbar{4}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1882  | 
\rail@nont{\isa{syntax}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1883  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1884  | 
\rail@nextplus{5}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1885  | 
\rail@cterm{\isa{\isakeyword{and}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1886  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1887  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1888  | 
\rail@nextplus{6}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1889  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1890  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1891  | 
\rail@begin{7}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1892  | 
\rail@term{\hyperlink{command.HOL.code-type}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}type}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1893  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1894  | 
\rail@nont{\isa{typeconstructor}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1895  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1896  | 
\rail@cterm{\isa{\isakeyword{and}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1897  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1898  | 
\rail@cr{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1899  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1900  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1901  | 
\rail@nont{\isa{target}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1902  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1903  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1904  | 
\rail@nextbar{4}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1905  | 
\rail@nont{\isa{syntax}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1906  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1907  | 
\rail@nextplus{5}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1908  | 
\rail@cterm{\isa{\isakeyword{and}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1909  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1910  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1911  | 
\rail@nextplus{6}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1912  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1913  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1914  | 
\rail@begin{9}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1915  | 
\rail@term{\hyperlink{command.HOL.code-class}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}class}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1916  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1917  | 
\rail@nont{\isa{class}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1918  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1919  | 
\rail@cterm{\isa{\isakeyword{and}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1920  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1921  | 
\rail@cr{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1922  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1923  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1924  | 
\rail@nont{\isa{target}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1925  | 
\rail@cr{5}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1926  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1927  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1928  | 
\rail@nextbar{6}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1929  | 
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1930  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1931  | 
\rail@nextplus{7}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1932  | 
\rail@cterm{\isa{\isakeyword{and}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1933  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1934  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1935  | 
\rail@nextplus{8}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1936  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1937  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1938  | 
\rail@begin{7}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1939  | 
\rail@term{\hyperlink{command.HOL.code-instance}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}instance}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1940  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1941  | 
\rail@nont{\isa{typeconstructor}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1942  | 
\rail@term{\isa{{\isaliteral{3A}{\isacharcolon}}{\isaliteral{3A}{\isacharcolon}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1943  | 
\rail@nont{\isa{class}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1944  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1945  | 
\rail@cterm{\isa{\isakeyword{and}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1946  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1947  | 
\rail@cr{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1948  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1949  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1950  | 
\rail@nont{\isa{target}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1951  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1952  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1953  | 
\rail@nextbar{4}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1954  | 
\rail@term{\isa{{\isaliteral{2D}{\isacharminus}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1955  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1956  | 
\rail@nextplus{5}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1957  | 
\rail@cterm{\isa{\isakeyword{and}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1958  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1959  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1960  | 
\rail@nextplus{6}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1961  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1962  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1963  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1964  | 
\rail@term{\hyperlink{command.HOL.code-reserved}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}reserved}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1965  | 
\rail@nont{\isa{target}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1966  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1967  | 
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1968  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1969  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1970  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1971  | 
\rail@begin{1}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1972  | 
\rail@term{\hyperlink{command.HOL.code-monad}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}monad}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1973  | 
\rail@nont{\isa{const}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1974  | 
\rail@nont{\isa{const}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1975  | 
\rail@nont{\isa{target}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1976  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1977  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1978  | 
\rail@term{\hyperlink{command.HOL.code-include}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}include}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1979  | 
\rail@nont{\isa{target}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1980  | 
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1981  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1982  | 
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1983  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1984  | 
\rail@term{\isa{{\isaliteral{2D}{\isacharminus}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1985  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1986  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1987  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1988  | 
\rail@term{\hyperlink{command.HOL.code-modulename}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}modulename}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1989  | 
\rail@nont{\isa{target}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1990  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1991  | 
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1992  | 
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1993  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1994  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1995  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1996  | 
\rail@begin{11}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1997  | 
\rail@term{\hyperlink{command.HOL.code-reflect}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}reflect}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1998  | 
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
1999  | 
\rail@cr{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2000  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2001  | 
\rail@nextbar{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2002  | 
\rail@term{\isa{\isakeyword{datatypes}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2003  | 
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2004  | 
\rail@term{\isa{{\isaliteral{3D}{\isacharequal}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2005  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2006  | 
\rail@term{\isa{{\isaliteral{5F}{\isacharunderscore}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2007  | 
\rail@nextbar{4}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2008  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2009  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2010  | 
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2011  | 
\rail@nextplus{5}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2012  | 
\rail@cterm{\isa{{\isaliteral{7C}{\isacharbar}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2013  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2014  | 
\rail@nextplus{6}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2015  | 
\rail@cterm{\isa{\isakeyword{and}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2016  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2017  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2018  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2019  | 
\rail@cr{8}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2020  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2021  | 
\rail@nextbar{9}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2022  | 
\rail@term{\isa{\isakeyword{functions}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2023  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2024  | 
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2025  | 
\rail@nextplus{10}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2026  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2027  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2028  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2029  | 
\rail@nextbar{9}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2030  | 
\rail@term{\isa{\isakeyword{file}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2031  | 
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2032  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2033  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2034  | 
\rail@begin{4}{\isa{syntax}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2035  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2036  | 
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2037  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2038  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2039  | 
\rail@term{\isa{\isakeyword{infix}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2040  | 
\rail@nextbar{2}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2041  | 
\rail@term{\isa{\isakeyword{infixl}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2042  | 
\rail@nextbar{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2043  | 
\rail@term{\isa{\isakeyword{infixr}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2044  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2045  | 
\rail@nont{\hyperlink{syntax.nat}{\mbox{\isa{nat}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2046  | 
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2047  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2048  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2049  | 
\end{railoutput}
 | 
| 37422 | 2050  | 
|
2051  | 
||
2052  | 
  \begin{description}
 | 
|
2053  | 
||
| 40406 | 2054  | 
  \item \hyperlink{command.HOL.export-code}{\mbox{\isa{\isacommand{export{\isaliteral{5F}{\isacharunderscore}}code}}}} generates code for a given list
 | 
| 39608 | 2055  | 
of constants in the specified target language(s). If no  | 
2056  | 
serialization instruction is given, only abstract code is generated  | 
|
2057  | 
internally.  | 
|
| 37422 | 2058  | 
|
2059  | 
Constants may be specified by giving them literally, referring to  | 
|
| 40406 | 2060  | 
  all executable contants within a certain theory by giving \isa{{\isaliteral{22}{\isachardoublequote}}name{\isaliteral{2E}{\isachardot}}{\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}}, or referring to \emph{all} executable constants currently
 | 
2061  | 
  available by giving \isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{2A}{\isacharasterisk}}{\isaliteral{22}{\isachardoublequote}}}.
 | 
|
| 37422 | 2062  | 
|
2063  | 
By default, for each involved theory one corresponding name space  | 
|
2064  | 
module is generated. Alternativly, a module name may be specified  | 
|
| 40406 | 2065  | 
  after the \hyperlink{keyword.module-name}{\mbox{\isa{\isakeyword{module{\isaliteral{5F}{\isacharunderscore}}name}}}} keyword; then \emph{all} code is
 | 
| 37422 | 2066  | 
placed in this module.  | 
2067  | 
||
| 39608 | 2068  | 
  For \emph{SML}, \emph{OCaml} and \emph{Scala} the file specification
 | 
2069  | 
  refers to a single file; for \emph{Haskell}, it refers to a whole
 | 
|
2070  | 
directory, where code is generated in multiple files reflecting the  | 
|
2071  | 
module hierarchy. Omitting the file specification denotes standard  | 
|
| 37749 | 2072  | 
output.  | 
| 37422 | 2073  | 
|
2074  | 
Serializers take an optional list of arguments in parentheses. For  | 
|
| 40406 | 2075  | 
  \emph{SML} and \emph{OCaml}, ``\isa{no{\isaliteral{5F}{\isacharunderscore}}signatures}`` omits
 | 
| 37422 | 2076  | 
explicit module signatures.  | 
| 42123 | 2077  | 
|
| 39608 | 2078  | 
  For \emph{Haskell} a module name prefix may be given using the
 | 
| 40406 | 2079  | 
  ``\isa{{\isaliteral{22}{\isachardoublequote}}root{\isaliteral{3A}{\isacharcolon}}{\isaliteral{22}{\isachardoublequote}}}'' argument; ``\isa{string{\isaliteral{5F}{\isacharunderscore}}classes}'' adds a
 | 
| 39608 | 2080  | 
``\verb|deriving (Read, Show)|'' clause to each appropriate  | 
2081  | 
datatype declaration.  | 
|
| 37422 | 2082  | 
|
2083  | 
  \item \hyperlink{attribute.HOL.code}{\mbox{\isa{code}}} explicitly selects (or with option
 | 
|
| 40406 | 2084  | 
  ``\isa{{\isaliteral{22}{\isachardoublequote}}del{\isaliteral{22}{\isachardoublequote}}}'' deselects) a code equation for code generation.
 | 
| 
38462
 
34d3de1254cd
formally document `code abstype` and `code abstract` attributes
 
haftmann 
parents: 
37820 
diff
changeset
 | 
2085  | 
Usually packages introducing code equations provide a reasonable  | 
| 40406 | 2086  | 
  default setup for selection.  Variants \isa{{\isaliteral{22}{\isachardoublequote}}code\ abstype{\isaliteral{22}{\isachardoublequote}}} and
 | 
2087  | 
  \isa{{\isaliteral{22}{\isachardoublequote}}code\ abstract{\isaliteral{22}{\isachardoublequote}}} declare abstract datatype certificates or
 | 
|
| 
38462
 
34d3de1254cd
formally document `code abstype` and `code abstract` attributes
 
haftmann 
parents: 
37820 
diff
changeset
 | 
2088  | 
code equations on abstract datatype representations respectively.  | 
| 37422 | 2089  | 
|
| 40406 | 2090  | 
  \item \hyperlink{command.HOL.code-abort}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}abort}}}} declares constants which are not
 | 
| 39608 | 2091  | 
required to have a definition by means of code equations; if needed  | 
2092  | 
these are implemented by program abort instead.  | 
|
| 37422 | 2093  | 
|
| 40406 | 2094  | 
  \item \hyperlink{command.HOL.code-datatype}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}datatype}}}} specifies a constructor set
 | 
| 37422 | 2095  | 
for a logical type.  | 
2096  | 
||
| 40406 | 2097  | 
  \item \hyperlink{command.HOL.print-codesetup}{\mbox{\isa{\isacommand{print{\isaliteral{5F}{\isacharunderscore}}codesetup}}}} gives an overview on
 | 
| 37422 | 2098  | 
selected code equations and code generator datatypes.  | 
2099  | 
||
| 40406 | 2100  | 
  \item \hyperlink{attribute.HOL.code-inline}{\mbox{\isa{code{\isaliteral{5F}{\isacharunderscore}}inline}}} declares (or with option
 | 
2101  | 
  ``\isa{{\isaliteral{22}{\isachardoublequote}}del{\isaliteral{22}{\isachardoublequote}}}'' removes) inlining theorems which are applied as
 | 
|
| 39608 | 2102  | 
rewrite rules to any code equation during preprocessing.  | 
| 37422 | 2103  | 
|
| 40406 | 2104  | 
  \item \hyperlink{attribute.HOL.code-post}{\mbox{\isa{code{\isaliteral{5F}{\isacharunderscore}}post}}} declares (or with option ``\isa{{\isaliteral{22}{\isachardoublequote}}del{\isaliteral{22}{\isachardoublequote}}}'' removes) theorems which are applied as rewrite rules to any
 | 
| 39608 | 2105  | 
result of an evaluation.  | 
| 37422 | 2106  | 
|
| 40406 | 2107  | 
  \item \hyperlink{command.HOL.print-codeproc}{\mbox{\isa{\isacommand{print{\isaliteral{5F}{\isacharunderscore}}codeproc}}}} prints the setup of the code
 | 
| 39608 | 2108  | 
generator preprocessor.  | 
| 37422 | 2109  | 
|
| 40406 | 2110  | 
  \item \hyperlink{command.HOL.code-thms}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}thms}}}} prints a list of theorems
 | 
| 37422 | 2111  | 
representing the corresponding program containing all given  | 
2112  | 
constants after preprocessing.  | 
|
2113  | 
||
| 40406 | 2114  | 
  \item \hyperlink{command.HOL.code-deps}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}deps}}}} visualizes dependencies of
 | 
| 37422 | 2115  | 
theorems representing the corresponding program containing all given  | 
2116  | 
constants after preprocessing.  | 
|
2117  | 
||
| 40406 | 2118  | 
  \item \hyperlink{command.HOL.code-const}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}const}}}} associates a list of constants
 | 
| 37422 | 2119  | 
with target-specific serializations; omitting a serialization  | 
2120  | 
deletes an existing serialization.  | 
|
2121  | 
||
| 40406 | 2122  | 
  \item \hyperlink{command.HOL.code-type}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}type}}}} associates a list of type
 | 
| 37422 | 2123  | 
constructors with target-specific serializations; omitting a  | 
2124  | 
serialization deletes an existing serialization.  | 
|
2125  | 
||
| 40406 | 2126  | 
  \item \hyperlink{command.HOL.code-class}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}class}}}} associates a list of classes
 | 
| 37422 | 2127  | 
with target-specific class names; omitting a serialization deletes  | 
2128  | 
  an existing serialization.  This applies only to \emph{Haskell}.
 | 
|
2129  | 
||
| 40406 | 2130  | 
  \item \hyperlink{command.HOL.code-instance}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}instance}}}} declares a list of type
 | 
| 37422 | 2131  | 
constructor / class instance relations as ``already present'' for a  | 
| 40406 | 2132  | 
  given target.  Omitting a ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{2D}{\isacharminus}}{\isaliteral{22}{\isachardoublequote}}}'' deletes an existing
 | 
| 37422 | 2133  | 
``already present'' declaration. This applies only to  | 
2134  | 
  \emph{Haskell}.
 | 
|
2135  | 
||
| 40406 | 2136  | 
  \item \hyperlink{command.HOL.code-reserved}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}reserved}}}} declares a list of names as
 | 
| 37422 | 2137  | 
reserved for a given target, preventing it to be shadowed by any  | 
2138  | 
generated code.  | 
|
2139  | 
||
| 40406 | 2140  | 
  \item \hyperlink{command.HOL.code-monad}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}monad}}}} provides an auxiliary mechanism
 | 
| 37422 | 2141  | 
to generate monadic code for Haskell.  | 
2142  | 
||
| 40406 | 2143  | 
  \item \hyperlink{command.HOL.code-include}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}include}}}} adds arbitrary named content
 | 
2144  | 
  (``include'') to generated code.  A ``\isa{{\isaliteral{22}{\isachardoublequote}}{\isaliteral{2D}{\isacharminus}}{\isaliteral{22}{\isachardoublequote}}}'' as last argument
 | 
|
| 37422 | 2145  | 
will remove an already added ``include''.  | 
2146  | 
||
| 40406 | 2147  | 
  \item \hyperlink{command.HOL.code-modulename}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}modulename}}}} declares aliasings from one
 | 
| 37422 | 2148  | 
module name onto another.  | 
2149  | 
||
| 40406 | 2150  | 
  \item \hyperlink{command.HOL.code-reflect}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}reflect}}}} without a ``\isa{{\isaliteral{22}{\isachardoublequote}}file{\isaliteral{22}{\isachardoublequote}}}''
 | 
| 39608 | 2151  | 
argument compiles code into the system runtime environment and  | 
2152  | 
modifies the code generator setup that future invocations of system  | 
|
| 40406 | 2153  | 
  runtime code generation referring to one of the ``\isa{{\isaliteral{22}{\isachardoublequote}}datatypes{\isaliteral{22}{\isachardoublequote}}}'' or ``\isa{{\isaliteral{22}{\isachardoublequote}}functions{\isaliteral{22}{\isachardoublequote}}}'' entities use these precompiled
 | 
2154  | 
  entities.  With a ``\isa{{\isaliteral{22}{\isachardoublequote}}file{\isaliteral{22}{\isachardoublequote}}}'' argument, the corresponding code
 | 
|
| 39608 | 2155  | 
is generated into that specified file without modifying the code  | 
2156  | 
generator setup.  | 
|
2157  | 
||
| 37422 | 2158  | 
  \end{description}
 | 
2159  | 
||
| 39608 | 2160  | 
The other framework generates code from both functional and  | 
2161  | 
  relational programs to SML.  See \cite{isabelle-HOL} for further
 | 
|
2162  | 
information (this actually covers the new-style theory format as  | 
|
2163  | 
well).  | 
|
| 26849 | 2164  | 
|
2165  | 
  \begin{matharray}{rcl}
 | 
|
| 40406 | 2166  | 
    \indexdef{HOL}{command}{code\_module}\hypertarget{command.HOL.code-module}{\hyperlink{command.HOL.code-module}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}module}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
2167  | 
    \indexdef{HOL}{command}{code\_library}\hypertarget{command.HOL.code-library}{\hyperlink{command.HOL.code-library}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}library}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
2168  | 
    \indexdef{HOL}{command}{consts\_code}\hypertarget{command.HOL.consts-code}{\hyperlink{command.HOL.consts-code}{\mbox{\isa{\isacommand{consts{\isaliteral{5F}{\isacharunderscore}}code}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
| 42123 | 2169  | 
    \indexdef{HOL}{command}{types\_code}\hypertarget{command.HOL.types-code}{\hyperlink{command.HOL.types-code}{\mbox{\isa{\isacommand{types{\isaliteral{5F}{\isacharunderscore}}code}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ theory{\isaliteral{22}{\isachardoublequote}}} \\
 | 
| 28788 | 2170  | 
    \indexdef{HOL}{attribute}{code}\hypertarget{attribute.HOL.code}{\hyperlink{attribute.HOL.code}{\mbox{\isa{code}}}} & : & \isa{attribute} \\
 | 
| 26849 | 2171  | 
  \end{matharray}
 | 
2172  | 
||
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2173  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2174  | 
\rail@begin{11}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2175  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2176  | 
\rail@term{\hyperlink{command.HOL.code-module}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}module}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2177  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2178  | 
\rail@term{\hyperlink{command.HOL.code-library}{\mbox{\isa{\isacommand{code{\isaliteral{5F}{\isacharunderscore}}library}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2179  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2180  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2181  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2182  | 
\rail@nont{\isa{modespec}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2183  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2184  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2185  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2186  | 
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2187  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2188  | 
\rail@cr{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2189  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2190  | 
\rail@nextbar{4}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2191  | 
\rail@term{\isa{\isakeyword{file}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2192  | 
\rail@nont{\isa{name}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2193  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2194  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2195  | 
\rail@nextbar{4}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2196  | 
\rail@term{\isa{\isakeyword{imports}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2197  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2198  | 
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2199  | 
\rail@nextplus{5}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2200  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2201  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2202  | 
\rail@cr{7}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2203  | 
\rail@term{\isa{\isakeyword{contains}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2204  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2205  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2206  | 
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2207  | 
\rail@term{\isa{{\isaliteral{3D}{\isacharequal}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2208  | 
\rail@nont{\hyperlink{syntax.term}{\mbox{\isa{term}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2209  | 
\rail@nextplus{8}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2210  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2211  | 
\rail@nextbar{9}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2212  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2213  | 
\rail@nont{\hyperlink{syntax.term}{\mbox{\isa{term}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2214  | 
\rail@nextplus{10}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2215  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2216  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2217  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2218  | 
\rail@begin{2}{\isa{modespec}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2219  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2220  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2221  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2222  | 
\rail@cnont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2223  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2224  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2225  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2226  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2227  | 
\rail@term{\hyperlink{command.HOL.consts-code}{\mbox{\isa{\isacommand{consts{\isaliteral{5F}{\isacharunderscore}}code}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2228  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2229  | 
\rail@nont{\isa{codespec}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2230  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2231  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2232  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2233  | 
\rail@begin{2}{\isa{codespec}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2234  | 
\rail@nont{\isa{const}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2235  | 
\rail@nont{\isa{template}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2236  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2237  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2238  | 
\rail@nont{\isa{attachment}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2239  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2240  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2241  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2242  | 
\rail@term{\hyperlink{command.HOL.types-code}{\mbox{\isa{\isacommand{types{\isaliteral{5F}{\isacharunderscore}}code}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2243  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2244  | 
\rail@nont{\isa{tycodespec}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2245  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2246  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2247  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2248  | 
\rail@begin{2}{\isa{tycodespec}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2249  | 
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2250  | 
\rail@nont{\isa{template}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2251  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2252  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2253  | 
\rail@nont{\isa{attachment}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2254  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2255  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2256  | 
\rail@begin{1}{\isa{const}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2257  | 
\rail@nont{\hyperlink{syntax.term}{\mbox{\isa{term}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2258  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2259  | 
\rail@begin{1}{\isa{template}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2260  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2261  | 
\rail@nont{\hyperlink{syntax.string}{\mbox{\isa{string}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2262  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2263  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2264  | 
\rail@begin{2}{\isa{attachment}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2265  | 
\rail@term{\isa{attach}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2266  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2267  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2268  | 
\rail@nont{\isa{modespec}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2269  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2270  | 
\rail@term{\isa{{\isaliteral{7B}{\isacharbraceleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2271  | 
\rail@nont{\hyperlink{syntax.text}{\mbox{\isa{text}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2272  | 
\rail@term{\isa{{\isaliteral{7D}{\isacharbraceright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2273  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2274  | 
\rail@begin{2}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2275  | 
\rail@term{\hyperlink{attribute.HOL.code}{\mbox{\isa{code}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2276  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2277  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2278  | 
\rail@nont{\isa{name}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2279  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2280  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2281  | 
\end{railoutput}%
 | 
| 26849 | 2282  | 
\end{isamarkuptext}%
 | 
2283  | 
\isamarkuptrue%  | 
|
2284  | 
%  | 
|
| 27047 | 2285  | 
\isamarkupsection{Definition by specification \label{sec:hol-specification}%
 | 
2286  | 
}  | 
|
2287  | 
\isamarkuptrue%  | 
|
2288  | 
%  | 
|
2289  | 
\begin{isamarkuptext}%
 | 
|
2290  | 
\begin{matharray}{rcl}
 | 
|
| 40406 | 2291  | 
    \indexdef{HOL}{command}{specification}\hypertarget{command.HOL.specification}{\hyperlink{command.HOL.specification}{\mbox{\isa{\isacommand{specification}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ proof{\isaliteral{28}{\isacharparenleft}}prove{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
2292  | 
    \indexdef{HOL}{command}{ax\_specification}\hypertarget{command.HOL.ax-specification}{\hyperlink{command.HOL.ax-specification}{\mbox{\isa{\isacommand{ax{\isaliteral{5F}{\isacharunderscore}}specification}}}}} & : & \isa{{\isaliteral{22}{\isachardoublequote}}theory\ {\isaliteral{5C3C72696768746172726F773E}{\isasymrightarrow}}\ proof{\isaliteral{28}{\isacharparenleft}}prove{\isaliteral{29}{\isacharparenright}}{\isaliteral{22}{\isachardoublequote}}} \\
 | 
|
| 27047 | 2293  | 
  \end{matharray}
 | 
2294  | 
||
| 
42596
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2295  | 
  \begin{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2296  | 
\rail@begin{6}{\isa{}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2297  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2298  | 
\rail@term{\hyperlink{command.HOL.specification}{\mbox{\isa{\isacommand{specification}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2299  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2300  | 
\rail@term{\hyperlink{command.HOL.ax-specification}{\mbox{\isa{\isacommand{ax{\isaliteral{5F}{\isacharunderscore}}specification}}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2301  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2302  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2303  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2304  | 
\rail@nont{\isa{decl}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2305  | 
\rail@nextplus{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2306  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2307  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2308  | 
\rail@cr{3}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2309  | 
\rail@plus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2310  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2311  | 
\rail@nextbar{4}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2312  | 
\rail@nont{\hyperlink{syntax.thmdecl}{\mbox{\isa{thmdecl}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2313  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2314  | 
\rail@nont{\hyperlink{syntax.prop}{\mbox{\isa{prop}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2315  | 
\rail@nextplus{5}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2316  | 
\rail@endplus  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2317  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2318  | 
\rail@begin{2}{\isa{decl}}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2319  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2320  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2321  | 
\rail@nont{\hyperlink{syntax.name}{\mbox{\isa{name}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2322  | 
\rail@term{\isa{{\isaliteral{3A}{\isacharcolon}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2323  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2324  | 
\rail@nont{\hyperlink{syntax.term}{\mbox{\isa{term}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2325  | 
\rail@term{\isa{{\isaliteral{28}{\isacharparenleft}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2326  | 
\rail@term{\isa{\isakeyword{overloaded}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2327  | 
\rail@bar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2328  | 
\rail@nextbar{1}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2329  | 
\rail@term{\isa{{\isaliteral{29}{\isacharparenright}}}}[]
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2330  | 
\rail@endbar  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2331  | 
\rail@end  | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2332  | 
\end{railoutput}
 | 
| 
 
6c621a9d612a
modernized rail diagrams using @{rail} antiquotation;
 
wenzelm 
parents: 
42215 
diff
changeset
 | 
2333  | 
|
| 27047 | 2334  | 
|
| 28788 | 2335  | 
  \begin{description}
 | 
| 27047 | 2336  | 
|
| 40406 | 2337  | 
  \item \hyperlink{command.HOL.specification}{\mbox{\isa{\isacommand{specification}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}decls\ {\isaliteral{5C3C7068693E}{\isasymphi}}{\isaliteral{22}{\isachardoublequote}}} sets up a
 | 
| 27047 | 2338  | 
goal stating the existence of terms with the properties specified to  | 
2339  | 
  hold for the constants given in \isa{decls}.  After finishing the
 | 
|
2340  | 
proof, the theory will be augmented with definitions for the given  | 
|
2341  | 
constants, as well as with theorems stating the properties for these  | 
|
2342  | 
constants.  | 
|
2343  | 
||
| 40406 | 2344  | 
  \item \hyperlink{command.HOL.ax-specification}{\mbox{\isa{\isacommand{ax{\isaliteral{5F}{\isacharunderscore}}specification}}}}~\isa{{\isaliteral{22}{\isachardoublequote}}decls\ {\isaliteral{5C3C7068693E}{\isasymphi}}{\isaliteral{22}{\isachardoublequote}}} sets up
 | 
| 28788 | 2345  | 
a goal stating the existence of terms with the properties specified  | 
2346  | 
  to hold for the constants given in \isa{decls}.  After finishing
 | 
|
2347  | 
the proof, the theory will be augmented with axioms expressing the  | 
|
2348  | 
properties given in the first place.  | 
|
| 27047 | 2349  | 
|
| 28788 | 2350  | 
  \item \isa{decl} declares a constant to be defined by the
 | 
| 27047 | 2351  | 
  specification given.  The definition for the constant \isa{c} is
 | 
| 40406 | 2352  | 
  bound to the name \isa{c{\isaliteral{5F}{\isacharunderscore}}def} unless a theorem name is given in
 | 
| 27047 | 2353  | 
the declaration. Overloaded constants should be declared as such.  | 
2354  | 
||
| 28788 | 2355  | 
  \end{description}
 | 
| 27047 | 2356  | 
|
| 40406 | 2357  | 
  Whether to use \hyperlink{command.HOL.specification}{\mbox{\isa{\isacommand{specification}}}} or \hyperlink{command.HOL.ax-specification}{\mbox{\isa{\isacommand{ax{\isaliteral{5F}{\isacharunderscore}}specification}}}} is to some extent a matter of style.  \hyperlink{command.HOL.specification}{\mbox{\isa{\isacommand{specification}}}} introduces no new axioms, and so by
 | 
2358  | 
  construction cannot introduce inconsistencies, whereas \hyperlink{command.HOL.ax-specification}{\mbox{\isa{\isacommand{ax{\isaliteral{5F}{\isacharunderscore}}specification}}}} does introduce axioms, but only after the
 | 
|
| 27047 | 2359  | 
user has explicitly proven it to be safe. A practical issue must be  | 
2360  | 
considered, though: After introducing two constants with the same  | 
|
2361  | 
  properties using \hyperlink{command.HOL.specification}{\mbox{\isa{\isacommand{specification}}}}, one can prove
 | 
|
2362  | 
that the two constants are, in fact, equal. If this might be a  | 
|
| 40406 | 2363  | 
  problem, one should use \hyperlink{command.HOL.ax-specification}{\mbox{\isa{\isacommand{ax{\isaliteral{5F}{\isacharunderscore}}specification}}}}.%
 | 
| 27047 | 2364  | 
\end{isamarkuptext}%
 | 
2365  | 
\isamarkuptrue%  | 
|
2366  | 
%  | 
|
| 26849 | 2367  | 
\isadelimtheory  | 
2368  | 
%  | 
|
2369  | 
\endisadelimtheory  | 
|
2370  | 
%  | 
|
2371  | 
\isatagtheory  | 
|
| 26840 | 2372  | 
\isacommand{end}\isamarkupfalse%
 | 
2373  | 
%  | 
|
2374  | 
\endisatagtheory  | 
|
2375  | 
{\isafoldtheory}%
 | 
|
2376  | 
%  | 
|
2377  | 
\isadelimtheory  | 
|
2378  | 
%  | 
|
2379  | 
\endisadelimtheory  | 
|
| 26849 | 2380  | 
\isanewline  | 
| 26840 | 2381  | 
\end{isabellebody}%
 | 
2382  | 
%%% Local Variables:  | 
|
2383  | 
%%% mode: latex  | 
|
2384  | 
%%% TeX-master: "root"  | 
|
2385  | 
%%% End:  |