src/Pure/goal.ML
changeset 20290 3f886c176c9b
parent 20260 990dbc007ca6
child 21516 c2a116a2c4fd
equal deleted inserted replaced
20289:ba7a7c56bed5 20290:3f886c176c9b
    19   val finish: thm -> thm
    19   val finish: thm -> thm
    20   val compose_hhf: thm -> int -> thm -> thm Seq.seq
    20   val compose_hhf: thm -> int -> thm -> thm Seq.seq
    21   val compose_hhf_tac: thm -> int -> tactic
    21   val compose_hhf_tac: thm -> int -> tactic
    22   val comp_hhf: thm -> thm -> thm
    22   val comp_hhf: thm -> thm -> thm
    23   val prove_raw: cterm list -> cterm -> (thm list -> tactic) -> thm
    23   val prove_raw: cterm list -> cterm -> (thm list -> tactic) -> thm
    24   val prove_multi: Context.proof -> string list -> term list -> term list ->
    24   val prove_multi: Proof.context -> string list -> term list -> term list ->
    25     ({prems: thm list, context: Context.proof} -> tactic) -> thm list
    25     ({prems: thm list, context: Proof.context} -> tactic) -> thm list
    26   val prove: Context.proof -> string list -> term list -> term ->
    26   val prove: Proof.context -> string list -> term list -> term ->
    27     ({prems: thm list, context: Context.proof} -> tactic) -> thm
    27     ({prems: thm list, context: Proof.context} -> tactic) -> thm
    28   val prove_global: theory -> string list -> term list -> term -> (thm list -> tactic) -> thm
    28   val prove_global: theory -> string list -> term list -> term -> (thm list -> tactic) -> thm
    29   val extract: int -> int -> thm -> thm Seq.seq
    29   val extract: int -> int -> thm -> thm Seq.seq
    30   val retrofit: int -> int -> thm -> thm -> thm Seq.seq
    30   val retrofit: int -> int -> thm -> thm -> thm Seq.seq
    31 end;
    31 end;
    32 
    32 
    37 
    37 
    38 (*
    38 (*
    39   -------- (init)
    39   -------- (init)
    40   C ==> #C
    40   C ==> #C
    41 *)
    41 *)
    42 fun init ct = Drule.instantiate' [] [SOME ct] Drule.protectI;
    42 val init =
       
    43   let val A = #1 (Drule.dest_implies (Thm.cprop_of Drule.protectI))
       
    44   in fn C => Thm.instantiate ([], [(A, C)]) Drule.protectI end;
    43 
    45 
    44 (*
    46 (*
    45    C
    47    C
    46   --- (protect)
    48   --- (protect)
    47   #C
    49   #C
   130       handle THM (msg, _, _) => err msg;
   132       handle THM (msg, _, _) => err msg;
   131     val _ = Unify.matches_list thy (map Thm.term_of cprops) (map Thm.prop_of results)
   133     val _ = Unify.matches_list thy (map Thm.term_of cprops) (map Thm.prop_of results)
   132       orelse err ("Proved a different theorem: " ^ string_of_term (Thm.prop_of res));
   134       orelse err ("Proved a different theorem: " ^ string_of_term (Thm.prop_of res));
   133   in
   135   in
   134     results
   136     results
   135     |> (Seq.hd o Assumption.exports false ctxt' ctxt)
   137     |> map (Assumption.export false ctxt' ctxt)
   136     |> Variable.export ctxt' ctxt
   138     |> Variable.export ctxt' ctxt
   137     |> map Drule.zero_var_indexes
   139     |> map Drule.zero_var_indexes
   138   end;
   140   end;
   139 
   141 
   140 
   142