Documentation

CslibFrontier.Computability.MCSP.Magnification

Hardness Magnification for MCSP via Circuit-Min-Merge #

Slightly superlinear circuit lower bounds for MCSP[s] (Cslib.GapMCSP.yesSet s) imply NP ⊄ P/poly and P ≠ NP McKay, Murray, and Williams, Lemma 3.1, Theorem 1.4 (third bullet), and Section 5.

Assuming NP ⊆ P/poly, the polynomial-hierarchy language CircuitMinMergeLanguage (Cslib.MCSP.CircuitMinMergeLanguage), adapted from Circuit-Min-Merge in [McKayMurrayWilliams2019, Section 2.1], has polynomial-size circuits: given two subcube circuit certificates w₀ and w₁ for the half-subcubes p ++ [false] and p ++ [true] of {0, 1} ^ n (rather than t intervals), it selects the Cslib.BitString.wordLt-least valid size-≤ s circuit certificate w of length certLength n s (rather than a minimum-size circuit) that agrees with w₀ on p ++ [false] and with w₁ on p ++ [true], together with a validity bit. Following the C = P/poly case of the proof of Theorem 1.4 (Section 5) combined with Lemma 3.1's merge-tree idea, composing this merge circuit across the 2 ^ n nodes of the full binary tree of subcubes of {0, 1} ^ n (rather than a d-ary tree with ℓ = s³) produces a circuit of size 2 ^ n · poly(n, s(n)) deciding the 2 ^ n-bit slice of GapMCSP.yesSet s (Cslib.MCSP.exists_complexity_yesSet_le_of_NP_subset_PPoly).

Taking the contrapositive magnifies 2 ^ n · poly(n, s(n)) circuit lower bounds for GapMCSP.yesSet s to NP ⊄ P/poly (Cslib.MCSP.not_NP_subset_PPoly_of_yesSet_hard) and, via P ⊆ P/poly, to P ≠ NP (Cslib.MCSP.P_ne_NP_of_yesSet_hard). Relative to [McKayMurrayWilliams2019, Theorem 1.4, third bullet], the NP ⊄ P/poly magnification statements incorporate four specializations:

  1. decision GapMCSP.yesSet s (MCSP[s]) instead of search-MCSP^A[s];
  2. no oracle (A = ∅);
  3. fan-in-2 De Morgan circuits counting all gates (Cslib.Circuits.Circuit.size);
  4. a size-only lower bound, whereas the paper assumes no circuits of simultaneous size N · poly(s) and depth poly(s). Specializations (1) and (4) strengthen the lower-bound hypothesis (a decision lower bound implies a search lower bound, and a size-only lower bound implies a combined size-and-depth lower bound), while (2) and (3) fix parameters allowed by the source (A ∈ PH), making the Lean theorem a special case.

Main definitions #

Main results #

References #

Lexicographic minimum on fixed-length bit lists #

Subcubes and child-agreement predicates #

def Cslib.MCSP.agreesOnPoint (n s : ℕ) (p w₀ w₁ w x : List Bool) :

Whether the candidate circuit w agrees at point x in the subcube p (tested by p.isPrefixOf x) with the child certificate w₀ (if x[p.length] = false) or w₁ (if x[p.length] = true).

def Cslib.MCSP.AgreesWithChildren (n s : ℕ) (p w₀ w₁ w : List Bool) :

Whether the candidate circuit w agrees on the subcube p with the child certificates w₀ (on p ++ [false]) and w₁ (on p ++ [true]) at every n-bit input.

def Cslib.MCSP.IsMergedCert (n s : ℕ) (p w₀ w₁ w : List Bool) :

w is a canonical certificate of length certLength n s encoding a valid size-s circuit on n inputs that agrees with w₀ on p ++ [false] and with w₁ on p ++ [true].

def Cslib.MCSP.IsMinMergedCert (n s : ℕ) (p w₀ w₁ w : List Bool) :

w is the lexicographically smallest (BitString.wordLt) certificate satisfying IsMergedCert n s p w₀ w₁.

CircuitMinMergeLanguage and nonuniform quantifier elimination #

The width certLength n s + 1 of a child state vector (ok, w), consisting of one validity bit followed by a certificate of length certLength n s.

The fixed parameters (arity, size, subcube, bitIndex) of a query to CircuitMinMergeLanguage: arity and size bound in unary, subcube prefix, and output bit index in unary.

  • arity : ℕ

    Truth-table arity n.

  • size : ℕ

    Circuit size bound s.

  • subcube : List Bool

    Subcube prefix p.

  • bitIndex : ℕ

    Output bit index j.

