count #
zip #
zipIdx #
toArray #
next? #
dropLast #
set #
tail #
eraseP #
erase #
findIdx? #
replaceF #
disjoint #
union #
@[simp]
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 : β)
:
diff #
drop #
Pairwise #
IsChain #
theorem
List.IsChain.rel
{α✝ : Type u_1}
{R : α✝ → α✝ → Prop}
{a b : α✝}
{l : List α✝}
(p : IsChain R (a :: b :: l))
:
R a b
Alias of List.rel_of_isChain_cons_cons.
@[deprecated List.rel_of_isChain_cons_cons (since := "2025-09-19")]
theorem
List.rel_of_chain_cons
{α✝ : Type u_1}
{R : α✝ → α✝ → Prop}
{a b : α✝}
{l : List α✝}
(p : IsChain R (a :: b :: l))
:
R a b
Alias of List.rel_of_isChain_cons_cons.
theorem
List.IsChain.of_cons
{α✝ : Type u_1}
{R : α✝ → α✝ → Prop}
{b : α✝}
{l : List α✝}
(p : IsChain R (b :: l))
:
IsChain R l
Alias of List.isChain_of_isChain_cons.
@[deprecated List.IsChain.imp (since := "2025-09-19")]
theorem
List.Chain.imp
{α : Type u_1}
{R S : α → α → Prop}
{l : List α}
(H : ∀ ⦃a b : α⦄, R a b → S a b)
(p : IsChain R l)
:
IsChain S l
Alias of List.IsChain.imp.
@[deprecated List.IsChain.cons_of_imp (since := "2026-02-10")]
theorem
List.IsChain.cons_of_imp_of_cons
{α✝ : Type u_1}
{R : α✝ → α✝ → Prop}
{a : α✝}
{l : List α✝}
{b : α✝}
(h : ∀ (c : α✝), R a c → R b c)
:
Alias of List.IsChain.cons_of_imp.
@[deprecated List.IsChain.cons_of_imp_of_imp (since := "2025-09-19")]
theorem
List.Chain.imp'
{α : Type u_1}
{R S : α → α → Prop}
{a : α}
{l : List α}
{b : α}
(HRS : ∀ ⦃a b : α⦄, R a b → S a b)
(Hab : ∀ ⦃c : α⦄, R a c → S b c)
(h : IsChain R (a :: l))
:
Alias of List.IsChain.cons_of_imp_of_imp.
@[deprecated List.Pairwise.isChain (since := "2025-09-19")]
theorem
List.Pairwise.chain
{α✝ : Type u_1}
{R : α✝ → α✝ → Prop}
{l : List α✝}
(p : Pairwise R l)
:
IsChain R l
Alias of List.Pairwise.isChain.
range', range #
foldrIdx #
foldlIdx #
findIdxs #
findIdxsValues #
findIdxNth #
@[simp]
@[simp]
@[simp]
theorem
List.findIdxNth_cons_succ
{α : Type u_1}
{xs : List α}
{p : α → Bool}
{n : Nat}
{a : α}
:
findIdxNth p (a :: xs) (n + 1) = if p a = true then findIdxNth p xs n + 1 else findIdxNth p xs (n + 1) + 1
theorem
List.pos_findIdxNth_getElem
{α : Type u_1}
{p : α → Bool}
{n : Nat}
{xs : List α}
{h : findIdxNth p xs n < xs.length}
:
@[simp]
idxOf #
idxsOf #
idxOfNth #
countPBefore #
@[simp]
@[simp]
theorem
List.countPBefore_cons_succ
{α : Type u_1}
{xs : List α}
{p : α → Bool}
{i : Nat}
{a : α}
:
countPBefore p (a :: xs) (i + 1) = if p a = true then countPBefore p xs i + 1 else countPBefore p xs i
@[simp]
@[simp]
theorem
List.countPBefore_findIdxNth_of_lt_countP
{α : Type u_1}
{n : Nat}
{p : α → Bool}
{xs : List α}
:
n < countP p xs → countPBefore p xs (findIdxNth p xs n) = n
countBefore #
@[simp]
@[simp]
insertP #
dropPrefix?, dropSuffix?, dropInfix? #
@[simp]
@[simp]
@[irreducible]
IsPrefixOf?, IsSuffixOf? #
@[simp]
@[simp]
finRange #
sum/prod #
theorem
List.foldr_eq_foldl
{α : Type u_1}
(f : α → α → α)
(init : α)
[Std.Associative f]
[Std.LawfulIdentity f init]
{l : List α}
:
theorem
List.prod_concat
{α : Type u_1}
[Mul α]
[One α]
[Std.LawfulIdentity (fun (x1 x2 : α) => x1 * x2) 1]
[Std.Associative fun (x1 x2 : α) => x1 * x2]
{l : List α}
{a : α}
:
theorem
List.prod_eq_foldl
{α : Type u_1}
[Mul α]
[One α]
[Std.Associative fun (x1 x2 : α) => x1 * x2]
[Std.LawfulIdentity (fun (x1 x2 : α) => x1 * x2) 1]
{l : List α}
:
theorem
List.sum_concat
{α : Type u_1}
[Add α]
[Zero α]
[Std.LawfulIdentity (fun (x1 x2 : α) => x1 + x2) 0]
[Std.Associative fun (x1 x2 : α) => x1 + x2]
{l : List α}
{a : α}
:
theorem
List.sum_eq_foldl
{α : Type u_1}
[Add α]
[Zero α]
[Std.Associative fun (x1 x2 : α) => x1 + x2]
[Std.LawfulIdentity (fun (x1 x2 : α) => x1 + x2) 0]
{l : List α}
: