author  wenzelm 
Sat, 18 Mar 2000 19:11:34 +0100  
changeset 8517  062e6cd78534 
parent 8507  d22fcea34cb7 
child 8547  93b8685d004b 
permissions  rwrr 
7135  1 

7167  2 
\chapter{Generic Tools and Packages}\label{ch:gentools} 
3 

8517  4 
\section{Axiomatic Type Classes}\label{sec:axclass} 
7167  5 

8517  6 
\indexisarcmd{axclass}\indexisarcmd{instance}\indexisarmeth{introclasses} 
7167  7 
\begin{matharray}{rcl} 
8517  8 
\isarcmd{axclass} & : & \isartrans{theory}{theory} \\ 
9 
\isarcmd{instance} & : & \isartrans{theory}{proof(prove)} \\ 

10 
intro_classes & : & \isarmeth \\ 

7167  11 
\end{matharray} 
12 

8517  13 
Axiomatic type classes are provided by Isabelle/Pure as a \emph{definitional} 
14 
interface to type classes (cf.~\S\ref{sec:classes}). Thus any object logic 

15 
may make use of this lightweight mechanism of abstract theories. See 

16 
\cite{Wenzel:1997:TPHOL} for more information. There is also a tutorial on 

17 
\emph{Using Axiomatic Type Classes in Isabelle} that is part of the standard 

18 
Isabelle documentation. 

19 
%FIXME cite 

20 

7167  21 
\begin{rail} 
8517  22 
'axclass' classdecl (axmdecl prop comment? +) 
23 
; 

24 
'instance' (nameref '<' nameref  nameref '::' simplearity) comment? 

7167  25 
; 
26 
\end{rail} 

27 

28 
\begin{descr} 

8517  29 
\item [$\isarkeyword{axclass}~c < \vec c~axms$] defines an axiomatic type 
30 
class as the intersection of existing classes, with additional axioms 

31 
holding. Class axioms may not contain more than one type variable. The 

32 
class axioms (with implicit sort constraints added) are bound to the given 

33 
names. Furthermore a class introduction rule is generated, which is 

34 
employed by method $intro_classes$ to support instantiation proofs of this 

35 
class. 

7321  36 

8517  37 
\item [$\isarkeyword{instance}~c@1 < c@2$ and $\isarkeyword{instance}~t :: 
38 
(\vec s)c$] setup up a goal stating the class relation or type arity. The 

39 
proof would usually proceed by $intro_classes$, and then establish the 

40 
characteristic theorems of the type classes involved. After finishing the 

41 
proof, the theory will be augmented by a type signature declaration 

42 
corresponding to the resulting theorem. 

43 
\item [$intro_classes$] repeatedly expands all class introduction rules of 

44 
this theory. 

7167  45 
\end{descr} 
46 

7315  47 

48 
\section{Calculational proof}\label{sec:calculation} 

49 

50 
\indexisarcmd{also}\indexisarcmd{finally}\indexisaratt{trans} 

51 
\begin{matharray}{rcl} 

52 
\isarcmd{also} & : & \isartrans{proof(state)}{proof(state)} \\ 

53 
\isarcmd{finally} & : & \isartrans{proof(state)}{proof(chain)} \\ 

54 
trans & : & \isaratt \\ 

55 
\end{matharray} 

56 

57 
Calculational proof is forward reasoning with implicit application of 

58 
transitivity rules (such those of $=$, $\le$, $<$). Isabelle/Isar maintains 

7391  59 
an auxiliary register $calculation$\indexisarthm{calculation} for accumulating 
7897  60 
results obtained by transitivity composed with the current result. Command 
61 
$\ALSO$ updates $calculation$ involving $this$, while $\FINALLY$ exhibits the 

62 
final $calculation$ by forward chaining towards the next goal statement. Both 

63 
commands require valid current facts, i.e.\ may occur only after commands that 

