Documentation

CslibFrontier.Computability.Circuit.Boolean.WeightedThreshold.SmallWeights

Small integer weights for threshold functions #

A natural-weight threshold on Boolean inputs has an equivalent strict integer threshold with all weights and its bias bounded by (N + 1)!. This is the small-weight step needed to simulate a majority gate that reads repeated wires.

A full-rank set of tight inequalities determines a separating vertex. Cramer's rule clears its denominator, and the Leibniz determinant bound controls every coefficient. For the classical weight-bound problem see Muroga, §9.3.2. Håstad, §3, Theorem 3.2 treats signed inputs and proves the sharper bound 2^(-N) (N + 1)^((N + 1)/2).

The weight bound (N + 1)! of N-input threshold functions.

theorem Cslib.SmallWeights.exists_small_threshold {N : ℕ} (c : Fin N → ℕ) (t : ℕ) :
∃ (u : Fin N → ℤ) (θ : ℤ), (∀ (i : Fin N), |u i| ≤ ↑(weightBound N)) ∧ |θ| ≤ ↑(weightBound N) ∧ ∀ (x : Fin N → Bool), t ≤ ∑ i : Fin N, c i * (x i).toNat ↔ θ < ∑ i : Fin N, u i * ↑(x i).toNat

Small-weight step for a majority gate with repeated wires. A threshold function with nonnegative integer weights c and threshold t on N inputs is also a strict threshold function with integer weights and threshold of absolute value at most (N + 1)!. The non-strict natural cutoff includes ties, while the signed realization uses a strict cutoff. Håstad’s signed-input Theorem 3.2 [Has94] gives a sharper bound.