]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_unification/cicUnification.ml
One of the bug I detected (and commented) in my last commit was not a bug.
[helm.git] / helm / ocaml / cic_unification / cicUnification.ml
index bc736b260799f548c11c4b82a8861b254a40724f..d50818f73461ac6a31717f181177cc4d8b5d40ca 100644 (file)
@@ -67,6 +67,7 @@ let restrict to_be_restricted =
 ;;
 
 
+(*CSC: maybe we should rename delift in abstract, as I did in my dissertation *)
 let delift context metasenv l t =
  let module S = CicSubstitution in
   let to_be_restricted = ref [] in
@@ -77,11 +78,17 @@ let delift context metasenv l t =
          if m <=k then
           C.Rel m   (*CSC: che succede se c'e' un Def? Dovrebbe averlo gia' *)
                     (*CSC: deliftato la regola per il LetIn                 *)
+                    (*CSC: FALSO! La regola per il LetIn non lo fa          *)
          else
           (match List.nth context (m-k-1) with
-            Some (_,C.Def (t,_)) -> deliftaux k (S.lift m t)
+            Some (_,C.Def (t,_)) ->
+             (*CSC: Hmmm. This bit of reduction is not in the spirit of    *)
+             (*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)) ;
              C.Rel ((position (m-k) l) + k)
           | None -> raise RelToHiddenHypothesis)
@@ -91,9 +98,6 @@ let delift context metasenv l t =
         in
          C.Var (uri,exp_named_subst')
      | C.Meta (i, l1) as t -> 
-(* CSC: BIG BUG HERE! In the explicit substitution l1 = [t1 ; t2],       *)
-(* CSC: it is NOT true that Rel(1) in t2 refers to t1 (i.e. the explicit *)
-(* CSC: substitution is simultaneous, not telescopic. To be fixes ASAP.  *)
         let rec deliftl j =
          function
             [] -> []