Debian Codegraph @

test-suite/coqchk/bug_8881.v

raw
1
2 (* Check use of equivalence on inductive types (bug #1242) *)
3
4 Module Type ASIG.
5 Inductive t : Set := a | b : t.
6 Definition f := fun x => match x with a => true | b => false end.
7 End ASIG.
8
9 Module Type BSIG.
10 Declare Module A : ASIG.
11 Definition f := fun x => match x with A.a => true | A.b => false end.
12 End BSIG.
13
14 Module C (A : ASIG) (B : BSIG with Module A:=A).
15
16 (* Check equivalence is considered in "case_info" *)
17 Lemma test : forall x, A.f x = B.f x.
18 Proof.
19 intro x. unfold B.f, A.f.
20 destruct x; reflexivity.
21 Qed.
22
23 End C.