diff options
| author | Hugo Herbelin | 2014-11-03 20:16:48 +0100 |
|---|---|---|
| committer | Hugo Herbelin | 2014-11-03 20:43:16 +0100 |
| commit | edbd6a211c934778d9721c36463836ef902b4fdd (patch) | |
| tree | 0b7e03083914a80b52c862ddc0d945431d0b6d92 /test-suite/bugs/closed/3068.v | |
| parent | 9a6e94199b4df828f160e4a107debd7cb16e66bc (diff) | |
New bugs revealed fixed: #3408 by (probably) Maxime's commits
on vm and #3068 by Nov 2 commit on destruct.
Also fixed test for failure of #3459.
Diffstat (limited to 'test-suite/bugs/closed/3068.v')
| -rw-r--r-- | test-suite/bugs/closed/3068.v | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/3068.v b/test-suite/bugs/closed/3068.v new file mode 100644 index 0000000000..7cdd4ea17e --- /dev/null +++ b/test-suite/bugs/closed/3068.v @@ -0,0 +1,60 @@ +Section Counted_list. + + Variable A : Type. + + Inductive counted_list : nat -> Type := + | counted_nil : counted_list 0 + | counted_cons : forall(n : nat), + A -> counted_list n -> counted_list (S n). + + + Fixpoint counted_def_nth{n : nat}(l : counted_list n) + (i : nat)(def : A) : A := + match i with + | 0 => match l with + | counted_nil => def + | counted_cons _ a _ => a + end + | S i => match l with + | counted_nil => def + | counted_cons _ _ tl => counted_def_nth tl i def + end + end. + + + Lemma counted_list_equal_nth_char : + forall(n : nat)(l1 l2 : counted_list n)(def : A), + (forall(i : nat), counted_def_nth l1 i def = counted_def_nth l2 i def) -> + l1 = l2. + Proof. + admit. + Qed. + +End Counted_list. + +Implicit Arguments counted_def_nth [A n]. + +Section Finite_nat_set. + + Variable set_size : nat. + + Definition fnat_subset : Type := counted_list bool set_size. + + Definition fnat_member(fs : fnat_subset)(n : nat) : Prop := + is_true (counted_def_nth fs n false). + + + Lemma fnat_subset_member_eq : forall(fs1 fs2 : fnat_subset), + fs1 = fs2 <-> + forall(n : nat), fnat_member fs1 n <-> fnat_member fs2 n. + + Proof. + intros fs1 fs2. + split. + intros H n. + subst fs1. + apply iff_refl. + intros H. + eapply counted_list_equal_nth_char. + intros i. + destruct (counted_def_nth fs1 i _ ) eqn:H0. |
