From b22ad9b6f6330602742ca300370c3ff57c6bb3e9 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Thu, 3 Apr 2008 16:26:19 +0000 Subject: [PATCH] bug found rewriting the kernel backported: n instead of m when pulling a def from the context, previously a meaningless index was used --- helm/software/components/cic_proof_checking/cicTypeChecker.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helm/software/components/cic_proof_checking/cicTypeChecker.ml b/helm/software/components/cic_proof_checking/cicTypeChecker.ml index ad00c0eeb..dd25edac4 100644 --- a/helm/software/components/cic_proof_checking/cicTypeChecker.ml +++ b/helm/software/components/cic_proof_checking/cicTypeChecker.ml @@ -934,10 +934,10 @@ and guarded_by_destructors ~subst context n nn kl x safes = function C.Rel m when m > n && m <= nn -> false | C.Rel m -> - (match List.nth context (n-1) with + (match List.nth context (m-1) with Some (_,C.Decl _) -> true | Some (_,C.Def (bo,_)) -> - guarded_by_destructors ~subst context m nn kl x safes + guarded_by_destructors ~subst context n nn kl x safes (CicSubstitution.lift m bo) | None -> raise (TypeCheckerFailure (lazy "Reference to deleted hypothesis")) ) -- 2.39.2