64 
produce theorems such as $\ASSUMENAME$, $\NOTENAME$, or some finished proof of 

65 
$\HAVENAME$, $\SHOWNAME$ etc. 

7315  66 

67 
Also note that the automatic term abbreviation ``$\dots$'' has its canonical 

68 
application with calculational proofs. It automatically refers to the 

69 
argument\footnote{The argument of a curried infix expression is its righthand 

70 
side.} of the preceding statement. 

71 

72 
Isabelle/Isar calculations are implicitly subject to block structure in the 

73 
sense that new threads of calculational reasoning are commenced for any new 

74 
block (as opened by a local goal, for example). This means that, apart from 

75 
being able to nest calculations, there is no separate \emph{begincalculation} 

76 
command required. 

77 

78 
\begin{rail} 

79 
('also'  'finally') transrules? comment? 

80 
; 

8507  81 
'trans' (()  'add'  'del') 
7315  82 
; 
83 

84 
transrules: '(' thmrefs ')' interest? 

85 
; 

86 
\end{rail} 

87 

88 
\begin{descr} 

89 
\item [$\ALSO~(thms)$] maintains the auxiliary $calculation$ register as 

90 
follows. The first occurrence of $\ALSO$ in some calculational thread 

7905  91 
initializes $calculation$ by $this$. Any subsequent $\ALSO$ on the same 
7335  92 
level of blockstructure updates $calculation$ by some transitivity rule 
7458  93 
applied to $calculation$ and $this$ (in that order). Transitivity rules are 
94 
picked from the current context plus those given as $thms$ (the latter have 

95 
precedence). 

7315  96 

97 
\item [$\FINALLY~(thms)$] maintaining $calculation$ in the same way as 

98 
$\ALSO$, and concludes the current calculational thread. The final result 

99 
is exhibited as fact for forward chaining towards the next goal. Basically, 

7987  100 
$\FINALLY$ just abbreviates $\ALSO~\FROM{calculation}$. Note that 
101 
``$\FINALLY~\SHOW{}{\Var{thesis}}~\DOT$'' and 

102 
``$\FINALLY~\HAVE{}{\phi}~\DOT$'' are typical idioms for concluding 

103 
calculational proofs. 

7315  104 

7335  105 
\item [$trans$] maintains the set of transitivity rules of the theory or proof 
106 
context, by adding or deleting theorems (the default is to add). 

7315  107 
\end{descr} 
108 

109 

8483  110 
\section{Named local contexts (cases)}\label{sec:cases} 
111 

112 
\indexisarcmd{case}\indexisarcmd{printcases} 

113 
\indexisaratt{casenames}\indexisaratt{params} 

114 
\begin{matharray}{rcl} 

115 
\isarcmd{case} & : & \isartrans{proof(state)}{proof(state)} \\ 

8517  116 
\isarcmd{print_cases}^* & : & \isarkeep{proof} \\ 
8483  117 
case_names & : & \isaratt \\ 
118 
params & : & \isaratt \\ 

119 
\end{matharray} 

120 

121 
Basically, Isar proof contexts are built up explicitly using commands like 

122 
$\FIXNAME$, $\ASSUMENAME$ etc.\ (see \S\ref{sec:proofcontext}). In typical 

123 
verification tasks this can become hard to manage, though. In particular, a 

124 
large number of local contexts may emerge from case analysis or induction over 

125 
inductive sets and types. 

126 

127 
\medskip 

128 

129 
The $\CASENAME$ command provides a shorthand to refer to certain parts of 

130 
logical context symbolically. Proof methods may provide an environment of 

8507  131 
named ``cases'' of the form $c\colon \vec x, \vec \phi$. Then the effect of 
132 
$\CASE{c}$ is exactly the same as $\FIX{\vec x}~\ASSUME{c}{\vec\phi}$. 

8483  133 

134 
It is important to note that $\CASENAME$ does \emph{not} provide any means to 

