src/ZF/Tools/numeral_syntax.ML
changeset 18708 4b3dadb4fe33
parent 15965 f422f8283491
child 21781 8314ebb5364d
equal deleted inserted replaced
18707:9d6154f76476 18708:4b3dadb4fe33
    10 sig
    10 sig
    11   val dest_bin : term -> IntInf.int
    11   val dest_bin : term -> IntInf.int
    12   val mk_bin   : IntInf.int -> term
    12   val mk_bin   : IntInf.int -> term
    13   val int_tr   : term list -> term
    13   val int_tr   : term list -> term
    14   val int_tr'  : bool -> typ -> term list -> term
    14   val int_tr'  : bool -> typ -> term list -> term
    15   val setup    : (theory -> theory) list
    15   val setup    : theory -> theory
    16 end;
    16 end;
    17 
    17 
    18 structure NumeralSyntax: NUMERAL_SYNTAX =
    18 structure NumeralSyntax: NUMERAL_SYNTAX =
    19 struct
    19 struct
    20 
    20 
    98 fun int_tr' _ _ (*"integ_of"*) [t] = Syntax.const "_Int" $ Syntax.free (show_int t)
    98 fun int_tr' _ _ (*"integ_of"*) [t] = Syntax.const "_Int" $ Syntax.free (show_int t)
    99   | int_tr' (_:bool) (_:typ)     _ = raise Match;
    99   | int_tr' (_:bool) (_:typ)     _ = raise Match;
   100 
   100 
   101 
   101 
   102 val setup =
   102 val setup =
   103  [Theory.add_trfuns ([], [("_Int", int_tr)], [], []),
   103  (Theory.add_trfuns ([], [("_Int", int_tr)], [], []) #>
   104   Theory.add_trfunsT [("integ_of", int_tr'), ("Bin.integ_of", int_tr')]];
   104   Theory.add_trfunsT [("integ_of", int_tr'), ("Bin.integ_of", int_tr')]);
   105 
   105 
   106 end;
   106 end;