The areas / V03. Sets, finite structures and big operators
Mathlib.Data.Set.Equitable
12 declarations. Mathlib docs · Source
def Set.EquitableOn E1 #
{α : Type u_1} → {β : Type u_2} → [LE β] → [Add β] → [One β] → Set α → (α → β) → Prop
A set is equitable if no element value is more than one bigger than another.
theorem Set.equitableOn_empty E0 #
∀ {α : Type u_1} {β : Type u_2} [inst : LE β] [inst_1 : Add β] [inst_2 : One β] (f : α → β), ∅.EquitableOn f
theorem Set.equitableOn_iff_exists_le_le_add_one E1 #
∀ {α : Type u_1} {s : Set α} {f : α → ℕ}, s.EquitableOn f ↔ ∃ b, ∀ a ∈ s, b ≤ f a ∧ f a ≤ b + 1
theorem Set.equitableOn_iff_exists_image_subset_icc E1 #
∀ {α : Type u_1} {s : Set α} {f : α → ℕ}, s.EquitableOn f ↔ ∃ b, f '' s ⊆ Set.Icc b (b + 1)
theorem Set.equitableOn_iff_exists_eq_eq_add_one E1 #
∀ {α : Type u_1} {s : Set α} {f : α → ℕ}, s.EquitableOn f ↔ ∃ b, ∀ a ∈ s, f a = b ∨ f a = b + 1
theorem Set.not_equitableOn E0 #
∀ {α : Type u_1} {β : Type u_2} [inst : LinearOrder β] [inst_1 : Add β] [inst_2 : One β] {s : Set α} {f : α → β},
¬s.EquitableOn f ↔ ∃ a ∈ s, ∃ b ∈ s, f b + 1 < f a
theorem Set.Subsingleton.equitableOn E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : Semiring β] [inst_1 : PartialOrder β] [IsOrderedRing β] {s : Set α},
s.Subsingleton → ∀ (f : α → β), s.EquitableOn f
theorem Set.equitableOn_singleton E1 #
∀ {α : Type u_1} {β : Type u_2} [inst : Semiring β] [inst_1 : PartialOrder β] [IsOrderedRing β] (a : α) (f : α → β),
{a}.EquitableOn f
theorem Finset.equitableOn_iff_le_le_add_one E1 #
∀ {α : Type u_1} {s : Finset α} {f : α → ℕ},
(↑s).EquitableOn f ↔ ∀ a ∈ s, (∑ i ∈ s, f i) / s.card ≤ f a ∧ f a ≤ (∑ i ∈ s, f i) / s.card + 1
theorem Finset.EquitableOn.le E1 #
∀ {α : Type u_1} {s : Finset α} {f : α → ℕ} {a : α}, (↑s).EquitableOn f → a ∈ s → (∑ i ∈ s, f i) / s.card ≤ f a
theorem Finset.EquitableOn.le_add_one E1 #
∀ {α : Type u_1} {s : Finset α} {f : α → ℕ} {a : α}, (↑s).EquitableOn f → a ∈ s → f a ≤ (∑ i ∈ s, f i) / s.card + 1
theorem Finset.equitableOn_iff E0 #
∀ {α : Type u_1} {s : Finset α} {f : α → ℕ},
(↑s).EquitableOn f ↔ ∀ a ∈ s, f a = (∑ i ∈ s, f i) / s.card ∨ f a = (∑ i ∈ s, f i) / s.card + 1