Documentation

Std.Internal.ForIn.Lemmas

ForIn.toList of the effect-free containers #

Each bridge lemma computes ForIn.toList for one container, in the spelling that carries the membership lemmas the verification conditions need, and each instance records that the container's loop is effect-free.

@[simp]
theorem Std.Internal.ForIn.toList_list {γ : Type u₁} (xs : List γ) :
instance Std.Internal.instPureForIn'List {m : Type u → Type v} [Monad m] {α : Type u₁} :
PureForIn' m (List α) α
instance Std.Internal.instPureForInList {m : Type u → Type v} [Monad m] {α : Type u₁} :
PureForIn m (List α) α
@[simp]
theorem Std.Internal.ForIn.toList_array {γ : Type u₁} (xs : Array γ) :
instance Std.Internal.instPureForIn'Array {m : Type u → Type v} [Monad m] {α : Type u₁} :
PureForIn' m (Array α) α
instance Std.Internal.instPureForInArray {m : Type u → Type v} [Monad m] {α : Type u₁} :
PureForIn m (Array α) α
@[simp]

ForIn.toList on an iterator is the iterator's own toList, so every container whose ForIn loop iterates its Std.ToIterator reaches the iterator lemmas through this one step.

@[simp]

ForIn.toList on a pure monadic iterator is the iterator's own toList.

@[simp]
theorem Std.Internal.ForIn.toList_slice {γ : Type u} {α γ' : Type w} [ToIterator (Slice γ) Id α γ'] [Iterator α Id γ'] [Iterators.Finite α Id] [IteratorLoop α Id Id] [LawfulIteratorLoop α Id Id] (s : Slice γ) :

ForIn.toList on a slice is the slice's own toList.