Source code on Github
{-# OPTIONS --cubical-compatible --safe #-}
module Data.List.Membership.Propositional {a} {A : Set a} where
open import Data.List.Relation.Unary.Any using (Any)
open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; setoid; subst)
import Data.List.Membership.Setoid as SetoidMembership
open SetoidMembership (setoid A) public hiding (lose)
_≢∈_ : ∀ {x y : A} {xs} → x ∈ xs → y ∈ xs → Set _
_≢∈_ x∈xs y∈xs = ∀ x≡y → subst (_∈ _) x≡y x∈xs ≢ y∈xs
lose : ∀ {p} {P : A → Set p} {x xs} → x ∈ xs → P x → Any P xs
lose = SetoidMembership.lose (setoid A) (subst _)