def lists_10

bendtorch-core@0.1.0.0 · src/tensor/axis_algebra.bend:411

import bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend as AxisAlgebra
import Base

411def lists_10(-A: Data, +items: List<&2, A>, length: {List.length(&2, A, items) == 2n : Nat}) -> ListFacts<A, 2n, [1n, 0n], items>:
412  match items:
413    case Nil{}:
414      Empty.absurd(ListFacts<A, 2n, [1n, 0n], Nil{}>, nat_clash(0n, 2n, length, {==}))
415    case +x0 <> Nil{}:
416      Empty.absurd(ListFacts<A, 2n, [1n, 0n], x0 <> Nil{}>, nat_clash(1n, 2n, length, {==}))
417    case +x0 <> +x1 <> Nil{}:
418      Lists{{==}, {==}, {==}, {==}, {==}, {==}}
419    case +x0 <> +x1 <> +x2 <> +tail:
420      Empty.absurd(ListFacts<A, 2n, [1n, 0n], x0 <> x1 <> x2 <> tail>, nat_clash(3n+List.length(&2, A, tail), 2n, length, {==}))

Uses (6)

Used by (1)