Completing the bug fix from the previous update: the result of unifying type
authorpaulson
Sat, 10 Feb 2007 16:43:23 +0100
changeset 22307 bb31094b4879
parent 22306 a532c39c8917
child 22308 7901493455ca
Completing the bug fix from the previous update: the result of unifying type variables must be normalized WRT itself; otherwise instantiation is wrong
src/Pure/drule.ML
--- a/src/Pure/drule.ML	Sat Feb 10 09:26:26 2007 +0100
+++ b/src/Pure/drule.ML	Sat Feb 10 16:43:23 2007 +0100
@@ -910,7 +910,7 @@
       fun instT(ct,cu) =
         let val inst = cterm_of thy o Term.map_types (Envir.norm_type tye) o term_of
         in (inst ct, inst cu) end
-      fun ctyp2 (ixn, (S, T)) = (ctyp_of thy (TVar (ixn, S)), ctyp_of thy T)
+      fun ctyp2 (ixn, (S, T)) = (ctyp_of thy (TVar (ixn, S)), ctyp_of thy (Envir.norm_type tye T))
   in  instantiate (map ctyp2 (Vartab.dest tye), map instT ctpairs0) th  end
   handle TERM _ =>
            raise THM("cterm_instantiate: incompatible theories",0,[th])