doc-src/Functions/Thy/Functions.thy
changeset 41847 b0d6acf73588
parent 41846 b368a7aee46a
child 43042 0f9534b7ea75
equal deleted inserted replaced
41846:b368a7aee46a 41847:b0d6acf73588
   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?