Metamath Proof Explorer


Theorem frxp

Description: A lexicographical ordering of two well-founded classes. (Contributed by Scott Fenton, 17-Mar-2011) (Revised by Mario Carneiro, 7-Mar-2013) (Proof shortened by Wolf Lammen, 4-Oct-2014)

Ref Expression
Hypothesis frxp.1 T = x y | x A × B y A × B 1 st x R 1 st y 1 st x = 1 st y 2 nd x S 2 nd y
Assertion frxp R Fr A S Fr B T Fr A × B

Proof

Step Hyp Ref Expression
1 frxp.1 T = x y | x A × B y A × B 1 st x R 1 st y 1 st x = 1 st y 2 nd x S 2 nd y
2 ssn0 s A × B s A × B
3 xpnz A B A × B
4 3 biimpri A × B A B
5 4 simprd A × B B
6 2 5 syl s A × B s B
7 dmxp B dom A × B = A
8 dmss s A × B dom s dom A × B
9 sseq2 dom A × B = A dom s dom A × B dom s A
10 8 9 syl5ib dom A × B = A s A × B dom s A
11 7 10 syl B s A × B dom s A
12 11 impcom s A × B B dom s A
13 6 12 syldan s A × B s dom s A
14 relxp Rel A × B
15 relss s A × B Rel A × B Rel s
16 14 15 mpi s A × B Rel s
17 reldm0 Rel s s = dom s =
18 16 17 syl s A × B s = dom s =
19 18 necon3bid s A × B s dom s
20 19 biimpa s A × B s dom s
21 13 20 jca s A × B s dom s A dom s
22 df-fr R Fr A v v A v a v c v ¬ c R a
23 vex s V
24 23 dmex dom s V
25 sseq1 v = dom s v A dom s A
26 neeq1 v = dom s v dom s
27 25 26 anbi12d v = dom s v A v dom s A dom s
28 raleq v = dom s c v ¬ c R a c dom s ¬ c R a
29 28 rexeqbi1dv v = dom s a v c v ¬ c R a a dom s c dom s ¬ c R a
30 27 29 imbi12d v = dom s v A v a v c v ¬ c R a dom s A dom s a dom s c dom s ¬ c R a
31 24 30 spcv v v A v a v c v ¬ c R a dom s A dom s a dom s c dom s ¬ c R a
32 22 31 sylbi R Fr A dom s A dom s a dom s c dom s ¬ c R a
33 21 32 syl5 R Fr A s A × B s a dom s c dom s ¬ c R a
34 33 adantr R Fr A S Fr B s A × B s a dom s c dom s ¬ c R a
35 imassrn s a ran s
36 xpeq0 A × B = A = B =
37 36 biimpri A = B = A × B =
38 37 orcs A = A × B =
39 sseq2 A × B = s A × B s
40 ss0 s s =
41 39 40 syl6bi A × B = s A × B s =
42 38 41 syl A = s A × B s =
43 rneq s = ran s = ran
44 rn0 ran =
45 0ss B
46 44 45 eqsstri ran B
47 43 46 eqsstrdi s = ran s B
48 42 47 syl6 A = s A × B ran s B
49 rnxp A ran A × B = B
50 rnss s A × B ran s ran A × B
51 sseq2 ran A × B = B ran s ran A × B ran s B
52 50 51 syl5ib ran A × B = B s A × B ran s B
53 49 52 syl A s A × B ran s B
54 48 53 pm2.61ine s A × B ran s B
55 35 54 sstrid s A × B s a B
56 vex a V
57 56 eldm a dom s b a s b
58 vex b V
59 56 58 elimasn b s a a b s
60 df-br a s b a b s
61 59 60 bitr4i b s a a s b
62 ne0i b s a s a
63 61 62 sylbir a s b s a
64 63 exlimiv b a s b s a
65 57 64 sylbi a dom s s a
66 df-fr S Fr B v v B v b v d v ¬ d S b
67 23 imaex s a V
68 sseq1 v = s a v B s a B
69 neeq1 v = s a v s a
70 68 69 anbi12d v = s a v B v s a B s a
71 raleq v = s a d v ¬ d S b d s a ¬ d S b
72 71 rexeqbi1dv v = s a b v d v ¬ d S b b s a d s a ¬ d S b
73 70 72 imbi12d v = s a v B v b v d v ¬ d S b s a B s a b s a d s a ¬ d S b
74 67 73 spcv v v B v b v d v ¬ d S b s a B s a b s a d s a ¬ d S b
75 66 74 sylbi S Fr B s a B s a b s a d s a ¬ d S b
76 55 65 75 syl2ani S Fr B s A × B a dom s b s a d s a ¬ d S b
77 1stdm Rel s w s 1 st w dom s
78 breq1 c = 1 st w c R a 1 st w R a
79 78 notbid c = 1 st w ¬ c R a ¬ 1 st w R a
80 79 rspccv c dom s ¬ c R a 1 st w dom s ¬ 1 st w R a
81 77 80 syl5 c dom s ¬ c R a Rel s w s ¬ 1 st w R a
82 81 expd c dom s ¬ c R a Rel s w s ¬ 1 st w R a
83 82 impcom Rel s c dom s ¬ c R a w s ¬ 1 st w R a
84 83 adantr Rel s c dom s ¬ c R a d s a ¬ d S b w s ¬ 1 st w R a
85 elrel Rel s w s t u w = t u
86 85 ex Rel s w s t u w = t u
87 86 adantr Rel s d s a ¬ d S b w s t u w = t u
88 vex u V
89 56 88 elimasn u s a a u s
90 breq1 d = u d S b u S b
91 90 notbid d = u ¬ d S b ¬ u S b
92 91 rspccv d s a ¬ d S b u s a ¬ u S b
93 89 92 syl5bir d s a ¬ d S b a u s ¬ u S b
94 93 adantl Rel s d s a ¬ d S b a u s ¬ u S b
95 opeq1 t = a t u = a u
96 95 eleq1d t = a t u s a u s
97 96 imbi1d t = a t u s ¬ u S b a u s ¬ u S b
98 94 97 syl5ibr t = a Rel s d s a ¬ d S b t u s ¬ u S b
99 98 com3l Rel s d s a ¬ d S b t u s t = a ¬ u S b
100 eleq1 w = t u w s t u s
101 vex t V
102 101 88 op1std w = t u 1 st w = t
103 102 eqeq1d w = t u 1 st w = a t = a
104 101 88 op2ndd w = t u 2 nd w = u
105 104 breq1d w = t u 2 nd w S b u S b
106 105 notbid w = t u ¬ 2 nd w S b ¬ u S b
107 103 106 imbi12d w = t u 1 st w = a ¬ 2 nd w S b t = a ¬ u S b
108 100 107 imbi12d w = t u w s 1 st w = a ¬ 2 nd w S b t u s t = a ¬ u S b
109 99 108 syl5ibr w = t u Rel s d s a ¬ d S b w s 1 st w = a ¬ 2 nd w S b
110 109 exlimivv t u w = t u Rel s d s a ¬ d S b w s 1 st w = a ¬ 2 nd w S b
111 110 com3l Rel s d s a ¬ d S b w s t u w = t u 1 st w = a ¬ 2 nd w S b
112 87 111 mpdd Rel s d s a ¬ d S b w s 1 st w = a ¬ 2 nd w S b
113 112 adantlr Rel s c dom s ¬ c R a d s a ¬ d S b w s 1 st w = a ¬ 2 nd w S b
114 84 113 jcad Rel s c dom s ¬ c R a d s a ¬ d S b w s ¬ 1 st w R a 1 st w = a ¬ 2 nd w S b
115 114 ralrimiv Rel s c dom s ¬ c R a d s a ¬ d S b w s ¬ 1 st w R a 1 st w = a ¬ 2 nd w S b
116 115 ex Rel s c dom s ¬ c R a d s a ¬ d S b w s ¬ 1 st w R a 1 st w = a ¬ 2 nd w S b
117 16 116 sylan s A × B c dom s ¬ c R a d s a ¬ d S b w s ¬ 1 st w R a 1 st w = a ¬ 2 nd w S b
118 olc ¬ 1 st w R a 1 st w = a ¬ 2 nd w S b ¬ w A × B a b A × B ¬ 1 st w R a 1 st w = a ¬ 2 nd w S b
119 118 ralimi w s ¬ 1 st w R a 1 st w = a ¬ 2 nd w S b w s ¬ w A × B a b A × B ¬ 1 st w R a 1 st w = a ¬ 2 nd w S b
120 117 119 syl6 s A × B c dom s ¬ c R a d s a ¬ d S b w s ¬ w A × B a b A × B ¬ 1 st w R a 1 st w = a ¬ 2 nd w S b
121 ianor ¬ w A × B a b A × B 1 st w R a 1 st w = a 2 nd w S b ¬ w A × B a b A × B ¬ 1 st w R a 1 st w = a 2 nd w S b
122 vex w V
123 opex a b V
124 eleq1 x = w x A × B w A × B
125 124 anbi1d x = w x A × B y A × B w A × B y A × B
126 fveq2 x = w 1 st x = 1 st w
127 126 breq1d x = w 1 st x R 1 st y 1 st w R 1 st y
128 126 eqeq1d x = w 1 st x = 1 st y 1 st w = 1 st y
129 fveq2 x = w 2 nd x = 2 nd w
130 129 breq1d x = w 2 nd x S 2 nd y 2 nd w S 2 nd y
131 128 130 anbi12d x = w 1 st x = 1 st y 2 nd x S 2 nd y 1 st w = 1 st y 2 nd w S 2 nd y
132 127 131 orbi12d x = w 1 st x R 1 st y 1 st x = 1 st y 2 nd x S 2 nd y 1 st w R 1 st y 1 st w = 1 st y 2 nd w S 2 nd y
133 125 132 anbi12d x = w x A × B y A × B 1 st x R 1 st y 1 st x = 1 st y 2 nd x S 2 nd y w A × B y A × B 1 st w R 1 st y 1 st w = 1 st y 2 nd w S 2 nd y
134 eleq1 y = a b y A × B a b A × B
135 134 anbi2d y = a b w A × B y A × B w A × B a b A × B
136 56 58 op1std y = a b 1 st y = a
137 136 breq2d y = a b 1 st w R 1 st y 1 st w R a
138 136 eqeq2d y = a b 1 st w = 1 st y 1 st w = a
139 56 58 op2ndd y = a b 2 nd y = b
140 139 breq2d y = a b 2 nd w S 2 nd y 2 nd w S b
141 138 140 anbi12d y = a b 1 st w = 1 st y 2 nd w S 2 nd y 1 st w = a 2 nd w S b
142 137 141 orbi12d y = a b 1 st w R 1 st y 1 st w = 1 st y 2 nd w S 2 nd y 1 st w R a 1 st w = a 2 nd w S b
143 135 142 anbi12d y = a b w A × B y A × B 1 st w R 1 st y 1 st w = 1 st y 2 nd w S 2 nd y w A × B a b A × B 1 st w R a 1 st w = a 2 nd w S b
144 122 123 133 143 1 brab w T a b w A × B a b A × B 1 st w R a 1 st w = a 2 nd w S b
145 121 144 xchnxbir ¬ w T a b ¬ w A × B a b A × B ¬ 1 st w R a 1 st w = a 2 nd w S b
146 ioran ¬ 1 st w R a 1 st w = a 2 nd w S b ¬ 1 st w R a ¬ 1 st w = a 2 nd w S b
147 ianor ¬ 1 st w = a 2 nd w S b ¬ 1 st w = a ¬ 2 nd w S b
148 pm4.62 1 st w = a ¬ 2 nd w S b ¬ 1 st w = a ¬ 2 nd w S b
149 147 148 bitr4i ¬ 1 st w = a 2 nd w S b 1 st w = a ¬ 2 nd w S b
150 149 anbi2i ¬ 1 st w R a ¬ 1 st w = a 2 nd w S b ¬ 1 st w R a 1 st w = a ¬ 2 nd w S b
151 146 150 bitri ¬ 1 st w R a 1 st w = a 2 nd w S b ¬ 1 st w R a 1 st w = a ¬ 2 nd w S b
152 151 orbi2i ¬ w A × B a b A × B ¬ 1 st w R a 1 st w = a 2 nd w S b ¬ w A × B a b A × B ¬ 1 st w R a 1 st w = a ¬ 2 nd w S b
153 145 152 bitri ¬ w T a b ¬ w A × B a b A × B ¬ 1 st w R a 1 st w = a ¬ 2 nd w S b
154 153 ralbii w s ¬ w T a b w s ¬ w A × B a b A × B ¬ 1 st w R a 1 st w = a ¬ 2 nd w S b
155 120 154 syl6ibr s A × B c dom s ¬ c R a d s a ¬ d S b w s ¬ w T a b
156 155 reximdv s A × B c dom s ¬ c R a b s a d s a ¬ d S b b s a w s ¬ w T a b
157 156 ex s A × B c dom s ¬ c R a b s a d s a ¬ d S b b s a w s ¬ w T a b
158 157 com23 s A × B b s a d s a ¬ d S b c dom s ¬ c R a b s a w s ¬ w T a b
159 158 adantr s A × B a dom s b s a d s a ¬ d S b c dom s ¬ c R a b s a w s ¬ w T a b
160 76 159 sylcom S Fr B s A × B a dom s c dom s ¬ c R a b s a w s ¬ w T a b
161 160 impl S Fr B s A × B a dom s c dom s ¬ c R a b s a w s ¬ w T a b
162 161 expimpd S Fr B s A × B a dom s c dom s ¬ c R a b s a w s ¬ w T a b
163 162 3adant3 S Fr B s A × B s a dom s c dom s ¬ c R a b s a w s ¬ w T a b
164 resss s a s
165 df-rex b s a w s ¬ w T a b b b s a w s ¬ w T a b
166 eqid a b = a b
167 eqeq1 z = a b z = a b a b = a b
168 breq2 z = a b w T z w T a b
169 168 notbid z = a b ¬ w T z ¬ w T a b
170 169 ralbidv z = a b w s ¬ w T z w s ¬ w T a b
171 170 anbi2d z = a b a b s w s ¬ w T z a b s w s ¬ w T a b
172 167 171 anbi12d z = a b z = a b a b s w s ¬ w T z a b = a b a b s w s ¬ w T a b
173 123 172 spcev a b = a b a b s w s ¬ w T a b z z = a b a b s w s ¬ w T z
174 166 173 mpan a b s w s ¬ w T a b z z = a b a b s w s ¬ w T z
175 59 174 sylanb b s a w s ¬ w T a b z z = a b a b s w s ¬ w T z
176 175 eximi b b s a w s ¬ w T a b b z z = a b a b s w s ¬ w T z
177 165 176 sylbi b s a w s ¬ w T a b b z z = a b a b s w s ¬ w T z
178 excom b z z = a b a b s w s ¬ w T z z b z = a b a b s w s ¬ w T z
179 177 178 sylib b s a w s ¬ w T a b z b z = a b a b s w s ¬ w T z
180 df-rex z s a w s ¬ w T z z z s a w s ¬ w T z
181 56 elsnres z s a b z = a b a b s
182 181 anbi1i z s a w s ¬ w T z b z = a b a b s w s ¬ w T z
183 19.41v b z = a b a b s w s ¬ w T z b z = a b a b s w s ¬ w T z
184 anass z = a b a b s w s ¬ w T z z = a b a b s w s ¬ w T z
185 184 exbii b z = a b a b s w s ¬ w T z b z = a b a b s w s ¬ w T z
186 182 183 185 3bitr2i z s a w s ¬ w T z b z = a b a b s w s ¬ w T z
187 186 exbii z z s a w s ¬ w T z z b z = a b a b s w s ¬ w T z
188 180 187 bitri z s a w s ¬ w T z z b z = a b a b s w s ¬ w T z
189 179 188 sylibr b s a w s ¬ w T a b z s a w s ¬ w T z
190 ssrexv s a s z s a w s ¬ w T z z s w s ¬ w T z
191 164 189 190 mpsyl b s a w s ¬ w T a b z s w s ¬ w T z
192 163 191 syl6 S Fr B s A × B s a dom s c dom s ¬ c R a z s w s ¬ w T z
193 192 expd S Fr B s A × B s a dom s c dom s ¬ c R a z s w s ¬ w T z
194 193 rexlimdv S Fr B s A × B s a dom s c dom s ¬ c R a z s w s ¬ w T z
195 194 3expib S Fr B s A × B s a dom s c dom s ¬ c R a z s w s ¬ w T z
196 195 adantl R Fr A S Fr B s A × B s a dom s c dom s ¬ c R a z s w s ¬ w T z
197 34 196 mpdd R Fr A S Fr B s A × B s z s w s ¬ w T z
198 197 alrimiv R Fr A S Fr B s s A × B s z s w s ¬ w T z
199 df-fr T Fr A × B s s A × B s z s w s ¬ w T z
200 198 199 sylibr R Fr A S Fr B T Fr A × B