Refinement.swap_final: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/storage/refinement.bend as Refinement Lines 328-343 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=328&end_line=343 import Base import bendtorch-core@0.1.0.0/src/storage/size.bend as Size def swap_final(-T: Data, -d: Nat, -original: Array, -sized_array: Array, -n: U32, -i: U32, -new: T, measured: {(sized_array, n) == Array.size(T, original) : Array & U32}, +retained: {sized_array == original : Array}, +extent: {n == Size.capacity(d) : U32}, child: Swap) -> SwapFull: match child: case Swap{array, old, equal, written, observed, valid}: SwapFull{array, old, Equal.trans(Array & T, (array, old), Array.swap.at(T, i, new, (sized_array, n)), Array.swap(T, original, i, new), equal, Equal.cong(Array & U32, Array & T, r => Array.swap.at(T, i, new, r), (sized_array, n), Array.size(T, original), measured)), written_transport(T, d, sized_array, original, n, i, new, array, retained, extent, written), observed_transport(T, d, sized_array, original, n, i, old, retained, extent, observed), valid} Uses (18): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.size https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.swap https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Array.swap.at https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.cong https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.trans 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/refinement.bend&name=Swap https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/refinement.bend&name=SwapFull https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/refinement.bend&name=masked https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/refinement.bend&name=observed_transport https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/refinement.bend&name=written_transport https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/size.bend&name=capacity