Documentation

Complexitylib.Circuits.Shallow.Defs

Symmetric functions and majority #

Symmetry means that the output depends only on Hamming weight. Majority uses the convention in Lecomte and Ramakrishnan's paper: ties are accepted. This differs from the strict-majority function used for error amplification.

A symmetric Boolean function is constant on each Hamming-weight level.

Equations
Instances For

    Majority with ties accepted, as in the source paper.

    Equations
    Instances For

      Majority depends only on Hamming weight.

      theorem Complexity.Shallow.Symmetric.exists_weight_function {n : ℕ} {f : BitString n → Bool} (hf : Symmetric f) :
      ∃ (a : ℕ → Bool), ∀ (x : Fin n → Bool), a (weight x) = f x

      Every symmetric function factors through Hamming weight.