Polynomial-time rational hitting-list generator #
This module assembles the polynomial-time rational hitting-list generator from the certified
parameter schedule (Complexity/Computability/Circuit/Rational/Runtime/Parameters.lean), the staged
division-free integer determinant
(Complexity/Computability/Circuit/Rational/Runtime/Determinant.lean), the integer lift tables
(Complexity/Computability/Circuit/Rational/Runtime/Lift.lean), the reduced-rational
binary encoding (Complexity/Computability/Circuit/Rational/Runtime/Encode.lean), and the per-point
Cramer normalization
(Complexity/Computability/Circuit/Rational/Runtime/Point.lean).
Given parameters (n, s), gridPointWords enumerates the three-dimensional grid
{1, …, H}³ in lexicographic order and collects the encoded normalized tuples emitted at all
nonsingular points. outputWord prepends the self-delimiting binary encodings of the common
matrix dimension M * Dg and the emitted tuple count words.length, and hittingListWord n s
instantiates outputWord at Parameters.truncation n s, Parameters.ambientDimension n s,
CyclotomicRing.degree (Parameters.exponent n s), and Parameters.gridSize n s, agreeing with
encodeOutput (hittingList n s) for all n, s : ℕ (hittingListWord_eq).
For a standalone List Bool → List Bool generator, inputWord n s encodes (n, s) as the unary
word true ^ n ++ [false] ++ true ^ s, parseInput recovers some (n, s) when 1 ≤ n, 1 ≤ s,
and w = inputWord n s (and none otherwise), and hittingGenerator emits
encodeOutput (hittingList n s) on valid inputs and [] on malformed inputs.
Main definitions #
Cslib.Circuits.Rational.gridPointWords: list of encoded tuples emitted across the{1, …, H}³grid.Cslib.Circuits.Rational.outputWord,Cslib.Circuits.Rational.hittingListWord: complete binary encoding of the generator output for fixed parameters and for the selected parameter schedule.Cslib.Circuits.Rational.inputWord,Cslib.Circuits.Rational.parseInput: unary input formattrue ^ n ++ [false] ++ true ^ sand its parser.Cslib.Circuits.Rational.hittingGenerator: the standaloneList Bool → List Boolhitting-list generator.
Main results #
Cslib.Circuits.Rational.gridPointWords_eq,Cslib.Circuits.Rational.outputWord_eq,Cslib.Circuits.Rational.hittingListWord_eq: agreement withExecutableGenerator.outputandencodeOutput (hittingList n s).Cslib.Circuits.Rational.hittingList_polytime:(n, s) ↦ encodeOutput (hittingList n s)is computable in polynomial time from unary(n, s).Cslib.Circuits.Rational.parseInput_eq_some_iff,Cslib.Circuits.Rational.parseInput_inputWord,Cslib.Circuits.Rational.parseInput_eq_none_iff: exact characterization ofparseInput.Cslib.Circuits.Rational.hittingGenerator_inputWord,Cslib.Circuits.Rational.hittingGenerator_eq_nil,Cslib.Circuits.Rational.hittingGenerator_eq_nil_of_parseInput_eq_none: behavior ofhittingGeneratoron valid and malformed inputs.Cslib.Circuits.Rational.hittingGenerator_polytime:hittingGeneratoris computable in polynomial time overencBits.Cslib.Circuits.Rational.hittingGenerator_spec: packaged end-to-end polynomial-time, dimension-bound, encoding-length, and hitting specification forhittingGenerator.
References #
Grid enumeration and complete output encoding #
Complete binary encoding of the generator output for parameters (n, N, M, Dg, H): the
encoded matrix dimension M * Dg, the encoded emitted tuple count, and the concatenation of all
emitted tuple encodings.
Instances For
Complete binary encoding of the hitting list at the selected parameters for (n, s).
Instances For
gridPointWords produces the list of encoded tuples of ExecutableGenerator.output.
outputWord agrees with encodeOutput (ExecutableGenerator.output n N e H).
hittingListWord n s agrees with encodeOutput (hittingList n s) for all n, s : ℕ.
Unary input format and standalone generator #
Unary input word true ^ n ++ [false] ++ true ^ s representing the parameter pair (n, s).
Instances For
The first false bit of inputWord n s occurs at index n.
parseInput recovers (n, s) on inputWord n s whenever 1 ≤ n and 1 ≤ s.
On a valid unary input inputWord n s with 1 ≤ n and 1 ≤ s, hittingGenerator emits
encodeOutput (hittingList n s).
On any word where parseInput w = none, hittingGenerator w = [].
Polynomial-time certificates #
Enumerating the encoded tuples across the {1, …, H}³ grid is polynomial-time.
Computing the complete output encoding outputWord is polynomial-time.
Computing hittingListWord from unary (n, s) is polynomial-time.
The encoded rational hitting list (n, s) ↦ encodeOutput (hittingList p.1 p.2) is computable
in polynomial time from unary (n, s).
Compositional polynomial-time certificate for encodeOutput (hittingList (n x) (s x)).
Constructing the unary input word inputWord is polynomial-time.
Parsing a unary input word with parseInput is polynomial-time.
Compositional polynomial-time certificate for parseInput.
The standalone rational hitting-list generator hittingGenerator is computable in
polynomial time on a multi-tape Turing machine.
End-to-end specification of the polynomial-time rational hitting-list generator:
hittingGenerator is computable in polynomial time on a multi-tape Turing machine, and on
every unary input inputWord n s with 1 ≤ n and 1 ≤ s it emits the canonical binary encoding
of hittingList n s, which has dimension at most 256 * (n + s + 1) ^ 10, encoding length at
most outputConstant * (n + s + 1) ^ 104, and hits every admissible nonzero formula in n
variables with at most s nodes.