test-suite/bugs/bug_10812.v
raw| 1 | (* subst with indirectly dependent section variables *) |
| 2 | |
| 3 | Section A. |
| 4 | |
| 5 | Variable a:nat. |
| 6 | Definition b := a. |
| 7 | |
| 8 | Goal a=1 -> a+a=1 -> b=1. |
| 9 | intros. |
| 10 | Fail subst a. (* was working; we make it failing *) |
| 11 | rewrite H in H0. |
| 12 | discriminate. |
| 13 | Qed. |
| 14 | |
| 15 | Goal a=1 -> a+a=1 -> b=1. |
| 16 | intros. |
| 17 | subst. (* should not apply to a *) |
| 18 | rewrite H in H0. |
| 19 | discriminate. |
| 20 | Qed. |
| 21 | |
| 22 | Goal forall t, a=t -> b=t. |
| 23 | intros. |
| 24 | subst. |
| 25 | reflexivity. |
| 26 | Qed. |
| 27 | |
| 28 | End A. |