Metamath Proof Explorer


Theorem swapfcoa

Description: Composition in the source category is mapped to composition in the target. ( ph -> C e. Cat ) and ( ph -> D e. Cat ) can be replaced by a weaker hypothesis ( ph -> S e. Cat ) . (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 |-
swapfida.b B = Base S
swapfida.x φ X B
swapfcoa.y φ Y B
swapfcoa.z φ Z B
swapfcoa.h H = Hom S
swapfcoa.m φ M X H Y
swapfcoa.n φ N Y H Z
swapfcoa.os · ˙ = comp S
swapfcoa.ot ˙ = comp T
Assertion swapfcoa φ X P Z N X Y · ˙ Z M = Y P Z N O X O Y ˙ O Z X P Y M

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 swapfida.b B = Base S
7 swapfida.x φ X B
8 swapfcoa.y φ Y B
9 swapfcoa.z φ Z B
10 swapfcoa.h H = Hom S
11 swapfcoa.m φ M X H Y
12 swapfcoa.n φ N Y H Z
13 swapfcoa.os · ˙ = comp S
14 swapfcoa.ot ˙ = comp T
15 5 3 6 7 swapf1a φ O X = 2 nd X 1 st X
16 15 fveq2d φ 1 st O X = 1 st 2 nd X 1 st X
17 fvex 2 nd X V
18 fvex 1 st X V
19 17 18 op1st 1 st 2 nd X 1 st X = 2 nd X
20 16 19 eqtrdi φ 1 st O X = 2 nd X
21 5 3 6 8 swapf1a φ O Y = 2 nd Y 1 st Y
22 21 fveq2d φ 1 st O Y = 1 st 2 nd Y 1 st Y
23 fvex 2 nd Y V
24 fvex 1 st Y V
25 23 24 op1st 1 st 2 nd Y 1 st Y = 2 nd Y
26 22 25 eqtrdi φ 1 st O Y = 2 nd Y
27 20 26 opeq12d φ 1 st O X 1 st O Y = 2 nd X 2 nd Y
28 5 3 6 9 swapf1a φ O Z = 2 nd Z 1 st Z
29 28 fveq2d φ 1 st O Z = 1 st 2 nd Z 1 st Z
30 fvex 2 nd Z V
31 fvex 1 st Z V
32 30 31 op1st 1 st 2 nd Z 1 st Z = 2 nd Z
33 29 32 eqtrdi φ 1 st O Z = 2 nd Z
34 27 33 oveq12d φ 1 st O X 1 st O Y comp D 1 st O Z = 2 nd X 2 nd Y comp D 2 nd Z
35 10 a1i φ H = Hom S
36 5 3 6 8 9 35 12 swapf2a φ Y P Z N = 2 nd N 1 st N
37 36 fveq2d φ 1 st Y P Z N = 1 st 2 nd N 1 st N
38 fvex 2 nd N V
39 fvex 1 st N V
40 38 39 op1st 1 st 2 nd N 1 st N = 2 nd N
41 37 40 eqtrdi φ 1 st Y P Z N = 2 nd N
42 5 3 6 7 8 35 11 swapf2a φ X P Y M = 2 nd M 1 st M
43 42 fveq2d φ 1 st X P Y M = 1 st 2 nd M 1 st M
44 fvex 2 nd M V
45 fvex 1 st M V
46 44 45 op1st 1 st 2 nd M 1 st M = 2 nd M
47 43 46 eqtrdi φ 1 st X P Y M = 2 nd M
48 34 41 47 oveq123d φ 1 st Y P Z N 1 st O X 1 st O Y comp D 1 st O Z 1 st X P Y M = 2 nd N 2 nd X 2 nd Y comp D 2 nd Z 2 nd M
49 15 fveq2d φ 2 nd O X = 2 nd 2 nd X 1 st X
50 17 18 op2nd 2 nd 2 nd X 1 st X = 1 st X
51 49 50 eqtrdi φ 2 nd O X = 1 st X
52 21 fveq2d φ 2 nd O Y = 2 nd 2 nd Y 1 st Y
53 23 24 op2nd 2 nd 2 nd Y 1 st Y = 1 st Y
54 52 53 eqtrdi φ 2 nd O Y = 1 st Y
55 51 54 opeq12d φ 2 nd O X 2 nd O Y = 1 st X 1 st Y
56 28 fveq2d φ 2 nd O Z = 2 nd 2 nd Z 1 st Z
57 30 31 op2nd 2 nd 2 nd Z 1 st Z = 1 st Z
58 56 57 eqtrdi φ 2 nd O Z = 1 st Z
59 55 58 oveq12d φ 2 nd O X 2 nd O Y comp C 2 nd O Z = 1 st X 1 st Y comp C 1 st Z
60 36 fveq2d φ 2 nd Y P Z N = 2 nd 2 nd N 1 st N
61 38 39 op2nd 2 nd 2 nd N 1 st N = 1 st N
62 60 61 eqtrdi φ 2 nd Y P Z N = 1 st N
63 42 fveq2d φ 2 nd X P Y M = 2 nd 2 nd M 1 st M
64 44 45 op2nd 2 nd 2 nd M 1 st M = 1 st M
65 63 64 eqtrdi φ 2 nd X P Y M = 1 st M
66 59 62 65 oveq123d φ 2 nd Y P Z N 2 nd O X 2 nd O Y comp C 2 nd O Z 2 nd X P Y M = 1 st N 1 st X 1 st Y comp C 1 st Z 1 st M
67 48 66 opeq12d φ 1 st Y P Z N 1 st O X 1 st O Y comp D 1 st O Z 1 st X P Y M 2 nd Y P Z N 2 nd O X 2 nd O Y comp C 2 nd O Z 2 nd X P Y M = 2 nd N 2 nd X 2 nd Y comp D 2 nd Z 2 nd M 1 st N 1 st X 1 st Y comp C 1 st Z 1 st M
68 eqid Base T = Base T
69 eqid Hom T = Hom T
70 eqid comp D = comp D
71 eqid comp C = comp C
72 5 3 4 1 2 6 68 swapf1f1o φ O : B 1-1 onto Base T
73 f1of O : B 1-1 onto Base T O : B Base T
74 72 73 syl φ O : B Base T
75 74 7 ffvelcdmd φ O X Base T
76 74 8 ffvelcdmd φ O Y Base T
77 74 9 ffvelcdmd φ O Z Base T
78 5 3 4 10 69 6 7 8 swapf2f1oa φ X P Y : X H Y 1-1 onto O X Hom T O Y
79 f1of X P Y : X H Y 1-1 onto O X Hom T O Y X P Y : X H Y O X Hom T O Y
80 78 79 syl φ X P Y : X H Y O X Hom T O Y
81 80 11 ffvelcdmd φ X P Y M O X Hom T O Y
82 5 3 4 10 69 6 8 9 swapf2f1oa φ Y P Z : Y H Z 1-1 onto O Y Hom T O Z
83 f1of Y P Z : Y H Z 1-1 onto O Y Hom T O Z Y P Z : Y H Z O Y Hom T O Z
84 82 83 syl φ Y P Z : Y H Z O Y Hom T O Z
85 84 12 ffvelcdmd φ Y P Z N O Y Hom T O Z
86 4 68 69 70 71 14 75 76 77 81 85 xpcco φ Y P Z N O X O Y ˙ O Z X P Y M = 1 st Y P Z N 1 st O X 1 st O Y comp D 1 st O Z 1 st X P Y M 2 nd Y P Z N 2 nd O X 2 nd O Y comp C 2 nd O Z 2 nd X P Y M
87 3 6 10 71 70 13 7 8 9 11 12 xpcco φ N X Y · ˙ Z M = 1 st N 1 st X 1 st Y comp C 1 st Z 1 st M 2 nd N 2 nd X 2 nd Y comp D 2 nd Z 2 nd M
88 87 fveq2d φ X P Z N X Y · ˙ Z M = X P Z 1 st N 1 st X 1 st Y comp C 1 st Z 1 st M 2 nd N 2 nd X 2 nd Y comp D 2 nd Z 2 nd M
89 3 1 2 xpccat φ S Cat
90 6 10 13 89 7 8 9 11 12 catcocl φ N X Y · ˙ Z M X H Z
91 87 90 eqeltrrd φ 1 st N 1 st X 1 st Y comp C 1 st Z 1 st M 2 nd N 2 nd X 2 nd Y comp D 2 nd Z 2 nd M X H Z
92 5 3 6 7 9 35 91 swapf2a φ X P Z 1 st N 1 st X 1 st Y comp C 1 st Z 1 st M 2 nd N 2 nd X 2 nd Y comp D 2 nd Z 2 nd M = 2 nd 1 st N 1 st X 1 st Y comp C 1 st Z 1 st M 2 nd N 2 nd X 2 nd Y comp D 2 nd Z 2 nd M 1 st 1 st N 1 st X 1 st Y comp C 1 st Z 1 st M 2 nd N 2 nd X 2 nd Y comp D 2 nd Z 2 nd M
93 ovex 1 st N 1 st X 1 st Y comp C 1 st Z 1 st M V
94 ovex 2 nd N 2 nd X 2 nd Y comp D 2 nd Z 2 nd M V
95 93 94 op2nd 2 nd 1 st N 1 st X 1 st Y comp C 1 st Z 1 st M 2 nd N 2 nd X 2 nd Y comp D 2 nd Z 2 nd M = 2 nd N 2 nd X 2 nd Y comp D 2 nd Z 2 nd M
96 93 94 op1st 1 st 1 st N 1 st X 1 st Y comp C 1 st Z 1 st M 2 nd N 2 nd X 2 nd Y comp D 2 nd Z 2 nd M = 1 st N 1 st X 1 st Y comp C 1 st Z 1 st M
97 95 96 opeq12i 2 nd 1 st N 1 st X 1 st Y comp C 1 st Z 1 st M 2 nd N 2 nd X 2 nd Y comp D 2 nd Z 2 nd M 1 st 1 st N 1 st X 1 st Y comp C 1 st Z 1 st M 2 nd N 2 nd X 2 nd Y comp D 2 nd Z 2 nd M = 2 nd N 2 nd X 2 nd Y comp D 2 nd Z 2 nd M 1 st N 1 st X 1 st Y comp C 1 st Z 1 st M
98 92 97 eqtrdi φ X P Z 1 st N 1 st X 1 st Y comp C 1 st Z 1 st M 2 nd N 2 nd X 2 nd Y comp D 2 nd Z 2 nd M = 2 nd N 2 nd X 2 nd Y comp D 2 nd Z 2 nd M 1 st N 1 st X 1 st Y comp C 1 st Z 1 st M
99 88 98 eqtrd φ X P Z N X Y · ˙ Z M = 2 nd N 2 nd X 2 nd Y comp D 2 nd Z 2 nd M 1 st N 1 st X 1 st Y comp C 1 st Z 1 st M
100 67 86 99 3eqtr4rd φ X P Z N X Y · ˙ Z M = Y P Z N O X O Y ˙ O Z X P Y M