30 val smart_store_thms: (bstring * thm list) -> thm list |
30 val smart_store_thms: (bstring * thm list) -> thm list |
31 val forall_elim_var: int -> thm -> thm |
31 val forall_elim_var: int -> thm -> thm |
32 val forall_elim_vars: int -> thm -> thm |
32 val forall_elim_vars: int -> thm -> thm |
33 val add_thms: ((bstring * thm) * theory attribute list) list -> theory -> theory * thm list |
33 val add_thms: ((bstring * thm) * theory attribute list) list -> theory -> theory * thm list |
34 val add_thmss: ((bstring * thm list) * theory attribute list) list -> theory -> theory * thm list list |
34 val add_thmss: ((bstring * thm list) * theory attribute list) list -> theory -> theory * thm list list |
35 val have_thmss: bstring -> theory attribute list -> |
35 val have_thmss: theory attribute list -> ((bstring * theory attribute list) * |
36 (thm list * theory attribute list) list -> theory -> theory * thm list |
36 (thm list * theory attribute list) list) list -> theory -> theory * (string * thm list) list |
37 val add_axioms: ((bstring * string) * theory attribute list) list -> theory -> theory * thm list |
37 val add_axioms: ((bstring * string) * theory attribute list) list -> theory -> theory * thm list |
38 val add_axioms_i: ((bstring * term) * theory attribute list) list -> theory -> theory * thm list |
38 val add_axioms_i: ((bstring * term) * theory attribute list) list -> theory -> theory * thm list |
39 val add_axiomss: ((bstring * string list) * theory attribute list) list -> theory -> theory * thm list list |
39 val add_axiomss: ((bstring * string list) * theory attribute list) list -> theory -> theory * thm list list |
40 val add_axiomss_i: ((bstring * term list) * theory attribute list) list -> theory -> theory * thm list list |
40 val add_axiomss_i: ((bstring * term list) * theory attribute list) list -> theory -> theory * thm list list |
41 val add_defs: ((bstring * string) * theory attribute list) list -> theory -> theory * thm list |
41 val add_defs: ((bstring * string) * theory attribute list) list -> theory -> theory * thm list |
246 |> foldl_map (fn (thy, arg) => add_thmx name_multi Thm.applys_attributes arg thy); |
246 |> foldl_map (fn (thy, arg) => add_thmx name_multi Thm.applys_attributes arg thy); |
247 |
247 |
248 |
248 |
249 (* have_thmss *) |
249 (* have_thmss *) |
250 |
250 |
251 fun have_thmss bname more_atts ths_atts thy = |
251 local |
252 let |
252 fun have_thss kind_atts (thy, ((bname, more_atts), ths_atts)) = |
253 fun app (x, (ths, atts)) = Thm.applys_attributes ((x, ths), atts); |
253 let |
254 val (thy', thmss') = |
254 fun app (x, (ths, atts)) = Thm.applys_attributes ((x, ths), atts); |
255 foldl_map app (thy, map (fn (ths, atts) => (ths, atts @ more_atts)) ths_atts); |
255 val (thy', thmss') = |
256 val thms' = flat thmss'; |
256 foldl_map app (thy, map (fn (ths, atts) => (ths, atts @ more_atts @ kind_atts)) ths_atts); |
257 val thms'' = enter_thmx (Theory.sign_of thy') name_multi (bname, thms'); |
257 val thms' = flat thmss'; |
258 in (thy', thms'') end; |
258 val thms'' = enter_thmx (Theory.sign_of thy') name_multi (bname, thms'); |
|
259 in (thy', (bname, thms'')) end; |
|
260 in |
|
261 fun have_thmss kind_atts args thy = foldl_map (have_thss kind_atts) (thy, args); |
|
262 end; |
259 |
263 |
260 |
264 |
261 (* store_thm *) |
265 (* store_thm *) |
262 |
266 |
263 fun store_thm th_atts thy = |
267 fun store_thm th_atts thy = |