def rp62_g

bend-collections-laws-math@1.0.0.0 · proofs/math/typed/f64mulp.bend:70

import bend-collections-laws-math@1.0.0.0/proofs/math/typed/f64mulp.bend as F64mulp
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/f64.bend as SF
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/f64.bend as F
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/word.bend as WD

70def rp62_g(+one: Nat, +h1: {one == 1n : Nat}, +s: Bool, +e: Nat, +sig: WU.U64, +x: Nat, +hx: {Nat.add(x, 2180n) == e : Nat}, +hx1: {Nat.is_le(1n, x) == True{} : Bool}, +h61: {C.fits(61n, SW.value(sig)) == False{} : Bool}, +h63: {C.fits(63n, SW.value(sig)) == True{} : Bool}, +c: U32, +hc: {c == U32{WD.pw(32n, 30n)} : U32}) -> {F.rp62_pick(s, e, sig, X.lt(sig, WU.U64{0, c})) == SF.round(s, SW.value(sig), x) : F.F64}:
71  +el = lt62(one, h1, sig, c, hc)
72  Equal.trans(F.F64, F.rp62_pick(s, e, sig, X.lt(sig, WU.U64{0, c})), F.rp62_pick(s, e, sig, C.fits(62n, SW.value(sig))), SF.round(s, SW.value(sig), x), Equal.cong(Bool, F.F64, t => F.rp62_pick(s, e, sig, t), X.lt(sig, WU.U64{0, c}), C.fits(62n, SW.value(sig)), el), rp62_c(s, e, sig, x, hx, hx1, h61, h63, C.fits(62n, SW.value(sig)), {==}))

Uses (17)

Used by (1)