def axis_kept

bendtorch-core@0.1.0.0 · src/autograd/reduce_fiber_proof.bend:368

import bendtorch-core@0.1.0.0/src/autograd/reduce_fiber_proof.bend as ReduceFiberProof
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/storage/arith.bend as Arith

368def axis_kept(+j: Nat, +rh: Nat, +oh: Nat, axis: Shape.Axis<2n+j, rh, oh>) -> {oh == 2n+j : Nat}:
369  match axis:
370    case Shape.AxisEqual{left_eq, right_eq}:
371      left_eq
372    case Shape.AxisLeftOne{one, right_eq}:
373      Empty.absurd({oh == 2n+j : Nat}, Arith.clash(Equal.cong(Nat, Bool, n => Nat.is_eq(n, 1n), 2n+j, 1n, Equal.sym(Nat, 1n, 2n+j, one))))
374    case Shape.AxisRightOne{left_eq, one}:
375      left_eq

Uses (8)

Used by (2)