| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- The extensional sublist relation over setoid equality. |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
open import Relation.Binary.Core using (Rel) |
| 10 |
open import Relation.Binary.Bundles using (Setoid) |
| 11 |
|
| 12 |
module Data.List.Relation.Binary.Subset.Setoid |
| 13 |
{c ℓ} (S : Setoid c ℓ) where |
| 14 |
|
| 15 |
open import Data.List.Base using (List) |
| 16 |
open import Data.List.Membership.Setoid S using (_∈_) |
| 17 |
open import Function.Base using (flip) |
| 18 |
open import Level using (_⊔_) |
| 19 |
open import Relation.Nullary.Negation using (¬_) |
| 20 |
|
| 21 |
open Setoid S renaming (Carrier to A) |
| 22 |
|
| 23 |
------------------------------------------------------------------------ |
| 24 |
-- Definitions |
| 25 |
|
| 26 |
infix 4 _⊆_ _⊇_ _⊈_ _⊉_ |
| 27 |
|
| 28 |
_⊆_ : Rel (List A) (c ⊔ ℓ) |
| 29 |
xs ⊆ ys = ∀ {x} → x ∈ xs → x ∈ ys |
| 30 |
|
| 31 |
_⊇_ : Rel (List A) (c ⊔ ℓ) |
| 32 |
_⊇_ = flip _⊆_ |
| 33 |
|
| 34 |
_⊈_ : Rel (List A) (c ⊔ ℓ) |
| 35 |
xs ⊈ ys = ¬ xs ⊆ ys |
| 36 |
|
| 37 |
_⊉_ : Rel (List A) (c ⊔ ℓ) |
| 38 |
xs ⊉ ys = ¬ xs ⊇ ys |