theorem Cslib.MCSP.MergeHeader.ext {x y : MergeHeader} (arity : x.arity = y.arity) (size : x.size = y.size) (subcube : x.subcube = y.subcube) (bitIndex : x.bitIndex = y.bitIndex) :
x = y
theorem Cslib.MCSP.encHeader_subcube_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → MergeHeader} :
theorem Cslib.MCSP.encHeader_size_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → MergeHeader} :
theorem Cslib.MCSP.encHeader_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget x0 x1 : γ → ℕ} {x2 : γ → List Bool} {x3 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn Turing.MultiTapeTM.encUnary budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn Turing.MultiTapeTM.encUnary budget) (h2 : Turing.MultiTapeTM.ComputableInSpace x2 encIn Turing.MultiTapeTM.encBits budget) (h3 : Turing.MultiTapeTM.ComputableInSpace x3 encIn Turing.MultiTapeTM.encUnary budget) :
Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { arity := x0 x, size := x1 x, subcube := x2 x, bitIndex := x3 x }) encIn encHeader budget
@[reducible, inline]

The tuple of the fields of encHeader.

theorem Cslib.MCSP.encHeader_arity_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → MergeHeader} :
theorem Cslib.MCSP.encHeader_mk_deg :
Turing.MultiTapeTM.ComputableInDegree (fun (p : ℕ × ℕ × List Bool × ℕ) => { arity := p.1, size := p.2.1, subcube := p.2.2.1, bitIndex := p.2.2.2 }) encHeaderFields encHeader 1 1
theorem Cslib.MCSP.encHeader_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 T0 S0 x1 T1 S1 : γ → ℕ} {x2 : γ → List Bool} {T2 S2 x3 T3 S3 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn Turing.MultiTapeTM.encUnary T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn Turing.MultiTapeTM.encUnary T1 S1) (h2 : Turing.MultiTapeTM.ComputableInO x2 encIn Turing.MultiTapeTM.encBits T2 S2) (h3 : Turing.MultiTapeTM.ComputableInO x3 encIn Turing.MultiTapeTM.encUnary T3 S3) :
Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { arity := x0 x, size := x1 x, subcube := x2 x, bitIndex := x3 x }) encIn encHeader (fun (x : γ) => T0 x + (T1 x + (T2 x + T3 x))) fun (x : γ) => S0 x + (S1 x + (S2 x + S3 x))

Encoding of MergeHeader with arity, size, bitIndex in unary and subcube as raw bits.

theorem Cslib.MCSP.encHeader_bitIndex_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → MergeHeader} :
theorem Cslib.MCSP.encHeader_arity_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → MergeHeader} :
theorem Cslib.MCSP.encHeader_size_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → MergeHeader} :

An input ⟨hdr, childStates⟩ to CircuitMinMergeLanguage, where childStates concatenates the two child state vectors (ok₀, w₀) and (ok₁, w₁) of width stateWidth n s.

  • header : MergeHeader

    Query header (arity, size, subcube, bitIndex).

  • childStates : List Bool

    Concatenated child state vectors (ok₀, w₀) ++ (ok₁, w₁).

theorem Cslib.MCSP.MergeInput.ext {x y : MergeInput} (header : x.header = y.header) (childStates : x.childStates = y.childStates) :
x = y
theorem Cslib.MCSP.encMerge_mk_polyTime {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → MergeHeader} {x1 : γ → List Bool} (h0 : Turing.MultiTapeTM.ComputableInPolyTime x0 encIn encHeader) (h1 : Turing.MultiTapeTM.ComputableInPolyTime x1 encIn Turing.MultiTapeTM.encBits) :
Turing.MultiTapeTM.ComputableInPolyTime (fun (x : γ) => { header := x0 x, childStates := x1 x }) encIn encMerge
theorem Cslib.MCSP.encMerge_mk_inO {γ : Type} {encIn : γ ↪ List Bool} {x0 : γ → MergeHeader} {T0 S0 : γ → ℕ} {x1 : γ → List Bool} {T1 S1 : γ → ℕ} (h0 : Turing.MultiTapeTM.ComputableInO x0 encIn encHeader T0 S0) (h1 : Turing.MultiTapeTM.ComputableInO x1 encIn Turing.MultiTapeTM.encBits T1 S1) :
Turing.MultiTapeTM.ComputableInO (fun (x : γ) => { header := x0 x, childStates := x1 x }) encIn encMerge (fun (x : γ) => T0 x + T1 x) fun (x : γ) => S0 x + S1 x
theorem Cslib.MCSP.encMerge_childStates_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → MergeInput} :

