Metamath Proof Explorer


Theorem swapffunc

Description: The swap functor is a functor. (Contributed by Zhi Wang, 8-Oct-2025)

Ref Expression
Hypotheses swapfid.c φ C Cat
swapfid.d φ D Cat
swapfid.s S = C × c D
swapfid.t T = D × c C
swapfid.o No typesetting found for |- ( ph -> ( C swapF D ) = <. O , P >. ) with typecode |-
Assertion swapffunc φ O S Func T P

Proof

Step Hyp Ref Expression
1 swapfid.c φ C Cat
2 swapfid.d φ D Cat
3 swapfid.s S = C × c D
4 swapfid.t T = D × c C
5 swapfid.o Could not format ( ph -> ( C swapF D ) = <. O , P >. ) : No typesetting found for |- ( ph -> ( C swapF D ) = <. O , P >. ) with typecode |-
6 eqid Base S = Base S
7 eqid Base T = Base T
8 eqid Hom S = Hom S
9 eqid Hom T = Hom T
10 eqid Id S = Id S
11 eqid Id T = Id T
12 eqid comp S = comp S
13 eqid comp T = comp T
14 3 1 2 xpccat φ S Cat
15 4 2 1 xpccat φ T Cat
16 5 3 4 1 2 6 7 swapf1f1o φ O : Base S 1-1 onto Base T
17 f1of O : Base S 1-1 onto Base T O : Base S Base T
18 16 17 syl φ O : Base S Base T
19 1 2 3 6 5 swapf2fn φ P Fn Base S × Base S
20 5 adantr Could not format ( ( ph /\ ( x e. ( Base ` S ) /\ y e. ( Base ` S ) ) ) -> ( C swapF D ) = <. O , P >. ) : No typesetting found for |- ( ( ph /\ ( x e. ( Base ` S ) /\ y e. ( Base ` S ) ) ) -> ( C swapF D ) = <. O , P >. ) with typecode |-
21 simprl φ x Base S y Base S x Base S
22 simprr φ x Base S y Base S y Base S
23 20 3 4 8 9 6 21 22 swapf2f1oa φ x Base S y Base S x P y : x Hom S y 1-1 onto O x Hom T O y
24 f1of x P y : x Hom S y 1-1 onto O x Hom T O y x P y : x Hom S y O x Hom T O y
25 23 24 syl φ x Base S y Base S x P y : x Hom S y O x Hom T O y
26 1 adantr φ x Base S C Cat
27 2 adantr φ x Base S D Cat
28 5 adantr Could not format ( ( ph /\ x e. ( Base ` S ) ) -> ( C swapF D ) = <. O , P >. ) : No typesetting found for |- ( ( ph /\ x e. ( Base ` S ) ) -> ( C swapF D ) = <. O , P >. ) with typecode |-
29 simpr φ x Base S x Base S
30 26 27 3 4 28 6 29 10 11 swapfida φ x Base S x P x Id S x = Id T O x
31 1 3ad2ant1 φ x Base S y Base S z Base S m x Hom S y n y Hom S z C Cat
32 2 3ad2ant1 φ x Base S y Base S z Base S m x Hom S y n y Hom S z D Cat
33 5 3ad2ant1 Could not format ( ( ph /\ ( x e. ( Base ` S ) /\ y e. ( Base ` S ) /\ z e. ( Base ` S ) ) /\ ( m e. ( x ( Hom ` S ) y ) /\ n e. ( y ( Hom ` S ) z ) ) ) -> ( C swapF D ) = <. O , P >. ) : No typesetting found for |- ( ( ph /\ ( x e. ( Base ` S ) /\ y e. ( Base ` S ) /\ z e. ( Base ` S ) ) /\ ( m e. ( x ( Hom ` S ) y ) /\ n e. ( y ( Hom ` S ) z ) ) ) -> ( C swapF D ) = <. O , P >. ) with typecode |-
34 simp21 φ x Base S y Base S z Base S m x Hom S y n y Hom S z x Base S
35 simp22 φ x Base S y Base S z Base S m x Hom S y n y Hom S z y Base S
36 simp23 φ x Base S y Base S z Base S m x Hom S y n y Hom S z z Base S
37 simp3l φ x Base S y Base S z Base S m x Hom S y n y Hom S z m x Hom S y
38 simp3r φ x Base S y Base S z Base S m x Hom S y n y Hom S z n y Hom S z
39 31 32 3 4 33 6 34 35 36 8 37 38 12 13 swapfcoa φ x Base S y Base S z Base S m x Hom S y n y Hom S z x P z n x y comp S z m = y P z n O x O y comp T O z x P y m
40 6 7 8 9 10 11 12 13 14 15 18 19 25 30 39 isfuncd φ O S Func T P