135 
peek at the current goal state, which is treated as strictly nonobservable in 

136 
Isar! Instead, the cases considered here usually emerge in a canonical way 

137 
from certain pieces of specification that appear in the theory somewhere else 

138 
(e.g.\ in an inductive definition, or recursive function). See also 

139 
\S\ref{sec:inductmethod} for more details of how this works in HOL. 

140 

141 
\medskip 

142 

143 
Named cases may be exhibited in the current proof context only if both the 

144 
proof method and the corresponding rule support this. Case names and 

145 
parameters of basic rules may be declared by hand as well, by using 

146 
appropriate attributes. Thus variant versions of rules that have been derived 

147 
manually may be used in advanced case analysis later. 

148 

149 
\railalias{casenames}{case\_names} 

150 
\railterm{casenames} 

151 

152 
\begin{rail} 

153 
'case' nameref attributes? 

154 
; 

155 
casenames (name + ) 

156 
; 

157 
'params' ((name * ) + 'and') 

158 
; 

159 
\end{rail} 

160 

161 
\begin{descr} 

8507  162 
\item [$\CASE{c}$] invokes a named local context $c\colon \vec x, \vec \phi$, 
8483  163 
as provided by an appropriate proof method (such as $cases$ and $induct$, 
164 
see \S\ref{sec:inductmethod}). The command $\CASE{c}$ abbreviates 

8507  165 
$\FIX{\vec x}~\ASSUME{c}{\vec\phi}$. 
8483  166 
\item [$\isarkeyword{print_cases}$] prints all local contexts of the current 
167 
goal context, using Isar proof language notation. This is a diagnostic 

168 
command; $undo$ does not apply. 

169 
\item [$case_names~\vec c$] declares names for the local contexts of premises 

170 
of some theorem ($\vec c$ refers to the \emph{suffix} of the list premises). 

171 
\item [$params~\vec p@1 \dots \vec p@n$] renames the innermost parameters of 

172 
premises $1, \dots, n$ of some theorem. An empty list of names be be given 

173 
to skip positions, leaving the corresponding parameters unchanged. 

174 
\end{descr} 

175 

176 

8517  177 
\section{Generalized existence} 
7135  178 

8517  179 
\indexisarcmd{obtain} 
7135  180 
\begin{matharray}{rcl} 
8517  181 
\isarcmd{obtain} & : & \isartrans{proof(prove)}{proof(state)} \\ 
182 
\end{matharray} 

183 

184 
Generalized existence reasoning means that additional elements with certain 

185 
properties are introduced, together with a soundness proof of that context 

186 
change (the rest of the main goal is left unchanged). 

187 

188 
Syntactically, the $\OBTAINNAME$ language element is like a proof method to 

189 
the present goal, followed by a proof of its additional claim, followed by the 

190 
actual context commands (cf.\ $\FIXNAME$ and $\ASSUMENAME$, 

191 
\S\ref{sec:proofcontext}). 

192 

193 
\begin{rail} 

194 
'obtain' (vars + 'and') comment? \\ 'where' (assm comment? + 'and') 

195 
; 

196 
\end{rail} 

197 

198 
$\OBTAINNAME$ is defined as a derived Isar command as follows, where the 

199 
preceding goal shall be $\psi$, with (optional) facts $\vec b$ indicated for 

200 
forward chaining. 

201 
\begin{matharray}{l} 

202 
\OBTAIN{\vec x}{a}{\vec \phi}~~\langle proof\rangle \equiv {} \\[0.5ex] 

203 
\quad \PROOF{succeed} \\ 

204 
\qquad \DEF{}{thesis \equiv \psi} \\ 

205 
\qquad \PRESUME{that}{\All{\vec x} \vec\phi \Imp thesis} \\ 

206 
\qquad \FROM{\vec b}~\SHOW{}{thesis}~~\langle proof\rangle \\ 

207 
\quad \NEXT \\ 

