Documentation

CslibFrontier.Computability.MCSP.PartialHardness.Construction

The partial truth table of a CMMSA instance #

The table construction of the library's reduction from GapCMMSA Δ g 1 to partial MCSP (issue #4362, route B). Hirahara's partial-MCSP hardness [Hir22] fixes the problem shape; the construction here is the library's own. Each variable v of a CMMSA instance I gets a Boolean function f v on ℓ v inputs, where 2 ^ ℓ v is about w v · λ for the weight w v and a scale λ. The partial truth table FromCMMSA.toInstance I Δ k λ P f then reads:

So the masks of a term are an XOR sharing of the output, masked by k-fold XORs of the functions of its variables. Slots outside a term, and seed bits past ℓ v, are not read. The size threshold is ⌊(P + 2) 2 ^ L / (P L)⌋, where L = ⌈log₂ (2 θ λ)⌉ is the table length of the Yes circuit (sizeThreshold).

Slots are indexed by term and position within the term, Δ × Δ of them, instead of by the at most Δ literal occurrences of a formula: parsing then needs no offsets, and the input length stays ⌈log₂ m⌉ + Δ² (k W + 1).

Main definitions #

Main results #

References #

The input length ℓ v = ⌈log₂ (w v · λ)⌉ of the function of variable v, so that w v · λ ≤ 2 ^ ℓ v ≤ 2 w v · λ for a positive weight and λ ≥ 1.

The seed width W: the largest ℓ v over the variables v < n.

The table length L = ⌈log₂ (2 θ λ)⌉ of the Yes circuit.

The width ⌈log₂ m⌉ of the formula index.

The width of a slot: k seeds and a mask bit.

The input length ⌈log₂ m⌉ + Δ² (k W + 1).

The position of bit i of the formula index.

def Cslib.PartialMCSP.FromCMMSA.slotPos (I : Complexity.CMMSAInstance) (Δ k lam : ℕ) (t q : Fin Δ) (p : Fin (slotWidth I k lam)) :
Fin (inputLength I Δ k lam)

The position of bit p of slot (t, q).

def Cslib.PartialMCSP.FromCMMSA.maskPos (I : Complexity.CMMSAInstance) (Δ k lam : ℕ) (t q : Fin Δ) :
Fin (inputLength I Δ k lam)

The position of the mask bit of slot (t, q).

def Cslib.PartialMCSP.FromCMMSA.seedPos (I : Complexity.CMMSAInstance) (Δ k lam : ℕ) (t q : Fin Δ) (i : Fin k) (r : Fin (seedWidth I lam)) :
Fin (inputLength I Δ k lam)

The position of bit r of seed i of slot (t, q).

The formula index j read from an input.

def Cslib.PartialMCSP.FromCMMSA.seed {I : Complexity.CMMSAInstance} {Δ k lam : ℕ} (x : BitString (inputLength I Δ k lam)) (t q : Fin Δ) (i : Fin k) :

Seed i of slot (t, q) read from an input.

Term t of formula j, empty when there is none.

The variable of the literal at position q of term t of formula j.

@[reducible, inline]

The functions of the variables: f v has ℓ v inputs.

f v at the first ℓ v bits of z, zero-padded; false when v is not a variable.

def Cslib.PartialMCSP.FromCMMSA.slotBit {I : Complexity.CMMSAInstance} {Δ k lam : ℕ} (f : VarFunctions I lam) (x : BitString (inputLength I Δ k lam)) (t q : Fin Δ) :

The bit of slot (t, q): its mask plus ∑_{i < k} f v (z_i) for the variable v of its literal.

def Cslib.PartialMCSP.FromCMMSA.termParity {I : Complexity.CMMSAInstance} {Δ k lam : ℕ} (f : VarFunctions I lam) (x : BitString (inputLength I Δ k lam)) (t : Fin Δ) :

The parity of term t: the sum of the bits of its occupied slots.

The entry of the partial truth table at x: b when the formula index j is below m and every term of φ_j has parity b; otherwise undefined.

The size threshold ⌊(P + 2) 2 ^ L / (P L)⌋.

The partial MCSP instance of a CMMSA instance, for the functions f of its variables.

A defined entry has a formula index below m.

theorem Cslib.PartialMCSP.FromCMMSA.termParity_eq_of_entry_eq_some {I : Complexity.CMMSAInstance} {Δ k lam : ℕ} {f : VarFunctions I lam} {x : BitString (inputLength I Δ k lam)} {b : Bool} (h : entry f x = some b) (t : Fin Δ) (ht : ↑t < List.length (I.formulas.getD (formulaIndex x) [])) :
termParity f x t = b

Support of the table. At a defined entry b, every term of the indexed formula has parity b.

theorem Cslib.PartialMCSP.FromCMMSA.entry_eq_some_of_forall_termParity {I : Complexity.CMMSAInstance} {Δ k lam : ℕ} {f : VarFunctions I lam} {x : BitString (inputLength I Δ k lam)} {b : Bool} (hj : formulaIndex x < I.formulas.length) (hne : ∃ (t : Fin Δ), ↑t < List.length (I.formulas.getD (formulaIndex x) [])) (hb : ∀ (t : Fin Δ), ↑t < List.length (I.formulas.getD (formulaIndex x) []) → termParity f x t = b) :
entry f x = some b

The converse of termParity_eq_of_entry_eq_some: an entry is b when the formula index is below m, the formula has a term, and every term has parity b.

ℓ v is at most the seed width for a variable v < n.

Term t < |φ_j| of formula j < m is φ_j[t].