def sign_above
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
107def sign_above(~T: Data, ~op: N.Op<T> -> T, ~test: N.Test<T> -> Bool, +x: T, above: Bool) -> T:
108 match above:
109 case True{}:
110 op(N.One{})
111 case False{}:
112 sign_below(~T, ~op, ~test, x, test(N.Lt{x, op(N.ZeroOp{})}))
Uses (4)
Used by (6)
- bend-collections-laws-math@1.0.0.0/src/math/generic:sign
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/float:sign_a
- 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_a
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/u64int:sign_a
- …