208 
\qquad \FIX{\vec x}~\ASSUME{a}{\vec\phi} \\ 

7135  209 
\end{matharray} 
210 

8517  211 
Typically, the soundness proof is relatively straightforward, often just by 
212 
canonical automated tools such as $\BY{simp}$ (see \S\ref{sec:simp}) or 

213 
$\BY{blast}$ (see \S\ref{sec:classicalauto}). Note that the ``$that$'' 

214 
presumption above is usually declared as simplification and (unsafe) 

215 
introduction rule, somewhat depending on the objectlogic's policy, 

216 
though.\footnote{Major objectlogics such as HOL and HOLCF do this already.} 

217 

218 
The original goal statement is wrapped into a local definition in order to 

219 
avoid any automated tools descending into it. Usually, any statement would 

220 
admit the intended reduction; only in very rare cases $thesis_def$ has to be 

221 
expanded to complete the soundness proof. 

222 

223 
\medskip 

224 

225 
In a sense, $\OBTAINNAME$ represents at the level of Isar proofs what would be 

226 
metalogical existential quantifiers and conjunctions. This concept has a 

227 
broad range of useful applications, ranging from plain elimination (or even 

228 
introduction) of objectlevel existentials and conjunctions, to elimination 

229 
over results of symbolic evaluation of recursive definitions, for example. 

230 

231 

232 
\section{Miscellaneous methods and attributes} 

233 

234 
\indexisarmeth{unfold}\indexisarmeth{fold} 

235 
\indexisarmeth{erule}\indexisarmeth{drule}\indexisarmeth{frule} 

236 
\indexisarmeth{fail}\indexisarmeth{succeed} 

237 
\begin{matharray}{rcl} 

238 
unfold & : & \isarmeth \\ 

239 
fold & : & \isarmeth \\[0.5ex] 

240 
erule^* & : & \isarmeth \\ 

241 
drule^* & : & \isarmeth \\ 

242 
frule^* & : & \isarmeth \\[0.5ex] 

243 
succeed & : & \isarmeth \\ 

244 
fail & : & \isarmeth \\ 

245 
\end{matharray} 

7135  246 

247 
\begin{rail} 

8517  248 
('fold'  'unfold'  'erule'  'drule'  'frule') thmrefs 
7135  249 
; 
250 
\end{rail} 

251 

7167  252 
\begin{descr} 
8517  253 
\item [$unfold~thms$ and $fold~thms$] expand and fold back again the given 
254 
metalevel definitions throughout all goals; any facts provided are inserted 

255 
into the goal and subject to rewriting as well. 

256 
\item [$erule~thms$, $drule~thms$, and $frule~thms$] are similar to the basic 

257 
$rule$ method (see \S\ref{sec:puremethatt}), but apply rules by 

258 
elimresolution, destructresolution, and forwardresolution, respectively 

259 
\cite{isabelleref}. These are improper method, mainly for experimentation 

260 
and emulating tactic scripts. 

7335  261 

8517  262 
Different modes of basic rule application are usually expressed in Isar at 
263 
the proof language level, rather than via implicit proof state 

264 
modifications. For example, a proper singlestep elimination would be done 

265 
using the basic $rule$ method, with forward chaining of current facts. 

266 
\item [$succeed$] yields a single (unchanged) result; it is the identity of 

267 
the ``\texttt{,}'' method combinator (cf.\ \S\ref{sec:synmeth}). 

268 
\item [$fail$] yields an empty result sequence; it is the identity of the 

269 
``\texttt{}'' method combinator (cf.\ \S\ref{sec:synmeth}). 

7167  270 
\end{descr} 
7135  271 

8517  272 

273 
\indexisaratt{standard} 

274 
\indexisaratt{elimify} 

275 

276 
\indexisaratt{RS}\indexisaratt{COMP} 

277 
\indexisaratt{where} 

278 
\indexisaratt{tag}\indexisaratt{untag} 

279 
\indexisaratt{transfer} 

