Documentation

CslibFrontier.Computability.Machines.Turing.MultiTape.Complexity.PolyTime.Lex

Lexicographic comparison of bit strings in polynomial time #

Mathlib's lexicographic order on List Bool (false < true, and a proper prefix comes first) is decidable in polynomial time on raw bit strings (encBits): find the first position where the strings differ, and compare there, or compare the lengths if there is none.

Main results #

Lexicographic comparison of bit strings is polynomial-time.