def le_add_cancel
import bend-collections-laws-math@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 (8)
- bend-collections-laws-math@1.0.0.0/proofs/math/natural/arith:le_div_g
- bend-collections-laws-math@1.0.0.0/proofs/math/natural/roots:lo_lt_mid
- bend-collections-laws-math@1.0.0.0/proofs/math/natural/roots:mid_lt_hi
- bend-collections-laws-math@1.0.0.0/proofs/math/natural/sqrtn:stop_sq
- bend-collections-laws-math@1.0.0.0/proofs/math/random/lemire:lt_ceil
- …