def mulmod_value

bend-collections-laws-math@1.0.0.0 · proofs/math/typed/w64mmtop.bend:72

import bend-collections-laws-math@1.0.0.0/proofs/math/typed/w64mmtop.bend as W64mmtop
import Base
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

72def mulmod_value(+a: WU.U64, +b: WU.U64, +m: WU.U64, +ha: {Nat.is_lt(SW.value(a), SW.value(m)) == True{} : Bool}, +hb: {Nat.is_lt(SW.value(b), SW.value(m)) == True{} : Bool}) -> SW.MulMod.value(a, b, m, ha, hb):
73  match a b m:
74    case WU.U64{+al, +ah} WU.U64{+bl, +bh} WU.U64{+ml, +mh}:
75      mm_c(al, ah, bl, bh, ml, mh, ha, hb, U32.is_zero(mh), {==})

Uses (7)

Used by (1)