A deterministic greedy anti-checker against a threshold oracle #
Let G be a finite family of descriptions, each evaluating to a Boolean function on α, and let
f : α → Bool. After labelled samples P, the descriptions still consistent are those that agree
with every sample (Cslib.MCSP.AntiChecker.consistent). A threshold oracle with power ℓ
answers queries (P, u) and separates #consistent ^ ℓ from 2 ^ u up to a factor 2 (u + 1)
(Cslib.MCSP.AntiChecker.IsThresholdOracle): a yes-answer guarantees fewer than 2 ^ (u + 1), at
threshold 0 it guarantees that no description is consistent, and fewer than 2 ^ u / (u + 1)
forces a yes-answer.
The greedy (Cslib.MCSP.AntiChecker.greedy) runs R rounds with thresholds R - 1, …, 0. In
the round with threshold u it appends the first candidate y, labelled f y, on which the
oracle answers yes, or a default candidate if there is none
(Cslib.MCSP.AntiChecker.select). Suppose every nonempty subfamily of G is refuted on a sixteenth
of its members by some candidate, as for circuits of bounded size against a function needing more
gates than their strict majorities (Cslib.MCSP.exists_card_le_sixteen_mul_validCertificates).
If #G ≤ 2 ^ L and 4 (L ℓ + 1) 15 ^ ℓ ≤ 16 ^ ℓ, then after R = L ℓ + 1 rounds no description is
consistent (Cslib.MCSP.AntiChecker.consistent_greedy_eq_empty). Before the round with threshold
u, #consistent ^ ℓ < 2 ^ (u + 2). A refuting candidate leaves at most 15 / 16 of the
consistent descriptions, so the oracle must answer yes on it: the factor (15 / 16) ^ ℓ absorbs the
slack 4 (u + 1), which is why the oracle measures a power of the count. The choice
ℓ = L + 200 meets the condition for every L
(Cslib.MCSP.AntiChecker.four_mul_mul_add_one_mul_fifteen_pow_le_sixteen_pow).
A threshold oracle comes from covering by pairwise independent hashing
(Cslib.Probability.IsPairwiseIndependentHash.exists_covers_of_card). The ℓ-th Cartesian power
of the consistent set is large at threshold u if u + 1 affine hash functions to strings of
u bits are jointly surjective on it (Cslib.MCSP.AntiChecker.IsLarge). The oracle answering
whether the power is not large (Cslib.MCSP.AntiChecker.hashOracle) is a threshold oracle for
every ℓ > 0 (Cslib.MCSP.AntiChecker.isThresholdOracle_hashOracle). With the valid circuit
descriptions this gives an explicit anti-checker of L (L + 200) + 1 inputs, where L is the
certificate length (Cslib.MCSP.AntiChecker.isAntiChecker_hashAntiChecker).
This is the library's deterministic greedy against a counting oracle, not the proof of Oliveira, Pich and Santhanam, Lemma 4.1. Their proof counts with Stockmeyer's randomized approximate counting, fixes the randomness non-uniformly, and lists the few surviving circuits at the end. Here the greedy drives the count to zero, so no listing step is needed, and the oracle is deterministic. Raising the consistent set to a Cartesian power before hashing it with linear hash functions follows the approximate counting in [Chen, Hirahara, Oliveira, Pich, Rajgopal and Santhanam, proof of Lemma 27 and Claim 28] [CHO+20]. There, linear maps that are injective on pieces certify an upper bound on the count. Here, jointly surjective maps certify a lower bound. The efficient generator, which needs circuits for the oracle and for the selection, is not formalized here.
Main definitions #
Cslib.MCSP.AntiChecker.consistent: the descriptions consistent with labelled samples.Cslib.MCSP.AntiChecker.IsThresholdOracle: two-sided threshold oracles for the consistent count.Cslib.MCSP.AntiChecker.greedy: the greedy choice of samples against an oracle.Cslib.MCSP.AntiChecker.IsLarge: covering byu + 1affine hash functions toubits.Cslib.MCSP.AntiChecker.hashOracle: the hash threshold oracle.Cslib.MCSP.AntiChecker.hashAntiChecker: the greedy anti-checker for circuits.
Main results #
Cslib.MCSP.AntiChecker.consistent_greedy_eq_empty: the greedy refutes every description.Cslib.MCSP.AntiChecker.four_mul_mul_add_one_mul_fifteen_pow_le_sixteen_pow: the powerℓ = L + 200suffices.Cslib.MCSP.AntiChecker.isThresholdOracle_hashOracle: hashing gives a threshold oracle.Cslib.MCSP.AntiChecker.isAntiChecker_greedy: against any threshold oracle, the greedy is an anti-checker for circuits.Cslib.MCSP.AntiChecker.isAntiChecker_hashAntiChecker: the greedy anti-checker for circuits.
References #
Consistent descriptions #
Every description is consistent with no samples.
The consistent descriptions lie in G.
More samples leave fewer consistent descriptions.
If no description is consistent with P, every description in G errs on a sample of P.
Threshold oracles #
An oracle answering queries (P, u) is a threshold oracle with power ℓ for the
descriptions G if a yes-answer guarantees #consistent ^ ℓ < 2 ^ (u + 1), a yes-answer at
threshold 0 guarantees that no description is consistent, and
(u + 1) #consistent ^ ℓ < 2 ^ u forces a yes-answer.
- card_pow_lt {P : List (α × Bool)} {u : ℕ} : O P u = true → (consistent G eval P).card ^ ℓ < 2 ^ (u + 1)
A yes-answer bounds the power of the consistent count.
- apply_eq_true_of_lt {P : List (α × Bool)} {u : ℕ} : (u + 1) * (consistent G eval P).card ^ ℓ < 2 ^ u → O P u = true
A small enough power of the consistent count forces a yes-answer.
A yes-answer at threshold
0leaves no consistent description.
The greedy #
The candidate chosen after the samples P in the round with threshold u: the first
candidate y on which the oracle answers yes to (P ++ [(y, f y)], u), or the default if there is
none.
If the oracle answers yes on some candidate, it answers yes on the selected one.
One round. If #consistent ^ ℓ < 2 ^ (u + 2) before the round with threshold u and
4 (u + 1) 15 ^ ℓ ≤ 16 ^ ℓ, then after it no description is consistent or the oracle answered
yes. A candidate refuting a sixteenth of the consistent descriptions leaves
(u + 1) #consistent ^ ℓ < 2 ^ u, so the oracle answers yes on it.
The invariant of the greedy: if #consistent ^ ℓ < 2 ^ (k + 2) before the rounds with
thresholds k, …, 0 and 4 (k + 1) 15 ^ ℓ ≤ 16 ^ ℓ, then after them no description is
consistent.
The greedy refutes every description. If #G ≤ 2 ^ L, every nonempty subfamily of G
is refuted on a sixteenth of its members by some candidate, and 4 (L ℓ + 1) 15 ^ ℓ ≤ 16 ^ ℓ,
then after L ℓ + 1 rounds against a threshold oracle with power ℓ no description is
consistent.
The power #
The hash threshold oracle #
The hash threshold oracle with power ℓ: it answers yes to (P, u) when the ℓ-th
Cartesian power of the descriptions consistent with P is not large at threshold u.
Hashing gives a threshold oracle: for every power ℓ > 0, the hash oracle is a threshold
oracle.
The anti-checker for circuits #
The greedy anti-checker for the circuits on n inputs with at most s gates: the inputs
chosen in L (L + 200) + 1 rounds against the hash threshold oracle with power L + 200 for the
valid descriptions, where L is the certificate length, with the candidates in the order of
Cslib.BitString.enum.
The greedy anti-checker has L (L + 200) + 1 inputs, where L is the certificate length.
The greedy is an anti-checker for circuits against any threshold oracle. If f needs more
gates than n circuits with at most s gates and a circuit for their strict majority, then
against any threshold oracle with power L + 200 for the valid descriptions, where L is the
certificate length, every circuit with at most s gates differs from f on an input chosen in
the L (L + 200) + 1 rounds of the greedy.
The greedy anti-checker for circuits. If f needs more gates than n circuits with at
most s gates and a circuit for their strict majority, then every circuit with at most s gates
differs from f on an input of the greedy anti-checker.