{-# OPTIONS --without-K --safe #-}
module Data.Quiver where
open import Level
open import Relation.Binary using (Rel; IsEquivalence; Setoid)
import Relation.Binary.Reasoning.Setoid as EqR
record Quiver o ℓ e : Set (suc (o ⊔ ℓ ⊔ e)) where
infix 4 _≈_ _⇒_
field
Obj : Set o
_⇒_ : Rel Obj ℓ
_≈_ : ∀ {A B} → Rel (A ⇒ B) e
equiv : ∀ {A B} → IsEquivalence (_≈_ {A} {B})
setoid : {A B : Obj} → Setoid _ _
setoid {A} {B} = record
{ Carrier = A ⇒ B
; _≈_ = _≈_
; isEquivalence = equiv
}
module Equiv {A B : Obj} = IsEquivalence (equiv {A} {B})
module EdgeReasoning {A B : Obj} = EqR (setoid {A} {B})