LAWS.truncate_ok: law of lawful-bytes@0.1.1.0 Import: import lawful-bytes@0.1.1.0/LAWS.bend as LAWS Lines 249-255 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=249&end_line=255 import Base import lawful-bytes@0.1.1.0/defs.bend as D import lawful-bytes@0.1.1.0/bytes.bend as B law truncate_ok: for b: D.Bytes for d: Nat for n: U32 for h: {D.ok(b, d) == True{} : Bool} for hn: {Nat.is_le(U32.to_nat(n), D.size(b)) == True{} : Bool} {D.ok(B.truncate(b, n), d) == True{} : Bool} Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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=truncate_ok.go https://jend.leeeet.dev/definition.txt?path=lawful-bytes@0.1.1.0/bytes.bend&name=truncate 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/proof_core.bend&name=bmirror