src/Pure/Isar/method.ML
changeset 10907 51be80fc4439
parent 10821 dcb75538f542
child 11731 1a0c1ef86518
equal deleted inserted replaced
10906:de95ba2760fe 10907:51be80fc4439
    39   val insert_facts: Proof.method
    39   val insert_facts: Proof.method
    40   val unfold: thm list -> Proof.method
    40   val unfold: thm list -> Proof.method
    41   val fold: thm list -> Proof.method
    41   val fold: thm list -> Proof.method
    42   val atomize_tac: thm list -> int -> tactic
    42   val atomize_tac: thm list -> int -> tactic
    43   val atomize_goal: thm list -> int -> thm -> thm
    43   val atomize_goal: thm list -> int -> thm -> thm
       
    44   val atomize_strip_tac: thm list * thm list -> int -> tactic
    44   val multi_resolve: thm list -> thm -> thm Seq.seq
    45   val multi_resolve: thm list -> thm -> thm Seq.seq
    45   val multi_resolves: thm list -> thm list -> thm Seq.seq
    46   val multi_resolves: thm list -> thm list -> thm Seq.seq
    46   val rule_tac: thm list -> thm list -> int -> tactic
    47   val rule_tac: thm list -> thm list -> int -> tactic
    47   val some_rule_tac: thm list -> Proof.context -> thm list -> int -> tactic
    48   val some_rule_tac: thm list -> Proof.context -> thm list -> int -> tactic
    48   val rule: thm list -> Proof.method
    49   val rule: thm list -> Proof.method
   271 fun fold thms = SIMPLE_METHOD (CHANGED_PROP (fold_goals_tac thms));
   272 fun fold thms = SIMPLE_METHOD (CHANGED_PROP (fold_goals_tac thms));
   272 
   273 
   273 
   274 
   274 (* atomize meta-connectives *)
   275 (* atomize meta-connectives *)
   275 
   276 
   276 fun atomize_tac rews =
   277 fun atomize_strip_tac (rews, strip) =
   277   let val rew_tac = rewrite_goal_tac rews in
   278   let val rew_tac = rewrite_goal_tac rews in
   278     fn i => fn thm =>
   279     fn i => fn thm =>
   279       if Logic.has_meta_prems (#prop (Thm.rep_thm thm)) i then rew_tac i thm
   280       if Logic.has_meta_prems (#prop (Thm.rep_thm thm)) i then
       
   281         (rew_tac i THEN REPEAT (match_tac strip i)) thm
   280       else all_tac thm
   282       else all_tac thm
   281   end;
   283   end;
       
   284 
       
   285 fun atomize_tac rews = atomize_strip_tac (rews, []);
   282 
   286 
   283 fun atomize_goal rews =
   287 fun atomize_goal rews =
   284   let val tac = atomize_tac rews
   288   let val tac = atomize_tac rews
   285   in fn i => fn thm => (case Seq.pull (tac i thm) of None => thm | Some (thm', _) => thm') end;
   289   in fn i => fn thm => (case Seq.pull (tac i thm) of None => thm | Some (thm', _) => thm') end;
   286 
   290