Idris2Doc : Data.List.Elem

Data.List.Elem

Definitions

dataElem : a->Lista->Type
  A proof that some element is found in a list.

Totality: total
Visibility: public export
Constructors:
Here : Elemx (x::xs)
  A proof that the element is at the head of the list
There : Elemxxs->Elemx (y::xs)
  A proof that the element is in the tail of the list

Hints:
DecEq (Elemxxs)
InjectiveThere
Uninhabited (Here=Theree)
Uninhabited (Theree=Here)
Uninhabited (Elemx [])
Uninhabited (x=z) =>Uninhabited (Elemzxs) =>Uninhabited (Elemz (x::xs))
neitherHereNorThere : Not (x=y) ->Not (Elemxxs) ->Not (Elemx (y::xs))
  An item not in the head and not in the tail is not in the list at all.

Totality: total
Visibility: export
isElem : DecEqa=> (x : a) -> (xs : Lista) ->Dec (Elemxxs)
  Check whether the given element is a member of the given list.

Totality: total
Visibility: public export
get : (xs : Lista) ->Elemxxs->a
  Get the element at the given position.

Totality: total
Visibility: public export
lookup : (xs : Lista) ->Elemxxs->Singletonx
  Get the element at the given position, with proof that it is the desired element.

Totality: total
Visibility: public export
dropElem : (xs : Lista) ->Elemxxs->Lista
  Remove the element at the given position.

Totality: total
Visibility: public export
elemToNat : Elemxxs->Nat
  Erase the indices, returning the numeric position of the element

Totality: total
Visibility: public export
indexElem : Nat-> (xs : Lista) ->Maybe (x : a**Elemxxs)
  Find the element with a proof at a given position, if it is valid

Totality: total
Visibility: public export
elemMap : (0f : (a->b)) ->Elemxxs->Elem (fx) (mapfxs)
  Lift the membership proof to a mapped list

Totality: total
Visibility: export