Debian Codegraph @

src/Data/List/Relation/Unary/Unique/DecSetoid.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- Lists made up entirely of unique elements (setoid equality)
5 ------------------------------------------------------------------------
6
7 {-# OPTIONS --cubical-compatible --safe #-}
8
9 open import Relation.Binary.Bundles using (DecSetoid)
10 import Data.List.Relation.Unary.AllPairs as AllPairs
11 open import Relation.Unary using (Decidable)
12 open import Relation.Nullary.Decidable using (¬?)
13
14 module Data.List.Relation.Unary.Unique.DecSetoid
15 {a ℓ} (DS : DecSetoid a ℓ) where
16
17 open DecSetoid DS renaming (setoid to S)
18
19 ------------------------------------------------------------------------
20 -- Re-export setoid definition
21
22 open import Data.List.Relation.Unary.Unique.Setoid S public
23
24 ------------------------------------------------------------------------
25 -- Additional properties
26
27 unique? : Decidable Unique
28 unique? = AllPairs.allPairs? (λ x y → ¬? (x ≟ y))