Definition of ωSequence and functions on infinite sequences #
An ωSequence α is an infinite sequence of elements of α. It is basically
a wrapper around the type ℕ → α which supports the dot-notation and
the analogues of many familiar API functions of List α. In particular,
the element at position n : ℕ of s : ωSequence α is obtained using the
function application notation s n.
In this file we define ωSequence and its API functions.
Most code below is adapted from Mathlib.Data.Stream.Defs.
@[reducible, inline]
Head of an ω-sequence: ωSequence.head s = ωSequence s 0.
Tail of an ω-sequence: ωSequence.tail (h :: t) = t.
Prepend an element to an ω-sequence.
Iterates of a function as an ω-sequence.