def add_exact

bend-collections-laws-crypto@1.0.0.0 · proofs/lib/word.bend:59

import bend-collections-laws-crypto@1.0.0.0/proofs/lib/word.bend as Word
import Base
import bend-collections-laws-crypto@1.0.0.0/proofs/lib/lemmas/proofs/addition_bounds.bend as AB

59# addition below 2^n is exact
60def add_exact(+n: Nat, +one: Nat, +h1: {one == 1n : Nat}, +a: Word(n), +b: Word(n), +h: {Nat.is_lt(Nat.add(uw(n, a), uw(n, b)), sc(n, one)) == True{} : Bool}) -> {uw(n, Word.add(n, a, b)) == Nat.add(uw(n, a), uw(n, b)) : Nat}:
61  AB.exact(n, a, b, lt1(n, one, h1, Nat.add(uw(n, a), uw(n, b)), h))

Uses (10)

Used by (2)