let rec sub i j =
let dom = Dom.union i.dom j.dom
and lo =
match i.lo, j.hi with (* [i.lo - j.hi] *)
| None, _ -> None
| _, None -> None
| Some(alpha, q), Some(p, beta) -> Some(alpha && beta, Q.sub q p)
and hi =
match i.hi, j.lo with (* [i.hi - j.lo] *)
| None, _ -> None
| _, None -> None
| Some(q, gamma), Some(delta, p) -> Some(Q.sub q p, gamma && delta)
in
make (dom, lo, hi)