459 (**** substitutions ****) |
459 (**** substitutions ****) |
460 |
460 |
461 fun del_conflicting_tvars envT T = Term_Subst.instantiateT |
461 fun del_conflicting_tvars envT T = Term_Subst.instantiateT |
462 (map_filter (fn ixnS as (_, S) => |
462 (map_filter (fn ixnS as (_, S) => |
463 (Type.lookup envT ixnS; NONE) handle TYPE _ => |
463 (Type.lookup envT ixnS; NONE) handle TYPE _ => |
464 SOME (ixnS, TFree ("'dummy", S))) (OldTerm.typ_tvars T)) T; |
464 SOME (ixnS, TFree ("'dummy", S))) (Term.add_tvarsT T [])) T; |
465 |
465 |
466 fun del_conflicting_vars env t = Term_Subst.instantiate |
466 fun del_conflicting_vars env t = Term_Subst.instantiate |
467 (map_filter (fn ixnS as (_, S) => |
467 (map_filter (fn ixnS as (_, S) => |
468 (Type.lookup (Envir.type_env env) ixnS; NONE) handle TYPE _ => |
468 (Type.lookup (Envir.type_env env) ixnS; NONE) handle TYPE _ => |
469 SOME (ixnS, TFree ("'dummy", S))) (OldTerm.term_tvars t), |
469 SOME (ixnS, TFree ("'dummy", S))) (Term.add_tvars t []), |
470 map_filter (fn Var (ixnT as (_, T)) => |
470 map_filter (fn (ixnT as (_, T)) => |
471 (Envir.lookup (env, ixnT); NONE) handle TYPE _ => |
471 (Envir.lookup (env, ixnT); NONE) handle TYPE _ => |
472 SOME (ixnT, Free ("dummy", T))) (OldTerm.term_vars t)) t; |
472 SOME (ixnT, Free ("dummy", T))) (Term.add_vars t [])) t; |
473 |
473 |
474 fun norm_proof env = |
474 fun norm_proof env = |
475 let |
475 let |
476 val envT = Envir.type_env env; |
476 val envT = Envir.type_env env; |
477 fun msg s = warning ("type conflict in norm_proof:\n" ^ s); |
477 fun msg s = warning ("type conflict in norm_proof:\n" ^ s); |