1 (* Title: Pure/Tools/named_thms.ML
5 Named collections of theorems in canonical order.
10 val get: Proof.context -> thm list
11 val pretty: Proof.context -> Pretty.T
14 val setup: theory -> theory
17 functor NamedThmsFun(val name: string val description: string): NAMED_THMS =
20 structure Data = GenericDataFun
25 fun merge _ = Thm.merge_thms;
28 val get = Data.get o Context.Proof;
31 Pretty.big_list (description ^ ":") (map (ProofContext.pretty_thm ctxt) (get ctxt));
33 val add = Thm.declaration_attribute (Data.map o Thm.add_thm);
34 val del = Thm.declaration_attribute (Data.map o Thm.del_thm);
37 Attrib.add_attributes [(name, Attrib.add_del_args add del, "declaration of " ^ description)];
40 OuterSyntax.improper_command ("print_" ^ name ^ "_rules") ("print " ^ description)
42 (Scan.succeed (Toplevel.no_timing o Toplevel.unknown_context o
43 Toplevel.keep (Pretty.writeln o pretty o Toplevel.context_of)));