def Int.min_neg1
import bend-kit-int@0.2.0.0/int.bend as Intimport Base
166# True for signed MIN and -1, the one quotient that overflows.
167def Int.min_neg1(+n: Nat, s: Bool, a: Word(n), b: Word(n)) -> Bool:
168 match s:
169 case True{}:
170 Bool.and(Int.is_eq(n, a, Int.min(n, True{})),
171 Int.is_eq(n, b, Int.ones(n)))
172 case False{}:
173 False{}