move some things from toIntLang4Proof to misc