def m128

bend-collections-laws-math@1.0.0.0 · proofs/math/random/pcg/impl.bend:65

import bend-collections-laws-math@1.0.0.0/proofs/math/random/pcg/impl.bend as Impl
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/u64.bend as WU
import bend-collections-laws-math@1.0.0.0/src/math/w64.bend as X
import bend-collections-laws-math@1.0.0.0/proofs/math/typed/w64m128.bend as M128

65def m128(+a: WU.U64, +b: WU.U64) -> {Nat.add(SW.value(X.pfst(X.mul128(a, b))), C.shift(64n, SW.value(X.psnd(X.mul128(a, b))))) == Nat.mul(SW.value(a), SW.value(b)) : Nat}:
66  match a b:
67    case WU.U64{+al, +ah} WU.U64{+bl, +bh}:
68      M128.m128_value(al, ah, bl, bh)

Uses (10)

Used by (1)