280 
\indexisaratt{export} 

281 
\indexisaratt{unfold}\indexisaratt{fold} 

282 
\begin{matharray}{rcl} 

283 
tag & : & \isaratt \\ 

284 
untag & : & \isaratt \\[0.5ex] 

285 
RS & : & \isaratt \\ 

286 
COMP & : & \isaratt \\[0.5ex] 

287 
where & : & \isaratt \\[0.5ex] 

288 
unfold & : & \isaratt \\ 

289 
fold & : & \isaratt \\[0.5ex] 

290 
standard & : & \isaratt \\ 

291 
elimify & : & \isaratt \\ 

292 
export^* & : & \isaratt \\ 

293 
transfer & : & \isaratt \\[0.5ex] 

294 
\end{matharray} 

295 

296 
\begin{rail} 

297 
'tag' (nameref+) 

298 
; 

299 
'untag' name 

300 
; 

301 
('RS'  'COMP') nat? thmref 

302 
; 

303 
'where' (name '=' term * 'and') 

304 
; 

305 
('unfold'  'fold') thmrefs 

306 
; 

307 
\end{rail} 

308 

309 
\begin{descr} 

310 
\item [$tag~name~args$ and $untag~name$] add and remove $tags$ of some 

311 
theorem. Tags may be any list of strings that serve as comment for some 

312 
tools (e.g.\ $\LEMMANAME$ causes the tag ``$lemma$'' to be added to the 

313 
result). The first string is considered the tag name, the rest its 

314 
arguments. Note that untag removes any tags of the same name. 

315 
\item [$RS~n~thm$ and $COMP~n~thm$] compose rules. $RS$ resolves with the 

316 
$n$th premise of $thm$; $COMP$ is a version of $RS$ that skips the 

317 
automatic lifting process that is normally intended (cf.\ \texttt{RS} and 

318 
\texttt{COMP} in \cite[\S5]{isabelleref}). 

319 
\item [$where~\vec x = \vec t$] perform named instantiation of schematic 

320 
variables occurring in a theorem. Unlike instantiation tactics (such as 

321 
\texttt{res_inst_tac}, see \cite{isabelleref}), actual schematic variables 

322 
have to be specified (e.g.\ $\Var{x@3}$). 

323 

324 
\item [$unfold~thms$ and $fold~thms$] expand and fold back again the given 

325 
metalevel definitions throughout a rule. 

326 

327 
\item [$standard$] puts a theorem into the standard form of objectrules, just 

328 
as the ML function \texttt{standard} (see \cite[\S5]{isabelleref}). 

329 

330 
\item [$elimify$] turns an destruction rule into an elimination, just as the 

331 
ML function \texttt{make\_elim} (see \cite{isabelleref}). 

332 

333 
\item [$export$] lifts a local result out of the current proof context, 

334 
generalizing all fixed variables and discharging all assumptions. Note that 

335 
(partial) export is usually done automatically behind the scenes. This 

336 
attribute is mainly for experimentation. 

337 

338 
\item [$transfer$] promotes a theorem to the current theory context, which has 

339 
to enclose the former one. Normally, this is done automatically when rules 

340 
are joined by inference. 

341 

342 
\end{descr} 

7135  343 

344 

345 
\section{The Simplifier} 

346 

7321  347 
\subsection{Simplification methods}\label{sec:simp} 
7315  348 

8483  349 
\indexisarmeth{simp}\indexisarmeth{simpall} 
7315  350 
\begin{matharray}{rcl} 
351 
simp & : & \isarmeth \\ 

8483  352 
simp_all & : & \isarmeth \\ 
7315  353 
\end{matharray} 
354 

8483  355 
\railalias{simpall}{simp\_all} 
356 
\railterm{simpall} 

357 

7315  358 
\begin{rail} 
8483  359 
('simp'  simpall) ('!' ?) (simpmod * ) 
7315  360 
; 
361 

