aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/Classes/Equivalence.v
diff options
context:
space:
mode:
authorGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2008-03-16 17:48:43 +0000
committerGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2008-03-16 17:48:43 +0000
commit9e1ab25ce311b5c0e18e1023eaaa38673a38d3d5 (patch)
treef2e3031b3cf4a0e8d3fee15d83467ecc663b2942 /theories/Classes/Equivalence.v
parent87017bcc49f0d9d07f8f8c6a8c0137715118ef46 (diff)
Removed unneeded tactics from RelationClasses. Use
check_required_library where needed (fixes bug #1797). Remove spurious messages from ring when not in verbose mode. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10685 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Classes/Equivalence.v')
-rw-r--r--theories/Classes/Equivalence.v27
1 files changed, 17 insertions, 10 deletions
diff --git a/theories/Classes/Equivalence.v b/theories/Classes/Equivalence.v
index 052d21019..b90fdc97e 100644
--- a/theories/Classes/Equivalence.v
+++ b/theories/Classes/Equivalence.v
@@ -30,14 +30,21 @@ Definition equiv [ Equivalence A R ] : relation A := R.
(** Shortcuts to make proof search possible (unification won't unfold equiv). *)
-Definition equivalence_refl [ sa : ! Equivalence A ] : Reflexive equiv.
-Proof. eauto with typeclass_instances. Qed.
+Program Instance [ sa : ! Equivalence A ] => equiv_refl : Reflexive equiv.
-Definition equivalence_sym [ sa : ! Equivalence A ] : Symmetric equiv.
-Proof. eauto with typeclass_instances. Qed.
+Program Instance [ sa : ! Equivalence A ] => equiv_sym : Symmetric equiv.
-Definition equivalence_trans [ sa : ! Equivalence A ] : Transitive equiv.
-Proof. eauto with typeclass_instances. Qed.
+ Next Obligation.
+ Proof.
+ symmetry ; auto.
+ Qed.
+
+Program Instance [ sa : ! Equivalence A ] => equiv_trans : Transitive equiv.
+
+ Next Obligation.
+ Proof.
+ transitivity y ; auto.
+ Qed.
(** Overloaded notations for setoid equivalence and inequivalence. Not to be confused with [eq] and [=]. *)
@@ -70,16 +77,16 @@ Tactic Notation "clsubst" "*" := clsubst_nofail.
Lemma nequiv_equiv_trans : forall [ ! Equivalence A ] (x y z : A), x =/= y -> y === z -> x =/= z.
Proof with auto.
intros; intro.
- assert(z === y) by relation_sym.
- assert(x === y) by relation_trans.
+ assert(z === y) by (symmetry ; auto).
+ assert(x === y) by (transitivity z ; auto).
contradiction.
Qed.
Lemma equiv_nequiv_trans : forall [ ! Equivalence A ] (x y z : A), x === y -> y =/= z -> x =/= z.
Proof.
intros; intro.
- assert(y === x) by relation_sym.
- assert(y === z) by relation_trans.
+ assert(y === x) by (symmetry ; auto).
+ assert(y === z) by (transitivity x ; auto).
contradiction.
Qed.