Metamath Proof Explorer


Theorem 2lgslem1c

Description: Lemma 3 for 2lgslem1 . (Contributed by AV, 19-Jun-2021)

Ref Expression
Assertion 2lgslem1c P ¬ 2 P P 4 P 1 2

Proof

Step Hyp Ref Expression
1 prmnn P P
2 nnnn0 P P 0
3 oddnn02np1 P 0 ¬ 2 P n 0 2 n + 1 = P
4 1 2 3 3syl P ¬ 2 P n 0 2 n + 1 = P
5 iftrue 2 n if 2 n n 2 n 1 2 = n 2
6 5 adantr 2 n n 0 if 2 n n 2 n 1 2 = n 2
7 2nn 2
8 nn0ledivnn n 0 2 n 2 n
9 7 8 mpan2 n 0 n 2 n
10 9 adantl 2 n n 0 n 2 n
11 6 10 eqbrtrd 2 n n 0 if 2 n n 2 n 1 2 n
12 iffalse ¬ 2 n if 2 n n 2 n 1 2 = n 1 2
13 12 adantr ¬ 2 n n 0 if 2 n n 2 n 1 2 = n 1 2
14 nn0re n 0 n
15 peano2rem n n 1
16 15 rehalfcld n n 1 2
17 14 16 syl n 0 n 1 2
18 14 rehalfcld n 0 n 2
19 14 lem1d n 0 n 1 n
20 14 15 syl n 0 n 1
21 2re 2
22 2pos 0 < 2
23 21 22 pm3.2i 2 0 < 2
24 23 a1i n 0 2 0 < 2
25 lediv1 n 1 n 2 0 < 2 n 1 n n 1 2 n 2
26 20 14 24 25 syl3anc n 0 n 1 n n 1 2 n 2
27 19 26 mpbid n 0 n 1 2 n 2
28 17 18 14 27 9 letrd n 0 n 1 2 n
29 28 adantl ¬ 2 n n 0 n 1 2 n
30 13 29 eqbrtrd ¬ 2 n n 0 if 2 n n 2 n 1 2 n
31 11 30 pm2.61ian n 0 if 2 n n 2 n 1 2 n
32 31 ad2antlr P n 0 2 n + 1 = P if 2 n n 2 n 1 2 n
33 nn0z n 0 n
34 33 adantl P n 0 n
35 eqcom 2 n + 1 = P P = 2 n + 1
36 35 biimpi 2 n + 1 = P P = 2 n + 1
37 flodddiv4 n P = 2 n + 1 P 4 = if 2 n n 2 n 1 2
38 34 36 37 syl2an P n 0 2 n + 1 = P P 4 = if 2 n n 2 n 1 2
39 oveq1 P = 2 n + 1 P 1 = 2 n + 1 - 1
40 39 eqcoms 2 n + 1 = P P 1 = 2 n + 1 - 1
41 40 adantl P n 0 2 n + 1 = P P 1 = 2 n + 1 - 1
42 2nn0 2 0
43 42 a1i n 0 2 0
44 id n 0 n 0
45 43 44 nn0mulcld n 0 2 n 0
46 45 nn0cnd n 0 2 n
47 pncan1 2 n 2 n + 1 - 1 = 2 n
48 46 47 syl n 0 2 n + 1 - 1 = 2 n
49 48 ad2antlr P n 0 2 n + 1 = P 2 n + 1 - 1 = 2 n
50 41 49 eqtrd P n 0 2 n + 1 = P P 1 = 2 n
51 50 oveq1d P n 0 2 n + 1 = P P 1 2 = 2 n 2
52 nn0cn n 0 n
53 2cnd n 0 2
54 2ne0 2 0
55 54 a1i n 0 2 0
56 52 53 55 divcan3d n 0 2 n 2 = n
57 56 ad2antlr P n 0 2 n + 1 = P 2 n 2 = n
58 51 57 eqtrd P n 0 2 n + 1 = P P 1 2 = n
59 32 38 58 3brtr4d P n 0 2 n + 1 = P P 4 P 1 2
60 59 rexlimdva2 P n 0 2 n + 1 = P P 4 P 1 2
61 4 60 sylbid P ¬ 2 P P 4 P 1 2
62 61 imp P ¬ 2 P P 4 P 1 2