law word_add_wrap_sym

bend-mathlib@0.8.1.0 · u32.bend:1050

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

1050# Word addition wraps modulo 2^n: to_nat (add a b) = (a + b) % 2^n, reversed to rewrite toward the simple side.
1051law word_add_wrap_sym:
1052  for n: Nat
1053  for a: Word(n)
1054  for b: Word(n)
1055  {Nat.mod(Nat.add(Word.to_nat(n, a), Word.to_nat(n, b)), Nat.pow(2n, n)) == Word.to_nat(n, Word.add(n, a, b)) : Nat}

Uses (9)

Used by (0)

No other definition uses this definition.