Metamath Proof Explorer


Theorem modelico

Description: Modular reduction produces a half-open interval. (Contributed by Stefan O'Rear, 12-Sep-2014)

Ref Expression
Assertion modelico A B + A mod B 0 B

Proof

Step Hyp Ref Expression
1 modcl A B + A mod B
2 modge0 A B + 0 A mod B
3 modlt A B + A mod B < B
4 0re 0
5 rpxr B + B *
6 5 adantl A B + B *
7 elico2 0 B * A mod B 0 B A mod B 0 A mod B A mod B < B
8 4 6 7 sylancr A B + A mod B 0 B A mod B 0 A mod B A mod B < B
9 1 2 3 8 mpbir3and A B + A mod B 0 B