def mask_len

bend-osdev-hashes@0.1.0.0 · PROOF.bend:28

import bend-osdev-hashes@0.1.0.0/PROOF.bend as PROOF
import Base
import bend-osdev-bytes@0.1.0.0/bytes.bend as B

28# Lengths: an Octets made from a list has the list's length; the bytes of
29# a chaining value are a list of fixed shape whatever its words are
30def mask_len(xs: List<&2, U32>) -> {B.len(B.mask(xs)) == B.len(xs) : Nat}:
31  match xs:
32    case Nil{}:
33      {==}
34    case Con{h, t}:
35      %mask_len(t) : {B.len(B.mask(Con{h, t})) == 1n+_ : Nat}
36      {==}

Uses (5)

Used by (1)