def le_add_cancel
import bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/arith.bend as Arithimport Base
62# d + x <= d + y is x <= y
63def le_add_cancel(+d: Nat, +x: Nat, +y: Nat) -> {Nat.is_le(Nat.add(d, x), Nat.add(d, y)) == Nat.is_le(x, y) : Bool}:
64 match d:
65 case 0n:
66 {==}
67 case 1n+ +dp:
68 le_add_cancel(dp, x, y)
Uses (4)
Used by (10)
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/reduce:lt_cancel_r
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/curve25519/freeze:p38
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/fieldops:le_cancel_r
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/rconst:le_cancel_l
- bend-collections-laws-crypto@1.0.0.0/proofs/crypto/secp256k1/scalarops:le_cancel_r
- …