Debian Codegraph @

src/Data/Vec/Membership/Propositional.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- Data.Vec.Any.Membership instantiated with propositional equality,
5 -- along with some additional definitions.
6 ------------------------------------------------------------------------
7
8 {-# OPTIONS --cubical-compatible --safe #-}
9
10 module Data.Vec.Membership.Propositional {a} {A : Set a} where
11
12 open import Data.Vec.Base using (Vec)
13 open import Data.Vec.Relation.Unary.Any using (Any)
14 open import Relation.Binary.PropositionalEquality.Core using (subst)
15 open import Relation.Binary.PropositionalEquality.Properties using (setoid)
16
17 import Data.Vec.Membership.Setoid as SetoidMembership
18
19 ------------------------------------------------------------------------
20 -- Re-export contents of setoid membership
21
22 open SetoidMembership (setoid A) public hiding (lose)
23
24 ------------------------------------------------------------------------
25 -- Other operations
26
27 lose : ∀ {p} {P : A → Set p} {x n} {xs : Vec A n} → x ∈ xs → P x → Any P xs
28 lose = SetoidMembership.lose (setoid A) (subst _)