| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Indexed binary relations |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
-- The contents of this module should be accessed via |
| 8 |
-- `Relation.Binary.Indexed.Heterogeneous`. |
| 9 |
|
| 10 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 11 |
|
| 12 |
open import Relation.Binary.Indexed.Heterogeneous.Core |
| 13 |
|
| 14 |
module Relation.Binary.Indexed.Heterogeneous.Structures |
| 15 |
{i a ℓ} {I : Set i} (A : I → Set a) (_≈_ : IRel A ℓ) |
| 16 |
where |
| 17 |
|
| 18 |
open import Function.Base using (id; _⟨_⟩_) |
| 19 |
open import Level using (suc; _⊔_) |
| 20 |
open import Relation.Binary.Core using (_⇒_) |
| 21 |
open import Relation.Binary.PropositionalEquality.Core as ≡ using (_≡_) |
| 22 |
open import Relation.Binary.Indexed.Heterogeneous.Definitions |
| 23 |
using (Reflexive; Symmetric; Transitive) |
| 24 |
|
| 25 |
------------------------------------------------------------------------ |
| 26 |
-- Equivalences |
| 27 |
|
| 28 |
record IsIndexedEquivalence : Set (i ⊔ a ⊔ ℓ) where |
| 29 |
field |
| 30 |
refl : Reflexive A _≈_ |
| 31 |
sym : Symmetric A _≈_ |
| 32 |
trans : Transitive A _≈_ |
| 33 |
|
| 34 |
reflexive : ∀ {i} → _≡_ ⟨ _⇒_ ⟩ _≈_ {i} |
| 35 |
reflexive ≡.refl = refl |
| 36 |
|
| 37 |
|
| 38 |
record IsIndexedPreorder {ℓ₂} (_≲_ : IRel A ℓ₂) : Set (i ⊔ a ⊔ ℓ ⊔ ℓ₂) where |
| 39 |
field |
| 40 |
isEquivalence : IsIndexedEquivalence |
| 41 |
reflexive : ∀ {i j} → (_≈_ {i} {j}) ⟨ _⇒_ ⟩ _≲_ |
| 42 |
trans : Transitive A _≲_ |
| 43 |
|
| 44 |
module Eq = IsIndexedEquivalence isEquivalence |
| 45 |
|
| 46 |
refl : Reflexive A _≲_ |
| 47 |
refl = reflexive Eq.refl |