def below_app

bend-collections-laws-crypto@1.0.0.0 · proofs/crypto/random/bytes.bend:172

import bend-collections-laws-crypto@1.0.0.0/proofs/crypto/random/bytes.bend as Bytes
import Base
import bend-collections-laws-crypto@1.0.0.0/spec/crypto/random.bend as SCR
import bend-collections-laws-crypto@1.0.0.0/proofs/lib/logic.bend as L

172def below_app(+xs: List<&2, U32>, +ys: List<&2, U32>, +hx: {SCR.below256(xs) == True{} : Bool}, +hy: {SCR.below256(ys) == True{} : Bool}) -> {SCR.below256(SCR.append(xs, ys)) == True{} : Bool}:
173  match xs:
174    case Nil{}:
175      hy
176    case Con{+x, +rest}:
177      %Equal.sym(Bool, U32.is_lt(x, 256), True{}, L.and_left(U32.is_lt(x, 256), SCR.below256(rest), hx)) : {Bool.and(_, SCR.below256(SCR.append(rest, ys))) == True{} : Bool}
178      below_app(rest, ys, L.and_right(U32.is_lt(x, 256), SCR.below256(rest), hx), hy)

Uses (10)

Used by (2)