Metamath Proof Explorer


Theorem wessf1ornlem

Description: Given a function F on a well-ordered domain A there exists a subset of A such that F restricted to such subset is injective and onto the range of F (without using the axiom of choice). (Contributed by Glauco Siliprandi, 17-Aug-2020)

Ref Expression
Hypotheses wessf1ornlem.f φ F Fn A
wessf1ornlem.a φ A V
wessf1ornlem.r φ R We A
wessf1ornlem.g G = y ran F ι x F -1 y | z F -1 y ¬ z R x
Assertion wessf1ornlem φ x 𝒫 A F x : x 1-1 onto ran F

Proof

Step Hyp Ref Expression
1 wessf1ornlem.f φ F Fn A
2 wessf1ornlem.a φ A V
3 wessf1ornlem.r φ R We A
4 wessf1ornlem.g G = y ran F ι x F -1 y | z F -1 y ¬ z R x
5 cnvimass F -1 u dom F
6 1 fndmd φ dom F = A
7 6 adantr φ u ran F dom F = A
8 5 7 sseqtrid φ u ran F F -1 u A
9 3 adantr φ u ran F R We A
10 5 6 sseqtrid φ F -1 u A
11 2 10 ssexd φ F -1 u V
12 11 adantr φ u ran F F -1 u V
13 inisegn0 u ran F F -1 u
14 13 biimpi u ran F F -1 u
15 14 adantl φ u ran F F -1 u
16 wereu R We A F -1 u V F -1 u A F -1 u ∃! v F -1 u t F -1 u ¬ t R v
17 9 12 8 15 16 syl13anc φ u ran F ∃! v F -1 u t F -1 u ¬ t R v
18 riotacl ∃! v F -1 u t F -1 u ¬ t R v ι v F -1 u | t F -1 u ¬ t R v F -1 u
19 17 18 syl φ u ran F ι v F -1 u | t F -1 u ¬ t R v F -1 u
20 8 19 sseldd φ u ran F ι v F -1 u | t F -1 u ¬ t R v A
21 20 ralrimiva φ u ran F ι v F -1 u | t F -1 u ¬ t R v A
22 sneq y = u y = u
23 22 imaeq2d y = u F -1 y = F -1 u
24 23 raleqdv y = u z F -1 y ¬ z R x z F -1 u ¬ z R x
25 23 24 riotaeqbidv y = u ι x F -1 y | z F -1 y ¬ z R x = ι x F -1 u | z F -1 u ¬ z R x
26 breq1 z = t z R x t R x
27 26 notbid z = t ¬ z R x ¬ t R x
28 27 cbvralvw z F -1 u ¬ z R x t F -1 u ¬ t R x
29 breq2 x = v t R x t R v
30 29 notbid x = v ¬ t R x ¬ t R v
31 30 ralbidv x = v t F -1 u ¬ t R x t F -1 u ¬ t R v
32 28 31 syl5bb x = v z F -1 u ¬ z R x t F -1 u ¬ t R v
33 32 cbvriotavw ι x F -1 u | z F -1 u ¬ z R x = ι v F -1 u | t F -1 u ¬ t R v
34 25 33 eqtrdi y = u ι x F -1 y | z F -1 y ¬ z R x = ι v F -1 u | t F -1 u ¬ t R v
35 34 cbvmptv y ran F ι x F -1 y | z F -1 y ¬ z R x = u ran F ι v F -1 u | t F -1 u ¬ t R v
36 4 35 eqtri G = u ran F ι v F -1 u | t F -1 u ¬ t R v
37 36 rnmptss u ran F ι v F -1 u | t F -1 u ¬ t R v A ran G A
38 21 37 syl φ ran G A
39 2 38 sselpwd φ ran G 𝒫 A
40 dffn3 F Fn A F : A ran F
41 1 40 sylib φ F : A ran F
42 41 38 fssresd φ F ran G : ran G ran F
43 fvres w ran G F ran G w = F w
44 43 eqcomd w ran G F w = F ran G w
45 44 ad2antrr w ran G t ran G F ran G w = F ran G t F w = F ran G w
46 simpr w ran G t ran G F ran G w = F ran G t F ran G w = F ran G t
47 fvres t ran G F ran G t = F t
48 47 ad2antlr w ran G t ran G F ran G w = F ran G t F ran G t = F t
49 45 46 48 3eqtrd w ran G t ran G F ran G w = F ran G t F w = F t
50 49 3adantl1 φ w ran G t ran G F ran G w = F ran G t F w = F t
51 simpl1 φ w ran G t ran G F w = F t φ
52 simpl3 φ w ran G t ran G F w = F t t ran G
53 simpl2 φ w ran G t ran G F w = F t w ran G
54 id F w = F t F w = F t
55 54 eqcomd F w = F t F t = F w
56 55 adantl φ w ran G t ran G F w = F t F t = F w
57 eleq1w b = w b ran G w ran G
58 57 3anbi3d b = w φ t ran G b ran G φ t ran G w ran G
59 fveq2 b = w F b = F w
60 59 eqeq2d b = w F t = F b F t = F w
61 58 60 anbi12d b = w φ t ran G b ran G F t = F b φ t ran G w ran G F t = F w
62 breq1 b = w b R t w R t
63 62 notbid b = w ¬ b R t ¬ w R t
64 61 63 imbi12d b = w φ t ran G b ran G F t = F b ¬ b R t φ t ran G w ran G F t = F w ¬ w R t
65 eleq1w a = t a ran G t ran G
66 65 3anbi2d a = t φ a ran G b ran G φ t ran G b ran G
67 fveqeq2 a = t F a = F b F t = F b
68 66 67 anbi12d a = t φ a ran G b ran G F a = F b φ t ran G b ran G F t = F b
69 breq2 a = t b R a b R t
70 69 notbid a = t ¬ b R a ¬ b R t
71 68 70 imbi12d a = t φ a ran G b ran G F a = F b ¬ b R a φ t ran G b ran G F t = F b ¬ b R t
72 eleq1w t = b t ran G b ran G
73 72 3anbi3d t = b φ a ran G t ran G φ a ran G b ran G
74 fveq2 t = b F t = F b
75 74 eqeq2d t = b F a = F t F a = F b
76 73 75 anbi12d t = b φ a ran G t ran G F a = F t φ a ran G b ran G F a = F b
77 breq1 t = b t R a b R a
78 77 notbid t = b ¬ t R a ¬ b R a
79 76 78 imbi12d t = b φ a ran G t ran G F a = F t ¬ t R a φ a ran G b ran G F a = F b ¬ b R a
80 eleq1w w = a w ran G a ran G
81 80 3anbi2d w = a φ w ran G t ran G φ a ran G t ran G
82 fveqeq2 w = a F w = F t F a = F t
83 81 82 anbi12d w = a φ w ran G t ran G F w = F t φ a ran G t ran G F a = F t
84 breq2 w = a t R w t R a
85 84 notbid w = a ¬ t R w ¬ t R a
86 83 85 imbi12d w = a φ w ran G t ran G F w = F t ¬ t R w φ a ran G t ran G F a = F t ¬ t R a
87 36 elrnmpt w V w ran G u ran F w = ι v F -1 u | t F -1 u ¬ t R v
88 87 elv w ran G u ran F w = ι v F -1 u | t F -1 u ¬ t R v
89 88 biimpi w ran G u ran F w = ι v F -1 u | t F -1 u ¬ t R v
90 89 adantr w ran G F w = F t u ran F w = ι v F -1 u | t F -1 u ¬ t R v
91 90 3ad2antl2 φ w ran G t ran G F w = F t u ran F w = ι v F -1 u | t F -1 u ¬ t R v
92 simp3 φ w ran G t ran G u ran F w = ι v F -1 u | t F -1 u ¬ t R v w = ι v F -1 u | t F -1 u ¬ t R v
93 92 eqcomd φ w ran G t ran G u ran F w = ι v F -1 u | t F -1 u ¬ t R v ι v F -1 u | t F -1 u ¬ t R v = w
94 simp11 φ w ran G t ran G u ran F w = ι v F -1 u | t F -1 u ¬ t R v φ
95 id w = ι v F -1 u | t F -1 u ¬ t R v w = ι v F -1 u | t F -1 u ¬ t R v
96 breq2 v = w t R v t R w
97 96 notbid v = w ¬ t R v ¬ t R w
98 97 ralbidv v = w t F -1 u ¬ t R v t F -1 u ¬ t R w
99 98 cbvriotavw ι v F -1 u | t F -1 u ¬ t R v = ι w F -1 u | t F -1 u ¬ t R w
100 95 99 eqtr2di w = ι v F -1 u | t F -1 u ¬ t R v ι w F -1 u | t F -1 u ¬ t R w = w
101 100 3ad2ant3 φ u ran F w = ι v F -1 u | t F -1 u ¬ t R v ι w F -1 u | t F -1 u ¬ t R w = w
102 98 cbvreuvw ∃! v F -1 u t F -1 u ¬ t R v ∃! w F -1 u t F -1 u ¬ t R w
103 17 102 sylib φ u ran F ∃! w F -1 u t F -1 u ¬ t R w
104 riota1 ∃! w F -1 u t F -1 u ¬ t R w w F -1 u t F -1 u ¬ t R w ι w F -1 u | t F -1 u ¬ t R w = w
105 103 104 syl φ u ran F w F -1 u t F -1 u ¬ t R w ι w F -1 u | t F -1 u ¬ t R w = w
106 105 3adant3 φ u ran F w = ι v F -1 u | t F -1 u ¬ t R v w F -1 u t F -1 u ¬ t R w ι w F -1 u | t F -1 u ¬ t R w = w
107 101 106 mpbird φ u ran F w = ι v F -1 u | t F -1 u ¬ t R v w F -1 u t F -1 u ¬ t R w
108 107 simpld φ u ran F w = ι v F -1 u | t F -1 u ¬ t R v w F -1 u
109 94 108 syld3an1 φ w ran G t ran G u ran F w = ι v F -1 u | t F -1 u ¬ t R v w F -1 u
110 simp2 φ w ran G t ran G u ran F w = ι v F -1 u | t F -1 u ¬ t R v u ran F
111 94 110 17 syl2anc φ w ran G t ran G u ran F w = ι v F -1 u | t F -1 u ¬ t R v ∃! v F -1 u t F -1 u ¬ t R v
112 98 riota2 w F -1 u ∃! v F -1 u t F -1 u ¬ t R v t F -1 u ¬ t R w ι v F -1 u | t F -1 u ¬ t R v = w
113 109 111 112 syl2anc φ w ran G t ran G u ran F w = ι v F -1 u | t F -1 u ¬ t R v t F -1 u ¬ t R w ι v F -1 u | t F -1 u ¬ t R v = w
114 93 113 mpbird φ w ran G t ran G u ran F w = ι v F -1 u | t F -1 u ¬ t R v t F -1 u ¬ t R w
115 114 3adant1r φ w ran G t ran G F w = F t u ran F w = ι v F -1 u | t F -1 u ¬ t R v t F -1 u ¬ t R w
116 38 sselda φ t ran G t A
117 116 3adant2 φ w ran G t ran G t A
118 117 adantr φ w ran G t ran G F w = F t t A
119 118 3ad2ant1 φ w ran G t ran G F w = F t u ran F w = ι v F -1 u | t F -1 u ¬ t R v t A
120 55 ad2antlr φ w ran G t ran G F w = F t u ran F F t = F w
121 120 3adant3 φ w ran G t ran G F w = F t u ran F w = ι v F -1 u | t F -1 u ¬ t R v F t = F w
122 fniniseg F Fn A w F -1 u w A F w = u
123 94 1 122 3syl φ w ran G t ran G u ran F w = ι v F -1 u | t F -1 u ¬ t R v w F -1 u w A F w = u
124 109 123 mpbid φ w ran G t ran G u ran F w = ι v F -1 u | t F -1 u ¬ t R v w A F w = u
125 124 simprd φ w ran G t ran G u ran F w = ι v F -1 u | t F -1 u ¬ t R v F w = u
126 125 3adant1r φ w ran G t ran G F w = F t u ran F w = ι v F -1 u | t F -1 u ¬ t R v F w = u
127 121 126 eqtrd φ w ran G t ran G F w = F t u ran F w = ι v F -1 u | t F -1 u ¬ t R v F t = u
128 fniniseg F Fn A t F -1 u t A F t = u
129 1 128 syl φ t F -1 u t A F t = u
130 129 3ad2ant1 φ w ran G t ran G t F -1 u t A F t = u
131 130 ad2antrr φ w ran G t ran G F w = F t u ran F t F -1 u t A F t = u
132 131 3adant3 φ w ran G t ran G F w = F t u ran F w = ι v F -1 u | t F -1 u ¬ t R v t F -1 u t A F t = u
133 119 127 132 mpbir2and φ w ran G t ran G F w = F t u ran F w = ι v F -1 u | t F -1 u ¬ t R v t F -1 u
134 rspa t F -1 u ¬ t R w t F -1 u ¬ t R w
135 115 133 134 syl2anc φ w ran G t ran G F w = F t u ran F w = ι v F -1 u | t F -1 u ¬ t R v ¬ t R w
136 135 rexlimdv3a φ w ran G t ran G F w = F t u ran F w = ι v F -1 u | t F -1 u ¬ t R v ¬ t R w
137 91 136 mpd φ w ran G t ran G F w = F t ¬ t R w
138 86 137 chvarvv φ a ran G t ran G F a = F t ¬ t R a
139 79 138 chvarvv φ a ran G b ran G F a = F b ¬ b R a
140 71 139 chvarvv φ t ran G b ran G F t = F b ¬ b R t
141 64 140 chvarvv φ t ran G w ran G F t = F w ¬ w R t
142 51 52 53 56 141 syl31anc φ w ran G t ran G F w = F t ¬ w R t
143 weso R We A R Or A
144 3 143 syl φ R Or A
145 144 adantr φ F w = F t R Or A
146 145 3ad2antl1 φ w ran G t ran G F w = F t R Or A
147 38 sselda φ w ran G w A
148 147 3adant3 φ w ran G t ran G w A
149 148 adantr φ w ran G t ran G F w = F t w A
150 sotrieq2 R Or A w A t A w = t ¬ w R t ¬ t R w
151 146 149 118 150 syl12anc φ w ran G t ran G F w = F t w = t ¬ w R t ¬ t R w
152 142 137 151 mpbir2and φ w ran G t ran G F w = F t w = t
153 50 152 syldan φ w ran G t ran G F ran G w = F ran G t w = t
154 153 ex φ w ran G t ran G F ran G w = F ran G t w = t
155 154 3expb φ w ran G t ran G F ran G w = F ran G t w = t
156 155 ralrimivva φ w ran G t ran G F ran G w = F ran G t w = t
157 dff13 F ran G : ran G 1-1 ran F F ran G : ran G ran F w ran G t ran G F ran G w = F ran G t w = t
158 42 156 157 sylanbrc φ F ran G : ran G 1-1 ran F
159 riotaex ι v F -1 u | t F -1 u ¬ t R v V
160 159 rgenw u ran F ι v F -1 u | t F -1 u ¬ t R v V
161 36 fnmpt u ran F ι v F -1 u | t F -1 u ¬ t R v V G Fn ran F
162 160 161 mp1i φ G Fn ran F
163 dffn3 G Fn ran F G : ran F ran G
164 162 163 sylib φ G : ran F ran G
165 164 ffvelrnda φ u ran F G u ran G
166 165 fvresd φ u ran F F ran G G u = F G u
167 simpr φ u ran F u ran F
168 159 a1i φ u ran F ι v F -1 u | t F -1 u ¬ t R v V
169 4 34 167 168 fvmptd3 φ u ran F G u = ι v F -1 u | t F -1 u ¬ t R v
170 169 19 eqeltrd φ u ran F G u F -1 u
171 fvex G u V
172 eleq1 w = G u w F -1 u G u F -1 u
173 eleq1 w = G u w A G u A
174 fveqeq2 w = G u F w = u F G u = u
175 173 174 anbi12d w = G u w A F w = u G u A F G u = u
176 172 175 bibi12d w = G u w F -1 u w A F w = u G u F -1 u G u A F G u = u
177 176 imbi2d w = G u φ w F -1 u w A F w = u φ G u F -1 u G u A F G u = u
178 1 122 syl φ w F -1 u w A F w = u
179 171 177 178 vtocl φ G u F -1 u G u A F G u = u
180 179 adantr φ u ran F G u F -1 u G u A F G u = u
181 170 180 mpbid φ u ran F G u A F G u = u
182 181 simprd φ u ran F F G u = u
183 166 182 eqtr2d φ u ran F u = F ran G G u
184 fveq2 w = G u F ran G w = F ran G G u
185 184 rspceeqv G u ran G u = F ran G G u w ran G u = F ran G w
186 165 183 185 syl2anc φ u ran F w ran G u = F ran G w
187 186 ralrimiva φ u ran F w ran G u = F ran G w
188 dffo3 F ran G : ran G onto ran F F ran G : ran G ran F u ran F w ran G u = F ran G w
189 42 187 188 sylanbrc φ F ran G : ran G onto ran F
190 df-f1o F ran G : ran G 1-1 onto ran F F ran G : ran G 1-1 ran F F ran G : ran G onto ran F
191 158 189 190 sylanbrc φ F ran G : ran G 1-1 onto ran F
192 reseq2 v = ran G F v = F ran G
193 id v = ran G v = ran G
194 eqidd v = ran G ran F = ran F
195 192 193 194 f1oeq123d v = ran G F v : v 1-1 onto ran F F ran G : ran G 1-1 onto ran F
196 195 rspcev ran G 𝒫 A F ran G : ran G 1-1 onto ran F v 𝒫 A F v : v 1-1 onto ran F
197 39 191 196 syl2anc φ v 𝒫 A F v : v 1-1 onto ran F
198 reseq2 v = x F v = F x
199 id v = x v = x
200 eqidd v = x ran F = ran F
201 198 199 200 f1oeq123d v = x F v : v 1-1 onto ran F F x : x 1-1 onto ran F
202 201 cbvrexvw v 𝒫 A F v : v 1-1 onto ran F x 𝒫 A F x : x 1-1 onto ran F
203 197 202 sylib φ x 𝒫 A F x : x 1-1 onto ran F