Metamath Proof Explorer


Theorem modge0

Description: The modulo operation is nonnegative. (Contributed by NM, 10-Nov-2008)

Ref Expression
Assertion modge0 A B + 0 A mod B

Proof

Step Hyp Ref Expression
1 fldivle A B + A B A B
2 refldivcl A B + A B
3 simpl A B + A
4 rpregt0 B + B 0 < B
5 4 adantl A B + B 0 < B
6 lemuldiv2 A B A B 0 < B B A B A A B A B
7 2 3 5 6 syl3anc A B + B A B A A B A B
8 1 7 mpbird A B + B A B A
9 rpre B + B
10 9 adantl A B + B
11 10 2 remulcld A B + B A B
12 subge0 A B A B 0 A B A B B A B A
13 11 12 syldan A B + 0 A B A B B A B A
14 8 13 mpbird A B + 0 A B A B
15 modval A B + A mod B = A B A B
16 14 15 breqtrrd A B + 0 A mod B