F64nrp.sdb: def of bend-collections-laws-math@1.0.0.0 Import: import bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64nrp.bend as F64nrp Lines 67-69 of bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64nrp.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64nrp.bend&start_line=67&end_line=69 import Base import bend-collections-laws-math@1.0.0.0/spec/lib/common.bend as C import bend-collections-laws-math@1.0.0.0/spec/math/w64.bend as SW import bend-collections-laws-math@1.0.0.0/src/math/w64.bend as X import bend-collections-laws-math@1.0.0.0/src/math/u64.bend as WU import bend-collections-laws-math@1.0.0.0/src/math/natural.bend as M import bend-collections-laws-math@1.0.0.0/proofs/lib/nat.bend as N import bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/proofs/nat_algebra.bend as NA import bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64bl.bend as BL def sdb(+sig: WU.U64, +h63: {C.fits(63n, SW.value(sig)) == True{} : Bool}) -> {Nat.add(Nat.sub(X.clz(sig), 1n), M.bit_length(SW.value(sig))) == 63n : Nat}: +hb = BL.bl_le(63n, SW.value(sig), h63, Nat.is_le(M.bit_length(SW.value(sig)), 63n), {==}) Equal.trans(Nat, Nat.add(Nat.sub(X.clz(sig), 1n), M.bit_length(SW.value(sig))), Nat.add(Nat.sub(63n, M.bit_length(SW.value(sig))), M.bit_length(SW.value(sig))), 63n, Equal.cong(Nat, Nat, z => Nat.add(z, M.bit_length(SW.value(sig))), Nat.sub(X.clz(sig), 1n), Nat.sub(63n, M.bit_length(SW.value(sig))), esd(sig, h63)), Equal.trans(Nat, Nat.add(Nat.sub(63n, M.bit_length(SW.value(sig))), M.bit_length(SW.value(sig))), Nat.add(M.bit_length(SW.value(sig)), Nat.sub(63n, M.bit_length(SW.value(sig)))), 63n, NA.add_comm(Nat.sub(63n, M.bit_length(SW.value(sig))), M.bit_length(SW.value(sig))), N.sub_add(63n, M.bit_length(SW.value(sig)), hb))) Uses (16): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.cong https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.trans 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.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/proofs/nat_algebra.bend&name=add_comm https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/lib/nat.bend&name=sub_add https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64bl.bend&name=bl_le https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64nrp.bend&name=esd https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/spec/lib/common.bend&name=fits https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/spec/math/w64.bend&name=value https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/natural.bend&name=bit_length https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/u64.bend&name=U64 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/w64.bend&name=clz