Metamath Proof Explorer


Theorem setcco

Description: Composition in the category of sets. (Contributed by Mario Carneiro, 3-Jan-2017)

Ref Expression
Hypotheses setcbas.c C=SetCatU
setcbas.u φUV
setcco.o ·˙=compC
setcco.x φXU
setcco.y φYU
setcco.z φZU
setcco.f φF:XY
setcco.g φG:YZ
Assertion setcco φGXY·˙ZF=GF

Proof

Step Hyp Ref Expression
1 setcbas.c C=SetCatU
2 setcbas.u φUV
3 setcco.o ·˙=compC
4 setcco.x φXU
5 setcco.y φYU
6 setcco.z φZU
7 setcco.f φF:XY
8 setcco.g φG:YZ
9 1 2 3 setccofval φ·˙=vU×U,zUgz2ndv,f2ndv1stvgf
10 simprr φv=XYz=Zz=Z
11 simprl φv=XYz=Zv=XY
12 11 fveq2d φv=XYz=Z2ndv=2ndXY
13 op2ndg XUYU2ndXY=Y
14 4 5 13 syl2anc φ2ndXY=Y
15 14 adantr φv=XYz=Z2ndXY=Y
16 12 15 eqtrd φv=XYz=Z2ndv=Y
17 10 16 oveq12d φv=XYz=Zz2ndv=ZY
18 11 fveq2d φv=XYz=Z1stv=1stXY
19 op1stg XUYU1stXY=X
20 4 5 19 syl2anc φ1stXY=X
21 20 adantr φv=XYz=Z1stXY=X
22 18 21 eqtrd φv=XYz=Z1stv=X
23 16 22 oveq12d φv=XYz=Z2ndv1stv=YX
24 eqidd φv=XYz=Zgf=gf
25 17 23 24 mpoeq123dv φv=XYz=Zgz2ndv,f2ndv1stvgf=gZY,fYXgf
26 4 5 opelxpd φXYU×U
27 ovex ZYV
28 ovex YXV
29 27 28 mpoex gZY,fYXgfV
30 29 a1i φgZY,fYXgfV
31 9 25 26 6 30 ovmpod φXY·˙Z=gZY,fYXgf
32 simprl φg=Gf=Fg=G
33 simprr φg=Gf=Ff=F
34 32 33 coeq12d φg=Gf=Fgf=GF
35 6 5 elmapd φGZYG:YZ
36 8 35 mpbird φGZY
37 5 4 elmapd φFYXF:XY
38 7 37 mpbird φFYX
39 coexg GZYFYXGFV
40 36 38 39 syl2anc φGFV
41 31 34 36 38 40 ovmpod φGXY·˙ZF=GF