def permutation_rank

bendtorch-core@0.1.0.0 · src/tensor/axis_algebra.bend:3060

import bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend as AxisAlgebra
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

3060def permutation_rank(+shape: Shape.Shape, +axes: List<&2, U32>, accepted: {True{} == Layout.bijective(shape, axes) : Bool}) ->
3061  {Shape.rank_dimensions(Axis.order(U32, Shape.dimensions(shape), Shape.naturals(axes))) == Shape.rank_dimensions(Shape.dimensions(shape)) : Nat}:
3062  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))
3063  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))),
3064    Shape.rank_dimensions(Shape.dimensions(shape)), Equal.sym(Nat, List.length(&2, U32, Axis.order(U32, Shape.dimensions(shape), Shape.naturals(axes))),
3065      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)

Used by (4)