equal
deleted
inserted
replaced
|
1 \begin{isabelle}% |
|
2 % |
|
3 \begin{isamarkuptext}% |
|
4 In \S\ref{sec:nested-datatype} we defined the datatype of terms% |
|
5 \end{isamarkuptext}% |
|
6 \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}% |
|
7 \begin{isamarkuptext}% |
|
8 \noindent |
|
9 and closed with the observation that the associated schema for the definition |
|
10 of primitive recursive functions leads to overly verbose definitions. Moreover, |
|
11 if you have worked exercise~\ref{ex:trev-trev} you will have noticed that |
|
12 you needed to reprove many lemmas reminiscent of similar lemmas about |
|
13 \isa{rev}. We will now show you how \isacommand{recdef} can simplify |
|
14 definitions and proofs about nested recursive datatypes. As an example we |
|
15 chose exercise~\ref{ex:trev-trev}: |
|
16 |
|
17 FIXME: declare trev now!% |
|
18 \end{isamarkuptext}% |
|
19 \end{isabelle}% |
|
20 %%% Local Variables: |
|
21 %%% mode: latex |
|
22 %%% TeX-master: "root" |
|
23 %%% End: |