theorem
Std.Iter.step_take
{α β : Type u_1}
[Iterator α Id β]
{n : Nat}
{it : Iter β}
:
(take n it).step = match n with
| 0 => PlausibleIterStep.done ⋯
| k.succ =>
match it.step with
| ⟨IterStep.yield it' out, h⟩ => PlausibleIterStep.yield (take k it') out ⋯
| ⟨IterStep.skip it', h⟩ => PlausibleIterStep.skip (take (k + 1) it') ⋯
| ⟨IterStep.done, h⟩ => PlausibleIterStep.done ⋯
theorem
Std.Iter.atIdxSlow?_take
{α β : Type u_1}
[Iterator α Id β]
[Iterators.Productive α Id]
{k l : Nat}
{it : Iter β}
:
@[simp]
theorem
Std.Iter.toList_take_zero
{α β : Type u_1}
[Iterator α Id β]
[Iterators.Finite (Iterators.Types.Take α Id) Id]
{it : Iter β}
:
theorem
Std.Iter.step_toTake
{α β : Type u_1}
[Iterator α Id β]
[Iterators.Finite α Id]
{it : Iter β}
:
it.toTake.step = match it.step with
| ⟨IterStep.yield it' out, h⟩ => PlausibleIterStep.yield it'.toTake out ⋯
| ⟨IterStep.skip it', h⟩ => PlausibleIterStep.skip it'.toTake ⋯
| ⟨IterStep.done, h⟩ => PlausibleIterStep.done ⋯