Documentation

CslibFrontier.Foundations.Data.BitString.Discriminator

The discriminator lemma for unweighted threshold votes #

Suppose that on every point u of a finite set U, the threshold vote threshold t θ (v u) of t voters v u i equals a target bit F u. In ±1 signs, the votes then correlate with the target in total: ∑ i, ∑ u, signVal (v u i) * signVal (F u) ≥ |U| - (t + 1) |∑ u, signVal (F u)| (Cslib.sub_le_sum_sum_signVal_mul_of_threshold_eq). If the target is nearly balanced, some voter therefore has correlation about |U| / t with it; this is the correlation form of the discriminator lemma of Hajnal et al. for unweighted threshold gates, with any threshold θ, including majority with either tie rule.

The proof is pointwise: with c = 2 θ - 1 - t, the signed margin signVal (F u) * (c + ∑ i, signVal (v u i)) is at least 1 at every point u, and |c| ≤ t + 1 unless the vote is constantly false.

Main results #

References #

theorem Cslib.BitString.sum_signVal_eq_sub_two_mul_weight {t : ℕ} (x : BitString t) :
∑ i : Fin t, signVal (x i) = ↑t - 2 * ↑(weight x)

The sign sum of a bit string is its length minus twice its weight.

theorem Cslib.sub_le_sum_sum_signVal_mul_of_threshold_eq {U : Type u_1} [Fintype U] {t θ : ℕ} (v : U → BitString t) (F : U → Bool) (h : ∀ (u : U), threshold t θ (v u) = F u) :
↑(Fintype.card U) - (↑t + 1) * |∑ u : U, BitString.signVal (F u)| ≤ ∑ i : Fin t, ∑ u : U, BitString.signVal (v u i) * BitString.signVal (F u)

The discriminator lemma for unweighted threshold votes: if the threshold vote threshold t θ (v u) equals F u at every point u of a finite type U, then the votes correlate with F in total by at least |U| - (t + 1) |∑ u, signVal (F u)|. This is a correlation form of the discriminator lemma of Hajnal et al..