src/Pure/pure_thy.ML
changeset 14564 3667b4616e9a
parent 14384 2128a8f0a676
child 14669 00b9a5073b01
equal deleted inserted replaced
14563:4bf2d10461f3 14564:3667b4616e9a
    40   val forall_elim_var: int -> thm -> thm
    40   val forall_elim_var: int -> thm -> thm
    41   val forall_elim_vars: int -> thm -> thm
    41   val forall_elim_vars: int -> thm -> thm
    42   val add_thms: ((bstring * thm) * theory attribute list) list -> theory -> theory * thm list
    42   val add_thms: ((bstring * thm) * theory attribute list) list -> theory -> theory * thm list
    43   val add_thmss: ((bstring * thm list) * theory attribute list) list -> theory
    43   val add_thmss: ((bstring * thm list) * theory attribute list) list -> theory
    44     -> theory * thm list list
    44     -> theory * thm list list
    45   val have_thmss: theory attribute -> ((bstring * theory attribute list) *
    45   val note_thmss: theory attribute -> ((bstring * theory attribute list) *
    46     (xstring * theory attribute list) list) list -> theory -> theory * (bstring * thm list) list
    46     (xstring * theory attribute list) list) list -> theory -> theory * (bstring * thm list) list
    47   val have_thmss_i: theory attribute -> ((bstring * theory attribute list) *
    47   val note_thmss_i: theory attribute -> ((bstring * theory attribute list) *
    48     (thm list * theory attribute list) list) list -> theory -> theory * (bstring * thm list) list
    48     (thm list * theory attribute list) list) list -> theory -> theory * (bstring * thm list) list
    49   val add_axioms: ((bstring * string) * theory attribute list) list -> theory -> theory * thm list
    49   val add_axioms: ((bstring * string) * theory attribute list) list -> theory -> theory * thm list
    50   val add_axioms_i: ((bstring * term) * theory attribute list) list -> theory -> theory * thm list
    50   val add_axioms_i: ((bstring * term) * theory attribute list) list -> theory -> theory * thm list
    51   val add_axiomss: ((bstring * string list) * theory attribute list) list -> theory
    51   val add_axiomss: ((bstring * string list) * theory attribute list) list -> theory
    52     -> theory * thm list list
    52     -> theory * thm list list
   327 
   327 
   328 val add_thmss = gen_add_thmss (name_thms true);
   328 val add_thmss = gen_add_thmss (name_thms true);
   329 val add_thms = gen_add_thms (name_thms true);
   329 val add_thms = gen_add_thms (name_thms true);
   330 
   330 
   331 
   331 
   332 (* have_thmss(_i) *)
   332 (* note_thmss(_i) *)
   333 
   333 
   334 local
   334 local
   335 
   335 
   336 fun gen_have_thss get kind_att (thy, ((bname, more_atts), ths_atts)) =
   336 fun gen_note_thss get kind_att (thy, ((bname, more_atts), ths_atts)) =
   337   let
   337   let
   338     fun app (x, (ths, atts)) = Thm.applys_attributes ((x, ths), atts);
   338     fun app (x, (ths, atts)) = Thm.applys_attributes ((x, ths), atts);
   339     val (thy', thms) = enter_thms (Theory.sign_of thy)
   339     val (thy', thms) = enter_thms (Theory.sign_of thy)
   340       name_thmss (name_thms false) (apsnd flat o foldl_map app) thy
   340       name_thmss (name_thms false) (apsnd flat o foldl_map app) thy
   341       (bname, map (fn (ths, atts) => (get thy ths, atts @ more_atts @ [kind_att])) ths_atts);
   341       (bname, map (fn (ths, atts) => (get thy ths, atts @ more_atts @ [kind_att])) ths_atts);
   342   in (thy', (bname, thms)) end;
   342   in (thy', (bname, thms)) end;
   343 
   343 
   344 fun gen_have_thmss get kind_att args thy =
   344 fun gen_note_thmss get kind_att args thy =
   345   foldl_map (gen_have_thss get kind_att) (thy, args);
   345   foldl_map (gen_note_thss get kind_att) (thy, args);
   346 
   346 
   347 in
   347 in
   348 
   348 
   349 val have_thmss = gen_have_thmss get_thms;
   349 val note_thmss = gen_note_thmss get_thms;
   350 val have_thmss_i = gen_have_thmss (K I);
   350 val note_thmss_i = gen_note_thmss (K I);
   351 
   351 
   352 end;
   352 end;
   353 
   353 
   354 
   354 
   355 (* store_thm *)
   355 (* store_thm *)