Debian Codegraph @

src/Relation/Binary/Bundles/Raw.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- Raw bundles for homogeneous binary relations
5 ------------------------------------------------------------------------
6
7 -- The contents of this module should be accessed via `Relation.Binary`.
8
9 {-# OPTIONS --cubical-compatible --safe #-}
10
11 module Relation.Binary.Bundles.Raw where
12
13 open import Function.Base using (flip)
14 open import Level using (Level; suc; _⊔_)
15 open import Relation.Binary.Core using (Rel)
16 open import Relation.Nullary.Negation.Core using (¬_)
17
18
19 ------------------------------------------------------------------------
20 -- RawSetoid
21 ------------------------------------------------------------------------
22
23 record RawSetoid a ℓ : Set (suc (a ⊔ ℓ)) where
24 infix 4 _≈_
25 field
26 Carrier : Set a
27 _≈_ : Rel Carrier ℓ
28
29 infix 4 _≉_
30 _≉_ : Rel Carrier _
31 x ≉ y = ¬ (x ≈ y)
32
33
34 ------------------------------------------------------------------------
35 -- RawRelation: basis for Relation.Binary.Bundles.*Order
36 ------------------------------------------------------------------------
37
38 record RawRelation c ℓ₁ ℓ₂ : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where
39 infix 4 _≈_ _∼_
40 field
41 Carrier : Set c
42 _≈_ : Rel Carrier ℓ₁ -- The underlying equality.
43 _∼_ : Rel Carrier ℓ₂ -- The underlying relation.
44
45 rawSetoid : RawSetoid c ℓ₁
46 rawSetoid = record { _≈_ = _≈_ }
47
48 open RawSetoid rawSetoid public
49 using (_≉_)
50
51 infix 4 _≁_
52 _≁_ : Rel Carrier _
53 x ≁ y = ¬ (x ∼ y)
54
55 infix 4 _∼ᵒ_
56 _∼ᵒ_ = flip _∼_
57
58 infix 4 _≁ᵒ_
59 _≁ᵒ_ = flip _≁_
60