Description: The result of the mod operator satisfies the requirements for the remainder R in the division algorithm for a positive divisor. Variant of divalgmod . (Contributed by Stefan O'Rear, 17-Oct-2014) (Proof shortened by AV, 21-Aug-2021)