src/Doc/Functions/Functions.thy
changeset 58620 7435b6a3f72e
parent 58310 91ea607a34d8
child 59005 1c54ebc68394
equal deleted inserted replaced
58619:4b41df5fef81 58620:7435b6a3f72e
   276 *)
   276 *)
   277 
   277 
   278 text {*
   278 text {*
   279   To see how the automatic termination proofs work, let's look at an
   279   To see how the automatic termination proofs work, let's look at an
   280   example where it fails\footnote{For a detailed discussion of the
   280   example where it fails\footnote{For a detailed discussion of the
   281   termination prover, see \cite{bulwahnKN07}}:
   281   termination prover, see @{cite bulwahnKN07}}:
   282 
   282 
   283 \end{isamarkuptext}  
   283 \end{isamarkuptext}  
   284 \cmd{fun} @{text "fails :: \"nat \<Rightarrow> nat list \<Rightarrow> nat\""}\\%
   284 \cmd{fun} @{text "fails :: \"nat \<Rightarrow> nat list \<Rightarrow> nat\""}\\%
   285 \cmd{where}\\%
   285 \cmd{where}\\%
   286 \hspace*{2ex}@{text "\"fails a [] = a\""}\\%
   286 \hspace*{2ex}@{text "\"fails a [] = a\""}\\%
   332   Some termination goals that are beyond the powers of
   332   Some termination goals that are beyond the powers of
   333   @{text lexicographic_order} can be solved automatically by the
   333   @{text lexicographic_order} can be solved automatically by the
   334   more powerful @{text size_change} method, which uses a variant of
   334   more powerful @{text size_change} method, which uses a variant of
   335   the size-change principle, together with some other
   335   the size-change principle, together with some other
   336   techniques. While the details are discussed
   336   techniques. While the details are discussed
   337   elsewhere\cite{krauss_phd},
   337   elsewhere @{cite krauss_phd},
   338   here are a few typical situations where
   338   here are a few typical situations where
   339   @{text lexicographic_order} has difficulties and @{text size_change}
   339   @{text lexicographic_order} has difficulties and @{text size_change}
   340   may be worth a try:
   340   may be worth a try:
   341   \begin{itemize}
   341   \begin{itemize}
   342   \item Arguments are permuted in a recursive call.
   342   \item Arguments are permuted in a recursive call.