AxisAlgebra.lists_3210: def of bendtorch-core@0.1.0.0
Import: import bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend as AxisAlgebra
Lines 2057-2070 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=2057&end_line=2070
import Base
def lists_3210(-A: Data, +items: List<&2, A>, length: {List.length(&2, A, items) == 4n : Nat}) -> ListFacts:
match items:
case Nil{}:
Empty.absurd(ListFacts, nat_clash(0n, 4n, length, {==}))
case +x0 <> Nil{}:
Empty.absurd(ListFacts Nil{}>, nat_clash(1n, 4n, length, {==}))
case +x0 <> +x1 <> Nil{}:
Empty.absurd(ListFacts x1 <> Nil{}>, nat_clash(2n, 4n, length, {==}))
case +x0 <> +x1 <> +x2 <> Nil{}:
Empty.absurd(ListFacts x1 <> x2 <> Nil{}>, nat_clash(3n, 4n, length, {==}))
case +x0 <> +x1 <> +x2 <> +x3 <> Nil{}:
Lists{{==}, {==}, {==}, {==}, {==}, {==}}
case +x0 <> +x1 <> +x2 <> +x3 <> +x4 <> +tail:
Empty.absurd(ListFacts x1 <> x2 <> x3 <> x4 <> tail>, nat_clash(5n+List.length(&2, A, tail), 4n, length, {==}))
Uses (6):
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty.absurd
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List.length
https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat
https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend&name=ListFacts
https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend&name=nat_clash