def fit_102
bendtorch-core@0.1.0.0 · src/tensor/axis_algebra.bend:576
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
576def fit_102(+dims: List<&2, Nat>, +coords: List<&2, Nat>, dl: {List.length(&2, Nat, dims) == 3n : Nat}, cl: {List.length(&2, Nat, coords) == 3n : Nat}) -> {Shape.fit(Axis.order(Nat, dims, [1n, 0n, 2n]), Axis.order(Nat, coords, [1n, 0n, 2n])) == Shape.fit(dims, coords) : Bool}:
577 match dims:
578 case Nil{}:
579 Empty.absurd({Shape.fit(Axis.order(Nat, Nil{}, [1n, 0n, 2n]), Axis.order(Nat, coords, [1n, 0n, 2n])) == Shape.fit(Nil{}, coords) : Bool}, nat_clash(0n, 3n, dl, {==}))
580 case +d0 <> Nil{}:
581 Empty.absurd({Shape.fit(Axis.order(Nat, d0 <> Nil{}, [1n, 0n, 2n]), Axis.order(Nat, coords, [1n, 0n, 2n])) == Shape.fit(d0 <> Nil{}, coords) : Bool}, nat_clash(1n, 3n, dl, {==}))
582 case +d0 <> +d1 <> Nil{}:
583 Empty.absurd({Shape.fit(Axis.order(Nat, d0 <> d1 <> Nil{}, [1n, 0n, 2n]), Axis.order(Nat, coords, [1n, 0n, 2n])) == Shape.fit(d0 <> d1 <> Nil{}, coords) : Bool}, nat_clash(2n, 3n, dl, {==}))
584 case +d0 <> +d1 <> +d2 <> Nil{}:
585 match coords:
586 case Nil{}:
587 Empty.absurd({Shape.fit(Axis.order(Nat, d0 <> d1 <> d2 <> Nil{}, [1n, 0n, 2n]), Axis.order(Nat, Nil{}, [1n, 0n, 2n])) == Shape.fit(d0 <> d1 <> d2 <> Nil{}, Nil{}) : Bool}, nat_clash(0n, 3n, cl, {==}))
588 case +c0 <> Nil{}:
589 Empty.absurd({Shape.fit(Axis.order(Nat, d0 <> d1 <> d2 <> Nil{}, [1n, 0n, 2n]), Axis.order(Nat, c0 <> Nil{}, [1n, 0n, 2n])) == Shape.fit(d0 <> d1 <> d2 <> Nil{}, c0 <> Nil{}) : Bool}, nat_clash(1n, 3n, cl, {==}))
590 case +c0 <> +c1 <> Nil{}:
591 Empty.absurd({Shape.fit(Axis.order(Nat, d0 <> d1 <> d2 <> Nil{}, [1n, 0n, 2n]), Axis.order(Nat, c0 <> c1 <> Nil{}, [1n, 0n, 2n])) == Shape.fit(d0 <> d1 <> d2 <> Nil{}, c0 <> c1 <> Nil{}) : Bool}, nat_clash(2n, 3n, cl, {==}))
592 case +c0 <> +c1 <> +c2 <> Nil{}:
593 Equal.trans(Bool, Bool.and(Nat.is_lt(c1, d1), Bool.and(Nat.is_lt(c0, d0), Bool.and(Nat.is_lt(c2, d2), True{}))), Bool.and(Nat.is_lt(c0, d0), Bool.and(Nat.is_lt(c1, d1), Bool.and(Nat.is_lt(c2, d2), True{}))), Bool.and(Nat.is_lt(c0, d0), Bool.and(Nat.is_lt(c1, d1), Bool.and(Nat.is_lt(c2, d2), True{}))), and_swap(Nat.is_lt(c1, d1), Nat.is_lt(c0, d0), Bool.and(Nat.is_lt(c2, d2), True{})), {==})
594 case +c0 <> +c1 <> +c2 <> +c3 <> +ct:
595 Empty.absurd({Shape.fit(Axis.order(Nat, d0 <> d1 <> d2 <> Nil{}, [1n, 0n, 2n]), Axis.order(Nat, c0 <> c1 <> c2 <> c3 <> ct, [1n, 0n, 2n])) == Shape.fit(d0 <> d1 <> d2 <> Nil{}, c0 <> c1 <> c2 <> c3 <> ct) : Bool}, nat_clash(4n+List.length(&2, Nat, ct), 3n, cl, {==}))
596 case +d0 <> +d1 <> +d2 <> +d3 <> +dt:
597 Empty.absurd({Shape.fit(Axis.order(Nat, d0 <> d1 <> d2 <> d3 <> dt, [1n, 0n, 2n]), Axis.order(Nat, coords, [1n, 0n, 2n])) == Shape.fit(d0 <> d1 <> d2 <> d3 <> dt, coords) : Bool}, nat_clash(4n+List.length(&2, Nat, dt), 3n, dl, {==}))