From: Claudio Sacerdoti Coen Date: Tue, 2 Mar 2004 23:37:08 +0000 (+0000) Subject: Bug in guarded_by_destructors (case Rel to a definition in the context) fixed. X-Git-Tag: v0_0_4~48 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=6070c7830a1980abdf87ed5cac607dce170f86f3;p=helm.git Bug in guarded_by_destructors (case Rel to a definition in the context) fixed. --- diff --git a/helm/ocaml/cic_proof_checking/cicTypeChecker.ml b/helm/ocaml/cic_proof_checking/cicTypeChecker.ml index c4d62986e..d8d4f25f7 100644 --- a/helm/ocaml/cic_proof_checking/cicTypeChecker.ml +++ b/helm/ocaml/cic_proof_checking/cicTypeChecker.ml @@ -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 _