equal
deleted
inserted
replaced
704 |
704 |
705 function (*<*)(domintros)(*>*)findzero :: "(nat \<Rightarrow> nat) \<Rightarrow> nat \<Rightarrow> nat" |
705 function (*<*)(domintros)(*>*)findzero :: "(nat \<Rightarrow> nat) \<Rightarrow> nat \<Rightarrow> nat" |
706 where |
706 where |
707 "findzero f n = (if f n = 0 then n else findzero f (Suc n))" |
707 "findzero f n = (if f n = 0 then n else findzero f (Suc n))" |
708 by pat_completeness auto |
708 by pat_completeness auto |
709 (*<*)declare findzero.simps[simp del](*>*) |
|
710 |
709 |
711 text {* |
710 text {* |
712 \noindent Clearly, any attempt of a termination proof must fail. And without |
711 \noindent Clearly, any attempt of a termination proof must fail. And without |
713 that, we do not get the usual rules @{text "findzero.simps"} and |
712 that, we do not get the usual rules @{text "findzero.simps"} and |
714 @{text "findzero.induct"}. So what was the definition good for at all? |
713 @{text "findzero.induct"}. So what was the definition good for at all? |