aboutsummaryrefslogtreecommitdiff
path: root/theories
diff options
context:
space:
mode:
authormsozeau2008-04-14 15:08:52 +0000
committermsozeau2008-04-14 15:08:52 +0000
commit39db249e97bcb30f66f468825d20d6e754e7c06e (patch)
treeaba0e0fb04a79c30756ce874577a453d2c5a102b /theories
parentb62d26c3b40bdaf84333e59f488df7e24c1f2c4f (diff)
Renamings to avoid clashes with definitions in Relation_Definitions, now
projections are of the form "equivalence_reflexive" and instance names too. As they are (almost) never used directly, it does not hurt to have long explicit names. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10787 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories')
-rw-r--r--theories/Classes/Equivalence.v24
-rw-r--r--theories/Classes/RelationClasses.v30
2 files changed, 28 insertions, 26 deletions
diff --git a/theories/Classes/Equivalence.v b/theories/Classes/Equivalence.v
index d7774a2d77..f40d2e2a5e 100644
--- a/theories/Classes/Equivalence.v
+++ b/theories/Classes/Equivalence.v
@@ -37,23 +37,25 @@ Definition equiv [ Equivalence A R ] : relation A := R.
Typeclasses unfold @equiv.
+
+
(* (** Shortcuts to make proof search possible (unification won't unfold equiv). *) *)
-(* Program Instance [ sa : Equivalence A ] => equiv_refl : Reflexive equiv. *)
+Program Instance [ sa : Equivalence A ] => equiv_refl : Reflexive equiv.
-(* Program Instance [ sa : Equivalence A ] => equiv_sym : Symmetric equiv. *)
+Program Instance [ sa : Equivalence A ] => equiv_sym : Symmetric equiv.
-(* Next Obligation. *)
-(* Proof. *)
-(* symmetry ; auto. *)
-(* Qed. *)
+ Next Obligation.
+ Proof.
+ symmetry ; auto.
+ Qed.
-(* Program Instance [ sa : Equivalence A ] => equiv_trans : Transitive equiv. *)
+Program Instance [ sa : Equivalence A ] => equiv_trans : Transitive equiv.
-(* Next Obligation. *)
-(* Proof. *)
-(* transitivity y ; auto. *)
-(* Qed. *)
+ Next Obligation.
+ Proof.
+ transitivity y ; auto.
+ Qed.
(** Overloaded notations for setoid equivalence and inequivalence. Not to be confused with [eq] and [=]. *)
diff --git a/theories/Classes/RelationClasses.v b/theories/Classes/RelationClasses.v
index ef3cba81f1..ebbd887c2a 100644
--- a/theories/Classes/RelationClasses.v
+++ b/theories/Classes/RelationClasses.v
@@ -141,34 +141,34 @@ Ltac obligations_tactic ::= simpl_relation.
(** Logical implication. *)
-Program Instance impl_refl : Reflexive impl.
-Program Instance impl_trans : Transitive impl.
+Program Instance impl_reflexive : Reflexive impl.
+Program Instance impl_transitive : Transitive impl.
(** Logical equivalence. *)
-Program Instance iff_refl : Reflexive iff.
-Program Instance iff_sym : Symmetric iff.
-Program Instance iff_trans : Transitive iff.
+Program Instance iff_reflexive : Reflexive iff.
+Program Instance iff_symmetric : Symmetric iff.
+Program Instance iff_transitive : Transitive iff.
(** Leibniz equality. *)
-Program Instance eq_refl : Reflexive (@eq A).
-Program Instance eq_sym : Symmetric (@eq A).
-Program Instance eq_trans : Transitive (@eq A).
+Program Instance eq_reflexive : Reflexive (@eq A).
+Program Instance eq_symmetric : Symmetric (@eq A).
+Program Instance eq_transitive : Transitive (@eq A).
(** Various combinations of reflexivity, symmetry and transitivity. *)
(** A [PreOrder] is both Reflexive and Transitive. *)
Class PreOrder A (R : relation A) :=
- preorder_refl :> Reflexive R ;
- preorder_trans :> Transitive R.
+ preorder_reflexive :> Reflexive R ;
+ preorder_transitive :> Transitive R.
(** A partial equivalence relation is Symmetric and Transitive. *)
Class PER (carrier : Type) (pequiv : relation carrier) :=
- per_sym :> Symmetric pequiv ;
- per_trans :> Transitive pequiv.
+ per_symmetric :> Symmetric pequiv ;
+ per_transitive :> Transitive pequiv.
(** We can build a PER on the Coq function space if we have PERs on the domain and
codomain. *)
@@ -187,9 +187,9 @@ Program Instance [ PER A (R : relation A), PER B (R' : relation B) ] =>
(** The [Equivalence] typeclass. *)
Class Equivalence (carrier : Type) (equiv : relation carrier) :=
- equiv_refl :> Reflexive equiv ;
- equiv_sym :> Symmetric equiv ;
- equiv_trans :> Transitive equiv.
+ equivalence_reflexive :> Reflexive equiv ;
+ equivalence_symmetric :> Symmetric equiv ;
+ equivalence_transitive :> Transitive equiv.
(** We can now define antisymmetry w.r.t. an equivalence relation on the carrier. *)