doc-src/TutorialI/Recdef/document/Nested0.tex
author nipkow
Wed, 30 Aug 2000 14:38:48 +0200
changeset 9742 98d3ca2c18f7
parent 9722 a5f86aed785b
child 9754 a123a64cadeb
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9722
a5f86aed785b *** empty log message ***
nipkow
parents: 9721
diff changeset
     1
%
a5f86aed785b *** empty log message ***
nipkow
parents: 9721
diff changeset
     2
\begin{isabellebody}%
9698
f0740137a65d updated;
wenzelm
parents:
diff changeset
     3
%
f0740137a65d updated;
wenzelm
parents:
diff changeset
     4
\begin{isamarkuptext}%
f0740137a65d updated;
wenzelm
parents:
diff changeset
     5
In \S\ref{sec:nested-datatype} we defined the datatype of terms%
f0740137a65d updated;
wenzelm
parents:
diff changeset
     6
\end{isamarkuptext}%
f0740137a65d updated;
wenzelm
parents:
diff changeset
     7
\isacommand{datatype}\ {\isacharparenleft}{\isacharprime}a{\isacharcomma}{\isacharprime}b{\isacharparenright}{\isachardoublequote}term{\isachardoublequote}\ {\isacharequal}\ Var\ {\isacharprime}a\ {\isacharbar}\ App\ {\isacharprime}b\ {\isachardoublequote}{\isacharparenleft}{\isacharprime}a{\isacharcomma}{\isacharprime}b{\isacharparenright}term\ list{\isachardoublequote}%
f0740137a65d updated;
wenzelm
parents:
diff changeset
     8
\begin{isamarkuptext}%
f0740137a65d updated;
wenzelm
parents:
diff changeset
     9
\noindent
f0740137a65d updated;
wenzelm
parents:
diff changeset
    10
and closed with the observation that the associated schema for the definition
f0740137a65d updated;
wenzelm
parents:
diff changeset
    11
of primitive recursive functions leads to overly verbose definitions. Moreover,
f0740137a65d updated;
wenzelm
parents:
diff changeset
    12
if you have worked exercise~\ref{ex:trev-trev} you will have noticed that
f0740137a65d updated;
wenzelm
parents:
diff changeset
    13
you needed to reprove many lemmas reminiscent of similar lemmas about
f0740137a65d updated;
wenzelm
parents:
diff changeset
    14
\isa{rev}. We will now show you how \isacommand{recdef} can simplify
f0740137a65d updated;
wenzelm
parents:
diff changeset
    15
definitions and proofs about nested recursive datatypes. As an example we
f0740137a65d updated;
wenzelm
parents:
diff changeset
    16
chose exercise~\ref{ex:trev-trev}:
f0740137a65d updated;
wenzelm
parents:
diff changeset
    17
f0740137a65d updated;
wenzelm
parents:
diff changeset
    18
FIXME: declare trev now!%
f0740137a65d updated;
wenzelm
parents:
diff changeset
    19
\end{isamarkuptext}%
9722
a5f86aed785b *** empty log message ***
nipkow
parents: 9721
diff changeset
    20
\end{isabellebody}%
9698
f0740137a65d updated;
wenzelm
parents:
diff changeset
    21
%%% Local Variables:
f0740137a65d updated;
wenzelm
parents:
diff changeset
    22
%%% mode: latex
f0740137a65d updated;
wenzelm
parents:
diff changeset
    23
%%% TeX-master: "root"
f0740137a65d updated;
wenzelm
parents:
diff changeset
    24
%%% End: