From 6070c7830a1980abdf87ed5cac607dce170f86f3 Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Tue, 2 Mar 2004 23:37:08 +0000 Subject: [PATCH] Bug in guarded_by_destructors (case Rel to a definition in the context) fixed. --- helm/ocaml/cic_proof_checking/cicTypeChecker.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 _ -- 2.39.2