| 1 |
Module Type T. |
| 2 |
Parameter n : bool. |
| 3 |
End T. |
| 4 |
|
| 5 |
Module M. |
| 6 |
Definition n := true. |
| 7 |
End M. |
| 8 |
|
| 9 |
Module M'. |
| 10 |
Definition n := false. |
| 11 |
End M'. |
| 12 |
|
| 13 |
Module MAKE. |
| 14 |
|
| 15 |
Module FUN (E : T). |
| 16 |
|
| 17 |
Module F. |
| 18 |
Definition bug := E.n. |
| 19 |
End F. |
| 20 |
|
| 21 |
Module G := F. |
| 22 |
|
| 23 |
End FUN. |
| 24 |
|
| 25 |
End MAKE. |
| 26 |
|
| 27 |
Include MAKE. |
| 28 |
|
| 29 |
Module RES := FUN M. |
| 30 |
Module RES' := FUN M'. |
| 31 |
|
| 32 |
Lemma foo : RES.G.bug = RES'.G.bug. |
| 33 |
Proof. |
| 34 |
Fail reflexivity. (* Was succeeding, allowing to derive False with the code below. *) |
| 35 |
Abort. |
| 36 |
|
| 37 |
(* |
| 38 |
Lemma foo0 : RES.G.bug = true. |
| 39 |
Proof. |
| 40 |
reflexivity. |
| 41 |
Qed. |
| 42 |
|
| 43 |
Lemma foo1 : RES'.G.bug = false. |
| 44 |
Proof. |
| 45 |
reflexivity. |
| 46 |
Qed. |
| 47 |
|
| 48 |
Lemma unsound : False. |
| 49 |
Proof. |
| 50 |
assert (true = false); [|congruence]. |
| 51 |
rewrite <- foo0; rewrite <- foo1; apply foo. |
| 52 |
Qed. |
| 53 |
|
| 54 |
Print Assumptions unsound. |
| 55 |
*) |