Idris2Doc : Data.List.Equalities

Data.List.Equalities

Definitions

snocNonEmpty : Not (xs++ [x] = [])
  A list constructued using snoc cannot be empty.

Totality: total
Visibility: export
SnocNonEmpty : (xs : Lista) -> (x : a) ->NonEmpty (snocxsx)
  Proof that snoc'ed list is not empty in terms of `NonEmpty`.

Totality: total
Visibility: export
consCong2 : x=y->xs=ys->x::xs=y::ys
  Two lists are equal, if their heads are equal and their tails are equal.

Totality: total
Visibility: export
snocInjective : snocxsx=snocysy-> (xs=ys, x=y)
  Equal non-empty lists should result in equal components after destructuring 'snoc'.

Totality: total
Visibility: export
appendCong2 : x1=y1->x2=y2->x1++x2=y1++y2
  Appending pairwise equal lists gives equal lists

Totality: total
Visibility: export
mapDistributesOverAppend : (f : (a->b)) -> (xs : Lista) -> (ys : Lista) ->mapf (xs++ys) =mapfxs++mapfys
  List.map is distributive over appending.

Totality: total
Visibility: export
lengthDistributesOverAppend : (xs : Lista) -> (ys : Lista) ->length (xs++ys) =lengthxs+lengthys
  List.length is distributive over appending.

Totality: total
Visibility: export
lengthSnoc : (x : a) -> (xs : Lista) ->length (snocxsx) =S (lengthxs)
  Length of a snoc'd list is the same as Succ of length list.

Totality: total
Visibility: export
appendSameLeftInjective : (xs : Lista) -> (ys : Lista) -> (zs : Lista) ->zs++xs=zs++ys->xs=ys
  Appending the same list at left is injective.

Totality: total
Visibility: export
appendSameRightInjective : (xs : Lista) -> (ys : Lista) -> (zs : Lista) ->xs++zs=ys++zs->xs=ys
  Appending the same list at right is injective.

Totality: total
Visibility: export
appendNonEmptyLeftNotEq : (zs : Lista) -> (xs : Lista) ->NonEmptyxs=>Not (zs=xs++zs)
  List cannot be equal to itself prepended with some non-empty list.

Totality: total
Visibility: export
appendNonEmptyRightNotEq : (zs : Lista) -> (xs : Lista) ->NonEmptyxs=>Not (zs=zs++xs)
  List cannot be equal to itself appended with some non-empty list.

Totality: total
Visibility: export
bindConcatPrf : (xs : Lista) -> (x : a) -> (f : (a->Listb)) -> (x::xs) >>=f=fx++ (xs>>=f)
  Proof of correspondence between list bind and concatenation.

Totality: total
Visibility: export