Documentation

CslibFrontier.Foundations.Data.Finset.BigHalf

The larger part of a binary partition #

Select a Boolean fiber retaining at least half the elements of a finite set. This is shared by the index-gadget and low-discrepancy simulations.

def Finset.bigHalf {α : Type u_1} (s : Finset α) (f : α → Bool) :

The larger half of s under the bit f: at least half of s has f a = bigHalf s f.

theorem Finset.card_le_two_mul_card_filter_bigHalf {α : Type u_1} (s : Finset α) (f : α → Bool) :
↑s.card ≤ 2 * ↑{a ∈ s | f a = s.bigHalf f}.card