10178
|
1 |
\chapter{Advanced Simplification, Recursion and Induction}
|
9958
|
2 |
|
|
3 |
Although we have already learned a lot about simplification, recursion and
|
|
4 |
induction, there are some advanced proof techniques that we have not covered
|
|
5 |
yet and which are worth knowing about if you intend to beome a serious
|
|
6 |
(human) theorem prover. The three sections of this chapter are almost
|
|
7 |
independent of each other and can be read in any order. Only the notion of
|
|
8 |
\emph{congruence rules}, introduced in the section on simplification, is
|
|
9 |
required for parts of the section on recursion.
|
|
10 |
|
9993
|
11 |
\input{Advanced/document/simp.tex}
|
9958
|
12 |
|
|
13 |
\section{Advanced forms of recursion}
|
|
14 |
\index{*recdef|(}
|
10186
|
15 |
|
10187
|
16 |
The purpose of this section is to introduce advanced forms of \isacommand{recdef}. It
|
|
17 |
covers two topics: how to define recursive function over nested recursive datatypes
|
|
18 |
and how to establish termination by means other than measure functions.
|
|
19 |
|
10189
|
20 |
If, after reading this section, you feel that the definition of recursive
|
|
21 |
functions is overly and maybe unnecessarily complicated by the requirement of
|
|
22 |
totality, you should ponder the alternative, a logic of partial functions,
|
|
23 |
where recursive definitions are always wellformed. For a start, there are many
|
|
24 |
such logics, and no clear winner has emerged. And in all of these logics you
|
|
25 |
are (more or less frequently) required to reason about the definedness of
|
|
26 |
terms explicitly. Thus one shifts definedness arguments from definition to
|
|
27 |
proof time. In HOL you may have to work hard to define a function, but proofs
|
|
28 |
can then proceed unencumbered by worries about undefinedness.
|
|
29 |
|
10186
|
30 |
\subsection{Recursion over nested datatypes}
|
|
31 |
\label{sec:nested-recdef}
|
9993
|
32 |
\input{Recdef/document/Nested0.tex}
|
|
33 |
\input{Recdef/document/Nested1.tex}
|
|
34 |
\input{Recdef/document/Nested2.tex}
|
9958
|
35 |
\index{*recdef|)}
|
|
36 |
|
10186
|
37 |
\subsection{Beyond measure}
|
|
38 |
\label{sec:wellfounded}
|
10187
|
39 |
\input{Advanced/document/WFrec.tex}
|
10186
|
40 |
|
9958
|
41 |
\section{Advanced induction techniques}
|
|
42 |
\label{sec:advanced-ind}
|
|
43 |
\index{induction|(}
|
9993
|
44 |
\input{Misc/document/AdvancedInd.tex}
|
10217
|
45 |
\input{CTL/document/CTLind.tex}
|
9958
|
46 |
\index{induction|)}
|