def cursor_inside
bendtorch-core@0.1.0.0 · src/tensor/from_values_contract.bend:64
import bendtorch-core@0.1.0.0/src/tensor/from_values_contract.bend as FromValuesContract
import Base
64def cursor_inside(+cursor: Nat, +remaining: Nat, +limit: U32,
65 room: {Nat.is_le(Nat.add(cursor, 1n+remaining), U32.to_nat(limit)) == True{} : Bool}) ->
66 {Nat.is_lt(U32.to_nat(U32.from_nat(cursor)), U32.to_nat(limit)) == True{} : Bool}:
67 +room = room
68 %Equal.sym(Nat, U32.to_nat(U32.from_nat(cursor)), cursor, cursor_exact(cursor, remaining, limit, room)) :
69 {Nat.is_lt(_, U32.to_nat(limit)) == True{} : Bool}
70 cursor_lt(cursor, remaining, U32.to_nat(limit), room)