fact: Definition add_test_constraint_right (d:bool) (i j:ext_Z*ext_Z) : option (ext_Z*ext_Z) := let (bi, ui):=i in let (bj, uj):=j in (if d then let ujm1 := comp_add uj (cZ (-1)) in if ext_eq bi (cp_max bi uj) then None else Some (bi, cp_min ui ujm1) else let v := cp_max ui bj in if ext_eq bj v then if ext_eq ui v then Some(cp_max bi bj,ui) else None else Some (cp_max bi bj, ui)).
imports: ZArith List Lia