law signed_wrap_inside
import bendtorch-core@0.1.0.0/src/tensor/signed_LAWS.bend as SignedLAWSimport Base
import bendtorch-core@0.1.0.0/src/tensor/signed.bend as Signed
46# A wrapped position is below limit exactly when the position is in
47# PyTorch's range -limit..limit-1.
48law signed_wrap_inside:
49 for +limit: U32
50 for +position: Signed.Position
51 {U32.is_lt(Signed.wrap(limit, position), limit) == Signed.inside(limit, position) : Bool}