Encoding of MergeInput pairing encHeader with encBits, so encMerge ⟨hdr, v⟩ = frame (encHeader hdr) ++ v.

@[reducible, inline]

The tuple of the fields of encMerge.

theorem Cslib.MCSP.encMerge_mk_budget {γ : Type} {encIn : γ ↪ List Bool} {budget : γ → ℕ} {x0 : γ → MergeHeader} {x1 : γ → List Bool} (h0 : Turing.MultiTapeTM.ComputableInSpace x0 encIn encHeader budget) (h1 : Turing.MultiTapeTM.ComputableInSpace x1 encIn Turing.MultiTapeTM.encBits budget) :
Turing.MultiTapeTM.ComputableInSpace (fun (x : γ) => { header := x0 x, childStates := x1 x }) encIn encMerge budget
theorem Cslib.MCSP.encMerge_header_budget {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {S✝ : γ✝ → ℕ} {g✝ : γ✝ → MergeInput} :
Turing.MultiTapeTM.ComputableInSpace g✝ encIn✝ encMerge S✝ → Turing.MultiTapeTM.ComputableInSpace (fun (c : γ✝) => (g✝ c).header) encIn✝ encHeader S✝
theorem Cslib.MCSP.encMerge_header_polyTime {γ✝ : Type} {encIn✝ : γ✝ ↪ List Bool} {g✝ : γ✝ → MergeInput} :

Extract the left child validity bit ok₀ from a MergeInput.

Extract the left child certificate w₀ of length certLength n s from a MergeInput.

Extract the right child validity bit ok₁ from a MergeInput.

Extract the right child certificate w₁ of length certLength n s from a MergeInput.

The CircuitMinMergeLanguage decision problem, adapted from Circuit-Min-Merge in [McKayMurrayWilliams2019, Section 2.1]: given header parameters ⟨n, s, p, j⟩ and concatenated child states v representing (ok₀, w₀) and (ok₁, w₁) for the two half-subcubes p ++ [false] and p ++ [true] (rather than t intervals), accepts when ok₀ = true, ok₁ = true, and there is a BitString.wordLt-least valid size-≤ s merged certificate w (IsMinMergedCert n s p w₀ w₁ w, rather than a minimum-size circuit) whose j-th output bit (true at j = 0, and bit j - 1 of w at j > 0) is true.

Polynomial-time projections of a MergeInput #

The arity n and size bound s are read from the header in unary; the derived widths certLength n s and stateWidth n s are then unary arithmetic.

Under NP ⊆ P/poly, CircuitMinMergeLanguage has polynomial-size circuits. Since CircuitMinMergeLanguage is defined by bounded existential and universal quantifiers over polynomial-time predicates, nonuniform quantifier elimination puts it in PPolyOn encMerge [McKayMurrayWilliams2019, Section 2.1 and Section 5 (proof of Theorem 1.4)].

Subcube certificates and semantic tree synthesis #

w is a canonical certificate of length certLength n s encoding a valid size-s circuit on n inputs that computes f on every point in the subcube p (tested via p.isPrefixOf).

w is the lexicographically smallest (BitString.wordLt) certificate satisfying IsSubcubeCert n s f p.

noncomputable def Cslib.MCSP.subcubeState (n s : ℕ) (f : BooleanFunction n) (p : List Bool) :

The stateWidth n s-bit state vector of subcube p for f: bit 0 records whether a size-s circuit certificate exists for f on p, and bits 1 .. certLength n s record the lexicographically smallest such certificate (or all false if none exists).

noncomputable def Cslib.MCSP.mergeVec (L : Language Bool) (n s : ℕ) (p : List Bool) (y : BitString (stateWidth n s + stateWidth n s)) :

The multi-output merge step obtained by hardwiring the header ⟨n, s, p, j⟩ into the slices of a language L for each output bit j : Fin (stateWidth n s). When L encodes CircuitMinMergeLanguage, it maps the states of the half-subcubes p ++ [false] and p ++ [true] to the state of p (Cslib.MCSP.mergeVec_eq_subcubeState).

theorem Cslib.MCSP.mergeVec_eq_subcubeState {L : Language Bool} (hL : ∀ (a : MergeInput), a ∈ CircuitMinMergeLanguage ↔ encMerge a ∈ L) {n s : ℕ} (f : BooleanFunction n) {p : List Bool} (hp : p.length < n) :
mergeVec L n s p (Fin.append (subcubeState n s f (p ++ [false])) (subcubeState n s f (p ++ [true]))) = subcubeState n s f p

One merge step. If L encodes CircuitMinMergeLanguage under encMerge, then mergeVec L n s p maps the states of the half-subcubes p ++ [false] and p ++ [true] to the state of p, for every proper prefix p of an n-bit input.

theorem Cslib.MCSP.subcubeState_congr_of_length_eq {n s : ℕ} {f₁ f₂ : BooleanFunction n} {p : List Bool} (hp : p.length = n) (hf : f₁ (BitString.ofList n p) = f₂ (BitString.ofList n p)) :
subcubeState n s f₁ p = subcubeState n s f₂ p

The state of a full-length prefix p, a single point of {0, 1} ^ n, depends only on the value of f at that point.

theorem Cslib.MCSP.subcubeState_nil_zero_eq_slice_yesSet (s : ℕ → ℕ) (n : ℕ) (T : BitString (2 ^ n)) :
subcubeState n (s n) ((truthTable n).symm T) [] ⟨0, ⋯⟩ = (GapMCSP.yesSet s).slice (2 ^ n) T

Bit 0 of the state of the root subcube (the empty prefix) of the function with truth table T is the answer of MCSP[s] (GapMCSP.yesSet s) on T.

Main theorems: MMW19 circuit upper bound and hardness magnification #

McKay–Murray–Williams circuit upper bound for MCSP[s] under NP ⊆ P/poly [McKayMurrayWilliams2019, Lemma 3.1 and Section 5 (proof of Theorem 1.4, C = P/poly case)]: if NP ⊆ P/poly, then there is a constant c > 0 such that for every size schedule s : ℕ → ℕ and every n, the 2 ^ n-bit slice of GapMCSP.yesSet s has circuit complexity at most 2 ^ n * c * (n + s n + 1) ^ c. The proof composes the P/poly circuit for CircuitMinMergeLanguage across a binary merge tree over the 2 ^ n subcubes of {0, 1} ^ n (rather than a d-ary tree with ℓ = s³).

McKay–Murray–Williams circuit upper bound for MCSP[n ^ k] under NP ⊆ P/poly [McKayMurrayWilliams2019, Lemma 3.1 and Section 5 (proof of Theorem 1.4, C = P/poly case)]: if NP ⊆ P/poly, then for every degree k, there is c > 0 such that the 2 ^ n-bit slice of GapMCSP.yesSet (fun m => m ^ k) has circuit complexity at most 2 ^ n * c * (n + 1) ^ c.

Hardness magnification for MCSP[s] against NP ⊆ P/poly [McKayMurrayWilliams2019, Theorem 1.4, third bullet]: if for every c > 0 there exist a schedule s and input arity n such that the 2 ^ n-bit slice of GapMCSP.yesSet s requires more than 2 ^ n * c * (n + s n + 1) ^ c gates, then NP ⊄ P/poly.

Relative to the paper's statement, this specializes search-MCSP^A[s] to decision GapMCSP.yesSet s (MCSP[s]), sets A = ∅, uses fan-in-2 De Morgan circuits counting all gates, and assumes a size-only lower bound rather than a combined size-and-depth lower bound.

Hardness magnification for MCSP[s] to P ≠ NP: if for every c > 0 there exist a schedule s and input arity n such that the 2 ^ n-bit slice of GapMCSP.yesSet s requires more than 2 ^ n * c * (n + s n + 1) ^ c gates, then P ≠ NP.

This follows immediately from not_NP_subset_PPoly_of_yesSet_hard ([McKayMurrayWilliams2019, Theorem 1.4, third bullet]) and P ⊆ P/poly (P_subset_PPolyOn).

Hardness magnification for MCSP[n ^ k] against NP ⊆ P/poly [McKayMurrayWilliams2019, Theorem 1.4, third bullet]: if for some k and every c > 0, there is n such that the 2 ^ n-bit slice of GapMCSP.yesSet (fun m => m ^ k) requires more than 2 ^ n * c * (n + 1) ^ c gates, then NP ⊄ P/poly.

Relative to the paper's statement, this specializes search-MCSP^A[s] to decision GapMCSP.yesSet (MCSP[n ^ k]), sets A = ∅, uses fan-in-2 De Morgan circuits counting all gates, and assumes a size-only lower bound rather than a combined size-and-depth lower bound.

Hardness magnification for MCSP[n ^ k] to P ≠ NP: if for some k and every c > 0, there is n such that the 2 ^ n-bit slice of GapMCSP.yesSet (fun m => m ^ k) requires more than 2 ^ n * c * (n + 1) ^ c gates, then P ≠ NP.

This follows immediately from not_NP_subset_PPoly_of_yesSet_pow_hard ([McKayMurrayWilliams2019, Theorem 1.4, third bullet]) and P ⊆ P/poly (P_subset_PPolyOn).