Imports
General decision-TSP is in NP
namespace CLRS.Chapter34The honest serialized decision-TSP language has a fixed polynomial-time verifier and quadratically bounded unary ordered-tour certificates.
theorem generalTSP_polyTimeVerifiable :
PolyTimeVerifiable GeneralTSP := by
refine ⟨fun certificate input =>
Turing.TSPVerifier.Final.concreteTSPVerifier (certificate, input),
(Polynomial.X + 1) ^ 2, ?_, ?_⟩
· exact ⟨Turing.TSPVerifier.Final.computableInPolyTime⟩
· intro input
simpa [Polynomial.eval_add, Polynomial.eval_pow, Polynomial.eval_X] using
mem_generalTSP_iff_exists_bounded_unary_certificate inputTextbook decision-TSP belongs to NP.
theorem TSP_mem_ClassNP : TSP ∈ ClassNP TSPSym :=
(mem_ClassNP TSP).2 generalTSP_polyTimeVerifiableend CLRS.Chapter34