ElementwisePROOF.flat_index_inside: def of bendtorch-core@0.1.0.0 Import: import bendtorch-core@0.1.0.0/src/tensor/elementwise_PROOF.bend as ElementwisePROOF Lines 598-606 of bendtorch-core@0.1.0.0/src/tensor/elementwise_PROOF.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-core@0.1.0.0/src/tensor/elementwise_PROOF.bend&start_line=598&end_line=606 import Base import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape import bendtorch-core@0.1.0.0/src/tensor/transform_PROOF.bend as TransformProof import bendtorch-core@0.1.0.0/src/tensor/word_conversion.bend as Conversion def flat_index_inside(+shape: Shape.Shape, +index: Shape.FlatIndex) -> {Nat.is_lt(U32.to_nat(Shape.index_value(shape, index)), Shape.logical_numel(Shape.dimensions(shape))) == True{} : Bool}: Shape.FIndex{+value, +bound} = index %Shape.elements_exact(shape) : {Nat.is_lt(U32.to_nat(U32.from_nat(value)), _) == True{} : Bool} %Equal.sym(Nat, U32.to_nat(U32.from_nat(value)), value, TransformProof.cursor_word_exact(shape, value, Conversion.lt_le(value, Shape.elements(shape), Equal.sym(Bool, True{}, Nat.is_lt(value, Shape.elements(shape)), bound)))) : {Nat.is_lt(_, Shape.elements(shape)) == True{} : Bool} Equal.sym(Bool, True{}, Nat.is_lt(value, Shape.elements(shape)), bound) Uses (15): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Equal.sym 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.from_nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.to_nat 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=elements https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=elements_exact https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=index_value https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/shape/core.bend&name=logical_numel https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/transform_PROOF.bend&name=cursor_word_exact https://jend.leeeet.dev/definition.txt?path=bendtorch-core@0.1.0.0/src/tensor/word_conversion.bend&name=lt_le