Metamath Proof Explorer


Theorem isprm3

Description: The predicate "is a prime number". A prime number is an integer greater than or equal to 2 with no divisors strictly between 1 and itself. (Contributed by Paul Chapman, 26-Oct-2012)

Ref Expression
Assertion isprm3 P P 2 z 2 P 1 ¬ z P

Proof

Step Hyp Ref Expression
1 isprm2 P P 2 z z P z = 1 z = P
2 iman z z = 1 z = P ¬ z ¬ z = 1 z = P
3 eluz2nn P 2 P
4 nnz z z
5 dvdsle z P z P z P
6 4 5 sylan z P z P z P
7 nnge1 z 1 z
8 7 adantr z P 1 z
9 6 8 jctild z P z P 1 z z P
10 3 9 sylan2 z P 2 z P 1 z z P
11 zre z z
12 nnre P P
13 1re 1
14 leltne 1 z 1 z 1 < z z 1
15 13 14 mp3an1 z 1 z 1 < z z 1
16 15 3adant2 z P 1 z 1 < z z 1
17 16 3expia z P 1 z 1 < z z 1
18 leltne z P z P z < P P z
19 18 3expia z P z P z < P P z
20 17 19 anim12d z P 1 z z P 1 < z z 1 z < P P z
21 11 12 20 syl2an z P 1 z z P 1 < z z 1 z < P P z
22 pm4.38 1 < z z 1 z < P P z 1 < z z < P z 1 P z
23 df-ne z 1 ¬ z = 1
24 nesym P z ¬ z = P
25 23 24 anbi12i z 1 P z ¬ z = 1 ¬ z = P
26 ioran ¬ z = 1 z = P ¬ z = 1 ¬ z = P
27 25 26 bitr4i z 1 P z ¬ z = 1 z = P
28 22 27 bitrdi 1 < z z 1 z < P P z 1 < z z < P ¬ z = 1 z = P
29 21 28 syl6 z P 1 z z P 1 < z z < P ¬ z = 1 z = P
30 4 3 29 syl2an z P 2 1 z z P 1 < z z < P ¬ z = 1 z = P
31 10 30 syld z P 2 z P 1 < z z < P ¬ z = 1 z = P
32 31 imp z P 2 z P 1 < z z < P ¬ z = 1 z = P
33 eluzelz P 2 P
34 1z 1
35 zltp1le 1 z 1 < z 1 + 1 z
36 34 35 mpan z 1 < z 1 + 1 z
37 df-2 2 = 1 + 1
38 37 breq1i 2 z 1 + 1 z
39 36 38 bitr4di z 1 < z 2 z
40 39 adantr z P 1 < z 2 z
41 zltlem1 z P z < P z P 1
42 40 41 anbi12d z P 1 < z z < P 2 z z P 1
43 peano2zm P P 1
44 2z 2
45 elfz z 2 P 1 z 2 P 1 2 z z P 1
46 44 45 mp3an2 z P 1 z 2 P 1 2 z z P 1
47 43 46 sylan2 z P z 2 P 1 2 z z P 1
48 42 47 bitr4d z P 1 < z z < P z 2 P 1
49 4 33 48 syl2an z P 2 1 < z z < P z 2 P 1
50 49 adantr z P 2 z P 1 < z z < P z 2 P 1
51 32 50 bitr3d z P 2 z P ¬ z = 1 z = P z 2 P 1
52 51 anasss z P 2 z P ¬ z = 1 z = P z 2 P 1
53 52 expcom P 2 z P z ¬ z = 1 z = P z 2 P 1
54 53 pm5.32d P 2 z P z ¬ z = 1 z = P z z 2 P 1
55 fzssuz 2 P 1 2
56 2eluzge1 2 1
57 uzss 2 1 2 1
58 56 57 ax-mp 2 1
59 55 58 sstri 2 P 1 1
60 nnuz = 1
61 59 60 sseqtrri 2 P 1
62 61 sseli z 2 P 1 z
63 62 pm4.71ri z 2 P 1 z z 2 P 1
64 54 63 bitr4di P 2 z P z ¬ z = 1 z = P z 2 P 1
65 64 notbid P 2 z P ¬ z ¬ z = 1 z = P ¬ z 2 P 1
66 2 65 syl5bb P 2 z P z z = 1 z = P ¬ z 2 P 1
67 66 pm5.74da P 2 z P z z = 1 z = P z P ¬ z 2 P 1
68 bi2.04 z P z z = 1 z = P z z P z = 1 z = P
69 con2b z P ¬ z 2 P 1 z 2 P 1 ¬ z P
70 67 68 69 3bitr3g P 2 z z P z = 1 z = P z 2 P 1 ¬ z P
71 70 ralbidv2 P 2 z z P z = 1 z = P z 2 P 1 ¬ z P
72 71 pm5.32i P 2 z z P z = 1 z = P P 2 z 2 P 1 ¬ z P
73 1 72 bitri P P 2 z 2 P 1 ¬ z P