no consts_code for wfrec, as it violates the "code generation = equational reasoning" principle
authorkrauss
Mon, 31 Aug 2009 20:32:00 +0200
changeset 32461 eee4fa79398f
parent 32460 ba0cf920a39c
child 32462 c33faa289520
no consts_code for wfrec, as it violates the "code generation = equational reasoning" principle
src/HOL/MicroJava/J/TypeRel.thy
src/HOL/Wellfounded.thy
--- a/src/HOL/MicroJava/J/TypeRel.thy	Mon Aug 31 17:32:29 2009 +0200
+++ b/src/HOL/MicroJava/J/TypeRel.thy	Mon Aug 31 20:32:00 2009 +0200
@@ -97,6 +97,14 @@
   qed
 qed
 
+text {* Code generator setup (FIXME!) *}
+
+consts_code
+  "wfrec"   ("\<module>wfrec?")
+attach {*
+fun wfrec f x = f (wfrec f) x;
+*}
+
 consts
 
   method :: "'c prog \<times> cname => ( sig   \<rightharpoonup> cname \<times> ty \<times> 'c)" (* ###curry *)
--- a/src/HOL/Wellfounded.thy	Mon Aug 31 17:32:29 2009 +0200
+++ b/src/HOL/Wellfounded.thy	Mon Aug 31 20:32:00 2009 +0200
@@ -464,14 +464,6 @@
 apply (erule adm_lemma [THEN wfrec_unique, THEN theI'])
 done
 
-subsection {* Code generator setup *}
-
-consts_code
-  "wfrec"   ("\<module>wfrec?")
-attach {*
-fun wfrec f x = f (wfrec f) x;
-*}
-
 
 subsection {* @{typ nat} is well-founded *}