test-suite/success/change_case.v
raw| 1 | Inductive box (A : Type) := Box : A -> box A. |
| 2 | |
| 3 | Axiom PRED : unit -> Prop. |
| 4 | Axiom FUN : forall (u : unit), box (PRED u). |
| 5 | |
| 6 | Axiom U : unit. |
| 7 | Definition V := U. |
| 8 | |
| 9 | Goal match FUN U with Box _ _ => True end. |
| 10 | Proof. |
| 11 | repeat match goal with |
| 12 | | [ |- context G[ U ] ] => |
| 13 | let e := context G [ V ] in |
| 14 | change e |
| 15 | end. |
| 16 | set (Z := V). |
| 17 | clearbody Z. (* This fails if change misses the case parameters *) |
| 18 | destruct (FUN Z). |
| 19 | constructor. |
| 20 | Qed. |