@[simp]
theorem
List.count_mergeSort
{α : Type u_4}
[ha : DecidableEq α]
{xs : List α}
{x : α}
{r : α → α → Bool}
:
theorem
List.eq_of_perm_of_pairwise
{α : Type u_4}
{xs ys : List α}
{r : α → α → Prop}
(hp : xs.Perm ys)
(hx : Pairwise r xs)
(hy : Pairwise r ys)
(h_tra : ∀ (a b c : α), a ∈ xs → b ∈ xs → c ∈ xs → r a b → r b c → r a c)
(h_tot : ∀ (a b : α), a ∈ xs → b ∈ xs → r a b ∨ r b a)
(h_ant : ∀ (a b : α), a ∈ xs → b ∈ xs → r a b → r b a → a = b)
:
@[simp]
@[simp]
theorem
List.max?_eq_max?_of_perm
{α : Type u_1}
{xs ys : List α}
[ha : LinearOrder α]
(h : xs.Perm ys)
:
theorem
List.le_of_max?_eq_some
{α : Type u_1}
{xs : List α}
[ha : LinearOrder α]
{x m : α}
(h₁ : x ∈ xs)
(h₂ : xs.max? = some m)
:
theorem
List.le_getD_max?_of_mem
{α : Type u_1}
{xs : List α}
[ha : LinearOrder α]
{x y : α}
(h : x ∈ xs)
:
theorem
List.le_elim_max_max?_of_mem
{α : Type u_1}
{xs : List α}
[ha : LinearOrder α]
{x y z : α}
(h : x ∈ xs)
:
theorem
List.pairwise_le_of_pairwise_lt
{α : Type u_1}
{xs : List α}
[ha : LinearOrder α]
(h : Pairwise (fun (x1 x2 : α) => x1 < x2) xs)
:
theorem
List.mem_of_count_ne_zero
{α : Type u_1}
{xs : List α}
[ha : DecidableEq α]
{x : α}
(h : count x xs ≠ 0)
:
theorem
List.mem_of_count_pos
{α : Type u_1}
{xs : List α}
[ha : DecidableEq α]
{x : α}
(h : 0 < count x xs)
:
theorem
List.mem_of_lt_count
{α : Type u_1}
{xs : List α}
[ha : DecidableEq α]
{x : α}
{n : ℕ}
(h : n < count x xs)
:
theorem
List.erase_append_cons_eq_of_not_mem
{α : Type u_1}
{xs ys : List α}
[ha : DecidableEq α]
{x : α}
(h : x ∉ xs)
:
theorem
List.sum_eq_sum_toFinset
{α : Type u_1}
{xs : List α}
[ha₁ : DecidableEq α]
[ha₂ : Ring α]
(h : xs.Nodup)
:
theorem
List.nodup_of_pairwise_lt
{α : Type u_1}
{xs : List α}
[ha : LinearOrder α]
(h : Pairwise (fun (x1 x2 : α) => x1 < x2) xs)
:
xs.Nodup
theorem
List.pairwise_lt_of_pairwise_le
{α : Type u_1}
{xs : List α}
[ha : LinearOrder α]
(h₁ : Pairwise (fun (x1 x2 : α) => x1 ≤ x2) xs)
(h₂ : xs.Nodup)
:
theorem
List.sum_nonpos
{α : Type u_1}
{xs : List α}
[ha₁ : LinearOrder α]
[ha₂ : Ring α]
[ha₃ : AddLeftMono α]
(h : ∀ x ∈ xs, x ≤ 0)
:
theorem
List.sum_take_le_of_nonneg
{α : Type u_1}
{xs : List α}
[ha₁ : LinearOrder α]
[ha₂ : Ring α]
[ha₃ : AddLeftMono α]
{k : ℕ}
(h₁ : ∀ x ∈ xs, 0 ≤ x)
:
theorem
List.le_sum_take_of_nonpos
{α : Type u_1}
{xs : List α}
[ha₁ : LinearOrder α]
[ha₂ : Ring α]
[ha₃ : AddLeftMono α]
{k : ℕ}
(h₁ : ∀ x ∈ xs, x ≤ 0)
: