def fle4

bend-collections-laws-math@1.0.0.0 · proofs/math/typed/fixbytes.bend:159

import bend-collections-laws-math@1.0.0.0/proofs/math/typed/fixbytes.bend as Fixbytes
import Base
import bend-collections-laws-math@1.0.0.0/spec/math/generic.bend as SG
import bend-collections-laws-math@1.0.0.0/spec/math/fixed.bend as SF
import bend-collections-laws-math@1.0.0.0/src/math/fixed.bend as F

159# the list cases: exactly four bytes, or None on both sides
160def fle4(+b0: U32, +b1: U32, +b2: U32, +b3: U32, t: List<&2, U32>) -> {SF.mval(~U32, ~SG.u32_val, F.u32_from_bytes_le(Con{b0, Con{b1, Con{b2, Con{b3, t}}}})) == SF.from_le(4n, SF.nats(Con{b0, Con{b1, Con{b2, Con{b3, t}}}})) : Maybe<&2, Nat>}:
161  match t:
162    case Nil{}:
163      from4_ok(b0, b1, b2, b3)
164    case Con{+b4, t5}:
165      {==}

Uses (10)

Used by (1)