doc-src/TutorialI/Datatype/Nested.thy
changeset 11309 d666f11ca2d4
parent 11256 49afcce3bada
child 11310 51e70b7bc315
equal deleted inserted replaced
11308:b28bbb153603 11309:d666f11ca2d4
   118 about @{term map}.  Unfortunately inductive proofs about type
   118 about @{term map}.  Unfortunately inductive proofs about type
   119 @{text term} are still awkward because they expect a conjunction. One
   119 @{text term} are still awkward because they expect a conjunction. One
   120 could derive a new induction principle as well (see
   120 could derive a new induction principle as well (see
   121 \S\ref{sec:derive-ind}), but simpler is to stop using \isacommand{primrec}
   121 \S\ref{sec:derive-ind}), but simpler is to stop using \isacommand{primrec}
   122 and to define functions with \isacommand{recdef} instead.
   122 and to define functions with \isacommand{recdef} instead.
   123 The details are explained in \S\ref{sec:nested-recdef} below.
   123 Simple uses of \isacommand{recdef} are described in \S\ref{sec:recdef} below,
       
   124 and later (\S\ref{sec:nested-recdef}) we shall see how \isacommand{recdef} can 
       
   125 handle nested recursion.
   124 
   126 
   125 Of course, you may also combine mutual and nested recursion of datatypes. For example,
   127 Of course, you may also combine mutual and nested recursion of datatypes. For example,
   126 constructor @{text Sum} in \S\ref{sec:datatype-mut-rec} could take a list of
   128 constructor @{text Sum} in \S\ref{sec:datatype-mut-rec} could take a list of
   127 expressions as its argument: @{text Sum}~@{typ[quotes]"'a aexp list"}.
   129 expressions as its argument: @{text Sum}~@{typ[quotes]"'a aexp list"}.
   128 *}
   130 *}