diff options
| author | Pierre-Marie Pédrot | 2015-07-29 12:12:35 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2015-07-29 12:12:35 +0200 |
| commit | e76ab0ec81040cbe99f616e8457bdc26cc6dceb6 (patch) | |
| tree | 5bcdbed2dac27feeb27caf840e8cad24e7483a9a /test-suite | |
| parent | aff5a1aaeb9b50c60ff32b7d5336a44fd18428ee (diff) | |
| parent | 0dac9618c695a345f82ee302b205217fff29be29 (diff) | |
Merge branch 'v8.5'
Diffstat (limited to 'test-suite')
| -rw-r--r-- | test-suite/bugs/closed/2243.v | 9 | ||||
| -rw-r--r-- | test-suite/bugs/closed/3509.v | 6 | ||||
| -rw-r--r-- | test-suite/bugs/closed/3510.v | 5 | ||||
| -rw-r--r-- | test-suite/bugs/closed/3736.v | 8 | ||||
| -rw-r--r-- | test-suite/bugs/closed/4280.v | 24 | ||||
| -rw-r--r-- | test-suite/bugs/closed/4305.v | 17 | ||||
| -rw-r--r-- | test-suite/bugs/opened/3509.v | 19 | ||||
| -rw-r--r-- | test-suite/bugs/opened/3510.v | 35 |
8 files changed, 69 insertions, 54 deletions
diff --git a/test-suite/bugs/closed/2243.v b/test-suite/bugs/closed/2243.v new file mode 100644 index 0000000000..6d45c9a09e --- /dev/null +++ b/test-suite/bugs/closed/2243.v @@ -0,0 +1,9 @@ +Inductive is_nul: nat -> Prop := X: is_nul 0. +Section O. +Variable u: nat. +Variable H: is_nul u. +Goal True. +Proof. +destruct H. +Undo. +revert H; intro H; destruct H. diff --git a/test-suite/bugs/closed/3509.v b/test-suite/bugs/closed/3509.v new file mode 100644 index 0000000000..8226622670 --- /dev/null +++ b/test-suite/bugs/closed/3509.v @@ -0,0 +1,6 @@ +Inductive T := Foo : T. +Axiom (b : T) (R : forall x : T, Prop) (f : forall x : T, R x). +Axiom a1 : match b with Foo => f end = f. +Axiom a2 : match b with Foo => f b end = f b. +Hint Rewrite a1 : bar. +Hint Rewrite a2 : bar. diff --git a/test-suite/bugs/closed/3510.v b/test-suite/bugs/closed/3510.v new file mode 100644 index 0000000000..4cbae33590 --- /dev/null +++ b/test-suite/bugs/closed/3510.v @@ -0,0 +1,5 @@ +Inductive T := Foo : T. +Axiom (b : T) (R : forall x : T, Prop) (f : forall x : T, R x). +Axiom a1 : match b with Foo => f end = f. +Axiom a2 : match b with Foo => f b end = f b. +Hint Rewrite a1 a2 : bar. diff --git a/test-suite/bugs/closed/3736.v b/test-suite/bugs/closed/3736.v new file mode 100644 index 0000000000..637b77cc58 --- /dev/null +++ b/test-suite/bugs/closed/3736.v @@ -0,0 +1,8 @@ +(* Check non-error failure in case of unsupported decidability scheme *) +Local Set Decidable Equality Schemes. + +Inductive a := A with b := B. + +(* But fails with error if explicitly asked for the scheme *) + +Fail Scheme Equality for a. diff --git a/test-suite/bugs/closed/4280.v b/test-suite/bugs/closed/4280.v new file mode 100644 index 0000000000..fd7897509e --- /dev/null +++ b/test-suite/bugs/closed/4280.v @@ -0,0 +1,24 @@ +Require Import ZArith. +Require Import Eqdep_dec. +Local Open Scope Z_scope. + +Definition t := { n: Z | n > 1 }. + +Program Definition two : t := 2. +Next Obligation. omega. Qed. + +Program Definition t_eq (x y: t) : {x=y} + {x<>y} := + if Z.eq_dec (proj1_sig x) (proj1_sig y) then left _ else right _. +Next Obligation. + destruct x as [x Px], y as [y Py]. simpl in H; subst y. + f_equal. apply UIP_dec. decide equality. +Qed. +Next Obligation. + congruence. +Qed. + +Definition t_list_eq: forall (x y: list t), {x=y} + {x<>y}. +Proof. decide equality. apply t_eq. Defined. + +Goal match t_list_eq (two::nil) (two::nil) with left _ => True | right _ => False end. +Proof. exact I. Qed. diff --git a/test-suite/bugs/closed/4305.v b/test-suite/bugs/closed/4305.v new file mode 100644 index 0000000000..39fc02d22b --- /dev/null +++ b/test-suite/bugs/closed/4305.v @@ -0,0 +1,17 @@ +(* Check fallback when an abbreviation is not interpretable as a pattern *) + +Notation foo := Type. + +Definition t := + match 0 with + | S foo => foo + | _ => 0 + end. + +Notation bar := (option Type). + +Definition u := + match 0 with + | S bar => bar + | _ => 0 + end. diff --git a/test-suite/bugs/opened/3509.v b/test-suite/bugs/opened/3509.v deleted file mode 100644 index 3913bbb43f..0000000000 --- a/test-suite/bugs/opened/3509.v +++ /dev/null @@ -1,19 +0,0 @@ -Require Import TestSuite.admit. -Lemma match_bool_fn b A B xT xF -: match b as b return forall x : A, B b x with - | true => xT - | false => xF - end - = fun x : A => match b as b return B b x with - | true => xT x - | false => xF x - end. -admit. -Defined. -Lemma match_bool_comm_1 (b : bool) A B (F : forall x : A, B x) t f -: (if b as b return B (if b then t else f) then F t else F f) - = F (if b then t else f). -admit. -Defined. -Hint Rewrite match_bool_fn : matchdb. -Fail Hint Rewrite match_bool_comm_1 : matchdb. diff --git a/test-suite/bugs/opened/3510.v b/test-suite/bugs/opened/3510.v deleted file mode 100644 index daf265071a..0000000000 --- a/test-suite/bugs/opened/3510.v +++ /dev/null @@ -1,35 +0,0 @@ -Require Import TestSuite.admit. -Lemma match_option_fn T (b : option T) A B s n -: match b as b return forall x : A, B b x with - | Some k => s k - | None => n - end - = fun x : A => match b as b return B b x with - | Some k => s k x - | None => n x - end. -admit. -Defined. -Lemma match_option_comm_2 T (p : option T) A B R (f : forall (x : A) (y : B x), R x y) (s1 : T -> A) (s2 : forall x : T, B (s1 x)) n1 n2 -: match p as p return R match p with - | Some k => s1 k - | None => n1 - end - match p as p return B match p with Some k => s1 k | None => n1 end with - | Some k => s2 k - | None => n2 - end with - | Some k => f (s1 k) (s2 k) - | None => f n1 n2 - end - = f match p return A with - | Some k => s1 k - | None => n1 - end - match p as p return B match p with Some k => s1 k | None => n1 end with - | Some k => s2 k - | None => n2 - end. -admit. -Defined. -Fail Hint Rewrite match_option_fn match_option_comm_2 : matchdb. |
