toArray #
next? #
dropLast #
set #
tail #
eraseP #
erase #
findIdx? #
replaceF #
disjoint #
theorem
List.disjoint_of_subset_left
{α✝ : Type u_1}
{l₁ l l₂ : List α✝}
(ss : l₁ ⊆ l)
(d : l.Disjoint l₂)
:
l₁.Disjoint l₂
theorem
List.disjoint_of_subset_right
{α✝ : Type u_1}
{l₂ l l₁ : List α✝}
(ss : l₂ ⊆ l)
(d : l₁.Disjoint l)
:
l₁.Disjoint l₂
theorem
List.disjoint_of_disjoint_cons_left
{α✝ : Type u_1}
{a : α✝}
{l₁ l₂ : List α✝}
:
(a :: l₁).Disjoint l₂ → l₁.Disjoint l₂
theorem
List.disjoint_of_disjoint_cons_right
{α✝ : Type u_1}
{a : α✝}
{l₁ l₂ : List α✝}
:
l₁.Disjoint (a :: l₂) → l₁.Disjoint l₂
theorem
List.disjoint_of_disjoint_append_left_left
{α✝ : Type u_1}
{l₁ l₂ l : List α✝}
(d : (l₁ ++ l₂).Disjoint l)
:
l₁.Disjoint l
theorem
List.disjoint_of_disjoint_append_left_right
{α✝ : Type u_1}
{l₁ l₂ l : List α✝}
(d : (l₁ ++ l₂).Disjoint l)
:
l₂.Disjoint l
theorem
List.disjoint_of_disjoint_append_right_left
{α✝ : Type u_1}
{l l₁ l₂ : List α✝}
(d : l.Disjoint (l₁ ++ l₂))
:
l.Disjoint l₁
theorem
List.disjoint_of_disjoint_append_right_right
{α✝ : Type u_1}
{l l₁ l₂ : List α✝}
(d : l.Disjoint (l₁ ++ l₂))
:
l.Disjoint l₂
union #
@[simp]
theorem
List.cons_union
{α : Type u_1}
[BEq α]
(a : α)
(l₁ l₂ : List α)
:
a :: l₁ ∪ l₂ = List.insert a (l₁ ∪ l₂)
inter #
product #
monadic operations #
theorem
List.forIn_eq_bindList
{m : Type u_1 → Type u_2}
{α : Type u_3}
{β : Type u_1}
[Monad m]
[LawfulMonad m]
(f : α → β → m (ForInStep β))
(l : List α)
(init : β)
:
forIn l init f = ForInStep.run <$> ForInStep.bindList f l (ForInStep.yield init)
diff #
theorem
List.diff_eq_foldl
{α : Type u_1}
[BEq α]
[LawfulBEq α]
(l₁ l₂ : List α)
:
l₁.diff l₂ = foldl List.erase l₁ l₂
drop #
Chain #
range', range #
indexOf and indexesOf #
insertP #
theorem
List.insertP_loop
{α : Type u_1}
{p : α → Bool}
(a : α)
(l r : List α)
:
insertP.loop p a l r = r.reverseAux (insertP p a l)
dropPrefix?, dropSuffix?, dropInfix? #
@[irreducible]
deprecations #
@[deprecated List.isEmpty_iff (since := "2024-08-15")]
Alias of List.isEmpty_iff
.
@[deprecated List.modify_nil (since := "2024-10-21")]
Alias of List.modify_nil
.
@[deprecated List.modify_zero_cons (since := "2024-10-21")]
Alias of List.modify_zero_cons
.
@[deprecated List.modifyTailIdx_id (since := "2024-10-21")]
Alias of List.modifyTailIdx_id
.
@[deprecated List.eraseIdx_eq_modifyTailIdx (since := "2024-10-21")]
theorem
List.eraseIdx_eq_modifyNthTail
{α : Type u_1}
(n : Nat)
(l : List α)
:
l.eraseIdx n = modifyTailIdx tail n l
Alias of List.eraseIdx_eq_modifyTailIdx
.
@[deprecated List.length_modifyTailIdx (since := "2024-10-21")]
theorem
List.length_modifyNthTail
{α : Type u_1}
(f : List α → List α)
(H : ∀ (l : List α), (f l).length = l.length)
(n : Nat)
(l : List α)
:
(modifyTailIdx f n l).length = l.length
Alias of List.length_modifyTailIdx
.
@[deprecated List.length_modifyTailIdx (since := "2024-06-07")]
theorem
List.modifyNthTail_length
{α : Type u_1}
(f : List α → List α)
(H : ∀ (l : List α), (f l).length = l.length)
(n : Nat)
(l : List α)
:
(modifyTailIdx f n l).length = l.length
Alias of List.length_modifyTailIdx
.
@[deprecated List.modifyTailIdx_add (since := "2024-10-21")]
theorem
List.modifyNthTail_add
{α : Type u_1}
(f : List α → List α)
(n : Nat)
(l₁ l₂ : List α)
:
modifyTailIdx f (l₁.length + n) (l₁ ++ l₂) = l₁ ++ modifyTailIdx f n l₂
Alias of List.modifyTailIdx_add
.
@[deprecated List.exists_of_modifyTailIdx (since := "2024-10-21")]
theorem
List.exists_of_modifyNthTail
{α : Type u_1}
(f : List α → List α)
{n : Nat}
{l : List α}
(h : n ≤ l.length)
:
Alias of List.exists_of_modifyTailIdx
.
@[deprecated List.length_modify (since := "2024-10-21")]
Alias of List.length_modify
.
@[deprecated List.length_modify (since := "2024-06-07")]
Alias of List.length_modify
.
@[deprecated List.getElem?_modify_eq (since := "2024-10-21")]
Alias of List.getElem?_modify_eq
.
@[deprecated List.getElem?_modify_ne (since := "2024-06-12")]
theorem
List.getElem?_modifyNth_ne
{α : Type u_1}
(f : α → α)
{m n : Nat}
(l : List α)
(h : m ≠ n)
:
Alias of List.getElem?_modify_ne
.
@[deprecated List.exists_of_modify (since := "2024-10-21")]
theorem
List.exists_of_modifyNth
{α : Type u_1}
(f : α → α)
{n : Nat}
{l : List α}
(h : n < l.length)
:
Alias of List.exists_of_modify
.
@[deprecated List.modifyTailIdx_eq_take_drop (since := "2024-10-21")]
theorem
List.modifyNthTail_eq_take_drop
{α : Type u_1}
(f : List α → List α)
(H : f [] = [])
(n : Nat)
(l : List α)
:
modifyTailIdx f n l = take n l ++ f (drop n l)
Alias of List.modifyTailIdx_eq_take_drop
.
@[deprecated List.modify_eq_take_drop (since := "2024-10-21")]
Alias of List.modify_eq_take_drop
.
@[deprecated List.set_eq_modify (since := "2024-10-21")]
Alias of List.set_eq_modify
.
@[deprecated List.modify_eq_set_get? (since := "2024-10-21")]
Alias of List.modify_eq_set_get?
.
@[deprecated List.modify_eq_set_get (since := "2024-10-21")]
theorem
List.modifyNth_eq_set_get
{α : Type u_1}
(f : α → α)
{n : Nat}
{l : List α}
(h : n < l.length)
:
Alias of List.modify_eq_set_get
.