Metamath Proof Explorer


Theorem dvdsmod

Description: Any number K whose mod base N is divisible by a divisor P of the base is also divisible by P . This means that primes will also be relatively prime to the base when reduced mod N for any base. (Contributed by Mario Carneiro, 13-Mar-2014)

Ref Expression
Assertion dvdsmod P N K P N P K mod N P K

Proof

Step Hyp Ref Expression
1 simpl3 P N K P N K
2 1 zred P N K P N K
3 simpl2 P N K P N N
4 3 nnrpd P N K P N N +
5 modval K N + K mod N = K N K N
6 2 4 5 syl2anc P N K P N K mod N = K N K N
7 6 breq2d P N K P N P K mod N P K N K N
8 simpl1 P N K P N P
9 8 nnzd P N K P N P
10 3 nnzd P N K P N N
11 2 3 nndivred P N K P N K N
12 11 flcld P N K P N K N
13 simpr P N K P N P N
14 9 10 12 13 dvdsmultr1d P N K P N P N K N
15 10 12 zmulcld P N K P N N K N
16 15 zcnd P N K P N N K N
17 16 subid1d P N K P N N K N 0 = N K N
18 14 17 breqtrrd P N K P N P N K N 0
19 0zd P N K P N 0
20 moddvds P N K N 0 N K N mod P = 0 mod P P N K N 0
21 8 15 19 20 syl3anc P N K P N N K N mod P = 0 mod P P N K N 0
22 18 21 mpbird P N K P N N K N mod P = 0 mod P
23 22 eqeq2d P N K P N K mod P = N K N mod P K mod P = 0 mod P
24 moddvds P K N K N K mod P = N K N mod P P K N K N
25 8 1 15 24 syl3anc P N K P N K mod P = N K N mod P P K N K N
26 moddvds P K 0 K mod P = 0 mod P P K 0
27 8 1 19 26 syl3anc P N K P N K mod P = 0 mod P P K 0
28 23 25 27 3bitr3d P N K P N P K N K N P K 0
29 1 zcnd P N K P N K
30 29 subid1d P N K P N K 0 = K
31 30 breq2d P N K P N P K 0 P K
32 7 28 31 3bitrd P N K P N P K mod N P K