Documentation

CslibFrontier.Foundations.Combinatorics.ApproximateMajority

Approximate majorities: averaging and strict-majority votes #

A finite family P i of predicates on a finite type is an approximate majority when, at every point, at least a fraction r of the family holds. Double counting the incidence relation then gives a single member that holds on at least the same fraction r of the points. Applied to P i x := f i x = g x, this turns an approximate majority of functions computing g into one function agreeing with g on a r fraction of inputs; this is the averaging step of [KW16], arXiv:1511.07860v1, Corollary 1.1.

A strict-majority vote of an odd number of bits that outputs bit has strictly more than half of its votes equal to bit. For even fan-in a tie outputs false, so a correct vote need not have a strict majority of correct votes.

Main results #

References #

theorem Cslib.exists_mul_card_le_card_filter_of_forall {R : Type u_1} {ι : Type u_2} {α : Type u_3} [CommSemiring R] [LinearOrder R] [IsStrictOrderedRing R] [Fintype ι] [Nonempty ι] [Fintype α] (P : ι → α → Prop) [(i : ι) → (x : α) → Decidable (P i x)] {r : R} (h : ∀ (x : α), r * ↑(Fintype.card ι) ≤ ↑{i : ι | P i x}.card) :
∃ (i : ι), r * ↑(Fintype.card α) ≤ ↑{x : α | P i x}.card

Averaging over an approximate majority. If at every point x at least a fraction r of a nonempty finite family of predicates P i hold, then some member P i holds on at least a fraction r of the points.

theorem Cslib.lt_two_mul_card_filter_eq_of_strictMajority_eq {t : ℕ} (ht : Odd t) {v : BitString t} {bit : Bool} (h : strictMajority t v = bit) :
t < 2 * {i : Fin t | v i = bit}.card

A strict-majority vote of odd fan-in that outputs bit has strictly more than half of its votes equal to bit.