src/HOL/Tools/Predicate_Compile/predicate_compile_data.ML
changeset 35758 c029f85d3879
parent 35624 c4e29a0bb8c1
child 36610 bafd82950e24
equal deleted inserted replaced
35757:c2884bec5463 35758:c029f85d3879
   196       else
   196       else
   197         if is_introlike th andalso defining_term_of_introrule th = t then
   197         if is_introlike th andalso defining_term_of_introrule th = t then
   198           SOME th
   198           SOME th
   199         else
   199         else
   200           NONE
   200           NONE
   201     val spec = case map_filter filtering (map (normalize thy o Thm.transfer thy) (Predicate_Compile_Alternative_Defs.get ctxt))
   201     fun filter_defs ths = map_filter filtering (map (normalize thy o Thm.transfer thy) ths)
   202      of [] => (case Spec_Rules.retrieve ctxt t
   202     val spec = case filter_defs (Predicate_Compile_Alternative_Defs.get ctxt) of
   203        of [] => (case rev ( 
   203       [] => (case Spec_Rules.retrieve ctxt t of
   204          (map_filter filtering (map (normalize_intros thy o Thm.transfer thy)
   204           [] => error ("No specification for " ^ (Syntax.string_of_term_global thy t))
   205            (Nitpick_Intros.get ctxt))))
   205         | ((_, (_, ths)) :: _) => filter_defs ths)
   206          of [] => error ("No specification for " ^ (Syntax.string_of_term_global thy t))
   206     | ths => rev ths
   207           | ths => ths)
       
   208        | ((_, (_, ths)) :: _) => map (normalize_equation thy o Thm.transfer thy) ths)
       
   209      | ths => rev ths
       
   210     val _ =
   207     val _ =
   211       if show_intermediate_results options then
   208       if show_intermediate_results options then
   212         Output.tracing (commas (map (Display.string_of_thm_global thy) spec))
   209         Output.tracing (commas (map (Display.string_of_thm_global thy) spec))
   213       else ()
   210       else ()
   214   in
   211   in