| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Membership for containers |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
module Data.Container.Membership where |
| 10 |
|
| 11 |
open import Data.Container.Core using (Container; ⟦_⟧) |
| 12 |
open import Data.Container.Relation.Unary.Any using (◇) |
| 13 |
open import Level using (_⊔_) |
| 14 |
open import Relation.Binary.PropositionalEquality.Core using (_≡_) |
| 15 |
open import Relation.Unary using (Pred) |
| 16 |
|
| 17 |
module _ {s p} {C : Container s p} {x} {X : Set x} where |
| 18 |
|
| 19 |
infix 4 _∈_ |
| 20 |
_∈_ : X → Pred (⟦ C ⟧ X) (p ⊔ x) |
| 21 |
x ∈ xs = ◇ C (_≡_ x) xs |