added Membership to strandard library in Lists

This commit is contained in:
wadler 2018-04-15 20:11:03 -03:00
parent eb0cc40573
commit 952c1d4850
2 changed files with 16 additions and 0 deletions

View file

@ -879,6 +879,7 @@ Definitions similar to those in this chapter can be found in the standard librar
import Data.List using (List; _++_; length; reverse; map; foldr; downFrom)
import Data.List.All using (All; []; _∷_)
import Data.List.Any using (Any; here; there)
import Data.List.Any.Membership.Propositional using (_∈_)
import Algebra.Structures using (IsMonoid)
\end{code}
The standard library version of `IsMonoid` differs from the

15
src/extra/Membership.agda Normal file
View file

@ -0,0 +1,15 @@
open import Data.Sum using (_⊎_; inj₁; inj₂)
open import Data.List using (List; []; _∷_; [_]; _++_)
open import Data.List.Any using (Any; here; there)
open import Data.List.Any.Membership.Propositional using (_∈_)
open import Data.Nat using ()
open import Relation.Binary.PropositionalEquality using (_≡_; refl)
-- open import Data.List.Any.Membership.Propositional.Properties using (∈-++⁺ˡ; ∈-++⁺ʳ; ∈-++⁻)
Id =
_⊆_ : List Id List Id Set
xs ys = {w} w xs w ys
lemma : {x : Id} x [ x ]
lemma = here refl