F64nrp.esd: 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 62-65 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=62&end_line=65 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/math/typed/w64clz.bend as CLZ import bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64round.bend as FR import bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64bl.bend as BL def esd(+sig: WU.U64, +h63: {C.fits(63n, SW.value(sig)) == True{} : Bool}) -> {Nat.sub(X.clz(sig), 1n) == Nat.sub(63n, M.bit_length(SW.value(sig))) : Nat}: +hb = BL.bl_le(63n, SW.value(sig), h63, Nat.is_le(M.bit_length(SW.value(sig)), 63n), {==}) ec = CLZ.clz_value(sig) Equal.trans(Nat, Nat.sub(X.clz(sig), 1n), Nat.sub(Nat.sub(64n, M.bit_length(SW.value(sig))), 1n), Nat.sub(63n, M.bit_length(SW.value(sig))), Equal.cong(Nat, Nat, z => Nat.sub(z, 1n), X.clz(sig), Nat.sub(64n, M.bit_length(SW.value(sig))), ec), Equal.trans(Nat, Nat.sub(Nat.sub(64n, M.bit_length(SW.value(sig))), 1n), Nat.sub(Nat.add(1n, Nat.sub(63n, M.bit_length(SW.value(sig)))), 1n), Nat.sub(63n, M.bit_length(SW.value(sig))), Equal.cong(Nat, Nat, z => Nat.sub(z, 1n), Nat.sub(64n, M.bit_length(SW.value(sig))), Nat.add(1n, Nat.sub(63n, M.bit_length(SW.value(sig)))), FR.sub_add_a(1n, 63n, M.bit_length(SW.value(sig)), hb)), N.add_sub_cancel(1n, Nat.sub(63n, M.bit_length(SW.value(sig)))))) 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/nat.bend&name=add_sub_cancel 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/f64round.bend&name=sub_add_a https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/math/typed/w64clz.bend&name=clz_value 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