PermuteContract.transpose_failure: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/permute_contract.bend as PermuteContract Lines 117-125 of bendtorch-core@0.1.0.0/src/tensor/permute_contract.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/permute_contract.bend&start_line=117&end_line=125 import Base import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape import bendtorch-core@0.1.0.0/src/shape/nat_proofs.bend as Nats import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core import bendtorch-core@0.1.0.0/src/tensor/layout.bend as Layout import bendtorch-core@0.1.0.0/src/tensor/transpose_spec.bend as Transpose import bendtorch-core@0.1.0.0/src/tensor/transforms.bend as Transforms def transpose_failure(+input: Shape.Shape, -tensor: Core.Tensor, +a: U32, +b: U32, decision: Shape.BoolCase, outside: {Transpose.valid(input, a, b) == False{} : Bool}) -> {Transforms.transpose_decided(input, tensor, a, b, decision) == (tensor, Fail{Transforms.LayoutError{Layout.AxisOutOfBounds{}}}) : Core.Tensor & Result<&2, &1, Transforms.Error, Core.Dynamic>}: match decision: case Shape.BFalse{no}: {==} case Shape.BTrue{yes}: Empty.absurd({Transforms.transpose_decided(input, tensor, a, b, Shape.BTrue{yes}) == (tensor, Fail{Transforms.LayoutError{Layout.AxisOutOfBounds{}}}) : Core.Tensor & Result<&2, &1, Transforms.Error, Core.Dynamic>}, Nats.contradiction(Transpose.valid(input, a, b), yes, Equal.sym(Bool, Transpose.valid(input, a, b), False{}, outside))) 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=Empty.absurd https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma 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=BoolCase 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/nat_proofs.bend&name=contradiction https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=Dynamic https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/core.bend&name=Tensor https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/layout.bend&name=Error https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/transforms.bend&name=Error https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/transforms.bend&name=transpose_decided https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/transpose_spec.bend&name=valid