Metamath Proof Explorer


Theorem ztprmneprm

Description: A prime is not an integer multiple of another prime. (Contributed by AV, 23-May-2019)

Ref Expression
Assertion ztprmneprm Z A B Z A = B A = B

Proof

Step Hyp Ref Expression
1 elznn0nn Z Z 0 Z Z
2 elnn0 Z 0 Z Z = 0
3 elnn1uz2 Z Z = 1 Z 2
4 oveq1 Z = 1 Z A = 1 A
5 4 adantr Z = 1 A B Z A = 1 A
6 5 eqeq1d Z = 1 A B Z A = B 1 A = B
7 prmz A A
8 7 zcnd A A
9 8 mulid2d A 1 A = A
10 9 adantr A B 1 A = A
11 10 eqeq1d A B 1 A = B A = B
12 11 biimpd A B 1 A = B A = B
13 12 adantl Z = 1 A B 1 A = B A = B
14 6 13 sylbid Z = 1 A B Z A = B A = B
15 14 ex Z = 1 A B Z A = B A = B
16 prmuz2 A A 2
17 16 adantr A B A 2
18 nprm Z 2 A 2 ¬ Z A
19 17 18 sylan2 Z 2 A B ¬ Z A
20 eleq1 Z A = B Z A B
21 20 notbid Z A = B ¬ Z A ¬ B
22 pm2.24 B ¬ B A = B
23 22 adantl A B ¬ B A = B
24 23 adantl Z 2 A B ¬ B A = B
25 24 com12 ¬ B Z 2 A B A = B
26 21 25 syl6bi Z A = B ¬ Z A Z 2 A B A = B
27 26 com3l ¬ Z A Z 2 A B Z A = B A = B
28 19 27 mpcom Z 2 A B Z A = B A = B
29 28 ex Z 2 A B Z A = B A = B
30 15 29 jaoi Z = 1 Z 2 A B Z A = B A = B
31 3 30 sylbi Z A B Z A = B A = B
32 oveq1 Z = 0 Z A = 0 A
33 32 eqeq1d Z = 0 Z A = B 0 A = B
34 prmnn A A
35 34 nnred A A
36 mul02lem2 A 0 A = 0
37 35 36 syl A 0 A = 0
38 37 adantr A B 0 A = 0
39 38 eqeq1d A B 0 A = B 0 = B
40 prmnn B B
41 elnnne0 B B 0 B 0
42 eqneqall B = 0 B 0 A = B
43 42 eqcoms 0 = B B 0 A = B
44 43 com12 B 0 0 = B A = B
45 44 adantl B 0 B 0 0 = B A = B
46 41 45 sylbi B 0 = B A = B
47 40 46 syl B 0 = B A = B
48 47 adantl A B 0 = B A = B
49 39 48 sylbid A B 0 A = B A = B
50 49 com12 0 A = B A B A = B
51 33 50 syl6bi Z = 0 Z A = B A B A = B
52 51 com23 Z = 0 A B Z A = B A = B
53 31 52 jaoi Z Z = 0 A B Z A = B A = B
54 2 53 sylbi Z 0 A B Z A = B A = B
55 elnnz Z Z 0 < Z
56 lt0neg1 Z Z < 0 0 < Z
57 34 nngt0d A 0 < A
58 57 adantr A B 0 < A
59 simpr Z Z < 0 Z < 0
60 58 59 anim12ci A B Z Z < 0 Z < 0 0 < A
61 60 orcd A B Z Z < 0 Z < 0 0 < A 0 < Z A < 0
62 simprl A B Z Z < 0 Z
63 35 adantr A B A
64 63 adantr A B Z Z < 0 A
65 62 64 mul2lt0bi A B Z Z < 0 Z A < 0 Z < 0 0 < A 0 < Z A < 0
66 61 65 mpbird A B Z Z < 0 Z A < 0
67 66 ex A B Z Z < 0 Z A < 0
68 breq1 Z A = B Z A < 0 B < 0
69 68 adantl A B Z A = B Z A < 0 B < 0
70 nnnn0 B B 0
71 nn0nlt0 B 0 ¬ B < 0
72 71 pm2.21d B 0 B < 0 A = B
73 70 72 syl B B < 0 A = B
74 40 73 syl B B < 0 A = B
75 74 adantl A B B < 0 A = B
76 75 adantr A B Z A = B B < 0 A = B
77 69 76 sylbid A B Z A = B Z A < 0 A = B
78 77 ex A B Z A = B Z A < 0 A = B
79 78 com23 A B Z A < 0 Z A = B A = B
80 67 79 syldc Z Z < 0 A B Z A = B A = B
81 80 ex Z Z < 0 A B Z A = B A = B
82 56 81 sylbird Z 0 < Z A B Z A = B A = B
83 82 adantld Z Z 0 < Z A B Z A = B A = B
84 55 83 syl5bi Z Z A B Z A = B A = B
85 84 imp Z Z A B Z A = B A = B
86 54 85 jaoi Z 0 Z Z A B Z A = B A = B
87 1 86 sylbi Z A B Z A = B A = B
88 87 3impib Z A B Z A = B A = B