src/Pure/Isar/proof_context.ML
changeset 6789 0e5a965de17a
parent 6762 a9a515a43ae0
child 6797 f86b96a0f6fb
equal deleted inserted replaced
6788:6eaf6856ee4a 6789:0e5a965de17a
    37   val add_binds_i: (indexname * term) list -> context -> context
    37   val add_binds_i: (indexname * term) list -> context -> context
    38   val match_binds: (string list * string) list -> context -> context
    38   val match_binds: (string list * string) list -> context -> context
    39   val match_binds_i: (term list * term) list -> context -> context
    39   val match_binds_i: (term list * term) list -> context -> context
    40   val bind_propp: context * (string * string list) -> context * term
    40   val bind_propp: context * (string * string list) -> context * term
    41   val bind_propp_i: context * (term * term list) -> context * term
    41   val bind_propp_i: context * (term * term list) -> context * term
       
    42   val auto_bind_goal: term -> context -> context
       
    43   val auto_bind_facts: term list -> context -> context
    42   val thms_closure: context -> xstring -> thm list option
    44   val thms_closure: context -> xstring -> thm list option
    43   val get_thm: context -> string -> thm
    45   val get_thm: context -> string -> thm
    44   val get_thms: context -> string -> thm list
    46   val get_thms: context -> string -> thm list
    45   val get_thmss: context -> string list -> thm list
    47   val get_thmss: context -> string list -> thm list
    46   val put_thm: string * thm -> context -> context
    48   val put_thm: string * thm -> context -> context
   560 
   562 
   561 val bind_propp = gen_bind_propp (read_prop_pat, read_prop);
   563 val bind_propp = gen_bind_propp (read_prop_pat, read_prop);
   562 val bind_propp_i = gen_bind_propp (cert_prop_pat, cert_prop);
   564 val bind_propp_i = gen_bind_propp (cert_prop_pat, cert_prop);
   563 
   565 
   564 
   566 
       
   567 (* auto binds *)
       
   568 
       
   569 val auto_bind_goal = add_binds_i o AutoBind.goal;
       
   570 val auto_bind_facts = add_binds_i o AutoBind.facts;
       
   571 
       
   572 
   565 
   573 
   566 (** theorems **)
   574 (** theorems **)
   567 
   575 
   568 (* thms_closure *)
   576 (* thms_closure *)
   569 
   577 
   636     val asms = map (Thm.assume o Thm.cterm_of sign) props;
   644     val asms = map (Thm.assume o Thm.cterm_of sign) props;
   637 
   645 
   638     val ths = map (fn th => ([th], [])) asms;
   646     val ths = map (fn th => ([th], [])) asms;
   639     val (ctxt'', (_, thms)) =
   647     val (ctxt'', (_, thms)) =
   640       ctxt'
   648       ctxt'
       
   649       |> auto_bind_facts props
   641       |> have_thmss name (attrs @ [Drule.tag_assumption]) ths;
   650       |> have_thmss name (attrs @ [Drule.tag_assumption]) ths;
   642 
   651 
   643     val ctxt''' =
   652     val ctxt''' =
   644       ctxt''
   653       ctxt''
   645       |> map_context (fn (thy, data, (assumes, fixes), binds, thms, defs) =>
   654       |> map_context (fn (thy, data, (assumes, fixes), binds, thms, defs) =>