diff options
| author | Gaëtan Gilbert | 2018-10-31 14:29:39 +0100 |
|---|---|---|
| committer | Gaëtan Gilbert | 2018-10-31 14:30:24 +0100 |
| commit | a6c1292b72cebf3d34a0e6a2da256e83e346dacc (patch) | |
| tree | 0b56fcd9f289bfbf6f56a088866f62aaeafd27ff /test-suite | |
| parent | 86971b6280a660e1db3e7567aa104f5f7eec9e8c (diff) | |
Fix #8881: validate fails to use inductive equivalence in case_info
See also 55dbe8e2fa7ed2053ecd54140f6bcbdf31981e0b
Diffstat (limited to 'test-suite')
| -rw-r--r-- | test-suite/coqchk/bug_8881.v | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test-suite/coqchk/bug_8881.v b/test-suite/coqchk/bug_8881.v new file mode 100644 index 0000000000..dfc209b318 --- /dev/null +++ b/test-suite/coqchk/bug_8881.v @@ -0,0 +1,23 @@ + +(* Check use of equivalence on inductive types (bug #1242) *) + +Module Type ASIG. + Inductive t : Set := a | b : t. + Definition f := fun x => match x with a => true | b => false end. +End ASIG. + +Module Type BSIG. + Declare Module A : ASIG. + Definition f := fun x => match x with A.a => true | A.b => false end. +End BSIG. + +Module C (A : ASIG) (B : BSIG with Module A:=A). + + (* Check equivalence is considered in "case_info" *) + Lemma test : forall x, A.f x = B.f x. + Proof. + intro x. unfold B.f, A.f. + destruct x; reflexivity. + Qed. + +End C. |
