Documentation

FormalConjecturesForMathlib.Probability.FiniteMethod

The finite probabilistic method (averaging / pigeonhole primitive) #

This file provides the core averaging lemma underlying the elementary form of Erdős's probabilistic method:

If the sum of a -valued function f over a finite set s is strictly less than the cardinality of s, then f vanishes somewhere on s.

Interpreting f a as "the number of bad configurations caused by choice a", and sampling a uniformly from s, the expected number of bad configurations is (∑ f) / |s| < 1, so there must exist at least one a ∈ s with f a = 0.

This is used by:

Both the -form and a convenience -form are provided; the latter is useful when the expectation bound is derived via rpow/log manipulations on the reals and only later cast back to counting.

References #

theorem FormalConjecturesForMathlib.Probability.Finset.exists_eq_zero_of_sum_lt_card {α : Type u_1} {s : Finset α} {f : α} (h : xs, f x < s.card) :
as, f a = 0

Finite probabilistic method (integer form).

If ∑ x ∈ s, f x < s.card, then there exists a ∈ s with f a = 0.

Proof idea. Contrapositive: if every value is at least 1, the sum is at least s.card · 1 = s.card, contradicting the hypothesis.

theorem FormalConjecturesForMathlib.Probability.Finset.exists_eq_zero_of_real_sum_lt_card {α : Type u_1} {s : Finset α} {f : α} (h : xs, (f x) < s.card) :
as, f a = 0

Finite probabilistic method (real form).

If (∑ x ∈ s, (f x : ℝ)) < s.card, then there exists a ∈ s with f a = 0.

This is the same statement as Finset.exists_eq_zero_of_sum_lt_card after casting the counting inequality to ; it is the convenient entry point when f arises as an expectation whose bound was computed in the reals (e.g. via Real.rpow / Real.log).