File: Mathlib/Algebra/Order/BigOperators/Group/Finset.lean

full_name: Finset.le_sum_nonempty_of_subadditive_on_pred
code: /-- Let `{x | p x}` be a subsemigroup of a commutative monoid `M`. Let `f : M → N` be a map
submultiplicative on `{x | p x}`, i.e., `p x → p y → f (x * y) ≤ f x * f y`. Let `g i`, `i ∈ s`, be
a nonempty finite family of elements of `M` such that `∀ i ∈ s, p (g i)`. Then
`f (∏ x ∈ s, g x) ≤ ∏ x ∈ s, f (g x)`. -/
@[to_additive le_sum_nonempty_of_subadditive_on_pred]
theorem le_prod_nonempty_of_submultiplicative_on_pred (f : M → N) (p : M → Prop)
    (h_mul : ∀ x y, p x → p y → f (x * y) ≤ f x * f y) (hp_mul : ∀ x y, p x → p y → p (x * y))
    (g : ι → M) (s : Finset ι) (hs_nonempty : s.Nonempty) (hs : ∀ i ∈ s, p (g i)) :
    f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i) 
goal: f (∑ i ∈ s, g i) ≤ ∑ i ∈ s, f (g i)

full_name: Finset.le_prod_nonempty_of_submultiplicative_on_pred
code: /-- Let `{x | p x}` be a subsemigroup of a commutative monoid `M`. Let `f : M → N` be a map
submultiplicative on `{x | p x}`, i.e., `p x → p y → f (x * y) ≤ f x * f y`. Let `g i`, `i ∈ s`, be
a nonempty finite family of elements of `M` such that `∀ i ∈ s, p (g i)`. Then
`f (∏ x ∈ s, g x) ≤ ∏ x ∈ s, f (g x)`. -/
@[to_additive le_sum_nonempty_of_subadditive_on_pred]
theorem le_prod_nonempty_of_submultiplicative_on_pred (f : M → N) (p : M → Prop)
    (h_mul : ∀ x y, p x → p y → f (x * y) ≤ f x * f y) (hp_mul : ∀ x y, p x → p y → p (x * y))
    (g : ι → M) (s : Finset ι) (hs_nonempty : s.Nonempty) (hs : ∀ i ∈ s, p (g i)) :
    f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i) 
goal: f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i)

full_name: Finset.le_sum_nonempty_of_subadditive
code: /-- If `f : M → N` is a submultiplicative function, `f (x * y) ≤ f x * f y` and `g i`, `i ∈ s`, is a
nonempty finite family of elements of `M`, then `f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i)`. -/
@[to_additive le_sum_nonempty_of_subadditive]
theorem le_prod_nonempty_of_submultiplicative (f : M → N) (h_mul : ∀ x y, f (x * y) ≤ f x * f y)
    {s : Finset ι} (hs : s.Nonempty) (g : ι → M) : f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i) 
goal: f (∑ i ∈ s, g i) ≤ ∑ i ∈ s, f (g i)

full_name: Finset.le_prod_nonempty_of_submultiplicative
code: /-- If `f : M → N` is a submultiplicative function, `f (x * y) ≤ f x * f y` and `g i`, `i ∈ s`, is a
nonempty finite family of elements of `M`, then `f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i)`. -/
@[to_additive le_sum_nonempty_of_subadditive]
theorem le_prod_nonempty_of_submultiplicative (f : M → N) (h_mul : ∀ x y, f (x * y) ≤ f x * f y)
    {s : Finset ι} (hs : s.Nonempty) (g : ι → M) : f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i) 
goal: f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i)

full_name: Finset.le_sum_of_subadditive_on_pred
code: /-- Let `{x | p x}` be a subsemigroup of a commutative monoid `M`. Let `f : M → N` be a map
such that `f 1 = 1` and `f` is submultiplicative on `{x | p x}`, i.e.,
`p x → p y → f (x * y) ≤ f x * f y`. Let `g i`, `i ∈ s`, be a finite family of elements of `M` such
that `∀ i ∈ s, p (g i)`. Then `f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i)`. -/
@[to_additive le_sum_of_subadditive_on_pred]
theorem le_prod_of_submultiplicative_on_pred (f : M → N) (p : M → Prop) (h_one : f 1 = 1)
    (h_mul : ∀ x y, p x → p y → f (x * y) ≤ f x * f y) (hp_mul : ∀ x y, p x → p y → p (x * y))
    (g : ι → M) {s : Finset ι} (hs : ∀ i ∈ s, p (g i)) : f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i) 
goal: f (∑ i ∈ s, g i) ≤ ∑ i ∈ s, f (g i)

full_name: Finset.le_prod_of_submultiplicative_on_pred
code: /-- Let `{x | p x}` be a subsemigroup of a commutative monoid `M`. Let `f : M → N` be a map
such that `f 1 = 1` and `f` is submultiplicative on `{x | p x}`, i.e.,
`p x → p y → f (x * y) ≤ f x * f y`. Let `g i`, `i ∈ s`, be a finite family of elements of `M` such
that `∀ i ∈ s, p (g i)`. Then `f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i)`. -/
@[to_additive le_sum_of_subadditive_on_pred]
theorem le_prod_of_submultiplicative_on_pred (f : M → N) (p : M → Prop) (h_one : f 1 = 1)
    (h_mul : ∀ x y, p x → p y → f (x * y) ≤ f x * f y) (hp_mul : ∀ x y, p x → p y → p (x * y))
    (g : ι → M) {s : Finset ι} (hs : ∀ i ∈ s, p (g i)) : f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i) 
goal: f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i)

full_name: Finset.le_prod_of_submultiplicative
code: /-- If `f : M → N` is a submultiplicative function, `f (x * y) ≤ f x * f y`, `f 1 = 1`, and `g i`,
`i ∈ s`, is a finite family of elements of `M`, then `f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i)`. -/
@[to_additive le_sum_of_subadditive]
theorem le_prod_of_submultiplicative (f : M → N) (h_one : f 1 = 1)
    (h_mul : ∀ x y, f (x * y) ≤ f x * f y) (s : Finset ι) (g : ι → M) :
    f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i) 
goal: f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i)

