def route_same

bendtorch-core@0.1.0.0 · src/storage/api.bend:259

import bendtorch-core@0.1.0.0/src/storage/api.bend as Api
import Base
import bendtorch-core@0.1.0.0/src/storage/model.bend as Model
import bendtorch-core@0.1.0.0/src/storage/refinement.bend as Refinement
import bendtorch-core@0.1.0.0/src/storage/main.bend as Storage
import bendtorch-core@0.1.0.0/src/storage/route.bend as Route

259def route_same(+d: Nat, +n: Nat, +i: U32, +j: U32, +fits: {Storage.bounds(d, n) == True{} : Bool},
260  +inside_i: {Nat.is_lt(U32.to_nat(i), n) == True{} : Bool}, +inside_j: {Nat.is_lt(U32.to_nat(j), n) == True{} : Bool}) ->
261  {Nat.is_eq(U32.to_nat(i), U32.to_nat(j)) == Model.same(d, Refinement.route(d, i), Refinement.route(d, j)) : Bool}:
262  %same_eq(d, Refinement.route(d, i), Refinement.route(d, j)) : {Nat.is_eq(U32.to_nat(i), U32.to_nat(j)) == _ : Bool}
263  %Route.route_offset(d, i, depth_of(d, n, fits), slot_of(d, n, i, fits, inside_i)) :
264    {Nat.is_eq(U32.to_nat(i), U32.to_nat(j)) == Nat.is_eq(_, Model.offset(d, Refinement.route(d, j))) : Bool}
265  %Route.route_offset(d, j, depth_of(d, n, fits), slot_of(d, n, j, fits, inside_j)) :
266    {Nat.is_eq(U32.to_nat(i), U32.to_nat(j)) == Nat.is_eq(U32.to_nat(i), _) : Bool}
267  {==}

Uses (14)

Used by (1)