let is_realvar = function 
  | Var(x) -> 
      (match Var.dom_of x with
         | Some(d) -> Dom.eq d Dom.Real
         | _ -> false)
  | _ -> false