aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/Classes
diff options
context:
space:
mode:
authorGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2008-03-25 10:56:36 +0000
committerGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2008-03-25 10:56:36 +0000
commit1e1d06303d476b1e7f171dc09ed1e18508e20436 (patch)
treeeb4f4125c96d6e8e5e45420b07ec142bbd5a6766 /theories/Classes
parent467fb77527b75cf6c214aa3b72b2826cae2e18ae (diff)
Interpret patterns for hypotheses types in match goal in type_scope (if not a
context [] pattern). May break some user contribs... Rename clsubstitute to substitute. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10716 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Classes')
-rw-r--r--theories/Classes/Equivalence.v17
-rw-r--r--theories/Classes/SetoidClass.v2
2 files changed, 10 insertions, 9 deletions
diff --git a/theories/Classes/Equivalence.v b/theories/Classes/Equivalence.v
index d0c999196..00519ecf4 100644
--- a/theories/Classes/Equivalence.v
+++ b/theories/Classes/Equivalence.v
@@ -66,20 +66,20 @@ Open Local Scope equiv_scope.
(** Use the [clsubstitute] command which substitutes an equality in every hypothesis. *)
-Ltac clsubst H :=
+Ltac setoid_subst H :=
match type of H with
- ?x === ?y => clsubstitute H ; clear H x
+ ?x === ?y => substitute H ; clear H x
end.
-Ltac clsubst_nofail :=
+Ltac setoid_subst_nofail :=
match goal with
- | [ H : ?x === ?y |- _ ] => clsubst H ; clsubst_nofail
+ | [ H : ?x === ?y |- _ ] => setoid_subst H ; setoid_subst_nofail
| _ => idtac
end.
(** [subst*] will try its best at substituting every equality in the goal. *)
-Tactic Notation "clsubst" "*" := clsubst_nofail.
+Tactic Notation "subst" "*" := subst_no_fail ; setoid_subst_nofail.
Lemma nequiv_equiv_trans : forall [ Equivalence A ] (x y z : A), x =/= y -> y === z -> x =/= z.
Proof with auto.
@@ -99,9 +99,10 @@ Qed.
Ltac equiv_simplify_one :=
match goal with
- | [ H : (?x === ?x)%type |- _ ] => clear H
- | [ H : (?x === ?y)%type |- _ ] => clsubst H
- | [ |- (?x =/= ?y)%type ] => let name:=fresh "Hneq" in intro name
+ | [ H : ?x === ?x |- _ ] => clear H
+ | [ H : ?x === ?y |- _ ] => setoid_subst H
+ | [ |- ?x =/= ?y ] => let name:=fresh "Hneq" in intro name
+ | [ |- ~ ?x === ?y ] => let name:=fresh "Hneq" in intro name
end.
Ltac equiv_simplify := repeat equiv_simplify_one.
diff --git a/theories/Classes/SetoidClass.v b/theories/Classes/SetoidClass.v
index e64cbd12c..d4da4b8df 100644
--- a/theories/Classes/SetoidClass.v
+++ b/theories/Classes/SetoidClass.v
@@ -74,7 +74,7 @@ Notation " x =/= y " := (complement equiv x y) (at level 70, no associativity) :
Ltac clsubst H :=
match type of H with
- ?x == ?y => clsubstitute H ; clear H x
+ ?x == ?y => substitute H ; clear H x
end.
Ltac clsubst_nofail :=