summaryrefslogtreecommitdiff
path: root/src/Data/List/Relation/Subset/Setoid.agda
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2018-11-23 17:29:18 -0700
committerSean Whitton <spwhitton@spwhitton.name>2018-11-23 17:29:18 -0700
commita19b25a865b2000bbd3acd909f5951a5407c1eec (patch)
treee283a809447d00f63289a918e6fd0f73ee0b8ece /src/Data/List/Relation/Subset/Setoid.agda
parent0b3946998d82e1be6c50e2872e7474db69b5a0dc (diff)
New upstream version 0.17
Diffstat (limited to 'src/Data/List/Relation/Subset/Setoid.agda')
-rw-r--r--src/Data/List/Relation/Subset/Setoid.agda28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/Data/List/Relation/Subset/Setoid.agda b/src/Data/List/Relation/Subset/Setoid.agda
new file mode 100644
index 0000000..86ef526
--- /dev/null
+++ b/src/Data/List/Relation/Subset/Setoid.agda
@@ -0,0 +1,28 @@
+------------------------------------------------------------------------
+-- The Agda standard library
+--
+-- The extensional sublist relation over setoid equality.
+------------------------------------------------------------------------
+
+open import Relation.Binary
+
+module Data.List.Relation.Subset.Setoid
+ {c ℓ} (S : Setoid c ℓ) where
+
+open import Data.List using (List)
+open import Data.List.Membership.Setoid S using (_∈_)
+open import Level using (_⊔_)
+open import Relation.Nullary using (¬_)
+
+open Setoid S renaming (Carrier to A)
+
+------------------------------------------------------------------------
+-- Definitions
+
+infix 4 _⊆_ _⊈_
+
+_⊆_ : Rel (List A) (c ⊔ ℓ)
+xs ⊆ ys = ∀ {x} → x ∈ xs → x ∈ ys
+
+_⊈_ : Rel (List A) (c ⊔ ℓ)
+xs ⊈ ys = ¬ xs ⊆ ys