Metamath Proof Explorer


Theorem cofurid

Description: The identity functor is a right identity for composition. (Contributed by Mario Carneiro, 3-Jan-2017)

Ref Expression
Hypotheses cofulid.g φ F C Func D
cofurid.1 I = id func C
Assertion cofurid φ F func I = F

Proof

Step Hyp Ref Expression
1 cofulid.g φ F C Func D
2 cofurid.1 I = id func C
3 eqid Base C = Base C
4 funcrcl F C Func D C Cat D Cat
5 1 4 syl φ C Cat D Cat
6 5 simpld φ C Cat
7 2 3 6 idfu1st φ 1 st I = I Base C
8 7 coeq2d φ 1 st F 1 st I = 1 st F I Base C
9 eqid Base D = Base D
10 relfunc Rel C Func D
11 1st2ndbr Rel C Func D F C Func D 1 st F C Func D 2 nd F
12 10 1 11 sylancr φ 1 st F C Func D 2 nd F
13 3 9 12 funcf1 φ 1 st F : Base C Base D
14 fcoi1 1 st F : Base C Base D 1 st F I Base C = 1 st F
15 13 14 syl φ 1 st F I Base C = 1 st F
16 8 15 eqtrd φ 1 st F 1 st I = 1 st F
17 7 3ad2ant1 φ x Base C y Base C 1 st I = I Base C
18 17 fveq1d φ x Base C y Base C 1 st I x = I Base C x
19 fvresi x Base C I Base C x = x
20 19 3ad2ant2 φ x Base C y Base C I Base C x = x
21 18 20 eqtrd φ x Base C y Base C 1 st I x = x
22 17 fveq1d φ x Base C y Base C 1 st I y = I Base C y
23 fvresi y Base C I Base C y = y
24 23 3ad2ant3 φ x Base C y Base C I Base C y = y
25 22 24 eqtrd φ x Base C y Base C 1 st I y = y
26 21 25 oveq12d φ x Base C y Base C 1 st I x 2 nd F 1 st I y = x 2 nd F y
27 6 3ad2ant1 φ x Base C y Base C C Cat
28 eqid Hom C = Hom C
29 simp2 φ x Base C y Base C x Base C
30 simp3 φ x Base C y Base C y Base C
31 2 3 27 28 29 30 idfu2nd φ x Base C y Base C x 2 nd I y = I x Hom C y
32 26 31 coeq12d φ x Base C y Base C 1 st I x 2 nd F 1 st I y x 2 nd I y = x 2 nd F y I x Hom C y
33 eqid Hom D = Hom D
34 12 3ad2ant1 φ x Base C y Base C 1 st F C Func D 2 nd F
35 3 28 33 34 29 30 funcf2 φ x Base C y Base C x 2 nd F y : x Hom C y 1 st F x Hom D 1 st F y
36 fcoi1 x 2 nd F y : x Hom C y 1 st F x Hom D 1 st F y x 2 nd F y I x Hom C y = x 2 nd F y
37 35 36 syl φ x Base C y Base C x 2 nd F y I x Hom C y = x 2 nd F y
38 32 37 eqtrd φ x Base C y Base C 1 st I x 2 nd F 1 st I y x 2 nd I y = x 2 nd F y
39 38 mpoeq3dva φ x Base C , y Base C 1 st I x 2 nd F 1 st I y x 2 nd I y = x Base C , y Base C x 2 nd F y
40 3 12 funcfn2 φ 2 nd F Fn Base C × Base C
41 fnov 2 nd F Fn Base C × Base C 2 nd F = x Base C , y Base C x 2 nd F y
42 40 41 sylib φ 2 nd F = x Base C , y Base C x 2 nd F y
43 39 42 eqtr4d φ x Base C , y Base C 1 st I x 2 nd F 1 st I y x 2 nd I y = 2 nd F
44 16 43 opeq12d φ 1 st F 1 st I x Base C , y Base C 1 st I x 2 nd F 1 st I y x 2 nd I y = 1 st F 2 nd F
45 2 idfucl C Cat I C Func C
46 6 45 syl φ I C Func C
47 3 46 1 cofuval φ F func I = 1 st F 1 st I x Base C , y Base C 1 st I x 2 nd F 1 st I y x 2 nd I y
48 1st2nd Rel C Func D F C Func D F = 1 st F 2 nd F
49 10 1 48 sylancr φ F = 1 st F 2 nd F
50 44 47 49 3eqtr4d φ F func I = F