76 |
76 |
77 \item @{method insert}~@{text "a\<^sub>1 \<dots> a\<^sub>n"} inserts theorems as facts |
77 \item @{method insert}~@{text "a\<^sub>1 \<dots> a\<^sub>n"} inserts theorems as facts |
78 into all goals of the proof state. Note that current facts |
78 into all goals of the proof state. Note that current facts |
79 indicated for forward chaining are ignored. |
79 indicated for forward chaining are ignored. |
80 |
80 |
81 \item @{method erule}~@{text "a\<^sub>1 \<dots> a\<^sub>n"}, @{method drule}~@{text "a\<^sub>1 |
81 \item @{method erule}~@{text "a\<^sub>1 \<dots> a\<^sub>n"}, @{method |
82 \<dots> a\<^sub>n"}, and @{method frule}~@{text "a\<^sub>1 \<dots> a\<^sub>n"} are similar to the |
82 drule}~@{text "a\<^sub>1 \<dots> a\<^sub>n"}, and @{method frule}~@{text |
83 basic @{method rule} method (see \secref{sec:pure-meth-att}), but |
83 "a\<^sub>1 \<dots> a\<^sub>n"} are similar to the basic @{method rule} |
84 apply rules by elim-resolution, destruct-resolution, and |
84 method (see \secref{sec:pure-meth-att}), but apply rules by |
85 forward-resolution, respectively \cite{isabelle-ref}. The optional |
85 elim-resolution, destruct-resolution, and forward-resolution, |
86 natural number argument (default 0) specifies additional assumption |
86 respectively \cite{isabelle-implementation}. The optional natural |
87 steps to be performed here. |
87 number argument (default 0) specifies additional assumption steps to |
|
88 be performed here. |
88 |
89 |
89 Note that these methods are improper ones, mainly serving for |
90 Note that these methods are improper ones, mainly serving for |
90 experimentation and tactic script emulation. Different modes of |
91 experimentation and tactic script emulation. Different modes of |
91 basic rule application are usually expressed in Isar at the proof |
92 basic rule application are usually expressed in Isar at the proof |
92 language level, rather than via implicit proof state manipulations. |
93 language level, rather than via implicit proof state manipulations. |
141 compose rules by resolution. @{attribute THEN} resolves with the |
142 compose rules by resolution. @{attribute THEN} resolves with the |
142 first premise of @{text a} (an alternative position may be also |
143 first premise of @{text a} (an alternative position may be also |
143 specified); the @{attribute COMP} version skips the automatic |
144 specified); the @{attribute COMP} version skips the automatic |
144 lifting process that is normally intended (cf.\ @{ML [source=false] |
145 lifting process that is normally intended (cf.\ @{ML [source=false] |
145 "op RS"} and @{ML [source=false] "op COMP"} in |
146 "op RS"} and @{ML [source=false] "op COMP"} in |
146 \cite[\S5]{isabelle-ref}). |
147 \cite{isabelle-implementation}). |
147 |
148 |
148 \item @{attribute unfolded}~@{text "a\<^sub>1 \<dots> a\<^sub>n"} and @{attribute |
149 \item @{attribute unfolded}~@{text "a\<^sub>1 \<dots> a\<^sub>n"} and @{attribute |
149 folded}~@{text "a\<^sub>1 \<dots> a\<^sub>n"} expand and fold back again the given |
150 folded}~@{text "a\<^sub>1 \<dots> a\<^sub>n"} expand and fold back again the given |
150 definitions throughout a rule. |
151 definitions throughout a rule. |
151 |
152 |
302 |
303 |
303 \begin{description} |
304 \begin{description} |
304 |
305 |
305 \item @{method rule_tac} etc. do resolution of rules with explicit |
306 \item @{method rule_tac} etc. do resolution of rules with explicit |
306 instantiation. This works the same way as the ML tactics @{ML |
307 instantiation. This works the same way as the ML tactics @{ML |
307 res_inst_tac} etc. (see \cite[\S3]{isabelle-ref}) |
308 res_inst_tac} etc. (see \cite{isabelle-implementation}) |
308 |
309 |
309 Multiple rules may be only given if there is no instantiation; then |
310 Multiple rules may be only given if there is no instantiation; then |
310 @{method rule_tac} is the same as @{ML resolve_tac} in ML (see |
311 @{method rule_tac} is the same as @{ML resolve_tac} in ML (see |
311 \cite[\S3]{isabelle-ref}). |
312 \cite{isabelle-implementation}). |
312 |
313 |
313 \item @{method cut_tac} inserts facts into the proof state as |
314 \item @{method cut_tac} inserts facts into the proof state as |
314 assumption of a subgoal, see also @{ML Tactic.cut_facts_tac} in |
315 assumption of a subgoal, see also @{ML Tactic.cut_facts_tac} in |
315 \cite[\S3]{isabelle-ref}. Note that the scope of schematic |
316 \cite{isabelle-implementation}. Note that the scope of schematic |
316 variables is spread over the main goal statement. Instantiations |
317 variables is spread over the main goal statement. Instantiations |
317 may be given as well, see also ML tactic @{ML cut_inst_tac} in |
318 may be given as well, see also ML tactic @{ML cut_inst_tac} in |
318 \cite[\S3]{isabelle-ref}. |
319 \cite{isabelle-implementation}. |
319 |
320 |
320 \item @{method thin_tac}~@{text \<phi>} deletes the specified assumption |
321 \item @{method thin_tac}~@{text \<phi>} deletes the specified assumption |
321 from a subgoal; note that @{text \<phi>} may contain schematic variables. |
322 from a subgoal; note that @{text \<phi>} may contain schematic variables. |
322 See also @{ML thin_tac} in \cite[\S3]{isabelle-ref}. |
323 See also @{ML thin_tac} in \cite{isabelle-implementation}. |
323 |
324 |
324 \item @{method subgoal_tac}~@{text \<phi>} adds @{text \<phi>} as an |
325 \item @{method subgoal_tac}~@{text \<phi>} adds @{text \<phi>} as an |
325 assumption to a subgoal. See also @{ML subgoal_tac} and @{ML |
326 assumption to a subgoal. See also @{ML subgoal_tac} and @{ML |
326 subgoals_tac} in \cite[\S3]{isabelle-ref}. |
327 subgoals_tac} in \cite{isabelle-implementation}. |
327 |
328 |
328 \item @{method rename_tac}~@{text "x\<^sub>1 \<dots> x\<^sub>n"} renames parameters of a |
329 \item @{method rename_tac}~@{text "x\<^sub>1 \<dots> x\<^sub>n"} renames parameters of a |
329 goal according to the list @{text "x\<^sub>1, \<dots>, x\<^sub>n"}, which refers to the |
330 goal according to the list @{text "x\<^sub>1, \<dots>, x\<^sub>n"}, which refers to the |
330 \emph{suffix} of variables. |
331 \emph{suffix} of variables. |
331 |
332 |
332 \item @{method rotate_tac}~@{text n} rotates the assumptions of a |
333 \item @{method rotate_tac}~@{text n} rotates the assumptions of a |
333 goal by @{text n} positions: from right to left if @{text n} is |
334 goal by @{text n} positions: from right to left if @{text n} is |
334 positive, and from left to right if @{text n} is negative; the |
335 positive, and from left to right if @{text n} is negative; the |
335 default value is 1. See also @{ML rotate_tac} in |
336 default value is 1. See also @{ML rotate_tac} in |
336 \cite[\S3]{isabelle-ref}. |
337 \cite{isabelle-implementation}. |
337 |
338 |
338 \item @{method tactic}~@{text "text"} produces a proof method from |
339 \item @{method tactic}~@{text "text"} produces a proof method from |
339 any ML text of type @{ML_type tactic}. Apart from the usual ML |
340 any ML text of type @{ML_type tactic}. Apart from the usual ML |
340 environment and the current proof context, the ML code may refer to |
341 environment and the current proof context, the ML code may refer to |
341 the locally bound values @{ML_text facts}, which indicates any |
342 the locally bound values @{ML_text facts}, which indicates any |
398 \end{description} |
399 \end{description} |
399 |
400 |
400 By default the Simplifier methods take local assumptions fully into |
401 By default the Simplifier methods take local assumptions fully into |
401 account, using equational assumptions in the subsequent |
402 account, using equational assumptions in the subsequent |
402 normalization process, or simplifying assumptions themselves (cf.\ |
403 normalization process, or simplifying assumptions themselves (cf.\ |
403 @{ML asm_full_simp_tac} in \cite[\S10]{isabelle-ref}). In |
404 @{ML asm_full_simp_tac} in \cite{isabelle-ref}). In structured |
404 structured proofs this is usually quite well behaved in practice: |
405 proofs this is usually quite well behaved in practice: just the |
405 just the local premises of the actual goal are involved, additional |
406 local premises of the actual goal are involved, additional facts may |
406 facts may be inserted via explicit forward-chaining (via @{command |
407 be inserted via explicit forward-chaining (via @{command "then"}, |
407 "then"}, @{command "from"}, @{command "using"} etc.). The full |
408 @{command "from"}, @{command "using"} etc.). The full context of |
408 context of premises is only included if the ``@{text "!"}'' (bang) |
409 premises is only included if the ``@{text "!"}'' (bang) argument is |
409 argument is given, which should be used with some care, though. |
410 given, which should be used with some care, though. |
410 |
411 |
411 Additional Simplifier options may be specified to tune the behavior |
412 Additional Simplifier options may be specified to tune the behavior |
412 further (mostly for unstructured scripts with many accidental local |
413 further (mostly for unstructured scripts with many accidental local |
413 facts): ``@{text "(no_asm)"}'' means assumptions are ignored |
414 facts): ``@{text "(no_asm)"}'' means assumptions are ignored |
414 completely (cf.\ @{ML simp_tac}), ``@{text "(no_asm_simp)"}'' means |
415 completely (cf.\ @{ML simp_tac}), ``@{text "(no_asm_simp)"}'' means |
613 \end{rail} |
614 \end{rail} |
614 |
615 |
615 \begin{description} |
616 \begin{description} |
616 |
617 |
617 \item @{method blast} refers to the classical tableau prover (see |
618 \item @{method blast} refers to the classical tableau prover (see |
618 @{ML blast_tac} in \cite[\S11]{isabelle-ref}). The optional |
619 @{ML blast_tac} in \cite{isabelle-ref}). The optional argument |
619 argument specifies a user-supplied search bound (default 20). |
620 specifies a user-supplied search bound (default 20). |
620 |
621 |
621 \item @{method fast}, @{method slow}, @{method best}, @{method |
622 \item @{method fast}, @{method slow}, @{method best}, @{method |
622 safe}, and @{method clarify} refer to the generic classical |
623 safe}, and @{method clarify} refer to the generic classical |
623 reasoner. See @{ML fast_tac}, @{ML slow_tac}, @{ML best_tac}, @{ML |
624 reasoner. See @{ML fast_tac}, @{ML slow_tac}, @{ML best_tac}, @{ML |
624 safe_tac}, and @{ML clarify_tac} in \cite[\S11]{isabelle-ref} for |
625 safe_tac}, and @{ML clarify_tac} in \cite{isabelle-ref} for more |
625 more information. |
626 information. |
626 |
627 |
627 \end{description} |
628 \end{description} |
628 |
629 |
629 Any of the above methods support additional modifiers of the context |
630 Any of the above methods support additional modifiers of the context |
630 of classical rules. Their semantics is analogous to the attributes |
631 of classical rules. Their semantics is analogous to the attributes |
665 \item @{method auto}, @{method force}, @{method clarsimp}, @{method |
666 \item @{method auto}, @{method force}, @{method clarsimp}, @{method |
666 fastsimp}, @{method slowsimp}, and @{method bestsimp} provide access |
667 fastsimp}, @{method slowsimp}, and @{method bestsimp} provide access |
667 to Isabelle's combined simplification and classical reasoning |
668 to Isabelle's combined simplification and classical reasoning |
668 tactics. These correspond to @{ML auto_tac}, @{ML force_tac}, @{ML |
669 tactics. These correspond to @{ML auto_tac}, @{ML force_tac}, @{ML |
669 clarsimp_tac}, and Classical Reasoner tactics with the Simplifier |
670 clarsimp_tac}, and Classical Reasoner tactics with the Simplifier |
670 added as wrapper, see \cite[\S11]{isabelle-ref} for more |
671 added as wrapper, see \cite{isabelle-ref} for more information. The |
671 information. The modifier arguments correspond to those given in |
672 modifier arguments correspond to those given in |
672 \secref{sec:simplifier} and \secref{sec:classical}. Just note that |
673 \secref{sec:simplifier} and \secref{sec:classical}. Just note that |
673 the ones related to the Simplifier are prefixed by \railtterm{simp} |
674 the ones related to the Simplifier are prefixed by \railtterm{simp} |
674 here. |
675 here. |
675 |
676 |
676 Facts provided by forward chaining are inserted into the goal before |
677 Facts provided by forward chaining are inserted into the goal before |