@[simp]
theorem
List.combinations_succ
{α : Type u_1}
{xs : List α}
{n : ℕ}
:
xs.combinations (n + 1) = flatMap (fun (x : α) => map (fun (x_1 : List α) => x :: x_1) (xs.combinations n)) xs
@[simp]
@[simp]
@[simp]
theorem
List.length_le_sum_of
{α : Type u_1}
{xs : List α}
[ha₁ : LinearOrder α]
[ha₂ : Semiring α]
[ha₃ : AddLeftMono α]
(h : ∀ x ∈ xs, 1 ≤ x)
:
theorem
List.length_lt_sum_of
{α : Type u_1}
{xs : List α}
[ha₁ : LinearOrder α]
[ha₂ : Semiring α]
[ha₃ : AddLeftMono α]
:
theorem
List.le_max_of_le_mem
{α : Type u_1}
{xs : List α}
[ha : LinearOrder α]
{x : α}
(h : ∃ y ∈ xs, x ≤ y)
:
theorem
List.foldl_eq_foldlWith'
{α : Type u_1}
{β : Type u_2}
{xs : List α}
[ha : DecidableEq α]
{f : β → α → β}
{z : β}
:
theorem
List.foldl_dite_mem_apply'
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{xs : List α}
[ha : DecidableEq α]
{f : (x : α) → x ∈ xs → β}
{g : γ → α → β → γ}
{z : γ}
(z' : β)
:
theorem
List.foldl_dite_mem_apply
{α : Type u_1}
{β : Type u_2}
{γ : Type u_3}
{xs : List α}
[ha : DecidableEq α]
{f : (x : α) → x ∈ xs → β}
{g : γ → α → β → γ}
{z z₁ : γ}
(z' : β)
:
theorem
List.le_foldl_dite_max
{α : Type u_1}
{β : Type u_2}
{xs : List α}
[ha : DecidableEq α]
[hb : LinearOrder β]
{f : (x : α) → x ∈ xs → β}
{x : α}
{z z₁ : β}
(h : x ∈ xs)
:
theorem
List.foldr_eq_foldl'
{α : Type u_1}
{xs : List α}
{f : α → α → α}
{z : α}
[Std.Associative f]
[Std.LawfulIdentity f z]
:
@[simp]
theorem
List.min!!_cons
{α : Type u_1}
{xs : List α}
[ha₁ : SemilatticeInf α]
[ha₂ : OrderTop α]
{x : α}
:
@[simp]
theorem
List.max!!_cons
{α : Type u_1}
{xs : List α}
[ha₁ : SemilatticeSup α]
[ha₂ : OrderBot α]
{x : α}
:
theorem
List.Perm.min!!
{α : Type u_1}
{xs ys : List α}
[ha₁ : SemilatticeInf α]
[ha₂ : OrderTop α]
(h : xs.Perm ys)
:
theorem
List.Perm.max!!
{α : Type u_1}
{xs ys : List α}
[ha₁ : SemilatticeSup α]
[ha₂ : OrderBot α]
(h : xs.Perm ys)
:
@[simp]
theorem
List.min!!_reverse
{α : Type u_1}
{xs : List α}
[ha₁ : SemilatticeInf α]
[ha₂ : OrderTop α]
:
@[simp]
theorem
List.max!!_reverse
{α : Type u_1}
{xs : List α}
[ha₁ : SemilatticeSup α]
[ha₂ : OrderBot α]
:
@[simp]
theorem
List.foldr_min_eq_min!!
{α : Type u_1}
{xs : List α}
[ha₁ : SemilatticeInf α]
[ha₂ : OrderTop α]
{z : α}
:
@[simp]
theorem
List.foldr_max_eq_max!!
{α : Type u_1}
{xs : List α}
[ha₁ : SemilatticeSup α]
[ha₂ : OrderBot α]
{z : α}
:
@[simp]
theorem
List.foldl_min_eq_min!!
{α : Type u_1}
{xs : List α}
[ha₁ : SemilatticeInf α]
[ha₂ : OrderTop α]
{z : α}
:
@[simp]
theorem
List.foldl_max_eq_max!!
{α : Type u_1}
{xs : List α}
[ha₁ : SemilatticeSup α]
[ha₂ : OrderBot α]
{z : α}
:
theorem
List.sortedLE.filter
{α : Type u_1}
{xs : List α}
[ha : LinearOrder α]
{p : α → Bool}
(h : xs.SortedLE)
:
(List.filter p xs).SortedLE
theorem
List.sortedLT.filter
{α : Type u_1}
{xs : List α}
[ha : LinearOrder α]
{p : α → Bool}
(h : xs.SortedLT)
:
(List.filter p xs).SortedLT
theorem
List.eq_of_perm_of_sortedLE
{α : Type u_1}
[ha : LinearOrder α]
{xs ys : List α}
(hp : xs.Perm ys)
(hx : xs.SortedLE)
(hy : ys.SortedLE)
:
theorem
List.findIdx_eq_findIdx_of
{α : Type u_1}
{β : Type u_2}
{xs : List α}
{ys : List β}
{p : α → Bool}
{q : β → Bool}
(h₁ : ∃ x ∈ xs, p x = true)
(h₂ :
∀ (i : ℕ) (x : i < xs.length),
p xs[i] = true →
(∀ (j : ℕ) (x_1 : j < i), p xs[j] = false) →
∃ (x : i < ys.length), q ys[i] = true ∧ ∀ (j : ℕ) (x_1 : j < i), q ys[j] = false)
:
theorem
List.findIdx_eq_findIdx_of'
{α : Type u_1}
{β : Type u_2}
{xs : List α}
{ys : List β}
{p : α → Bool}
{q : β → Bool}
(h₁ : ∃ x ∈ xs, p x = true)
(h₂ :
∀ (i : ℕ) (x : i < xs.length),
p xs[i] = true →
(∀ (j : ℕ) (x_1 : j < i), p xs[j] = false) →
∃ (x : i < ys.length), q ys[i] = true ∧ ∀ (j : ℕ) (x_1 : j < i), q ys[j] = false)
: