def add_over
bend-collections-laws-math@1.0.0.0 · proofs/math/u64/u64.bend:197
import bend-collections-laws-math@1.0.0.0/proofs/math/u64/u64.bend as U64
import Base
import bend-collections-laws-math@1.0.0.0/src/math/u64.bend as U
import bend-collections-laws-math@1.0.0.0/proofs/lib/lemmas/spec/numeric.bend as S
197def add_over(a: U.U64, b: U.U64) -> Nat:
198 match a b:
199 case U.U64{+alo, +ahi} U.U64{+blo, +bhi}:
200 Nat.add(S.bit_value(carry32(ahi, bhi)), S.bit_value(carry32(U32.add(ahi, bhi), U.carry(U32.is_lt(U32.add(alo, blo), alo)))))