law word_add_exact_sym

bend-mathlib@0.8.1.0 · u32.bend:1039

import bend-mathlib@0.8.1.0/u32.bend as U32
import Base
import bend-mathlib@0.8.1.0/nat.bend as MNat

1039# Word addition is exact without overflow: a + b < 2^n implies to_nat (add a b) = a + b, reversed to rewrite toward the simple side.
1040law word_add_exact_sym:
1041  for n: Nat
1042  for a: Word(n)
1043  for b: Word(n)
1044  for h: MNat.lt(Nat.add(Word.to_nat(n, a), Word.to_nat(n, b)), Nat.pow(2n, n))
1045  {Nat.add(Word.to_nat(n, a), Word.to_nat(n, b)) == Word.to_nat(n, Word.add(n, a, b)) : Nat}

Uses (9)

Used by (0)

No other definition uses this definition.