equal
deleted
inserted
replaced
9 |
9 |
10 signature LOCAL_THEORY = |
10 signature LOCAL_THEORY = |
11 sig |
11 sig |
12 val params_of: local_theory -> (string * typ) list |
12 val params_of: local_theory -> (string * typ) list |
13 val hyps_of: local_theory -> term list |
13 val hyps_of: local_theory -> term list |
14 val standard: local_theory -> thm -> thm |
14 val standard: local_theory -> thm list -> thm list |
15 val pretty_consts: local_theory -> (string * typ -> bool) -> (string * typ) list -> Pretty.T |
15 val pretty_consts: local_theory -> (string * typ -> bool) -> (string * typ) list -> Pretty.T |
16 val quiet_mode: bool ref |
16 val quiet_mode: bool ref |
17 val print_consts: local_theory -> (string * typ -> bool) -> (string * typ) list -> unit |
17 val print_consts: local_theory -> (string * typ -> bool) -> (string * typ) list -> unit |
18 val theory: (theory -> theory) -> local_theory -> local_theory |
18 val theory: (theory -> theory) -> local_theory -> local_theory |
19 val theory_result: (theory -> 'a * theory) -> local_theory -> 'a * local_theory |
19 val theory_result: (theory -> 'a * theory) -> local_theory -> 'a * local_theory |
73 val params_of = #params o Data.get; |
73 val params_of = #params o Data.get; |
74 val hyps_of = #hyps o Data.get; |
74 val hyps_of = #hyps o Data.get; |
75 |
75 |
76 fun standard ctxt = |
76 fun standard ctxt = |
77 (case #locale (Data.get ctxt) of |
77 (case #locale (Data.get ctxt) of |
78 NONE => Drule.standard |
78 NONE => map Drule.standard |
79 | SOME (_, (_, loc_ctxt)) => ProofContext.export_standard ctxt loc_ctxt); |
79 | SOME (_, (_, loc_ctxt)) => ProofContext.export_standard ctxt loc_ctxt); |
80 |
80 |
81 |
81 |
82 (* print consts *) |
82 (* print consts *) |
83 |
83 |
208 (* fact definitions *) |
208 (* fact definitions *) |
209 |
209 |
210 fun notes kind facts ctxt = |
210 fun notes kind facts ctxt = |
211 let |
211 let |
212 val attrib = Attrib.attribute_i (ProofContext.theory_of ctxt); |
212 val attrib = Attrib.attribute_i (ProofContext.theory_of ctxt); |
213 val facts' = map (apsnd (map (apfst (map (standard ctxt))))) facts; |
213 val facts' = map (apsnd (map (apfst (standard ctxt)))) facts; (* FIXME burrow standard *) |
214 in |
214 in |
215 ctxt |> |
215 ctxt |> |
216 (case locale_of ctxt of |
216 (case locale_of ctxt of |
217 NONE => theory_result (PureThy.note_thmss_i kind (Attrib.map_facts attrib facts')) |
217 NONE => theory_result (PureThy.note_thmss_i kind (Attrib.map_facts attrib facts')) |
218 | SOME (loc, _) => |
218 | SOME (loc, _) => |