@[deprecated Array.forIn_eq_forIn_data]
theorem
Array.forIn_eq_data_forIn
{m : Type u_1 → Type u_2}
{α : Type u_3}
{β : Type u_1}
[Monad m]
(as : Array α)
(b : β)
(f : α → β → m (ForInStep β))
:
Alias of Array.forIn_eq_forIn_toList
.
Alias of Array.forIn_eq_forIn_toList
.
zipWith / zip #
@[deprecated Array.toList_zipWith]
theorem
Array.data_zipWith
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(f : α → β → γ)
(as : Array α)
(bs : Array β)
:
(as.zipWith bs f).toList = List.zipWith f as.toList bs.toList
Alias of Array.toList_zipWith
.
@[deprecated Array.data_zipWith]
theorem
Array.zipWith_eq_zipWith_data
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
(f : α → β → γ)
(as : Array α)
(bs : Array β)
:
(as.zipWith bs f).toList = List.zipWith f as.toList bs.toList
Alias of Array.toList_zipWith
.
Alias of Array.toList_zipWith
.
filter #
theorem
Array.size_filter_le
{α : Type u_1}
(p : α → Bool)
(l : Array α)
:
(Array.filter p l).size ≤ l.size
flatten #
@[deprecated Array.toList_flatten]
Alias of Array.toList_flatten
.
@[deprecated Array.toList_flatten]
Alias of Array.toList_flatten
.
indexOf? #
theorem
Array.indexOf?_toList
{α : Type u_1}
[BEq α]
{a : α}
{l : Array α}
:
List.indexOf? a l.toList = Option.map Fin.val (l.indexOf? a)
@[irreducible]
theorem
Array.indexOf?_toList.aux
{α : Type u_1}
[BEq α]
{a : α}
(l : Array α)
(i : Nat)
:
Option.map (fun (x : Nat) => x + i) (List.indexOf? a (List.drop i l.toList)) = Option.map Fin.val (l.indexOfAux a i)
erase #
set #
map #
mem #
insertAt #
@[deprecated Array.size_insertIdx]
Alias of Array.size_insertIdx
.
@[irreducible]
theorem
Array.getElem_insertIdx_loop_lt
{α : Type u_1}
{as : Array α}
{i : Nat}
{j : Fin as.size}
{k : Nat}
{h : k < (Array.insertIdx.loop i as j).size}
(w : k < i)
:
(Array.insertIdx.loop i as j)[k] = as[k]
@[irreducible]
theorem
Array.getElem_insertIdx_loop_eq
{α : Type u_1}
{as : Array α}
{i j : Nat}
{hj : j < as.size}
{h : i < (Array.insertIdx.loop i as ⟨j, hj⟩).size}
:
(Array.insertIdx.loop i as ⟨j, hj⟩)[i] = if i ≤ j then as[j] else as[i]
@[irreducible]
theorem
Array.getElem_insertIdx_loop_gt
{α : Type u_1}
{as : Array α}
{i j : Nat}
{hj : j < as.size}
{k : Nat}
{h : k < (Array.insertIdx.loop i as ⟨j, hj⟩).size}
(w : i < k)
:
(Array.insertIdx.loop i as ⟨j, hj⟩)[k] = if k ≤ j then as[k - 1] else as[k]
theorem
Array.getElem_insertIdx_loop
{α : Type u_1}
{as : Array α}
{i j : Nat}
{hj : j < as.size}
{k : Nat}
{h : k < (Array.insertIdx.loop i as ⟨j, hj⟩).size}
:
@[deprecated Array.getElem_insertIdx_eq]
theorem
Array.getElem_insertAt_eq
{α : Type u_1}
(as : Array α)
(i : Nat)
(h : i ≤ as.size)
(v : α)
:
(as.insertIdx i v h)[i] = v
Alias of Array.getElem_insertIdx_eq
.