src/HOL/Tools/choice_specification.ML
changeset 35021 c839a4c670c6
parent 33339 d41f77196338
child 35625 9c818cab0dd0
equal deleted inserted replaced
35020:862a20ffa8e2 35021:c839a4c670c6
    73 end
    73 end
    74 
    74 
    75 fun add_specification axiomatic cos arg =
    75 fun add_specification axiomatic cos arg =
    76     arg |> apsnd Thm.freezeT
    76     arg |> apsnd Thm.freezeT
    77         |> proc_exprop axiomatic cos
    77         |> proc_exprop axiomatic cos
    78         |> apsnd Drule.standard
    78         |> apsnd Drule.export_without_context
    79 
    79 
    80 
    80 
    81 (* Collect all intances of constants in term *)
    81 (* Collect all intances of constants in term *)
    82 
    82 
    83 fun collect_consts (        t $ u,tms) = collect_consts (u,collect_consts (t,tms))
    83 fun collect_consts (        t $ u,tms) = collect_consts (u,collect_consts (t,tms))
   187                             else (writeln ("  " ^ name ^ ": " ^ Display.string_of_thm_global thy thm);
   187                             else (writeln ("  " ^ name ^ ": " ^ Display.string_of_thm_global thy thm);
   188                                   PureThy.store_thm (Binding.name name, thm) thy)
   188                                   PureThy.store_thm (Binding.name name, thm) thy)
   189                     in
   189                     in
   190                         args |> apsnd (remove_alls frees)
   190                         args |> apsnd (remove_alls frees)
   191                              |> apsnd undo_imps
   191                              |> apsnd undo_imps
   192                              |> apsnd Drule.standard
   192                              |> apsnd Drule.export_without_context
   193                              |> Thm.theory_attributes (map (Attrib.attribute thy) atts)
   193                              |> Thm.theory_attributes (map (Attrib.attribute thy) atts)
   194                              |> add_final
   194                              |> add_final
   195                              |> Library.swap
   195                              |> Library.swap
   196                     end
   196                     end
   197 
   197