let mem q = function
  | Real -> true
  | Int -> Mpa.Q.is_integer q
  | Nonint -> not(Mpa.Q.is_integer q)