author | blanchet |
Fri, 11 Jun 2010 17:07:27 +0200 | |
changeset 37398 | e194213451c9 |
parent 30172 | afdf7808cfd0 |
child 40406 | 313a24b66a8d |
permissions | -rw-r--r-- |
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
1 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
2 |
\begin{isabellebody}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
3 |
\def\isabellecontext{ML{\isacharunderscore}Tactic}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
4 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
5 |
\isadelimtheory |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
6 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
7 |
\endisadelimtheory |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
8 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
9 |
\isatagtheory |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
10 |
\isacommand{theory}\isamarkupfalse% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
11 |
\ ML{\isacharunderscore}Tactic\isanewline |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
12 |
\isakeyword{imports}\ Main\isanewline |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
13 |
\isakeyword{begin}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
14 |
\endisatagtheory |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
15 |
{\isafoldtheory}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
16 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
17 |
\isadelimtheory |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
18 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
19 |
\endisadelimtheory |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
20 |
% |
26852 | 21 |
\isamarkupchapter{ML tactic expressions% |
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
22 |
} |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
23 |
\isamarkuptrue% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
24 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
25 |
\begin{isamarkuptext}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
26 |
Isar Proof methods closely resemble traditional tactics, when used |
26902 | 27 |
in unstructured sequences of \hyperlink{command.apply}{\mbox{\isa{\isacommand{apply}}}} commands. |
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
28 |
Isabelle/Isar provides emulations for all major ML tactics of |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
29 |
classic Isabelle --- mostly for the sake of easy porting of existing |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
30 |
developments, as actual Isar proof texts would demand much less |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
31 |
diversity of proof methods. |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
32 |
|
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
33 |
Unlike tactic expressions in ML, Isar proof methods provide proper |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
34 |
concrete syntax for additional arguments, options, modifiers etc. |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
35 |
Thus a typical method text is usually more concise than the |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
36 |
corresponding ML tactic. Furthermore, the Isar versions of classic |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
37 |
Isabelle tactics often cover several variant forms by a single |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
38 |
method with separate options to tune the behavior. For example, |
26902 | 39 |
method \hyperlink{method.simp}{\mbox{\isa{simp}}} replaces all of \verb|simp_tac|~/ \verb|asm_simp_tac|~/ \verb|full_simp_tac|~/ \verb|asm_full_simp_tac|, there |
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
40 |
is also concrete syntax for augmenting the Simplifier context (the |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
41 |
current ``simpset'') in a convenient way.% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
42 |
\end{isamarkuptext}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
43 |
\isamarkuptrue% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
44 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
45 |
\isamarkupsection{Resolution tactics% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
46 |
} |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
47 |
\isamarkuptrue% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
48 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
49 |
\begin{isamarkuptext}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
50 |
Classic Isabelle provides several variant forms of tactics for |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
51 |
single-step rule applications (based on higher-order resolution). |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
52 |
The space of resolution tactics has the following main dimensions. |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
53 |
|
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
54 |
\begin{enumerate} |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
55 |
|
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
56 |
\item The ``mode'' of resolution: intro, elim, destruct, or forward |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
57 |
(e.g.\ \verb|resolve_tac|, \verb|eresolve_tac|, \verb|dresolve_tac|, |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
58 |
\verb|forward_tac|). |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
59 |
|
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
60 |
\item Optional explicit instantiation (e.g.\ \verb|resolve_tac| vs.\ |
27249 | 61 |
\verb|res_inst_tac|). |
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
62 |
|
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
63 |
\item Abbreviations for singleton arguments (e.g.\ \verb|resolve_tac| |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
64 |
vs.\ \verb|rtac|). |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
65 |
|
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
66 |
\end{enumerate} |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
67 |
|
26907 | 68 |
Basically, the set of Isar tactic emulations \hyperlink{method.rule-tac}{\mbox{\isa{rule{\isacharunderscore}tac}}}, |
69 |
\hyperlink{method.erule-tac}{\mbox{\isa{erule{\isacharunderscore}tac}}}, \hyperlink{method.drule-tac}{\mbox{\isa{drule{\isacharunderscore}tac}}}, \hyperlink{method.frule-tac}{\mbox{\isa{frule{\isacharunderscore}tac}}} (see |
|
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
70 |
\secref{sec:tactics}) would be sufficient to cover the four modes, |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
71 |
either with or without instantiation, and either with single or |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
72 |
multiple arguments. Although it is more convenient in most cases to |
26902 | 73 |
use the plain \hyperlink{method.rule}{\mbox{\isa{rule}}} method (see |
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
74 |
\secref{sec:pure-meth-att}), or any of its ``improper'' variants |
26902 | 75 |
\hyperlink{method.erule}{\mbox{\isa{erule}}}, \hyperlink{method.drule}{\mbox{\isa{drule}}}, \hyperlink{method.frule}{\mbox{\isa{frule}}} (see |
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
76 |
\secref{sec:misc-meth-att}). Note that explicit goal addressing is |
26907 | 77 |
only supported by the actual \hyperlink{method.rule-tac}{\mbox{\isa{rule{\isacharunderscore}tac}}} version. |
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
78 |
|
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
79 |
With this in mind, plain resolution tactics correspond to Isar |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
80 |
methods as follows. |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
81 |
|
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
82 |
\medskip |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
83 |
\begin{tabular}{lll} |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
84 |
\verb|rtac|~\isa{{\isachardoublequote}a\ {\isadigit{1}}{\isachardoublequote}} & & \isa{{\isachardoublequote}rule\ a{\isachardoublequote}} \\ |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
85 |
\verb|resolve_tac|~\isa{{\isachardoublequote}{\isacharbrackleft}a\isactrlsub {\isadigit{1}}{\isacharcomma}\ {\isasymdots}{\isacharbrackright}\ {\isadigit{1}}{\isachardoublequote}} & & \isa{{\isachardoublequote}rule\ a\isactrlsub {\isadigit{1}}\ {\isasymdots}{\isachardoublequote}} \\ |
27249 | 86 |
\verb|res_inst_tac|~\isa{{\isachardoublequote}ctxt\ {\isacharbrackleft}{\isacharparenleft}x\isactrlsub {\isadigit{1}}{\isacharcomma}\ t\isactrlsub {\isadigit{1}}{\isacharparenright}{\isacharcomma}\ {\isasymdots}{\isacharbrackright}\ a\ {\isadigit{1}}{\isachardoublequote}} & & |
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
87 |
\isa{{\isachardoublequote}rule{\isacharunderscore}tac\ x\isactrlsub {\isadigit{1}}\ {\isacharequal}\ t\isactrlsub {\isadigit{1}}\ {\isasymAND}\ {\isasymdots}\ {\isasymIN}\ a{\isachardoublequote}} \\[0.5ex] |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
88 |
\verb|rtac|~\isa{{\isachardoublequote}a\ i{\isachardoublequote}} & & \isa{{\isachardoublequote}rule{\isacharunderscore}tac\ {\isacharbrackleft}i{\isacharbrackright}\ a{\isachardoublequote}} \\ |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
89 |
\verb|resolve_tac|~\isa{{\isachardoublequote}{\isacharbrackleft}a\isactrlsub {\isadigit{1}}{\isacharcomma}\ {\isasymdots}{\isacharbrackright}\ i{\isachardoublequote}} & & \isa{{\isachardoublequote}rule{\isacharunderscore}tac\ {\isacharbrackleft}i{\isacharbrackright}\ a\isactrlsub {\isadigit{1}}\ {\isasymdots}{\isachardoublequote}} \\ |
27249 | 90 |
\verb|res_inst_tac|~\isa{{\isachardoublequote}ctxt\ {\isacharbrackleft}{\isacharparenleft}x\isactrlsub {\isadigit{1}}{\isacharcomma}\ t\isactrlsub {\isadigit{1}}{\isacharparenright}{\isacharcomma}\ {\isasymdots}{\isacharbrackright}\ a\ i{\isachardoublequote}} & & |
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
91 |
\isa{{\isachardoublequote}rule{\isacharunderscore}tac\ {\isacharbrackleft}i{\isacharbrackright}\ x\isactrlsub {\isadigit{1}}\ {\isacharequal}\ t\isactrlsub {\isadigit{1}}\ {\isasymAND}\ {\isasymdots}\ {\isasymIN}\ a{\isachardoublequote}} \\ |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
92 |
\end{tabular} |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
93 |
\medskip |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
94 |
|
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
95 |
Note that explicit goal addressing may be usually avoided by |
26902 | 96 |
changing the order of subgoals with \hyperlink{command.defer}{\mbox{\isa{\isacommand{defer}}}} or \hyperlink{command.prefer}{\mbox{\isa{\isacommand{prefer}}}} (see \secref{sec:tactic-commands}).% |
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
97 |
\end{isamarkuptext}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
98 |
\isamarkuptrue% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
99 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
100 |
\isamarkupsection{Simplifier tactics% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
101 |
} |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
102 |
\isamarkuptrue% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
103 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
104 |
\begin{isamarkuptext}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
105 |
The main Simplifier tactics \verb|simp_tac| and variants (cf.\ |
26902 | 106 |
\cite{isabelle-ref}) are all covered by the \hyperlink{method.simp}{\mbox{\isa{simp}}} and |
26907 | 107 |
\hyperlink{method.simp-all}{\mbox{\isa{simp{\isacharunderscore}all}}} methods (see \secref{sec:simplifier}). Note that |
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
108 |
there is no individual goal addressing available, simplification |
26902 | 109 |
acts either on the first goal (\hyperlink{method.simp}{\mbox{\isa{simp}}}) or all goals |
26907 | 110 |
(\hyperlink{method.simp-all}{\mbox{\isa{simp{\isacharunderscore}all}}}). |
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
111 |
|
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
112 |
\medskip |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
113 |
\begin{tabular}{lll} |
26902 | 114 |
\verb|asm_full_simp_tac|~\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}simpset{\isacharbraceright}\ {\isadigit{1}}{\isachardoublequote}} & & \hyperlink{method.simp}{\mbox{\isa{simp}}} \\ |
26907 | 115 |
\verb|ALLGOALS|~(\verb|asm_full_simp_tac|~\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}simpset{\isacharbraceright}{\isachardoublequote}}) & & \hyperlink{method.simp-all}{\mbox{\isa{simp{\isacharunderscore}all}}} \\[0.5ex] |
26902 | 116 |
\verb|simp_tac|~\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}simpset{\isacharbraceright}\ {\isadigit{1}}{\isachardoublequote}} & & \hyperlink{method.simp}{\mbox{\isa{simp}}}~\isa{{\isachardoublequote}{\isacharparenleft}no{\isacharunderscore}asm{\isacharparenright}{\isachardoublequote}} \\ |
117 |
\verb|asm_simp_tac|~\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}simpset{\isacharbraceright}\ {\isadigit{1}}{\isachardoublequote}} & & \hyperlink{method.simp}{\mbox{\isa{simp}}}~\isa{{\isachardoublequote}{\isacharparenleft}no{\isacharunderscore}asm{\isacharunderscore}simp{\isacharparenright}{\isachardoublequote}} \\ |
|
118 |
\verb|full_simp_tac|~\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}simpset{\isacharbraceright}\ {\isadigit{1}}{\isachardoublequote}} & & \hyperlink{method.simp}{\mbox{\isa{simp}}}~\isa{{\isachardoublequote}{\isacharparenleft}no{\isacharunderscore}asm{\isacharunderscore}use{\isacharparenright}{\isachardoublequote}} \\ |
|
119 |
\verb|asm_lr_simp_tac|~\isa{{\isachardoublequote}{\isacharat}{\isacharbraceleft}simpset{\isacharbraceright}\ {\isadigit{1}}{\isachardoublequote}} & & \hyperlink{method.simp}{\mbox{\isa{simp}}}~\isa{{\isachardoublequote}{\isacharparenleft}asm{\isacharunderscore}lr{\isacharparenright}{\isachardoublequote}} \\ |
|
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
120 |
\end{tabular} |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
121 |
\medskip% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
122 |
\end{isamarkuptext}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
123 |
\isamarkuptrue% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
124 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
125 |
\isamarkupsection{Classical Reasoner tactics% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
126 |
} |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
127 |
\isamarkuptrue% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
128 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
129 |
\begin{isamarkuptext}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
130 |
The Classical Reasoner provides a rather large number of variations |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
131 |
of automated tactics, such as \verb|blast_tac|, \verb|fast_tac|, \verb|clarify_tac| etc.\ (see \cite{isabelle-ref}). The corresponding |
26902 | 132 |
Isar methods usually share the same base name, such as \hyperlink{method.blast}{\mbox{\isa{blast}}}, \hyperlink{method.fast}{\mbox{\isa{fast}}}, \hyperlink{method.clarify}{\mbox{\isa{clarify}}} etc.\ (see |
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
133 |
\secref{sec:classical}).% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
134 |
\end{isamarkuptext}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
135 |
\isamarkuptrue% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
136 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
137 |
\isamarkupsection{Miscellaneous tactics% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
138 |
} |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
139 |
\isamarkuptrue% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
140 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
141 |
\begin{isamarkuptext}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
142 |
There are a few additional tactics defined in various theories of |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
143 |
Isabelle/HOL, some of these also in Isabelle/FOL or Isabelle/ZF. |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
144 |
The most common ones of these may be ported to Isar as follows. |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
145 |
|
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
146 |
\medskip |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
147 |
\begin{tabular}{lll} |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
148 |
\verb|stac|~\isa{{\isachardoublequote}a\ {\isadigit{1}}{\isachardoublequote}} & & \isa{{\isachardoublequote}subst\ a{\isachardoublequote}} \\ |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
149 |
\verb|hyp_subst_tac|~\isa{{\isadigit{1}}} & & \isa{hypsubst} \\ |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
150 |
\verb|strip_tac|~\isa{{\isadigit{1}}} & \isa{{\isachardoublequote}{\isasymapprox}{\isachardoublequote}} & \isa{{\isachardoublequote}intro\ strip{\isachardoublequote}} \\ |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
151 |
\verb|split_all_tac|~\isa{{\isadigit{1}}} & & \isa{{\isachardoublequote}simp\ {\isacharparenleft}no{\isacharunderscore}asm{\isacharunderscore}simp{\isacharparenright}\ only{\isacharcolon}\ split{\isacharunderscore}tupled{\isacharunderscore}all{\isachardoublequote}} \\ |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
152 |
& \isa{{\isachardoublequote}{\isasymapprox}{\isachardoublequote}} & \isa{{\isachardoublequote}simp\ only{\isacharcolon}\ split{\isacharunderscore}tupled{\isacharunderscore}all{\isachardoublequote}} \\ |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
153 |
& \isa{{\isachardoublequote}{\isasymlless}{\isachardoublequote}} & \isa{{\isachardoublequote}clarify{\isachardoublequote}} \\ |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
154 |
\end{tabular}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
155 |
\end{isamarkuptext}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
156 |
\isamarkuptrue% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
157 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
158 |
\isamarkupsection{Tacticals% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
159 |
} |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
160 |
\isamarkuptrue% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
161 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
162 |
\begin{isamarkuptext}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
163 |
Classic Isabelle provides a huge amount of tacticals for combination |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
164 |
and modification of existing tactics. This has been greatly reduced |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
165 |
in Isar, providing the bare minimum of combinators only: ``\isa{{\isachardoublequote}{\isacharcomma}{\isachardoublequote}}'' (sequential composition), ``\isa{{\isachardoublequote}{\isacharbar}{\isachardoublequote}}'' (alternative |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
166 |
choices), ``\isa{{\isachardoublequote}{\isacharquery}{\isachardoublequote}}'' (try), ``\isa{{\isachardoublequote}{\isacharplus}{\isachardoublequote}}'' (repeat at least |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
167 |
once). These are usually sufficient in practice; if all fails, |
26902 | 168 |
arbitrary ML tactic code may be invoked via the \hyperlink{method.tactic}{\mbox{\isa{tactic}}} |
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
169 |
method (see \secref{sec:tactics}). |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
170 |
|
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
171 |
\medskip Common ML tacticals may be expressed directly in Isar as |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
172 |
follows: |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
173 |
|
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
174 |
\medskip |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
175 |
\begin{tabular}{lll} |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
176 |
\isa{{\isachardoublequote}tac\isactrlsub {\isadigit{1}}{\isachardoublequote}}~\verb|THEN|~\isa{{\isachardoublequote}tac\isactrlsub {\isadigit{2}}{\isachardoublequote}} & & \isa{{\isachardoublequote}meth\isactrlsub {\isadigit{1}}{\isacharcomma}\ meth\isactrlsub {\isadigit{2}}{\isachardoublequote}} \\ |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
177 |
\isa{{\isachardoublequote}tac\isactrlsub {\isadigit{1}}{\isachardoublequote}}~\verb|ORELSE|~\isa{{\isachardoublequote}tac\isactrlsub {\isadigit{2}}{\isachardoublequote}} & & \isa{{\isachardoublequote}meth\isactrlsub {\isadigit{1}}\ {\isacharbar}\ meth\isactrlsub {\isadigit{2}}{\isachardoublequote}} \\ |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
178 |
\verb|TRY|~\isa{tac} & & \isa{{\isachardoublequote}meth{\isacharquery}{\isachardoublequote}} \\ |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
179 |
\verb|REPEAT1|~\isa{tac} & & \isa{{\isachardoublequote}meth{\isacharplus}{\isachardoublequote}} \\ |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
180 |
\verb|REPEAT|~\isa{tac} & & \isa{{\isachardoublequote}{\isacharparenleft}meth{\isacharplus}{\isacharparenright}{\isacharquery}{\isachardoublequote}} \\ |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
181 |
\verb|EVERY|~\isa{{\isachardoublequote}{\isacharbrackleft}tac\isactrlsub {\isadigit{1}}{\isacharcomma}\ {\isasymdots}{\isacharbrackright}{\isachardoublequote}} & & \isa{{\isachardoublequote}meth\isactrlsub {\isadigit{1}}{\isacharcomma}\ {\isasymdots}{\isachardoublequote}} \\ |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
182 |
\verb|FIRST|~\isa{{\isachardoublequote}{\isacharbrackleft}tac\isactrlsub {\isadigit{1}}{\isacharcomma}\ {\isasymdots}{\isacharbrackright}{\isachardoublequote}} & & \isa{{\isachardoublequote}meth\isactrlsub {\isadigit{1}}\ {\isacharbar}\ {\isasymdots}{\isachardoublequote}} \\ |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
183 |
\end{tabular} |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
184 |
\medskip |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
185 |
|
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
186 |
\medskip \verb|CHANGED| (see \cite{isabelle-ref}) is usually not |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
187 |
required in Isar, since most basic proof methods already fail unless |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
188 |
there is an actual change in the goal state. Nevertheless, ``\isa{{\isachardoublequote}{\isacharquery}{\isachardoublequote}}'' (try) may be used to accept \emph{unchanged} results as |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
189 |
well. |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
190 |
|
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
191 |
\medskip \verb|ALLGOALS|, \verb|SOMEGOAL| etc.\ (see |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
192 |
\cite{isabelle-ref}) are not available in Isar, since there is no |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
193 |
direct goal addressing. Nevertheless, some basic methods address |
26907 | 194 |
all goals internally, notably \hyperlink{method.simp-all}{\mbox{\isa{simp{\isacharunderscore}all}}} (see |
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
195 |
\secref{sec:simplifier}). Also note that \verb|ALLGOALS| can be |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
196 |
often replaced by ``\isa{{\isachardoublequote}{\isacharplus}{\isachardoublequote}}'' (repeat at least once), although |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
197 |
this usually has a different operational behavior, such as solving |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
198 |
goals in a different order. |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
199 |
|
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
200 |
\medskip Iterated resolution, such as \verb|REPEAT (FIRSTGOAL|\isasep\isanewline% |
26902 | 201 |
\verb| (resolve_tac \<dots>))|, is usually better expressed using the \hyperlink{method.intro}{\mbox{\isa{intro}}} and \hyperlink{method.elim}{\mbox{\isa{elim}}} methods of Isar (see |
26846
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
202 |
\secref{sec:classical}).% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
203 |
\end{isamarkuptext}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
204 |
\isamarkuptrue% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
205 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
206 |
\isadelimtheory |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
207 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
208 |
\endisadelimtheory |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
209 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
210 |
\isatagtheory |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
211 |
\isacommand{end}\isamarkupfalse% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
212 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
213 |
\endisatagtheory |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
214 |
{\isafoldtheory}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
215 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
216 |
\isadelimtheory |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
217 |
% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
218 |
\endisadelimtheory |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
219 |
\isanewline |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
220 |
\end{isabellebody}% |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
221 |
%%% Local Variables: |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
222 |
%%% mode: latex |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
223 |
%%% TeX-master: "root" |
2e6726015771
removed obsolete conversion guide -- converted only section on tactics;
wenzelm
parents:
diff
changeset
|
224 |
%%% End: |