AxisAlgebra.fit_3120: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend as AxisAlgebra Lines 1973-1998 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=1973&end_line=1998 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 def fit_3120(+dims: List<&2, Nat>, +coords: List<&2, Nat>, dl: {List.length(&2, Nat, dims) == 4n : Nat}, cl: {List.length(&2, Nat, coords) == 4n : Nat}) -> {Shape.fit(Axis.order(Nat, dims, [3n, 1n, 2n, 0n]), Axis.order(Nat, coords, [3n, 1n, 2n, 0n])) == Shape.fit(dims, coords) : Bool}: match dims: case Nil{}: Empty.absurd({Shape.fit(Axis.order(Nat, Nil{}, [3n, 1n, 2n, 0n]), Axis.order(Nat, coords, [3n, 1n, 2n, 0n])) == Shape.fit(Nil{}, coords) : Bool}, nat_clash(0n, 4n, dl, {==})) case +d0 <> Nil{}: Empty.absurd({Shape.fit(Axis.order(Nat, d0 <> Nil{}, [3n, 1n, 2n, 0n]), Axis.order(Nat, coords, [3n, 1n, 2n, 0n])) == Shape.fit(d0 <> Nil{}, coords) : Bool}, nat_clash(1n, 4n, dl, {==})) case +d0 <> +d1 <> Nil{}: Empty.absurd({Shape.fit(Axis.order(Nat, d0 <> d1 <> Nil{}, [3n, 1n, 2n, 0n]), Axis.order(Nat, coords, [3n, 1n, 2n, 0n])) == Shape.fit(d0 <> d1 <> Nil{}, coords) : Bool}, nat_clash(2n, 4n, dl, {==})) case +d0 <> +d1 <> +d2 <> Nil{}: Empty.absurd({Shape.fit(Axis.order(Nat, d0 <> d1 <> d2 <> Nil{}, [3n, 1n, 2n, 0n]), Axis.order(Nat, coords, [3n, 1n, 2n, 0n])) == Shape.fit(d0 <> d1 <> d2 <> Nil{}, coords) : Bool}, nat_clash(3n, 4n, dl, {==})) case +d0 <> +d1 <> +d2 <> +d3 <> Nil{}: match coords: case Nil{}: Empty.absurd({Shape.fit(Axis.order(Nat, d0 <> d1 <> d2 <> d3 <> Nil{}, [3n, 1n, 2n, 0n]), Axis.order(Nat, Nil{}, [3n, 1n, 2n, 0n])) == Shape.fit(d0 <> d1 <> d2 <> d3 <> Nil{}, Nil{}) : Bool}, nat_clash(0n, 4n, cl, {==})) case +c0 <> Nil{}: Empty.absurd({Shape.fit(Axis.order(Nat, d0 <> d1 <> d2 <> d3 <> Nil{}, [3n, 1n, 2n, 0n]), Axis.order(Nat, c0 <> Nil{}, [3n, 1n, 2n, 0n])) == Shape.fit(d0 <> d1 <> d2 <> d3 <> Nil{}, c0 <> Nil{}) : Bool}, nat_clash(1n, 4n, cl, {==})) case +c0 <> +c1 <> Nil{}: Empty.absurd({Shape.fit(Axis.order(Nat, d0 <> d1 <> d2 <> d3 <> Nil{}, [3n, 1n, 2n, 0n]), Axis.order(Nat, c0 <> c1 <> Nil{}, [3n, 1n, 2n, 0n])) == Shape.fit(d0 <> d1 <> d2 <> d3 <> Nil{}, c0 <> c1 <> Nil{}) : Bool}, nat_clash(2n, 4n, cl, {==})) case +c0 <> +c1 <> +c2 <> Nil{}: Empty.absurd({Shape.fit(Axis.order(Nat, d0 <> d1 <> d2 <> d3 <> Nil{}, [3n, 1n, 2n, 0n]), Axis.order(Nat, c0 <> c1 <> c2 <> Nil{}, [3n, 1n, 2n, 0n])) == Shape.fit(d0 <> d1 <> d2 <> d3 <> Nil{}, c0 <> c1 <> c2 <> Nil{}) : Bool}, nat_clash(3n, 4n, cl, {==})) case +c0 <> +c1 <> +c2 <> +c3 <> Nil{}: Equal.trans(Bool, Bool.and(Nat.is_lt(c3, d3), Bool.and(Nat.is_lt(c1, d1), Bool.and(Nat.is_lt(c2, d2), Bool.and(Nat.is_lt(c0, d0), True{})))), Bool.and(Nat.is_lt(c3, d3), 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), Bool.and(Nat.is_lt(c3, d3), True{})))), Equal.cong(Bool, Bool, value => Bool.and(Nat.is_lt(c3, d3), Bool.and(Nat.is_lt(c1, d1), value)), Bool.and(Nat.is_lt(c2, d2), Bool.and(Nat.is_lt(c0, d0), True{})), Bool.and(Nat.is_lt(c0, d0), Bool.and(Nat.is_lt(c2, d2), True{})), and_swap(Nat.is_lt(c2, d2), Nat.is_lt(c0, d0), True{})), Equal.trans(Bool, Bool.and(Nat.is_lt(c3, d3), 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(c3, d3), 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), Bool.and(Nat.is_lt(c3, d3), True{})))), Equal.cong(Bool, Bool, value => Bool.and(Nat.is_lt(c3, d3), value), 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{}))), and_swap(Nat.is_lt(c1, d1), Nat.is_lt(c0, d0), Bool.and(Nat.is_lt(c2, d2), True{}))), Equal.trans(Bool, Bool.and(Nat.is_lt(c3, d3), 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(c3, d3), 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), Bool.and(Nat.is_lt(c3, d3), True{})))), and_swap(Nat.is_lt(c3, d3), Nat.is_lt(c0, d0), Bool.and(Nat.is_lt(c1, d1), Bool.and(Nat.is_lt(c2, d2), True{}))), Equal.trans(Bool, Bool.and(Nat.is_lt(c0, d0), Bool.and(Nat.is_lt(c3, d3), 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(c3, d3), 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), Bool.and(Nat.is_lt(c3, d3), True{})))), Equal.cong(Bool, Bool, value => Bool.and(Nat.is_lt(c0, d0), value), Bool.and(Nat.is_lt(c3, d3), Bool.and(Nat.is_lt(c1, d1), Bool.and(Nat.is_lt(c2, d2), True{}))), Bool.and(Nat.is_lt(c1, d1), Bool.and(Nat.is_lt(c3, d3), Bool.and(Nat.is_lt(c2, d2), True{}))), and_swap(Nat.is_lt(c3, d3), Nat.is_lt(c1, d1), Bool.and(Nat.is_lt(c2, d2), True{}))), Equal.trans(Bool, Bool.and(Nat.is_lt(c0, d0), Bool.and(Nat.is_lt(c1, d1), Bool.and(Nat.is_lt(c3, d3), 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), Bool.and(Nat.is_lt(c3, d3), True{})))), Bool.and(Nat.is_lt(c0, d0), Bool.and(Nat.is_lt(c1, d1), Bool.and(Nat.is_lt(c2, d2), Bool.and(Nat.is_lt(c3, d3), True{})))), Equal.cong(Bool, Bool, value => Bool.and(Nat.is_lt(c0, d0), Bool.and(Nat.is_lt(c1, d1), value)), Bool.and(Nat.is_lt(c3, d3), Bool.and(Nat.is_lt(c2, d2), True{})), Bool.and(Nat.is_lt(c2, d2), Bool.and(Nat.is_lt(c3, d3), True{})), and_swap(Nat.is_lt(c3, d3), Nat.is_lt(c2, d2), True{})), {==}))))) case +c0 <> +c1 <> +c2 <> +c3 <> +c4 <> +ct: Empty.absurd({Shape.fit(Axis.order(Nat, d0 <> d1 <> d2 <> d3 <> Nil{}, [3n, 1n, 2n, 0n]), Axis.order(Nat, c0 <> c1 <> c2 <> c3 <> c4 <> ct, [3n, 1n, 2n, 0n])) == Shape.fit(d0 <> d1 <> d2 <> d3 <> Nil{}, c0 <> c1 <> c2 <> c3 <> c4 <> ct) : Bool}, nat_clash(5n+List.length(&2, Nat, ct), 4n, cl, {==})) case +d0 <> +d1 <> +d2 <> +d3 <> +d4 <> +dt: Empty.absurd({Shape.fit(Axis.order(Nat, d0 <> d1 <> d2 <> d3 <> d4 <> dt, [3n, 1n, 2n, 0n]), Axis.order(Nat, coords, [3n, 1n, 2n, 0n])) == Shape.fit(d0 <> d1 <> d2 <> d3 <> d4 <> dt, coords) : Bool}, nat_clash(5n+List.length(&2, Nat, dt), 4n, dl, {==})) Uses (13): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and 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.cong https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.trans 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=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=fit https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend&name=and_swap https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend&name=nat_clash https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/axis_spec.bend&name=order