Miscellaneous definitions concerning weak sequences #
These definitions, as well as those in Mathlib/Data/WSeq/Productive.lean, are not needed for the
development of Mathlib/Data/Seq/Parallel.lean.
Get the length of s (if it is finite and completes in finite time).
Equations
Instances For
A weak sequence is finite if toList s terminates. Equivalently,
it is a finite number of think and cons applied to nil.
- out : s.toList.Terminates
Instances
Select the elements of s that satisfy p.
Equations
Instances For
Get the first element of s satisfying p.
Equations
Instances For
Get the list of indexes of elements of s satisfying p
Equations
Instances For
Get the index of the first element of s satisfying p
Equations
Instances For
Get the index of the first occurrence of a in s
Equations
Instances For
Get the indexes of occurrences of a in s
Equations
Instances For
Returns true if s is nil and false if s has an element
Equations
Instances For
Calculate one step of computation
Equations
Instances For
Split the sequence at position n into a finite initial segment
and the weak sequence tail
Equations
Instances For
Returns true if any element of s satisfies p
Equations
Instances For
Returns true if every element of s satisfies p
Equations
Instances For
Apply a function to the elements of the sequence to produce a sequence
of partial results. (There is no scanr because this would require
working from the end of the sequence, which may not exist.)