doc-src/TutorialI/ToyList/ToyList.thy
author wenzelm
Sat, 24 May 2008 22:04:57 +0200
changeset 26990 a91f7741967a
parent 26729 43a72d892594
child 27015 f8537d69f514
permissions -rw-r--r--
added local_theory command wrappers;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15136
1275417e3930 Adapted text to new theory header syntax.
nipkow
parents: 13868
diff changeset
     1
theory ToyList
26729
43a72d892594 dropped theory PreList
haftmann
parents: 25342
diff changeset
     2
imports Datatype
15136
1275417e3930 Adapted text to new theory header syntax.
nipkow
parents: 13868
diff changeset
     3
begin
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
     4
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
     5
text{*\noindent
26729
43a72d892594 dropped theory PreList
haftmann
parents: 25342
diff changeset
     6
HOL already has a predefined theory of lists called @{text List} ---
43a72d892594 dropped theory PreList
haftmann
parents: 25342
diff changeset
     7
@{text ToyList} is merely a small fragment of it chosen as an example. In
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
     8
contrast to what is recommended in \S\ref{sec:Basic:Theories},
26729
43a72d892594 dropped theory PreList
haftmann
parents: 25342
diff changeset
     9
@{text ToyList} is not based on @{text Main} but on @{text Datatype}, a
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    10
theory that contains pretty much everything but lists, thus avoiding
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    11
ambiguities caused by defining lists twice.
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    12
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    13
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    14
datatype 'a list = Nil                          ("[]")
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    15
                 | Cons 'a "'a list"            (infixr "#" 65);
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    16
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    17
text{*\noindent
12327
5a4d78204492 *** empty log message ***
nipkow
parents: 11457
diff changeset
    18
The datatype\index{datatype@\isacommand {datatype} (command)}
5a4d78204492 *** empty log message ***
nipkow
parents: 11457
diff changeset
    19
\tydx{list} introduces two
11428
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
    20
constructors \cdx{Nil} and \cdx{Cons}, the
9541
d17c0b34d5c8 *** empty log message ***
nipkow
parents: 9494
diff changeset
    21
empty~list and the operator that adds an element to the front of a list. For
9792
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
    22
example, the term \isa{Cons True (Cons False Nil)} is a value of
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
    23
type @{typ"bool list"}, namely the list with the elements @{term"True"} and
11450
1b02a6c4032f tweaks and indexing
paulson
parents: 11428
diff changeset
    24
@{term"False"}. Because this notation quickly becomes unwieldy, the
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    25
datatype declaration is annotated with an alternative syntax: instead of
9792
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
    26
@{term[source]Nil} and \isa{Cons x xs} we can write
15364
0c3891c3528f *** empty log message ***
nipkow
parents: 15141
diff changeset
    27
@{term"[]"}\index{$HOL2list@\isa{[]}|bold} and
0c3891c3528f *** empty log message ***
nipkow
parents: 15141
diff changeset
    28
@{term"x # xs"}\index{$HOL2list@\isa{\#}|bold}. In fact, this
11450
1b02a6c4032f tweaks and indexing
paulson
parents: 11428
diff changeset
    29
alternative syntax is the familiar one.  Thus the list \isa{Cons True
9541
d17c0b34d5c8 *** empty log message ***
nipkow
parents: 9494
diff changeset
    30
(Cons False Nil)} becomes @{term"True # False # []"}. The annotation
11428
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
    31
\isacommand{infixr}\index{infixr@\isacommand{infixr} (annotation)} 
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
    32
means that @{text"#"} associates to
11450
1b02a6c4032f tweaks and indexing
paulson
parents: 11428
diff changeset
    33
the right: the term @{term"x # y # z"} is read as @{text"x # (y # z)"}
9792
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
    34
and not as @{text"(x # y) # z"}.
10971
6852682eaf16 *** empty log message ***
nipkow
parents: 10885
diff changeset
    35
The @{text 65} is the priority of the infix @{text"#"}.
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    36
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    37
\begin{warn}
13191
05a9929ee10e *** empty log message ***
nipkow
parents: 12631
diff changeset
    38
  Syntax annotations can be powerful, but they are difficult to master and 
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
    39
  are never necessary.  You
9792
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
    40
  could drop them from theory @{text"ToyList"} and go back to the identifiers
10795
9e888d60d3e5 minor edits to Chapters 1-3
paulson
parents: 10790
diff changeset
    41
  @{term[source]Nil} and @{term[source]Cons}.
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
    42
  Novices should avoid using
10795
9e888d60d3e5 minor edits to Chapters 1-3
paulson
parents: 10790
diff changeset
    43
  syntax annotations in their own theories.
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    44
\end{warn}
11428
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
    45
Next, two functions @{text"app"} and \cdx{rev} are declared:
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    46
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    47
10236
7626cb4e1407 *** empty log message ***
nipkow
parents: 10171
diff changeset
    48
consts app :: "'a list \<Rightarrow> 'a list \<Rightarrow> 'a list"   (infixr "@" 65)
7626cb4e1407 *** empty log message ***
nipkow
parents: 10171
diff changeset
    49
       rev :: "'a list \<Rightarrow> 'a list";
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    50
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    51
text{*
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    52
\noindent
10971
6852682eaf16 *** empty log message ***
nipkow
parents: 10885
diff changeset
    53
In contrast to many functional programming languages,
6852682eaf16 *** empty log message ***
nipkow
parents: 10885
diff changeset
    54
Isabelle insists on explicit declarations of all functions
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
    55
(keyword \commdx{consts}).  Apart from the declaration-before-use
10971
6852682eaf16 *** empty log message ***
nipkow
parents: 10885
diff changeset
    56
restriction, the order of items in a theory file is unconstrained. Function
10790
520dd8696927 *** empty log message ***
nipkow
parents: 10654
diff changeset
    57
@{text"app"} is annotated with concrete syntax too. Instead of the
520dd8696927 *** empty log message ***
nipkow
parents: 10654
diff changeset
    58
prefix syntax @{text"app xs ys"} the infix
15364
0c3891c3528f *** empty log message ***
nipkow
parents: 15141
diff changeset
    59
@{term"xs @ ys"}\index{$HOL2list@\isa{\at}|bold} becomes the preferred
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    60
form. Both functions are defined recursively:
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    61
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    62
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    63
primrec
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    64
"[] @ ys       = ys"
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    65
"(x # xs) @ ys = x # (xs @ ys)";
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    66
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    67
primrec
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    68
"rev []        = []"
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    69
"rev (x # xs)  = (rev xs) @ (x # [])";
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    70
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    71
text{*
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
    72
\noindent\index{*rev (constant)|(}\index{append function|(}
10790
520dd8696927 *** empty log message ***
nipkow
parents: 10654
diff changeset
    73
The equations for @{text"app"} and @{term"rev"} hardly need comments:
520dd8696927 *** empty log message ***
nipkow
parents: 10654
diff changeset
    74
@{text"app"} appends two lists and @{term"rev"} reverses a list.  The
11428
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
    75
keyword \commdx{primrec} indicates that the recursion is
10790
520dd8696927 *** empty log message ***
nipkow
parents: 10654
diff changeset
    76
of a particularly primitive kind where each recursive call peels off a datatype
8771
026f37a86ea7 *** empty log message ***
nipkow
parents: 8745
diff changeset
    77
constructor from one of the arguments.  Thus the
10654
458068404143 *** empty log message ***
nipkow
parents: 10362
diff changeset
    78
recursion always terminates, i.e.\ the function is \textbf{total}.
11428
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
    79
\index{functions!total}
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    80
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    81
The termination requirement is absolutely essential in HOL, a logic of total
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    82
functions. If we were to drop it, inconsistencies would quickly arise: the
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    83
``definition'' $f(n) = f(n)+1$ immediately leads to $0 = 1$ by subtracting
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    84
$f(n)$ on both sides.
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    85
% However, this is a subtle issue that we cannot discuss here further.
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    86
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    87
\begin{warn}
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
    88
  As we have indicated, the requirement for total functions is an essential characteristic of HOL\@. It is only
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    89
  because of totality that reasoning in HOL is comparatively easy.  More
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
    90
  generally, the philosophy in HOL is to refrain from asserting arbitrary axioms (such as
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    91
  function definitions whose totality has not been proved) because they
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    92
  quickly lead to inconsistencies. Instead, fixed constructs for introducing
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    93
  types and functions are offered (such as \isacommand{datatype} and
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    94
  \isacommand{primrec}) which are guaranteed to preserve consistency.
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    95
\end{warn}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    96
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
    97
\index{syntax}%
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
    98
A remark about syntax.  The textual definition of a theory follows a fixed
10971
6852682eaf16 *** empty log message ***
nipkow
parents: 10885
diff changeset
    99
syntax with keywords like \isacommand{datatype} and \isacommand{end}.
6852682eaf16 *** empty log message ***
nipkow
parents: 10885
diff changeset
   100
% (see Fig.~\ref{fig:keywords} in Appendix~\ref{sec:Appendix} for a full list).
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   101
Embedded in this syntax are the types and formulae of HOL, whose syntax is
12631
wenzelm
parents: 12332
diff changeset
   102
extensible (see \S\ref{sec:concrete-syntax}), e.g.\ by new user-defined infix operators.
10971
6852682eaf16 *** empty log message ***
nipkow
parents: 10885
diff changeset
   103
To distinguish the two levels, everything
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   104
HOL-specific (terms and types) should be enclosed in
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   105
\texttt{"}\dots\texttt{"}. 
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   106
To lessen this burden, quotation marks around a single identifier can be
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   107
dropped, unless the identifier happens to be a keyword, as in
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   108
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   109
10236
7626cb4e1407 *** empty log message ***
nipkow
parents: 10171
diff changeset
   110
consts "end" :: "'a list \<Rightarrow> 'a"
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   111
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   112
text{*\noindent
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   113
When Isabelle prints a syntax error message, it refers to the HOL syntax as
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   114
the \textbf{inner syntax} and the enclosing theory language as the \textbf{outer syntax}.
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   115
25342
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   116
\section{Evaluation}
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   117
\index{evaluation}
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   118
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   119
Assuming you have processed the declarations and definitions of
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   120
\texttt{ToyList} presented so far, you may want to test your
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   121
functions by running them. For example, what is the value of
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   122
@{term"rev(True#False#[])"}? Command
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   123
*}
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   124
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   125
value "rev (True # False # [])"
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   126
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   127
text{* \noindent yields the correct result @{term"False # True # []"}.
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   128
But we can go beyond mere functional programming and evaluate terms with
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   129
variables in them, executing functions symbolically: *}
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   130
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   131
normal_form "rev (a # b # c # [])"
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   132
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   133
text{*\noindent yields @{term"c # b # a # []"}.
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   134
Command \commdx{normal\protect\_form} works for arbitrary terms
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   135
but can be slower than command \commdx{value},
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   136
which is restricted to variable-free terms and executable functions.
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   137
To appreciate the subtleties of evaluating terms with variables,
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   138
try this one:
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   139
*}
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   140
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   141
normal_form "rev (a # b # c # xs)"
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   142
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   143
text{*
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   144
\noindent Chances are that the result will at first puzzle you.
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   145
10885
90695f46440b lcp's pass over the book, chapters 1-8
paulson
parents: 10795
diff changeset
   146
\section{An Introductory Proof}
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   147
\label{sec:intro-proof}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   148
25342
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   149
Having convinced ourselves (as well as one can by testing) that our
68577e621ea8 added evaluation
nipkow
parents: 16360
diff changeset
   150
definitions capture our intentions, we are ready to prove a few simple
16360
nipkow
parents: 15364
diff changeset
   151
theorems. This will illustrate not just the basic proof commands but
nipkow
parents: 15364
diff changeset
   152
also the typical proof process.
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   153
11457
279da0358aa9 additional revisions to chapters 1, 2
paulson
parents: 11456
diff changeset
   154
\subsubsection*{Main Goal.}
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   155
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   156
Our goal is to show that reversing a list twice produces the original
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   157
list.
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   158
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   159
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   160
theorem rev_rev [simp]: "rev(rev xs) = xs";
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   161
11428
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
   162
txt{*\index{theorem@\isacommand {theorem} (command)|bold}%
10795
9e888d60d3e5 minor edits to Chapters 1-3
paulson
parents: 10790
diff changeset
   163
\noindent
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   164
This \isacommand{theorem} command does several things:
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   165
\begin{itemize}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   166
\item
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   167
It establishes a new theorem to be proved, namely @{prop"rev(rev xs) = xs"}.
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   168
\item
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   169
It gives that theorem the name @{text"rev_rev"}, for later reference.
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   170
\item
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   171
It tells Isabelle (via the bracketed attribute \attrdx{simp}) to take the eventual theorem as a simplification rule: future proofs involving
9792
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   172
simplification will replace occurrences of @{term"rev(rev xs)"} by
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   173
@{term"xs"}.
11457
279da0358aa9 additional revisions to chapters 1, 2
paulson
parents: 11456
diff changeset
   174
\end{itemize}
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   175
The name and the simplification attribute are optional.
12332
aea72a834c85 *** empty log message ***
nipkow
parents: 12327
diff changeset
   176
Isabelle's response is to print the initial proof state consisting
aea72a834c85 *** empty log message ***
nipkow
parents: 12327
diff changeset
   177
of some header information (like how many subgoals there are) followed by
13868
01b516b64233 *** empty log message ***
nipkow
parents: 13191
diff changeset
   178
@{subgoals[display,indent=0]}
12332
aea72a834c85 *** empty log message ***
nipkow
parents: 12327
diff changeset
   179
For compactness reasons we omit the header in this tutorial.
aea72a834c85 *** empty log message ***
nipkow
parents: 12327
diff changeset
   180
Until we have finished a proof, the \rmindex{proof state} proper
aea72a834c85 *** empty log message ***
nipkow
parents: 12327
diff changeset
   181
always looks like this:
9723
a977245dfc8a *** empty log message ***
nipkow
parents: 9541
diff changeset
   182
\begin{isabelle}
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   183
~1.~$G\sb{1}$\isanewline
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   184
~~\vdots~~\isanewline
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   185
~$n$.~$G\sb{n}$
9723
a977245dfc8a *** empty log message ***
nipkow
parents: 9541
diff changeset
   186
\end{isabelle}
13868
01b516b64233 *** empty log message ***
nipkow
parents: 13191
diff changeset
   187
The numbered lines contain the subgoals $G\sb{1}$, \dots, $G\sb{n}$
01b516b64233 *** empty log message ***
nipkow
parents: 13191
diff changeset
   188
that we need to prove to establish the main goal.\index{subgoals}
01b516b64233 *** empty log message ***
nipkow
parents: 13191
diff changeset
   189
Initially there is only one subgoal, which is identical with the
01b516b64233 *** empty log message ***
nipkow
parents: 13191
diff changeset
   190
main goal. (If you always want to see the main goal as well,
01b516b64233 *** empty log message ***
nipkow
parents: 13191
diff changeset
   191
set the flag \isa{Proof.show_main_goal}\index{*show_main_goal (flag)}
01b516b64233 *** empty log message ***
nipkow
parents: 13191
diff changeset
   192
--- this flag used to be set by default.)
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   193
9792
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   194
Let us now get back to @{prop"rev(rev xs) = xs"}. Properties of recursively
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   195
defined functions are best established by induction. In this case there is
11428
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
   196
nothing obvious except induction on @{term"xs"}:
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   197
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   198
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   199
apply(induct_tac xs);
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   200
11428
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
   201
txt{*\noindent\index{*induct_tac (method)}%
9792
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   202
This tells Isabelle to perform induction on variable @{term"xs"}. The suffix
11428
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
   203
@{term"tac"} stands for \textbf{tactic},\index{tactics}
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
   204
a synonym for ``theorem proving function''.
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   205
By default, induction acts on the first subgoal. The new proof state contains
9792
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   206
two subgoals, namely the base case (@{term[source]Nil}) and the induction step
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   207
(@{term[source]Cons}):
10971
6852682eaf16 *** empty log message ***
nipkow
parents: 10885
diff changeset
   208
@{subgoals[display,indent=0,margin=65]}
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   209
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   210
The induction step is an example of the general format of a subgoal:\index{subgoals}
9723
a977245dfc8a *** empty log message ***
nipkow
parents: 9541
diff changeset
   211
\begin{isabelle}
12327
5a4d78204492 *** empty log message ***
nipkow
parents: 11457
diff changeset
   212
~$i$.~{\isasymAnd}$x\sb{1}$~\dots$x\sb{n}$.~{\it assumptions}~{\isasymLongrightarrow}~{\it conclusion}
10328
bf33cbd76c05 *** empty log message ***
nipkow
parents: 10302
diff changeset
   213
\end{isabelle}\index{$IsaAnd@\isasymAnd|bold}
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   214
The prefix of bound variables \isasymAnd$x\sb{1}$~\dots~$x\sb{n}$ can be
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   215
ignored most of the time, or simply treated as a list of variables local to
10302
74be38751d06 fixed crossref
paulson
parents: 10236
diff changeset
   216
this subgoal. Their deeper significance is explained in Chapter~\ref{chap:rules}.
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   217
The {\it assumptions}\index{assumptions!of subgoal}
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   218
are the local assumptions for this subgoal and {\it
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   219
  conclusion}\index{conclusion!of subgoal} is the actual proposition to be proved. 
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   220
Typical proof steps
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   221
that add new assumptions are induction and case distinction. In our example
9541
d17c0b34d5c8 *** empty log message ***
nipkow
parents: 9494
diff changeset
   222
the only assumption is the induction hypothesis @{term"rev (rev list) =
9792
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   223
  list"}, where @{term"list"} is a variable name chosen by Isabelle. If there
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   224
are multiple assumptions, they are enclosed in the bracket pair
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   225
\indexboldpos{\isasymlbrakk}{$Isabrl} and
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   226
\indexboldpos{\isasymrbrakk}{$Isabrr} and separated by semicolons.
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   227
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   228
Let us try to solve both goals automatically:
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   229
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   230
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   231
apply(auto);
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   232
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   233
txt{*\noindent
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   234
This command tells Isabelle to apply a proof strategy called
9792
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   235
@{text"auto"} to all subgoals. Essentially, @{text"auto"} tries to
10978
5eebea8f359f *** empty log message ***
nipkow
parents: 10971
diff changeset
   236
simplify the subgoals.  In our case, subgoal~1 is solved completely (thanks
9792
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   237
to the equation @{prop"rev [] = []"}) and disappears; the simplified version
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   238
of subgoal~2 becomes the new subgoal~1:
10971
6852682eaf16 *** empty log message ***
nipkow
parents: 10885
diff changeset
   239
@{subgoals[display,indent=0,margin=70]}
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   240
In order to simplify this subgoal further, a lemma suggests itself.
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   241
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   242
(*<*)
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   243
oops
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   244
(*>*)
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   245
11428
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
   246
subsubsection{*First Lemma*}
9723
a977245dfc8a *** empty log message ***
nipkow
parents: 9541
diff changeset
   247
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   248
text{*
11428
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
   249
\indexbold{abandoning a proof}\indexbold{proofs!abandoning}
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
   250
After abandoning the above proof attempt (at the shell level type
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
   251
\commdx{oops}) we start a new proof:
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   252
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   253
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   254
lemma rev_app [simp]: "rev(xs @ ys) = (rev ys) @ (rev xs)";
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   255
11428
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
   256
txt{*\noindent The keywords \commdx{theorem} and
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
   257
\commdx{lemma} are interchangeable and merely indicate
10971
6852682eaf16 *** empty log message ***
nipkow
parents: 10885
diff changeset
   258
the importance we attach to a proposition.  Therefore we use the words
11428
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
   259
\emph{theorem} and \emph{lemma} pretty much interchangeably, too.
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   260
9792
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   261
There are two variables that we could induct on: @{term"xs"} and
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   262
@{term"ys"}. Because @{text"@"} is defined by recursion on
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   263
the first argument, @{term"xs"} is the correct one:
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   264
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   265
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   266
apply(induct_tac xs);
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   267
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   268
txt{*\noindent
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   269
This time not even the base case is solved automatically:
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   270
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   271
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   272
apply(auto);
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   273
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   274
txt{*
10362
c6b197ccf1f1 *** empty log message ***
nipkow
parents: 10328
diff changeset
   275
@{subgoals[display,indent=0,goals_limit=1]}
c6b197ccf1f1 *** empty log message ***
nipkow
parents: 10328
diff changeset
   276
Again, we need to abandon this proof attempt and prove another simple lemma
c6b197ccf1f1 *** empty log message ***
nipkow
parents: 10328
diff changeset
   277
first. In the future the step of abandoning an incomplete proof before
c6b197ccf1f1 *** empty log message ***
nipkow
parents: 10328
diff changeset
   278
embarking on the proof of a lemma usually remains implicit.
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   279
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   280
(*<*)
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   281
oops
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   282
(*>*)
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   283
11428
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
   284
subsubsection{*Second Lemma*}
9723
a977245dfc8a *** empty log message ***
nipkow
parents: 9541
diff changeset
   285
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   286
text{*
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   287
We again try the canonical proof procedure:
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   288
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   289
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   290
lemma app_Nil2 [simp]: "xs @ [] = xs";
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   291
apply(induct_tac xs);
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   292
apply(auto);
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   293
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   294
txt{*
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   295
\noindent
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   296
It works, yielding the desired message @{text"No subgoals!"}:
10362
c6b197ccf1f1 *** empty log message ***
nipkow
parents: 10328
diff changeset
   297
@{goals[display,indent=0]}
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   298
We still need to confirm that the proof is now finished:
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   299
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   300
10171
59d6633835fa *** empty log message ***
nipkow
parents: 9792
diff changeset
   301
done
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   302
11428
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
   303
text{*\noindent
332347b9b942 tidying the index
paulson
parents: 11216
diff changeset
   304
As a result of that final \commdx{done}, Isabelle associates the lemma just proved
10171
59d6633835fa *** empty log message ***
nipkow
parents: 9792
diff changeset
   305
with its name. In this tutorial, we sometimes omit to show that final \isacommand{done}
59d6633835fa *** empty log message ***
nipkow
parents: 9792
diff changeset
   306
if it is obvious from the context that the proof is finished.
59d6633835fa *** empty log message ***
nipkow
parents: 9792
diff changeset
   307
59d6633835fa *** empty log message ***
nipkow
parents: 9792
diff changeset
   308
% Instead of \isacommand{apply} followed by a dot, you can simply write
59d6633835fa *** empty log message ***
nipkow
parents: 9792
diff changeset
   309
% \isacommand{by}\indexbold{by}, which we do most of the time.
10971
6852682eaf16 *** empty log message ***
nipkow
parents: 10885
diff changeset
   310
Notice that in lemma @{thm[source]app_Nil2},
6852682eaf16 *** empty log message ***
nipkow
parents: 10885
diff changeset
   311
as printed out after the final \isacommand{done}, the free variable @{term"xs"} has been
9792
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   312
replaced by the unknown @{text"?xs"}, just as explained in
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   313
\S\ref{sec:variables}.
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   314
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   315
Going back to the proof of the first lemma
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   316
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   317
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   318
lemma rev_app [simp]: "rev(xs @ ys) = (rev ys) @ (rev xs)";
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   319
apply(induct_tac xs);
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   320
apply(auto);
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   321
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   322
txt{*
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   323
\noindent
9792
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   324
we find that this time @{text"auto"} solves the base case, but the
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   325
induction step merely simplifies to
10362
c6b197ccf1f1 *** empty log message ***
nipkow
parents: 10328
diff changeset
   326
@{subgoals[display,indent=0,goals_limit=1]}
9792
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   327
Now we need to remember that @{text"@"} associates to the right, and that
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   328
@{text"#"} and @{text"@"} have the same priority (namely the @{text"65"}
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   329
in their \isacommand{infixr} annotation). Thus the conclusion really is
9723
a977245dfc8a *** empty log message ***
nipkow
parents: 9541
diff changeset
   330
\begin{isabelle}
9792
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   331
~~~~~(rev~ys~@~rev~list)~@~(a~\#~[])~=~rev~ys~@~(rev~list~@~(a~\#~[]))
9723
a977245dfc8a *** empty log message ***
nipkow
parents: 9541
diff changeset
   332
\end{isabelle}
9792
bbefb6ce5cb2 *** empty log message ***
nipkow
parents: 9723
diff changeset
   333
and the missing lemma is associativity of @{text"@"}.
9723
a977245dfc8a *** empty log message ***
nipkow
parents: 9541
diff changeset
   334
*}
a977245dfc8a *** empty log message ***
nipkow
parents: 9541
diff changeset
   335
(*<*)oops(*>*)
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   336
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   337
subsubsection{*Third Lemma*}
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   338
9723
a977245dfc8a *** empty log message ***
nipkow
parents: 9541
diff changeset
   339
text{*
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   340
Abandoning the previous attempt, the canonical proof procedure
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   341
succeeds without further ado.
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   342
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   343
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   344
lemma app_assoc [simp]: "(xs @ ys) @ zs = xs @ (ys @ zs)";
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   345
apply(induct_tac xs);
10171
59d6633835fa *** empty log message ***
nipkow
parents: 9792
diff changeset
   346
apply(auto);
59d6633835fa *** empty log message ***
nipkow
parents: 9792
diff changeset
   347
done
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   348
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   349
text{*
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   350
\noindent
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   351
Now we can prove the first lemma:
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   352
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   353
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   354
lemma rev_app [simp]: "rev(xs @ ys) = (rev ys) @ (rev xs)";
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   355
apply(induct_tac xs);
10171
59d6633835fa *** empty log message ***
nipkow
parents: 9792
diff changeset
   356
apply(auto);
59d6633835fa *** empty log message ***
nipkow
parents: 9792
diff changeset
   357
done
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   358
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   359
text{*\noindent
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   360
Finally, we prove our main theorem:
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   361
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   362
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   363
theorem rev_rev [simp]: "rev(rev xs) = xs";
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   364
apply(induct_tac xs);
10171
59d6633835fa *** empty log message ***
nipkow
parents: 9792
diff changeset
   365
apply(auto);
59d6633835fa *** empty log message ***
nipkow
parents: 9792
diff changeset
   366
done
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   367
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   368
text{*\noindent
11456
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   369
The final \commdx{end} tells Isabelle to close the current theory because
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   370
we are finished with its development:%
7eb63f63e6c6 revisions and indexing
paulson
parents: 11450
diff changeset
   371
\index{*rev (constant)|)}\index{append function|)}
8745
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   372
*}
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   373
13b32661dde4 I wonder which files i forgot.
nipkow
parents:
diff changeset
   374
end