Verified Q22 implementation in typechecker