src/HOL/Tools/BNF/bnf_lfp_size.ML
changeset 81511 8cbc8bc6f382
parent 81507 08574da77b4a
equal deleted inserted replaced
81510:a14eb229011d 81511:8cbc8bc6f382
    48 );
    48 );
    49 
    49 
    50 fun check_size_type thy T_name size_name =
    50 fun check_size_type thy T_name size_name =
    51   let
    51   let
    52     val n = Sign.arity_number thy T_name;
    52     val n = Sign.arity_number thy T_name;
    53     val As = map (fn s => TFree (s, \<^sort>\<open>type\<close>)) (Name.invent_global_types n);
    53     val As = map (fn a => TFree (a, \<^sort>\<open>type\<close>)) (Name.invent_global_types n);
    54     val T = Type (T_name, As);
    54     val T = Type (T_name, As);
    55     val size_T = map mk_to_natT As ---> mk_to_natT T;
    55     val size_T = map mk_to_natT As ---> mk_to_natT T;
    56     val size_const = Const (size_name, size_T);
    56     val size_const = Const (size_name, size_T);
    57   in
    57   in
    58     can (Thm.global_cterm_of thy) size_const orelse
    58     can (Thm.global_cterm_of thy) size_const orelse