8483  362 
simpmod: ('add'  'del'  'only'  'split' (()  'add'  'del')  'other') ':' thmrefs 
7315  363 
; 
364 
\end{rail} 

365 

7321  366 
\begin{descr} 
7897  367 
\item [$simp$] invokes Isabelle's simplifier, after modifying the context by 
368 
adding or deleting rules as specified. The \railtoken{only} modifier first 

8483  369 
removes all other rewrite rules, congruences, and looper tactics (including 
370 
splits), and then behaves like \railtoken{add}. 

7321  371 

8483  372 
The \railtoken{split} modifiers add or delete rules for the Splitter (see 
373 
also \cite{isabelleref}), the default is to add. This works only if the 

374 
Simplifier method has been properly setup to include the Splitter (all major 

375 
object logics such HOL, HOLCF, FOL, ZF do this already). 

376 

377 
The \railtoken{other} modifier ignores its arguments. Nevertheless there 

378 
may be sideeffects on the context via attributes.\footnote{This provides a 

379 
back door for arbitrary context manipulation.} 

380 

381 
\item [$simp_all$] is similar to $simp$, but acts on all goals. 

7321  382 
\end{descr} 
383 

8483  384 
The $simp$ methods are based on \texttt{asm_full_simp_tac} 
385 
\cite[\S10]{isabelleref}, but is much better behaved in practice. Just the 

386 
local premises of the actual goal are involved by default. Additional facts 

387 
may be inserted via forwardchaining (using $\THEN$, $\FROMNAME$ etc.). The 

388 
full context of assumptions is only included in the $simp!$ versions, which 

389 
should be used with some care, though. 

7321  390 

8483  391 
Note that there is no separate $split$ method. The effect of 
8517  392 
\texttt{split_tac} can be simulated by $(simp~only\colon~split\colon~thms)$. 
8483  393 

394 

395 
\subsection{Declaring rules} 

396 

397 
\indexisaratt{simp}\indexisaratt{split} 

7321  398 
\begin{matharray}{rcl} 
399 
simp & : & \isaratt \\ 

8483  400 
split & : & \isaratt \\ 
7321  401 
\end{matharray} 
402 

403 
\begin{rail} 

8483  404 
('simp'  'split') (()  'add'  'del') 
7321  405 
; 
406 
\end{rail} 

407 

408 
\begin{descr} 

7466  409 
\item [$simp$] adds or deletes rules from the theory or proof context (the 
410 
default is to add). 

8483  411 
\item [$split$] is similar to $simp$, but refers to split rules. 
7321  412 
\end{descr} 
7319  413 

7315  414 

415 
\subsection{Forward simplification} 

416 

7391  417 
\indexisaratt{simplify}\indexisaratt{asmsimplify} 
418 
\indexisaratt{fullsimplify}\indexisaratt{asmfullsimplify} 

7315  419 
\begin{matharray}{rcl} 
420 
simplify & : & \isaratt \\ 

421 
asm_simplify & : & \isaratt \\ 

422 
full_simplify & : & \isaratt \\ 

423 
asm_full_simplify & : & \isaratt \\ 

424 
\end{matharray} 

425 

7321  426 
These attributes provide forward rules for simplification, which should be 
7905  427 
used only very rarely. There are no separate options for adding or deleting 
428 
simplification rules locally. 

429 

430 
See the ML functions of the same name in \cite[\S10]{isabelleref} for more 

431 
information. 

7315  432 

433 

7135  434 
\section{The Classical Reasoner} 
435 

7335  436 
\subsection{Basic methods}\label{sec:classicalbasic} 
7321  437 

7974  438 
\indexisarmeth{rule}\indexisarmeth{intro} 
439 
\indexisarmeth{elim}\indexisarmeth{default}\indexisarmeth{contradiction} 

7321  440 
\begin{matharray}{rcl} 
441 
rule & : & \isarmeth \\ 

