Documentation

LeanPool.Sensitivity.Parity

Parity Function and the Imbalance Lemma #

The parity function (-1)^{|x|} and its interaction with the Möbius expansion of a Boolean function. The main quantitative output is a parity imbalance lemma: a Boolean function whose top Möbius coefficient is nonzero must have a "majority" parity-sign class strictly larger than 2^{n-1}.

Main results #

def LeanPoolSensitivity.parity {n : } (x : Fin nBool) :

The parity sign of an input: (-1)^{number of true coordinates}.

Equations
Instances For
    def LeanPoolSensitivity.BoolFun.pmOne {n : } (f : BoolFun n) (x : Fin nBool) :

    The ±1-valued encoding of a Boolean function: true ↦ 1, false ↦ -1.

    Equations
    Instances For

      The parity-signed function g(x) = f_pm(x) · parity(x).

      Equations
      Instances For
        theorem LeanPoolSensitivity.BoolFun.pmOne_ne_zero {n : } (f : BoolFun n) (x : Fin nBool) :
        f.pmOne x 0

        The ±1 encoding is never zero.

        theorem LeanPoolSensitivity.parity_ne_zero {n : } (x : Fin nBool) :

        The parity sign is never zero.

        theorem LeanPoolSensitivity.parity_flipBit {n : } (x : Fin nBool) (i : Fin n) :

        Flipping any single bit negates the parity.

        If the parity-signed value of f is unchanged by a bit flip, then f is sensitive at that input in that direction.

        theorem LeanPoolSensitivity.moebius_parity_sum {n : } (f : BoolFun n) (hn : 0 < n) :
        x : Fin nBool, f.paritySigned x = 2 * (-1) ^ n * f.moebius Finset.univ

        Key identity: the parity-weighted sum recovers the top Möbius coefficient, ∑_x f_pm(x) · parity(x) = 2 · (-1)^n · c_univ(f).

        theorem LeanPoolSensitivity.fullDegree_paritySigned_sum_ne_zero {n : } (f : BoolFun n) (hn : 0 < n) (h : f.moebius Finset.univ 0) :
        x : Fin nBool, f.paritySigned x 0

        If f has full multilinear degree (c_univ(f) ≠ 0), then the parity-weighted sum is nonzero.

        theorem LeanPoolSensitivity.fullDegree_imbalance {n : } (f : BoolFun n) (hn : 0 < n) (h : f.moebius Finset.univ 0) :
        ∃ (c : ), (c = 1 c = -1) 2 ^ (n - 1) < {x : Fin nBool | f.paritySigned x = c}.card

        Parity imbalance. If f has full multilinear degree, then one of the two parity-sign classes contains more than 2^{n-1} inputs.