src/HOL/Tools/ATP/atp_util.ML
changeset 75125 18cd39e55eca
parent 75005 4106bc2a9cc8
child 77430 51dac6fcdd0e
equal deleted inserted replaced
75124:f12539c8de0c 75125:18cd39e55eca
   407 fun short_thm_name ctxt th =
   407 fun short_thm_name ctxt th =
   408   let
   408   let
   409     val long = Thm.get_name_hint th
   409     val long = Thm.get_name_hint th
   410     val short = Long_Name.base_name long
   410     val short = Long_Name.base_name long
   411   in
   411   in
   412     if Thm.eq_thm_prop (th, singleton (Attrib.eval_thms ctxt) (Facts.named short, [])) then short
   412     (case try (singleton (Attrib.eval_thms ctxt)) (Facts.named short, []) of
   413     else long
   413       SOME th' => if Thm.eq_thm_prop (th, th') then short else long
       
   414     | _ => long)
   414   end
   415   end
   415 
   416 
   416 val map_prod = Ctr_Sugar_Util.map_prod
   417 val map_prod = Ctr_Sugar_Util.map_prod
   417 
   418 
   418 (* Compare the length of a list with an integer n while traversing at most n elements of the list.
   419 (* Compare the length of a list with an integer n while traversing at most n elements of the list.