theorem
Std.Range.mem_range'_elems
{x : Nat}
(r : Std.Range)
(h : x ∈ List.range' r.start r.numElems r.step)
:
x ∈ r
theorem
Std.Range.forIn'_eq_forIn_range'
{m : Type u_1 → Type u_2}
{β : Type u_1}
[Monad m]
(r : Std.Range)
(init : β)
(f : (a : Nat) → a ∈ r → β → m (ForInStep β))
:
forIn' r init f = forIn (List.pmap Subtype.mk (List.range' r.start r.numElems r.step) ⋯) init fun (x : Subtype (Membership.mem r)) =>
match (motive := Subtype (Membership.mem r) → β → m (ForInStep β)) x with
| ⟨a, h⟩ => f a h