def product_0
bendtorch-core@0.1.0.0 · src/tensor/axis_algebra.bend:346
import bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend as AxisAlgebra
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/axis_spec.bend as Axis
346def product_0(+dims: List<&2, Nat>, length: {List.length(&2, Nat, dims) == 1n : Nat}) -> {Shape.numel(Axis.order(Nat, dims, [0n])) == Shape.numel(dims) : Nat}:
347 match dims:
348 case Nil{}:
349 Empty.absurd({Shape.numel(Axis.order(Nat, Nil{}, [0n])) == Shape.numel(Nil{}) : Nat}, nat_clash(0n, 1n, length, {==}))
350 case +x0 <> Nil{}:
351 {==}
352 case +x0 <> +x1 <> +tail:
353 Empty.absurd({Shape.numel(Axis.order(Nat, x0 <> x1 <> tail, [0n])) == Shape.numel(x0 <> x1 <> tail) : Nat}, nat_clash(2n+List.length(&2, Nat, tail), 1n, length, {==}))