Metamath Proof Explorer


Theorem f1ofvswap

Description: Swapping two values in a bijection between two classes yields another bijection between those classes. (Contributed by BTernaryTau, 31-Aug-2024)

Ref Expression
Assertion f1ofvswap F:A1-1 ontoBXAYAFAXYXFYYFX:A1-1 ontoB

Proof

Step Hyp Ref Expression
1 f1oi IAXY:AXY1-1 ontoAXY
2 f1oprswap XAYAXYYX:XY1-1 ontoXY
3 disjdifr AXYXY=
4 f1oun IAXY:AXY1-1 ontoAXYXYYX:XY1-1 ontoXYAXYXY=AXYXY=IAXYXYYX:AXYXY1-1 ontoAXYXY
5 3 3 4 mpanr12 IAXY:AXY1-1 ontoAXYXYYX:XY1-1 ontoXYIAXYXYYX:AXYXY1-1 ontoAXYXY
6 1 2 5 sylancr XAYAIAXYXYYX:AXYXY1-1 ontoAXYXY
7 prssi XAYAXYA
8 undifr XYAAXYXY=A
9 7 8 sylib XAYAAXYXY=A
10 f1oeq23 AXYXY=AAXYXY=AIAXYXYYX:AXYXY1-1 ontoAXYXYIAXYXYYX:A1-1 ontoA
11 9 9 10 syl2anc XAYAIAXYXYYX:AXYXY1-1 ontoAXYXYIAXYXYYX:A1-1 ontoA
12 6 11 mpbid XAYAIAXYXYYX:A1-1 ontoA
13 f1oco F:A1-1 ontoBIAXYXYYX:A1-1 ontoAFIAXYXYYX:A1-1 ontoB
14 12 13 sylan2 F:A1-1 ontoBXAYAFIAXYXYYX:A1-1 ontoB
15 14 3impb F:A1-1 ontoBXAYAFIAXYXYYX:A1-1 ontoB
16 f1ofn F:A1-1 ontoBFFnA
17 coundi FIAXYXYYX=FIAXYFXYYX
18 fcoconst FFnAYAFX×Y=X×FY
19 18 3adant2 FFnAXAYAFX×Y=X×FY
20 xpsng XAYAX×Y=XY
21 20 coeq2d XAYAFX×Y=FXY
22 21 3adant1 FFnAXAYAFX×Y=FXY
23 fvex FYV
24 xpsng XAFYVX×FY=XFY
25 23 24 mpan2 XAX×FY=XFY
26 25 3ad2ant2 FFnAXAYAX×FY=XFY
27 19 22 26 3eqtr3d FFnAXAYAFXY=XFY
28 fcoconst FFnAXAFY×X=Y×FX
29 28 3adant3 FFnAXAYAFY×X=Y×FX
30 xpsng YAXAY×X=YX
31 30 coeq2d YAXAFY×X=FYX
32 31 ancoms XAYAFY×X=FYX
33 32 3adant1 FFnAXAYAFY×X=FYX
34 fvex FXV
35 xpsng YAFXVY×FX=YFX
36 34 35 mpan2 YAY×FX=YFX
37 36 3ad2ant3 FFnAXAYAY×FX=YFX
38 29 33 37 3eqtr3d FFnAXAYAFYX=YFX
39 27 38 uneq12d FFnAXAYAFXYFYX=XFYYFX
40 df-pr XYYX=XYYX
41 40 coeq2i FXYYX=FXYYX
42 coundi FXYYX=FXYFYX
43 41 42 eqtri FXYYX=FXYFYX
44 df-pr XFYYFX=XFYYFX
45 39 43 44 3eqtr4g FFnAXAYAFXYYX=XFYYFX
46 45 uneq2d FFnAXAYAFIAXYFXYYX=FIAXYXFYYFX
47 17 46 eqtrid FFnAXAYAFIAXYXYYX=FIAXYXFYYFX
48 coires1 FIAXY=FAXY
49 48 uneq1i FIAXYXFYYFX=FAXYXFYYFX
50 47 49 eqtrdi FFnAXAYAFIAXYXYYX=FAXYXFYYFX
51 16 50 syl3an1 F:A1-1 ontoBXAYAFIAXYXYYX=FAXYXFYYFX
52 51 f1oeq1d F:A1-1 ontoBXAYAFIAXYXYYX:A1-1 ontoBFAXYXFYYFX:A1-1 ontoB
53 15 52 mpbid F:A1-1 ontoBXAYAFAXYXFYYFX:A1-1 ontoB