def byte_pack4.k
lawful-words@0.1.0.0 · proof_bytes.bend:1254
import lawful-words@0.1.0.0/proof_bytes.bend as ProofBytes
import Base
import lawful-words@0.1.0.0/defs.bend as D
1254def byte_pack4.k(+b0: U32, +b1: U32, +b2: U32, +b3: U32, +j: Nat,
1255 +h0: {Nat.is_lt(U32.to_nat(b0), Nat.pow(2n, 8n)) == True{} : Bool},
1256 +h1: {Nat.is_lt(U32.to_nat(b1), Nat.pow(2n, 8n)) == True{} : Bool},
1257 +h2: {Nat.is_lt(U32.to_nat(b2), Nat.pow(2n, 8n)) == True{} : Bool},
1258 +h3: {Nat.is_lt(U32.to_nat(b3), Nat.pow(2n, 8n)) == True{} : Bool},
1259 +hj: {Nat.is_lt(j, 4n) == True{} : Bool}, +k: Nat) ->
1260 {D.bit(D.byte(D.pack4(b0, b1, b2, b3), j), k) == D.bit(D.nth4(j, b0, b1, b2, b3), k) : Bool}:
1261 %Equal.sym(Bool, D.bit(D.byte(D.pack4(b0, b1, b2, b3), j), k), Bool.and(Nat.is_lt(k, 8n), D.bit(D.pack4(b0, b1, b2, b3), Nat.add(Nat.mul(8n, j), k))),
1262 bit_byte(D.pack4(b0, b1, b2, b3), j, k)) :
1263 {_ == D.bit(D.nth4(j, b0, b1, b2, b3), k) : Bool}
1264 byte_pack4.l(b0, b1, b2, b3, j, k, h0, h1, h2, h3, hj, Nat.is_lt(k, 8n), {==})