Documentation

CslibFrontier.Computability.Circuit.Boolean.NaturalProof

Natural proofs #

A property of Boolean functions is a set C n of functions on n inputs for each n. Razborov and Rudich call it natural when it contains a property D that is large, holding for at least a 2 ^ (-O(n)) fraction of all functions on n inputs, and constructive, decided from the truth table of length 2 ^ n within some class Γ of languages, for instance by circuits of size polynomial in 2 ^ n (Γ = P/poly) [RR97]. It is useful against a class Λ of languages when the slices of every language in Λ eventually lie outside it. A lower-bound proof against Λ exhibits a property useful against Λ, and Razborov and Rudich observe that the properties used by the known proofs are natural.

The truth-table test in the natural proofs barrier. If a property holds for no member of a keyed family, its test rejects every member’s truth table and accepts a uniformly random truth table with probability equal to the density of the property (advantage_truthTableGenerator_truthTableTest). A property decided by circuits with t gates and useful against circuits with s gates therefore distinguishes every keyed family of functions with s gates from uniformly random functions, by a circuit with t gates and with advantage its density (not_secure_truthTableGenerator). Asymptotically, no P/poly-natural property is useful against P/poly if some keyed family with members of polynomial circuit size is exponentially secure, pseudorandom against circuits of size 2 ^ (c n) with error 2 ^ (-c n) for every c (Cslib.Crypto.PRG.IsExponentiallySecure, not_isUseful_PPoly_of_isNatural).

The proof of [RazborovRudich1997, Theorem 4.1, pp. 30–31] constructs the keyed family from a pseudorandom generator secure against circuits of size 2 ^ (k ^ ε) on seeds of length k. It uses the construction of Goldreich, Goldwasser and Micali [GGM86] with keys of length polynomial in n. That derivation, with its circuit-size analysis, is Cslib.Crypto.GGM.isExponentiallySecure_booleanFamily, and the barrier from such a generator is Cslib.Circuits.Boolean.not_isUseful_PPoly_of_isNatural_of_generator (CslibFrontier.Computability.Circuit.Boolean.NaturalProof.Generator).

Security is cslib's concrete security of generators (Cslib.Crypto.PRG.Generator.Secure), for the generator mapping a key to the truth table of its function (Cslib.Crypto.PRG.truthTableGenerator), against the deterministic tests computed by De Morgan circuits with at most t gates (Cslib.Crypto.PRG.IsCircuitTest). These tests read the whole truth table, that is they query the function at every input, as the distinguisher of Razborov and Rudich does. Circuit sizes count every AND, OR, NOT and constant gate.

The functions on n inputs that need more than 2 ^ n / (5 n) gates form a property that is large, by counting circuits, and useful against P/poly (isLarge_setOf_lt_complexity, isUseful_PPoly_setOf_lt_complexity). Under the same hypothesis it is therefore not P/poly-natural (not_isNatural_PPoly_setOf_lt_complexity), and not P/poly-constructive: its truth tables, the no-instances of GapMCSP at threshold 2 ^ n / (5 n), do not form a language in P/poly (truthTableLanguage_setOf_lt_complexity_notMem_PPoly) [KC00].

Main definitions #

Main results #

References #

Properties of Boolean functions #

The test that accepts the truth tables of the functions in C. Its circuit complexity is the size of the smallest circuits deciding C from truth tables.

@[simp]

truthTableTest C accepts a truth table T if and only if the function with truth table T belongs to C.

truthTableTest C accepts the truth table of f if and only if f ∈ C.

The test deciding C accepts as many truth tables as there are functions in C.

@[simp]

At length 2 ^ n, the truth-table language of C is decided by the test for C n.

A property whose truth-table tests have circuit complexity polynomially bounded in the length 2 ^ n of the truth table has its truth-table language in P/poly. At lengths that are not powers of two the language has no words, so its slice is constant.

A property whose truth-table tests are synthesised within a polynomial budget in the length 2 ^ n of the truth table has its truth-table language in P/poly.

Largeness [RR97]: for some c, eventually at least a 2 ^ (-c n) fraction of the 2 ^ 2 ^ n Boolean functions on n inputs lie in C n.

