Documentation

Complexity.Computability.Circuit.Rational.Runtime

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 #

Main results #

References #

Grid enumeration and complete output encoding #

List of encoded normalized tuples emitted across the {1, …, H}³ grid in lexicographic order.

Instances For

    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
          @[simp]

          The length of inputWord n s is n + s + 1.

          @[simp]

          The first false bit of inputWord n s occurs at index n.

          Parse a valid unary input word inputWord n s with 1 ≤ n and 1 ≤ s, returning none on malformed inputs.

          Instances For

            parseInput w = some (n, s) holds if and only if 1 ≤ n, 1 ≤ s, and w = inputWord n s.

            @[simp]
            theorem Cslib.Circuits.Rational.parseInput_inputWord {n s : ℕ} (hn : 1 ≤ n) (hs : 1 ≤ s) :

            parseInput recovers (n, s) on inputWord n s whenever 1 ≤ n and 1 ≤ s.

            parseInput w = none holds if and only if w is not of the form inputWord n s with 1 ≤ n and 1 ≤ s.

            The standalone rational hitting-list generator on bit words: parses a unary input word inputWord n s with 1 ≤ n and 1 ≤ s and emits encodeOutput (hittingList n s), or [] on malformed inputs.

            Instances For
              @[simp]

              On a valid unary input inputWord n s with 1 ≤ n and 1 ≤ s, hittingGenerator emits encodeOutput (hittingList n s).

              On any malformed input word not of the form inputWord n s with 1 ≤ n and 1 ≤ s, hittingGenerator w = [].

              Polynomial-time certificates #

              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)).

              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.