let inter d1 d2 =
  match d1, d2 with
    | RealReal -> Real
    | Int, _ -> Int
    | _, Int -> Int