| 1 |
Module A. |
| 2 |
|
| 3 |
Fixpoint foo (n:nat) := |
| 4 |
match n with |
| 5 |
| 0 => 0 |
| 6 |
| S n => bar n |
| 7 |
end |
| 8 |
|
| 9 |
with bar (n:nat) := |
| 10 |
match n with |
| 11 |
| 0 => 0 |
| 12 |
| S n => foo n |
| 13 |
end. |
| 14 |
|
| 15 |
Lemma using_foo: |
| 16 |
forall (n:nat), foo n = 0 /\ bar n = 0. |
| 17 |
Proof. |
| 18 |
induction n ; split ; auto ; |
| 19 |
destruct IHn ; auto. |
| 20 |
Qed. |
| 21 |
|
| 22 |
End A. |
| 23 |
|
| 24 |
|
| 25 |
Module B. |
| 26 |
|
| 27 |
Module A := A. |
| 28 |
Import A. |
| 29 |
|
| 30 |
End B. |
| 31 |
|
| 32 |
Module E. |
| 33 |
|
| 34 |
Module B := B. |
| 35 |
Import B.A. |
| 36 |
|
| 37 |
(* Bug 1 *) |
| 38 |
Lemma test_1: |
| 39 |
forall (n:nat), foo n = 0. |
| 40 |
Proof. |
| 41 |
intros ; destruct n. |
| 42 |
reflexivity. |
| 43 |
specialize (A.using_foo (S n)) ; intros. |
| 44 |
simpl in H. |
| 45 |
simpl. |
| 46 |
destruct H. |
| 47 |
assumption. |
| 48 |
Qed. |
| 49 |
|
| 50 |
End E. |