Imports
VERTEX-COVER verifier machine and runtime
The final verifier accepts precisely when the original raw graph is well formed and the supplied certificate is a clique in its normalized complement. The two Boolean branches share the original separator-encoded input and are combined by the generic fixed TM2 conjunction construction.
noncomputable sectionnamespace CLRS.Chapter34Concrete VERTEX-COVER verifier using the clique outside the cover as its certificate.
def vertexCoverCliqueVerifier
(certificate input : List VertexCoverSym) : Bool :=
Turing.VertexCover.ComplementMachine.RawWellFormed.rawWellFormedPass input &&
cliqueVerifier certificate
(Turing.VertexCover.ComplementMachine.Total.normalizedComplement input)namespace Turing.VertexCover.VerifierMachineopen _root_.TuringOne fixed polynomial-time TM2 computes the complete raw VERTEX-COVER verifier.
noncomputable def computableInPolyTime :
TM2ComputableInPolyTime rawEncoding TM2Comp.boolEncoding
(fun input => vertexCoverCliqueVerifier input.1 input.2) := by
let combined := Turing.TM2AndOr.andOrComputableInPolyTime
rawWellFormedComputableInPolyTime
complementCliqueCheckComputableInPolyTime
Bool.and
simpa [vertexCoverCliqueVerifier] using combinedend Turing.VertexCover.VerifierMachineend CLRS.Chapter34