45 val thms_containing: theory -> FactIndex.spec -> (string * thm list) list |
45 val thms_containing: theory -> FactIndex.spec -> (string * thm list) list |
46 val thms_containing_consts: theory -> string list -> (string * thm) list |
46 val thms_containing_consts: theory -> string list -> (string * thm) list |
47 val thms_of: theory -> (string * thm) list |
47 val thms_of: theory -> (string * thm) list |
48 val all_thms_of: theory -> (string * thm) list |
48 val all_thms_of: theory -> (string * thm) list |
49 val hide_thms: bool -> string list -> theory -> theory |
49 val hide_thms: bool -> string list -> theory -> theory |
50 val store_thm: (bstring * thm) * theory attribute list -> theory -> thm * theory |
50 val store_thm: (bstring * thm) * attribute list -> theory -> thm * theory |
51 val smart_store_thms: (bstring * thm list) -> thm list |
51 val smart_store_thms: (bstring * thm list) -> thm list |
52 val smart_store_thms_open: (bstring * thm list) -> thm list |
52 val smart_store_thms_open: (bstring * thm list) -> thm list |
53 val forall_elim_var: int -> thm -> thm |
53 val forall_elim_var: int -> thm -> thm |
54 val forall_elim_vars: int -> thm -> thm |
54 val forall_elim_vars: int -> thm -> thm |
55 val add_thms: ((bstring * thm) * theory attribute list) list -> theory -> thm list * theory |
55 val add_thms: ((bstring * thm) * attribute list) list -> theory -> thm list * theory |
56 val add_thmss: ((bstring * thm list) * theory attribute list) list -> theory |
56 val add_thmss: ((bstring * thm list) * attribute list) list -> theory -> thm list list * theory |
57 -> thm list list * theory |
57 val note_thmss: attribute -> ((bstring * attribute list) * |
58 val note_thmss: theory attribute -> ((bstring * theory attribute list) * |
58 (thmref * attribute list) list) list -> theory -> (bstring * thm list) list * theory |
59 (thmref * theory attribute list) list) list -> |
59 val note_thmss_i: attribute -> ((bstring * attribute list) * |
60 theory -> (bstring * thm list) list * theory |
60 (thm list * attribute list) list) list -> theory -> (bstring * thm list) list * theory |
61 val note_thmss_i: theory attribute -> ((bstring * theory attribute list) * |
61 val add_axioms: ((bstring * string) * attribute list) list -> theory -> thm list * theory |
62 (thm list * theory attribute list) list) list -> |
62 val add_axioms_i: ((bstring * term) * attribute list) list -> theory -> thm list * theory |
63 theory -> (bstring * thm list) list * theory |
63 val add_axiomss: ((bstring * string list) * attribute list) list -> |
64 val add_axioms: ((bstring * string) * theory attribute list) list -> |
64 theory -> thm list list * theory |
|
65 val add_axiomss_i: ((bstring * term list) * attribute list) list -> |
|
66 theory -> thm list list * theory |
|
67 val add_defs: bool -> ((bstring * string) * attribute list) list -> |
65 theory -> thm list * theory |
68 theory -> thm list * theory |
66 val add_axioms_i: ((bstring * term) * theory attribute list) list -> |
69 val add_defs_i: bool -> ((bstring * term) * attribute list) list -> |
67 theory -> thm list * theory |
70 theory -> thm list * theory |
68 val add_axiomss: ((bstring * string list) * theory attribute list) list -> |
71 val add_defss: bool -> ((bstring * string list) * attribute list) list -> |
69 theory -> thm list list * theory |
72 theory -> thm list list * theory |
70 val add_axiomss_i: ((bstring * term list) * theory attribute list) list -> |
73 val add_defss_i: bool -> ((bstring * term list) * attribute list) list -> |
71 theory -> thm list list * theory |
|
72 val add_defs: bool -> ((bstring * string) * theory attribute list) list -> |
|
73 theory -> thm list * theory |
|
74 val add_defs_i: bool -> ((bstring * term) * theory attribute list) list -> |
|
75 theory -> thm list * theory |
|
76 val add_defss: bool -> ((bstring * string list) * theory attribute list) list -> |
|
77 theory -> thm list list * theory |
|
78 val add_defss_i: bool -> ((bstring * term list) * theory attribute list) list -> |
|
79 theory -> thm list list * theory |
74 theory -> thm list list * theory |
80 val generic_setup: string option -> theory -> theory |
75 val generic_setup: string option -> theory -> theory |
81 val add_oracle: bstring * string * string -> theory -> theory |
76 val add_oracle: bstring * string * string -> theory -> theory |
82 end; |
77 end; |
83 |
78 |
357 |
351 |
358 local |
352 local |
359 |
353 |
360 fun gen_note_thss get kind_att ((bname, more_atts), ths_atts) thy = |
354 fun gen_note_thss get kind_att ((bname, more_atts), ths_atts) thy = |
361 let |
355 let |
362 fun app (x, (ths, atts)) = Thm.applys_attributes atts (x, ths); |
356 fun app (x, (ths, atts)) = foldl_map (Thm.theory_attributes atts) (x, ths); |
363 val (thms, thy') = thy |> enter_thms |
357 val (thms, thy') = thy |> enter_thms |
364 name_thmss (name_thms false) (apsnd List.concat o foldl_map app) |
358 name_thmss (name_thms false) (apsnd List.concat o foldl_map app) |
365 (bname, map (fn (ths, atts) => (get thy ths, atts @ more_atts @ [kind_att])) ths_atts); |
359 (bname, map (fn (ths, atts) => (get thy ths, atts @ more_atts @ [kind_att])) ths_atts); |
366 in ((bname, thms), thy') end; |
360 in ((bname, thms), thy') end; |
367 |
361 |