Refinement.swap_high: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/storage/refinement.bend as Refinement Lines 142-157 of bendtorch-core@0.1.0.0/src/storage/refinement.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/storage/refinement.bend&start_line=142&end_line=157 import Base import bendtorch-core@0.1.0.0/src/storage/model.bend as Model import bendtorch-core@0.1.0.0/src/storage/array.bend as Core def swap_high(-T: Data, -p: Nat, -original: Array, -n: U32, -i: U32, -new: T, xs: Array, child: Swap, ex: Model.Balanced(T, p, xs)) -> Swap: match child: case Swap{ys, old, equal, written, observed, ey}: Swap{ANode{xs, ys}, old, Equal.cong(Array & T, Array & T, r => Array.swap.hi(T, xs, r), (ys, old), Array.swap.go(T, original, U32.shr(n), U32.sub(i, U32.shr(n)), new, U32.is_lt(U32.sub(i, U32.shr(n)), U32.shr(U32.shr(n)))), equal), Equal.cong(Array, Array, y => ANode{xs, y}, ys, Core.write_path(T, p, original, trace(p, U32.shr(n), U32.sub(i, U32.shr(n)), U32.is_lt(U32.sub(i, U32.shr(n)), U32.shr(U32.shr(n)))), new), written), observed, (ex, ey)} Uses (16): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.swap.go https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.swap.hi https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.cong https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_lt https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shr https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.sub https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/array.bend&name=write_path https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/model.bend&name=Balanced https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/refinement.bend&name=Swap https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/refinement.bend&name=trace