Metamath Proof Explorer


Theorem perfectlem1

Description: Lemma for perfect . (Contributed by Mario Carneiro, 7-Jun-2016)

Ref Expression
Hypotheses perfectlem.1 φ A
perfectlem.2 φ B
perfectlem.3 φ ¬ 2 B
perfectlem.4 φ 1 σ 2 A B = 2 2 A B
Assertion perfectlem1 φ 2 A + 1 2 A + 1 1 B 2 A + 1 1

Proof

Step Hyp Ref Expression
1 perfectlem.1 φ A
2 perfectlem.2 φ B
3 perfectlem.3 φ ¬ 2 B
4 perfectlem.4 φ 1 σ 2 A B = 2 2 A B
5 2nn 2
6 1 nnnn0d φ A 0
7 peano2nn0 A 0 A + 1 0
8 6 7 syl φ A + 1 0
9 nnexpcl 2 A + 1 0 2 A + 1
10 5 8 9 sylancr φ 2 A + 1
11 2re 2
12 1 peano2nnd φ A + 1
13 1lt2 1 < 2
14 13 a1i φ 1 < 2
15 expgt1 2 A + 1 1 < 2 1 < 2 A + 1
16 11 12 14 15 mp3an2i φ 1 < 2 A + 1
17 1nn 1
18 nnsub 1 2 A + 1 1 < 2 A + 1 2 A + 1 1
19 17 10 18 sylancr φ 1 < 2 A + 1 2 A + 1 1
20 16 19 mpbid φ 2 A + 1 1
21 10 nnzd φ 2 A + 1
22 peano2zm 2 A + 1 2 A + 1 1
23 21 22 syl φ 2 A + 1 1
24 1nn0 1 0
25 sgmnncl 1 0 B 1 σ B
26 24 2 25 sylancr φ 1 σ B
27 26 nnzd φ 1 σ B
28 dvdsmul1 2 A + 1 1 1 σ B 2 A + 1 1 2 A + 1 1 1 σ B
29 23 27 28 syl2anc φ 2 A + 1 1 2 A + 1 1 1 σ B
30 2cn 2
31 expp1 2 A 0 2 A + 1 = 2 A 2
32 30 6 31 sylancr φ 2 A + 1 = 2 A 2
33 nnexpcl 2 A 0 2 A
34 5 6 33 sylancr φ 2 A
35 34 nncnd φ 2 A
36 mulcom 2 A 2 2 A 2 = 2 2 A
37 35 30 36 sylancl φ 2 A 2 = 2 2 A
38 32 37 eqtrd φ 2 A + 1 = 2 2 A
39 38 oveq1d φ 2 A + 1 B = 2 2 A B
40 30 a1i φ 2
41 2 nncnd φ B
42 40 35 41 mulassd φ 2 2 A B = 2 2 A B
43 ax-1cn 1
44 43 a1i φ 1
45 2prm 2
46 2 nnzd φ B
47 coprm 2 B ¬ 2 B 2 gcd B = 1
48 45 46 47 sylancr φ ¬ 2 B 2 gcd B = 1
49 3 48 mpbid φ 2 gcd B = 1
50 2z 2
51 rpexp1i 2 B A 0 2 gcd B = 1 2 A gcd B = 1
52 50 46 6 51 mp3an2i φ 2 gcd B = 1 2 A gcd B = 1
53 49 52 mpd φ 2 A gcd B = 1
54 sgmmul 1 2 A B 2 A gcd B = 1 1 σ 2 A B = 1 σ 2 A 1 σ B
55 44 34 2 53 54 syl13anc φ 1 σ 2 A B = 1 σ 2 A 1 σ B
56 1 nncnd φ A
57 pncan A 1 A + 1 - 1 = A
58 56 43 57 sylancl φ A + 1 - 1 = A
59 58 oveq2d φ 2 A + 1 - 1 = 2 A
60 59 oveq2d φ 1 σ 2 A + 1 - 1 = 1 σ 2 A
61 1sgm2ppw A + 1 1 σ 2 A + 1 - 1 = 2 A + 1 1
62 12 61 syl φ 1 σ 2 A + 1 - 1 = 2 A + 1 1
63 60 62 eqtr3d φ 1 σ 2 A = 2 A + 1 1
64 63 oveq1d φ 1 σ 2 A 1 σ B = 2 A + 1 1 1 σ B
65 55 4 64 3eqtr3d φ 2 2 A B = 2 A + 1 1 1 σ B
66 39 42 65 3eqtrd φ 2 A + 1 B = 2 A + 1 1 1 σ B
67 29 66 breqtrrd φ 2 A + 1 1 2 A + 1 B
68 23 21 gcdcomd φ 2 A + 1 1 gcd 2 A + 1 = 2 A + 1 gcd 2 A + 1 1
69 iddvdsexp 2 A + 1 2 2 A + 1
70 50 12 69 sylancr φ 2 2 A + 1
71 n2dvds1 ¬ 2 1
72 50 a1i φ 2
73 1zzd φ 1
74 72 21 73 3jca φ 2 2 A + 1 1
75 dvdssub2 2 2 A + 1 1 2 2 A + 1 1 2 2 A + 1 2 1
76 74 75 sylan φ 2 2 A + 1 1 2 2 A + 1 2 1
77 71 76 mtbiri φ 2 2 A + 1 1 ¬ 2 2 A + 1
78 77 ex φ 2 2 A + 1 1 ¬ 2 2 A + 1
79 70 78 mt2d φ ¬ 2 2 A + 1 1
80 coprm 2 2 A + 1 1 ¬ 2 2 A + 1 1 2 gcd 2 A + 1 1 = 1
81 45 23 80 sylancr φ ¬ 2 2 A + 1 1 2 gcd 2 A + 1 1 = 1
82 79 81 mpbid φ 2 gcd 2 A + 1 1 = 1
83 rpexp1i 2 2 A + 1 1 A + 1 0 2 gcd 2 A + 1 1 = 1 2 A + 1 gcd 2 A + 1 1 = 1
84 50 23 8 83 mp3an2i φ 2 gcd 2 A + 1 1 = 1 2 A + 1 gcd 2 A + 1 1 = 1
85 82 84 mpd φ 2 A + 1 gcd 2 A + 1 1 = 1
86 68 85 eqtrd φ 2 A + 1 1 gcd 2 A + 1 = 1
87 coprmdvds 2 A + 1 1 2 A + 1 B 2 A + 1 1 2 A + 1 B 2 A + 1 1 gcd 2 A + 1 = 1 2 A + 1 1 B
88 23 21 46 87 syl3anc φ 2 A + 1 1 2 A + 1 B 2 A + 1 1 gcd 2 A + 1 = 1 2 A + 1 1 B
89 67 86 88 mp2and φ 2 A + 1 1 B
90 nndivdvds B 2 A + 1 1 2 A + 1 1 B B 2 A + 1 1
91 2 20 90 syl2anc φ 2 A + 1 1 B B 2 A + 1 1
92 89 91 mpbid φ B 2 A + 1 1
93 10 20 92 3jca φ 2 A + 1 2 A + 1 1 B 2 A + 1 1