Polynomial-time checker-to-CNF compilation
OpenPvsNP.checker_tableau_compilationFor every polynomial-time checker and witness exponent, construct polynomial-size, fixed-alphabet, well-formed tableaux with polynomial-time CNF output and acceptance exactly equivalent to existence of a bounded accepted certificate.
Status: Known mathematics / implementation obligation awaiting formal proof.
import Definitions.Def_PvsNPFrontier
namespace PvsNP
theorem checker_tableau_compilation (R : Str × Str → Bool) (k : ℕ)
(hR : PolyTimeChecker R) :
∃ spec : Str → TableauSpec,
PolyTimeComputable (fun w => encodeCNF (tableauCNF (spec w))) ∧
(∃ p : Polynomial ℕ, ∀ w, (spec w).steps + (spec w).interior ≤ p.eval w.length) ∧
(∃ a : ℕ, ∀ w, (spec w).symbols = a) ∧
(∀ w, MachineTableauSpec (spec w)) ∧
(∀ w, (∃ T, ValidTableau (spec w) T) ↔
∃ y : Str, y.length ≤ w.length ^ k ∧ R (w,y) = true) := by sorry
end PvsNPRead-back
What the Lean code literally says, in plain math · gpt-6-astra
For every checker , every , and the hypothesis , there exists a function , where consists of the six-field specifications described here, satisfying all five conditions: the map satisfies ; there exists such that ; there exists a single such that ; every satisfies the additional specification condition; and , existence of a total function satisfying the validity condition for is equivalent to . Here is the full tableau formula described here; the selected specification function, polynomials, and fixed symbol count may depend on and its hypothesis, while the two displayed global bounds apply to all words. This includes the empty word, with and for . Here , is the set of all finite Boolean lists, including the empty list, and is list length. Write for existence of such a machine and a polynomial that, for all , compute in at most steps from the list obtained by tagging every bit of with the left injection into , tagging every bit of with the right injection, and concatenating those two lists. Write for existence of such a machine and a polynomial that, for every , compute output list from input list in at most steps. Different existential computation witnesses may use different machines and polynomials. A machine in these assertions is a Mathlib TM2 stack machine with finitely many stack indices, instruction labels, and control states, a finite input-stack alphabet, designated input and output stacks, a program, and initial label and control state; its other stack alphabets need not be finite. Input and output alphabet bijections transport the specified encoded lists to the corresponding stack alphabets. Computation starts with only the input stack populated, and reaches a halted configuration with the specified output on the output stack, all other stacks empty, and the control state reset to its initial value. Time counts executions of whole TM2 statements, each of which may contain several stack operations. Here has , a list of lists of natural numbers, a list of natural numbers, and a list of lists of natural numbers, with no validity restrictions on these fields. Put , , and . The list is the zero-based th list of , or the empty list when that entry is missing. The additional specification condition is exactly , , , , every entry of every list in is below , every entry of is below , and every list in has length exactly six and every one of its entries is below . It imposes no nonemptiness condition on an individual list in , on , or on , and allows ; in that case and the accepting list must be empty. The full tableau formula is the concatenation, in order, of the cell, initial, boundary, accepting, and transition formulas described here. The cell formula consists, in increasing and then increasing , of the clause of all positive literals for , followed by every two-literal clause with , ordered first by and then by . The initial formula has, in increasing and then increasing , the negative unit clause exactly when . The boundary formula has, for each in order, the two positive unit clauses at and , in that order. The accepting formula is a list containing one clause; its literals are for every and with , ordered first by and then by . If no such exists, this is an empty clause rather than an empty formula. The transition formula ranges in increasing order over , , and lexicographically over all six-tuples absent from the list . For each such tuple it has the clause of the six negative literals at positions with symbol indices given by the corresponding entries of , in that order. If or , the transition formula is empty. Write for this Boolean-list encoding of a formula : for each literal , take followed by the little-endian canonical binary digits of (the digits of form the empty list), replace each bit by , and append ; concatenate these literal encodings within each clause and append ; then concatenate the clause encodings in formula order. In particular . A formula is a finite list of clauses, each clause a finite list of literals . Under an assignment , the literal is true exactly when , a clause is true exactly when some literal in it is true, and a formula is true exactly when every clause is true. Thus an empty clause is false and an empty formula is true. The validity condition for is the conjunction of: ; ; ; ; and . Values outside the rectangle are unrestricted; the last condition is vacuous for or , and a missing required or an empty makes the condition unsatisfiable. The supplied body is admitted with sorry; no proof of this assertion is supplied there.