def transpose_permutation
bendtorch-core@0.1.0.0 · src/tensor/transform_PROOF.bend:2375
import bendtorch-core@0.1.0.0/src/tensor/transform_PROOF.bend as TransformPROOF
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/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/transforms.bend as Transforms
import bendtorch-core@0.1.0.0/src/tensor/transpose_spec.bend as TransposeSpec
2375def transpose_permutation(+input: Shape.Shape, source: Core.Tensor<input>, +a: U32, +b: U32,
2376 +inside: {True{} == TransposeSpec.valid(input, a, b) : Bool}) ->
2377 {Transforms.transpose_copy(input, source, a, b) == Transforms.permute_copy(input, source, Layout.transpose_axes(Shape.dimensions(input), a, b, 0)) :
2378 Core.Tensor<input> & Result<&2, &1, Transforms.Error, Core.Dynamic>}:
2379 transpose_decided_permutation(input, a, b, Shape.bool_case(TransposeSpec.valid(input, a, b)), source, inside)