Polynomial-Time Encoding Invariance