more robust printing of numerals;
authorwenzelm
Tue, 13 Aug 2002 12:16:14 +0200
changeset 13495 af27202d6d1c
parent 13494 1c44289716ae
child 13496 6f0c57def6d5
more robust printing of numerals;
src/HOL/Tools/numeral_syntax.ML
--- a/src/HOL/Tools/numeral_syntax.ML	Tue Aug 13 11:03:11 2002 +0200
+++ b/src/HOL/Tools/numeral_syntax.ML	Tue Aug 13 12:16:14 2002 +0200
@@ -30,11 +30,8 @@
       if pred x then 1 + prefix_len pred xs else 0;
 
 fun bin_of (Const ("bin.Pls", _)) = []
-  | bin_of (Const ("Numeral.bin.Pls", _)) = []
   | bin_of (Const ("bin.Min", _)) = [~1]
-  | bin_of (Const ("Numeral.bin.Min", _)) = [~1]
-  | bin_of (Const ("bin.Bit", _) $ bs $ b) = dest_bit b :: bin_of bs
-  | bin_of (Const ("Numeral.bin.Bit", _) $ bs $ b) = dest_bit b :: bin_of bs
+  | bin_of (Const ("Bit", _) $ bs $ b) = dest_bit b :: bin_of bs
   | bin_of _ = raise Match;
 
 val dest_bin = HOLogic.int_of o bin_of;
@@ -74,9 +71,8 @@
 (* theory setup *)
 
 val setup =
- [Theory.hide_consts false
-    ["Numeral.bin.Pls", "Numeral.bin.Min"],
-Theory.add_trfuns ([], [("_Numeral", numeral_tr)], [], []),
+ [Theory.hide_consts false ["Numeral.bin.Pls", "Numeral.bin.Min"],
+  Theory.add_trfuns ([], [("_Numeral", numeral_tr)], [], []),
   Theory.add_trfunsT [("number_of", numeral_tr'), ("Numeral.number_of", numeral_tr')]];