src/Pure/tctical.ML
changeset 22360 26ead7ed4f4b
parent 20664 ffbc5a57191a
child 22596 d0d2af4db18f
equal deleted inserted replaced
22359:94a794672c8b 22360:26ead7ed4f4b
   158             | SOME(st',q) => EVY ((st',q,tacs)::trail, tacs) st'
   158             | SOME(st',q) => EVY ((st',q,tacs)::trail, tacs) st'
   159   and evyBack [] = Seq.empty (*no alternatives*)
   159   and evyBack [] = Seq.empty (*no alternatives*)
   160     | evyBack ((st',q,tacs)::trail) =
   160     | evyBack ((st',q,tacs)::trail) =
   161           case Seq.pull q of
   161           case Seq.pull q of
   162               NONE        => evyBack trail
   162               NONE        => evyBack trail
   163             | SOME(st,q') => if eq_thm (st',st)
   163             | SOME(st,q') => if Thm.eq_thm (st',st)
   164                              then evyBack ((st',q',tacs)::trail)
   164                              then evyBack ((st',q',tacs)::trail)
   165                              else EVY ((st,q',tacs)::trail, tacs) st
   165                              else EVY ((st,q',tacs)::trail, tacs) st
   166 in
   166 in
   167 
   167 
   168 (* EVERY [tac1,...,tacn]   equals    tac1 THEN ... THEN tacn   *)
   168 (* EVERY [tac1,...,tacn]   equals    tac1 THEN ... THEN tacn   *)
   300   in Seq.filter diff (tac st) end;
   300   in Seq.filter diff (tac st) end;
   301 
   301 
   302 (*Accept only next states that change the theorem's prop field
   302 (*Accept only next states that change the theorem's prop field
   303   (changes to signature, hyps, etc. don't count)*)
   303   (changes to signature, hyps, etc. don't count)*)
   304 fun CHANGED_PROP tac st =
   304 fun CHANGED_PROP tac st =
   305   let fun diff st' = not (Drule.eq_thm_prop (st, st'));
   305   let fun diff st' = not (Thm.eq_thm_prop (st, st'));
   306   in Seq.filter diff (tac st) end;
   306   in Seq.filter diff (tac st) end;
   307 
   307 
   308 
   308 
   309 (*** Tacticals based on subgoal numbering ***)
   309 (*** Tacticals based on subgoal numbering ***)
   310 
   310