def narrow_ok
import bendtorch@1.3.0.0/tensor.bend as Tensorimport Base
533# axis d exists and start + len fits in it
534def narrow_ok(+s: List<&2, Nat>, +d: Nat, +st: Nat, +l: Nat) -> Bool:
535 Bool.and(Nat.is_lt(d, rank(s)), Nat.is_le(Nat.add(st, l), at1(s, d)))