Idris2Doc : Data.List1.Elem

Data.List1.Elem

Definitions

dataElem : a->List1a->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 (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 : List1a) ->Dec (Elemxxs)
  Check whether the given element is a member of the given list.

Totality: total
Visibility: public export
dropElem : (xs : List1a) ->Elemxxs->Lista
  Remove the element at the given position. Forgets that the list is
non-empty, since there is no guarantee that it will remain non-empty after
the removal.

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 : List1a) ->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