full_name: Finset.le_sum_of_subadditive
code: /-- If `f : M → N` is a submultiplicative function, `f (x * y) ≤ f x * f y`, `f 1 = 1`, and `g i`,
`i ∈ s`, is a finite family of elements of `M`, then `f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i)`. -/
@[to_additive le_sum_of_subadditive]
theorem le_prod_of_submultiplicative (f : M → N) (h_one : f 1 = 1)
    (h_mul : ∀ x y, f (x * y) ≤ f x * f y) (s : Finset ι) (g : ι → M) :
    f (∏ i ∈ s, g i) ≤ ∏ i ∈ s, f (g i) 
goal: f (∑ i ∈ s, g i) ≤ ∑ i ∈ s, f (g i)

full_name: Finset.sum_le_sum
code: /-- In an ordered commutative monoid, if each factor `f i` of one finite product is less than or
equal to the corresponding factor `g i` of another finite product, then
`∏ i ∈ s, f i ≤ ∏ i ∈ s, g i`. -/
@[to_additive sum_le_sum]
theorem prod_le_prod' (h : ∀ i ∈ s, f i ≤ g i) : ∏ i ∈ s, f i ≤ ∏ i ∈ s, g i 
goal: ∑ i ∈ s, f i ≤ ∑ i ∈ s, g i

full_name: Finset.prod_le_prod'
code: /-- In an ordered commutative monoid, if each factor `f i` of one finite product is less than or
equal to the corresponding factor `g i` of another finite product, then
`∏ i ∈ s, f i ≤ ∏ i ∈ s, g i`. -/
@[to_additive sum_le_sum]
theorem prod_le_prod' (h : ∀ i ∈ s, f i ≤ g i) : ∏ i ∈ s, f i ≤ ∏ i ∈ s, g i 
goal: ∏ i ∈ s, f i ≤ ∏ i ∈ s, g i

full_name: GCongr.prod_le_prod'
code: /-- In an ordered commutative monoid, if each factor `f i` of one finite product is less than or
equal to the corresponding factor `g i` of another finite product, then `s.prod f ≤ s.prod g`.

This is a variant (beta-reduced) version of the standard lemma `Finset.prod_le_prod'`, convenient
for the `gcongr` tactic. -/
@[to_additive (attr := gcongr) GCongr.sum_le_sum]
theorem _root_.GCongr.prod_le_prod' (h : ∀ i ∈ s, f i ≤ g i) : s.prod f ≤ s.prod g 
goal: s.prod f ≤ s.prod g

full_name: GCongr.sum_le_sum
code: /-- In an ordered commutative monoid, if each factor `f i` of one finite product is less than or
equal to the corresponding factor `g i` of another finite product, then `s.prod f ≤ s.prod g`.

This is a variant (beta-reduced) version of the standard lemma `Finset.prod_le_prod'`, convenient
for the `gcongr` tactic. -/
@[to_additive (attr := gcongr) GCongr.sum_le_sum]
theorem _root_.GCongr.prod_le_prod' (h : ∀ i ∈ s, f i ≤ g i) : s.prod f ≤ s.prod g 
goal: s.sum f ≤ s.sum g

full_name: Finset.one_le_prod'
code: @[to_additive sum_nonneg]
theorem one_le_prod' (h : ∀ i ∈ s, 1 ≤ f i) : 1 ≤ ∏ i ∈ s, f i 
goal: 1 ≤ ∏ i ∈ s, f i

full_name: Finset.sum_nonneg
code: @[to_additive sum_nonneg]
theorem one_le_prod' (h : ∀ i ∈ s, 1 ≤ f i) : 1 ≤ ∏ i ∈ s, f i 
goal: 0 ≤ ∑ i ∈ s, f i