Natural properties [RR97]: C is Γ-natural when it contains a large property whose truth tables form a language in Γ. For Γ = PPoly that property is decided by circuits of size polynomial in the length 2 ^ n of the truth table, that is of size 2 ^ O(n) (exists_complexity_truthTableTest_le).

Usefulness [RR97]: C is useful against a class Λ of languages when the slices of every language in Λ eventually lie outside C. Against P/poly, this says that for every polynomial bound, eventually every function in C n needs more gates (isUseful_PPoly_iff).

theorem Cslib.Circuits.Boolean.NaturalProof.IsLarge.mono {C C' : (n : ℕ) → Set (BooleanFunction n)} (hC : IsLarge C) (h : ∀ (n : ℕ), C n ⊆ C' n) :

Any property containing a large property at every input length is itself large.

theorem Cslib.Circuits.Boolean.NaturalProof.IsNatural.mono {Γ Γ' : Set (Language Bool)} {C C' : (n : ℕ) → Set (BooleanFunction n)} (hC : IsNatural Γ C) (hΓ : Γ ⊆ Γ') (h : ∀ (n : ℕ), C n ⊆ C' n) :
IsNatural Γ' C'

A larger class of deciders, or a larger property, keeps a property natural.

theorem Cslib.Circuits.Boolean.NaturalProof.IsUseful.anti {Λ Λ' : Set (Language Bool)} {C C' : (n : ℕ) → Set (BooleanFunction n)} (hC : IsUseful Λ C) (hΛ : Λ' ⊆ Λ) (h : ∀ (n : ℕ), C' n ⊆ C n) :
IsUseful Λ' C'

A smaller class, or a smaller property, keeps a property useful.

theorem Cslib.Circuits.Boolean.NaturalProof.IsUseful.eventually_forall_not {Λ : Set (Language Bool)} {C : (n : ℕ) → Set (BooleanFunction n)} (hC : IsUseful Λ C) {P : (n : ℕ) → BooleanFunction n → Prop} (hΛ : ∀ (g : (n : ℕ) → BooleanFunction n), (∀ (n : ℕ), P n (g n)) → Language.ofSlices g ∈ Λ) (hP : ∀ (n : ℕ), ∃ (f : BooleanFunction n), P n f) :
∀ᶠ (n : ℕ) in Filter.atTop, ∀ f ∈ C n, ¬P n f

Usefulness by patching: if Λ contains every language whose slices all satisfy P, and P holds for some function at every input length, then a property useful against Λ eventually contains no function satisfying P. The language patched together from a function in C n satisfying P, wherever there is one, and from any function satisfying P elsewhere, lies in Λ, so its slices eventually leave C.

theorem Cslib.Circuits.Boolean.NaturalProof.IsUseful.eventually_lt_complexity {Λ : Set (Language Bool)} {C : (n : ℕ) → Set (BooleanFunction n)} (hC : IsUseful Λ C) {s : ℕ → ℕ} (hΛ : SIZE s ⊆ Λ) (hs : ∀ (n : ℕ), 1 ≤ s n) :

If Λ contains SIZE s, with s positive, a property useful against Λ eventually holds only for functions needing more than s n gates.

Usefulness against P/poly, in the form of [RR97]: for every polynomially bounded s, eventually every function in C n needs more than s n gates.

A P/poly-constructive property is decided by circuits of size 2 ^ O(n).

A property that is natural for the class P, applied to truth tables, is P/poly-natural: a problem decided in time polynomial in the length of the truth table has circuits of polynomial size (P_subset_PPolyOn).

The Razborov–Rudich distinguisher #

theorem Cslib.Circuits.Boolean.advantage_truthTableGenerator_truthTableTest {n : ℕ} {Key : Type u_1} [Fintype Key] [Nonempty Key] (F : Key → BooleanFunction n) {C : Set (BooleanFunction n)} (hF : ∀ (key : Key), F key ∉ C) :

The Razborov–Rudich distinguisher [RazborovRudich1997, Section 4]. If no function of the keyed family F lies in C, the test deciding C from truth tables never accepts the truth table of F key, and accepts that of a uniformly random function with probability the density of C. Its advantage is therefore exactly the density of C.

