def flatten_checked
bendtorch-core@0.1.0.0 · src/shape/boundary_proofs.bend:162
import bendtorch-core@0.1.0.0/src/shape/boundary_proofs.bend as BoundaryProofs
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/shape/LAWS.bend as Laws
162def flatten_checked(+shape: Shape.Shape, +values: List<&2, U32>) -> {Laws.index_result(shape, Shape.flatten_checked(shape, values)) == Laws.flatten_spec(Shape.extents(shape), Laws.decode(Shape.extents(shape), Shape.naturals(values))) : Maybe<&2, U32>}:
163 flatten_ranked(shape, values, Shape.bool_case(Nat.is_eq(Shape.rank_dimensions(Shape.dimensions(shape)), Shape.rank_dimensions(values))))