let
overlap u v = (min u.hi v.hi) - (max u.lo v.lo) + 1