aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2015-10-19 18:18:34 +0200
committerPierre-Marie Pédrot2015-10-19 18:18:34 +0200
commitc7dcb76ffff6b12b031e906b002b4d76c1aaea50 (patch)
tree8d5115258c3b7042767e45d742e2800dab209822 /test-suite
parent666568377cbe1c18ce479d32f6359aa61af6d553 (diff)
parent50a574f8b3e7f29550d7abf600d92eb43e7f8ef6 (diff)
Merge branch 'v8.5'
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/bugs/closed/4325.v5
-rw-r--r--test-suite/bugs/closed/4372.v20
-rw-r--r--test-suite/success/ltac.v26
3 files changed, 51 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/4325.v b/test-suite/bugs/closed/4325.v
new file mode 100644
index 0000000000..af69ca04b6
--- /dev/null
+++ b/test-suite/bugs/closed/4325.v
@@ -0,0 +1,5 @@
+Goal (forall a b : nat, Set = (a = b)) -> Set.
+Proof.
+ clear.
+ intro H.
+ erewrite (fun H' => H _ H').
diff --git a/test-suite/bugs/closed/4372.v b/test-suite/bugs/closed/4372.v
new file mode 100644
index 0000000000..428192a344
--- /dev/null
+++ b/test-suite/bugs/closed/4372.v
@@ -0,0 +1,20 @@
+(* Tactic inversion was raising an anomaly because of a fake
+ dependency of TypeDenote into its argument *)
+
+Inductive expr :=
+| ETrue.
+
+Inductive IntermediateType : Set := ITbool.
+
+Definition TypeDenote (IT : IntermediateType) : Type :=
+ match IT with
+ | _ => bool
+ end.
+
+Inductive ValueDenote : forall (e:expr) it, TypeDenote it -> Prop :=
+| VT : ValueDenote ETrue ITbool true.
+
+Goal forall it v, @ValueDenote ETrue it v -> True.
+ intros it v H.
+ inversion H.
+Abort.
diff --git a/test-suite/success/ltac.v b/test-suite/success/ltac.v
index 6c4d4ae98f..5bef2e512a 100644
--- a/test-suite/success/ltac.v
+++ b/test-suite/success/ltac.v
@@ -317,3 +317,29 @@ let T := constr:(fun a b : nat => a) in
end.
exact (eq_refl n).
Qed.
+
+(* Check that matching "match" does not look into the invisible
+ canonically generated binders of the return clause and of the branches *)
+
+Goal forall n, match n with 0 => true | S _ => false end = true.
+intros. unfold nat_rect.
+Fail match goal with |- context [nat] => idtac end.
+Abort.
+
+(* Check that branches of automatically generated elimination
+ principle are correctly eta-expanded and hence matchable as seen
+ from the user point of view *)
+
+Goal forall a f n, nat_rect (fun _ => nat) a f n = 0.
+intros. unfold nat_rect.
+match goal with |- context [f _] => idtac end.
+Abort.
+
+(* Check that branches of automatically generated elimination
+ principle are in correct form also in the presence of let-ins *)
+
+Inductive a (b:=0) : let b':=1 in Type := c : let d:=0 in a.
+Goal forall x, match x with c => 0 end = 1.
+intros.
+match goal with |- context [0] => idtac end.
+Abort.