Basic properties of sequences (possibly infinite lists) #
This file provides some basic lemmas about possibly infinite lists represented by the
type Stream'.Seq
.
@[simp]
@[simp]
@[simp]
@[simp]
theorem
Stream'.Seq.terminatedAt_map_iff
{α : Type u}
{β : Type v}
{f : α → β}
{s : Seq α}
{n : ℕ}
:
@[simp]
theorem
Stream'.Seq.get?_set_of_terminatedAt
{α : Type u}
(x : α)
{s : Seq α}
{n : ℕ}
(h_terminated : s.TerminatedAt n)
:
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.