gracefully handle the case where a constant is partially or not instantiated at all, as may happen when reconstructing Metis proofs for polymorphic type encodings
authorblanchet
Mon, 06 Jun 2011 20:36:35 +0200
changeset 43171 37e1431cc213
parent 43170 3f740034b927
child 43172 ea57961db57e
gracefully handle the case where a constant is partially or not instantiated at all, as may happen when reconstructing Metis proofs for polymorphic type encodings
src/HOL/Tools/ATP/atp_util.ML
--- a/src/HOL/Tools/ATP/atp_util.ML	Mon Jun 06 20:36:35 2011 +0200
+++ b/src/HOL/Tools/ATP/atp_util.ML	Mon Jun 06 20:36:35 2011 +0200
@@ -201,12 +201,11 @@
 fun is_type_surely_infinite ctxt infinite_Ts T =
   tiny_card_of_type ctxt 1 (map (rpair 0) infinite_Ts) T = 0
 
-fun monomorphic_term subst t =
+fun monomorphic_term subst =
   map_types (map_type_tvar (fn v =>
       case Type.lookup subst v of
         SOME typ => typ
-      | NONE => raise TERM ("monomorphic_term: uninstanitated schematic type \
-                            \variable", [t]))) t
+      | NONE => TVar v))
 
 fun eta_expand _ t 0 = t
   | eta_expand Ts (Abs (s, T, t')) n =