Metamath Proof Explorer


Theorem zmodcl

Description: Closure law for the modulo operation restricted to integers. (Contributed by NM, 27-Nov-2008)

Ref Expression
Assertion zmodcl A B A mod B 0

Proof

Step Hyp Ref Expression
1 zre A A
2 nnrp B B +
3 modval A B + A mod B = A B A B
4 1 2 3 syl2an A B A mod B = A B A B
5 nnz B B
6 5 adantl A B B
7 nndivre A B A B
8 1 7 sylan A B A B
9 8 flcld A B A B
10 6 9 zmulcld A B B A B
11 zsubcl A B A B A B A B
12 10 11 syldan A B A B A B
13 4 12 eqeltrd A B A mod B
14 modge0 A B + 0 A mod B
15 1 2 14 syl2an A B 0 A mod B
16 elnn0z A mod B 0 A mod B 0 A mod B
17 13 15 16 sylanbrc A B A mod B 0