use eta-contracted version for occurrence check (avoids possible non-termination)
authorkrauss
Fri, 10 Sep 2010 23:56:35 +0200
changeset 39297 4f9e933a16e2
parent 39283 635e09dea465
child 39298 5aefb5bc8a93
child 39315 27f7b7748425
use eta-contracted version for occurrence check (avoids possible non-termination) Test case: lemma "fwrap f = (%v. f v) ==> P f" apply clarify; pointed out by Thomas Sewell
src/Provers/hypsubst.ML
--- a/src/Provers/hypsubst.ML	Fri Sep 10 15:55:09 2010 +0200
+++ b/src/Provers/hypsubst.ML	Fri Sep 10 23:56:35 2010 +0200
@@ -115,11 +115,11 @@
      | (_, Bound i) => if loose(i,t) orelse novars andalso has_vars t
                        then raise Match
                        else false               (*eliminates u*)
-     | (Free _, _) =>  if bnd orelse Logic.occs(t,u) orelse
+     | (t' as Free _, _) => if bnd orelse Logic.occs(t',u) orelse
                           novars andalso has_vars u
                        then raise Match
                        else true                (*eliminates t*)
-     | (_, Free _) =>  if bnd orelse Logic.occs(u,t) orelse
+     | (_, u' as Free _) => if bnd orelse Logic.occs(u',t) orelse
                           novars andalso has_vars t
                        then raise Match
                        else false               (*eliminates u*)