442 
intro & : & \isarmeth \\ 

443 
elim & : & \isarmeth \\ 

444 
contradiction & : & \isarmeth \\ 

445 
\end{matharray} 

446 

447 
\begin{rail} 

448 
('rule'  'intro'  'elim') thmrefs 

449 
; 

450 
\end{rail} 

451 

452 
\begin{descr} 

7466  453 
\item [$rule$] as offered by the classical reasoner is a refinement over the 
8517  454 
primitive one (see \S\ref{sec:puremethatt}). In case that no rules are 
7466  455 
provided as arguments, it automatically determines elimination and 
7321  456 
introduction rules from the context (see also \S\ref{sec:classicalmod}). 
8517  457 
This is made the default method for basic proof steps, such as $\PROOFNAME$ 
458 
and ``$\DDOT$'' (two dots), see also \S\ref{sec:proofsteps} and 

459 
\S\ref{sec:puremethatt}. 

7321  460 

7466  461 
\item [$intro$ and $elim$] repeatedly refine some goal by intro or 
7905  462 
elimresolution, after having inserted any facts. Omitting the arguments 
7321  463 
refers to any suitable rules from the context, otherwise only the explicitly 
7335  464 
given ones may be applied. The latter form admits better control of what 
465 
actually happens, thus it is very appropriate as an initial method for 

466 
$\PROOFNAME$ that splits up certain connectives of the goal, before entering 

7987  467 
the actual subproof. 
7458  468 

7466  469 
\item [$contradiction$] solves some goal by contradiction, deriving any result 
470 
from both $\neg A$ and $A$. Facts, which are guaranteed to participate, may 

471 
appear in either order. 

7321  472 
\end{descr} 
473 

474 

7981  475 
\subsection{Automated methods}\label{sec:classicalauto} 
7315  476 

7321  477 
\indexisarmeth{blast} 
7391  478 
\indexisarmeth{fast}\indexisarmeth{best}\indexisarmeth{slow}\indexisarmeth{slowbest} 
7321  479 
\begin{matharray}{rcl} 
480 
blast & : & \isarmeth \\ 

481 
fast & : & \isarmeth \\ 

482 
best & : & \isarmeth \\ 

483 
slow & : & \isarmeth \\ 

484 
slow_best & : & \isarmeth \\ 

485 
\end{matharray} 

486 

487 
\railalias{slowbest}{slow\_best} 

488 
\railterm{slowbest} 

489 

490 
\begin{rail} 

7905  491 
'blast' ('!' ?) nat? (clamod * ) 
7321  492 
; 
7905  493 
('fast'  'best'  'slow'  slowbest) ('!' ?) (clamod * ) 
7321  494 
; 
495 

8203
2fcc6017cb72
intro/elim/dest attributes: changed ! / !! flags to ? / ??;
wenzelm
parents:
8195
diff
changeset

496 
clamod: (('intro'  'elim'  'dest') (()  '?'  '??')  'del') ':' thmrefs 
7321  497 
; 
498 
\end{rail} 

499 

500 
\begin{descr} 

501 
\item [$blast$] refers to the classical tableau prover (see \texttt{blast_tac} 

7335  502 
in \cite[\S11]{isabelleref}). The optional argument specifies a 
7321  503 
usersupplied search bound (default 20). 
504 
\item [$fast$, $best$, $slow$, $slow_best$] refer to the generic classical 

7335  505 
reasoner (see \cite[\S11]{isabelleref}, tactic \texttt{fast_tac} etc). 
7321  506 
\end{descr} 
507 

508 
Any of above methods support additional modifiers of the context of classical 

8517  509 
rules. Their semantics is analogous to the attributes given in 
7987  510 
\S\ref{sec:classicalmod}. Facts provided by forward chaining are inserted 
511 
into the goal before doing the search. The ``!''~argument causes the full 

