law u32_add_exact_sym
import bend-mathlib@0.8.1.0/u32.bend as U32import Base
import bend-mathlib@0.8.1.0/nat.bend as MNat
1163# U32 addition is exact without overflow: a + b < 2^32 implies to_nat (a + b) = a + b, reversed to rewrite toward the simple side.
1164law u32_add_exact_sym:
1165 for a: U32
1166 for b: U32
1167 for h: MNat.lt(Nat.add(U32.to_nat(a), U32.to_nat(b)), Nat.pow(2n, 32n))
1168 {Nat.add(U32.to_nat(a), U32.to_nat(b)) == U32.to_nat(U32.add(a, b)) : Nat}
Uses (9)
Used by (0)
No other definition uses this definition.