| author | Christian Urban <urbanc@in.tum.de> |
| Tue, 27 Jan 2009 17:50:08 +0000 | |
| changeset 84 | 624279d187e1 |
| parent 81 | 8fda6b452f28 |
| child 85 | b02904872d6b |
| permissions | -rw-r--r-- |
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
1 |
theory Intro |
| 75 | 2 |
imports Base |
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
3 |
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
4 |
begin |
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
5 |
|
|
64
9a6e5e0c4906
deleted old files and added code to give a special tag to the command ML
Christian Urban <urbanc@in.tum.de>
parents:
60
diff
changeset
|
6 |
|
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
7 |
chapter {* Introduction *}
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
8 |
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
9 |
text {*
|
| 66 | 10 |
The purpose of this Cookbook is to guide the reader through the first steps |
| 75 | 11 |
of Isabelle programming, and to explain tricks of the trade. The code |
| 66 | 12 |
provided in the Cookbook is as far as possible checked against recent |
13 |
versions of Isabelle. If something does not work, then please let us |
|
| 84 | 14 |
know. If you have comments, criticism or like to add to the Cookbook, |
| 81 | 15 |
feel free---you are most welcome! |
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
16 |
*} |
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
17 |
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
18 |
section {* Intended Audience and Prior Knowledge *}
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
19 |
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
20 |
text {*
|
| 75 | 21 |
This Cookbook targets readers who already know how to use Isabelle for |
22 |
writing theories and proofs. We also assume that readers are familiar with |
|
23 |
the functional programming language ML, the language in which most of |
|
24 |
Isabelle is implemented. If you are unfamiliar with either of these two |
|
25 |
subjects, you should first work through the Isabelle/HOL tutorial |
|
26 |
\cite{isa-tutorial} or Paulson's book on ML \cite{paulson-ml2}.
|
|
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
27 |
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
28 |
*} |
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
29 |
|
|
5
e91f54791e14
minor modifiations to the Intro and FirstSteps chapters
Christian Urban <urbanc@in.tum.de>
parents:
2
diff
changeset
|
30 |
section {* Existing Documentation *}
|
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
31 |
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
32 |
text {*
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
33 |
|
|
43
02f76f1b6e7b
added positions to anti-quotations; removed old antiquotation_setup; tuned the text a bit
Christian Urban <urbanc@in.tum.de>
parents:
42
diff
changeset
|
34 |
The following documentation about Isabelle programming already exists (and is |
|
02f76f1b6e7b
added positions to anti-quotations; removed old antiquotation_setup; tuned the text a bit
Christian Urban <urbanc@in.tum.de>
parents:
42
diff
changeset
|
35 |
part of the distribution of Isabelle): |
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
36 |
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
37 |
\begin{description}
|
|
5
e91f54791e14
minor modifiations to the Intro and FirstSteps chapters
Christian Urban <urbanc@in.tum.de>
parents:
2
diff
changeset
|
38 |
\item[The Implementation Manual] describes Isabelle |
|
44
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
43
diff
changeset
|
39 |
from a high-level perspective, documenting both the underlying |
| 6 | 40 |
concepts and some of the interfaces. |
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
41 |
|
|
5
e91f54791e14
minor modifiations to the Intro and FirstSteps chapters
Christian Urban <urbanc@in.tum.de>
parents:
2
diff
changeset
|
42 |
\item[The Isabelle Reference Manual] is an older document that used |
|
44
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
43
diff
changeset
|
43 |
to be the main reference of Isabelle at a time when all proof scripts |
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
43
diff
changeset
|
44 |
were written on the ML level. Many parts of this manual are outdated |
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
43
diff
changeset
|
45 |
now, but some parts, particularly the chapters on tactics, are still |
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
43
diff
changeset
|
46 |
useful. |
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
43
diff
changeset
|
47 |
|
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
43
diff
changeset
|
48 |
\item[The Isar Reference Manual] is also an older document that provides |
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
43
diff
changeset
|
49 |
material about Isar and its implementation. Some material in it |
|
dee4b3e66dfe
added a readme chapter for prospective authors; added commands for referring to the Isar Reference Manual
Christian Urban <urbanc@in.tum.de>
parents:
43
diff
changeset
|
50 |
is still useful. |
|
5
e91f54791e14
minor modifiations to the Intro and FirstSteps chapters
Christian Urban <urbanc@in.tum.de>
parents:
2
diff
changeset
|
51 |
\end{description}
|
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
52 |
|
|
12
2f1736cb8f26
various changes by Alex and Christian
Christian Urban <urbanc@in.tum.de>
parents:
11
diff
changeset
|
53 |
Then of course there is: |
|
5
e91f54791e14
minor modifiations to the Intro and FirstSteps chapters
Christian Urban <urbanc@in.tum.de>
parents:
2
diff
changeset
|
54 |
|
|
e91f54791e14
minor modifiations to the Intro and FirstSteps chapters
Christian Urban <urbanc@in.tum.de>
parents:
2
diff
changeset
|
55 |
\begin{description}
|
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
56 |
\item[The code] is of course the ultimate reference for how |
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
57 |
things really work. Therefore you should not hesitate to look at the |
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
58 |
way things are actually implemented. More importantly, it is often |
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
59 |
good to look at code that does similar things as you want to do, to |
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
60 |
learn from other people's code. |
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
61 |
\end{description}
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
62 |
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
63 |
*} |
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
64 |
|
| 81 | 65 |
section {* Typographic Conventions *}
|
|
68
e7519207c2b7
added more to the "new command section" and tuning
Christian Urban <urbanc@in.tum.de>
parents:
66
diff
changeset
|
66 |
|
|
e7519207c2b7
added more to the "new command section" and tuning
Christian Urban <urbanc@in.tum.de>
parents:
66
diff
changeset
|
67 |
text {*
|
| 75 | 68 |
|
| 81 | 69 |
All ML-code in this Cookbook is typeset in highlighed boxes, like the following |
| 80 | 70 |
ML-expression. |
| 75 | 71 |
|
72 |
\begin{isabelle}
|
|
73 |
\begin{graybox}
|
|
74 |
\isa{\isacommand{ML}
|
|
75 |
\isacharverbatimopen\isanewline |
|
76 |
\hspace{5mm}@{ML "3 + 4"}\isanewline
|
|
77 |
\isacharverbatimclose} |
|
78 |
\end{graybox}
|
|
79 |
\end{isabelle}
|
|
80 |
||
| 81 | 81 |
This corresponds to how code can be processed inside the interactive |
82 |
environment of Isabelle. It is therefore easy to experiment with the code |
|
83 |
(which by the way is highly recommended). However, for better readability we |
|
84 |
will drop the enclosing \isacommand{ML} \isa{\isacharverbatimopen \ldots
|
|
| 80 | 85 |
\isacharverbatimclose} and just write |
| 75 | 86 |
|
| 81 | 87 |
|
| 75 | 88 |
@{ML [display,gray] "3 + 4"}
|
89 |
||
| 81 | 90 |
for the code above. Whenever appropriate we also show the response the code |
91 |
generates when evaluated. This response is prefixed with a |
|
92 |
@{text [quotes] ">"} like
|
|
| 75 | 93 |
|
94 |
@{ML_response [display,gray] "3 + 4" "7"}
|
|
95 |
||
| 81 | 96 |
The usual Isabelle commands are written in bold, for example \isacommand{lemma},
|
| 80 | 97 |
\isacommand{foobar} and so on. We use @{text "$"} to indicate that
|
98 |
a command needs to be run on the Unix-command line, for example |
|
| 75 | 99 |
|
100 |
@{text [display] "$ ls -la"}
|
|
101 |
||
| 81 | 102 |
Pointers to further information and Isabelle files are given |
| 80 | 103 |
as follows: |
| 75 | 104 |
|
105 |
\begin{readmore}
|
|
| 80 | 106 |
Further information or pointer to file. |
| 75 | 107 |
\end{readmore}
|
108 |
||
|
68
e7519207c2b7
added more to the "new command section" and tuning
Christian Urban <urbanc@in.tum.de>
parents:
66
diff
changeset
|
109 |
*} |
|
e7519207c2b7
added more to the "new command section" and tuning
Christian Urban <urbanc@in.tum.de>
parents:
66
diff
changeset
|
110 |
|
|
2
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
111 |
|
|
978a3c2ed7ce
split the document into smaller pieces;
Christian Urban <urbanc@in.tum.de>
parents:
diff
changeset
|
112 |
end |