aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <mattam@mattam.org>2014-06-17 14:21:51 +0200
committerGravatar Matthieu Sozeau <mattam@mattam.org>2014-06-17 15:42:14 +0200
commit2b7bede68c213fbb884c773c073ba31a886f41f4 (patch)
treebb91ed3f2d7bf0dea38551cd5f7674842398b92d
parentd104b50b9c9a589d9fd8e44bdf56794c8aea4e53 (diff)
Fix a de Bruijn bug in checking code of projections.
-rw-r--r--kernel/term_typing.ml2
-rw-r--r--test-suite/bugs/opened/HoTT_coq_078.v2
2 files changed, 2 insertions, 2 deletions
diff --git a/kernel/term_typing.ml b/kernel/term_typing.ml
index d6df6366c..ec9541189 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 a2c97d067..6c02cad56 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