def impl

bend-collections-laws-crypto@1.0.0.0 · proofs/math/typed/w64mul.bend:269

import bend-collections-laws-crypto@1.0.0.0/proofs/math/typed/w64mul.bend as W64mul
import Base
import bend-collections-laws-crypto@1.0.0.0/src/math/w64.bend as X
import bend-collections-laws-crypto@1.0.0.0/src/math/u64.bend as WU
import bend-collections-laws-crypto@1.0.0.0/proofs/math/typed/shrn.bend as SR

269def impl(+a: U32, +b: U32) -> {X.mul32(a, b) == mul32g(a, b, 65536, 65535) : WU.U64}:
270  %Equal.sym(U32, U32.shrn(a, 16n), U32.div(a, 65536), SR.shr16(a)) : {X.mul32_h(U32.and(a, 65535), _, U32.and(b, 65535), U32.shrn(b, 16n)) == mul32g(a, b, 65536, 65535) : WU.U64}
271  %Equal.sym(U32, U32.shrn(b, 16n), U32.div(b, 65536), SR.shr16(b)) : {X.mul32_h(U32.and(a, 65535), U32.div(a, 65536), U32.and(b, 65535), _) == mul32g(a, b, 65536, 65535) : WU.U64}
272  h_eq(U32.and(a, 65535), U32.div(a, 65536), U32.and(b, 65535), U32.div(b, 65536))

Uses (11)

Used by (1)