]> matita.cs.unibo.it Git - helm.git/commitdiff
Bug in guarded_by_destructors (case Rel to a definition in the context) fixed.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 2 Mar 2004 23:37:08 +0000 (23:37 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 2 Mar 2004 23:37:08 +0000 (23:37 +0000)
helm/ocaml/cic_proof_checking/cicTypeChecker.ml

index c4d62986e100a84f7800a6cc99beaaf75179ebc8..d8d4f25f73c7cad056cce7a9003acb2277c674e5 100644 (file)
@@ -793,11 +793,12 @@ and guarded_by_destructors context n nn kl x safes =
  let module U = UriManager in
   function
      C.Rel m when m > n && m <= nn -> false
-   | C.Rel n ->
+   | C.Rel m ->
       (match List.nth context (n-1) with
           Some (_,C.Decl _) -> true
         | Some (_,C.Def (bo,_)) ->
-           guarded_by_destructors context n nn kl x safes bo
+           guarded_by_destructors context m nn kl x safes
+            (CicSubstitution.lift m bo)
        | None -> raise (TypeCheckerFailure "Reference to deleted hypothesis")
       )
    | C.Meta _