Metamath Proof Explorer


Theorem 31prm

Description: 31 is a prime number. In contrast to 37prm , the proof of this theorem is not based on the "blanket" prmlem2 , but on isprm7 . Although the checks for non-divisibility by the primes 7 to 23 are not needed, the proof is much longer (regarding size) than the proof of 37prm (1810 characters compared with 1213 for 37prm ). The number of essential steps, however, is much smaller (138 compared with 213 for 37prm ). (Contributed by AV, 17-Aug-2021) (Proof modification is discouraged.)

Ref Expression
Assertion 31prm 31

Proof

Step Hyp Ref Expression
1 2z 2
2 3nn0 30
3 1nn0 10
4 2 3 deccl 310
5 4 nn0zi 31
6 3nn 3
7 2nn0 20
8 2re 2
9 9re 9
10 2lt9 2<9
11 8 9 10 ltleii 29
12 6 3 7 11 declei 231
13 eluz2 312231231
14 1 5 12 13 mpbir3an 312
15 elun n2345n23n45
16 elin n23n23n
17 vex nV
18 17 elpr n23n=2n=3
19 0nn0 00
20 2cn 2
21 20 mul02i 02=0
22 1e0p1 1=0+1
23 2 19 21 22 dec2dvds ¬231
24 breq1 n=2n31231
25 23 24 mtbiri n=2¬n31
26 3ndvds4 ¬34
27 2 3 3dvdsdec 33133+1
28 3p1e4 3+1=4
29 28 breq2i 33+134
30 27 29 bitri 33134
31 26 30 mtbir ¬331
32 breq1 n=3n31331
33 31 32 mtbiri n=3¬n31
34 25 33 jaoi n=2n=3¬n31
35 18 34 sylbi n23¬n31
36 35 adantr n23n¬n31
37 16 36 sylbi n23¬n31
38 elin n45n45n
39 17 elpr n45n=4n=5
40 eleq1 n=4n4
41 4nprm ¬4
42 41 pm2.21i 4¬n31
43 40 42 syl6bi n=4n¬n31
44 1nn 1
45 1lt5 1<5
46 2 44 45 dec5dvds ¬531
47 breq1 n=5n31531
48 46 47 mtbiri n=5¬n31
49 48 a1d n=5n¬n31
50 43 49 jaoi n=4n=5n¬n31
51 39 50 sylbi n45n¬n31
52 51 imp n45n¬n31
53 38 52 sylbi n45¬n31
54 37 53 jaoi n23n45¬n31
55 15 54 sylbi n2345¬n31
56 indir 2345=2345
57 55 56 eleq2s n2345¬n31
58 5nn0 50
59 5re 5
60 5lt9 5<9
61 59 9 60 ltleii 59
62 2lt3 2<3
63 7 2 58 3 61 62 decleh 2531
64 6nn 6
65 1lt6 1<6
66 2 3 64 65 declt 31<36
67 4 nn0rei 31
68 0re 0
69 9pos 0<9
70 68 9 69 ltleii 09
71 6 3 19 70 declei 031
72 67 71 pm3.2i 31031
73 flsqrt5 31031253131<3631=5
74 73 bicomd 3103131=5253131<36
75 72 74 ax-mp 31=5253131<36
76 63 66 75 mpbir2an 31=5
77 76 oveq2i 231=25
78 5nn 5
79 78 nnzi 5
80 3z 3
81 1 79 80 3pm3.2i 253
82 3re 3
83 8 82 62 ltleii 23
84 3lt5 3<5
85 82 59 84 ltleii 35
86 83 85 pm3.2i 2335
87 elfz2 3252532335
88 81 86 87 mpbir2an 325
89 fzsplit 32525=233+15
90 88 89 ax-mp 25=233+15
91 df-3 3=2+1
92 91 oveq2i 23=22+1
93 fzpr 222+1=22+1
94 1 93 ax-mp 22+1=22+1
95 2p1e3 2+1=3
96 95 preq2i 22+1=23
97 92 94 96 3eqtri 23=23
98 28 oveq1i 3+15=45
99 df-5 5=4+1
100 99 oveq2i 45=44+1
101 4z 4
102 fzpr 444+1=44+1
103 101 102 ax-mp 44+1=44+1
104 4p1e5 4+1=5
105 104 preq2i 44+1=45
106 103 105 eqtri 44+1=45
107 98 100 106 3eqtri 3+15=45
108 97 107 uneq12i 233+15=2345
109 77 90 108 3eqtri 231=2345
110 109 ineq1i 231=2345
111 57 110 eleq2s n231¬n31
112 111 rgen n231¬n31
113 isprm7 31312n231¬n31
114 14 112 113 mpbir2an 31