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 MNMNNmodM=0

Proof

Step Hyp Ref Expression
1 nnz MM
2 nnne0 MM0
3 1 2 jca MMM0
4 dvdsval2 MM0NMNNM
5 4 3expa MM0NMNNM
6 3 5 sylan MNMNNM
7 zre NN
8 nnrp MM+
9 mod0 NM+NmodM=0NM
10 7 8 9 syl2anr MNNmodM=0NM
11 6 10 bitr4d MNMNNmodM=0