]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/cic_unification/cicMetaSubst.ml
the incomplete proofs were axiomatized
[helm.git] / helm / software / components / cic_unification / cicMetaSubst.ml
index 1dcbed6d297e4db01a5039e9eda32879c97d4ecd..96efe2e3cb7ff5f72442593effbc70d461452680 100644 (file)
@@ -740,13 +740,24 @@ debug_print(lazy (sprintf
           (List.map
             (function Some t -> ppterm subst t | None -> "_") l
           )))); *)
-      raise (Uncertain (lazy (sprintf
+      let msg = (lazy (sprintf
         "Error trying to abstract %s over [%s]: the algorithm only tried to abstract over bound variables"
         (ppterm subst t)
         (String.concat "; "
           (List.map
             (function Some t -> ppterm subst t | None -> "_")
-            l)))))
+            l))))
+      in
+       if
+        (*CSC: WARNING: if we are working up to reduction (I do not think so),
+          the following test should be replaced with "all the terms in l are
+          meta-closed" *)
+        not
+         (List.exists (function Some (Cic.Meta _) -> true | _ -> false ) l)
+       then
+        raise (MetaSubstFailure msg)
+       else
+        raise (Uncertain msg)
    in
    let (metasenv, subst) = restrict subst !to_be_restricted metasenv in
     res, metasenv, subst