512 
context of assumptions to be included as well.\footnote{This is slightly less 

513 
hazardous than for the Simplifier (see \S\ref{sec:simp}).} 

7321  514 

7315  515 

7981  516 
\subsection{Combined automated methods} 
7315  517 

7321  518 
\indexisarmeth{auto}\indexisarmeth{force} 
519 
\begin{matharray}{rcl} 

520 
force & : & \isarmeth \\ 

521 
auto & : & \isarmeth \\ 

522 
\end{matharray} 

523 

524 
\begin{rail} 

7905  525 
('force'  'auto') ('!' ?) (clasimpmod * ) 
7321  526 
; 
7315  527 

8483  528 
clasimpmod: ('simp' (()  'add'  'del'  'only')  'other'  
529 
('split' (()  'add'  'del'))  

8203
2fcc6017cb72
intro/elim/dest attributes: changed ! / !! flags to ? / ??;
wenzelm
parents:
8195
diff
changeset

530 
(('intro'  'elim'  'dest') (()  '?'  '??')  'del')) ':' thmrefs 
7321  531 
\end{rail} 
7315  532 

7321  533 
\begin{descr} 
534 
\item [$force$ and $auto$] provide access to Isabelle's combined 

535 
simplification and classical reasoning tactics. See \texttt{force_tac} and 

536 
\texttt{auto_tac} in \cite[\S11]{isabelleref} for more information. The 

537 
modifier arguments correspond to those given in \S\ref{sec:simp} and 

7905  538 
\S\ref{sec:classicalauto}. Just note that the ones related to the 
539 
Simplifier are prefixed by \railtoken{simp} here. 

7987  540 

541 
Facts provided by forward chaining are inserted into the goal before doing 

542 
the search. The ``!''~argument causes the full context of assumptions to be 

543 
included as well. 

7321  544 
\end{descr} 
545 

7987  546 

8483  547 
\subsection{Declaring rules}\label{sec:classicalmod} 
7135  548 

7391  549 
\indexisaratt{intro}\indexisaratt{elim}\indexisaratt{dest} 
550 
\indexisaratt{iff}\indexisaratt{delrule} 

7321  551 
\begin{matharray}{rcl} 
552 
intro & : & \isaratt \\ 

553 
elim & : & \isaratt \\ 

554 
dest & : & \isaratt \\ 

7391  555 
iff & : & \isaratt \\ 
7321  556 
delrule & : & \isaratt \\ 
557 
\end{matharray} 

7135  558 

7321  559 
\begin{rail} 
8203
2fcc6017cb72
intro/elim/dest attributes: changed ! / !! flags to ? / ??;
wenzelm
parents:
8195
diff
changeset

560 
('intro'  'elim'  'dest') (()  '?'  '??') 
7321  561 
; 
562 
\end{rail} 

7135  563 

7321  564 
\begin{descr} 
8517  565 
\item [$intro$, $elim$, and $dest$] declare introduction, elimination, and 
566 
destruct rules, respectively. By default, rules are considered as 

567 
\emph{safe}, while a single ``?'' classifies as \emph{unsafe}, and ``??'' as 

568 
\emph{extra} (i.e.\ not applied in the searchoriented automated methods, 

569 
but only in singlestep methods such as $rule$). 

7335  570 

7391  571 
\item [$iff$] declares equations both as rewrite rules for the simplifier and 
572 
classical reasoning rules. 

573 

7335  574 
\item [$delrule$] deletes introduction or elimination rules from the context. 
575 
Note that destruction rules would have to be turned into elimination rules 

7321  576 
first, e.g.\ by using the $elimify$ attribute. 
577 
\end{descr} 

7135  578 

8203
2fcc6017cb72
intro/elim/dest attributes: changed ! / !! flags to ? / ??;
wenzelm
parents:
8195
diff
changeset

579 

7135  580 
%%% Local Variables: 
581 
%%% mode: latex 

582 
%%% TeXmaster: "isarref" 

583 
%%% End: 