BoundaryProofs.flat_view: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/shape/boundary_proofs.bend as BoundaryProofs Lines 125-130 of bendtorch-core@0.1.0.0/src/shape/boundary_proofs.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/shape/boundary_proofs.bend&start_line=125&end_line=130 import Base import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape import bendtorch-core@0.1.0.0/src/shape/nat_proofs.bend as Nats import bendtorch-core@0.1.0.0/src/shape/LAWS.bend as Laws def flat_view(-shape: Shape.Shape, +index: Nat, +verdict: Shape.BoolCase, fits: {True{} == Nat.is_lt(index, Shape.elements(shape)) : Bool}) -> {Laws.index_result(shape, Shape.flat_checked.finish(shape, index, verdict)) == Some{U32.from_nat(index)} : Maybe<&2, U32>}: match verdict: case Shape.BFalse{equal}: Empty.absurd({Laws.index_result(shape, Shape.flat_checked.finish(shape, index, Shape.BFalse{equal})) == Some{U32.from_nat(index)} : Maybe<&2, U32>}, Nats.contradiction(Nat.is_lt(index, Shape.elements(shape)), fits, equal)) case Shape.BTrue{equal}: {==} 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=Empty.absurd https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe 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=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.from_nat https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/LAWS.bend&name=index_result 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=Shape https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=elements https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=flat_checked.finish https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/nat_proofs.bend&name=contradiction