# HG changeset patch # User haftmann # Date 1180552155 -7200 # Node ID 5a6935d598c3af562c6d81ce5e0bdf6ef5cbd64c # Parent ae52b82dc5d88c3dbba463e7e5b1adeed05d2474 fixed typo diff -r ae52b82dc5d8 -r 5a6935d598c3 src/HOL/Library/Eval.thy --- a/src/HOL/Library/Eval.thy Wed May 30 21:09:13 2007 +0200 +++ b/src/HOL/Library/Eval.thy Wed May 30 21:09:15 2007 +0200 @@ -123,19 +123,24 @@ where "intT \ STR ''IntDef.int'' {\} []" +abbreviation + bitT :: "typ" +where + "bitT \ STR ''Numeral.bit'' {\} []" + function mk_int :: "int \ term" where "mk_int k = (if k = 0 then STR ''Numeral.Pls'' \\ intT else if k = -1 then STR ''Numeral.Min'' \\ intT else let (l, m) = divAlg (k, 2) - in STR ''Numeral.Bit'' \\ intT \ intT \ intT \ mk_int l \ - (if m = 0 then STR ''Numeral.bit.B0'' \\ intT else STR ''Numeral.bit.B1'' \\ intT))" + in STR ''Numeral.Bit'' \\ intT \ bitT \ intT \ mk_int l \ + (if m = 0 then STR ''Numeral.bit.B0'' \\ bitT else STR ''Numeral.bit.B1'' \\ bitT))" by pat_completeness auto termination by (relation "measure (nat o abs)") (auto simp add: divAlg_mod_div) instance int :: term_of - "term_of k \ STR ''Numeral.number_class.number_of'' \\ intT \ intT \ intT \ mk_int k" .. + "term_of k \ STR ''Numeral.number_class.number_of'' \\ intT \ intT \ mk_int k" .. text {* Adaption for @{typ ml_string}s *}