law wit_array_bsearch

bend-osdev-algo@0.1.0.0 · LAWS.bend:386

import bend-osdev-algo@0.1.0.0/LAWS.bend as LAWS
import Base
import bend-osdev-array@0.1.0.0/array.bend as AR
import bend-osdev-algo@0.1.0.0/bsearch.bend as S

386# the array [1, 3, 3, 7, 9, 0, 0, 0] (depth 3), searched in its first 5
387# slots: perfect, of depth below 32, 5 <= 2^3, and those slots sorted
388law wit_array_bsearch:
389  {(AR.Arrays.is_perfect(U32, 3n, Array.set(U32, Array.set(U32, Array.set(U32, Array.set(U32, Array.set(U32, [0 : U32*8n], 0, 1), 1, 3), 2, 3), 3, 7), 4, 9)), Nat.is_lt(3n, 32n), Nat.is_le(U32.to_nat(5), AR.Arrays.slots(3n)), S.bsearch.sorted(List.take(&2, U32, AR.Arrays.leaves(U32, Array.set(U32, Array.set(U32, Array.set(U32, Array.set(U32, Array.set(U32, [0 : U32*8n], 0, 1), 1, 3), 2, 3), 3, 7), 4, 9)), U32.to_nat(5)))) == (True{}, True{}, True{}, True{}) : Bool & Bool & Bool & Bool}

Uses (14)

Used by (0)

No other definition uses this definition.