Metamath Proof Explorer


Theorem 1arith

Description: Fundamental theorem of arithmetic, where a prime factorization is represented as a sequence of prime exponents, for which only finitely many primes have nonzero exponent. The function M maps the set of positive integers one-to-one onto the set of prime factorizations R . (Contributed by Paul Chapman, 17-Nov-2012) (Proof shortened by Mario Carneiro, 30-May-2014)

Ref Expression
Hypotheses 1arith.1 M=npppCntn
1arith.2 R=e0|e-1Fin
Assertion 1arith M:1-1 ontoR

Proof

Step Hyp Ref Expression
1 1arith.1 M=npppCntn
2 1arith.2 R=e0|e-1Fin
3 prmex V
4 3 mptex pppCntnV
5 4 1 fnmpti MFn
6 1 1arithlem3 xMx:0
7 nn0ex 0V
8 7 3 elmap Mx0Mx:0
9 6 8 sylibr xMx0
10 fzfi 1xFin
11 ffn Mx:0MxFn
12 elpreima MxFnqMx-1qMxq
13 6 11 12 3syl xqMx-1qMxq
14 1 1arithlem2 xqMxq=qpCntx
15 14 eleq1d xqMxqqpCntx
16 prmz qq
17 id xx
18 dvdsle qxqxqx
19 16 17 18 syl2anr xqqxqx
20 pcelnn qxqpCntxqx
21 20 ancoms xqqpCntxqx
22 prmnn qq
23 nnuz =1
24 22 23 eleqtrdi qq1
25 nnz xx
26 elfz5 q1xq1xqx
27 24 25 26 syl2anr xqq1xqx
28 19 21 27 3imtr4d xqqpCntxq1x
29 15 28 sylbid xqMxqq1x
30 29 expimpd xqMxqq1x
31 13 30 sylbid xqMx-1q1x
32 31 ssrdv xMx-11x
33 ssfi 1xFinMx-11xMx-1Fin
34 10 32 33 sylancr xMx-1Fin
35 cnveq e=Mxe-1=Mx-1
36 35 imaeq1d e=Mxe-1=Mx-1
37 36 eleq1d e=Mxe-1FinMx-1Fin
38 37 2 elrab2 MxRMx0Mx-1Fin
39 9 34 38 sylanbrc xMxR
40 39 rgen xMxR
41 ffnfv M:RMFnxMxR
42 5 40 41 mpbir2an M:R
43 14 adantlr xyqMxq=qpCntx
44 1 1arithlem2 yqMyq=qpCnty
45 44 adantll xyqMyq=qpCnty
46 43 45 eqeq12d xyqMxq=MyqqpCntx=qpCnty
47 46 ralbidva xyqMxq=MyqqqpCntx=qpCnty
48 1 1arithlem3 yMy:0
49 ffn My:0MyFn
50 eqfnfv MxFnMyFnMx=MyqMxq=Myq
51 11 49 50 syl2an Mx:0My:0Mx=MyqMxq=Myq
52 6 48 51 syl2an xyMx=MyqMxq=Myq
53 nnnn0 xx0
54 nnnn0 yy0
55 pc11 x0y0x=yqqpCntx=qpCnty
56 53 54 55 syl2an xyx=yqqpCntx=qpCnty
57 47 52 56 3bitr4d xyMx=Myx=y
58 57 biimpd xyMx=Myx=y
59 58 rgen2 xyMx=Myx=y
60 dff13 M:1-1RM:RxyMx=Myx=y
61 42 59 60 mpbir2an M:1-1R
62 eqid gifggfg1=gifggfg1
63 cnveq e=fe-1=f-1
64 63 imaeq1d e=fe-1=f-1
65 64 eleq1d e=fe-1Finf-1Fin
66 65 2 elrab2 fRf0f-1Fin
67 66 simplbi fRf0
68 7 3 elmap f0f:0
69 67 68 sylib fRf:0
70 69 ad2antrr fRykf-1kyf:0
71 simplr fRykf-1kyy
72 0re 0
73 ifcl y0if0yy0
74 71 72 73 sylancl fRykf-1kyif0yy0
75 max1 0y0if0yy0
76 72 71 75 sylancr fRykf-1ky0if0yy0
77 flge0nn0 if0yy00if0yy0if0yy00
78 74 76 77 syl2anc fRykf-1kyif0yy00
79 nn0p1nn if0yy00if0yy0+1
80 78 79 syl fRykf-1kyif0yy0+1
81 71 adantr fRykf-1kyqif0yy0+1qy
82 80 adantr fRykf-1kyqif0yy0+1qif0yy0+1
83 82 nnred fRykf-1kyqif0yy0+1qif0yy0+1
84 16 ssriv
85 zssre
86 84 85 sstri
87 simprl fRykf-1kyqif0yy0+1qq
88 86 87 sselid fRykf-1kyqif0yy0+1qq
89 74 adantr fRykf-1kyqif0yy0+1qif0yy0
90 max2 0yyif0yy0
91 72 81 90 sylancr fRykf-1kyqif0yy0+1qyif0yy0
92 flltp1 if0yy0if0yy0<if0yy0+1
93 89 92 syl fRykf-1kyqif0yy0+1qif0yy0<if0yy0+1
94 81 89 83 91 93 lelttrd fRykf-1kyqif0yy0+1qy<if0yy0+1
95 simprr fRykf-1kyqif0yy0+1qif0yy0+1q
96 81 83 88 94 95 ltletrd fRykf-1kyqif0yy0+1qy<q
97 81 88 ltnled fRykf-1kyqif0yy0+1qy<q¬qy
98 96 97 mpbid fRykf-1kyqif0yy0+1q¬qy
99 87 biantrurd fRykf-1kyqif0yy0+1qfqqfq
100 70 adantr fRykf-1kyqif0yy0+1qf:0
101 ffn f:0fFn
102 elpreima fFnqf-1qfq
103 100 101 102 3syl fRykf-1kyqif0yy0+1qqf-1qfq
104 99 103 bitr4d fRykf-1kyqif0yy0+1qfqqf-1
105 simplr fRykf-1kyqif0yy0+1qkf-1ky
106 breq1 k=qkyqy
107 106 rspccv kf-1kyqf-1qy
108 105 107 syl fRykf-1kyqif0yy0+1qqf-1qy
109 104 108 sylbid fRykf-1kyqif0yy0+1qfqqy
110 98 109 mtod fRykf-1kyqif0yy0+1q¬fq
111 100 87 ffvelcdmd fRykf-1kyqif0yy0+1qfq0
112 elnn0 fq0fqfq=0
113 111 112 sylib fRykf-1kyqif0yy0+1qfqfq=0
114 113 ord fRykf-1kyqif0yy0+1q¬fqfq=0
115 110 114 mpd fRykf-1kyqif0yy0+1qfq=0
116 1 62 70 80 115 1arithlem4 fRykf-1kyxf=Mx
117 cnvimass f-1domf
118 69 fdmd fRdomf=
119 118 86 eqsstrdi fRdomf
120 117 119 sstrid fRf-1
121 66 simprbi fRf-1Fin
122 fimaxre2 f-1f-1Finykf-1ky
123 120 121 122 syl2anc fRykf-1ky
124 116 123 r19.29a fRxf=Mx
125 124 rgen fRxf=Mx
126 dffo3 M:ontoRM:RfRxf=Mx
127 42 125 126 mpbir2an M:ontoR
128 df-f1o M:1-1 ontoRM:1-1RM:ontoR
129 61 127 128 mpbir2an M:1-1 ontoR