full_name: Finset.one_le_prod''
code: @[to_additive Finset.sum_nonneg']
theorem one_le_prod'' (h : ∀ i : ι, 1 ≤ f i) : 1 ≤ ∏ i ∈ s, f i 
goal: 1 ≤ ∏ i ∈ s, f i

full_name: Finset.sum_nonneg'
code: @[to_additive Finset.sum_nonneg']
theorem one_le_prod'' (h : ∀ i : ι, 1 ≤ f i) : 1 ≤ ∏ i ∈ s, f i 
goal: 0 ≤ ∑ i ∈ s, f i

full_name: Finset.sum_nonpos
code: @[to_additive sum_nonpos]
theorem prod_le_one' (h : ∀ i ∈ s, f i ≤ 1) : ∏ i ∈ s, f i ≤ 1 
goal: ∑ i ∈ s, f i ≤ 0

full_name: Finset.prod_le_one'
code: @[to_additive sum_nonpos]
theorem prod_le_one' (h : ∀ i ∈ s, f i ≤ 1) : ∏ i ∈ s, f i ≤ 1 
goal: ∏ i ∈ s, f i ≤ 1

full_name: Finset.prod_le_prod_of_subset_of_one_le'
code: @[to_additive sum_le_sum_of_subset_of_nonneg]
theorem prod_le_prod_of_subset_of_one_le' (h : s ⊆ t) (hf : ∀ i ∈ t, i ∉ s → 1 ≤ f i) :
    ∏ i ∈ s, f i ≤ ∏ i ∈ t, f i 
goal: ∏ i ∈ s, f i ≤ ∏ i ∈ t, f i

full_name: Finset.sum_le_sum_of_subset_of_nonneg
code: @[to_additive sum_le_sum_of_subset_of_nonneg]
theorem prod_le_prod_of_subset_of_one_le' (h : s ⊆ t) (hf : ∀ i ∈ t, i ∉ s → 1 ≤ f i) :
    ∏ i ∈ s, f i ≤ ∏ i ∈ t, f i 
goal: ∑ i ∈ s, f i ≤ ∑ i ∈ t, f i

full_name: Finset.prod_mono_set_of_one_le'
code: @[to_additive sum_mono_set_of_nonneg]
theorem prod_mono_set_of_one_le' (hf : ∀ x, 1 ≤ f x) : Monotone fun s ↦ ∏ x ∈ s, f x 
goal: Monotone fun s => ∏ x ∈ s, f x

full_name: Finset.sum_mono_set_of_nonneg
code: @[to_additive sum_mono_set_of_nonneg]
theorem prod_mono_set_of_one_le' (hf : ∀ x, 1 ≤ f x) : Monotone fun s ↦ ∏ x ∈ s, f x 
goal: Monotone fun s => ∑ x ∈ s, f x

full_name: Finset.sum_le_univ_sum_of_nonneg
code: @[to_additive sum_le_univ_sum_of_nonneg]
theorem prod_le_univ_prod_of_one_le' [Fintype ι] {s : Finset ι} (w : ∀ x, 1 ≤ f x) :
    ∏ x ∈ s, f x ≤ ∏ x, f x 
goal: ∑ x ∈ s, f x ≤ ∑ x : ι, f x

full_name: Finset.prod_le_univ_prod_of_one_le'
code: @[to_additive sum_le_univ_sum_of_nonneg]
theorem prod_le_univ_prod_of_one_le' [Fintype ι] {s : Finset ι} (w : ∀ x, 1 ≤ f x) :
    ∏ x ∈ s, f x ≤ ∏ x, f x 
goal: ∏ x ∈ s, f x ≤ ∏ x : ι, f x

full_name: Finset.sum_eq_zero_iff_of_nonneg
code: @[to_additive sum_eq_zero_iff_of_nonneg]
theorem prod_eq_one_iff_of_one_le' :
    (∀ i ∈ s, 1 ≤ f i) → ((∏ i ∈ s, f i) = 1 ↔ ∀ i ∈ s, f i = 1) 
goal: (∀ i ∈ s, 0 ≤ f i) → (∑ i ∈ s, f i = 0 ↔ ∀ i ∈ s, f i = 0)

full_name: Finset.prod_eq_one_iff_of_one_le'
code: @[to_additive sum_eq_zero_iff_of_nonneg]
theorem prod_eq_one_iff_of_one_le' :
    (∀ i ∈ s, 1 ≤ f i) → ((∏ i ∈ s, f i) = 1 ↔ ∀ i ∈ s, f i = 1) 
goal: (∀ i ∈ s, 1 ≤ f i) → (∏ i ∈ s, f i = 1 ↔ ∀ i ∈ s, f i = 1)

full_name: Finset.sum_eq_zero_iff_of_nonpos
code: @[to_additive sum_eq_zero_iff_of_nonpos]
theorem prod_eq_one_iff_of_le_one' :
    (∀ i ∈ s, f i ≤ 1) → ((∏ i ∈ s, f i) = 1 ↔ ∀ i ∈ s, f i = 1) 
goal: (∀ i ∈ s, f i ≤ 0) → (∑ i ∈ s, f i = 0 ↔ ∀ i ∈ s, f i = 0)

full_name: Finset.prod_eq_one_iff_of_le_one'
code: @[to_additive sum_eq_zero_iff_of_nonpos]
theorem prod_eq_one_iff_of_le_one' :
    (∀ i ∈ s, f i ≤ 1) → ((∏ i ∈ s, f i) = 1 ↔ ∀ i ∈ s, f i = 1) 
goal: (∀ i ∈ s, f i ≤ 1) → (∏ i ∈ s, f i = 1 ↔ ∀ i ∈ s, f i = 1)

full_name: Finset.single_le_prod'
code: @[to_additive single_le_sum]
theorem single_le_prod' (hf : ∀ i ∈ s, 1 ≤ f i) {a} (h : a ∈ s) : f a ≤ ∏ x ∈ s, f x 
goal: f a ≤ ∏ x ∈ s, f x

full_name: Finset.single_le_sum
code: @[to_additive single_le_sum]
theorem single_le_prod' (hf : ∀ i ∈ s, 1 ≤ f i) {a} (h : a ∈ s) : f a ≤ ∏ x ∈ s, f x 
goal: f a ≤ ∑ x ∈ s, f x

full_name: Finset.add_le_sum
code: @[to_additive]
lemma mul_le_prod {i j : ι} (hf : ∀ i ∈ s, 1 ≤ f i) (hi : i ∈ s) (hj : j ∈ s) (hne : i ≠ j) :
    f i * f j ≤ ∏ k ∈ s, f k 
goal: f i + f j ≤ ∑ k ∈ s, f k

full_name: Finset.mul_le_prod
code: @[to_additive]
lemma mul_le_prod {i j : ι} (hf : ∀ i ∈ s, 1 ≤ f i) (hi : i ∈ s) (hj : j ∈ s) (hne : i ≠ j) :
    f i * f j ≤ ∏ k ∈ s, f k 
goal: f i * f j ≤ ∏ k ∈ s, f k

full_name: Finset.sum_le_card_nsmul
code: @[to_additive sum_le_card_nsmul]
theorem prod_le_pow_card (s : Finset ι) (f : ι → N) (n : N) (h : ∀ x ∈ s, f x ≤ n) :
    s.prod f ≤ n ^ s.card 
goal: s.sum f ≤ s.card • n

full_name: Finset.prod_le_pow_card
code: @[to_additive sum_le_card_nsmul]
theorem prod_le_pow_card (s : Finset ι) (f : ι → N) (n : N) (h : ∀ x ∈ s, f x ≤ n) :
    s.prod f ≤ n ^ s.card 
goal: s.prod f ≤ n ^ s.card

full_name: Finset.pow_card_le_prod
code: @[to_additive card_nsmul_le_sum]
theorem pow_card_le_prod (s : Finset ι) (f : ι → N) (n : N) (h : ∀ x ∈ s, n ≤ f x) :
    n ^ s.card ≤ s.prod f 
goal: n ^ s.card ≤ s.prod f

full_name: Finset.card_nsmul_le_sum
code: @[to_additive card_nsmul_le_sum]
theorem pow_card_le_prod (s : Finset ι) (f : ι → N) (n : N) (h : ∀ x ∈ s, n ≤ f x) :
    n ^ s.card ≤ s.prod f 
goal: s.card • n ≤ s.sum f

full_name: Finset.card_biUnion_le_card_mul
code: theorem card_biUnion_le_card_mul [DecidableEq β] (s : Finset ι) (f : ι → Finset β) (n : ℕ)
    (h : ∀ a ∈ s, (f a).card ≤ n) : (s.biUnion f).card ≤ s.card * n 
goal: (s.biUnion f).card ≤ s.card * n

full_name: Finset.sum_fiberwise_le_sum_of_sum_fiber_nonneg
code: @[to_additive sum_fiberwise_le_sum_of_sum_fiber_nonneg]
theorem prod_fiberwise_le_prod_of_one_le_prod_fiber' {t : Finset ι'} {g : ι → ι'} {f : ι → N}
    (h : ∀ y ∉ t, (1 : N) ≤ ∏ x ∈ s.filter fun x ↦ g x = y, f x) :
    (∏ y ∈ t, ∏ x ∈ s.filter fun x ↦ g x = y, f x) ≤ ∏ x ∈ s, f x 
goal: ∑ y ∈ t, ∑ x ∈ Finset.filter (fun x => g x = y) s, f x ≤ ∑ x ∈ s, f x

full_name: Finset.prod_fiberwise_le_prod_of_one_le_prod_fiber'
code: @[to_additive sum_fiberwise_le_sum_of_sum_fiber_nonneg]
theorem prod_fiberwise_le_prod_of_one_le_prod_fiber' {t : Finset ι'} {g : ι → ι'} {f : ι → N}
    (h : ∀ y ∉ t, (1 : N) ≤ ∏ x ∈ s.filter fun x ↦ g x = y, f x) :
    (∏ y ∈ t, ∏ x ∈ s.filter fun x ↦ g x = y, f x) ≤ ∏ x ∈ s, f x 
goal: ∏ y ∈ t, ∏ x ∈ Finset.filter (fun x => g x = y) s, f x ≤ ∏ x ∈ s, f x

full_name: Finset.sum_le_sum_fiberwise_of_sum_fiber_nonpos
code: @[to_additive sum_le_sum_fiberwise_of_sum_fiber_nonpos]
theorem prod_le_prod_fiberwise_of_prod_fiber_le_one' {t : Finset ι'} {g : ι → ι'} {f : ι → N}
    (h : ∀ y ∉ t, ∏ x ∈ s.filter fun x ↦ g x = y, f x ≤ 1) :
    ∏ x ∈ s, f x ≤ ∏ y ∈ t, ∏ x ∈ s.filter fun x ↦ g x = y, f x 
goal: ∑ x ∈ s, f x ≤ ∑ y ∈ t, ∑ x ∈ Finset.filter (fun x => g x = y) s, f x

full_name: Finset.prod_le_prod_fiberwise_of_prod_fiber_le_one'
code: @[to_additive sum_le_sum_fiberwise_of_sum_fiber_nonpos]
theorem prod_le_prod_fiberwise_of_prod_fiber_le_one' {t : Finset ι'} {g : ι → ι'} {f : ι → N}
    (h : ∀ y ∉ t, ∏ x ∈ s.filter fun x ↦ g x = y, f x ≤ 1) :
    ∏ x ∈ s, f x ≤ ∏ y ∈ t, ∏ x ∈ s.filter fun x ↦ g x = y, f x 
goal: ∏ x ∈ s, f x ≤ ∏ y ∈ t, ∏ x ∈ Finset.filter (fun x => g x = y) s, f x

full_name: Finset.abs_sum_le_sum_abs
code: theorem abs_sum_le_sum_abs {G : Type*} [LinearOrderedAddCommGroup G] (f : ι → G) (s : Finset ι) :
    |∑ i ∈ s, f i| ≤ ∑ i ∈ s, |f i| 
goal: |∑ i ∈ s, f i| ≤ ∑ i ∈ s, |f i|

full_name: Finset.abs_sum_of_nonneg
code: theorem abs_sum_of_nonneg {G : Type*} [LinearOrderedAddCommGroup G] {f : ι → G} {s : Finset ι}
    (hf : ∀ i ∈ s, 0 ≤ f i) : |∑ i ∈ s, f i| = ∑ i ∈ s, f i 
goal: |∑ i ∈ s, f i| = ∑ i ∈ s, f i

full_name: Finset.abs_sum_of_nonneg'
code: theorem abs_sum_of_nonneg' {G : Type*} [LinearOrderedAddCommGroup G] {f : ι → G} {s : Finset ι}
    (hf : ∀ i, 0 ≤ f i) : |∑ i ∈ s, f i| = ∑ i ∈ s, f i 
goal: |∑ i ∈ s, f i| = ∑ i ∈ s, f i

full_name: Finset.card_le_mul_card_image_of_maps_to
code: theorem card_le_mul_card_image_of_maps_to {f : α → β} {s : Finset α} {t : Finset β}
    (Hf : ∀ a ∈ s, f a ∈ t) (n : ℕ) (hn : ∀ a ∈ t, (s.filter fun x ↦ f x = a).card ≤ n) :
    s.card ≤ n * t.card 
goal: s.card ≤ n * t.card

full_name: Finset.card_le_mul_card_image
code: theorem card_le_mul_card_image {f : α → β} (s : Finset α) (n : ℕ)
    (hn : ∀ a ∈ s.image f, (s.filter fun x ↦ f x = a).card ≤ n) : s.card ≤ n * (s.image f).card 
goal: s.card ≤ n * (Finset.image f s).card

full_name: Finset.mul_card_image_le_card_of_maps_to
code: theorem mul_card_image_le_card_of_maps_to {f : α → β} {s : Finset α} {t : Finset β}
    (Hf : ∀ a ∈ s, f a ∈ t) (n : ℕ) (hn : ∀ a ∈ t, n ≤ (s.filter fun x ↦ f x = a).card) :
    n * t.card ≤ s.card 
goal: n * t.card ≤ s.card

full_name: Finset.mul_card_image_le_card
code: theorem mul_card_image_le_card {f : α → β} (s : Finset α) (n : ℕ)
    (hn : ∀ a ∈ s.image f, n ≤ (s.filter fun x ↦ f x = a).card) : n * (s.image f).card ≤ s.card 
goal: n * (Finset.image f s).card ≤ s.card

full_name: Finset.sum_card_inter_le
code: /-- If every element belongs to at most `n` Finsets, then the sum of their sizes is at most `n`
times how many they are. -/
theorem sum_card_inter_le (h : ∀ a ∈ s, (B.filter (a ∈ ·)).card ≤ n) :
    (∑ t ∈ B, (s ∩ t).card) ≤ s.card * n 
goal: ∑ t ∈ B, (s ∩ t).card ≤ s.card * n

full_name: Finset.sum_card_le
code: /-- If every element belongs to at most `n` Finsets, then the sum of their sizes is at most `n`
times how many they are. -/
theorem sum_card_le [Fintype α] (h : ∀ a, (B.filter (a ∈ ·)).card ≤ n) :
    ∑ s ∈ B, s.card ≤ Fintype.card α * n 
goal: ∑ s ∈ B, s.card ≤ Fintype.card α * n

full_name: Finset.le_sum_card_inter
code: /-- If every element belongs to at least `n` Finsets, then the sum of their sizes is at least `n`
times how many they are. -/
theorem le_sum_card_inter (h : ∀ a ∈ s, n ≤ (B.filter (a ∈ ·)).card) :
    s.card * n ≤ ∑ t ∈ B, (s ∩ t).card 
goal: s.card * n ≤ ∑ t ∈ B, (s ∩ t).card

full_name: Finset.le_sum_card
code: /-- If every element belongs to at least `n` Finsets, then the sum of their sizes is at least `n`
times how many they are. -/
theorem le_sum_card [Fintype α] (h : ∀ a, n ≤ (B.filter (a ∈ ·)).card) :
    Fintype.card α * n ≤ ∑ s ∈ B, s.card 
goal: Fintype.card α * n ≤ ∑ s ∈ B, s.card

full_name: Finset.sum_card_inter
code: /-- If every element belongs to exactly `n` Finsets, then the sum of their sizes is `n` times how
many they are. -/
theorem sum_card_inter (h : ∀ a ∈ s, (B.filter (a ∈ ·)).card = n) :
    (∑ t ∈ B, (s ∩ t).card) = s.card * n 
goal: ∑ t ∈ B, (s ∩ t).card = s.card * n

full_name: Finset.sum_card
code: /-- If every element belongs to exactly `n` Finsets, then the sum of their sizes is `n` times how
many they are. -/
theorem sum_card [Fintype α] (h : ∀ a, (B.filter (a ∈ ·)).card = n) :
    ∑ s ∈ B, s.card = Fintype.card α * n 
goal: ∑ s ∈ B, s.card = Fintype.card α * n

full_name: Finset.card_le_card_biUnion
code: theorem card_le_card_biUnion {s : Finset ι} {f : ι → Finset α} (hs : (s : Set ι).PairwiseDisjoint f)
    (hf : ∀ i ∈ s, (f i).Nonempty) : s.card ≤ (s.biUnion f).card 
goal: s.card ≤ (s.biUnion f).card

full_name: Finset.card_le_card_biUnion_add_card_fiber
code: theorem card_le_card_biUnion_add_card_fiber {s : Finset ι} {f : ι → Finset α}
    (hs : (s : Set ι).PairwiseDisjoint f) :
    s.card ≤ (s.biUnion f).card + (s.filter fun i ↦ f i = ∅).card 
goal: s.card ≤ (s.biUnion f).card + (Finset.filter (fun i => f i = ∅) s).card

full_name: Finset.card_le_card_biUnion_add_one
code: theorem card_le_card_biUnion_add_one {s : Finset ι} {f : ι → Finset α} (hf : Injective f)
    (hs : (s : Set ι).PairwiseDisjoint f) : s.card ≤ (s.biUnion f).card + 1 
goal: s.card ≤ (s.biUnion f).card + 1

full_name: CanonicallyOrderedCommMonoid.single_le_prod
code: /-- In a canonically-ordered monoid, a product bounds each of its terms.

See also `Finset.single_le_prod'`. -/
@[to_additive "In a canonically-ordered additive monoid, a sum bounds each of its terms.

See also `Finset.single_le_sum`."]
lemma _root_.CanonicallyOrderedCommMonoid.single_le_prod {i : ι} (hi : i ∈ s) :
    f i ≤ ∏ j ∈ s, f j 
goal: f i ≤ ∏ j ∈ s, f j

full_name: CanonicallyOrderedAddCommMonoid.single_le_sum
code: /-- In a canonically-ordered monoid, a product bounds each of its terms.

See also `Finset.single_le_prod'`. -/
@[to_additive "In a canonically-ordered additive monoid, a sum bounds each of its terms.

See also `Finset.single_le_sum`."]
lemma _root_.CanonicallyOrderedCommMonoid.single_le_prod {i : ι} (hi : i ∈ s) :
    f i ≤ ∏ j ∈ s, f j 
goal: f i ≤ ∑ j ∈ s, f j

full_name: Finset.sum_eq_zero_iff
code: @[to_additive (attr := simp) sum_eq_zero_iff]
theorem prod_eq_one_iff' : ∏ x ∈ s, f x = 1 ↔ ∀ x ∈ s, f x = 1 
goal: ∑ x ∈ s, f x = 0 ↔ ∀ x ∈ s, f x = 0

full_name: Finset.prod_eq_one_iff'
code: @[to_additive (attr := simp) sum_eq_zero_iff]
theorem prod_eq_one_iff' : ∏ x ∈ s, f x = 1 ↔ ∀ x ∈ s, f x = 1 
goal: ∏ x ∈ s, f x = 1 ↔ ∀ x ∈ s, f x = 1

full_name: Finset.prod_le_prod_of_subset'
code: @[to_additive sum_le_sum_of_subset]
theorem prod_le_prod_of_subset' (h : s ⊆ t) : ∏ x ∈ s, f x ≤ ∏ x ∈ t, f x 
goal: ∏ x ∈ s, f x ≤ ∏ x ∈ t, f x

full_name: Finset.sum_le_sum_of_subset
code: @[to_additive sum_le_sum_of_subset]
theorem prod_le_prod_of_subset' (h : s ⊆ t) : ∏ x ∈ s, f x ≤ ∏ x ∈ t, f x 
goal: ∑ x ∈ s, f x ≤ ∑ x ∈ t, f x

full_name: Finset.prod_mono_set'
code: @[to_additive sum_mono_set]
theorem prod_mono_set' (f : ι → M) : Monotone fun s ↦ ∏ x ∈ s, f x 
goal: Monotone fun s => ∏ x ∈ s, f x

full_name: Finset.sum_mono_set
code: @[to_additive sum_mono_set]
theorem prod_mono_set' (f : ι → M) : Monotone fun s ↦ ∏ x ∈ s, f x 
goal: Monotone fun s => ∑ x ∈ s, f x

full_name: Finset.prod_le_prod_of_ne_one'
code: @[to_additive sum_le_sum_of_ne_zero]
theorem prod_le_prod_of_ne_one' (h : ∀ x ∈ s, f x ≠ 1 → x ∈ t) :
    ∏ x ∈ s, f x ≤ ∏ x ∈ t, f x 
goal: ∏ x ∈ s, f x ≤ ∏ x ∈ t, f x

full_name: Finset.sum_le_sum_of_ne_zero
code: @[to_additive sum_le_sum_of_ne_zero]
theorem prod_le_prod_of_ne_one' (h : ∀ x ∈ s, f x ≠ 1 → x ∈ t) :
    ∏ x ∈ s, f x ≤ ∏ x ∈ t, f x 
goal: ∑ x ∈ s, f x ≤ ∑ x ∈ t, f x

full_name: Finset.sum_lt_sum
code: @[to_additive sum_lt_sum]
theorem prod_lt_prod' (hle : ∀ i ∈ s, f i ≤ g i) (hlt : ∃ i ∈ s, f i < g i) :
    ∏ i ∈ s, f i < ∏ i ∈ s, g i 
goal: ∑ i ∈ s, f i < ∑ i ∈ s, g i

full_name: Finset.prod_lt_prod'
code: @[to_additive sum_lt_sum]
theorem prod_lt_prod' (hle : ∀ i ∈ s, f i ≤ g i) (hlt : ∃ i ∈ s, f i < g i) :
    ∏ i ∈ s, f i < ∏ i ∈ s, g i 
goal: ∏ i ∈ s, f i < ∏ i ∈ s, g i

full_name: Finset.prod_lt_prod_of_nonempty'
code: @[to_additive sum_lt_sum_of_nonempty]
theorem prod_lt_prod_of_nonempty' (hs : s.Nonempty) (hlt : ∀ i ∈ s, f i < g i) :
    ∏ i ∈ s, f i < ∏ i ∈ s, g i 
goal: ∏ i ∈ s, f i < ∏ i ∈ s, g i

full_name: Finset.sum_lt_sum_of_nonempty
code: @[to_additive sum_lt_sum_of_nonempty]
theorem prod_lt_prod_of_nonempty' (hs : s.Nonempty) (hlt : ∀ i ∈ s, f i < g i) :
    ∏ i ∈ s, f i < ∏ i ∈ s, g i 
goal: ∑ i ∈ s, f i < ∑ i ∈ s, g i

full_name: GCongr.sum_lt_sum_of_nonempty
code: /-- In an ordered commutative monoid, if each factor `f i` of one nontrivial finite product is
strictly less than the corresponding factor `g i` of another nontrivial finite product, then
`s.prod f < s.prod g`.

This is a variant (beta-reduced) version of the standard lemma `Finset.prod_lt_prod_of_nonempty'`,
convenient for the `gcongr` tactic. -/
@[to_additive (attr := gcongr) GCongr.sum_lt_sum_of_nonempty]
theorem _root_.GCongr.prod_lt_prod_of_nonempty' (hs : s.Nonempty) (Hlt : ∀ i ∈ s, f i < g i) :
    s.prod f < s.prod g 
goal: s.sum f < s.sum g

full_name: GCongr.prod_lt_prod_of_nonempty'
code: /-- In an ordered commutative monoid, if each factor `f i` of one nontrivial finite product is
strictly less than the corresponding factor `g i` of another nontrivial finite product, then
`s.prod f < s.prod g`.

This is a variant (beta-reduced) version of the standard lemma `Finset.prod_lt_prod_of_nonempty'`,
convenient for the `gcongr` tactic. -/
@[to_additive (attr := gcongr) GCongr.sum_lt_sum_of_nonempty]
theorem _root_.GCongr.prod_lt_prod_of_nonempty' (hs : s.Nonempty) (Hlt : ∀ i ∈ s, f i < g i) :
    s.prod f < s.prod g 
goal: s.prod f < s.prod g

full_name: Finset.prod_lt_prod_of_subset'
code: @[to_additive sum_lt_sum_of_subset]
theorem prod_lt_prod_of_subset' (h : s ⊆ t) {i : ι} (ht : i ∈ t) (hs : i ∉ s) (hlt : 1 < f i)
    (hle : ∀ j ∈ t, j ∉ s → 1 ≤ f j) : ∏ j ∈ s, f j < ∏ j ∈ t, f j 
goal: ∏ j ∈ s, f j < ∏ j ∈ t, f j

full_name: Finset.sum_lt_sum_of_subset
code: @[to_additive sum_lt_sum_of_subset]
theorem prod_lt_prod_of_subset' (h : s ⊆ t) {i : ι} (ht : i ∈ t) (hs : i ∉ s) (hlt : 1 < f i)
    (hle : ∀ j ∈ t, j ∉ s → 1 ≤ f j) : ∏ j ∈ s, f j < ∏ j ∈ t, f j 
goal: ∑ j ∈ s, f j < ∑ j ∈ t, f j

full_name: Finset.single_lt_sum
code: @[to_additive single_lt_sum]
theorem single_lt_prod' {i j : ι} (hij : j ≠ i) (hi : i ∈ s) (hj : j ∈ s) (hlt : 1 < f j)
    (hle : ∀ k ∈ s, k ≠ i → 1 ≤ f k) : f i < ∏ k ∈ s, f k 
goal: f i < ∑ k ∈ s, f k

full_name: Finset.single_lt_prod'
code: @[to_additive single_lt_sum]
theorem single_lt_prod' {i j : ι} (hij : j ≠ i) (hi : i ∈ s) (hj : j ∈ s) (hlt : 1 < f j)
    (hle : ∀ k ∈ s, k ≠ i → 1 ≤ f k) : f i < ∏ k ∈ s, f k 
goal: f i < ∏ k ∈ s, f k

full_name: Finset.one_lt_prod
code: @[to_additive sum_pos]
theorem one_lt_prod (h : ∀ i ∈ s, 1 < f i) (hs : s.Nonempty) : 1 < ∏ i ∈ s, f i 
goal: 1 < ∏ i ∈ s, f i

full_name: Finset.sum_pos
code: @[to_additive sum_pos]
theorem one_lt_prod (h : ∀ i ∈ s, 1 < f i) (hs : s.Nonempty) : 1 < ∏ i ∈ s, f i 
goal: 0 < ∑ i ∈ s, f i

full_name: Finset.sum_neg
code: @[to_additive]
theorem prod_lt_one (h : ∀ i ∈ s, f i < 1) (hs : s.Nonempty) : ∏ i ∈ s, f i < 1 
goal: ∑ i ∈ s, f i < 0

full_name: Finset.prod_lt_one
code: @[to_additive]
theorem prod_lt_one (h : ∀ i ∈ s, f i < 1) (hs : s.Nonempty) : ∏ i ∈ s, f i < 1 
goal: ∏ i ∈ s, f i < 1

full_name: Finset.sum_pos'
code: @[to_additive sum_pos']
theorem one_lt_prod' (h : ∀ i ∈ s, 1 ≤ f i) (hs : ∃ i ∈ s, 1 < f i) : 1 < ∏ i ∈ s, f i 
goal: 0 < ∑ i ∈ s, f i

full_name: Finset.one_lt_prod'
code: @[to_additive sum_pos']
theorem one_lt_prod' (h : ∀ i ∈ s, 1 ≤ f i) (hs : ∃ i ∈ s, 1 < f i) : 1 < ∏ i ∈ s, f i 
goal: 1 < ∏ i ∈ s, f i

full_name: Finset.prod_lt_one'
code: @[to_additive]
theorem prod_lt_one' (h : ∀ i ∈ s, f i ≤ 1) (hs : ∃ i ∈ s, f i < 1) : ∏ i ∈ s, f i < 1 
goal: ∏ i ∈ s, f i < 1

full_name: Finset.sum_neg'
code: @[to_additive]
theorem prod_lt_one' (h : ∀ i ∈ s, f i ≤ 1) (hs : ∃ i ∈ s, f i < 1) : ∏ i ∈ s, f i < 1 
goal: ∑ i ∈ s, f i < 0

full_name: Finset.sum_eq_sum_iff_of_le
code: @[to_additive]
theorem prod_eq_prod_iff_of_le {f g : ι → M} (h : ∀ i ∈ s, f i ≤ g i) :
    ((∏ i ∈ s, f i) = ∏ i ∈ s, g i) ↔ ∀ i ∈ s, f i = g i 
goal: ∑ i ∈ s, f i = ∑ i ∈ s, g i ↔ ∀ i ∈ s, f i = g i

full_name: Finset.prod_eq_prod_iff_of_le
code: @[to_additive]
theorem prod_eq_prod_iff_of_le {f g : ι → M} (h : ∀ i ∈ s, f i ≤ g i) :
    ((∏ i ∈ s, f i) = ∏ i ∈ s, g i) ↔ ∀ i ∈ s, f i = g i 
goal: ∏ i ∈ s, f i = ∏ i ∈ s, g i ↔ ∀ i ∈ s, f i = g i

full_name: Finset.sum_sdiff_le_sum_sdiff
code: @[to_additive] lemma prod_sdiff_le_prod_sdiff :
    ∏ i ∈ s \ t, f i ≤ ∏ i ∈ t \ s, f i ↔ ∏ i ∈ s, f i ≤ ∏ i ∈ t, f i 
goal: ∑ i ∈ s \ t, f i ≤ ∑ i ∈ t \ s, f i ↔ ∑ i ∈ s, f i ≤ ∑ i ∈ t, f i

full_name: Finset.prod_sdiff_le_prod_sdiff
code: @[to_additive] lemma prod_sdiff_le_prod_sdiff :
    ∏ i ∈ s \ t, f i ≤ ∏ i ∈ t \ s, f i ↔ ∏ i ∈ s, f i ≤ ∏ i ∈ t, f i 
goal: ∏ i ∈ s \ t, f i ≤ ∏ i ∈ t \ s, f i ↔ ∏ i ∈ s, f i ≤ ∏ i ∈ t, f i

full_name: Finset.prod_sdiff_lt_prod_sdiff
code: @[to_additive] lemma prod_sdiff_lt_prod_sdiff :
    ∏ i ∈ s \ t, f i < ∏ i ∈ t \ s, f i ↔ ∏ i ∈ s, f i < ∏ i ∈ t, f i 
goal: ∏ i ∈ s \ t, f i < ∏ i ∈ t \ s, f i ↔ ∏ i ∈ s, f i < ∏ i ∈ t, f i

full_name: Finset.sum_sdiff_lt_sum_sdiff
code: @[to_additive] lemma prod_sdiff_lt_prod_sdiff :
    ∏ i ∈ s \ t, f i < ∏ i ∈ t \ s, f i ↔ ∏ i ∈ s, f i < ∏ i ∈ t, f i 
goal: ∑ i ∈ s \ t, f i < ∑ i ∈ t \ s, f i ↔ ∑ i ∈ s, f i < ∑ i ∈ t, f i

full_name: Finset.exists_lt_of_sum_lt
code: @[to_additive exists_lt_of_sum_lt]
theorem exists_lt_of_prod_lt' (Hlt : ∏ i ∈ s, f i < ∏ i ∈ s, g i) : ∃ i ∈ s, f i < g i 
goal: ∃ i ∈ s, f i < g i

full_name: Finset.exists_lt_of_prod_lt'
code: @[to_additive exists_lt_of_sum_lt]
theorem exists_lt_of_prod_lt' (Hlt : ∏ i ∈ s, f i < ∏ i ∈ s, g i) : ∃ i ∈ s, f i < g i 
goal: ∃ i ∈ s, f i < g i

full_name: Finset.exists_le_of_sum_le
code: @[to_additive exists_le_of_sum_le]
theorem exists_le_of_prod_le' (hs : s.Nonempty) (Hle : ∏ i ∈ s, f i ≤ ∏ i ∈ s, g i) :
    ∃ i ∈ s, f i ≤ g i 
goal: ∃ i ∈ s, f i ≤ g i

full_name: Finset.exists_le_of_prod_le'
code: @[to_additive exists_le_of_sum_le]
theorem exists_le_of_prod_le' (hs : s.Nonempty) (Hle : ∏ i ∈ s, f i ≤ ∏ i ∈ s, g i) :
    ∃ i ∈ s, f i ≤ g i 
goal: ∃ i ∈ s, f i ≤ g i

full_name: Finset.exists_one_lt_of_prod_one_of_exists_ne_one'
code: @[to_additive exists_pos_of_sum_zero_of_exists_nonzero]
theorem exists_one_lt_of_prod_one_of_exists_ne_one' (f : ι → M) (h₁ : ∏ i ∈ s, f i = 1)
    (h₂ : ∃ i ∈ s, f i ≠ 1) : ∃ i ∈ s, 1 < f i 
goal: ∃ i ∈ s, 1 < f i

full_name: Finset.exists_pos_of_sum_zero_of_exists_nonzero
code: @[to_additive exists_pos_of_sum_zero_of_exists_nonzero]
theorem exists_one_lt_of_prod_one_of_exists_ne_one' (f : ι → M) (h₁ : ∏ i ∈ s, f i = 1)
    (h₂ : ∃ i ∈ s, f i ≠ 1) : ∃ i ∈ s, 1 < f i 
goal: ∃ i ∈ s, 0 < f i

full_name: Fintype.sum_mono
code: @[to_additive (attr := mono) sum_mono]
theorem prod_mono' : Monotone fun f : ι → M ↦ ∏ i, f i 
goal: Monotone fun f => ∑ i : ι, f i

full_name: Fintype.prod_mono'
code: @[to_additive (attr := mono) sum_mono]
theorem prod_mono' : Monotone fun f : ι → M ↦ ∏ i, f i 
goal: Monotone fun f => ∏ i : ι, f i

full_name: Fintype.one_le_prod
code: @[to_additive sum_nonneg]
lemma one_le_prod (hf : 1 ≤ f) : 1 ≤ ∏ i, f i 
goal: 1 ≤ ∏ i : ι, f i

full_name: Fintype.sum_nonneg
code: @[to_additive sum_nonneg]
lemma one_le_prod (hf : 1 ≤ f) : 1 ≤ ∏ i, f i 
goal: 0 ≤ ∑ i : ι, f i

full_name: Fintype.sum_nonpos
code: @[to_additive] lemma prod_le_one (hf : f ≤ 1) : ∏ i, f i ≤ 1 
goal: ∑ i : ι, f i ≤ 0

full_name: Fintype.prod_le_one
code: @[to_additive] lemma prod_le_one (hf : f ≤ 1) : ∏ i, f i ≤ 1 
goal: ∏ i : ι, f i ≤ 1

full_name: Fintype.sum_eq_zero_iff_of_nonneg
code: @[to_additive]
lemma prod_eq_one_iff_of_one_le (hf : 1 ≤ f) : ∏ i, f i = 1 ↔ f = 1 
goal: ∑ i : ι, f i = 0 ↔ f = 0

full_name: Fintype.prod_eq_one_iff_of_one_le
code: @[to_additive]
lemma prod_eq_one_iff_of_one_le (hf : 1 ≤ f) : ∏ i, f i = 1 ↔ f = 1 
goal: ∏ i : ι, f i = 1 ↔ f = 1

full_name: Fintype.prod_eq_one_iff_of_le_one
code: @[to_additive]
lemma prod_eq_one_iff_of_le_one (hf : f ≤ 1) : ∏ i, f i = 1 ↔ f = 1 
goal: ∏ i : ι, f i = 1 ↔ f = 1

full_name: Fintype.sum_eq_zero_iff_of_nonpos
code: @[to_additive]
lemma prod_eq_one_iff_of_le_one (hf : f ≤ 1) : ∏ i, f i = 1 ↔ f = 1 
goal: ∑ i : ι, f i = 0 ↔ f = 0

full_name: Fintype.prod_strictMono'
code: @[to_additive sum_strictMono]
theorem prod_strictMono' : StrictMono fun f : ι → M ↦ ∏ x, f x 
goal: StrictMono fun f => ∏ x : ι, f x

full_name: Fintype.sum_strictMono
code: @[to_additive sum_strictMono]
theorem prod_strictMono' : StrictMono fun f : ι → M ↦ ∏ x, f x 
goal: StrictMono fun f => ∑ x : ι, f x

full_name: Fintype.sum_pos
code: @[to_additive sum_pos]
lemma one_lt_prod (hf : 1 < f) : 1 < ∏ i, f i 
goal: 0 < ∑ i : ι, f i

full_name: Fintype.one_lt_prod
code: @[to_additive sum_pos]
lemma one_lt_prod (hf : 1 < f) : 1 < ∏ i, f i 
goal: 1 < ∏ i : ι, f i

full_name: Fintype.prod_lt_one
code: @[to_additive]
lemma prod_lt_one (hf : f < 1) : ∏ i, f i < 1 
goal: ∏ i : ι, f i < 1

full_name: Fintype.sum_neg
code: @[to_additive]
lemma prod_lt_one (hf : f < 1) : ∏ i, f i < 1 
goal: ∑ i : ι, f i < 0

full_name: Fintype.one_lt_prod_iff_of_one_le
code: @[to_additive sum_pos_iff_of_nonneg]
lemma one_lt_prod_iff_of_one_le (hf : 1 ≤ f) : 1 < ∏ i, f i ↔ 1 < f 
goal: 1 < ∏ i : ι, f i ↔ 1 < f

full_name: Fintype.sum_pos_iff_of_nonneg
code: @[to_additive sum_pos_iff_of_nonneg]
lemma one_lt_prod_iff_of_one_le (hf : 1 ≤ f) : 1 < ∏ i, f i ↔ 1 < f 
goal: 0 < ∑ i : ι, f i ↔ 0 < f

full_name: Fintype.prod_lt_one_iff_of_le_one
code: @[to_additive]
lemma prod_lt_one_iff_of_le_one (hf : f ≤ 1) : ∏ i, f i < 1 ↔ f < 1 
goal: ∏ i : ι, f i < 1 ↔ f < 1

full_name: Fintype.sum_neg_iff_of_nonpos
code: @[to_additive]
lemma prod_lt_one_iff_of_le_one (hf : f ≤ 1) : ∏ i, f i < 1 ↔ f < 1 
goal: ∑ i : ι, f i < 0 ↔ f < 0

full_name: Multiset.finset_sum_eq_sup_iff_disjoint
code: theorem finset_sum_eq_sup_iff_disjoint [DecidableEq α] {β : Type*} {i : Finset β}
    {f : β → Multiset α} :
    i.sum f = i.sup f ↔
      ∀ᵉ (x ∈ i) (y ∈ i), x ≠ y → Multiset.Disjoint (f x) (f y) 
goal: i.sum f = i.sup f ↔ ∀ x ∈ i, ∀ y ∈ i, x ≠ y → (f x).Disjoint (f y)

full_name: Multiset.sup_powerset_len
code: theorem sup_powerset_len {α : Type*} [DecidableEq α] (x : Multiset α) :
    (Finset.sup (Finset.range (card x + 1)) fun k => x.powersetCard k) = x.powerset 
goal: ((Finset.range (Multiset.card x + 1)).sup fun k => Multiset.powersetCard k x) = x.powerset

full_name: Mathlib.Meta.Positivity.evalFinsetSum
code: /-- The `positivity` extension which proves that `∑ i ∈ s, f i` is nonnegative if `f` is, and
positive if each `f i` is and `s` is nonempty.

TODO: The following example does not work
```
example (s : Finset ℕ) (f : ℕ → ℤ) (hf : ∀ n, 0 ≤ f n) : 0 ≤ s.sum f := by positivity
```
because `compareHyp` can't look for assumptions behind binders.
-/
@[positivity Finset.sum _ _]
def evalFinsetSum : PositivityExt 
goal: Mathlib.Meta.Positivity.PositivityExt