tactical CHANGED now uses alpha-eta conversion, not alpha conversion
authorpaulson
Mon, 30 Nov 1998 10:45:39 +0100
changeset 5997 4d00bbd3d3ac
parent 5996 6b6e0ede3517
child 5998 b2ecd577b8a3
tactical CHANGED now uses alpha-eta conversion, not alpha conversion Streamlined code
src/Pure/tctical.ML
--- a/src/Pure/tctical.ML	Mon Nov 30 10:44:05 1998 +0100
+++ b/src/Pure/tctical.ML	Mon Nov 30 10:45:39 1998 +0100
@@ -327,12 +327,13 @@
 (*Returns all states that have changed in subgoal i, counted from the LAST
   subgoal.  For stac, for example.*)
 fun CHANGED_GOAL tac i st = 
-    let val j = nprems_of st - i
+    let val j = nprems_of st
         val t = List.nth(prems_of st, i-1)
-        fun diff st' = 
-	    not (nprems_of st' > j   (*subgoal is still there*)
+        fun diff st' = (*true if subgoal still exists and is same as old one*)
+	    not (nprems_of st' >= j
 		 andalso
-		 t aconv List.nth(prems_of st', nprems_of st' - j - 1))
+		 Pattern.aeconv (t,
+				 List.nth(prems_of st', nprems_of st' - j)))
     in  Seq.filter diff (tac i st)  end
     handle Subscript => Seq.empty  (*no subgoal i*);