Add some additional 'equivalence' definitions to Equivalence
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
parent
6384f7006e
commit
8c9f39ac35
|
@ -4,8 +4,18 @@ open import Data.Product using (_×_; Σ; _,_; proj₁; proj₂)
|
||||||
open import Relation.Binary.Definitions
|
open import Relation.Binary.Definitions
|
||||||
open import Relation.Binary.PropositionalEquality as Eq using (_≡_; sym)
|
open import Relation.Binary.PropositionalEquality as Eq using (_≡_; sym)
|
||||||
|
|
||||||
record IsEquivalence {a} (A : Set a) (_≈_ : A → A → Set a) : Set a where
|
module _ {a} (A : Set a) (_≈_ : A → A → Set a) where
|
||||||
|
IsReflexive : Set a
|
||||||
|
IsReflexive = ∀ {a : A} → a ≈ a
|
||||||
|
|
||||||
|
IsSymmetric : Set a
|
||||||
|
IsSymmetric = ∀ {a b : A} → a ≈ b → b ≈ a
|
||||||
|
|
||||||
|
IsTransitive : Set a
|
||||||
|
IsTransitive = ∀ {a b c : A} → a ≈ b → b ≈ c → a ≈ c
|
||||||
|
|
||||||
|
record IsEquivalence : Set a where
|
||||||
field
|
field
|
||||||
≈-refl : {a : A} → a ≈ a
|
≈-refl : IsReflexive
|
||||||
≈-sym : {a b : A} → a ≈ b → b ≈ a
|
≈-sym : IsSymmetric
|
||||||
≈-trans : {a b c : A} → a ≈ b → b ≈ c → a ≈ c
|
≈-trans : IsTransitive
|
||||||
|
|
Loading…
Reference in New Issue
Block a user