| (C.Prod (name1,s1,t1), C.Prod(_,s2,t2)) ->
aux true context s1 s2 &&
aux test_eq_only ((name1, C.Decl s1)::context) t1 t2
- | (C.Lambda (name1,s1,t1), C.Lambda(_,s2,t2)) ->
- aux true context s1 s2 &&
+ | (C.Lambda (name1,s1,t1), C.Lambda(_,_,t2)) ->
+ (* thanks to inversion of well typedness, the source
+ * of these lambdas must be already convertible *)
aux test_eq_only ((name1, C.Decl s1)::context) t1 t2
| (C.LetIn (name1,ty1,s1,t1), C.LetIn(_,ty2,s2,t2)) ->
aux test_eq_only context ty1 ty2 &&
| (C.Appl (C.Const r1::tl1), C.Appl (C.Const r2::tl2)) ->
r1 = r2 &&
let relevance = NCicEnvironment.get_relevance r1 in
+ let relevance =
+ match r1 with
+ | Ref.Ref (_,Ref.Con (_,_,lno)) ->
+ let _,relevance = HExtlib.split_nth lno relevance in
+ HExtlib.mk_list false lno @ relevance
+ | _ -> relevance
+ in
(try
HExtlib.list_forall_default3
(fun t1 t2 b -> not b || aux test_eq_only context t1 t2)