Metamath Proof Explorer


Theorem setccofval

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

Ref Expression
Hypotheses setcbas.c
|- C = ( SetCat ` U )
setcbas.u
|- ( ph -> U e. V )
setcco.o
|- .x. = ( comp ` C )
Assertion setccofval
|- ( ph -> .x. = ( v e. ( U X. U ) , z e. U |-> ( g e. ( z ^m ( 2nd ` v ) ) , f e. ( ( 2nd ` v ) ^m ( 1st ` v ) ) |-> ( g o. f ) ) ) )

Proof

Step Hyp Ref Expression
1 setcbas.c
 |-  C = ( SetCat ` U )
2 setcbas.u
 |-  ( ph -> U e. V )
3 setcco.o
 |-  .x. = ( comp ` C )
4 eqid
 |-  ( Hom ` C ) = ( Hom ` C )
5 1 2 4 setchomfval
 |-  ( ph -> ( Hom ` C ) = ( x e. U , y e. U |-> ( y ^m x ) ) )
6 eqidd
 |-  ( ph -> ( v e. ( U X. U ) , z e. U |-> ( g e. ( z ^m ( 2nd ` v ) ) , f e. ( ( 2nd ` v ) ^m ( 1st ` v ) ) |-> ( g o. f ) ) ) = ( v e. ( U X. U ) , z e. U |-> ( g e. ( z ^m ( 2nd ` v ) ) , f e. ( ( 2nd ` v ) ^m ( 1st ` v ) ) |-> ( g o. f ) ) ) )
7 1 2 5 6 setcval
 |-  ( ph -> C = { <. ( Base ` ndx ) , U >. , <. ( Hom ` ndx ) , ( Hom ` C ) >. , <. ( comp ` ndx ) , ( v e. ( U X. U ) , z e. U |-> ( g e. ( z ^m ( 2nd ` v ) ) , f e. ( ( 2nd ` v ) ^m ( 1st ` v ) ) |-> ( g o. f ) ) ) >. } )
8 catstr
 |-  { <. ( Base ` ndx ) , U >. , <. ( Hom ` ndx ) , ( Hom ` C ) >. , <. ( comp ` ndx ) , ( v e. ( U X. U ) , z e. U |-> ( g e. ( z ^m ( 2nd ` v ) ) , f e. ( ( 2nd ` v ) ^m ( 1st ` v ) ) |-> ( g o. f ) ) ) >. } Struct <. 1 , ; 1 5 >.
9 ccoid
 |-  comp = Slot ( comp ` ndx )
10 snsstp3
 |-  { <. ( comp ` ndx ) , ( v e. ( U X. U ) , z e. U |-> ( g e. ( z ^m ( 2nd ` v ) ) , f e. ( ( 2nd ` v ) ^m ( 1st ` v ) ) |-> ( g o. f ) ) ) >. } C_ { <. ( Base ` ndx ) , U >. , <. ( Hom ` ndx ) , ( Hom ` C ) >. , <. ( comp ` ndx ) , ( v e. ( U X. U ) , z e. U |-> ( g e. ( z ^m ( 2nd ` v ) ) , f e. ( ( 2nd ` v ) ^m ( 1st ` v ) ) |-> ( g o. f ) ) ) >. }
11 2 2 xpexd
 |-  ( ph -> ( U X. U ) e. _V )
12 mpoexga
 |-  ( ( ( U X. U ) e. _V /\ U e. V ) -> ( v e. ( U X. U ) , z e. U |-> ( g e. ( z ^m ( 2nd ` v ) ) , f e. ( ( 2nd ` v ) ^m ( 1st ` v ) ) |-> ( g o. f ) ) ) e. _V )
13 11 2 12 syl2anc
 |-  ( ph -> ( v e. ( U X. U ) , z e. U |-> ( g e. ( z ^m ( 2nd ` v ) ) , f e. ( ( 2nd ` v ) ^m ( 1st ` v ) ) |-> ( g o. f ) ) ) e. _V )
14 7 8 9 10 13 3 strfv3
 |-  ( ph -> .x. = ( v e. ( U X. U ) , z e. U |-> ( g e. ( z ^m ( 2nd ` v ) ) , f e. ( ( 2nd ` v ) ^m ( 1st ` v ) ) |-> ( g o. f ) ) ) )