theorem Cslib.Circuits.Boolean.not_secure_truthTableGenerator {n : ℕ} {Key : Type u_1} [Fintype Key] [Nonempty Key] {F : Key → BooleanFunction n} {C : Set (BooleanFunction n)} {s t : ℕ} {ε : NNReal} (hconstructive : complexity interpretation (single (truthTableTest C)) ≤ t) (huseful : ∀ f ∈ C, s < complexity interpretation (single f)) (hF : ∀ (key : Key), complexity interpretation (single (F key)) ≤ s) (hε : ↑ε < ↑C.ncard / 2 ^ 2 ^ n) :

Natural properties break pseudorandom function families, for one input length [RazborovRudich1997, Section 4]. Let C be a property of functions on n inputs that is decided from truth tables by circuits with at most t gates and holds for no function computable with at most s gates. Then no keyed family of functions computable with at most s gates is pseudorandom against circuits with at most t gates with error below the density of C.

theorem Cslib.Circuits.Boolean.not_isUseful_PPoly_of_isNatural {C : (n : ℕ) → Set (BooleanFunction n)} {Key : ℕ → Type u_1} [(n : ℕ) → Fintype (Key n)] [∀ (n : ℕ), Nonempty (Key n)] {F : (n : ℕ) → Key n → BooleanFunction n} {s : ℕ → ℕ} (hs : PolynomiallyBounded s) (hF : ∀ (n : ℕ) (key : Key n), complexity interpretation (single (F n key)) ≤ s n) (hsecure : Crypto.PRG.IsExponentiallySecure F) (hC : NaturalProof.IsNatural PPoly C) :

The keyed-family step in the proof of [RazborovRudich1997, Theorem 4.1, equation (3), p. 31]. Suppose each member of the keyed family F n has at most s n gates, for a polynomially bounded s, and that the family is exponentially secure. For every c, eventually no circuit with at most 2 ^ (c n) gates distinguishes the truth table of a member with a uniformly random key from a uniformly random truth table with advantage more than 2 ^ (-c n). Then no P/poly-natural property is useful against P/poly.

Razborov and Rudich derive such a family from a pseudorandom generator secure against circuits of size 2 ^ (k ^ ε) by the construction of Goldreich, Goldwasser and Micali with keys of length polynomial in n: Cslib.Circuits.Boolean.not_isUseful_PPoly_of_isNatural_of_generator.

Hard functions #

For n ≥ 16, at least half of the functions on n inputs need more than 2 ^ n / (5 n) gates, by counting circuits (card_computableFunctions_two_pow_div_five_mul_le).

The functions on n inputs that need more than 2 ^ n / (5 n) gates form a large property: for n ≥ 16 they are at least half of all functions.

Circuits of polynomial size eventually compute no function that needs more than 2 ^ n / (5 n) gates.

theorem Cslib.Circuits.Boolean.truthTableLanguage_setOf_lt_complexity_notMem_PPoly {Key : ℕ → Type u_1} [(n : ℕ) → Fintype (Key n)] [∀ (n : ℕ), Nonempty (Key n)] {F : (n : ℕ) → Key n → BooleanFunction n} {s : ℕ → ℕ} (hs : PolynomiallyBounded s) (hF : ∀ (n : ℕ) (key : Key n), complexity interpretation (single (F n key)) ≤ s n) (hsecure : Crypto.PRG.IsExponentiallySecure F) :

If a keyed family of polynomial-size functions satisfies IsExponentiallySecure, the truth tables of the functions on n inputs needing more than 2 ^ n / (5 n) gates, the no-instances GapMCSP.noSet (fun n => 2 ^ n / (5 * n)), do not form a language in P/poly. Largeness and usefulness against P/poly give a distinguishing test from any P/poly decision procedure for this property.

theorem Cslib.Circuits.Boolean.not_isNatural_PPoly_setOf_lt_complexity {Key : ℕ → Type u_1} [(n : ℕ) → Fintype (Key n)] [∀ (n : ℕ), Nonempty (Key n)] {F : (n : ℕ) → Key n → BooleanFunction n} {s : ℕ → ℕ} (hs : PolynomiallyBounded s) (hF : ∀ (n : ℕ) (key : Key n), complexity interpretation (single (F n key)) ≤ s n) (hsecure : Crypto.PRG.IsExponentiallySecure F) :

If a keyed family of polynomial-size functions satisfies IsExponentiallySecure, usefulness of the property of needing more than 2 ^ n / (5 n) gates rules out its P/poly-naturality.