F64norm.hid: def of bend-collections-laws-math@1.0.0.0 Import: import bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64norm.bend as F64norm Lines 39-45 of bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64norm.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64norm.bend&start_line=39&end_line=45 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/proofs/lib/logic.bend as L import bend-collections-laws-math@1.0.0.0/proofs/lib/word.bend as WD import bend-collections-laws-math@1.0.0.0/proofs/math/typed/width.bend as WW import bend-collections-laws-math@1.0.0.0/proofs/math/typed/w64add.bend as WA import bend-collections-laws-math@1.0.0.0/proofs/math/typed/w64sh.bend as SH import bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64bits.bend as FB # the hidden bit: f + 2^52 for a fraction below 2^52 def hid(+one: Nat, +h1: {one == 1n : Nat}, +fa: WU.U64, +hF: {C.fits(52n, SW.value(fa)) == True{} : Bool}, +c: U32, +hc: {c == U32{WD.pw(32n, 20n)} : U32}) -> {SW.value(X.add(fa, WU.U64{0, c})) == Nat.add(SW.value(fa), C.shift(52n, one)) : Nat}: a1 = WA.add_value(fa, WU.U64{0, c}) +ec = Equal.trans(Nat, C.shift(32n, v(c)), C.shift(32n, C.shift(20n, one)), C.shift(52n, one), Equal.cong(Nat, Nat, z => C.shift(32n, z), v(c), C.shift(20n, one), FB.pwv(20n, {==}, one, h1, c, hc)), Equal.sym(Nat, C.shift(52n, one), C.shift(32n, C.shift(20n, one)), WW.shift_comp(32n, 20n, one))) +f53 = WW.limbs_fit(52n, 1n, SW.value(fa), one, hF, L.subst(Nat, z => {C.fits(1n, z) == True{} : Bool}, 1n, one, Equal.sym(Nat, one, 1n, h1), {==})) +f64 = SH.fits_mono(53n, 64n, Nat.add(SW.value(fa), C.shift(52n, one)), {==}, f53) Equal.trans(Nat, SW.value(X.add(fa, WU.U64{0, c})), C.low(64n, Nat.add(SW.value(fa), C.shift(32n, v(c)))), Nat.add(SW.value(fa), C.shift(52n, one)), a1, Equal.trans(Nat, C.low(64n, Nat.add(SW.value(fa), C.shift(32n, v(c)))), C.low(64n, Nat.add(SW.value(fa), C.shift(52n, one))), Nat.add(SW.value(fa), C.shift(52n, one)), Equal.cong(Nat, Nat, z => C.low(64n, Nat.add(SW.value(fa), z)), C.shift(32n, v(c)), C.shift(52n, one), ec), WW.low_fit(64n, Nat.add(SW.value(fa), C.shift(52n, one)), f64))) Uses (22): 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.sym 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=U32 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/lib/logic.bend&name=subst https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/lib/word.bend&name=pw https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64bits.bend&name=pwv https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64norm.bend&name=v https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/math/typed/w64add.bend&name=add_value https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/math/typed/w64sh.bend&name=fits_mono https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/math/typed/width.bend&name=limbs_fit https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/math/typed/width.bend&name=low_fit https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/proofs/math/typed/width.bend&name=shift_comp 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/lib/common.bend&name=low https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/spec/lib/common.bend&name=shift 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/u64.bend&name=U64 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/w64.bend&name=add