aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite
diff options
context:
space:
mode:
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/bugs/opened/1596.v10
-rw-r--r--test-suite/success/keyedrewrite.v23
2 files changed, 26 insertions, 7 deletions
diff --git a/test-suite/bugs/opened/1596.v b/test-suite/bugs/opened/1596.v
index 91cd09910..7c5dc4167 100644
--- a/test-suite/bugs/opened/1596.v
+++ b/test-suite/bugs/opened/1596.v
@@ -1,10 +1,11 @@
-
Require Import Relations.
Require Import FSets.
Require Import Arith.
Require Import Omega.
Unset Standard Proposition Elimination Names.
+Set Keyed Unification.
+
Lemma Bool_elim_bool : forall (b:bool),b=true \/ b=false.
destruct b;try tauto.
Qed.
@@ -255,9 +256,6 @@ n).
induction m;simpl;intro.
elim (Bool_elim_bool (H.mem (MessageSpi.MNam n,n0) h));intros.
apply SynInc;apply H.mem_2;trivial.
-
- Fail rewrite H in H0. (* !! impossible here !! *)
-Abort.
-(* discriminate H0.
- Qed.*)
+ rewrite H in H0. discriminate. (* !! impossible here !! *)
+ Qed.
End B. \ No newline at end of file
diff --git a/test-suite/success/keyedrewrite.v b/test-suite/success/keyedrewrite.v
index 438613b44..c99b16e2b 100644
--- a/test-suite/success/keyedrewrite.v
+++ b/test-suite/success/keyedrewrite.v
@@ -1 +1,22 @@
-Lemma foo : \ No newline at end of file
+Section foo.
+Variable f : nat -> nat.
+
+Definition g := f.
+
+Variable lem : g 0 = 0.
+
+Goal f 0 = 0.
+Proof.
+ Fail rewrite lem.
+Abort.
+
+Declare Equivalent Keys @g @f.
+(** Now f and g are considered equivalent heads for subterm selection *)
+Goal f 0 = 0.
+Proof.
+ rewrite lem.
+ reflexivity.
+Qed.
+
+Print Equivalent Keys.
+End foo.