law fold
bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/aead/subtle_eq.bend:25
import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/aead/subtle_eq.bend as SubtleEq
import Base
import bend-collections-laws-crypto@1.0.0.0/src/crypto/subtle.bend as Subtle
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/subtle.bend as SS
25law fold:
26 for +a: List<&2, U32>
27 for +b: List<&2, U32>
28 for +acc: U32
29 {Bool.and(Nat.is_eq(List.length(&2, U32, a), List.length(&2, U32, b)), U32.is_eq(Subtle.diff(a, b, acc), 0)) ==
30 Bool.and(U32.is_eq(acc, 0), SS.equal(a, b)) : Bool}