Debian Codegraph @

src/Relation/Binary/Construct/Always.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- The universal binary relation
5 ------------------------------------------------------------------------
6
7 {-# OPTIONS --cubical-compatible --safe #-}
8
9 module Relation.Binary.Construct.Always where
10
11 open import Relation.Binary.Core using (Rel)
12 open import Relation.Binary.Bundles using (Setoid)
13 open import Relation.Binary.Structures using (IsEquivalence)
14 open import Relation.Binary.Definitions using (Reflexive; Symmetric; Transitive)
15 open import Relation.Binary.Construct.Constant using (Const)
16 open import Data.Unit.Polymorphic using (⊤; tt)
17
18 ------------------------------------------------------------------------
19 -- Definition
20
21 Always : ∀ {a ℓ} {A : Set a} → Rel A ℓ
22 Always = Const ⊤
23
24 ------------------------------------------------------------------------
25 -- Properties
26
27 module _ {a} (A : Set a) ℓ where
28
29 refl : Reflexive {A = A} {ℓ = ℓ} Always
30 refl = _
31
32 sym : Symmetric {A = A} {ℓ = ℓ} Always
33 sym _ = _
34
35 trans : Transitive {A = A} {ℓ = ℓ} Always
36 trans _ _ = _
37
38 isEquivalence : IsEquivalence {ℓ = ℓ} {A} Always
39 isEquivalence = record {}
40
41 setoid : Setoid a ℓ
42 setoid = record
43 { isEquivalence = isEquivalence
44 }