def mapped_inside
bendtorch-core@0.1.0.0 · src/tensor/permute_build_proof.bend:208
import bendtorch-core@0.1.0.0/src/tensor/permute_build_proof.bend as PermuteBuildProof
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/layout.bend as Layout
import bendtorch-core@0.1.0.0/src/tensor/observation.bend as Values
208def mapped_inside(+input: Shape.Shape, +axes: List<&2, U32>, +plan: Layout.Plan<input, axes>, +index: U32,
209 +mapping: Layout.Mapping<input, axes, plan, index>) ->
210 {Nat.is_lt(U32.to_nat(U32.from_nat(U32.to_nat(Maybe.default(&2, U32, Values.permute_source(input, axes, index), 0)))),
211 Shape.logical_numel(Shape.dimensions(input))) == True{} : Bool}:
212 %mapped_index(input, axes, plan, index, mapping) : {Nat.is_lt(U32.to_nat(_), Shape.logical_numel(Shape.dimensions(input))) == True{} : Bool}
213 mapped_bound(input, axes, plan, index, mapping)