Productive weak sequences #
This file defines the property of a weak sequence being productive as never stalling – the next
output always comes after a finite time. Given a productive weak sequence, a regular sequence
(Seq) can be derived from it using toSeq.
A weak sequence is productive if it never stalls forever - there are
always a finite number of thinks between cons constructors.
The sequence itself is allowed to be infinite though.
- get?_terminates (n : ℕ) : (s.get? n).Terminates
Instances
instance Stream'.WSeq.get?_terminates {α : Type u} (s : WSeq α) [h : s.Productive] (n : ℕ) :
(s.get? n).Terminates
instance Stream'.WSeq.productive_dropn {α : Type u} (s : WSeq α) [s.Productive] (n : ℕ) :
(s.drop n).Productive