LAWS.get_view: law of lawful-arrays@0.1.0.0 Import: import lawful-arrays@0.1.0.0/LAWS.bend as LAWS Lines 58-66 of lawful-arrays@0.1.0.0/LAWS.bend: https://jend.leeeet.dev/read.txt?path=lawful-arrays@0.1.0.0/LAWS.bend&start_line=58&end_line=66 import Base import lawful-arrays@0.1.0.0/defs.bend as D # Array.get reads leaf i (modulo the size). law get_view: for -T: Data for a: Array for d: Nat for i: U32 for hf: {D.full(T, a, d) == True{} : Bool} for hd: {Nat.is_lt(d, 32n) == True{} : Bool} {Some{Pair.snd(Array, T, Array.get(T, a, i))} == List.get(&2, T, D.view(T, a), D.slot(i, d)) : Maybe<&2, T>} Uses (14): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.get https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.get 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.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair.snd https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=lawful-arrays@0.1.0.0/PROOF.bend&name=get_view.go https://jend.leeeet.dev/definition.txt?path=lawful-arrays@0.1.0.0/defs.bend&name=full https://jend.leeeet.dev/definition.txt?path=lawful-arrays@0.1.0.0/defs.bend&name=slot https://jend.leeeet.dev/definition.txt?path=lawful-arrays@0.1.0.0/defs.bend&name=view https://jend.leeeet.dev/definition.txt?path=lawful-arrays@0.1.0.0/proof_tree.bend&name=mirror