law fold

bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/subtle/proof.bend:28

import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/subtle/proof.bend as Proof
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 Spec

28law fold:
29  for +a: List<&2, U32>
30  for +b: List<&2, U32>
31  for +acc: U32
32  {Bool.and(Nat.is_eq(List.length(&2, U32, a), List.length(&2, U32, b)), U32.is_eq(Subtle.diff(a, b, acc), 0)) ==
33    Bool.and(U32.is_eq(acc, 0), Spec.equal(a, b)) : Bool}

Uses (16)

Used by (1)