Bits.half_bound: def of bend-collections-laws-crypto@1.0.0.0 Import: import bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/bits.bend as Bits Lines 63-68 of bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/bits.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/bits.bend&start_line=63&end_line=68 import Base import bend-collections-laws-crypto@1.0.0.0/proofs/lib/nat.bend as N import bend-collections-laws-crypto@1.0.0.0/proofs/lib/lemmas/proofs/nat_algebra.bend as A # 2 h + r < 2 (1 + h) for r < 2 def half_bound(+np: Nat) -> {Nat.is_lt(1n+np, Nat.double(1n+Nat.div(1n+np, 2n))) == True{} : Bool}: +h = Nat.div(1n+np, 2n) %Equal.sym(Nat, 1n+np, Nat.add(Nat.double(h), Nat.mod(1n+np, 2n)), half_eq(1n+np)) : {Nat.is_lt(_, Nat.double(1n+h)) == True{} : Bool} %Equal.sym(Nat, Nat.add(2n, Nat.double(h)), Nat.add(Nat.double(h), 2n), A.add_comm(2n, Nat.double(h))) : {Nat.is_lt(Nat.add(Nat.double(h), Nat.mod(1n+np, 2n)), _) == True{} : Bool} N.lt_add_left(Nat.mod(1n+np, 2n), 2n, Nat.double(h), half_rem(1n+np)) Uses (12): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.div https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.double https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mod https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/lib/lemmas/proofs/nat_algebra.bend&name=add_comm https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/lib/nat.bend&name=lt_add_left https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/bits.bend&name=half_eq https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-crypto@1.0.0.0/proofs/math/natural/bits.bend&name=half_rem