| 1 |
From Coq Require Import RelationClasses Morphisms Relation_Definitions. |
| 2 |
|
| 3 |
Lemma PER_valid_l {A} {R : relation A} {HS : Symmetric R} {HT : Transitive R} x y (H : R x y) : Proper R x. |
| 4 |
Proof. hnf; etransitivity; eassumption || symmetry; eassumption. Qed. |
| 5 |
Lemma PER_valid_r {A} {R : relation A} {HS : Symmetric R} {HT : Transitive R} x y (H : R x y) : Proper R y. |
| 6 |
Proof. hnf; etransitivity; eassumption || symmetry; eassumption. Qed. |
| 7 |
Global Hint Extern 10 (Proper ?R ?x) => simple eapply (@PER_valid_l _ R); [ | | solve [ auto with nocore ] ] : typeclass_instances. |
| 8 |
Global Hint Extern 10 (Proper ?R ?x) => simple eapply (@PER_valid_r _ R); [ | | solve [ auto with nocore ] ] : typeclass_instances. |