Further lemmas about List.take
, List.drop
, List.zip
and List.zipWith
. #
These are in a separate file from most of the list lemmas
as they required importing more lemmas about natural numbers, and use omega
.
take #
The i
-th element of a list coincides with the i
-th element of any of its prefixes of
length > i
. Version designed to rewrite from the big list to the small list.
The i
-th element of a list coincides with the i
-th element of any of its prefixes of
length > i
. Version designed to rewrite from the small list to the big list.
Instances For
drop #
The i + j
-th element of a list coincides with the j
-th element of the list obtained by
dropping the first i
elements. Version designed to rewrite from the big list to the small list.
The i + j
-th element of a list coincides with the j
-th element of the list obtained by
dropping the first i
elements. Version designed to rewrite from the small list to the big list.
Dropping the elements up to n
in l₁ ++ l₂
is the same as dropping the elements up to n
in l₁
, dropping the elements up to n - l₁.length
in l₂
, and appending them.