AxisAlgebra.permutation_rank: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend as AxisAlgebra Lines 3060-3065 of bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend&start_line=3060&end_line=3065 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 def permutation_rank(+shape: Shape.Shape, +axes: List<&2, U32>, accepted: {True{} == Layout.bijective(shape, axes) : Bool}) -> {Shape.rank_dimensions(Axis.order(U32, Shape.dimensions(shape), Shape.naturals(axes))) == Shape.rank_dimensions(Shape.dimensions(shape)) : Nat}: certificate = facts_lists(U32, Shape.rank_dimensions(Shape.dimensions(shape)), Shape.naturals(axes), Shape.dimensions(shape), word_length(Shape.dimensions(shape)), shape_facts(shape, axes, accepted)) Equal.trans(Nat, Shape.rank_dimensions(Axis.order(U32, Shape.dimensions(shape), Shape.naturals(axes))), List.length(&2, U32, Axis.order(U32, Shape.dimensions(shape), Shape.naturals(axes))), Shape.rank_dimensions(Shape.dimensions(shape)), Equal.sym(Nat, List.length(&2, U32, Axis.order(U32, Shape.dimensions(shape), Shape.naturals(axes))), Shape.rank_dimensions(Axis.order(U32, Shape.dimensions(shape), Shape.naturals(axes))), word_length(Axis.order(U32, Shape.dimensions(shape), Shape.naturals(axes)))), ranked(U32, Shape.rank_dimensions(Shape.dimensions(shape)), Shape.naturals(axes), Shape.dimensions(shape), certificate)) Uses (17): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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=List.length 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=naturals https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=rank_dimensions https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend&name=facts_lists https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend&name=ranked https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend&name=shape_facts https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend&name=word_length 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