Skip to content

Commit 9b90746

Browse files
committed
Fixes rocq-prover#7780 (missing lift in expanding alias under a binder in unification).
1 parent ab4bce3 commit 9b90746

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

pretyping/evarsolve.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ let invert_arg_from_subst evd aliases k0 subst_in_env_extended_with_k_binders c_
929929
with Not_found ->
930930
match expand_alias_once evd aliases t with
931931
| None -> raise Not_found
932-
| Some c -> aux k c in
932+
| Some c -> aux k (lift k c) in
933933
try
934934
let c = aux 0 c_in_env_extended_with_k_binders in
935935
Invertible (UniqueProjection (c,!effects))

test-suite/bugs/closed/7780.v

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
(* A lift was missing in expanding aliases under binders for unification *)
2+
3+
(* Below, the lift was missing while expanding the reference to
4+
[mkcons] in [?N] which was under binder [arg] *)
5+
6+
Goal forall T (t : T) (P P0 : T -> Set), option (option (list (P0 t)) -> option (list (P t))).
7+
intros ????.
8+
refine (Some
9+
(fun rls
10+
=> let mkcons := ?[M] in
11+
let default arg := ?[N] in
12+
match rls as rls (* 2 *) return option (list (P ?[O])) with
13+
| Some _ => None
14+
| None => None
15+
end)).
16+
Abort.

0 commit comments

Comments
 (0)