def Sign.agrees

bend-collections-laws-math@1.0.0.0 · spec/math/generic.bend:200

import bend-collections-laws-math@1.0.0.0/spec/math/generic.bend as Generic
import Base
import bend-collections-laws-math@1.0.0.0/src/math/num.bend as N
import bend-collections-laws-math@1.0.0.0/src/math/generic.bend as G

200# unsigned: 1 above zero, else 0
201def Sign.agrees(~T: Data, ~op: N.Op<T> -> T, ~test: N.Test<T> -> Bool, ~val: T -> Nat, ~of: Nat -> T, +x: T) -> Type:
202  {G.sign(~T, ~op, ~test, x) == of(Nat.min(val(x), 1n)) : T}

Uses (6)

Used by (5)