From 2b7bede68c213fbb884c773c073ba31a886f41f4 Mon Sep 17 00:00:00 2001 From: Matthieu Sozeau Date: Tue, 17 Jun 2014 14:21:51 +0200 Subject: Fix a de Bruijn bug in checking code of projections. --- kernel/term_typing.ml | 2 +- test-suite/bugs/opened/HoTT_coq_078.v | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/term_typing.ml b/kernel/term_typing.ml index d6df6366cb..ec9541189a 100644 --- a/kernel/term_typing.ml +++ b/kernel/term_typing.ml @@ -138,7 +138,7 @@ let check_projection env kn inst body = not (isLambda p) then cannot_recognize () in - let (na, t, ty) = destLambda p in + let (na, t, ty) = destLambda (Vars.subst1 mkProp p) in let argctx, p = decompose_lam_assum b.(0) in (* No need to check the lambdas as the case is well-formed *) let () = if not (isRel p) then cannot_recognize () in diff --git a/test-suite/bugs/opened/HoTT_coq_078.v b/test-suite/bugs/opened/HoTT_coq_078.v index a2c97d0675..6c02cad567 100644 --- a/test-suite/bugs/opened/HoTT_coq_078.v +++ b/test-suite/bugs/opened/HoTT_coq_078.v @@ -35,7 +35,7 @@ Definition transport_prod' {A : Type} {P Q : A -> Type} {a a' : A} (p : a = a') | idpath => idpath end. (* success *) -Fail Definition transport_prod {A : Type} {P Q : A -> Type} {a a' : A} (p : a = a') +Definition transport_prod {A : Type} {P Q : A -> Type} {a a' : A} (p : a = a') (z : P a * Q a) : transport (fun a => P a * Q a) p z = (transport _ p (fst z), transport _ p (snd z)) := match p with -- cgit v1.2.3