let eq i j =
Dom.eq i.dom j.dom &&
(match i.lo, j.lo with
| None, None -> true
| Some(alpha, q), Some(beta, p) -> alpha = beta && Q.equal q p
| _ -> false) &&
(match i.hi, j.hi with
| None, None -> true
| Some(q, alpha), Some(p, beta) -> alpha = beta && Q.equal q p
| _ -> false)