src/Pure/Isar/element.ML
changeset 20058 7d035e26e5f9
parent 20007 8f9e6255108e
child 20068 19c7361db4a3
equal deleted inserted replaced
20057:058e913bac71 20058:7d035e26e5f9
    36   type witness
    36   type witness
    37   val map_witness: (term * thm -> term * thm) -> witness -> witness
    37   val map_witness: (term * thm -> term * thm) -> witness -> witness
    38   val witness_prop: witness -> term
    38   val witness_prop: witness -> term
    39   val witness_hyps: witness -> term list
    39   val witness_hyps: witness -> term list
    40   val assume_witness: theory -> term -> witness
    40   val assume_witness: theory -> term -> witness
    41   val prove_witness: theory -> term -> tactic -> witness
    41   val prove_witness: Proof.context -> term -> tactic -> witness
    42   val conclude_witness: witness -> thm
    42   val conclude_witness: witness -> thm
    43   val mark_witness: term -> term
    43   val mark_witness: term -> term
    44   val make_witness: term -> thm -> witness
    44   val make_witness: term -> thm -> witness
    45   val dest_witness: witness -> term * thm
    45   val dest_witness: witness -> term * thm
    46   val refine_witness: Proof.state -> Proof.state Seq.seq
    46   val refine_witness: Proof.state -> Proof.state Seq.seq
   272 fun witness_hyps (Witness (_, th)) = #hyps (Thm.rep_thm th);
   272 fun witness_hyps (Witness (_, th)) = #hyps (Thm.rep_thm th);
   273 
   273 
   274 fun assume_witness thy t =
   274 fun assume_witness thy t =
   275   Witness (t, Goal.protect (Thm.assume (Thm.cterm_of thy t)));
   275   Witness (t, Goal.protect (Thm.assume (Thm.cterm_of thy t)));
   276 
   276 
   277 fun prove_witness thy t tac =
   277 fun prove_witness ctxt t tac =
   278   Witness (t, Goal.prove thy [] [] (Logic.protect t) (fn _ =>
   278   Witness (t, Goal.prove ctxt [] [] (Logic.protect t) (fn _ =>
   279     Tactic.rtac Drule.protectI 1 THEN tac));
   279     Tactic.rtac Drule.protectI 1 THEN tac));
   280 
   280 
   281 fun conclude_witness (Witness (_, th)) = Goal.norm_hhf (Goal.conclude th);
   281 fun conclude_witness (Witness (_, th)) = Goal.norm_hhf (Goal.conclude th);
   282 
   282 
   283 val mark_witness = Logic.protect;
   283 val mark_witness = Logic.protect;