Metamath Proof Explorer


Theorem xpinpreima2

Description: Rewrite the cartesian product of two sets as the intersection of their preimage by 1st and 2nd , the projections on the first and second elements. (Contributed by Thierry Arnoux, 22-Sep-2017)

Ref Expression
Assertion xpinpreima2 A E B F A × B = 1 st E × F -1 A 2 nd E × F -1 B

Proof

Step Hyp Ref Expression
1 xp2 A × B = r V × V | 1 st r A 2 nd r B
2 xpss E × F V × V
3 rabss2 E × F V × V r E × F | 1 st r A 2 nd r B r V × V | 1 st r A 2 nd r B
4 2 3 mp1i A E B F r E × F | 1 st r A 2 nd r B r V × V | 1 st r A 2 nd r B
5 simprl A E B F r V × V 1 st r A 2 nd r B r V × V
6 simpll A E B F r V × V 1 st r A 2 nd r B A E
7 simprrl A E B F r V × V 1 st r A 2 nd r B 1 st r A
8 6 7 sseldd A E B F r V × V 1 st r A 2 nd r B 1 st r E
9 simplr A E B F r V × V 1 st r A 2 nd r B B F
10 simprrr A E B F r V × V 1 st r A 2 nd r B 2 nd r B
11 9 10 sseldd A E B F r V × V 1 st r A 2 nd r B 2 nd r F
12 8 11 jca A E B F r V × V 1 st r A 2 nd r B 1 st r E 2 nd r F
13 elxp7 r E × F r V × V 1 st r E 2 nd r F
14 5 12 13 sylanbrc A E B F r V × V 1 st r A 2 nd r B r E × F
15 14 rabss3d A E B F r V × V | 1 st r A 2 nd r B r E × F | 1 st r A 2 nd r B
16 4 15 eqssd A E B F r E × F | 1 st r A 2 nd r B = r V × V | 1 st r A 2 nd r B
17 1 16 eqtr4id A E B F A × B = r E × F | 1 st r A 2 nd r B
18 inrab r E × F | 1 st r A r E × F | 2 nd r B = r E × F | 1 st r A 2 nd r B
19 17 18 eqtr4di A E B F A × B = r E × F | 1 st r A r E × F | 2 nd r B
20 f1stres 1 st E × F : E × F E
21 ffn 1 st E × F : E × F E 1 st E × F Fn E × F
22 fncnvima2 1 st E × F Fn E × F 1 st E × F -1 A = r E × F | 1 st E × F r A
23 20 21 22 mp2b 1 st E × F -1 A = r E × F | 1 st E × F r A
24 fvres r E × F 1 st E × F r = 1 st r
25 24 eleq1d r E × F 1 st E × F r A 1 st r A
26 25 rabbiia r E × F | 1 st E × F r A = r E × F | 1 st r A
27 23 26 eqtri 1 st E × F -1 A = r E × F | 1 st r A
28 f2ndres 2 nd E × F : E × F F
29 ffn 2 nd E × F : E × F F 2 nd E × F Fn E × F
30 fncnvima2 2 nd E × F Fn E × F 2 nd E × F -1 B = r E × F | 2 nd E × F r B
31 28 29 30 mp2b 2 nd E × F -1 B = r E × F | 2 nd E × F r B
32 fvres r E × F 2 nd E × F r = 2 nd r
33 32 eleq1d r E × F 2 nd E × F r B 2 nd r B
34 33 rabbiia r E × F | 2 nd E × F r B = r E × F | 2 nd r B
35 31 34 eqtri 2 nd E × F -1 B = r E × F | 2 nd r B
36 27 35 ineq12i 1 st E × F -1 A 2 nd E × F -1 B = r E × F | 1 st r A r E × F | 2 nd r B
37 19 36 eqtr4di A E B F A × B = 1 st E × F -1 A 2 nd E × F -1 B