def permutation_complete
bendtorch-core@0.1.0.0 · src/tensor/axis_algebra.bend:3054
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
3054def permutation_complete(+shape: Shape.Shape, +axes: List<&2, U32>, accepted: {True{} == Layout.bijective(shape, axes) : Bool}) ->
3055 {Layout.reorder(Shape.dimensions(shape), axes) == Some{Axis.order(U32, Shape.dimensions(shape), Shape.naturals(axes))} : Maybe<&2, List<&2, U32>>}:
3056 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))
3057 Equal.trans(Maybe<&2, List<&2, U32>>, Layout.reorder(Shape.dimensions(shape), axes), Axis.gather(U32, Shape.dimensions(shape), Shape.naturals(axes)),
3058 Some{Axis.order(U32, Shape.dimensions(shape), Shape.naturals(axes))}, reorder(axes, Shape.dimensions(shape)), selected(U32, Shape.rank_dimensions(Shape.dimensions(shape)), Shape.naturals(axes), Shape.dimensions(shape), certificate))