The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V03. Sets, finite structures and big operators

Mathlib.Algebra.BigOperators.Balance

10 declarations. Mathlib docs · Source

def Fintype.balance E1 #

{ι : Type u_1} → {G : Type u_4} → [Fintype ι] → [inst : AddCommGroup G] → [Module ℚ≥0 G] → (ι → G) → ι → G

The balancing of a function, namely the function minus its average.

theorem Fintype.balance_apply E0 #

∀ {ι : Type u_1} {G : Type u_4} [inst : Fintype ι] [inst_1 : AddCommGroup G] [inst_2 : Module ℚ≥0 G] (f : ι → G)
  (x : ι), Fintype.balance f x = f x - Finset.univ.expect fun y ↦ f y

theorem Fintype.balance_zero E0 #

∀ {ι : Type u_1} {G : Type u_4} [inst : Fintype ι] [inst_1 : AddCommGroup G] [inst_2 : Module ℚ≥0 G],
  Fintype.balance 0 = 0

theorem Fintype.balance_add E0 #

∀ {ι : Type u_1} {G : Type u_4} [inst : Fintype ι] [inst_1 : AddCommGroup G] [inst_2 : Module ℚ≥0 G] (f g : ι → G),
  Fintype.balance (f + g) = Fintype.balance f + Fintype.balance g

theorem Fintype.balance_sub E0 #

∀ {ι : Type u_1} {G : Type u_4} [inst : Fintype ι] [inst_1 : AddCommGroup G] [inst_2 : Module ℚ≥0 G] (f g : ι → G),
  Fintype.balance (f - g) = Fintype.balance f - Fintype.balance g

theorem Fintype.balance_neg E0 #

∀ {ι : Type u_1} {G : Type u_4} [inst : Fintype ι] [inst_1 : AddCommGroup G] [inst_2 : Module ℚ≥0 G] (f : ι → G),
  Fintype.balance (-f) = -Fintype.balance f

theorem Fintype.sum_balance E0 #

∀ {ι : Type u_1} {G : Type u_4} [inst : Fintype ι] [inst_1 : AddCommGroup G] [inst_2 : Module ℚ≥0 G] (f : ι → G),
  ∑ x, Fintype.balance f x = 0

theorem Fintype.expect_balance E0 #

∀ {ι : Type u_1} {G : Type u_4} [inst : Fintype ι] [inst_1 : AddCommGroup G] [inst_2 : Module ℚ≥0 G] (f : ι → G),
  (Finset.univ.expect fun x ↦ Fintype.balance f x) = 0

theorem Fintype.balance_idem E0 #

∀ {ι : Type u_1} {G : Type u_4} [inst : Fintype ι] [inst_1 : AddCommGroup G] [inst_2 : Module ℚ≥0 G] (f : ι → G),
  Fintype.balance (Fintype.balance f) = Fintype.balance f

theorem Fintype.map_balance E0 #

∀ {ι : Type u_1} {H : Type u_2} {F : Type u_3} {G : Type u_4} [inst : Fintype ι] [inst_1 : AddCommGroup G]
  [inst_2 : Module ℚ≥0 G] [inst_3 : AddCommGroup H] [inst_4 : Module ℚ≥0 H] [inst_5 : FunLike F G H]
  [LinearMapClass F ℚ≥0 G H] (g : F) (f : ι → G) (a : ι), g (Fintype.balance f a) = Fintype.balance (⇑g ∘ f) a