Metamath Proof Explorer


Theorem eulerpartlemgh

Description: Lemma for eulerpart : The F function is a bijection on the U subsets. (Contributed by Thierry Arnoux, 15-Aug-2018)

Ref Expression
Hypotheses eulerpart.p P=f0|f-1Finkfkk=N
eulerpart.o O=gP|ng-1¬2n
eulerpart.d D=gP|ngn1
eulerpart.j J=z|¬2z
eulerpart.f F=xJ,y02yx
eulerpart.h H=r𝒫0FinJ|rsuppFin
eulerpart.m M=rHxy|xJyrx
eulerpart.r R=f|f-1Fin
eulerpart.t T=f0|f-1J
eulerpart.g G=oTR𝟙FMbitsoJ
eulerpartlemgh.1 U=tA-1Jt×bitsAt
Assertion eulerpartlemgh ATRFU:U1-1 ontom|tnbitsAt2nt=m

Proof

Step Hyp Ref Expression
1 eulerpart.p P=f0|f-1Finkfkk=N
2 eulerpart.o O=gP|ng-1¬2n
3 eulerpart.d D=gP|ngn1
4 eulerpart.j J=z|¬2z
5 eulerpart.f F=xJ,y02yx
6 eulerpart.h H=r𝒫0FinJ|rsuppFin
7 eulerpart.m M=rHxy|xJyrx
8 eulerpart.r R=f|f-1Fin
9 eulerpart.t T=f0|f-1J
10 eulerpart.g G=oTR𝟙FMbitsoJ
11 eulerpartlemgh.1 U=tA-1Jt×bitsAt
12 4 5 oddpwdc F:J×01-1 onto
13 f1of1 F:J×01-1 ontoF:J×01-1
14 12 13 ax-mp F:J×01-1
15 iunss tA-1Jt×bitsAtJ×0tA-1Jt×bitsAtJ×0
16 inss2 A-1JJ
17 16 sseli tA-1JtJ
18 17 snssd tA-1JtJ
19 bitsss bitsAt0
20 xpss12 tJbitsAt0t×bitsAtJ×0
21 18 19 20 sylancl tA-1Jt×bitsAtJ×0
22 15 21 mprgbir tA-1Jt×bitsAtJ×0
23 11 22 eqsstri UJ×0
24 f1ores F:J×01-1UJ×0FU:U1-1 ontoFU
25 14 23 24 mp2an FU:U1-1 ontoFU
26 simpr ATRtnbitsAt2nt=p2nt=p
27 2nn 2
28 27 a1i ATRtnbitsAt2
29 19 sseli nbitsAtn0
30 29 adantl ATRtnbitsAtn0
31 28 30 nnexpcld ATRtnbitsAt2n
32 simplr ATRtnbitsAtt
33 31 32 nnmulcld ATRtnbitsAt2nt
34 33 adantr ATRtnbitsAt2nt=p2nt
35 26 34 eqeltrrd ATRtnbitsAt2nt=pp
36 35 rexlimdva2 ATRtnbitsAt2nt=pp
37 36 rexlimdva ATRtnbitsAt2nt=pp
38 37 pm4.71rd ATRtnbitsAt2nt=pptnbitsAt2nt=p
39 rex0 ¬n2nt=p
40 simplr ATRt¬tA-1t
41 simpr ATRt¬tA-1¬tA-1
42 1 2 3 4 5 6 7 8 9 eulerpartlemt0 ATRA0A-1FinA-1J
43 42 simp1bi ATRA0
44 elmapi A0A:0
45 43 44 syl ATRA:0
46 45 ad2antrr ATRt¬tA-1A:0
47 ffn A:0AFn
48 elpreima AFntA-1tAt
49 46 47 48 3syl ATRt¬tA-1tA-1tAt
50 41 49 mtbid ATRt¬tA-1¬tAt
51 imnan t¬At¬tAt
52 50 51 sylibr ATRt¬tA-1t¬At
53 40 52 mpd ATRt¬tA-1¬At
54 46 40 ffvelcdmd ATRt¬tA-1At0
55 elnn0 At0AtAt=0
56 54 55 sylib ATRt¬tA-1AtAt=0
57 orel1 ¬AtAtAt=0At=0
58 53 56 57 sylc ATRt¬tA-1At=0
59 58 fveq2d ATRt¬tA-1bitsAt=bits0
60 0bits bits0=
61 59 60 eqtrdi ATRt¬tA-1bitsAt=
62 61 rexeqdv ATRt¬tA-1nbitsAt2nt=pn2nt=p
63 39 62 mtbiri ATRt¬tA-1¬nbitsAt2nt=p
64 63 ex ATRt¬tA-1¬nbitsAt2nt=p
65 64 con4d ATRtnbitsAt2nt=ptA-1
66 65 impr ATRtnbitsAt2nt=ptA-1
67 eldif tJt¬tJ
68 1 2 3 4 5 6 7 8 9 eulerpartlemf ATRtJAt=0
69 67 68 sylan2br ATRt¬tJAt=0
70 69 anassrs ATRt¬tJAt=0
71 70 fveq2d ATRt¬tJbitsAt=bits0
72 71 60 eqtrdi ATRt¬tJbitsAt=
73 72 rexeqdv ATRt¬tJnbitsAt2nt=pn2nt=p
74 39 73 mtbiri ATRt¬tJ¬nbitsAt2nt=p
75 74 ex ATRt¬tJ¬nbitsAt2nt=p
76 75 con4d ATRtnbitsAt2nt=ptJ
77 76 impr ATRtnbitsAt2nt=ptJ
78 66 77 elind ATRtnbitsAt2nt=ptA-1J
79 simprr ATRtnbitsAt2nt=pnbitsAt2nt=p
80 78 79 jca ATRtnbitsAt2nt=ptA-1JnbitsAt2nt=p
81 80 ex ATRtnbitsAt2nt=ptA-1JnbitsAt2nt=p
82 81 reximdv2 ATRtnbitsAt2nt=ptA-1JnbitsAt2nt=p
83 ssrab2 z|¬2z
84 4 83 eqsstri J
85 16 84 sstri A-1J
86 ssrexv A-1JtA-1JnbitsAt2nt=ptnbitsAt2nt=p
87 85 86 mp1i ATRtA-1JnbitsAt2nt=ptnbitsAt2nt=p
88 82 87 impbid ATRtnbitsAt2nt=ptA-1JnbitsAt2nt=p
89 38 88 bitr3d ATRptnbitsAt2nt=ptA-1JnbitsAt2nt=p
90 eqeq2 m=p2nt=m2nt=p
91 90 2rexbidv m=ptnbitsAt2nt=mtnbitsAt2nt=p
92 91 elrab pm|tnbitsAt2nt=mptnbitsAt2nt=p
93 92 a1i ATRpm|tnbitsAt2nt=mptnbitsAt2nt=p
94 11 imaeq2i FU=FtA-1Jt×bitsAt
95 imaiun FtA-1Jt×bitsAt=tA-1JFt×bitsAt
96 94 95 eqtri FU=tA-1JFt×bitsAt
97 96 eleq2i pFUptA-1JFt×bitsAt
98 eliun ptA-1JFt×bitsAttA-1JpFt×bitsAt
99 f1ofn F:J×01-1 ontoFFnJ×0
100 12 99 ax-mp FFnJ×0
101 snssi tJtJ
102 101 19 20 sylancl tJt×bitsAtJ×0
103 ovelimab FFnJ×0t×bitsAtJ×0pFt×bitsAtxtnbitsAtp=xFn
104 100 102 103 sylancr tJpFt×bitsAtxtnbitsAtp=xFn
105 vex tV
106 oveq1 x=txFn=tFn
107 106 eqeq2d x=tp=xFnp=tFn
108 107 rexbidv x=tnbitsAtp=xFnnbitsAtp=tFn
109 105 108 rexsn xtnbitsAtp=xFnnbitsAtp=tFn
110 104 109 bitrdi tJpFt×bitsAtnbitsAtp=tFn
111 df-ov tFn=Ftn
112 111 eqeq1i tFn=pFtn=p
113 eqcom tFn=pp=tFn
114 112 113 bitr3i Ftn=pp=tFn
115 opelxpi tJn0tnJ×0
116 4 5 oddpwdcv tnJ×0Ftn=22ndtn1sttn
117 vex nV
118 105 117 op2nd 2ndtn=n
119 118 oveq2i 22ndtn=2n
120 105 117 op1st 1sttn=t
121 119 120 oveq12i 22ndtn1sttn=2nt
122 116 121 eqtrdi tnJ×0Ftn=2nt
123 115 122 syl tJn0Ftn=2nt
124 123 eqeq1d tJn0Ftn=p2nt=p
125 114 124 bitr3id tJn0p=tFn2nt=p
126 29 125 sylan2 tJnbitsAtp=tFn2nt=p
127 126 rexbidva tJnbitsAtp=tFnnbitsAt2nt=p
128 110 127 bitrd tJpFt×bitsAtnbitsAt2nt=p
129 17 128 syl tA-1JpFt×bitsAtnbitsAt2nt=p
130 129 rexbiia tA-1JpFt×bitsAttA-1JnbitsAt2nt=p
131 97 98 130 3bitri pFUtA-1JnbitsAt2nt=p
132 131 a1i ATRpFUtA-1JnbitsAt2nt=p
133 89 93 132 3bitr4rd ATRpFUpm|tnbitsAt2nt=m
134 133 eqrdv ATRFU=m|tnbitsAt2nt=m
135 f1oeq3 FU=m|tnbitsAt2nt=mFU:U1-1 ontoFUFU:U1-1 ontom|tnbitsAt2nt=m
136 134 135 syl ATRFU:U1-1 ontoFUFU:U1-1 ontom|tnbitsAt2nt=m
137 25 136 mpbii ATRFU:U1-1 ontom|tnbitsAt2nt=m