Lemmas about list iterators #
This module provides lemmas about the interactions of List.iterM
with IterM.step
and various
collectors.
theorem
Std.Iterators.ListIterator.toArrayMapped_iterM
{m : Type w → Type w'}
{n : Type w → Type w''}
[Monad m]
[Monad n]
[LawfulMonad n]
{β γ : Type w}
{lift : ⦃δ : Type w⦄ → m δ → n δ}
[Internal.LawfulMonadLiftFunction lift]
{f : β → n γ}
{l : List β}
:
theorem
Std.Iterators.ListIterator.stepAsHetT_iterM
{m : Type w → Type w'}
[Monad m]
{β : Type w}
[LawfulMonad m]
{l : List β}
:
(l.iterM m).stepAsHetT = match l with
| [] => pure IterStep.done
| x :: xs => pure (IterStep.yield (xs.iterM m) x)