let cmp d1 d2 = 
  match d1, d2 with
    | IntInt -> Binrel.Same
    | IntReal -> Binrel.Sub
    | RealInt -> Binrel.Super
    | RealReal -> Binrel.Same