Metamath Proof Explorer


Theorem diagval

Description: Define the diagonal functor, which is the functor C --> ( D Func C ) whose object part is x e. C |-> ( y e. D |-> x ) . We can define this equationally as the currying of the first projection functor, and by expressing it this way we get a quick proof of functoriality. (Contributed by Mario Carneiro, 6-Jan-2017) (Revised by Mario Carneiro, 15-Jan-2017)

Ref Expression
Hypotheses diagval.l
|- L = ( C DiagFunc D )
diagval.c
|- ( ph -> C e. Cat )
diagval.d
|- ( ph -> D e. Cat )
Assertion diagval
|- ( ph -> L = ( <. C , D >. curryF ( C 1stF D ) ) )

Proof

Step Hyp Ref Expression
1 diagval.l
 |-  L = ( C DiagFunc D )
2 diagval.c
 |-  ( ph -> C e. Cat )
3 diagval.d
 |-  ( ph -> D e. Cat )
4 df-diag
 |-  DiagFunc = ( c e. Cat , d e. Cat |-> ( <. c , d >. curryF ( c 1stF d ) ) )
5 4 a1i
 |-  ( ph -> DiagFunc = ( c e. Cat , d e. Cat |-> ( <. c , d >. curryF ( c 1stF d ) ) ) )
6 simprl
 |-  ( ( ph /\ ( c = C /\ d = D ) ) -> c = C )
7 simprr
 |-  ( ( ph /\ ( c = C /\ d = D ) ) -> d = D )
8 6 7 opeq12d
 |-  ( ( ph /\ ( c = C /\ d = D ) ) -> <. c , d >. = <. C , D >. )
9 6 7 oveq12d
 |-  ( ( ph /\ ( c = C /\ d = D ) ) -> ( c 1stF d ) = ( C 1stF D ) )
10 8 9 oveq12d
 |-  ( ( ph /\ ( c = C /\ d = D ) ) -> ( <. c , d >. curryF ( c 1stF d ) ) = ( <. C , D >. curryF ( C 1stF D ) ) )
11 ovexd
 |-  ( ph -> ( <. C , D >. curryF ( C 1stF D ) ) e. _V )
12 5 10 2 3 11 ovmpod
 |-  ( ph -> ( C DiagFunc D ) = ( <. C , D >. curryF ( C 1stF D ) ) )
13 1 12 eqtrid
 |-  ( ph -> L = ( <. C , D >. curryF ( C 1stF D ) ) )