encode/decode proof of pi_1(S^1)=Z