src/HOL/Wellfounded_Recursion.thy
changeset 17459 9a3925c07392
parent 17042 da5cfaa258f7
child 17654 38496187809d
equal deleted inserted replaced
17458:e42bfad176eb 17459:9a3925c07392
   276 text{** This form avoids giant explosions in proofs.  NOTE USE OF ==*}
   276 text{** This form avoids giant explosions in proofs.  NOTE USE OF ==*}
   277 lemma def_wfrec: "[| f==wfrec r H;  wf(r) |] ==> f(a) = H (cut f r a) a"
   277 lemma def_wfrec: "[| f==wfrec r H;  wf(r) |] ==> f(a) = H (cut f r a) a"
   278 apply auto
   278 apply auto
   279 apply (blast intro: wfrec)
   279 apply (blast intro: wfrec)
   280 done
   280 done
       
   281 
       
   282 
       
   283 subsection {* Code generator setup *}
       
   284 
       
   285 consts_code
       
   286   "wfrec"   ("\<module>wf'_rec?")
       
   287 attach {*
       
   288 fun wf_rec f x = f (wf_rec f) x;
       
   289 *}
   281 
   290 
   282 
   291 
   283 subsection{*Variants for TFL: the Recdef Package*}
   292 subsection{*Variants for TFL: the Recdef Package*}
   284 
   293 
   285 lemma tfl_wf_induct: "ALL R. wf R -->  
   294 lemma tfl_wf_induct: "ALL R. wf R -->