author wenzelm Tue Mar 21 17:32:43 2000 +0100 (2000-03-21) changeset 8547 93b8685d004b parent 8546 dc053bc2ea06 child 8548 7c5fe9d17712
tuned;
 doc-src/IsarRef/generic.tex file | annotate | diff | revisions doc-src/IsarRef/hol.tex file | annotate | diff | revisions doc-src/IsarRef/intro.tex file | annotate | diff | revisions doc-src/IsarRef/isar-ref.tex file | annotate | diff | revisions doc-src/IsarRef/pure.tex file | annotate | diff | revisions doc-src/IsarRef/refcard.tex file | annotate | diff | revisions
     1.1 --- a/doc-src/IsarRef/generic.tex	Tue Mar 21 15:32:08 2000 +0100
1.2 +++ b/doc-src/IsarRef/generic.tex	Tue Mar 21 17:32:43 2000 +0100
1.3 @@ -12,10 +12,10 @@
1.4
1.5  Axiomatic type classes are provided by Isabelle/Pure as a \emph{definitional}
1.6  interface to type classes (cf.~\S\ref{sec:classes}).  Thus any object logic
1.7 -may make use of this light-weight mechanism of abstract theories.  See
1.9 -\emph{Using Axiomatic Type Classes in Isabelle} that is part of the standard
1.10 -Isabelle documentation.
1.11 +may make use of this light-weight mechanism of abstract theories
1.12 +\cite{Wenzel:1997:TPHOL}.  There is also a tutorial on \emph{Using Axiomatic
1.13 +  Type Classes in Isabelle} that is part of the standard Isabelle
1.14 +documentation.
1.15  %FIXME cite
1.16
1.17  \begin{rail}
1.18 @@ -35,8 +35,8 @@
1.19    class.
1.20
1.21  \item [$\isarkeyword{instance}~c@1 < c@2$ and $\isarkeyword{instance}~t :: 1.22 - (\vec s)c$] setup up a goal stating the class relation or type arity.  The
1.23 -  proof would usually proceed by $intro_classes$, and then establish the
1.24 +  (\vec s)c$] setup a goal stating a class relation or type arity. The proof 1.25 + would usually proceed by$intro_classes$, and then establish the 1.26 characteristic theorems of the type classes involved. After finishing the 1.27 proof, the theory will be augmented by a type signature declaration 1.28 corresponding to the resulting theorem. 1.29 @@ -86,15 +86,15 @@ 1.30 \end{rail} 1.31 1.32 \begin{descr} 1.33 -\item [$\ALSO~(thms)$] maintains the auxiliary$calculation$register as 1.34 +\item [$\ALSO~(\vec a)$] maintains the auxiliary$calculation$register as 1.35 follows. The first occurrence of$\ALSO$in some calculational thread 1.36 initializes$calculation$by$this$. Any subsequent$\ALSO$on the same 1.37 level of block-structure updates$calculation$by some transitivity rule 1.38 applied to$calculation$and$this$(in that order). Transitivity rules are 1.39 - picked from the current context plus those given as$thms$(the latter have 1.40 - precedence). 1.41 + picked from the current context plus those given as explicit arguments (the 1.42 + latter have precedence). 1.43 1.44 -\item [$\FINALLY~(thms)$] maintaining$calculation$in the same way as 1.45 +\item [$\FINALLY~(\vec a)$] maintaining$calculation$in the same way as 1.46$\ALSO$, and concludes the current calculational thread. The final result 1.47 is exhibited as fact for forward chaining towards the next goal. Basically, 1.48$\FINALLY$just abbreviates$\ALSO~\FROM{calculation}$. Note that 1.49 @@ -102,8 +102,7 @@ 1.50 $\FINALLY~\HAVE{}{\phi}~\DOT$'' are typical idioms for concluding 1.51 calculational proofs. 1.52 1.53 -\item [$trans$] maintains the set of transitivity rules of the theory or proof 1.54 - context, by adding or deleting theorems (the default is to add). 1.55 +\item [$trans$] declares theorems as transitivity rules. 1.56 \end{descr} 1.57 1.58 1.59 @@ -141,10 +140,10 @@ 1.60 \medskip 1.61 1.62 Named cases may be exhibited in the current proof context only if both the 1.63 -proof method and the corresponding rule support this. Case names and 1.64 -parameters of basic rules may be declared by hand as well, by using 1.65 -appropriate attributes. Thus variant versions of rules that have been derived 1.66 -manually may be used in advanced case analysis later. 1.67 +proof method and the rules involved support this. Case names and parameters 1.68 +of basic rules may be declared by hand as well, by using appropriate 1.69 +attributes. Thus variant versions of rules that have been derived manually 1.70 +may be used in advanced case analysis later. 1.71 1.72 \railalias{casenames}{case\_names} 1.73 \railterm{casenames} 1.74 @@ -157,20 +156,21 @@ 1.75 'params' ((name * ) + 'and') 1.76 ; 1.77 \end{rail} 1.78 +%FIXME bug in rail 1.79 1.80 \begin{descr} 1.81 \item [$\CASE{c}$] invokes a named local context$c\colon \vec x, \vec \phi$, 1.82 - as provided by an appropriate proof method (such as$cases$and$induct$, 1.83 - see \S\ref{sec:induct-method}). The command$\CASE{c}$abbreviates 1.84 -$\FIX{\vec x}~\ASSUME{c}{\vec\phi}$. 1.85 + as provided by an appropriate proof method (such as$cases$and$induct$in 1.86 + Isabelle/HOL, see \S\ref{sec:induct-method}). The command$\CASE{c}$1.87 + abbreviates$\FIX{\vec x}~\ASSUME{c}{\vec\phi}$. 1.88 \item [$\isarkeyword{print_cases}$] prints all local contexts of the current 1.89 - goal context, using Isar proof language notation. This is a diagnostic 1.90 - command;$undo$does not apply. 1.91 + state, using Isar proof language notation. This is a diagnostic command; 1.92 +$undo$does not apply. 1.93 \item [$case_names~\vec c$] declares names for the local contexts of premises 1.94 - of some theorem ($\vec c$refers to the \emph{suffix} of the list premises). 1.95 + of some theorem;$\vec c$refers to the \emph{suffix} of the list premises. 1.96 \item [$params~\vec p@1 \dots \vec p@n$] renames the innermost parameters of 1.97 - premises$1, \dots, n$of some theorem. An empty list of names be be given 1.98 - to skip positions, leaving the corresponding parameters unchanged. 1.99 + premises$1, \dots, n$of some theorem. An empty list of names may be given 1.100 + to skip positions, leaving the present parameters unchanged. 1.101 \end{descr} 1.102 1.103 1.104 @@ -185,17 +185,17 @@ 1.105 properties are introduced, together with a soundness proof of that context 1.106 change (the rest of the main goal is left unchanged). 1.107 1.108 -Syntactically, the$\OBTAINNAME$language element is like a proof method to 1.109 -the present goal, followed by a proof of its additional claim, followed by the 1.110 -actual context commands (cf.\$\FIXNAME$and$\ASSUMENAME$, 1.111 -\S\ref{sec:proof-context}). 1.112 +Syntactically, the$\OBTAINNAME$language element is like an initial proof 1.113 +method to the present goal, followed by a proof of its additional claim, 1.114 +followed by the actual context commands (using the syntax of$\FIXNAME$and 1.115 +$\ASSUMENAME$, see \S\ref{sec:proof-context}). 1.116 1.117 \begin{rail} 1.118 'obtain' (vars + 'and') comment? \\ 'where' (assm comment? + 'and') 1.119 ; 1.120 \end{rail} 1.121 1.122 -$\OBTAINNAME$is defined as a derived Isar command as follows, where the 1.123 +$\OBTAINNAME$is defined as a derived Isar command as follows; here the 1.124 preceding goal shall be$\psi$, with (optional) facts$\vec b$indicated for 1.125 forward chaining. 1.126 \begin{matharray}{l} 1.127 @@ -212,13 +212,13 @@ 1.128 canonical automated tools such as$\BY{simp}$(see \S\ref{sec:simp}) or 1.129$\BY{blast}$(see \S\ref{sec:classical-auto}). Note that the $that$'' 1.130 presumption above is usually declared as simplification and (unsafe) 1.131 -introduction rule, somewhat depending on the object-logic's policy, 1.132 -though.\footnote{Major object-logics such as HOL and HOLCF do this already.} 1.133 +introduction rule, depending on the object-logic's policy, 1.134 +though.\footnote{HOL and HOLCF do this already.} 1.135 1.136 The original goal statement is wrapped into a local definition in order to 1.137 avoid any automated tools descending into it. Usually, any statement would 1.138 -admit the intended reduction; only in very rare cases$thesis_def$has to be 1.139 -expanded to complete the soundness proof. 1.140 +admit the intended reduction anyway; only in very rare cases$thesis_def$has 1.141 +to be expanded to complete the soundness proof. 1.142 1.143 \medskip 1.144 1.145 @@ -250,18 +250,18 @@ 1.146 \end{rail} 1.147 1.148 \begin{descr} 1.149 -\item [$unfold~thms$and$fold~thms$] expand and fold back again the given 1.150 +\item [$unfold~\vec a$and$fold~\vec a$] expand and fold back again the given 1.151 meta-level definitions throughout all goals; any facts provided are inserted 1.152 into the goal and subject to rewriting as well. 1.153 -\item [$erule~thms$,$drule~thms$, and$frule~thms$] are similar to the basic 1.154 -$rule$method (see \S\ref{sec:pure-meth-att}), but apply rules by 1.155 +\item [$erule~\vec a$,$drule~\vec a$, and$frule~\vec a$] are similar to the 1.156 + basic$rule$method (see \S\ref{sec:pure-meth-att}), but apply rules by 1.157 elim-resolution, destruct-resolution, and forward-resolution, respectively 1.158 \cite{isabelle-ref}. These are improper method, mainly for experimentation 1.159 and emulating tactic scripts. 1.160 1.161 Different modes of basic rule application are usually expressed in Isar at 1.162 the proof language level, rather than via implicit proof state 1.163 - modifications. For example, a proper single-step elimination would be done 1.164 + manipulations. For example, a proper single-step elimination would be done 1.165 using the basic$rule$method, with forward chaining of current facts. 1.166 \item [$succeed$] yields a single (unchanged) result; it is the identity of 1.167 the \texttt{,}'' method combinator (cf.\ \S\ref{sec:syn-meth}). 1.168 @@ -312,16 +312,16 @@ 1.169 tools (e.g.\$\LEMMANAME$causes the tag $lemma$'' to be added to the 1.170 result). The first string is considered the tag name, the rest its 1.171 arguments. Note that untag removes any tags of the same name. 1.172 -\item [$RS~n~thm$and$COMP~n~thm$] compose rules.$RS$resolves with the 1.173 -$n$-th premise of$thm$;$COMP$is a version of$RS$that skips the 1.174 - automatic lifting process that is normally intended (cf.\ \texttt{RS} and 1.175 - \texttt{COMP} in \cite[\S5]{isabelle-ref}). 1.176 +\item [$RS~n~a$and$COMP~n~a$] compose rules.$RS$resolves with the$n$-th 1.177 + premise of$a$;$COMP$is a version of$RS$that skips the automatic lifting 1.178 + process that is normally intended (cf.\ \texttt{RS} and \texttt{COMP} in 1.179 + \cite[\S5]{isabelle-ref}). 1.180 \item [$where~\vec x = \vec t$] perform named instantiation of schematic 1.181 variables occurring in a theorem. Unlike instantiation tactics (such as 1.182 \texttt{res_inst_tac}, see \cite{isabelle-ref}), actual schematic variables 1.183 have to be specified (e.g.\$\Var{x@3}$). 1.184 1.185 -\item [$unfold~thms$and$fold~thms$] expand and fold back again the given 1.186 +\item [$unfold~\vec a$and$fold~\vec a$] expand and fold back again the given 1.187 meta-level definitions throughout a rule. 1.188 1.189 \item [$standard$] puts a theorem into the standard form of object-rules, just 1.190 @@ -332,12 +332,12 @@ 1.191 1.192 \item [$export$] lifts a local result out of the current proof context, 1.193 generalizing all fixed variables and discharging all assumptions. Note that 1.194 - (partial) export is usually done automatically behind the scenes. This 1.195 - attribute is mainly for experimentation. 1.196 + proper incremental export is already done as part of the basic Isar 1.197 + machinery. This attribute is mainly for experimentation. 1.198 1.199 \item [$transfer$] promotes a theorem to the current theory context, which has 1.200 - to enclose the former one. Normally, this is done automatically when rules 1.201 - are joined by inference. 1.202 + to enclose the former one. This is done automatically whenever rules are 1.203 + joined by inference. 1.204 1.205 \end{descr} 1.206 1.207 @@ -364,32 +364,31 @@ 1.208 \end{rail} 1.209 1.210 \begin{descr} 1.211 -\item [$simp$] invokes Isabelle's simplifier, after modifying the context by 1.212 - adding or deleting rules as specified. The \railtoken{only} modifier first 1.213 - removes all other rewrite rules, congruences, and looper tactics (including 1.214 - splits), and then behaves like \railtoken{add}. 1.215 +\item [$simp$] invokes Isabelle's simplifier, after declaring additional rules 1.216 + according to the arguments given. Note that the \railtoken{only} modifier 1.217 + first removes all other rewrite rules, congruences, and looper tactics 1.218 + (including splits), and then behaves like \railtoken{add}. 1.219 1.220 The \railtoken{split} modifiers add or delete rules for the Splitter (see 1.221 also \cite{isabelle-ref}), the default is to add. This works only if the 1.222 Simplifier method has been properly setup to include the Splitter (all major 1.223 object logics such HOL, HOLCF, FOL, ZF do this already). 1.224 1.225 - The \railtoken{other} modifier ignores its arguments. Nevertheless there 1.226 - may be side-effects on the context via attributes.\footnote{This provides a 1.227 - back door for arbitrary context manipulation.} 1.228 - 1.229 + The \railtoken{other} modifier ignores its arguments. Nevertheless, 1.230 + additional kinds of rules may be declared by including appropriate 1.231 + attributes in the specification. 1.232 \item [$simp_all$] is similar to$simp$, but acts on all goals. 1.233 \end{descr} 1.234 1.235 -The$simp$methods are based on \texttt{asm_full_simp_tac} 1.236 +Internally, the$simp$method is based on \texttt{asm_full_simp_tac} 1.237 \cite[\S10]{isabelle-ref}, but is much better behaved in practice. Just the 1.238 local premises of the actual goal are involved by default. Additional facts 1.239 may be inserted via forward-chaining (using$\THEN$,$\FROMNAME$etc.). The 1.240 -full context of assumptions is only included in the$simp!$versions, which 1.241 +full context of assumptions is only included in the$simp!$version, which 1.242 should be used with some care, though. 1.243 1.244 Note that there is no separate$split$method. The effect of 1.245 -\texttt{split_tac} can be simulated by$(simp~only\colon~split\colon~thms)$. 1.246 +\texttt{split_tac} can be simulated by$(simp~only\colon~split\colon~\vec a)$. 1.247 1.248 1.249 \subsection{Declaring rules} 1.250 @@ -406,9 +405,8 @@ 1.251 \end{rail} 1.252 1.253 \begin{descr} 1.254 -\item [$simp$] adds or deletes rules from the theory or proof context (the 1.255 - default is to add). 1.256 -\item [$split$] is similar to$simp$, but refers to split rules. 1.257 +\item [$simp$] declares simplification rules. 1.258 +\item [$split$] declares split rules. 1.259 \end{descr} 1.260 1.261 1.262 @@ -424,7 +422,7 @@ 1.263 \end{matharray} 1.264 1.265 These attributes provide forward rules for simplification, which should be 1.266 -used only very rarely. There are no separate options for adding or deleting 1.267 +used only very rarely. There are no separate options for declaring 1.268 simplification rules locally. 1.269 1.270 See the ML functions of the same name in \cite[\S10]{isabelle-ref} for more 1.271 @@ -445,7 +443,7 @@ 1.272 \end{matharray} 1.273 1.274 \begin{rail} 1.275 - ('rule' | 'intro' | 'elim') thmrefs 1.276 + ('rule' | 'intro' | 'elim') thmrefs? 1.277 ; 1.278 \end{rail} 1.279 1.280 @@ -460,11 +458,11 @@ 1.281 1.282 \item [$intro$and$elim$] repeatedly refine some goal by intro- or 1.283 elim-resolution, after having inserted any facts. Omitting the arguments 1.284 - refers to any suitable rules from the context, otherwise only the explicitly 1.285 - given ones may be applied. The latter form admits better control of what 1.286 - actually happens, thus it is very appropriate as an initial method for 1.287 -$\PROOFNAME$that splits up certain connectives of the goal, before entering 1.288 - the actual sub-proof. 1.289 + refers to any suitable rules declared in the context, otherwise only the 1.290 + explicitly given ones may be applied. The latter form admits better control 1.291 + of what actually happens, thus it is very appropriate as an initial method 1.292 + for$\PROOFNAME$that splits up certain connectives of the goal, before 1.293 + entering the actual sub-proof. 1.294 1.295 \item [$contradiction$] solves some goal by contradiction, deriving any result 1.296 from both$\neg A$and$A$. Facts, which are guaranteed to participate, may 1.297 @@ -507,10 +505,12 @@ 1.298 1.299 Any of above methods support additional modifiers of the context of classical 1.300 rules. Their semantics is analogous to the attributes given in 1.301 -\S\ref{sec:classical-mod}. Facts provided by forward chaining are inserted 1.302 -into the goal before doing the search. The !''~argument causes the full 1.303 -context of assumptions to be included as well.\footnote{This is slightly less 1.304 - hazardous than for the Simplifier (see \S\ref{sec:simp}).} 1.305 +\S\ref{sec:classical-mod}. Facts provided by forward chaining are 1.306 +inserted\footnote{These methods usually cannot make proper use of actual rules 1.307 + inserted that way, though.} into the goal before doing the search. The 1.308 +!''~argument causes the full context of assumptions to be included as well. 1.309 +This is slightly less hazardous than for the Simplifier (see 1.310 +\S\ref{sec:simp}). 1.311 1.312 1.313 \subsection{Combined automated methods} 1.314 @@ -568,8 +568,8 @@ 1.315 \emph{extra} (i.e.\ not applied in the search-oriented automated methods, 1.316 but only in single-step methods such as$rule$). 1.317 1.318 -\item [$iff$] declares equations both as rewrite rules for the simplifier and 1.319 - classical reasoning rules. 1.320 +\item [$iff$] declares equations both as rules for the Simplifier and 1.321 + Classical Reasoner. 1.322 1.323 \item [$delrule$] deletes introduction or elimination rules from the context. 1.324 Note that destruction rules would have to be turned into elimination rules   2.1 --- a/doc-src/IsarRef/hol.tex Tue Mar 21 15:32:08 2000 +0100 2.2 +++ b/doc-src/IsarRef/hol.tex Tue Mar 21 17:32:43 2000 +0100 2.3 @@ -182,9 +182,8 @@ 2.4 \begin{descr} 2.5 \item [$\isarkeyword{inductive}$and$\isarkeyword{coinductive}$] define 2.6 (co)inductive sets from the given introduction rules. 2.7 -\item [$mono$] adds or deletes monotonicity rules from the theory or proof 2.8 - context (the default is to add). These rule are involved in the automated 2.9 - monotonicity proof of$\isarkeyword{inductive}$. 2.10 +\item [$mono$] declares monotonicity rules. These rule are involved in the 2.11 + automated monotonicity proof of$\isarkeyword{inductive}$. 2.12 \item [$\isarkeyword{inductive_cases}$] creates instances of elimination rules 2.13 of (co)inductive sets, solving obvious cases by simplification. 2.14 2.15 @@ -193,10 +192,10 @@ 2.16 2.17 Unlike the \texttt{mk_cases} ML function exported with any inductive 2.18 definition \cite{isabelle-HOL},$\isarkeyword{inductive_cases}$it does 2.19 - \emph{not} modify cases by simplification, apart from trying to solve 2.20 - completely (e.g.\ due to contradictory assumptions. Thus 2.21 -$\isarkeyword{inductive_cases}$conforms to way Isar proofs are conducted, 2.22 - rather than old-style tactic scripts. 2.23 + \emph{not} modify cases by simplification that are not solved completely 2.24 + anyway (e.g.\ due to contradictory assumptions). Thus 2.25 +$\isarkeyword{inductive_cases}$conforms to the way Isar proofs are 2.26 + conducted, rather than old-style tactic scripts. 2.27 \end{descr} 2.28 2.29 See \cite{isabelle-HOL} for further information on inductive definitions in 2.30 @@ -269,7 +268,8 @@ 2.31 2.32 The$stripped$option causes implications and (bounded) universal 2.33 quantifiers to be removed from each new subgoal emerging from the 2.34 - application of the induction rule. 2.35 + application of the induction rule. This accommodates typical 2.36 + strengthening of induction'' predicates. 2.37 \end{descr} 2.38 2.39 Above methods produce named local contexts (cf.\ \S\ref{sec:cases}), as 2.40 @@ -279,11 +279,11 @@ 2.41 cases usually require the rule to be instantiated fully, as far as the 2.42 emerging local contexts and subgoals are concerned. In particular, for 2.43 induction both the predicates and variables have to be specified. Otherwise 2.44 -the$\CASENAME$command would refuse to invoke cases that contain schematic 2.45 +the$\CASENAME$command would refuse to invoke cases containing schematic 2.46 variables. 2.47 2.48 The$\isarkeyword{print_cases}$command (\S\ref{sec:diag}) prints all named 2.49 -cases present in the current proof context. 2.50 +cases present in the current proof state. 2.51 2.52 2.53 \subsection{Declaring rules}   3.1 --- a/doc-src/IsarRef/intro.tex Tue Mar 21 15:32:08 2000 +0100 3.2 +++ b/doc-src/IsarRef/intro.tex Tue Mar 21 17:32:43 2000 +0100 3.3 @@ -8,7 +8,7 @@ 3.4 Isar is already part of Isabelle (as of version Isabelle99, or later). The 3.5 \texttt{isabelle} binary provides option \texttt{-I} to run the Isar 3.6 interaction loop at startup, rather than the plain ML top-level. Thus the 3.7 -quickest way to do anything with Isabelle/Isar is as follows: 3.8 +quickest way to do \emph{anything} with Isabelle/Isar is as follows: 3.9 \begin{ttbox} 3.10 isabelle -I HOL\medskip 3.11 \out{> Welcome to Isabelle/HOL (Isabelle99)}\medskip 3.12 @@ -17,23 +17,23 @@ 3.13 lemma "0 < foo" by (simp add: foo_def); 3.14 end 3.15 \end{ttbox} 3.16 -Note that any Isabelle/Isar command may be retracted by \texttt{undo}; the 3.17 +Note that any Isabelle/Isar command may be retracted by \texttt{undo}. The 3.18 \texttt{help} command prints a list of available language elements. 3.19 3.20 3.21 \subsection{The Proof~General interface} 3.22 3.23 Plain TTY-based interaction as above used to be quite feasible with 3.24 -traditional tactic based theorem proving, but developing Isar documents 3.25 +traditional tactic based theorem proving, but developing Isar documents really 3.26 demands some better user-interface support. David Aspinall's 3.27 \emph{Proof~General}\index{Proof General} environment 3.28 -\cite{proofgeneral,Aspinall:TACAS:2000} offers a generic Emacs-based interface 3.29 -for interactive theorem provers that does all the cut-and-paste and 3.30 +\cite{proofgeneral,Aspinall:TACAS:2000} offers a generic Emacs interface for 3.31 +interactive theorem provers that does all the cut-and-paste and 3.32 forward-backward walk through the text in a very neat way. In Isabelle/Isar, 3.33 the current position within a partial proof document is equally important than 3.34 the actual proof state. Thus Proof~General provides the canonical working 3.35 environment for Isabelle/Isar, both for getting acquainted (e.g.\ by replaying 3.36 -existing Isar documents) and real production work. 3.37 +existing Isar documents) and for production work. 3.38 3.39 \medskip 3.40 3.41 @@ -50,18 +50,18 @@ 3.42 interface.\footnote{There is also a \texttt{ProofGeneral/isa} interface, for 3.43 classic Isabelle tactic scripts.} 3.44 3.45 -The interface script provides several options, just pass \texttt{-?}'' to 3.46 -see its usage. Apart from the command line, the defaults for these options 3.47 -may be overridden via the \texttt{PROOFGENERAL_OPTIONS} setting as well. For 3.48 +The interface script provides several options, just pass \verb,-?, to see its 3.49 +usage. Apart from the command line, the defaults for these options may be 3.50 +overridden via the \texttt{PROOFGENERAL_OPTIONS} setting as well. For 3.51 example, plain FSF Emacs (instead of the default XEmacs) may be configured in 3.52 Isabelle's settings via \texttt{PROOFGENERAL_OPTIONS="-p emacs"}. 3.53 3.54 Occasionally, the user's \verb,~/.emacs, file contains material that is 3.55 incompatible with the version of Emacs that Proof~General prefers. Then 3.56 proper startup may be still achieved by using the \texttt{-u false} option. 3.57 -Also note that any Emacs lisp file \texttt{proofgeneral-settings.el} occurring 3.58 -in \texttt{\$ISABELLE_HOME/etc} or \texttt{\$ISABELLE_HOME_USER/etc} is 3.59 -automatically loaded by the Proof~General interface script as well. 3.60 +Also note that any Emacs lisp file called \texttt{proofgeneral-settings.el} 3.61 +occurring in \texttt{\$ISABELLE_HOME/etc} or \texttt{\$ISABELLE_HOME_USER/etc} 3.62 +is automatically loaded by the Proof~General interface script as well. 3.63 3.64 \medskip 3.65 3.66 @@ -72,8 +72,8 @@ 3.67 \end{ttbox} 3.68 Users of XEmacs may note the tool bar for navigating forward and backward 3.69 through the text. Consult the Proof~General documentation \cite{proofgeneral} 3.70 -for further basic command sequences, such as \texttt{c-c c-return}'' or 3.71 -\texttt{c-c u}''. 3.72 +for further basic command sequences, such as \texttt{C-c C-return}'' or 3.73 +\texttt{C-c u}''. 3.74 3.75 \medskip 3.76 3.77 @@ -88,12 +88,12 @@ 3.78 according the default set of Isabelle symbols. On the other hand, the 3.79 Isabelle document preparation system \cite{isabelle-sys} will be happy to 3.80 print non-ASCII symbols properly. It is even possible to invent additional 3.81 -notation beyond the display capabilities of XEmacs~/X-Symbol. 3.82 +notation beyond the display capabilities of XEmacs and X-Symbol. 3.83 3.84 3.85 \section{Isabelle/Isar theories} 3.86 3.87 -Isabelle/Isar offers the following main improvements over classic Isabelle: 3.88 +Isabelle/Isar offers the following main improvements over classic Isabelle. 3.89 \begin{enumerate} 3.90 \item A new \emph{theory format}, occasionally referred to as new-style 3.91 theories'', supporting interactive development and unlimited undo operation. 3.92 @@ -101,18 +101,18 @@ 3.93 semi-automated reasoning. Instead of putting together unreadable tactic 3.94 scripts, the author is enabled to express the reasoning in way that is close 3.95 to usual mathematical practice. 3.96 -\item A simple document preparation system for Isabelle/Isar theories, for 3.97 - typesetting formal developments together with informal text. The resulting 3.98 - resulting hyper-linked PDF documents are equally well suited for WWW 3.99 - presentation and printed copies. 3.100 +\item A simple document preparation system, for typesetting formal 3.101 + developments together with informal text. The resulting hyper-linked PDF 3.102 + documents are equally well suited for WWW presentation and as printed 3.103 + copies. 3.104 \end{enumerate} 3.105 3.106 The Isar proof language is embedded into the new theory format as a proper 3.107 sub-language. Proof mode is entered by stating some$\THEOREMNAME$or 3.108$\LEMMANAME$at the theory level, and left again with the final conclusion 3.109 (e.g.\ via$\QEDNAME$). A few theory extension mechanisms require proof as 3.110 -well, such as the HOL$\isarkeyword{typedef}$which demands non-emptiness of 3.111 -the representing sets. 3.112 +well, such as HOL's$\isarkeyword{typedef}$which demands non-emptiness of the 3.113 +representing sets. 3.114 3.115 New-style theory files may still be associated with separate ML files 3.116 consisting of plain old tactic scripts. There is no longer any ML binding 3.117 @@ -120,10 +120,11 @@ 3.118 \texttt{thm}, and \texttt{thms} retrieve this information \cite{isabelle-ref}. 3.119 Nevertheless, migration between classic Isabelle and Isabelle/Isar is 3.120 relatively easy. Thus users may start to benefit from interactive theory 3.121 -development even before they have any idea of the Isar proof language at all. 3.122 +development and document preparation, even before they have any idea of the 3.123 +Isar proof language at all. 3.124 3.125 \begin{warn} 3.126 - Currently Proof~General does \emph{not} support mixed interactive 3.127 + Currently, Proof~General does \emph{not} support mixed interactive 3.128 development of classic Isabelle theory files or tactic scripts, together 3.129 with Isar documents. The \texttt{isa}'' and \texttt{isar}'' versions of 3.130 Proof~General are handled as two different theorem proving systems, only one 3.131 @@ -146,6 +147,7 @@ 3.132 but a good understanding of mathematical proof, might cope with Isar even 3.133 better. See also \cite{Wenzel:1999:TPHOL} for further background information 3.134 on Isar. 3.135 +%FIXME cite [HahnBanach-in-Isar] 3.136 3.137 \medskip This really is a \emph{reference manual}. Nevertheless, we will also 3.138 give some clues of how the concepts introduced here may be put into practice. 3.139 @@ -162,8 +164,10 @@ 3.140 \end{center} 3.141 3.142 See \texttt{HOL/Isar_examples} for a collection of introductory examples, and 3.143 -\texttt{HOL/HOL-Real/HahnBanach} is a big mathematics application. Apart from 3.144 -plain HTML sources, these sessions also provide actual documents (in PDF). 3.145 +\texttt{HOL/HOL-Real/HahnBanach} for a big mathematics application. Apart 3.146 +from plain HTML sources, these sessions also provide actual documents (in 3.147 +PDF). 3.148 + 3.149 3.150 %%% Local Variables: 3.151 %%% mode: latex   4.1 --- a/doc-src/IsarRef/isar-ref.tex Tue Mar 21 15:32:08 2000 +0100 4.2 +++ b/doc-src/IsarRef/isar-ref.tex Tue Mar 21 17:32:43 2000 +0100 4.3 @@ -53,20 +53,20 @@ 4.4 4.5 The current version of Isabelle offers Isar as an alternative proof language 4.6 interface layer. The Isabelle/Isar system provides an interpreter for the 4.7 - Isar formal proof document language. The input may consist either of proper 4.8 - document constructors, or improper auxiliary commands (for diagnostics, 4.9 - exploration etc.). Proof texts consisting of proper document constructors 4.10 - only, admit a purely static reading, thus being intelligible later without 4.11 - requiring dynamic replay that is so typical for traditional proof scripts. 4.12 - Any of the Isabelle/Isar commands may be executed in single-steps, so 4.13 - basically the interpreter has a proof text debugger already built-in. 4.14 + Isar formal proof language. The input may consist either of proper document 4.15 + constructors, or improper auxiliary commands (for diagnostics, exploration 4.16 + etc.). Proof texts consisting of proper elements only, admit a purely 4.17 + static reading, thus being intelligible later without requiring dynamic 4.18 + replay that is so typical for traditional proof scripts. Any of the 4.19 + Isabelle/Isar commands may be executed in single-steps, so basically the 4.20 + interpreter has a proof text debugger already built-in. 4.21 4.22 Employing the Isar instantiation of \emph{Proof~General}, a generic Emacs 4.23 interface for interactive proof assistants, we arrive at a reasonable 4.24 environment for \emph{live document editing}. Thus proof texts may be 4.25 - developed incrementally by issuing proper document constructors, including 4.26 - forward and backward tracing of partial documents; intermediate states may 4.27 - be inspected by diagnostic commands. 4.28 + developed incrementally by issuing proof commands, including forward and 4.29 + backward tracing of partial documents; intermediate states may be inspected 4.30 + by diagnostic commands. 4.31 4.32 The Isar subsystem is tightly integrated into the Isabelle/Pure meta-logic 4.33 implementation. Theories, theorems, proof procedures etc.\ may be used   5.1 --- a/doc-src/IsarRef/pure.tex Tue Mar 21 15:32:08 2000 +0100 5.2 +++ b/doc-src/IsarRef/pure.tex Tue Mar 21 17:32:43 2000 +0100 5.3 @@ -2,7 +2,7 @@ 5.4 \chapter{Basic Isar Language Elements}\label{ch:pure-syntax} 5.5 5.6 Subsequently, we introduce the main part of Pure Isar theory and proof 5.7 -commands, together with a few fundamental proof methods and attributes. 5.8 +commands, together with fundamental proof methods and attributes. 5.9 Chapter~\ref{ch:gen-tools} describes further Isar elements provided by generic 5.10 tools and packages (such as the Simplifier) that are either part of Pure 5.11 Isabelle or pre-installed by most object logics. Chapter~\ref{ch:hol-tools} 5.12 @@ -17,7 +17,7 @@ 5.13 documents, while their use is discouraged for the final outcome. Typical 5.14 examples are diagnostic commands that print terms or theorems according to the 5.15 current context; other commands even emulate old-style tactical theorem 5.16 -proving, which facilitates porting of legacy proof scripts. 5.17 +proving. 5.18 5.19 5.20 \section{Theory commands} 5.21 @@ -45,7 +45,7 @@ 5.22 command (cf.\ \S\ref{sec:markup-thy} and \S\ref{sec:markup-thy}). The theory 5.23 context may be also changed by$\CONTEXT$without creating a new theory. In 5.24 both cases,$\END$concludes the theory development; it has to be the very 5.25 -last command in a theory file. 5.26 +last command of any theory file. 5.27 5.28 \begin{rail} 5.29 'header' text 5.30 @@ -62,7 +62,7 @@ 5.31 5.32 \begin{descr} 5.33 \item [$\isarkeyword{header}~text$] provides plain text markup just preceding 5.34 - the formal begin of a theory. In actual document preparation the 5.35 + the formal beginning of a theory. In actual document preparation the 5.36 corresponding {\LaTeX} macro \verb,\isamarkupheader, may be redefined to 5.37 produce chapter or section headings. See also \S\ref{sec:markup-thy} and 5.38 \S\ref{sec:markup-prf} for further markup commands. 5.39 @@ -128,7 +128,7 @@ 5.40 becomes available. A typical application would be to emit 5.41 \verb,\begin{comment}, and \verb,\end{comment}, commands to exclude certain 5.42 parts from the final document.\footnote{This requires the \texttt{comment} 5.43 - package to be included in {\LaTeX}.} 5.44 + package to be included in {\LaTeX}, of course.} 5.45 \end{descr} 5.46 5.47 Any markup command (except$\isarkeyword{text_raw}$) corresponds to a {\LaTeX} 5.48 @@ -172,7 +172,7 @@ 5.49 introduce proven class relations. 5.50 \item [$\isarkeyword{defaultsort}~s$] makes sort$s$the new default sort for 5.51 any type variables given without sort constraints. Usually, the default 5.52 - sort would be only changed when defining new logics. 5.53 + sort would be only changed when defining new object-logics. 5.54 \end{descr} 5.55 5.56 5.57 @@ -245,8 +245,8 @@ 5.58 existing constant. See \cite[\S6]{isabelle-ref} for more details on the 5.59 form of equations admitted as constant definitions. 5.60 \item [$\isarkeyword{constdefs}~c::\sigma~eqn$] combines declarations and 5.61 - definitions of constants, using canonical name$c_def$for the definitional 5.62 - axiom. 5.63 + definitions of constants, using the canonical name$c_def$for the 5.64 + definitional axiom. 5.65 \end{descr} 5.66 5.67 5.68 @@ -272,9 +272,9 @@ 5.69 except that the actual logical signature extension is omitted. Thus the 5.70 context free grammar of Isabelle's inner syntax may be augmented in 5.71 arbitrary ways, independently of the logic. The$mode$argument refers to 5.72 - the print mode that the grammar rules belong; unless there is the 5.73 - \texttt{output} flag given, all productions are added both to the input and 5.74 - output grammar. 5.75 + the print mode that the grammar rules belong; unless the \texttt{output} 5.76 + flag is given, all productions are added both to the input and output 5.77 + grammar. 5.78 \item [$\isarkeyword{translations}~rules$] specifies syntactic translation 5.79 rules (i.e.\ \emph{macros}): parse~/ print rules (\texttt{==}), parse rules 5.80 (\texttt{=>}), or print rules (\texttt{<=}). Translation patterns may be 5.81 @@ -306,10 +306,10 @@ 5.82 5.83 Axioms are usually only introduced when declaring new logical systems. 5.84 Everyday work is typically done the hard way, with proper definitions and 5.85 - actual theorems. 5.86 + actual proven theorems. 5.87 \item [$\isarkeyword{theorems}~a = \vec b$] stores lists of existing theorems. 5.88 - Typical applications would also involve attributes, to augment the 5.89 - Simplifier context, for example. 5.90 + Typical applications would also involve attributes, to declare Simplifier 5.91 + rules, for example. 5.92 \item [$\isarkeyword{lemmas}$] is similar to$\isarkeyword{theorems}$, but 5.93 tags the results as lemma''. 5.94 \end{descr} 5.95 @@ -324,9 +324,9 @@ 5.96 \end{matharray} 5.97 5.98 Isabelle organizes any kind of name declarations (of types, constants, 5.99 -theorems etc.) by hierarchically structured name spaces. Normally the user 5.100 -never has to control the behavior of name space entry by hand, yet the 5.101 -following commands provide some way to do so. 5.102 +theorems etc.) by separate hierarchically structured name spaces. Normally 5.103 +the user never has to control the behavior of name space entry by hand, yet 5.104 +the following commands provide some way to do so. 5.105 5.106 \begin{descr} 5.107 \item [$\isarkeyword{global}$and$\isarkeyword{local}$] change the current 5.108 @@ -374,8 +374,8 @@ 5.109 \item [$\isarkeyword{setup}~text$] changes the current theory context by 5.110 applying$text$, which refers to an ML expression of type 5.111 \texttt{(theory~->~theory)~list}. The$\isarkeyword{setup}$command is the 5.112 - canonical way to initialize object-logic specific tools and packages written 5.113 - in ML. 5.114 + canonical way to initialize any object-logic specific tools and packages 5.115 + written in ML. 5.116 \end{descr} 5.117 5.118 5.119 @@ -439,12 +439,12 @@ 5.120 Proof commands perform transitions of Isar/VM machine configurations, which 5.121 are block-structured, consisting of a stack of nodes with three main 5.122 components: logical proof context, current facts, and open goals. Isar/VM 5.123 -transitions are \emph{typed} according to the following three three different 5.124 -modes of operation: 5.125 +transitions are \emph{typed} according to the following three different modes 5.126 +of operation: 5.127 \begin{descr} 5.128 \item [$proof(prove)$] means that a new goal has just been stated that is now 5.129 - to be \emph{proven}; the next command may refine it by some proof method 5.130 - (read: tactic), and enter a sub-proof to establish the actual result. 5.131 + to be \emph{proven}; the next command may refine it by some proof method, 5.132 + and enter a sub-proof to establish the actual result. 5.133 \item [$proof(state)$] is like an internal theory mode: the context may be 5.134 augmented by \emph{stating} additional assumptions, intermediate results 5.135 etc. 5.136 @@ -532,8 +532,8 @@ 5.137 \end{rail} 5.138 5.139 \begin{descr} 5.140 -\item [$\FIX{\vec x}$] introduces a local \emph{arbitrary, but fixed} 5.141 - variables$\vec x$. 5.142 +\item [$\FIX{\vec x}$] introduces local \emph{arbitrary, but fixed} variables 5.143 +$\vec x$. 5.144 \item [$\ASSUME{a}{\vec\phi}$and$\PRESUME{a}{\vec\phi}$] introduce local 5.145 theorems$\vec\phi$by assumption. Subsequent results applied to an 5.146 enclosing goal (e.g.\ by$\SHOWNAME$) are handled as follows:$\ASSUMENAME$5.147 @@ -567,7 +567,7 @@ 5.148 5.149 New facts are established either by assumption or proof of local statements. 5.150 Any fact will usually be involved in further proofs, either as explicit 5.151 -arguments of proof methods or when forward chaining towards the next goal via 5.152 +arguments of proof methods, or when forward chaining towards the next goal via 5.153$\THEN$(and variants). Note that the special theorem name 5.154$this$\indexisarthm{this} refers to the most recently established facts. 5.155 \begin{rail} 5.156 @@ -589,7 +589,8 @@ 5.157 also \S\ref{sec:proof-steps}). For example, method$rule$(see 5.158 \S\ref{sec:pure-meth-att}) would typically do an elimination rather than an 5.159 introduction. Automatic methods usually insert the facts into the goal 5.160 - state before operation. 5.161 + state before operation. This provides a simple scheme to control relevance 5.162 + of facts in automated proof search. 5.163 \item [$\FROM{\vec b}$] abbreviates$\NOTE{}{\vec b}~\THEN$; thus$\THEN$is 5.164 equivalent to$\FROM{this}$. 5.165 \item [$\WITH{\vec b}$] abbreviates$\FROM{\vec b~facts}$; thus the forward 5.166 @@ -599,9 +600,10 @@ 5.167 Basic proof methods (such as$rule$, see \S\ref{sec:pure-meth-att}) expect 5.168 multiple facts to be given in their proper order, corresponding to a prefix of 5.169 the premises of the rule involved. Note that positions may be easily skipped 5.170 -using a form like$\FROM{\text{\texttt{_}}~a~b}$, for example. This involves 5.171 -the trivial rule$\PROP\psi \Imp \PROP\psi$, which happens to be bound in 5.172 -Isabelle/Pure as \texttt{_}'' (underscore).\indexisarthm{_@\texttt{_}} 5.173 +using something like$\FROM{\text{\texttt{_}}~a~b}$, for example. This 5.174 +involves the trivial rule$\PROP\psi \Imp \PROP\psi$, which happens to be 5.175 +bound in Isabelle/Pure as \texttt{_}'' 5.176 +(underscore).\indexisarthm{_@\texttt{_}} 5.177 5.178 5.179 \subsection{Goal statements} 5.180 @@ -620,7 +622,7 @@ 5.181 Proof mode is entered from theory mode by initial goal commands$\THEOREMNAME$5.182 and$\LEMMANAME$. New local goals may be claimed within proof mode as well. 5.183 Four variants are available, indicating whether the result is meant to solve 5.184 -some pending goal or whether forward chaining is employed. 5.185 +some pending goal or whether forward chaining is indicated. 5.186 5.187 \begin{rail} 5.188 ('theorem' | 'lemma') goal 5.189 @@ -634,7 +636,8 @@ 5.190 5.191 \begin{descr} 5.192 \item [$\THEOREM{a}{\phi}$] enters proof mode with$\phi$as main goal, 5.193 - eventually resulting in some theorem$\turn \phi$put back into the theory. 5.194 + eventually resulting in some theorem$\turn \phi$to be put back into the 5.195 + theory. 5.196 \item [$\LEMMA{a}{\phi}$] is similar to$\THEOREMNAME$, but tags the result as 5.197 lemma''. 5.198 \item [$\HAVE{a}{\phi}$] claims a local goal, eventually resulting in a 5.199 @@ -663,7 +666,7 @@ 5.200 \isarcmd{sorry} & : & \isartrans{proof(prove)}{proof(state) ~|~ theory} \\ 5.201 \end{matharray} 5.202 5.203 -Arbitrary goal refinement via tactics is considered harmful. Consequently the 5.204 +Arbitrary goal refinement via tactics is considered harmful. Properly, the 5.205 Isar framework admits proof methods to be invoked in two places only. 5.206 \begin{enumerate} 5.207 \item An \emph{initial} refinement step$\PROOF{m@1}$reduces a newly stated 5.208 @@ -674,8 +677,8 @@ 5.209 remaining goals. No facts are passed to$m@2$. 5.210 \end{enumerate} 5.211 5.212 -The only other proper way to affect pending goals is by$\SHOWNAME$(or 5.213 -$\THUSNAME$), which involves an explicit statement of what is to be solved. 5.214 +The only other proper way to affect pending goals is by$\SHOWNAME$, which 5.215 +involves an explicit statement of what is to be solved. 5.216 5.217 \medskip 5.218 5.219 @@ -687,11 +690,10 @@ 5.220 5.221 \medskip 5.222 5.223 -Unless given explicitly by the user, the default initial method is 5.224 -$default$'', which is usually set up to apply a single standard elimination 5.225 -or introduction rule according to the topmost symbol involved. There is no 5.226 -separate default terminal method. In any case, any goals left after that are 5.227 -solved by assumption as the very last step. 5.228 +Unless given explicitly by the user, the default initial method is $rule$'', 5.229 +which applies a single standard elimination or introduction rule according to 5.230 +the topmost symbol involved. There is no separate default terminal method. 5.231 +Any remaining goals are always solved by assumption in the very last step. 5.232 5.233 \begin{rail} 5.234 'proof' interest? meth? comment? 5.235 @@ -740,10 +742,10 @@ 5.236 5.237 \subsection{Fundamental methods and attributes}\label{sec:pure-meth-att} 5.238 5.239 -The following proof methods and attributes refer to some basic logical 5.240 -operations of Isar. Further methods and attributes are provided by several 5.241 -generic and object-logic specific tools and packages (see chapters 5.242 -\ref{ch:gen-tools} and \ref{ch:hol-tools}). 5.243 +The following proof methods and attributes refer to basic logical operations 5.244 +of Isar. Further methods and attributes are provided by several generic and 5.245 +object-logic specific tools and packages (see chapters \ref{ch:gen-tools} and 5.246 +\ref{ch:hol-tools}). 5.247 5.248 \indexisarmeth{assumption}\indexisarmeth{this}\indexisarmeth{rule}\indexisarmeth{$-$} 5.249 \indexisaratt{intro}\indexisaratt{elim}\indexisaratt{dest} 5.250 @@ -762,7 +764,7 @@ 5.251 \end{matharray} 5.252 5.253 \begin{rail} 5.254 - 'rule' thmrefs 5.255 + 'rule' thmrefs? 5.256 ; 5.257 'OF' thmrefs 5.258 ; 5.259 @@ -780,25 +782,26 @@ 5.260 remaining sub-goals by assumption. 5.261 \item [$this$] applies all of the current facts directly as rules. Recall 5.262 that $\DOT$'' (dot) abbreviates$\BY{this}$. 5.263 -\item [$rule~thms$] applies some rule given as argument in backward manner; 5.264 +\item [$rule~\vec a$] applies some rule given as argument in backward manner; 5.265 facts are used to reduce the rule before applying it to the goal. Thus 5.266$rule$without facts is plain \emph{introduction}, while with facts it 5.267 becomes \emph{elimination}. 5.268 5.269 - When omitting the$thms$argument, the$rule$method tries to pick 5.270 - appropriate rules automatically, as declared in the current context using 5.271 - the$intro$,$elim$,$dest$attributes (see below). This is the default 5.272 - behavior of$\PROOFNAME$and $\DDOT$'' (double-dot) steps (see 5.273 + When no arguments are given, the$rule$method tries to pick appropriate 5.274 + rules automatically, as declared in the current context using the$intro$, 5.275 +$elim$,$dest$attributes (see below). This is the default behavior of 5.276 +$\PROOFNAME$and $\DDOT$'' (double-dot) steps (see 5.277 \S\ref{sec:proof-steps}). 5.278 \item [$-$''] does nothing but insert the forward chaining facts as premises 5.279 into the goal. Note that command$\PROOFNAME$without any method actually 5.280 performs a single reduction step using the$rule$method; thus a plain 5.281 \emph{do-nothing} proof step would be$\PROOF{-}$rather than$\PROOFNAME$5.282 alone. 5.283 -\item [$OF~thms$] applies$thms$in parallel (cf.\ \texttt{MRS} in 5.284 - \cite[\S5]{isabelle-ref}, but note the reversed order). Some premises may 5.285 - be skipped by including $\_$'' (underscore) as argument. 5.286 -\item [$of~ts$] performs positional instantiation. The terms$ts$are 5.287 +\item [$OF~\vec a$] applies some theorem to given rules$\vec a$(in 5.288 + parallel). This corresponds to the \texttt{MRS} operator in ML 5.289 + \cite[\S5]{isabelle-ref}, but note the reversed order. Positions may be 5.290 + skipped by including $\_$'' (underscore) as argument. 5.291 +\item [$of~\vec t$] performs positional instantiation. The terms$\vec t$are 5.292 substituted for any schematic variables occurring in a theorem from left to 5.293 right; \texttt{_}'' (underscore) indicates to skip a position. Arguments 5.294 following a $concl\colon$'' specification refer to positions of the 5.295 @@ -856,7 +859,7 @@ 5.296$\Var{thesis_prop}$\indexisarvar{thesis-prop} refers to the full proposition 5.297 (which may be a rule),$\Var{thesis_concl}$\indexisarvar{thesis-concl} to its 5.298 (atomic) conclusion, and$\Var{thesis}$\indexisarvar{thesis} to its 5.299 -object-logical statement. The latter two abstract over any meta-level 5.300 +object-level statement. The latter two abstract over any meta-level 5.301 parameters. 5.302 5.303 Fact statements resulting from assumptions or finished goals are bound as 5.304 @@ -968,8 +971,8 @@ 5.305 \end{rail} 5.306 5.307 \begin{descr} 5.308 -\item [$\isarkeyword{apply}~(m)$] applies proof method$m$in an initial 5.309 - position, but retains $prove$'' mode (unlike$\PROOFNAME$). Thus 5.310 +\item [$\isarkeyword{apply}~(m)$] applies proof method$m$in initial 5.311 + position, but unlike$\PROOFNAME$it retains $proof(prove)$'' mode. Thus 5.312 consecutive method applications may be given just as in tactic scripts. In 5.313 order to complete the proof properly, any of the actual structured proof 5.314 commands (e.g.\ $\DOT$'') has to be given eventually. 5.315 @@ -992,7 +995,7 @@ 5.316 \cite{isabelle-ref}, the Isar command does not search upwards for further 5.317 branch points.} Basically, any proof command may return multiple results. 5.318 \item [$tactic~text$] produces a proof method from any ML text of type 5.319 - \texttt{tactic}. Apart from the usual ML environment, and the current 5.320 + \texttt{tactic}. Apart from the usual ML environment and the current 5.321 implicit theory context, the ML code may refer to the following locally 5.322 bound values: 5.323 %%FIXME ttbox produces too much trailing space (why?) 5.324 @@ -1014,7 +1017,7 @@ 5.325 type-checked according to the dynamic goal state, rather than the static 5.326 proof context! In particular, locally fixed variables and term 5.327 abbreviations may not be included in the term specifications. 5.328 -\item [$subgoal_tac$] emulates the ML tactic of the same name, see 5.329 +\item [$subgoal_tac~\phi$] emulates the ML tactic of the same name, see 5.330 \cite[\S3]{isabelle-ref}. Syntactically, the given proposition is handled 5.331 as the instantiations in$res_inst_tac$etc. 5.332 5.333 @@ -1045,15 +1048,9 @@ 5.334 macros can be easily adapted to print something like $\dots$'' instead of an 5.335 $\OOPS$'' keyword. 5.336 5.337 -\medskip The$\OOPS$command is undoable, in contrast to$\isarkeyword{kill}$5.338 -(see \S\ref{sec:history}). The effect is to get back to the theory 5.339 -\emph{before} the opening of the proof. 5.340 - 5.341 -%FIXME remove 5.342 -% \begin{descr} 5.343 -% \item [$\isarkeyword{oops}$] dismisses the current proof, leaving the text in 5.344 -% as properly processed. 5.345 -% \end{descr} 5.346 +\medskip The$\OOPS$command is undoable, unlike$\isarkeyword{kill}$(see 5.347 +\S\ref{sec:history}). The effect is to get back to the theory \emph{before} 5.348 +the opening of the proof. 5.349 5.350 5.351 \section{Other commands} 5.352 @@ -1101,11 +1098,11 @@ 5.353 current facts and goals. The optional argument$n$affects the implicit 5.354 limit of goals to be displayed, which is initially 10. Omitting the limit 5.355 leaves the value unchanged. 5.356 -\item [$\isarkeyword{thm}~thms$] retrieves lists of theorems from the current 5.357 - theory or proof context. Note that any attributes included in the theorem 5.358 +\item [$\isarkeyword{thm}~\vec a$] retrieves theorems from the current theory 5.359 + or proof context. Note that any attributes included in the theorem 5.360 specifications are applied to a temporary context derived from the current 5.361 - theory or proof; the result is discarded, i.e.\ attributes involved in 5.362 -$thms$do not have any permanent effect. 5.363 + theory or proof; the result is discarded, i.e.\ attributes involved in$\vec
5.364 +  a$do not have any permanent effect. 5.365 \item [$\isarkeyword{term}~t$,$\isarkeyword{prop}~\phi$] read, type-check and 5.366 print terms or propositions according to the current theory or proof 5.367 context; the inferred type of$t$is output as well. Note that these 5.368 @@ -1124,17 +1121,14 @@ 5.369 Thus the output behavior may be modified according particular print mode 5.370 features. 5.371 5.372 -\medskip 5.373 - 5.374 For example,$\isarkeyword{pr}~(latex~xsymbols~symbols)$would print the 5.375 current proof state with mathematical symbols and special characters 5.376 represented in {\LaTeX} source, according to the Isabelle style 5.377 -\cite{isabelle-sys}. The resulting text can be directly pasted into and 5.378 -\verb,\begin{isabelle},\dots\verb,\end{isabelle}, environment. 5.379 - 5.380 -Note that$\isarkeyword{pr}~(latex)$is sufficient to achieve the same output, 5.381 -if the current Isabelle session has the other modes already activated, say due 5.382 -to some particular user interface configuration such as Proof~General 5.383 +\cite{isabelle-sys}. The resulting text can be directly pasted into a 5.384 +\verb,\begin{isabelle},\dots\verb,\end{isabelle}, environment. Note that 5.385 +$\isarkeyword{pr}~(latex)$is sufficient to achieve the same output, if the 5.386 +current Isabelle session has the other modes already activated, say due to 5.387 +some particular user interface configuration such as Proof~General 5.388 \cite{proofgeneral,Aspinall:TACAS:2000} with X-Symbol mode \cite{x-symbol}. 5.389 5.390 5.391 @@ -1157,9 +1151,9 @@ 5.392 undoable. 5.393 5.394 \begin{warn} 5.395 - History commands may not be used with user interfaces such as Proof~General 5.396 - \cite{proofgeneral,Aspinall:TACAS:2000}, which takes care of stepping forth 5.397 - and back itself. Interfering with manual$\isarkeyword{undo}$, 5.398 + History commands should never be used with user interfaces such as 5.399 + Proof~General \cite{proofgeneral,Aspinall:TACAS:2000}, which takes care of 5.400 + stepping forth and back itself. Interfering by manual$\isarkeyword{undo}$, 5.401$\isarkeyword{redo}$, or even$\isarkeyword{kill}$commands would quickly 5.402 result in utter confusion. 5.403 \end{warn}   6.1 --- a/doc-src/IsarRef/refcard.tex Tue Mar 21 15:32:08 2000 +0100 6.2 +++ b/doc-src/IsarRef/refcard.tex Tue Mar 21 17:32:43 2000 +0100 6.3 @@ -58,10 +58,14 @@ 6.4 \ALSO@0 & \approx & \NOTE{calculation}{this} \\ 6.5 \ALSO@{n+1} & \approx & \NOTE{calculation}{trans~[OF~calculation~this]} \\ 6.6 \FINALLY & \approx & \ALSO~\FROM{calculation} \\[0.5ex] 6.7 - \PRESUME{a}{\vec\phi} & \approx & \ASSUME{a}{\vec\phi}~~\text{(permissive assumption)} \\ 6.8 - \DEF{a}{x \equiv t} & \approx & \FIX{x}~\ASSUME{a}{x \equiv t}~~\text{(definitional assumption)} \\ 6.9 - \OBTAIN{\vec x}{a}{\vec\phi} & \approx & \dots~\FIX{\vec x}~\ASSUME{a}{\vec\phi}~~\text{(generalized existence)} \\ 6.10 - \CASE{c} & \approx & \FIX{\vec x}~\ASSUME{c}{\vec\phi}~~\text{(named context)} \\[0.5ex] 6.11 + \PRESUME{a}{\vec\phi} & \approx & \ASSUME{a}{\vec\phi} \\ 6.12 +% & & \text{(permissive assumption)} \\ 6.13 + \DEF{a}{x \equiv t} & \approx & \FIX{x}~\ASSUME{a}{x \equiv t} \\ 6.14 +% & & \text{(definitional assumption)} \\ 6.15 + \OBTAIN{\vec x}{a}{\vec\phi} & \approx & \dots~\FIX{\vec x}~\ASSUME{a}{\vec\phi} \\ 6.16 +% & & \text{(generalized existence)} \\ 6.17 + \CASE{c} & \approx & \FIX{\vec x}~\ASSUME{c}{\vec\phi} \\ 6.18 +% & & \text{(named context)} \\[0.5ex] 6.19 \SORRY & \approx & \BY{cheating} \\ 6.20 \end{matharray} 6.21 6.22 @@ -90,8 +94,8 @@ 6.23$rule~\vec a$& apply some rule \\ 6.24$rule$& apply standard rule (default for$\PROOFNAME$) \\ 6.25$contradiction$& apply$\neg{}$elimination rule (any order) \\ 6.26 -$cases~x$& case analysis (provides cases) \\ 6.27 -$induct~x$& proof by induction (provides cases) \\[2ex] 6.28 +$cases~t$& case analysis (provides cases) \\ 6.29 +$induct~\vec x$& proof by induction (provides cases) \\[2ex] 6.30 6.31 \multicolumn{2}{l}{\textbf{Repeated steps (inserting facts)}} \\[0.5ex] 6.32$-$& \text{no rules} \\ 6.33 @@ -130,17 +134,17 @@ 6.34 6.35 \section{Emulating tactic scripts} 6.36 6.37 -\subsection{Proof commands} 6.38 +\subsection{Commands} 6.39 6.40 \begin{tabular}{ll} 6.41 -$\isarkeyword{apply}~(m)$& apply proof method (at initial position) \\ 6.42 -$\isarkeyword{apply_end}~(m)$& apply proof method (near terminal position) \\ 6.43 +$\isarkeyword{apply}~(m)$& apply proof method at initial position \\ 6.44 +$\isarkeyword{apply_end}~(m)$& apply proof method near terminal position \\ 6.45$\isarkeyword{defer}~n$& move subgoal to end \\ 6.46$\isarkeyword{prefer}~n$& move subgoal to beginning \\ 6.47$\isarkeyword{back}$& backtrack last command \\ 6.48 \end{tabular} 6.49 6.50 -\subsection{Proof methods} 6.51 +\subsection{Methods} 6.52 6.53 \begin{tabular}{ll} 6.54$tactic~text$& method from ML tactic \\ 6.55 @@ -150,7 +154,7 @@ 6.56$forw_inst_tac~insts$& forward-resolution with instantiation \\ 6.57$subgoal_tac~\phi$& insert new claim \\ 6.58$case_tac~t$& datatype exhaustion \\ 6.59 -$induct_tac~xs$& datatype induction \\ 6.60 +$induct_tac~\vec x\$ & datatype induction \\
6.61  \end{tabular}
6.62
6.63