Refinement.swap_low: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/storage/refinement.bend as Refinement Lines 127-140 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=127&end_line=140 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_low(-T: Data, -p: Nat, -original: Array, -n: U32, -i: U32, -new: T, ys: Array, child: Swap, ey: Model.Balanced(T, p, ys)) -> Swap: match child: case Swap{xs, old, equal, written, observed, ex}: Swap{ANode{xs, ys}, old, Equal.cong(Array & T, Array & T, r => Array.swap.lo(T, ys, r), (xs, old), Array.swap.go(T, original, U32.shr(n), i, new, U32.is_lt(i, U32.shr(U32.shr(n)))), equal), Equal.cong(Array, Array, x => ANode{x, ys}, xs, Core.write_path(T, p, original, trace(p, U32.shr(n), i, U32.is_lt(i, U32.shr(U32.shr(n)))), new), written), observed, (ex, ey)} Uses (15): 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.lo 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=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