law narrow_out_of_range
import bendtorch-core@0.1.0.0/src/tensor/slice_LAWS.bend as SliceLAWSimport Base
import bendtorch-core@0.1.0.0/src/tensor/core.bend as Core
import bendtorch-core@0.1.0.0/src/tensor/slice.bend as Slice
256law narrow_out_of_range:
257 for input: Core.Dynamic
258 for +dim: U32
259 for +start: U32
260 for +length: U32
261 for inside: {Nat.is_lt(U32.to_nat(dim), rank_of(input)) == True{} : Bool}
262 for past: {Nat.is_le(Nat.add(U32.to_nat(start), U32.to_nat(length)), extent_of(input, dim)) == False{} : Bool}
263 {Slice.narrow(input, dim, start, length) == (input, Fail{Slice.OutOfRange{}}) : Core.Dynamic & Result<&2, &1, Slice.Error, Core.Dynamic>}
Uses (21)
Used by (0)
No other definition uses this definition.