ProofCore.unpack_set: law of lawful-bytes@0.1.1.0 Import: import lawful-bytes@0.1.1.0/proof_core.bend as ProofCore Lines 394-404 of lawful-bytes@0.1.1.0/proof_core.bend: https://jend.leeeet.dev/read.txt?path=lawful-bytes@0.1.1.0/proof_core.bend&start_line=394&end_line=404 import Base import lawful-bytes@0.1.1.0/defs.bend as D import lawful-words@0.1.0.0/defs.bend as W # Byte 4q + r of the word list after word q is written with its byte r set. law unpack_set: for +ws: List<&2, U32> for +q: Nat for +r: Nat for +w: U32 for +v: U32 for +hr: {Nat.is_lt(r, 4n) == True{} : Bool} for +hv: {U32.is_lt(v, 256) == True{} : Bool} for +hw: {List.get(&2, U32, ws, q) == Some{w} : Maybe<&2, U32>} {D.unpack(List.set(&2, U32, ws, q, W.put_byte(w, r, v))) == List.set(&2, U32, D.unpack(ws), Nat.add(Nat.mul(q, 4n), r), v) : List<&2, U32>} Uses (20): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.cong https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.append https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.get https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.set https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mul https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt https://jend.leeeet.dev/definition.txt?path=lawful-arrays@0.1.0.0/proof_base.bend&name=set_append_l https://jend.leeeet.dev/definition.txt?path=lawful-arrays@0.1.0.0/proof_index.bend&name=unsome https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/defs.bend&name=unpack https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/proof_core.bend&name=L4 https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/proof_core.bend&name=wbp https://jend.leeeet.dev/definition.txt?path=lawful-words@0.1.0.0/defs.bend&name=put_byte