PermutationMapping.reordered_elements_same: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/permutation_mapping.bend as PermutationMapping Lines 198-208 of bendtorch-core@0.1.0.0/src/tensor/permutation_mapping.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/permutation_mapping.bend&start_line=198&end_line=208 import Base import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape import bendtorch-core@0.1.0.0/src/tensor/layout.bend as Layout import bendtorch-core@0.1.0.0/src/tensor/axis_spec.bend as Axis import bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend as AxisAlgebra def reordered_elements_same(+input: Shape.Shape, +axes: List<&2, U32>, +output: Shape.Shape, +valid: {True{} == Layout.bijective(input, axes) : Bool}, preserved: {Shape.dimensions(output) == Axis.order(U32, Shape.dimensions(input), Shape.naturals(axes)) : List<&2, U32>}) -> {Shape.elements(input) == Shape.elements(output) : Nat}: element_counts_same(input, output, Equal.trans(Nat, Shape.logical_numel(Shape.dimensions(input)), Shape.logical_numel(Axis.order(U32, Shape.dimensions(input), Shape.naturals(axes))), Shape.logical_numel(Shape.dimensions(output)), Equal.sym(Nat, Shape.logical_numel(Axis.order(U32, Shape.dimensions(input), Shape.naturals(axes))), Shape.logical_numel(Shape.dimensions(input)), AxisAlgebra.permutation_product(input, axes, valid)), Equal.cong(List<&2, U32>, Nat, Shape.logical_numel, Axis.order(U32, Shape.dimensions(input), Shape.naturals(axes)), Shape.dimensions(output), Equal.sym(List<&2, U32>, Shape.dimensions(output), Axis.order(U32, Shape.dimensions(input), Shape.naturals(axes)), preserved)))) Uses (16): 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=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.trans https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=Shape https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=dimensions https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=elements https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=logical_numel https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=naturals https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend&name=permutation_product https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_spec.bend&name=order https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/layout.bend&name=bijective https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/permutation_mapping.bend&name=element_counts_same