Defs.slot: def of lawful-arrays@0.1.0.0 Import: import lawful-arrays@0.1.0.0/defs.bend as Defs Lines 31-35 of lawful-arrays@0.1.0.0/defs.bend: https://jend.leeeet.dev/read.txt?path=lawful-arrays@0.1.0.0/defs.bend&start_line=31&end_line=35 import Base # The leaf an access at index i reaches in a perfect tree of depth d < 32: # i modulo 2^d. (From depth 32 up, Base's Array.size wraps to 0 and every # access reaches the last leaf; the laws exclude that.) def slot(i: U32, d: Nat) -> Nat: Nat.mod(U32.to_nat(i), Nat.pow(2n, d)) Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.mod https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.pow 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