doc-src/TutorialI/Recdef/document/Nested0.tex
author nipkow
Wed, 30 Aug 2000 18:09:20 +0200
changeset 9754 a123a64cadeb
parent 9722 a5f86aed785b
child 9924 3370f6aa3200
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
9754
a123a64cadeb *** empty log message ***
nipkow
parents: 9722
diff changeset
    16
choose exercise~\ref{ex:trev-trev}:%
9698
f0740137a65d updated;
wenzelm
parents:
diff changeset
    17
\end{isamarkuptext}%
9722
a5f86aed785b *** empty log message ***
nipkow
parents: 9721
diff changeset
    18
\end{isabellebody}%
9698
f0740137a65d updated;
wenzelm
parents:
diff changeset
    19
%%% Local Variables:
f0740137a65d updated;
wenzelm
parents:
diff changeset
    20
%%% mode: latex
f0740137a65d updated;
wenzelm
parents:
diff changeset
    21
%%% TeX-master: "root"
f0740137a65d updated;
wenzelm
parents:
diff changeset
    22
%%% End: