def index_inside
bendtorch-core@0.1.0.0 · src/tensor/contracts/matmul_parallel_proof.bend:418
import bendtorch-core@0.1.0.0/src/tensor/contracts/matmul_parallel_proof.bend as MatmulParallelProof
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/matrix_index_proof.bend as MatrixIndex
import bendtorch-core@0.1.0.0/src/tensor/contracts/pointwise_proof.bend as PointwiseProof
418def index_inside(+shape: Shape.Shape, +number: Nat, +below: {Nat.is_lt(number, Shape.logical_numel(Shape.dimensions(shape))) == True{} : Bool}) ->
419 {Nat.is_lt(U32.to_nat(U32.from_nat(number)), U32.to_nat(Shape.count(shape))) == True{} : Bool}:
420 PointwiseProof.lt_count(U32.to_nat(U32.from_nat(number)), shape, MatrixIndex.word_inside(number, shape, below))