| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Some properties of equivalence closures. |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
module Relation.Binary.Construct.Closure.Equivalence.Properties where |
| 10 |
|
| 11 |
open import Function.Base using (_∘′_) |
| 12 |
open import Relation.Binary.Core using (Rel) |
| 13 |
open import Relation.Binary.Construct.Closure.Equivalence |
| 14 |
using (EqClosure; symmetric) |
| 15 |
open import Relation.Binary.Construct.Closure.ReflexiveTransitive as RTrans |
| 16 |
using (Star; _◅◅_) |
| 17 |
import Relation.Binary.Construct.Closure.Symmetric as SymClosure |
| 18 |
using (SymClosure; fwd) |
| 19 |
|
| 20 |
module _ {a ℓ} {A : Set a} {_⟶_ : Rel A ℓ} where |
| 21 |
|
| 22 |
private |
| 23 |
_—↠_ = Star _⟶_ |
| 24 |
_↔_ = EqClosure _⟶_ |
| 25 |
|
| 26 |
a—↠b⇒a↔b : ∀ {a b} → a —↠ b → a ↔ b |
| 27 |
a—↠b⇒a↔b = RTrans.map SymClosure.fwd |
| 28 |
|
| 29 |
a—↠b⇒b↔a : ∀ {a b} → a —↠ b → b ↔ a |
| 30 |
a—↠b⇒b↔a = symmetric _ ∘′ a—↠b⇒a↔b |
| 31 |
|
| 32 |
a—↠b&a—↠c⇒b↔c : ∀ {a b c} → a —↠ b → a —↠ c → b ↔ c |
| 33 |
a—↠b&a—↠c⇒b↔c a—↠b b—↠c = a—↠b⇒b↔a a—↠b ◅◅ a—↠b⇒a↔b b—↠c |