Ladner's language in polynomial time and in NP #
The exponent function Cslib.Complexity.Ladner.H of Ladner's language is tidily computable in
polynomial time on unary numbers (Cslib.Complexity.Ladner.computableTidilyInPolyTime_H), and
Ladner's language is in NP (Cslib.Complexity.Ladner.SATH_mem_NP), with a verifier that reads
the padded formula and evaluates it under the assignment the certificate describes.
The table of the values H m, m < n, is built by iterating one step n times. The step
(Cslib.Complexity.Ladner.hstepB, equal to Cslib.Complexity.Ladner.Hstep) searches the first
log₂ (log₂ n) machine indices; for each, it runs the machine on each of the n words with
indices below n with the universal function, for at most n steps, and compares the answer with
membership in the padded language along the table. A word with index below n has length at most
log₂ n, so membership is decided by decoding the padded formula and trying the n words with
indices below n as certificates (Cslib.Complexity.Ladner.bruteSAT_iff). Every intermediate
value is polynomial in n, and the polynomial-time calculus certifies the composite.
The certificate rests on general tools: a total decoder for formulas
(Cslib.Complexity.cnfDecoder, built from Turing.MultiTapeTM.Decoder.nat and
Turing.MultiTapeTM.Decoder.bool), capped powers on unary numbers
(Cslib.Complexity.Ladner.computableTidilyInPolyTime_capPow), the universal function with its
number of steps in unary (Turing.MultiTapeTM.Universal.computableTidilyInPolyTime_universal), and
the words by index (Cslib.Complexity.Ladner.computableTidilyInPolyTime_word). Decoding machine
descriptions and coding their input bits use the shared polynomial-time rules in
Complexity.Computability.Machines.Turing.MultiTape.Universal.PolyTime.
Main definitions #
Cslib.Complexity.Ladner.capPow: powers capped at a bound.Cslib.Complexity.Ladner.padCheckAt,Cslib.Complexity.Ladner.padCheck: the formula padded in a word, if any.Cslib.Complexity.Ladner.bruteSAT: satisfiability by trying the words with small indices.Cslib.Complexity.Ladner.hstepB: the step of the exponent function as a search.Cslib.Complexity.Ladner.verifier: the verifier of Ladner's language.
Main results #
Cslib.Complexity.Ladner.computableTidilyInPolyTime_capPow: capped powers in unary.Cslib.Complexity.Ladner.mem_padSAT_iff: membership in a padded language throughpadCheck.Cslib.Complexity.Ladner.computableTidilyInPolyTime_padCheck:padCheckis polynomial-time for a polynomial-time exponent function.Cslib.Complexity.Ladner.hstepB_eq: the search computes the step.Cslib.Complexity.Ladner.computableTidilyInPolyTime_H:His polynomial-time.Cslib.Complexity.Ladner.SATH_mem_NP: Ladner's language is inNP.
References #
Decoding formulas #
The formula decoded from a word.
Instances For
Capped powers #
Words by index #
The word with a given index is polynomial-time in the index in unary.
Reading a padded formula #
The formula φ such that y is encCNF φ padded with (encCNF φ).length ^ h ones, if there
is one.
Instances For
The formula padded in y along the exponent function e, if any.
Instances For
Splitting a padded word is polynomial-time.
Reading the formula padded along a computed exponent function is polynomial-time. The exponent function may capture the input.
Satisfiability of short formulas #
Whether one of the words with indices below n is a satisfying certificate for φ.
Instances For
Short formulas are decided by trying the words with small indices: every certificate of
the length of the encoded formula has a smaller index than n.
The step of the exponent function #
The test of Cslib.Complexity.Ladner.Agrees along the table T, as a Boolean.
Instances For
The step of the exponent function as a search over machine indices and words.
Instances For
The run of an indexed machine, with the number of steps in unary, is polynomial-time.
The exponent function #
The tables of H are polynomial-time in their length, in unary.
H is polynomial-time on unary numbers.
Ladner's language is in NP #
Cslib.Complexity.Ladner.verifier verifies Ladner's language with certificates as long as the
word.
Ladner's language is in NP, with the verifier evaluating the padded formula.