LAWS.shift_view: law of lawful-bytes@0.1.1.0 Import: import lawful-bytes@0.1.1.0/LAWS.bend as LAWS Lines 257-265 of lawful-bytes@0.1.1.0/LAWS.bend: https://jend.leeeet.dev/read.txt?path=lawful-bytes@0.1.1.0/LAWS.bend&start_line=257&end_line=265 import Base import lawful-bytes@0.1.1.0/defs.bend as D import lawful-bytes@0.1.1.0/bytes.bend as B # shift drops the first k bytes and moves the rest to the start (for reusing a # buffer when reading a stream in pieces). law shift_view: for b: D.Bytes for d: Nat for k: U32 for h: {D.ok(b, d) == True{} : Bool} for hk: {Nat.is_le(U32.to_nat(k), D.size(b)) == True{} : Bool} {D.view(B.shift(b, k)) == List.drop(&2, U32, D.view(b), U32.to_nat(k)) : List<&2, U32>} Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.drop https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/PROOF.bend&name=shift_view.go https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/bytes.bend&name=shift https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/defs.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/defs.bend&name=ok https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/defs.bend&name=size https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/defs.bend&name=view https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/proof_core.bend&name=bmirror