def sign_below
import bend-collections-laws-math@1.0.0.0/src/math/generic.bend as Genericimport Base
import bend-collections-laws-math@1.0.0.0/src/math/num.bend as N
100def sign_below(~T: Data, ~op: N.Op<T> -> T, ~test: N.Test<T> -> Bool, +x: T, below: Bool) -> T:
101 match below:
102 case True{}:
103 op(N.Neg{op(N.One{})})
104 case False{}:
105 x
Uses (3)
Used by (5)
- bend-collections-laws-math@1.0.0.0/src/math/generic:sign_above
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/float:sign_b
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/u32:sign_c
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/u32int:sign_b
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/u64int:sign_b