def axis_right
bendtorch-core@0.1.0.0 · src/tensor/batched_matmul_PROOF.bend:605
import bendtorch-core@0.1.0.0/src/tensor/batched_matmul_PROOF.bend as BatchedMatmulPROOF
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/batched_matmul.bend as Batched
605def axis_right(+l: U32, +r: U32, +left_one: {False{} == Nat.is_eq(U32.to_nat(l), 1n) : Bool},
606 decision: Shape.BoolCase<Nat.is_eq(U32.to_nat(r), 1n)>) ->
607 AxisMeaning(l, r, Batched.stretched(l, r, False{}, False{}, Nat.is_eq(U32.to_nat(r), 1n))):
608 match decision:
609 case Shape.BTrue{equal}:
610 %equal : AxisMeaning(l, r, Batched.stretched(l, r, False{}, False{}, _))
611 %left_one : {U32.to_nat(l) == Bool.pick(Nat, _, U32.to_nat(r), U32.to_nat(l)) : Nat}
612 {==}
613 case Shape.BFalse{equal}:
614 %equal : AxisMeaning(l, r, Batched.stretched(l, r, False{}, False{}, _))
615 Unit{}