Preimage counting and self-reduction for constant-locality Boolean maps #
In [OAI26k] (7ef5c0cc, Appendix C.2, p. 52):
C.2. Inverting Boolean maps with constant output locality. Fix a constant $d$. Consider a Boolean map $G : \{0, 1\}^n \to \{0, 1\}^m$ whose $i$th output bit has the form $$G(\vec{x})_i = g_i(\vec{x}|_{S_i}), \qquad S_i \subseteq [n], \qquad |S_i| \leqslant d.$$ The input description of $G$ lists the sets $S_i$ and the truth tables of the Boolean functions $g_i$. Thus each output inspects only constantly many input bits, although the sets $S_i$ may overlap arbitrarily. Given a target $\vec{b} \in \{0, 1\}^m$, inversion asks for any $\vec{x}$ with $G(\vec{x}) = \vec{b}$.
Corollary C.2. For every fixed $d$ and $n \geqslant 20$, the number $|G^{-1}(\vec{b})|$ can be computed exactly, and a preimage can be found whenever one exists, in deterministic time $$(n + m)^{O_d(1)} 2^{O_d(\rho(n))}$$ and space $(n + m)^{O_d(1)}$.
Notation mapping and deliberate differences from the source #
- Locality bound $d \mapsto k$.
- Scope $S_i \mapsto$
LocalOutput.scope: an orderedList ℕof variable indices< nof length at mostkin which repeated variable indices are allowed (whereas the source's $S_i \subseteq [n]$ is a subset). - Truth table of $g_i \mapsto$
LocalOutput.accepts: the explicit list of accepted local bit patterns onscope. - Subexponential exponent $\rho(n) \mapsto$
interpolationScale n, which onmainis $n (\log \log (n + 16))^2 / \sqrt{\log (n + 16)}$ (the paper's $\rho(n)$ shifted by $16$). Because Corollary C.2 states its time bound with $2^{O_d(\rho(n))}$, the Lean bound matches Corollary C.2's stated bound directly; only the sharper Theorem 1.1 / Appendix D exponent used inside Corollary C.2's proof is out of scope here. - Polynomial overhead $(n + m)^{O_d(1)} \mapsto (L + 1)^e$, where $L = (\mathrm{encLocalMapQuery}\,(G, b)).\mathrm{length}$ is the framed binary encoding length of the query. Since $n$ is encoded in unary and each of the $m$ output coordinates is framed, $L \ge n$ and $L \ge m$ (while redundant or wrong-length patterns in $G$ can make $L$ larger than $\mathrm{poly}(n + m)$).
- The threshold $n \geqslant 20$ is absorbed into the multiplicative and additive constants of the machine bounds, so the Lean theorems hold for all $n : \mathbb{N}$.
- Decision (
decidableInSubexpTime_localMapHasPreimage) is proved as an extra corollary not stated in Corollary C.2.
Main definitions #
Cslib.Complexity.LocalOutput,Cslib.Complexity.LocalMap: explicit representations of local output coordinates and constant-locality Boolean maps $\{0, 1\}^n \to \{0, 1\}^m$.Cslib.Complexity.LocalMap.eval,Cslib.Complexity.LocalMap.evalBits: evaluation of a local map on variable assignments $\mathbb{N} \to \mathrm{Bool}$ and on $n$-bit stringsList Bool.Cslib.Complexity.LocalMap.preimageCount: the number of preimages of a target output in $\{0, 1\}^n$.Cslib.Complexity.LocalMap.cspSem,Cslib.Complexity.LocalMap.toCSP,Cslib.Complexity.LocalMap.toDeclaredCNF,Cslib.Complexity.LocalMap.toKSAT: compilation of a local map preimage equation $G(x) = b$ into a BooleanCSPand a declared-variableCNF.Cslib.Complexity.LocalMapHasPreimage: the decision problem of local map inversion.Cslib.Complexity.LocalMap.findPreimage: variable-by-variable self-reduction using a declared CNF counter.
Main results #
Cslib.Complexity.LocalMap.eval_toCSP,Cslib.Complexity.LocalMap.preimageCount_eq_modelCountOn_toCSP,Cslib.Complexity.LocalMap.modelCountOn_toDeclaredCNF: satisfying assignments ofG.toCSP targetandLocalMap.toDeclaredCNF k (G, target)onFinset.range G.numVarsmatch preimages oftargetunderG.Cslib.Complexity.CountingNativeEndpoint.exists_localMapPreimageCounter: exact subexponential preimage counting in polynomial space for every fixed localityk.Cslib.Complexity.CountingNativeEndpoint.decidableInSubexpTime_localMapHasPreimage: subexponential-time preimage existence for every fixed localityk.Cslib.Complexity.CountingNativeEndpoint.exists_localMapPreimageFinder: subexponential preimage finding in polynomial space via self-reduction for every fixed localityk.
References #
- OpenAI, The Exponential Time Hypothesis is False, Appendix C.2, Corollary C.2, p. 52 (via Section 6.4, Proposition 6.4, pp. 43–44).
- O. Goldreich, Foundations of Cryptography, Volume 1: Basic Tools
Local outputs and constant-locality Boolean maps #
A Boolean map $G : \{0, 1\}^n \to \{0, 1\}^m$ represented by its number of declared input
variables numVars = n and its list of m local output coordinates.
Framed encoding of a single local output coordinate.
The input variable indices inspected by a local output coordinate.
The local bit patterns accepted by a local output coordinate.
Evaluate a local output coordinate on a local bit pattern α.
Evaluate a local output coordinate under a global variable assignment σ : ℕ → Bool.
Construct a LocalOutput on scope from any Boolean predicate f : List Bool → Bool by
tabulating the accepted patterns in BitString.enumList scope.length.
Validity of a local output coordinate for locality k and N declared input variables:
its scope has length at most k and every variable index lies in < N.
Characterization of LocalOutput.Valid k N c = true.
Number of declared input variables $n$ of $G : \{0, 1\}^n \to \{0, 1\}^m$.
List of local output coordinates of $G$.
Number of output bits $m$ of $G : \{0, 1\}^n \to \{0, 1\}^m$.
The output list of G.eval σ has length G.numOutputs.
The output list of G.evalBits x has length G.numOutputs.
preimageCount is the cardinality of preimages in Fin G.numVars → Bool.
When target.length ≠ G.numOutputs, G.preimageCount target = 0.
When target.length = G.numOutputs, (G.toCSP target).eval cspSem σ holds if and only if
G.eval σ = target.
When target.length = G.numOutputs, G.evalBits x = target holds if and only if the
assignment fun v => x.getD v false satisfies G.toCSP target.
Exact-multiplicity CSP preimage preservation: When target.length = G.numOutputs,
G.preimageCount target equals the declared-variable CSP model count of G.toCSP target on
Finset.range G.numVars.
Polynomial-time computability of local map operations #
LocalOutput.evalLocal is computable in polynomial time.
LocalMap.cspSem is computable in polynomial time.
LocalOutput.Valid k is computable in polynomial time.
LocalMap.Valid k is computable in polynomial time.
LocalMap.toCSP is computable in polynomial time.
LocalMap.evalBits is computable in polynomial time.
Section 4: Preimage counting and decision endpoints via CSP.toCNFBounded #
Guard checking that G is k-valid and target has length G.numOutputs.
LocalMap.ValidQuery k is computable in polynomial time.
Convert a local map query (G, target) into a declared-variable CNF instance DeclaredCNF for
width k by compiling G.toCSP target via CSP.toCNFBounded k LocalMap.cspSem when
LocalMap.ValidQuery k q holds, and emitting ⟨G.numVars, [[]]⟩ otherwise.
The declared variable count of LocalMap.toDeclaredCNF k q is q.1.numVars.
For k ≤ k', LocalMap.toDeclaredCNF k q always produces a valid declared k'-CNF input.
Evaluating the CNF produced by LocalMap.toDeclaredCNF k q under σ tests whether q.1 is
k-valid and q.1.eval σ = q.2.
The declared-variable model count of LocalMap.toDeclaredCNF k q equals q.1.preimageCount q.2
when q.1 is k-valid, and 0 otherwise.
LocalMap.toDeclaredCNF k is computable in polynomial time.
Polynomial-time reduction from LocalMapHasPreimage k to KSAT k.
LocalMap.toKSAT k is computable in polynomial time.
LocalMap.toKSAT k is a many-one reduction from LocalMapHasPreimage k to KSAT k.
Declared-form local map preimage counter (Corollary C.2): For every fixed locality bound
k, one native machine computes the exact preimage count G.preimageCount target for every valid
k-local map G (and 0 when G is invalid), in time
$2^{O_k(\mathrm{interpolationScale}(n))} \cdot \mathrm{poly}(L)$ and polynomial space
$\mathrm{poly}(L)$.
Subexponential local map preimage counting (Corollary C.2): For every fixed locality bound
k, one native machine computes G.preimageCount target for every valid k-local map G and
target target, within time ⌈2 ^ (A * interpolationScale G.numVars)⌉₊ * (L + 1) ^ e and space
(L + 1) ^ b.
Subexponential-time preimage existence for constant-locality maps (Corollary C.2):
For every fixed locality bound k, LocalMapHasPreimage k is decidable in subexponential time in
the number of input variables G.numVars.
Section 5: Prefix self-reduction and preimage finding #
Unit clauses fixing the first u.length input variables 0, ..., u.length - 1 to the bits of
u.
Build the declared-variable CNF query testing whether u ++ [false] can be extended to a
satisfying assignment of st.1.2 on Finset.range st.1.1.
One step of prefix self-reduction parameterized by a declared-variable counter count:
append false if u ++ [false] has at least one extension (count (...) != 0), and true
otherwise (count (...) == 0).
Canonical mathematical declared-variable counter on Finset.range p.1.
Final verification step of prefix self-reduction: check whether the candidate bitstring st.2
satisfies the formula st.1.2, returning some st.2 if so and none otherwise.
Pair view (numVars, formula) of LocalMap.toDeclaredCNF k q for the tuple-encoded
PreimageSearchState self-reduction loop.
Soundness of findPreimage: Whenever G.findPreimage k target = some x, G is k-valid,
x has length G.numVars, and G.evalBits x = target.
Completeness of findPreimage: For any valid k-local map G and target target with
0 < G.preimageCount target, G.findPreimage k target returns some x for an n-bit preimage
x of target.
For a valid k-local map G, G.findPreimage k target returns some x if and only if
0 < G.preimageCount target.
For a valid k-local map G, G.findPreimage k target returns none if and only if
G.preimageCount target = 0.
Declared-form local map preimage finder (Corollary C.2): For every fixed locality bound
k, LocalMap.findPreimage k is computed on native multi-tape Turing machines in time
$2^{O_k(\mathrm{interpolationScale}(n))} \cdot \mathrm{poly}(L)$ and polynomial space
$\mathrm{poly}(L)$.
Subexponential local map preimage finding (Corollary C.2): For every fixed locality bound
k, one native machine computes G.findPreimage k target (returning some x with x.length = G.numVars and G.evalBits x = target whenever G is k-valid and a preimage exists, and none
otherwise) within time ⌈2 ^ (A * interpolationScale G.numVars)⌉₊ * (L + 1) ^ e and space
(L + 1) ^ b.