def Sign.agrees
import bend-collections-laws-math@1.0.0.0/spec/math/generic.bend as Genericimport 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)
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/examples:sign
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/examples:sign_zero
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/u32:sign_agrees
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/u32int:sign_agrees
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/u64int:sign_agrees