Metamath Proof Explorer


Theorem perfectALTV

Description: The Euclid-Euler theorem, or Perfect Number theorem. A positive even integer N is a perfect number (that is, its divisor sum is 2 N ) if and only if it is of the form 2 ^ ( p - 1 ) x. ( 2 ^ p - 1 ) , where 2 ^ p - 1 is prime (a Mersenne prime). (It follows from this that p is also prime.) This is Metamath 100 proof #70. (Contributed by Mario Carneiro, 17-May-2016) (Revised by AV, 1-Jul-2020) (Proof modification is discouraged.)

Ref Expression
Assertion perfectALTV NNEven1σN=2 Np2p1N=2p12p1

Proof

Step Hyp Ref Expression
1 2dvdseven NEven2N
2 1 ad2antlr NNEven1σN=2 N2N
3 2prm 2
4 simpll NNEven1σN=2 NN
5 pcelnn 2N2pCntN2N
6 3 4 5 sylancr NNEven1σN=2 N2pCntN2N
7 2 6 mpbird NNEven1σN=2 N2pCntN
8 7 nnzd NNEven1σN=2 N2pCntN
9 8 peano2zd NNEven1σN=2 N2pCntN+1
10 pcdvds 2N22pCntNN
11 3 4 10 sylancr NNEven1σN=2 N22pCntNN
12 2nn 2
13 7 nnnn0d NNEven1σN=2 N2pCntN0
14 nnexpcl 22pCntN022pCntN
15 12 13 14 sylancr NNEven1σN=2 N22pCntN
16 nndivdvds N22pCntN22pCntNNN22pCntN
17 4 15 16 syl2anc NNEven1σN=2 N22pCntNNN22pCntN
18 11 17 mpbid NNEven1σN=2 NN22pCntN
19 18 nnzd NNEven1σN=2 NN22pCntN
20 pcndvds2 2N¬2N22pCntN
21 3 4 20 sylancr NNEven1σN=2 N¬2N22pCntN
22 isodd3 N22pCntNOddN22pCntN¬2N22pCntN
23 19 21 22 sylanbrc NNEven1σN=2 NN22pCntNOdd
24 simpr NNEven1σN=2 N1σN=2 N
25 nncn NN
26 25 ad2antrr NNEven1σN=2 NN
27 15 nncnd NNEven1σN=2 N22pCntN
28 15 nnne0d NNEven1σN=2 N22pCntN0
29 26 27 28 divcan2d NNEven1σN=2 N22pCntNN22pCntN=N
30 29 oveq2d NNEven1σN=2 N1σ22pCntNN22pCntN=1σN
31 29 oveq2d NNEven1σN=2 N222pCntNN22pCntN=2 N
32 24 30 31 3eqtr4d NNEven1σN=2 N1σ22pCntNN22pCntN=222pCntNN22pCntN
33 7 18 23 32 perfectALTVlem2 NNEven1σN=2 NN22pCntNN22pCntN=22pCntN+11
34 33 simprd NNEven1σN=2 NN22pCntN=22pCntN+11
35 33 simpld NNEven1σN=2 NN22pCntN
36 34 35 eqeltrrd NNEven1σN=2 N22pCntN+11
37 7 nncnd NNEven1σN=2 N2pCntN
38 ax-1cn 1
39 pncan 2pCntN12pCntN+1-1=2pCntN
40 37 38 39 sylancl NNEven1σN=2 N2pCntN+1-1=2pCntN
41 40 eqcomd NNEven1σN=2 N2pCntN=2pCntN+1-1
42 41 oveq2d NNEven1σN=2 N22pCntN=22pCntN+1-1
43 42 34 oveq12d NNEven1σN=2 N22pCntNN22pCntN=22pCntN+1-122pCntN+11
44 29 43 eqtr3d NNEven1σN=2 NN=22pCntN+1-122pCntN+11
45 oveq2 p=2pCntN+12p=22pCntN+1
46 45 oveq1d p=2pCntN+12p1=22pCntN+11
47 46 eleq1d p=2pCntN+12p122pCntN+11
48 oveq1 p=2pCntN+1p1=2pCntN+1-1
49 48 oveq2d p=2pCntN+12p1=22pCntN+1-1
50 49 46 oveq12d p=2pCntN+12p12p1=22pCntN+1-122pCntN+11
51 50 eqeq2d p=2pCntN+1N=2p12p1N=22pCntN+1-122pCntN+11
52 47 51 anbi12d p=2pCntN+12p1N=2p12p122pCntN+11N=22pCntN+1-122pCntN+11
53 52 rspcev 2pCntN+122pCntN+11N=22pCntN+1-122pCntN+11p2p1N=2p12p1
54 9 36 44 53 syl12anc NNEven1σN=2 Np2p1N=2p12p1
55 54 ex NNEven1σN=2 Np2p1N=2p12p1
56 perfect1 p2p11σ2p12p1=2p2p1
57 2cn 2
58 mersenne p2p1p
59 prmnn pp
60 58 59 syl p2p1p
61 expm1t 2p2p=2p12
62 57 60 61 sylancr p2p12p=2p12
63 nnm1nn0 pp10
64 60 63 syl p2p1p10
65 expcl 2p102p1
66 57 64 65 sylancr p2p12p1
67 mulcom 2p122p12=22p1
68 66 57 67 sylancl p2p12p12=22p1
69 62 68 eqtrd p2p12p=22p1
70 69 oveq1d p2p12p2p1=22p12p1
71 2cnd p2p12
72 prmnn 2p12p1
73 72 adantl p2p12p1
74 73 nncnd p2p12p1
75 71 66 74 mulassd p2p122p12p1=22p12p1
76 56 70 75 3eqtrd p2p11σ2p12p1=22p12p1
77 oveq2 N=2p12p11σN=1σ2p12p1
78 oveq2 N=2p12p12 N=22p12p1
79 77 78 eqeq12d N=2p12p11σN=2 N1σ2p12p1=22p12p1
80 76 79 syl5ibrcom p2p1N=2p12p11σN=2 N
81 80 impr p2p1N=2p12p11σN=2 N
82 81 rexlimiva p2p1N=2p12p11σN=2 N
83 55 82 impbid1 NNEven1σN=2 Np2p1N=2p12p1