The areas / V03. Sets, finite structures and big operators
Mathlib.Data.Finset.Max
113 declarations and 1 deprecated aliases. Mathlib docs · Source
Maximum and minimum of finite sets
max and min of finite sets
theorem Finset.max'.congr_simp E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s s_1 : Finset α) (e_s : s = s_1) (H : s.Nonempty), s.max' H = s_1.max' ⋯
theorem Finset.min'.congr_simp E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s s_1 : Finset α) (e_s : s = s_1) (H : s.Nonempty), s.min' H = s_1.min' ⋯
def Finset.max E1 #
{α : Type u_1} → [LinearOrder α] → Finset α → WithBot α
Let s be a finset in a linear order. Then s.max is the maximum of s if s is not empty,
and ⊥ otherwise. It belongs to WithBot α. If you want to get an element of α, see
s.max'.
def Finset.min E1 #
{α : Type u_1} → [LinearOrder α] → Finset α → WithTop α
Let s be a finset in a linear order. Then s.min is the minimum of s if s is not empty,
and ⊤ otherwise. It belongs to WithTop α. If you want to get an element of α, see
s.min'.
theorem Finset.min_eq_inf_coe E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α}, s.min = s.inf WithTop.some
theorem Finset.max_eq_sup_coe E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α}, s.max = s.sup WithBot.some
theorem Finset.min_eq_inf_withTop E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α), s.min = s.inf WithTop.some
theorem Finset.max_eq_sup_withBot E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α), s.max = s.sup WithBot.some
theorem Finset.min_empty E0 #
∀ {α : Type u_1} [inst : LinearOrder α], ∅.min = ⊤
theorem Finset.max_empty E0 #
∀ {α : Type u_1} [inst : LinearOrder α], ∅.max = ⊥
theorem Finset.max_insert E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {a : α} {s : Finset α}, (insert a s).max = max (↑a) s.max
theorem Finset.min_insert E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {a : α} {s : Finset α}, (insert a s).min = min (↑a) s.min
theorem Finset.max_singleton E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {a : α}, {a}.max = ↑a
theorem Finset.min_singleton E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {a : α}, {a}.min = ↑a
theorem Finset.max_pair E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (a b : α), {a, b}.max = max ↑a ↑b
theorem Finset.min_pair E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (a b : α), {a, b}.min = min ↑a ↑b
theorem Finset.min_of_mem E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α} {a : α}, a ∈ s → ∃ b, s.min = ↑b
theorem Finset.max_of_mem E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α} {a : α}, a ∈ s → ∃ b, s.max = ↑b
theorem Finset.min_of_nonempty E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α}, s.Nonempty → ∃ a, s.min = ↑a
theorem Finset.max_of_nonempty E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α}, s.Nonempty → ∃ a, s.max = ↑a
theorem Finset.min_eq_top E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α}, s.min = ⊤ ↔ s = ∅
theorem Finset.max_eq_bot E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α}, s.max = ⊥ ↔ s = ∅
theorem Finset.mem_of_min E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α} {a : α}, s.min = ↑a → a ∈ s
theorem Finset.mem_of_max E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α} {a : α}, s.max = ↑a → a ∈ s
theorem Finset.min_le E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {a : α} {s : Finset α}, a ∈ s → s.min ≤ ↑a
theorem Finset.le_max E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {a : α} {s : Finset α}, a ∈ s → ↑a ≤ s.max
theorem Finset.notMem_of_coe_lt_min E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {a : α} {s : Finset α}, ↑a < s.min → a ∉ s
theorem Finset.notMem_of_max_lt_coe E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {a : α} {s : Finset α}, s.max < ↑a → a ∉ s
theorem Finset.le_max_of_eq E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α} {a b : α}, a ∈ s → s.max = ↑b → a ≤ b
theorem Finset.min_le_of_eq E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α} {a b : α}, a ∈ s → s.min = ↑b → b ≤ a
theorem Finset.notMem_of_lt_min E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α} {a b : α}, a < b → s.min = ↑b → a ∉ s
theorem Finset.notMem_of_max_lt E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α} {a b : α}, b < a → s.max = ↑b → a ∉ s
theorem Finset.max_union E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s t : Finset α}, (s ∪ t).max = max s.max t.max
theorem Finset.min_union E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s t : Finset α}, (s ∪ t).min = min s.min t.min
theorem Finset.max_mono E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s t : Finset α}, s ⊆ t → s.max ≤ t.max
theorem Finset.min_mono E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s t : Finset α}, s ⊆ t → t.min ≤ s.min
theorem Finset.le_min E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {M : WithTop α} {s : Finset α}, (∀ a ∈ s, M ≤ ↑a) → M ≤ s.min
theorem Finset.max_le E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {M : WithBot α} {s : Finset α}, (∀ a ∈ s, ↑a ≤ M) → s.max ≤ M
theorem Finset.max_le_iff E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {m : WithBot α} {s : Finset α}, s.max ≤ m ↔ ∀ a ∈ s, ↑a ≤ m
theorem Finset.le_min_iff E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {m : WithTop α} {s : Finset α}, m ≤ s.min ↔ ∀ a ∈ s, m ≤ ↑a
theorem Finset.min_eq_bot E0 #
∀ {α : Type u_1} [inst : LinearOrder α] [inst_1 : OrderBot α] {s : Finset α}, s.min = ⊥ ↔ ⊥ ∈ s
theorem Finset.max_eq_top E0 #
∀ {α : Type u_1} [inst : LinearOrder α] [inst_1 : OrderTop α] {s : Finset α}, s.max = ⊤ ↔ ⊤ ∈ s
def Finset.max' E1 #
{α : Type u_1} → [LinearOrder α] → (s : Finset α) → s.Nonempty → α
Given a nonempty finset s in a linear order α, then s.max' H is its maximum, as an
element of α, where H is a proof of nonemptiness. Without this assumption, use instead s.max,
taking values in WithBot α.
def Finset.min' E1 #
{α : Type u_1} → [LinearOrder α] → (s : Finset α) → s.Nonempty → α
Given a nonempty finset s in a linear order α, then s.min' H is its minimum, as an
element of α, where H is a proof of nonemptiness. Without this assumption, use instead s.min,
taking values in WithTop α.
theorem Finset.max'_mem E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (H : s.Nonempty), s.max' H ∈ s
theorem Finset.min'_mem E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (H : s.Nonempty), s.min' H ∈ s
theorem Finset.min'_le E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (x : α) (H2 : x ∈ s), s.min' ⋯ ≤ x
theorem Finset.le_max' E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (x : α) (H2 : x ∈ s), x ≤ s.max' ⋯
theorem Finset.max'_le E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (H : s.Nonempty) (x : α), (∀ y ∈ s, y ≤ x) → s.max' H ≤ x
theorem Finset.le_min' E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (H : s.Nonempty) (x : α), (∀ y ∈ s, x ≤ y) → x ≤ s.min' H
theorem Finset.isGreatest_max' E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (H : s.Nonempty), IsGreatest (↑s) (s.max' H)
theorem Finset.isLeast_min' E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (H : s.Nonempty), IsLeast (↑s) (s.min' H)
theorem Finset.max'_le_iff E0 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (H : s.Nonempty) {x : α}, s.max' H ≤ x ↔ ∀ y ∈ s, y ≤ x
theorem Finset.le_min'_iff E0 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (H : s.Nonempty) {x : α}, x ≤ s.min' H ↔ ∀ y ∈ s, x ≤ y
theorem Finset.lt_min'_iff E0 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (H : s.Nonempty) {x : α}, x < s.min' H ↔ ∀ y ∈ s, x < y
theorem Finset.max'_lt_iff E0 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (H : s.Nonempty) {x : α}, s.max' H < x ↔ ∀ y ∈ s, y < x
theorem Finset.max'_eq_sup' E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (H : s.Nonempty), s.max' H = s.sup' H id
theorem Finset.min'_eq_inf' E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (H : s.Nonempty), s.min' H = s.inf' H id
theorem Finset.max'_singleton E0 #
∀ {α : Type u_1} [inst : LinearOrder α] (a : α), {a}.max' ⋯ = a
{a}.max' _ is a.
theorem Finset.min'_singleton E0 #
∀ {α : Type u_1} [inst : LinearOrder α] (a : α), {a}.min' ⋯ = a
{a}.min' _ is a.
theorem Finset.max'_eq_iff E0 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (H : s.Nonempty) (a : α), s.max' H = a ↔ a ∈ s ∧ ∀ b ∈ s, b ≤ a
theorem Finset.min'_eq_iff E0 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (H : s.Nonempty) (a : α), s.min' H = a ↔ a ∈ s ∧ ∀ b ∈ s, a ≤ b
theorem Finset.min'_le_max' E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (hs : s.Nonempty), s.min' hs ≤ s.max' hs
theorem Finset.min'_lt_max' E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) {i j : α} (H1 : i ∈ s), j ∈ s → i ≠ j → s.min' ⋯ < s.max' ⋯
theorem Finset.min'_lt_max'_of_card E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (h₂ : 1 < s.card), s.min' ⋯ < s.max' ⋯
If there's more than 1 element, the min' is less than the max'. An alternate version of
min'_lt_max' which is sometimes more convenient.
theorem Finset.min'_union E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s₁ s₂ : Finset α} (h₁ : s₁.Nonempty) (h₂ : s₂.Nonempty),
(s₁ ∪ s₂).min' ⋯ = min (s₁.min' h₁) (s₂.min' h₂)
theorem Finset.max'_union E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s₁ s₂ : Finset α} (h₁ : s₁.Nonempty) (h₂ : s₂.Nonempty),
(s₁ ∪ s₂).max' ⋯ = max (s₁.max' h₁) (s₂.max' h₂)
theorem Finset.map_ofDual_max E0 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset αᵒᵈ),
WithBot.map (⇑OrderDual.ofDual) s.max = (Finset.image (⇑OrderDual.ofDual) s).min
theorem Finset.map_ofDual_min E0 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset αᵒᵈ),
WithTop.map (⇑OrderDual.ofDual) s.min = (Finset.image (⇑OrderDual.ofDual) s).max
theorem Finset.map_toDual_max E0 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α),
WithBot.map (⇑OrderDual.toDual) s.max = (Finset.image (⇑OrderDual.toDual) s).min
theorem Finset.map_toDual_min E0 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α),
WithTop.map (⇑OrderDual.toDual) s.min = (Finset.image (⇑OrderDual.toDual) s).max
theorem Finset.ofDual_min' E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset αᵒᵈ} (hs : s.Nonempty),
OrderDual.ofDual (s.min' hs) = (Finset.image (⇑OrderDual.ofDual) s).max' ⋯
theorem Finset.ofDual_max' E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset αᵒᵈ} (hs : s.Nonempty),
OrderDual.ofDual (s.max' hs) = (Finset.image (⇑OrderDual.ofDual) s).min' ⋯
theorem Finset.toDual_min' E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α} (hs : s.Nonempty),
OrderDual.toDual (s.min' hs) = (Finset.image (⇑OrderDual.toDual) s).max' ⋯
theorem Finset.toDual_max' E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α} (hs : s.Nonempty),
OrderDual.toDual (s.max' hs) = (Finset.image (⇑OrderDual.toDual) s).min' ⋯
theorem Finset.max'_subset E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s t : Finset α} (H : s.Nonempty) (hst : s ⊆ t), s.max' H ≤ t.max' ⋯
theorem Finset.min'_subset E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s t : Finset α} (H : s.Nonempty) (hst : s ⊆ t), t.min' ⋯ ≤ s.min' H
theorem Finset.max'_insert E0 #
∀ {α : Type u_1} [inst : LinearOrder α] (a : α) (s : Finset α) (H : s.Nonempty), (insert a s).max' ⋯ = max a (s.max' H)
theorem Finset.min'_insert E0 #
∀ {α : Type u_1} [inst : LinearOrder α] (a : α) (s : Finset α) (H : s.Nonempty), (insert a s).min' ⋯ = min a (s.min' H)
theorem Finset.max'_pair E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (a b : α), {a, b}.max' ⋯ = max a b
theorem Finset.min'_pair E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (a b : α), {a, b}.min' ⋯ = min a b
theorem Finset.min'_lt_of_mem_erase_min' E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (H : s.Nonempty) [inst_1 : DecidableEq α] {a : α},
a ∈ s.erase (s.min' H) → s.min' H < a
theorem Finset.lt_max'_of_mem_erase_max' E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α) (H : s.Nonempty) [inst_1 : DecidableEq α] {a : α},
a ∈ s.erase (s.max' H) → a < s.max' H
theorem Finset.max'_image E0 #
∀ {α : Type u_1} {β : Type u_2} [inst : LinearOrder α] [inst_1 : LinearOrder β] {f : α → β},
Monotone f → ∀ (s : Finset α) (h : (Finset.image f s).Nonempty), (Finset.image f s).max' h = f (s.max' ⋯)
To rewrite from right to left, use Monotone.map_finset_max'.
theorem Finset.min'_image E0 #
∀ {α : Type u_1} {β : Type u_2} [inst : LinearOrder α] [inst_1 : LinearOrder β] {f : α → β},
Monotone f → ∀ (s : Finset α) (h : (Finset.image f s).Nonempty), (Finset.image f s).min' h = f (s.min' ⋯)
To rewrite from right to left, use Monotone.map_finset_min'.
theorem Monotone.map_finset_max' E0 #
∀ {α : Type u_1} {β : Type u_2} [inst : LinearOrder α] [inst_1 : LinearOrder β] {f : α → β},
Monotone f → ∀ {s : Finset α} (h : s.Nonempty), f (s.max' h) = (Finset.image f s).max' ⋯
A version of Finset.max'_image with LHS and RHS reversed.
Also, this version assumes that s is nonempty, not its image.
theorem Monotone.map_finset_min' E0 #
∀ {α : Type u_1} {β : Type u_2} [inst : LinearOrder α] [inst_1 : LinearOrder β] {f : α → β},
Monotone f → ∀ {s : Finset α} (h : s.Nonempty), f (s.min' h) = (Finset.image f s).min' ⋯
A version of Finset.min'_image with LHS and RHS reversed.
Also, this version assumes that s is nonempty, not its image.
theorem Finset.coe_min' E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α} (hs : s.Nonempty), ↑(s.min' hs) = s.min
theorem Finset.coe_max' E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α} (hs : s.Nonempty), ↑(s.max' hs) = s.max
theorem Finset.max_mem_image_coe E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α}, s.Nonempty → s.max ∈ Finset.image WithBot.some s
theorem Finset.min_mem_image_coe E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {s : Finset α}, s.Nonempty → s.min ∈ Finset.image WithTop.some s
theorem Finset.max_mem_insert_bot_image_coe E0 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α), s.max ∈ insert ⊥ (Finset.image WithBot.some s)
theorem Finset.min_mem_insert_top_image_coe E0 #
∀ {α : Type u_1} [inst : LinearOrder α] (s : Finset α), s.min ∈ insert ⊤ (Finset.image WithTop.some s)
theorem Finset.max'_erase_ne_self E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {x : α} {s : Finset α} (s0 : (s.erase x).Nonempty), (s.erase x).max' s0 ≠ x
theorem Finset.min'_erase_ne_self E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {x : α} {s : Finset α} (s0 : (s.erase x).Nonempty), (s.erase x).min' s0 ≠ x
theorem Finset.max_erase_ne_self E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {x : α} {s : Finset α}, (s.erase x).max ≠ ↑x
theorem Finset.min_erase_ne_self E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {x : α} {s : Finset α}, (s.erase x).min ≠ ↑x
theorem Finset.exists_next_left E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {x : α} {s : Finset α},
(∃ y ∈ s, y < x) → ∃ y ∈ s, y < x ∧ ∀ z ∈ s, z < x → z ≤ y
theorem Finset.exists_next_right E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {x : α} {s : Finset α},
(∃ y ∈ s, x < y) → ∃ y ∈ s, x < y ∧ ∀ z ∈ s, x < z → y ≤ z
theorem Finset.card_le_of_interleaved E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s t : Finset α},
(∀ x ∈ s, ∀ y ∈ s, x < y → (∀ z ∈ s, z ∉ Set.Ioo x y) → ∃ z ∈ t, x < z ∧ z < y) → s.card ≤ t.card + 1
If finsets s and t are interleaved, then Finset.card s ≤ Finset.card t + 1.
theorem Finset.card_le_sdiff_of_interleaved E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {s t : Finset α},
(∀ x ∈ s, ∀ y ∈ s, x < y → (∀ z ∈ s, z ∉ Set.Ioo x y) → ∃ z ∈ t, x < z ∧ z < y) → s.card ≤ (t \ s).card + 1
If finsets s and t are interleaved, then Finset.card s ≤ Finset.card (t \ s) + 1.
theorem Finset.induction_on_max E2 #
∀ {α : Type u_1} [inst : LinearOrder α] [inst_1 : DecidableEq α] {motive : Finset α → Prop} (s : Finset α),
motive ∅ → (∀ (a : α) (s : Finset α), (∀ x ∈ s, x < a) → motive s → motive (insert a s)) → motive s
Induction principle for Finsets in a linearly ordered type: a predicate is true on all
s : Finset α provided that:
- it is true on the empty
Finset, - for every
s : Finset αand an elementastrictly greater than all elements ofs,p simpliesp (insert a s).
theorem Finset.induction_on_min E2 #
∀ {α : Type u_1} [inst : LinearOrder α] [inst_1 : DecidableEq α] {motive : Finset α → Prop} (s : Finset α),
motive ∅ → (∀ (a : α) (s : Finset α), (∀ x ∈ s, a < x) → motive s → motive (insert a s)) → motive s
Induction principle for Finsets in a linearly ordered type: a predicate is true on all
s : Finset α provided that:
- it is true on the empty
Finset, - for every
s : Finset αand an elementastrictly less than all elements ofs,p simpliesp (insert a s).
theorem Finset.induction_on_max_value E2 #
∀ {α : Type u_1} {ι : Type u_3} [inst : LinearOrder α] [inst_1 : DecidableEq ι] (f : ι → α) {motive : Finset ι → Prop}
(s : Finset ι),
motive ∅ → (∀ (a : ι) (s : Finset ι), a ∉ s → (∀ x ∈ s, f x ≤ f a) → motive s → motive (insert a s)) → motive s
Induction principle for Finsets in any type from which a given function f maps to a linearly
ordered type : a predicate is true on all s : Finset α provided that:
- it is true on the empty
Finset, - for every
s : Finset αand an elementasuch that for elements ofsdenoted byxwe havef x ≤ f a,p simpliesp (insert a s).
theorem Finset.induction_on_min_value E2 #
∀ {α : Type u_1} {ι : Type u_3} [inst : LinearOrder α] [inst_1 : DecidableEq ι] (f : ι → α) {motive : Finset ι → Prop}
(s : Finset ι),
motive ∅ → (∀ (a : ι) (s : Finset ι), a ∉ s → (∀ x ∈ s, f a ≤ f x) → motive s → motive (insert a s)) → motive s
Induction principle for Finsets in any type from which a given function f maps to a linearly
ordered type : a predicate is true on all s : Finset α provided that:
- it is true on the empty
Finset, - for every
s : Finset αand an elementasuch that for elements ofsdenoted byxwe havef a ≤ f x,p simpliesp (insert a s).
theorem Finset.exists_max_image E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : LinearOrder α] (s : Finset β) (f : β → α),
s.Nonempty → ∃ x ∈ s, ∀ x' ∈ s, f x' ≤ f x
theorem Finset.exists_min_image E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : LinearOrder α] (s : Finset β) (f : β → α),
s.Nonempty → ∃ x ∈ s, ∀ x' ∈ s, f x ≤ f x'
theorem Finset.isGLB_iff_isLeast E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (i : α) (s : Finset α), s.Nonempty → (IsGLB (↑s) i ↔ IsLeast (↑s) i)
theorem Finset.isLUB_iff_isGreatest E1 #
∀ {α : Type u_1} [inst : LinearOrder α] (i : α) (s : Finset α), s.Nonempty → (IsLUB (↑s) i ↔ IsGreatest (↑s) i)
theorem Finset.isLUB_mem E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {i : α} (s : Finset α), IsLUB (↑s) i → s.Nonempty → i ∈ s
theorem Finset.isGLB_mem E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {i : α} (s : Finset α), IsGLB (↑s) i → s.Nonempty → i ∈ s
theorem Multiset.exists_max_image E1 #
∀ {α : Type u_4} {R : Type u_5} [inst : LinearOrder R] (f : α → R) {s : Multiset α}, s ≠ 0 → ∃ y ∈ s, ∀ z ∈ s, f z ≤ f y
theorem Multiset.exists_min_image E1 #
∀ {α : Type u_4} {R : Type u_5} [inst : LinearOrder R] (f : α → R) {s : Multiset α}, s ≠ 0 → ∃ y ∈ s, ∀ z ∈ s, f y ≤ f z
Deprecated aliases
| Name | New name | Since |
|---|---|---|
Finset.card_le_diff_of_interleaved | Finset.card_le_sdiff_of_interleaved | 2026-06-03 |