| 1 |
(* Dependent higher-order hole in "refine" (simplified version) *) |
| 2 |
|
| 3 |
Set Implicit Arguments. |
| 4 |
|
| 5 |
Inductive Nest t := Cons : Nest (prod t t) -> Nest t. |
| 6 |
|
| 7 |
Definition cast A x y Heq P H := @eq_rect A x P H y Heq. |
| 8 |
|
| 9 |
Definition replace a (y:Nest (prod a a)) : a = a -> Nest a. |
| 10 |
|
| 11 |
(* This used to raise an anomaly Unknown Meta in 8.2 and 8.3beta. |
| 12 |
It raises a regular error in 8.3 and almost succeeds with the new |
| 13 |
proof engine: there are two solutions to a unification problem |
| 14 |
(P:=\a.Nest (prod a a) and P:=\_.Nest (prod a a)) and refine should either |
| 15 |
leave P as subgoal or choose itself one solution *) |
| 16 |
|
| 17 |
intros. Fail refine (Cons (cast H _ y)). |
| 18 |
Unset Solve Unification Constraints. (* Keep the unification constraint around *) |
| 19 |
refine (Cons (cast H _ y)). |
| 20 |
intros. |
| 21 |
refine (Nest (prod X X)). Qed. |