| 1 |
(* Weird corner case accepted by the pattern-matching algorithm. Destructuring |
| 2 |
let-bindings in patterns can actually be shorter than the case they match. *) |
| 3 |
|
| 4 |
Inductive ascii : Set := |
| 5 |
| Ascii : bool -> bool -> bool -> bool -> bool -> bool -> bool -> bool -> ascii. |
| 6 |
|
| 7 |
Definition dummy (a : ascii) : unit := |
| 8 |
let (a0,a1,a2,a3,a4,a5,a6,a7) := a in tt. |
| 9 |
|
| 10 |
Goal forall (a : ascii) (H : tt = dummy a), True. |
| 11 |
Proof. |
| 12 |
intros a H. |
| 13 |
unfold dummy in *. |
| 14 |
(* Two bound variables in the pattern, eight in the term. *) |
| 15 |
match goal with |
| 16 |
| H:context [ let (x, y) := ?X in _ ] |- _ => destruct X eqn:? |
| 17 |
end. |
| 18 |
Abort. |