Documentation

Mathlib.Algebra.BigOperators.Ring.Nat

Big operators on a finset in the natural numbers #

This file contains the results concerning the interaction of finset big operators with natural numbers.

theorem Finset.even_sum_iff_even_card_odd {ฮน : Type u_1} {s : Finset ฮน} (f : ฮน โ†’ โ„•) :
Even (โˆ‘ i โˆˆ s, f i) โ†” Even {x โˆˆ s | Odd (f x)}.card
theorem Finset.odd_sum_iff_odd_card_odd {ฮน : Type u_1} {s : Finset ฮน} (f : ฮน โ†’ โ„•) :
Odd (โˆ‘ i โˆˆ s, f i) โ†” Odd {x โˆˆ s | Odd (f x)}.card
theorem Finset.card_preimage_eq_sum_card_image_eq {ฮน : Type u_1} {M : Type u_2} {f : ฮน โ†’ M} {s : Finset M} (hb : โˆ€ b โˆˆ s, {a : ฮน | f a = b}.Finite) :
Nat.card โ†‘(f โปยน' โ†‘s) = โˆ‘ b โˆˆ s, Nat.card { a : ฮน // f a = b }