equal
deleted
inserted
replaced
31 (fn ctxt => fn raw_const => |
31 (fn ctxt => fn raw_const => |
32 let |
32 let |
33 val thy = Proof_Context.theory_of ctxt; |
33 val thy = Proof_Context.theory_of ctxt; |
34 val const = Code.check_const thy raw_const; |
34 val const = Code.check_const thy raw_const; |
35 val { eqngr, ... } = Code_Preproc.obtain true { ctxt = ctxt, consts = [const], terms = [] }; |
35 val { eqngr, ... } = Code_Preproc.obtain true { ctxt = ctxt, consts = [const], terms = [] }; |
36 fun holize thm = @{thm meta_eq_to_obj_eq} OF [thm]; |
|
37 val thms = Code_Preproc.cert eqngr const |
36 val thms = Code_Preproc.cert eqngr const |
38 |> Code.equations_of_cert thy |
37 |> Code.equations_of_cert thy |
39 |> snd |
38 |> snd |
40 |> these |
39 |> these |
41 |> map_filter (fn (_, (some_thm, proper)) => if proper then some_thm else NONE) |
40 |> map_filter (fn (_, (some_thm, proper)) => if proper then some_thm else NONE) |
42 |> map (holize o no_vars ctxt o Axclass.overload ctxt); |
41 |> map (HOLogic.mk_obj_eq o no_vars ctxt o Axclass.overload ctxt); |
43 in Pretty.chunks (map (Thy_Output.pretty_thm ctxt) thms) end)); |
42 in Pretty.chunks (map (Thy_Output.pretty_thm ctxt) thms) end)); |
44 |
43 |
45 end; |
44 end; |