Imports
Fixed vertex-token extractor
noncomputable sectionnamespace CLRS.Chapter34.Turing.TSPReduction.VertexTokensopen PolyBuilderopen _root_.Turingprivate noncomputable def streamComputableInPolyTime :
TM2ComputableInPolyTime id id stream := by
change TM2ComputableInPolyTime id id
(fun input : List CliqueSym => input.flatMap body.emit)
exact boundedLoop_computableInPolyTime bodynoncomputable def computableInPolyTime :
TM2ComputableInPolyTime encodeCliqueCertificate id tokens := by
let raw := streamComputableInPolyTime
exact
{ tm := raw.tm
inputAlphabet := raw.inputAlphabet
outputAlphabet := raw.outputAlphabet
time := raw.time
outputsFun := fun vertices => by
have output := raw.outputsFun (encodeCliqueCertificate vertices)
simpa [stream_encodeCliqueCertificate] using output }end CLRS.Chapter34.Turing.TSPReduction.VertexTokens