Metamath Proof Explorer


Theorem dvdsval3

Description: One nonzero integer divides another integer if and only if the remainder upon division is zero, see remark in ApostolNT p. 106. (Contributed by Mario Carneiro, 22-Feb-2014) (Revised by Mario Carneiro, 15-Jul-2014)

Ref Expression
Assertion dvdsval3 M N M N N mod M = 0

Proof

Step Hyp Ref Expression
1 nnz M M
2 nnne0 M M 0
3 1 2 jca M M M 0
4 dvdsval2 M M 0 N M N N M
5 4 3expa M M 0 N M N N M
6 3 5 sylan M N M N N M
7 zre N N
8 nnrp M M +
9 mod0 N M + N mod M = 0 N M
10 7 8 9 syl2anr M N N mod M = 0 N M
11 6 10 bitr4d M N M N N mod M = 0