AxisAlgebra.facts_1: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend as AxisAlgebra Lines 2122-2132 of bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend&start_line=2122&end_line=2132 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 import bendtorch-core@0.1.0.0/src/tensor/axis_spec.bend as Axis def facts_1(+axes: List<&2, Nat>, accepted: {True{} == Axis.valid(1n, axes) : Bool}) -> Facts<1n, axes>: match axes: case Nil{}: Empty.absurd(Facts<1n, Nil{}>, Shape.clash(accepted)) case 0n <> Nil{}: Certified{{==}, {==}, {==}, A => items => length => lists_0(A, items, length), dims => length => product_0(dims, length), dims => coords => dl => cl => fit_0(dims, coords, dl, cl)} case (1n+p) <> Nil{}: Empty.absurd(Facts<1n, (1n+p) <> Nil{}>, Arith.lt_zero(p, Arith.and_left(Nat.is_lt(1n+p, 1n), Axis.bounded(Nil{}, 1n), Arith.and_left(Axis.bounded((1n+p) <> Nil{}, 1n), Axis.unique((1n+p) <> Nil{}), Equal.sym(Bool, True{}, Axis.valid(1n, (1n+p) <> Nil{}), accepted))))) case +a0 <> +a1 <> +tail: Empty.absurd(Facts<1n, a0 <> a1 <> tail>, Shape.clash(accepted)) 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=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_lt https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=clash https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/arith.bend&name=and_left https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/storage/arith.bend&name=lt_zero https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend&name=Facts https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend&name=fit_0 https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend&name=lists_0 https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend&name=product_0 https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_spec.bend&name=bounded https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_spec.bend&name=unique https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_spec.bend&name=valid