Documentation

Std.Data.Iterators.Lemmas.Combinators.TakeWhile

theorem Std.Iter.takeWhile_eq {α β : Type u_1} [Iterator α Id β] {P : βBool} {it : Iter β} :
theorem Std.Iter.step_takeWhile {α β : Type u_1} [Iterator α Id β] {P : βBool} {it : Iter β} :
(takeWhile P it).step = match it.step with | IterStep.yield it' out, h => match hP : P out with | true => PlausibleIterStep.yield (takeWhile P it') out | false => PlausibleIterStep.done | IterStep.skip it', h => PlausibleIterStep.skip (takeWhile P it') | IterStep.done, h => PlausibleIterStep.done
theorem Std.Iter.val_step_takeWhile {α β : Type u_1} [Iterator α Id β] {P : βBool} {it : Iter β} :
(takeWhile P it).step.val = match it.step.val with | IterStep.yield it' out => match P out with | true => IterStep.yield (takeWhile P it') out | false => IterStep.done | IterStep.skip it' => IterStep.skip (takeWhile P it') | IterStep.done => IterStep.done
theorem Std.Iter.atIdxSlow?_takeWhile {α β : Type u_1} [Iterator α Id β] [Iterators.Productive α Id] {l : Nat} {it : Iter β} {P : βBool} :
atIdxSlow? l (takeWhile P it) = if ∀ (k : Nat), k lOption.any P (atIdxSlow? k it) = true then atIdxSlow? l it else none
@[simp]
theorem Std.Iter.toList_takeWhile_of_finite {α β : Type u_1} [Iterator α Id β] {P : βBool} [Iterators.Finite α Id] {it : Iter β} :
@[simp]
theorem Std.Iter.toListRev_takeWhile_of_finite {α β : Type u_1} [Iterator α Id β] {P : βBool} [Iterators.Finite α Id] {it : Iter β} :
@[simp]
theorem Std.Iter.toArray_takeWhile_of_finite {α β : Type u_1} [Iterator α Id β] {P : βBool} [Iterators.Finite α Id] {it : Iter β} :