def Add.modular
import bend-collections-laws-math@1.0.0.0/spec/math/u64.bend as U64import Base
import bend-collections-laws-math@1.0.0.0/spec/lib/numeric.bend as N
import bend-collections-laws-math@1.0.0.0/src/math/u64.bend as U
41# addition modulo 2^64
42def Add.modular(+a: U.U64, +b: U.U64) -> Type:
43 {bits(U.add(a, b)) == N.from_nat(64n, Nat.add(N.unsigned(64n, bits(a)), N.unsigned(64n, bits(b)))) : Word(64n)}