Metamath Proof Explorer


Theorem ptcmplem2

Description: Lemma for ptcmp . (Contributed by Mario Carneiro, 26-Aug-2015)

Ref Expression
Hypotheses ptcmp.1 S = k A , u F k w X w k -1 u
ptcmp.2 X = n A F n
ptcmp.3 φ A V
ptcmp.4 φ F : A Comp
ptcmp.5 φ X UFL dom card
ptcmplem2.5 φ U ran S
ptcmplem2.6 φ X = U
ptcmplem2.7 φ ¬ z 𝒫 U Fin X = z
Assertion ptcmplem2 φ k n A | ¬ F n 1 𝑜 F k dom card

Proof

Step Hyp Ref Expression
1 ptcmp.1 S = k A , u F k w X w k -1 u
2 ptcmp.2 X = n A F n
3 ptcmp.3 φ A V
4 ptcmp.4 φ F : A Comp
5 ptcmp.5 φ X UFL dom card
6 ptcmplem2.5 φ U ran S
7 ptcmplem2.6 φ X = U
8 ptcmplem2.7 φ ¬ z 𝒫 U Fin X = z
9 0ss U
10 0fin Fin
11 elfpw 𝒫 U Fin U Fin
12 9 10 11 mpbir2an 𝒫 U Fin
13 unieq z = z =
14 uni0 =
15 13 14 eqtrdi z = z =
16 15 rspceeqv 𝒫 U Fin X = z 𝒫 U Fin X = z
17 12 16 mpan X = z 𝒫 U Fin X = z
18 17 necon3bi ¬ z 𝒫 U Fin X = z X
19 8 18 syl φ X
20 n0 X f f X
21 19 20 sylib φ f f X
22 fveq2 n = k F n = F k
23 22 unieqd n = k F n = F k
24 23 cbvixpv n A F n = k A F k
25 2 24 eqtri X = k A F k
26 5 elin2d φ X dom card
27 26 adantr φ f X X dom card
28 25 27 eqeltrrid φ f X k A F k dom card
29 ssrab2 n A | ¬ F n 1 𝑜 A
30 19 adantr φ f X X
31 25 30 eqnetrrid φ f X k A F k
32 eqid g k A F k g n A | ¬ F n 1 𝑜 = g k A F k g n A | ¬ F n 1 𝑜
33 32 resixpfo n A | ¬ F n 1 𝑜 A k A F k g k A F k g n A | ¬ F n 1 𝑜 : k A F k onto k n A | ¬ F n 1 𝑜 F k
34 29 31 33 sylancr φ f X g k A F k g n A | ¬ F n 1 𝑜 : k A F k onto k n A | ¬ F n 1 𝑜 F k
35 fonum k A F k dom card g k A F k g n A | ¬ F n 1 𝑜 : k A F k onto k n A | ¬ F n 1 𝑜 F k k n A | ¬ F n 1 𝑜 F k dom card
36 28 34 35 syl2anc φ f X k n A | ¬ F n 1 𝑜 F k dom card
37 vex g V
38 difexg g V g f V
39 37 38 mp1i φ f X g f V
40 dmexg g f V dom g f V
41 uniexg dom g f V dom g f V
42 39 40 41 3syl φ f X dom g f V
43 42 ralrimivw φ f X g X dom g f V
44 eqid g X dom g f = g X dom g f
45 44 fnmpt g X dom g f V g X dom g f Fn X
46 43 45 syl φ f X g X dom g f Fn X
47 dffn4 g X dom g f Fn X g X dom g f : X onto ran g X dom g f
48 46 47 sylib φ f X g X dom g f : X onto ran g X dom g f
49 fonum X dom card g X dom g f : X onto ran g X dom g f ran g X dom g f dom card
50 27 48 49 syl2anc φ f X ran g X dom g f dom card
51 ssdif0 F k f k F k f k =
52 simpr φ f X k A F k f k F k f k
53 simpr φ f X f X
54 53 25 eleqtrdi φ f X f k A F k
55 vex f V
56 55 elixp f k A F k f Fn A k A f k F k
57 56 simprbi f k A F k k A f k F k
58 54 57 syl φ f X k A f k F k
59 58 r19.21bi φ f X k A f k F k
60 59 snssd φ f X k A f k F k
61 60 adantr φ f X k A F k f k f k F k
62 52 61 eqssd φ f X k A F k f k F k = f k
63 fvex f k V
64 63 ensn1 f k 1 𝑜
65 62 64 eqbrtrdi φ f X k A F k f k F k 1 𝑜
66 65 ex φ f X k A F k f k F k 1 𝑜
67 51 66 syl5bir φ f X k A F k f k = F k 1 𝑜
68 67 con3d φ f X k A ¬ F k 1 𝑜 ¬ F k f k =
69 neq0 ¬ F k f k = x x F k f k
70 68 69 syl6ib φ f X k A ¬ F k 1 𝑜 x x F k f k
71 eldifi x F k f k x F k
72 simplr φ f X k A x F k n A x F k
73 iftrue n = k if n = k x f n = x
74 73 23 eleq12d n = k if n = k x f n F n x F k
75 72 74 syl5ibrcom φ f X k A x F k n A n = k if n = k x f n F n
76 53 2 eleqtrdi φ f X f n A F n
77 55 elixp f n A F n f Fn A n A f n F n
78 77 simprbi f n A F n n A f n F n
79 76 78 syl φ f X n A f n F n
80 79 ad2antrr φ f X k A x F k n A f n F n
81 80 r19.21bi φ f X k A x F k n A f n F n
82 iffalse ¬ n = k if n = k x f n = f n
83 82 eleq1d ¬ n = k if n = k x f n F n f n F n
84 81 83 syl5ibrcom φ f X k A x F k n A ¬ n = k if n = k x f n F n
85 75 84 pm2.61d φ f X k A x F k n A if n = k x f n F n
86 85 ralrimiva φ f X k A x F k n A if n = k x f n F n
87 3 ad3antrrr φ f X k A x F k A V
88 mptelixpg A V n A if n = k x f n n A F n n A if n = k x f n F n
89 87 88 syl φ f X k A x F k n A if n = k x f n n A F n n A if n = k x f n F n
90 86 89 mpbird φ f X k A x F k n A if n = k x f n n A F n
91 90 2 eleqtrrdi φ f X k A x F k n A if n = k x f n X
92 71 91 sylan2 φ f X k A x F k f k n A if n = k x f n X
93 vex k V
94 93 unisn k = k
95 simplr φ f X k A x F k f k k A
96 eleq1w m = k m A k A
97 95 96 syl5ibrcom φ f X k A x F k f k m = k m A
98 97 pm4.71rd φ f X k A x F k f k m = k m A m = k
99 equequ1 n = m n = k m = k
100 fveq2 n = m f n = f m
101 99 100 ifbieq2d n = m if n = k x f n = if m = k x f m
102 eqid n A if n = k x f n = n A if n = k x f n
103 vex x V
104 fvex f m V
105 103 104 ifex if m = k x f m V
106 101 102 105 fvmpt m A n A if n = k x f n m = if m = k x f m
107 106 neeq1d m A n A if n = k x f n m f m if m = k x f m f m
108 107 adantl φ f X k A x F k f k m A n A if n = k x f n m f m if m = k x f m f m
109 iffalse ¬ m = k if m = k x f m = f m
110 109 necon1ai if m = k x f m f m m = k
111 eldifsni x F k f k x f k
112 111 ad2antlr φ f X k A x F k f k m A x f k
113 iftrue m = k if m = k x f m = x
114 fveq2 m = k f m = f k
115 113 114 neeq12d m = k if m = k x f m f m x f k
116 112 115 syl5ibrcom φ f X k A x F k f k m A m = k if m = k x f m f m
117 110 116 impbid2 φ f X k A x F k f k m A if m = k x f m f m m = k
118 108 117 bitrd φ f X k A x F k f k m A n A if n = k x f n m f m m = k
119 118 pm5.32da φ f X k A x F k f k m A n A if n = k x f n m f m m A m = k
120 98 119 bitr4d φ f X k A x F k f k m = k m A n A if n = k x f n m f m
121 120 abbidv φ f X k A x F k f k m | m = k = m | m A n A if n = k x f n m f m
122 df-sn k = m | m = k
123 df-rab m A | n A if n = k x f n m f m = m | m A n A if n = k x f n m f m
124 121 122 123 3eqtr4g φ f X k A x F k f k k = m A | n A if n = k x f n m f m
125 fvex f n V
126 103 125 ifex if n = k x f n V
127 126 rgenw n A if n = k x f n V
128 102 fnmpt n A if n = k x f n V n A if n = k x f n Fn A
129 127 128 mp1i φ f X k A x F k f k n A if n = k x f n Fn A
130 ixpfn f n A F n f Fn A
131 76 130 syl φ f X f Fn A
132 131 ad2antrr φ f X k A x F k f k f Fn A
133 fndmdif n A if n = k x f n Fn A f Fn A dom n A if n = k x f n f = m A | n A if n = k x f n m f m
134 129 132 133 syl2anc φ f X k A x F k f k dom n A if n = k x f n f = m A | n A if n = k x f n m f m
135 124 134 eqtr4d φ f X k A x F k f k k = dom n A if n = k x f n f
136 135 unieqd φ f X k A x F k f k k = dom n A if n = k x f n f
137 94 136 eqtr3id φ f X k A x F k f k k = dom n A if n = k x f n f
138 difeq1 g = n A if n = k x f n g f = n A if n = k x f n f
139 138 dmeqd g = n A if n = k x f n dom g f = dom n A if n = k x f n f
140 139 unieqd g = n A if n = k x f n dom g f = dom n A if n = k x f n f
141 140 rspceeqv n A if n = k x f n X k = dom n A if n = k x f n f g X k = dom g f
142 92 137 141 syl2anc φ f X k A x F k f k g X k = dom g f
143 142 ex φ f X k A x F k f k g X k = dom g f
144 143 exlimdv φ f X k A x x F k f k g X k = dom g f
145 70 144 syld φ f X k A ¬ F k 1 𝑜 g X k = dom g f
146 145 expimpd φ f X k A ¬ F k 1 𝑜 g X k = dom g f
147 23 breq1d n = k F n 1 𝑜 F k 1 𝑜
148 147 notbid n = k ¬ F n 1 𝑜 ¬ F k 1 𝑜
149 148 elrab k n A | ¬ F n 1 𝑜 k A ¬ F k 1 𝑜
150 44 elrnmpt k V k ran g X dom g f g X k = dom g f
151 150 elv k ran g X dom g f g X k = dom g f
152 146 149 151 3imtr4g φ f X k n A | ¬ F n 1 𝑜 k ran g X dom g f
153 152 ssrdv φ f X n A | ¬ F n 1 𝑜 ran g X dom g f
154 ssnum ran g X dom g f dom card n A | ¬ F n 1 𝑜 ran g X dom g f n A | ¬ F n 1 𝑜 dom card
155 50 153 154 syl2anc φ f X n A | ¬ F n 1 𝑜 dom card
156 xpnum k n A | ¬ F n 1 𝑜 F k dom card n A | ¬ F n 1 𝑜 dom card k n A | ¬ F n 1 𝑜 F k × n A | ¬ F n 1 𝑜 dom card
157 36 155 156 syl2anc φ f X k n A | ¬ F n 1 𝑜 F k × n A | ¬ F n 1 𝑜 dom card
158 3 adantr φ f X A V
159 rabexg A V n A | ¬ F n 1 𝑜 V
160 158 159 syl φ f X n A | ¬ F n 1 𝑜 V
161 fvex F k V
162 161 uniex F k V
163 162 rgenw k n A | ¬ F n 1 𝑜 F k V
164 iunexg n A | ¬ F n 1 𝑜 V k n A | ¬ F n 1 𝑜 F k V k n A | ¬ F n 1 𝑜 F k V
165 160 163 164 sylancl φ f X k n A | ¬ F n 1 𝑜 F k V
166 resixp n A | ¬ F n 1 𝑜 A f k A F k f n A | ¬ F n 1 𝑜 k n A | ¬ F n 1 𝑜 F k
167 29 54 166 sylancr φ f X f n A | ¬ F n 1 𝑜 k n A | ¬ F n 1 𝑜 F k
168 167 ne0d φ f X k n A | ¬ F n 1 𝑜 F k
169 ixpiunwdom n A | ¬ F n 1 𝑜 V k n A | ¬ F n 1 𝑜 F k V k n A | ¬ F n 1 𝑜 F k k n A | ¬ F n 1 𝑜 F k * k n A | ¬ F n 1 𝑜 F k × n A | ¬ F n 1 𝑜
170 160 165 168 169 syl3anc φ f X k n A | ¬ F n 1 𝑜 F k * k n A | ¬ F n 1 𝑜 F k × n A | ¬ F n 1 𝑜
171 numwdom k n A | ¬ F n 1 𝑜 F k × n A | ¬ F n 1 𝑜 dom card k n A | ¬ F n 1 𝑜 F k * k n A | ¬ F n 1 𝑜 F k × n A | ¬ F n 1 𝑜 k n A | ¬ F n 1 𝑜 F k dom card
172 157 170 171 syl2anc φ f X k n A | ¬ F n 1 𝑜 F k dom card
173 21 172 exlimddv φ k n A | ¬ F n 1 𝑜 F k dom card