SAT verifier correctness with bounded certificates
OpenPvsNP.satVerifier_correctA word belongs to SAT exactly when some certificate of length at most the word length is accepted by the explicit parser/evaluator verifier.
Status: Known mathematics / implementation obligation awaiting formal proof.
import Definitions.Def_PvsNPFrontier
namespace PvsNP
theorem satVerifier_correct (w : Str) :
w ∈ SAT ↔ ∃ y : Str, y.length ≤ w.length ∧ satVerifier (w,y) = true := by sorry
end PvsNPRead-back
What the Lean code literally says, in plain math · gpt-6-astra
For every Boolean word , membership is equivalent to the existence of a Boolean word with such that the verifier described here accepts . The existential certificate bound is non-strict and has no multiplicative or additive constant; the verifier itself separately demands exact equality of with the number of distinct variables of the parsed formula. The empty word is included in the assertion. Here , is the set of all finite Boolean lists, including the empty list, and is list length. The language consists of exactly those for which there are a formula and an assignment such that and every clause of is true under ; strings without such an encoding are excluded. 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 parser works as follows. Its outer recursion starts with fuel , returns the empty formula on an empty remainder even at fuel zero, and otherwise fails at fuel zero; with positive fuel it parses one clause from the current nonempty remainder using clause fuel equal to that remainder’s length plus one, then recurses on the returned suffix with outer fuel reduced by one. Clause parsing fails at fuel zero; with positive fuel it consumes as the end of an empty remaining clause, or parses one literal and recurses on its suffix with clause fuel reduced by one. Literal parsing requires an initial pair for the sign. On the remainder it starts data fuel : zero data fuel fails; with positive data fuel ends the digit sequence, while contributes digit and decreases fuel by one; all other cases fail. The collected digits are interpreted little-endian and accepted only if they equal the canonical binary digits of the resulting natural number. A parsed literal is that sign/index pair together with the suffix after its delimiter; any failed subparse makes the containing parse fail. Success of the outer parse requires consuming the complete input. The variable list is obtained by reading the indices of all literals in the flattened clause list in order and deleting duplicate occurrences while retaining the first occurrence of each index. The Boolean verifier on first applies this parser to , returning false on failure. For a parsed formula , it returns false unless ; if the lengths agree, it evaluates under the assignment that gives the th variable in the th bit of , and gives every unlisted index false. More generally this assignment is formed by zipping with , looking up an index in that truncated list of pairs, and using false when it is absent. The supplied body is admitted with sorry; no proof of this assertion is supplied there.