| 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 |
module Relation.Binary.Indexed.Heterogeneous.Bundles where |
| 13 |
|
| 14 |
open import Level using (suc; _⊔_) |
| 15 |
open import Relation.Binary.Indexed.Heterogeneous.Core using (IRel) |
| 16 |
open import Relation.Binary.Indexed.Heterogeneous.Structures |
| 17 |
using (IsIndexedEquivalence; IsIndexedPreorder) |
| 18 |
|
| 19 |
------------------------------------------------------------------------ |
| 20 |
-- Definitions |
| 21 |
|
| 22 |
record IndexedSetoid {i} (I : Set i) c ℓ : Set (suc (i ⊔ c ⊔ ℓ)) where |
| 23 |
infix 4 _≈_ |
| 24 |
field |
| 25 |
Carrier : I → Set c |
| 26 |
_≈_ : IRel Carrier ℓ |
| 27 |
isEquivalence : IsIndexedEquivalence Carrier _≈_ |
| 28 |
|
| 29 |
open IsIndexedEquivalence isEquivalence public |
| 30 |
|
| 31 |
|
| 32 |
record IndexedPreorder {i} (I : Set i) c ℓ₁ ℓ₂ : |
| 33 |
Set (suc (i ⊔ c ⊔ ℓ₁ ⊔ ℓ₂)) where |
| 34 |
infix 4 _≈_ _≲_ |
| 35 |
field |
| 36 |
Carrier : I → Set c |
| 37 |
_≈_ : IRel Carrier ℓ₁ -- The underlying equality. |
| 38 |
_≲_ : IRel Carrier ℓ₂ -- The relation. |
| 39 |
isPreorder : IsIndexedPreorder Carrier _≈_ _≲_ |
| 40 |
|
| 41 |
open IsIndexedPreorder isPreorder public |
| 42 |
|
| 43 |
infix 4 _∼_ |
| 44 |
_∼_ = _≲_ |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
------------------------------------------------------------------------ |
| 49 |
-- DEPRECATED |
| 50 |
------------------------------------------------------------------------ |
| 51 |
-- Please use the new names as continuing support for the old names is |
| 52 |
-- not guaranteed. |
| 53 |
|
| 54 |
-- Version 2.0 |
| 55 |
|
| 56 |
{-# WARNING_ON_USAGE IndexedPreorder._∼_ |
| 57 |
"Warning: IndexedPreorder._∼_ was deprecated in v2.0. Please use IndexedPreorder._≲_ instead. " |
| 58 |
#-} |