def permutation_rejects

bendtorch-core@0.1.0.0 · src/tensor/axis_PROOF.bend:34

import bendtorch-core@0.1.0.0/src/tensor/axis_PROOF.bend as AxisPROOF
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/layout.bend as Layout
import bendtorch-core@0.1.0.0/src/tensor/axis_LAWS.bend as Laws

34def permutation_rejects(+shape: Shape.Shape, +axes: List<&2, U32>, result: Result<&2, &2, Layout.Error, Layout.Plan<shape, axes>>, rejected: {False{} == Layout.bijective(shape, axes) : Bool}) ->
35  {Laws.axis_plan_succeeded(shape, axes, result) == False{} : Bool}:
36  match result:
37    case Fail{error}:
38      {==}
39    case Done{plan}:
40      Empty.absurd({True{} == False{} : Bool}, Nats.contradiction(Layout.bijective(shape, axes), plan_valid(shape, axes, plan), rejected))

Uses (12)

Used by (1)