PROOF.flatten_ranked_rank: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/shape/PROOF.bend as PROOF Lines 71-80 of bendtorch-core@0.1.0.0/src/shape/PROOF.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/shape/PROOF.bend&start_line=71&end_line=80 import Base import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape def flatten_ranked_rank(+shape: Shape.Shape, +values: List<&2, U32>, same_rank: Shape.BoolCase, differ: {Shape.rank_dimensions(Shape.dimensions(shape)) != Shape.rank_dimensions(values) : Nat}) -> {Shape.flatten_checked.ranked(shape, values, same_rank) == Fail{Shape.CoordinateRankMismatch{}} : Result<&2, &2, Shape.Error, Shape.FlatIndex>}: match same_rank: case Shape.BFalse{equal}: {==} case Shape.BTrue{equal}: Empty.absurd({Shape.flatten_checked.ranked(shape, values, Shape.BTrue{equal}) == Fail{Shape.CoordinateRankMismatch{}} : Result<&2, &2, Shape.Error, Shape.FlatIndex>}, differ(Shape.equal_decided(Shape.rank_dimensions(Shape.dimensions(shape)), Shape.rank_dimensions(values), equal))) Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Empty 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=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_eq https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=BoolCase https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=Error https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=FlatIndex https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=Shape https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=dimensions https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=equal_decided https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=flatten_checked.ranked https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=rank_dimensions