src/HOL/Tools/Function/size.ML
changeset 56239 17df7145a871
parent 55094 149ccaf4ae5c
child 56375 32e0da92c786
equal deleted inserted replaced
56237:69a9dfe71aed 56239:17df7145a871
   132         val thm' = singleton (Proof_Context.export lthy' ctxt_thy) thm;
   132         val thm' = singleton (Proof_Context.export lthy' ctxt_thy) thm;
   133       in (thm', lthy') end;
   133       in (thm', lthy') end;
   134 
   134 
   135     val ((size_def_thms, size_def_thms'), thy') =
   135     val ((size_def_thms, size_def_thms'), thy') =
   136       thy
   136       thy
   137       |> Sign.add_consts_i (map (fn (s, T) =>
   137       |> Sign.add_consts (map (fn (s, T) =>
   138            (Binding.name (Long_Name.base_name s), param_size_fTs @ [T] ---> HOLogic.natT, NoSyn))
   138            (Binding.name (Long_Name.base_name s), param_size_fTs @ [T] ---> HOLogic.natT, NoSyn))
   139            (size_names ~~ recTs1))
   139            (size_names ~~ recTs1))
   140       |> Global_Theory.add_defs false
   140       |> Global_Theory.add_defs false
   141         (map (Thm.no_attributes o apsnd (Logic.mk_equals o apsnd (app fs)))
   141         (map (Thm.no_attributes o apsnd (Logic.mk_equals o apsnd (app fs)))
   142            (map Binding.name def_names ~~ (size_fns ~~ rec_combs1)))
   142            (map Binding.name def_names ~~ (size_fns ~~ rec_combs1)))