Metamath Proof Explorer


Theorem diag2

Description: Value of the diagonal functor at a morphism. (Contributed by Mario Carneiro, 7-Jan-2017)

Ref Expression
Hypotheses diag2.l 𝐿 = ( 𝐶 Δfunc 𝐷 )
diag2.a 𝐴 = ( Base ‘ 𝐶 )
diag2.b 𝐵 = ( Base ‘ 𝐷 )
diag2.h 𝐻 = ( Hom ‘ 𝐶 )
diag2.c ( 𝜑𝐶 ∈ Cat )
diag2.d ( 𝜑𝐷 ∈ Cat )
diag2.x ( 𝜑𝑋𝐴 )
diag2.y ( 𝜑𝑌𝐴 )
diag2.f ( 𝜑𝐹 ∈ ( 𝑋 𝐻 𝑌 ) )
Assertion diag2 ( 𝜑 → ( ( 𝑋 ( 2nd𝐿 ) 𝑌 ) ‘ 𝐹 ) = ( 𝐵 × { 𝐹 } ) )

Proof

Step Hyp Ref Expression
1 diag2.l 𝐿 = ( 𝐶 Δfunc 𝐷 )
2 diag2.a 𝐴 = ( Base ‘ 𝐶 )
3 diag2.b 𝐵 = ( Base ‘ 𝐷 )
4 diag2.h 𝐻 = ( Hom ‘ 𝐶 )
5 diag2.c ( 𝜑𝐶 ∈ Cat )
6 diag2.d ( 𝜑𝐷 ∈ Cat )
7 diag2.x ( 𝜑𝑋𝐴 )
8 diag2.y ( 𝜑𝑌𝐴 )
9 diag2.f ( 𝜑𝐹 ∈ ( 𝑋 𝐻 𝑌 ) )
10 1 5 6 diagval ( 𝜑𝐿 = ( ⟨ 𝐶 , 𝐷 ⟩ curryF ( 𝐶 1stF 𝐷 ) ) )
11 10 fveq2d ( 𝜑 → ( 2nd𝐿 ) = ( 2nd ‘ ( ⟨ 𝐶 , 𝐷 ⟩ curryF ( 𝐶 1stF 𝐷 ) ) ) )
12 11 oveqd ( 𝜑 → ( 𝑋 ( 2nd𝐿 ) 𝑌 ) = ( 𝑋 ( 2nd ‘ ( ⟨ 𝐶 , 𝐷 ⟩ curryF ( 𝐶 1stF 𝐷 ) ) ) 𝑌 ) )
13 12 fveq1d ( 𝜑 → ( ( 𝑋 ( 2nd𝐿 ) 𝑌 ) ‘ 𝐹 ) = ( ( 𝑋 ( 2nd ‘ ( ⟨ 𝐶 , 𝐷 ⟩ curryF ( 𝐶 1stF 𝐷 ) ) ) 𝑌 ) ‘ 𝐹 ) )
14 eqid ( ⟨ 𝐶 , 𝐷 ⟩ curryF ( 𝐶 1stF 𝐷 ) ) = ( ⟨ 𝐶 , 𝐷 ⟩ curryF ( 𝐶 1stF 𝐷 ) )
15 eqid ( 𝐶 ×c 𝐷 ) = ( 𝐶 ×c 𝐷 )
16 eqid ( 𝐶 1stF 𝐷 ) = ( 𝐶 1stF 𝐷 )
17 15 5 6 16 1stfcl ( 𝜑 → ( 𝐶 1stF 𝐷 ) ∈ ( ( 𝐶 ×c 𝐷 ) Func 𝐶 ) )
18 eqid ( Id ‘ 𝐷 ) = ( Id ‘ 𝐷 )
19 eqid ( ( 𝑋 ( 2nd ‘ ( ⟨ 𝐶 , 𝐷 ⟩ curryF ( 𝐶 1stF 𝐷 ) ) ) 𝑌 ) ‘ 𝐹 ) = ( ( 𝑋 ( 2nd ‘ ( ⟨ 𝐶 , 𝐷 ⟩ curryF ( 𝐶 1stF 𝐷 ) ) ) 𝑌 ) ‘ 𝐹 )
20 14 2 5 6 17 3 4 18 7 8 9 19 curf2 ( 𝜑 → ( ( 𝑋 ( 2nd ‘ ( ⟨ 𝐶 , 𝐷 ⟩ curryF ( 𝐶 1stF 𝐷 ) ) ) 𝑌 ) ‘ 𝐹 ) = ( 𝑥𝐵 ↦ ( 𝐹 ( ⟨ 𝑋 , 𝑥 ⟩ ( 2nd ‘ ( 𝐶 1stF 𝐷 ) ) ⟨ 𝑌 , 𝑥 ⟩ ) ( ( Id ‘ 𝐷 ) ‘ 𝑥 ) ) ) )
21 15 2 3 xpcbas ( 𝐴 × 𝐵 ) = ( Base ‘ ( 𝐶 ×c 𝐷 ) )
22 eqid ( Hom ‘ ( 𝐶 ×c 𝐷 ) ) = ( Hom ‘ ( 𝐶 ×c 𝐷 ) )
23 5 adantr ( ( 𝜑𝑥𝐵 ) → 𝐶 ∈ Cat )
24 6 adantr ( ( 𝜑𝑥𝐵 ) → 𝐷 ∈ Cat )
25 opelxpi ( ( 𝑋𝐴𝑥𝐵 ) → ⟨ 𝑋 , 𝑥 ⟩ ∈ ( 𝐴 × 𝐵 ) )
26 7 25 sylan ( ( 𝜑𝑥𝐵 ) → ⟨ 𝑋 , 𝑥 ⟩ ∈ ( 𝐴 × 𝐵 ) )
27 opelxpi ( ( 𝑌𝐴𝑥𝐵 ) → ⟨ 𝑌 , 𝑥 ⟩ ∈ ( 𝐴 × 𝐵 ) )
28 8 27 sylan ( ( 𝜑𝑥𝐵 ) → ⟨ 𝑌 , 𝑥 ⟩ ∈ ( 𝐴 × 𝐵 ) )
29 15 21 22 23 24 16 26 28 1stf2 ( ( 𝜑𝑥𝐵 ) → ( ⟨ 𝑋 , 𝑥 ⟩ ( 2nd ‘ ( 𝐶 1stF 𝐷 ) ) ⟨ 𝑌 , 𝑥 ⟩ ) = ( 1st ↾ ( ⟨ 𝑋 , 𝑥 ⟩ ( Hom ‘ ( 𝐶 ×c 𝐷 ) ) ⟨ 𝑌 , 𝑥 ⟩ ) ) )
30 29 oveqd ( ( 𝜑𝑥𝐵 ) → ( 𝐹 ( ⟨ 𝑋 , 𝑥 ⟩ ( 2nd ‘ ( 𝐶 1stF 𝐷 ) ) ⟨ 𝑌 , 𝑥 ⟩ ) ( ( Id ‘ 𝐷 ) ‘ 𝑥 ) ) = ( 𝐹 ( 1st ↾ ( ⟨ 𝑋 , 𝑥 ⟩ ( Hom ‘ ( 𝐶 ×c 𝐷 ) ) ⟨ 𝑌 , 𝑥 ⟩ ) ) ( ( Id ‘ 𝐷 ) ‘ 𝑥 ) ) )
31 df-ov ( 𝐹 ( 1st ↾ ( ⟨ 𝑋 , 𝑥 ⟩ ( Hom ‘ ( 𝐶 ×c 𝐷 ) ) ⟨ 𝑌 , 𝑥 ⟩ ) ) ( ( Id ‘ 𝐷 ) ‘ 𝑥 ) ) = ( ( 1st ↾ ( ⟨ 𝑋 , 𝑥 ⟩ ( Hom ‘ ( 𝐶 ×c 𝐷 ) ) ⟨ 𝑌 , 𝑥 ⟩ ) ) ‘ ⟨ 𝐹 , ( ( Id ‘ 𝐷 ) ‘ 𝑥 ) ⟩ )
32 9 adantr ( ( 𝜑𝑥𝐵 ) → 𝐹 ∈ ( 𝑋 𝐻 𝑌 ) )
33 eqid ( Hom ‘ 𝐷 ) = ( Hom ‘ 𝐷 )
34 simpr ( ( 𝜑𝑥𝐵 ) → 𝑥𝐵 )
35 3 33 18 24 34 catidcl ( ( 𝜑𝑥𝐵 ) → ( ( Id ‘ 𝐷 ) ‘ 𝑥 ) ∈ ( 𝑥 ( Hom ‘ 𝐷 ) 𝑥 ) )
36 32 35 opelxpd ( ( 𝜑𝑥𝐵 ) → ⟨ 𝐹 , ( ( Id ‘ 𝐷 ) ‘ 𝑥 ) ⟩ ∈ ( ( 𝑋 𝐻 𝑌 ) × ( 𝑥 ( Hom ‘ 𝐷 ) 𝑥 ) ) )
37 7 adantr ( ( 𝜑𝑥𝐵 ) → 𝑋𝐴 )
38 8 adantr ( ( 𝜑𝑥𝐵 ) → 𝑌𝐴 )
39 15 2 3 4 33 37 34 38 34 22 xpchom2 ( ( 𝜑𝑥𝐵 ) → ( ⟨ 𝑋 , 𝑥 ⟩ ( Hom ‘ ( 𝐶 ×c 𝐷 ) ) ⟨ 𝑌 , 𝑥 ⟩ ) = ( ( 𝑋 𝐻 𝑌 ) × ( 𝑥 ( Hom ‘ 𝐷 ) 𝑥 ) ) )
40 36 39 eleqtrrd ( ( 𝜑𝑥𝐵 ) → ⟨ 𝐹 , ( ( Id ‘ 𝐷 ) ‘ 𝑥 ) ⟩ ∈ ( ⟨ 𝑋 , 𝑥 ⟩ ( Hom ‘ ( 𝐶 ×c 𝐷 ) ) ⟨ 𝑌 , 𝑥 ⟩ ) )
41 40 fvresd ( ( 𝜑𝑥𝐵 ) → ( ( 1st ↾ ( ⟨ 𝑋 , 𝑥 ⟩ ( Hom ‘ ( 𝐶 ×c 𝐷 ) ) ⟨ 𝑌 , 𝑥 ⟩ ) ) ‘ ⟨ 𝐹 , ( ( Id ‘ 𝐷 ) ‘ 𝑥 ) ⟩ ) = ( 1st ‘ ⟨ 𝐹 , ( ( Id ‘ 𝐷 ) ‘ 𝑥 ) ⟩ ) )
42 31 41 eqtrid ( ( 𝜑𝑥𝐵 ) → ( 𝐹 ( 1st ↾ ( ⟨ 𝑋 , 𝑥 ⟩ ( Hom ‘ ( 𝐶 ×c 𝐷 ) ) ⟨ 𝑌 , 𝑥 ⟩ ) ) ( ( Id ‘ 𝐷 ) ‘ 𝑥 ) ) = ( 1st ‘ ⟨ 𝐹 , ( ( Id ‘ 𝐷 ) ‘ 𝑥 ) ⟩ ) )
43 op1stg ( ( 𝐹 ∈ ( 𝑋 𝐻 𝑌 ) ∧ ( ( Id ‘ 𝐷 ) ‘ 𝑥 ) ∈ ( 𝑥 ( Hom ‘ 𝐷 ) 𝑥 ) ) → ( 1st ‘ ⟨ 𝐹 , ( ( Id ‘ 𝐷 ) ‘ 𝑥 ) ⟩ ) = 𝐹 )
44 9 35 43 syl2an2r ( ( 𝜑𝑥𝐵 ) → ( 1st ‘ ⟨ 𝐹 , ( ( Id ‘ 𝐷 ) ‘ 𝑥 ) ⟩ ) = 𝐹 )
45 30 42 44 3eqtrd ( ( 𝜑𝑥𝐵 ) → ( 𝐹 ( ⟨ 𝑋 , 𝑥 ⟩ ( 2nd ‘ ( 𝐶 1stF 𝐷 ) ) ⟨ 𝑌 , 𝑥 ⟩ ) ( ( Id ‘ 𝐷 ) ‘ 𝑥 ) ) = 𝐹 )
46 45 mpteq2dva ( 𝜑 → ( 𝑥𝐵 ↦ ( 𝐹 ( ⟨ 𝑋 , 𝑥 ⟩ ( 2nd ‘ ( 𝐶 1stF 𝐷 ) ) ⟨ 𝑌 , 𝑥 ⟩ ) ( ( Id ‘ 𝐷 ) ‘ 𝑥 ) ) ) = ( 𝑥𝐵𝐹 ) )
47 fconstmpt ( 𝐵 × { 𝐹 } ) = ( 𝑥𝐵𝐹 )
48 46 47 eqtr4di ( 𝜑 → ( 𝑥𝐵 ↦ ( 𝐹 ( ⟨ 𝑋 , 𝑥 ⟩ ( 2nd ‘ ( 𝐶 1stF 𝐷 ) ) ⟨ 𝑌 , 𝑥 ⟩ ) ( ( Id ‘ 𝐷 ) ‘ 𝑥 ) ) ) = ( 𝐵 × { 𝐹 } ) )
49 13 20 48 3eqtrd ( 𝜑 → ( ( 𝑋 ( 2nd𝐿 ) 𝑌 ) ‘ 𝐹 ) = ( 𝐵 × { 𝐹 } ) )