X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Focaml%2Fcic_unification%2FcicUnification.ml;h=164a9cdce3bf88b9cb377eecd079bae24dcc04a3;hb=044618edc33fa1cf00ec345e84c2a62939746751;hp=8ba84c74c5bf4030db111b4011c632dc51cf1186;hpb=988c82d4f12d40605db40212d396d9bc7f6b5eb6;p=helm.git diff --git a/helm/ocaml/cic_unification/cicUnification.ml b/helm/ocaml/cic_unification/cicUnification.ml index 8ba84c74c..164a9cdce 100644 --- a/helm/ocaml/cic_unification/cicUnification.ml +++ b/helm/ocaml/cic_unification/cicUnification.ml @@ -33,7 +33,8 @@ exception OpenTerm;; (* the delift function takes in input an ordered list of optional terms *) (* [t1,...,tn] and a term t, and substitutes every tk = Some (rel(nk)) with *) -(* rel(k). Typically, the list of optional terms is the explicit substitution *)(* that is applied to a metavariable occurrence and the result of the delift *) +(* rel(k). Typically, the list of optional terms is the explicit substitution *) +(* that is applied to a metavariable occurrence and the result of the delift *) (* function is a term the implicit variable can be substituted with to make *) (* the term [t] unifiable with the metavariable occurrence. *) (* In general, the problem is undecidable if we consider equivalence in place *) @@ -92,10 +93,16 @@ let delift context metasenv l t = (*CSC: first order unification. Does it help or does it harm? *) deliftaux k (S.lift m t) | Some (_,C.Decl t) -> - (* It may augment to_be_restricted *) - (*CSC: Really? Even in the case of well-typed terms? *) - (*CSC: I am no longer sure of the usefulness of the check *) - ignore (deliftaux k (S.lift m t)) ; + (*CSC: The following check seems to be wrong! *) + (*CSC: B:Set |- ?2 : Set *) + (*CSC: A:Set ; x:?2[A/B] |- ?1[x/A] =?= x *) + (*CSC: Why should I restrict ?2 over B? The instantiation *) + (*CSC: ?1 := A is perfectly reasonable and well-typed. *) + (*CSC: Thus I comment out the following two lines that *) + (*CSC: are the incriminated ones. *) + (*(* It may augment to_be_restricted *) + ignore (deliftaux k (S.lift m t)) ;*) + (*CSC: end of bug commented out *) C.Rel ((position (m-k) l) + k) | None -> raise RelToHiddenHypothesis) | C.Var (uri,exp_named_subst) -> @@ -492,6 +499,7 @@ let unwind metasenv subst unwinded t = (* during the unwinding the eta-expansions are undone. *) let apply_subst_reducing subst meta_to_reduce t = + (* andrea: che senso ha questo ref ?? *) let unwinded = ref subst in let rec um_aux = let module C = Cic in