Metamath Proof Explorer


Theorem mod0mul

Description: If an integer is 0 modulo a positive integer, this integer must be the product of another integer and the modulus. (Contributed by AV, 7-Jun-2020)

Ref Expression
Assertion mod0mul ANAmodN=0xA=x N

Proof

Step Hyp Ref Expression
1 zre AA
2 nnrp NN+
3 mod0 AN+AmodN=0AN
4 1 2 3 syl2an ANAmodN=0AN
5 simpr ANANAN
6 oveq1 x=ANx N=AN N
7 6 eqeq2d x=ANA=x NA=AN N
8 7 adantl ANANx=ANA=x NA=AN N
9 zcn AA
10 9 adantr ANA
11 nncn NN
12 11 adantl ANN
13 nnne0 NN0
14 13 adantl ANN0
15 10 12 14 divcan1d ANAN N=A
16 15 adantr ANANAN N=A
17 16 eqcomd ANANA=AN N
18 5 8 17 rspcedvd ANANxA=x N
19 18 ex ANANxA=x N
20 4 19 sylbid ANAmodN=0xA=x N