The counting-sparsification step with a captured runtime context #
The counting-sparsification search (Cslib.Complexity.CountingSparsify.step) fixes its threshold
base M and its leaf counter g before the input. A single machine for Proposition 6.4
[OAI26k] instead computes its parameters from the input: the threshold base from the
sparsification parameter, and the leaf counter's own parameters from the declared number of
variables (Section 6.4, printed pp. 43–44). This module carries a runtime context c : C beside
the search state: Cslib.Complexity.CountingSparsify.stepWith θ K g reads its thresholds θ c and
passes c to the leaf counter g, and never changes c.
The search state, its initialization init and its weighting and cap are those of the existing
search: the state records the number of variables occurring in the input, and the leaf counter's
contract is the occurring-support count ψ.modelCount. An externally declared number of variables
N lives in the context; accounting for the N - φ.numVars unused declared variables, and
normalizing any declared-N leaf count before it reaches the weighting, are left to the outer
wrapper.
For the thresholds countingThreshold (MOf c), the context step is the existing step at base
MOf c with leaf counter g (c, ·), at every iterate
(Cslib.Complexity.CountingSparsify.iterate_stepWith_countingThreshold), so the existing
correctness theorems apply pointwise. One step is computable within a polynomial in the encoded
context and state, plus the time and space of the leaf counter on a sparse head formula
(Cslib.Complexity.CountingSparsify.exists_computableInO_stepWith); the context is charged in
full, and the leaf counter's time and space are kept separate.
This module certifies one step only. The resource bound for a whole uniform search, the outer wrapper for an externally declared count, and the assembly of Proposition 6.4 are separate.
The context step Cslib.Complexity.CountingSparsify.stepWith and its agreement lemmas live with
the search in CslibFrontier/Computability/Complexity/FineGrained/CountingSparsification.lean; this
module certifies its resources.
Main results #
Cslib.Complexity.CountingSparsify.exists_computableInO_stepWith: the time and space of one step.
References #
- OpenAI, The Exponential Time Hypothesis is False, Section 6.4, Proposition 6.4 (pp. 43–44) and Appendix A (pp. 44–47).
The time and space of a context step: a polynomial in the length of the encoded context
and state, plus the time (respectively space) of the leaf counter and a polynomial in the state and
counter output lengths when the head formula is sparse. The context and state are encoded as
encPair encC encState: the framed context followed by the search state.