merged
authorAndreas Lochbihler
Mon, 25 Aug 2014 08:45:32 +0200
changeset 58037 f7be22c6646b
parent 58035 177eeda93a8c (current diff)
parent 58036 f23045003476 (diff)
child 58038 f8e6197668c9
child 58045 ab2483fad861
merged
--- a/src/HOL/Code_Evaluation.thy	Fri Aug 22 17:35:48 2014 +0200
+++ b/src/HOL/Code_Evaluation.thy	Mon Aug 25 08:45:32 2014 +0200
@@ -128,6 +128,15 @@
   constant "term_of \<Colon> integer \<Rightarrow> term" \<rightharpoonup> (Eval) "HOLogic.mk'_number/ HOLogic.code'_integerT"
 | constant "term_of \<Colon> String.literal \<Rightarrow> term" \<rightharpoonup> (Eval) "HOLogic.mk'_literal"
 
+declare [[code drop: "term_of :: integer \<Rightarrow> _"]]
+
+lemma term_of_integer [unfolded typerep_fun_def typerep_num_def typerep_integer_def, code]:
+  "Code_Evaluation.term_of (i :: integer) =
+   Code_Evaluation.App
+    (Code_Evaluation.Const (STR ''Num.numeral_class.numeral'') (TYPEREP(num \<Rightarrow> integer)))
+    (term_of (num_of_integer i))"
+by(rule term_of_anything[THEN meta_eq_to_obj_eq])
+
 code_reserved Eval HOLogic