def route_offset
bendtorch-core@0.1.0.0 · src/storage/route.bend:343
import bendtorch-core@0.1.0.0/src/storage/route.bend as Route
import Base
import bendtorch-core@0.1.0.0/src/storage/model.bend as Model
import bendtorch-core@0.1.0.0/src/storage/size.bend as Size
import bendtorch-core@0.1.0.0/src/storage/refinement.bend as Refinement
343def route_offset(+d: Nat, +i: U32, +h: {Nat.is_le(d, 20n) == True{} : Bool},
344 +inside: {Nat.is_lt(U32.to_nat(i), Model.capacity(d)) == True{} : Bool}) ->
345 {U32.to_nat(i) == Model.offset(d, Refinement.route(d, i)) : Nat}:
346 %mask_u32(d, i, h, inside) : {U32.to_nat(i) == Model.offset(d, Refinement.trace(d, Size.capacity(d), _, U32.is_lt(_, U32.shr(Size.capacity(d))))) : Nat}
347 trace_offset(d, i, U32.is_lt(i, U32.shr(Size.capacity(d))), {==}, h, inside)