Instances.u64_op: def of bend-collections-laws-math@1.0.0.0 Import: import bend-collections-laws-math@1.0.0.0/src/math/instances.bend as Instances Lines 92-124 of bend-collections-laws-math@1.0.0.0/src/math/instances.bend: https://jend.leeeet.dev/read.txt?path=bend-collections-laws-math@1.0.0.0/src/math/instances.bend&start_line=92&end_line=124 import Base import bend-collections-laws-math@1.0.0.0/src/math/num.bend as N import bend-collections-laws-math@1.0.0.0/src/math/u64.bend as W 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/natural.bend as M def u64_op(o: N.Op) -> W.U64: match o: case N.ZeroOp{}: W.U64{0, 0} case N.One{}: W.U64{1, 0} case N.Add{a, b}: X.add(a, b) case N.Sub{a, b}: X.sub(a, b) case N.Mul{a, b}: X.mul(a, b) case N.Neg{a}: X.sub(W.U64{0, 0}, a) case N.Abs{a}: a case N.Quot{a, b}: X.quot(a, b) case N.Rem{a, b}: X.rem(a, b) case N.Half{a}: X.half(a) case N.MulMod{a, b, m}: X.mulmod(a, b, m) case N.Pow2{k}: u64_pow2(k) case N.Sqrt{a}: X.isqrt(a) case N.PowMod{a, e, m}: X.mpow(a, e, m) case N.GcdSmall{a, b}: X.of48(M.gcd(X.n48(a), X.n48(b))) Uses (15): https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/instances.bend&name=u64_pow2 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/natural.bend&name=gcd https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/num.bend&name=Op 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 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/w64.bend&name=half https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/w64.bend&name=isqrt https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/w64.bend&name=mpow https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/w64.bend&name=mul https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/w64.bend&name=mulmod https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/w64.bend&name=n48 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/w64.bend&name=of48 https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/w64.bend&name=quot https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/w64.bend&name=rem https://jend.leeeet.dev/definition.txt?path=bend-collections-laws-math@1.0.0.0/src/math/w64.bend&name=sub