Metamath Proof Explorer


Theorem xpinpreima

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 xpinpreima A×B=1stV×V-1A2ndV×V-1B

Proof

Step Hyp Ref Expression
1 inrab rV×V|1strArV×V|2ndrB=rV×V|1strA2ndrB
2 f1stres 1stV×V:V×VV
3 ffn 1stV×V:V×VV1stV×VFnV×V
4 fncnvima2 1stV×VFnV×V1stV×V-1A=rV×V|1stV×VrA
5 2 3 4 mp2b 1stV×V-1A=rV×V|1stV×VrA
6 fvres rV×V1stV×Vr=1str
7 6 eleq1d rV×V1stV×VrA1strA
8 7 rabbiia rV×V|1stV×VrA=rV×V|1strA
9 5 8 eqtri 1stV×V-1A=rV×V|1strA
10 f2ndres 2ndV×V:V×VV
11 ffn 2ndV×V:V×VV2ndV×VFnV×V
12 fncnvima2 2ndV×VFnV×V2ndV×V-1B=rV×V|2ndV×VrB
13 10 11 12 mp2b 2ndV×V-1B=rV×V|2ndV×VrB
14 fvres rV×V2ndV×Vr=2ndr
15 14 eleq1d rV×V2ndV×VrB2ndrB
16 15 rabbiia rV×V|2ndV×VrB=rV×V|2ndrB
17 13 16 eqtri 2ndV×V-1B=rV×V|2ndrB
18 9 17 ineq12i 1stV×V-1A2ndV×V-1B=rV×V|1strArV×V|2ndrB
19 xp2 A×B=rV×V|1strA2ndrB
20 1 18 19 3eqtr4ri A×B=1stV×V-1A2ndV×V-1B