Documentation

Std.Data.Iterators.Lemmas.Combinators.Monadic.Take

theorem Std.Iterators.IterM.step_take {α : Type u_1} {m : Type u_1 → Type u_2} {β : Type u_1} [Monad m] [Iterator α m β] {n : Nat} {it : IterM m β} :
(take n it).step = match n with | 0 => pure (PlausibleIterStep.done ) | k.succ => do let __do_liftit.step match __do_lift with | IterStep.yield it' out, h => pure (PlausibleIterStep.yield (take k it') out ) | IterStep.skip it', h => pure (PlausibleIterStep.skip (take (k + 1) it') ) | IterStep.done, h => pure (PlausibleIterStep.done )
theorem Std.Iterators.IterM.toList_take_zero {α : Type u_1} {m : Type u_1 → Type u_2} {β : Type u_1} [Monad m] [LawfulMonad m] [Iterator α m β] [Finite (Take α m β) m] [IteratorCollect (Take α m β) m m] [LawfulIteratorCollect (Take α m β) m m] {it : IterM m β} :