Basic properties of sequences (possibly infinite lists) #
This file provides some basic lemmas about possibly infinite lists represented by the
type Stream'.Seq
.
The statement of length_le_iff'
does not assume that the sequence terminates. For a
simpler statement of the theorem where the sequence is known to terminate see length_le_iff
.
The statement of length_le_iff
assumes that the sequence terminates. For a
statement of the where the sequence is not known to terminate see length_le_iff'
.
The statement of lt_length_iff'
does not assume that the sequence terminates. For a
simpler statement of the theorem where the sequence is known to terminate see lt_length_iff
.
The statement of length_le_iff
assumes that the sequence terminates. For a
statement of the where the sequence is not known to terminate see length_le_iff'
.
Coinductive principle for Pairwise
that assumes that R
is transitive. Compared to
Pairwise.coind
, this allows you to prove R hd tl.head
instead of tl.All (R hd ·)
in step
.
Coinductive principle for proving b.length' ≤ a.length'
for two sequences a
and b
.
Equations
- Stream'.Seq.instFunctor = { map := @Stream'.Seq.map }
Equations
- Stream'.Seq1.coeSeq = { coe := Stream'.Seq1.toSeq }
Map a function on a Seq1
Equations
- Stream'.Seq1.map f (a, s) = (f a, Stream'.Seq.map f s)
Instances For
The return
operator for the Seq1
monad,
which produces a singleton sequence.
Equations
Instances For
Equations
- Stream'.Seq1.instInhabited = { default := Stream'.Seq1.ret default }
The bind
operator for the Seq1
monad,
which maps f
on each element of s
and appends the results together.
(Not all of s
may be evaluated, because the first few elements of s
may already produce an infinite result.)
Equations
- s.bind f = (Stream'.Seq1.map f s).join
Instances For
Equations
- One or more equations did not get rendered due to their size.