7046
|
1 |
|
|
2 |
\chapter{Introduction}
|
|
3 |
|
7167
|
4 |
\section{Quick start}
|
|
5 |
|
7175
|
6 |
Isar is already part of Isabelle (as of version Isabelle99, or later). The
|
|
7 |
\texttt{isabelle} binary provides option \texttt{-I} to run the Isar
|
|
8 |
interaction loop at startup, rather than the plain ML top-level. Thus the
|
|
9 |
quickest way to do anything with Isabelle/Isar is as follows:
|
|
10 |
\begin{ttbox}
|
|
11 |
isabelle -I HOL\medskip
|
|
12 |
\out{> Welcome to Isabelle/HOL (Isabelle99)}\medskip
|
|
13 |
theory Foo = Main:
|
|
14 |
constdefs foo :: nat "foo == 1"
|
|
15 |
lemma "0 < foo" by (simp add: foo_def)
|
|
16 |
end
|
|
17 |
\end{ttbox}
|
|
18 |
|
|
19 |
Plain TTY-based interaction like this used to be quite feasible with
|
|
20 |
traditional tactic based theorem proving, but developing Isar documents
|
|
21 |
demands some better user-interface support.
|
|
22 |
\emph{ProofGeneral}\index{ProofGeneral} of LFCS Edinburgh \cite{proofgeneral}
|
|
23 |
offers a generic Emacs-based environment for interactive theorem provers that
|
|
24 |
does all the cut-and-paste and forward-backward walk through the document in a
|
|
25 |
very neat way. Note that in Isabelle/Isar, the current position within a
|
|
26 |
partial proof document is more informative than the actual proof state. Thus
|
|
27 |
the ProofGeneral/isar interface provides the canonical working environment for
|
|
28 |
Isabelle/Isar, both for getting acquainted (e.g.\ by replaying existing Isar
|
|
29 |
documents) and serious production work.
|
|
30 |
|
|
31 |
\medskip
|
7167
|
32 |
|
7175
|
33 |
The easiest way to use ProofGeneral/isar is to make it the default Isabelle
|
|
34 |
user interface. Just say something like this in your Isabelle settings file
|
|
35 |
(cf.\ \cite{isabelle-sys}):
|
|
36 |
\begin{ttbox}
|
|
37 |
ISABELLE_INTERFACE=\$ISABELLE_HOME/contrib/ProofGeneral/isar/interface
|
|
38 |
PROOFGENERAL_OPTIONS=""
|
|
39 |
\end{ttbox}
|
|
40 |
You may have to change \texttt{\$ISABELLE_HOME/contrib/ProofGeneral} to the
|
|
41 |
actual installation directory of ProofGeneral. Now the capital
|
|
42 |
\texttt{Isabelle} binary refers to the ProofGeneral/isar interface. It's
|
|
43 |
usage is as follows:
|
|
44 |
\begin{ttbox}
|
|
45 |
Usage: interface [OPTIONS] [FILES ...]
|
|
46 |
|
|
47 |
Options are:
|
|
48 |
-l NAME logic image name (default $ISABELLE_LOGIC=HOL)
|
|
49 |
-p NAME Emacs program name (default xemacs)
|
|
50 |
-u BOOL use .emacs file (default false)
|
|
51 |
-w BOOL use window system (default true)
|
|
52 |
|
|
53 |
Starts ProofGeneral for Isabelle/Isar with proof documents FILES
|
|
54 |
(default Scratch.thy).
|
|
55 |
\end{ttbox}
|
|
56 |
The defaults for these options may be changed via the
|
|
57 |
\texttt{PROOFGENERAL_OPTIONS} setting. For example, GNU Emacs with loading of
|
|
58 |
the startup file enabled may be configured as follows:\footnote{The interface
|
|
59 |
disables \texttt{.emacs} by default to ensure successful startup despite any
|
|
60 |
strange commands that tend to occur there.}
|
|
61 |
\begin{ttbox}
|
|
62 |
PROOFGENERAL_OPTIONS="-p emacs -u true"
|
|
63 |
\end{ttbox}
|
|
64 |
|
|
65 |
With the proper Isabelle interface setup, Isar documents may now be edited by
|
|
66 |
visiting appropriate theory files, e.g.\
|
|
67 |
\begin{ttbox}
|
|
68 |
Isabelle \({\langle}isabellehome{\rangle}\)/src/HOL/Isar_examples/BasicLogic.thy
|
|
69 |
\end{ttbox}
|
|
70 |
Users of XEmacs may note the toolbar for navigating forward and backward
|
|
71 |
through the text. Consult the ProofGeneral documentation for further basic
|
|
72 |
commands, such as \texttt{c-c return} or \texttt{c-c u}.
|
|
73 |
|
7167
|
74 |
|
|
75 |
\section{How to write Isar proofs anyway?}
|
|
76 |
|
7175
|
77 |
FIXME
|
|
78 |
|
7167
|
79 |
|
7046
|
80 |
%%% Local Variables:
|
|
81 |
%%% mode: latex
|
|
82 |
%%% TeX-master: "isar-ref"
|
|
83 |
%%% End:
|