397 |
397 |
398 \end{ttdescription} |
398 \end{ttdescription} |
399 |
399 |
400 \index{simplification!from classical reasoner} The wrapper tacticals |
400 \index{simplification!from classical reasoner} The wrapper tacticals |
401 underly the operators addss and addSss, which are used as primitives |
401 underly the operators addss and addSss, which are used as primitives |
402 for the automatic tactics described in \S\label{sec:automatic-tactics}. |
402 for the automatic tactics described in \S\ref{sec:automatic-tactics}. |
403 Strictly speaking, both operators are not part of the classical reasoner. |
403 Strictly speaking, both operators are not part of the classical reasoner. |
404 They should be defined when the simplifier is installed: |
404 They should be defined when the simplifier is installed: |
405 \begin{ttbox} |
405 \begin{ttbox} |
406 infix 4 addSss addss; |
406 infix 4 addSss addss; |
407 fun cs addSss ss = cs addSaltern ("safe_asm_full_simp_tac", |
407 fun cs addSss ss = cs addSaltern ("safe_asm_full_simp_tac", |
408 CHANGED o (safe_asm_full_simp_tac ss)); |
408 CHANGED o (safe_asm_full_simp_tac ss)); |
409 fun cs addss ss = cs addbefore ("asm_full_simp_tac", asm_full_simp_tac ss); |
409 fun cs addss ss = cs addbefore ("asm_full_simp_tac", |
|
410 asm_full_simp_tac ss); |
410 \end{ttbox} |
411 \end{ttbox} |
411 \begin{warn} |
412 \begin{warn} |
412 Being defined as wrappers, these operators are inappropriate for adding more |
413 Being defined as wrappers, these operators are inappropriate for adding more |
413 than one simpset at a time: the simpset added last overwrites any earlier ones. |
414 than one simpset at a time: the simpset added last overwrites any earlier ones. |
414 When a simpset combined with a claset is to be augmented, this should done |
415 When a simpset combined with a claset is to be augmented, this should done |
497 auto : unit -> unit |
498 auto : unit -> unit |
498 force : int -> unit |
499 force : int -> unit |
499 \end{ttbox} |
500 \end{ttbox} |
500 The automatic tactics attempt to prove goals using a combination of |
501 The automatic tactics attempt to prove goals using a combination of |
501 simplification and classical reasoning. |
502 simplification and classical reasoning. |
502 \begin{itemize} |
503 \begin{ttdescription} |
503 \item[\ttindexbold{auto_tac $(cs,ss)$}] is intended for situations where |
504 \item[\ttindexbold{auto_tac $(cs,ss)$}] is intended for situations where |
504 there are a lot of mostly trivial subgoals; it proves all the easy ones, |
505 there are a lot of mostly trivial subgoals; it proves all the easy ones, |
505 leaving the ones it cannot prove. |
506 leaving the ones it cannot prove. |
506 (Unfortunately, attempting to prove the hard ones may take a long time.) |
507 (Unfortunately, attempting to prove the hard ones may take a long time.) |
507 \item[\ttindexbold{force_tac} $(cs,ss)$ $i$] is intended to prove subgoal~$i$ |
508 \item[\ttindexbold{force_tac} $(cs,ss)$ $i$] is intended to prove subgoal~$i$ |
508 completely. It tries to apply all fancy tactics it knows about, |
509 completely. It tries to apply all fancy tactics it knows about, |
509 performing a rather exhaustive search. |
510 performing a rather exhaustive search. |
510 \end{itemize} |
511 \end{ttdescription} |
511 They must be supplied both a simpset and a claset; therefore |
512 They must be supplied both a simpset and a claset; therefore |
512 they are most easily called as \texttt{Auto_tac} and \texttt{Force_tac}, which |
513 they are most easily called as \texttt{Auto_tac} and \texttt{Force_tac}, which |
513 use the default claset and simpset (see \S\ref{sec:current-claset} below). |
514 use the default claset and simpset (see \S\ref{sec:current-claset} below). |
514 For interactive use, the shorthand \texttt{auto();} abbreviates |
515 For interactive use, |
515 \begin{ttbox} |
516 the shorthand \texttt{auto();} abbreviates \texttt{by Auto_tac;} |
516 by Auto_tac; |
517 while \texttt{force 1;} abbreviates \texttt{by (Force_tac 1);} |
517 \end{ttbox} |
|
518 while \texttt{force 1;} abbreviates |
|
519 \begin{ttbox} |
|
520 by (Force_tac 1); |
|
521 \end{ttbox} |
|
522 |
518 |
523 \subsection{Other classical tactics} |
519 \subsection{Other classical tactics} |
524 \begin{ttbox} |
520 \begin{ttbox} |
525 fast_tac : claset -> int -> tactic |
521 fast_tac : claset -> int -> tactic |
526 best_tac : claset -> int -> tactic |
522 best_tac : claset -> int -> tactic |