Metamath Proof Explorer


Theorem xpccofval

Description: Value of composition in the binary product of categories. (Contributed by Mario Carneiro, 11-Jan-2017) (Proof shortened by AV, 2-Mar-2024)

Ref Expression
Hypotheses xpccofval.t 𝑇 = ( 𝐶 ×c 𝐷 )
xpccofval.b 𝐵 = ( Base ‘ 𝑇 )
xpccofval.k 𝐾 = ( Hom ‘ 𝑇 )
xpccofval.o1 · = ( comp ‘ 𝐶 )
xpccofval.o2 = ( comp ‘ 𝐷 )
xpccofval.o 𝑂 = ( comp ‘ 𝑇 )
Assertion xpccofval 𝑂 = ( 𝑥 ∈ ( 𝐵 × 𝐵 ) , 𝑦𝐵 ↦ ( 𝑔 ∈ ( ( 2nd𝑥 ) 𝐾 𝑦 ) , 𝑓 ∈ ( 𝐾𝑥 ) ↦ ⟨ ( ( 1st𝑔 ) ( ⟨ ( 1st ‘ ( 1st𝑥 ) ) , ( 1st ‘ ( 2nd𝑥 ) ) ⟩ · ( 1st𝑦 ) ) ( 1st𝑓 ) ) , ( ( 2nd𝑔 ) ( ⟨ ( 2nd ‘ ( 1st𝑥 ) ) , ( 2nd ‘ ( 2nd𝑥 ) ) ⟩ ( 2nd𝑦 ) ) ( 2nd𝑓 ) ) ⟩ ) )

Proof

Step Hyp Ref Expression
1 xpccofval.t 𝑇 = ( 𝐶 ×c 𝐷 )
2 xpccofval.b 𝐵 = ( Base ‘ 𝑇 )
3 xpccofval.k 𝐾 = ( Hom ‘ 𝑇 )
4 xpccofval.o1 · = ( comp ‘ 𝐶 )
5 xpccofval.o2 = ( comp ‘ 𝐷 )
6 xpccofval.o 𝑂 = ( comp ‘ 𝑇 )
7 eqid ( Base ‘ 𝐶 ) = ( Base ‘ 𝐶 )
8 eqid ( Base ‘ 𝐷 ) = ( Base ‘ 𝐷 )
9 eqid ( Hom ‘ 𝐶 ) = ( Hom ‘ 𝐶 )
10 eqid ( Hom ‘ 𝐷 ) = ( Hom ‘ 𝐷 )
11 simpl ( ( 𝐶 ∈ V ∧ 𝐷 ∈ V ) → 𝐶 ∈ V )
12 simpr ( ( 𝐶 ∈ V ∧ 𝐷 ∈ V ) → 𝐷 ∈ V )
13 1 7 8 xpcbas ( ( Base ‘ 𝐶 ) × ( Base ‘ 𝐷 ) ) = ( Base ‘ 𝑇 )
14 2 13 eqtr4i 𝐵 = ( ( Base ‘ 𝐶 ) × ( Base ‘ 𝐷 ) )
15 14 a1i ( ( 𝐶 ∈ V ∧ 𝐷 ∈ V ) → 𝐵 = ( ( Base ‘ 𝐶 ) × ( Base ‘ 𝐷 ) ) )
16 1 2 9 10 3 xpchomfval 𝐾 = ( 𝑢𝐵 , 𝑣𝐵 ↦ ( ( ( 1st𝑢 ) ( Hom ‘ 𝐶 ) ( 1st𝑣 ) ) × ( ( 2nd𝑢 ) ( Hom ‘ 𝐷 ) ( 2nd𝑣 ) ) ) )
17 16 a1i ( ( 𝐶 ∈ V ∧ 𝐷 ∈ V ) → 𝐾 = ( 𝑢𝐵 , 𝑣𝐵 ↦ ( ( ( 1st𝑢 ) ( Hom ‘ 𝐶 ) ( 1st𝑣 ) ) × ( ( 2nd𝑢 ) ( Hom ‘ 𝐷 ) ( 2nd𝑣 ) ) ) ) )
18 eqidd ( ( 𝐶 ∈ V ∧ 𝐷 ∈ V ) → ( 𝑥 ∈ ( 𝐵 × 𝐵 ) , 𝑦𝐵 ↦ ( 𝑔 ∈ ( ( 2nd𝑥 ) 𝐾 𝑦 ) , 𝑓 ∈ ( 𝐾𝑥 ) ↦ ⟨ ( ( 1st𝑔 ) ( ⟨ ( 1st ‘ ( 1st𝑥 ) ) , ( 1st ‘ ( 2nd𝑥 ) ) ⟩ · ( 1st𝑦 ) ) ( 1st𝑓 ) ) , ( ( 2nd𝑔 ) ( ⟨ ( 2nd ‘ ( 1st𝑥 ) ) , ( 2nd ‘ ( 2nd𝑥 ) ) ⟩ ( 2nd𝑦 ) ) ( 2nd𝑓 ) ) ⟩ ) ) = ( 𝑥 ∈ ( 𝐵 × 𝐵 ) , 𝑦𝐵 ↦ ( 𝑔 ∈ ( ( 2nd𝑥 ) 𝐾 𝑦 ) , 𝑓 ∈ ( 𝐾𝑥 ) ↦ ⟨ ( ( 1st𝑔 ) ( ⟨ ( 1st ‘ ( 1st𝑥 ) ) , ( 1st ‘ ( 2nd𝑥 ) ) ⟩ · ( 1st𝑦 ) ) ( 1st𝑓 ) ) , ( ( 2nd𝑔 ) ( ⟨ ( 2nd ‘ ( 1st𝑥 ) ) , ( 2nd ‘ ( 2nd𝑥 ) ) ⟩ ( 2nd𝑦 ) ) ( 2nd𝑓 ) ) ⟩ ) ) )
19 1 7 8 9 10 4 5 11 12 15 17 18 xpcval ( ( 𝐶 ∈ V ∧ 𝐷 ∈ V ) → 𝑇 = { ⟨ ( Base ‘ ndx ) , 𝐵 ⟩ , ⟨ ( Hom ‘ ndx ) , 𝐾 ⟩ , ⟨ ( comp ‘ ndx ) , ( 𝑥 ∈ ( 𝐵 × 𝐵 ) , 𝑦𝐵 ↦ ( 𝑔 ∈ ( ( 2nd𝑥 ) 𝐾 𝑦 ) , 𝑓 ∈ ( 𝐾𝑥 ) ↦ ⟨ ( ( 1st𝑔 ) ( ⟨ ( 1st ‘ ( 1st𝑥 ) ) , ( 1st ‘ ( 2nd𝑥 ) ) ⟩ · ( 1st𝑦 ) ) ( 1st𝑓 ) ) , ( ( 2nd𝑔 ) ( ⟨ ( 2nd ‘ ( 1st𝑥 ) ) , ( 2nd ‘ ( 2nd𝑥 ) ) ⟩ ( 2nd𝑦 ) ) ( 2nd𝑓 ) ) ⟩ ) ) ⟩ } )
20 catstr { ⟨ ( Base ‘ ndx ) , 𝐵 ⟩ , ⟨ ( Hom ‘ ndx ) , 𝐾 ⟩ , ⟨ ( comp ‘ ndx ) , ( 𝑥 ∈ ( 𝐵 × 𝐵 ) , 𝑦𝐵 ↦ ( 𝑔 ∈ ( ( 2nd𝑥 ) 𝐾 𝑦 ) , 𝑓 ∈ ( 𝐾𝑥 ) ↦ ⟨ ( ( 1st𝑔 ) ( ⟨ ( 1st ‘ ( 1st𝑥 ) ) , ( 1st ‘ ( 2nd𝑥 ) ) ⟩ · ( 1st𝑦 ) ) ( 1st𝑓 ) ) , ( ( 2nd𝑔 ) ( ⟨ ( 2nd ‘ ( 1st𝑥 ) ) , ( 2nd ‘ ( 2nd𝑥 ) ) ⟩ ( 2nd𝑦 ) ) ( 2nd𝑓 ) ) ⟩ ) ) ⟩ } Struct ⟨ 1 , 1 5 ⟩
21 ccoid comp = Slot ( comp ‘ ndx )
22 snsstp3 { ⟨ ( comp ‘ ndx ) , ( 𝑥 ∈ ( 𝐵 × 𝐵 ) , 𝑦𝐵 ↦ ( 𝑔 ∈ ( ( 2nd𝑥 ) 𝐾 𝑦 ) , 𝑓 ∈ ( 𝐾𝑥 ) ↦ ⟨ ( ( 1st𝑔 ) ( ⟨ ( 1st ‘ ( 1st𝑥 ) ) , ( 1st ‘ ( 2nd𝑥 ) ) ⟩ · ( 1st𝑦 ) ) ( 1st𝑓 ) ) , ( ( 2nd𝑔 ) ( ⟨ ( 2nd ‘ ( 1st𝑥 ) ) , ( 2nd ‘ ( 2nd𝑥 ) ) ⟩ ( 2nd𝑦 ) ) ( 2nd𝑓 ) ) ⟩ ) ) ⟩ } ⊆ { ⟨ ( Base ‘ ndx ) , 𝐵 ⟩ , ⟨ ( Hom ‘ ndx ) , 𝐾 ⟩ , ⟨ ( comp ‘ ndx ) , ( 𝑥 ∈ ( 𝐵 × 𝐵 ) , 𝑦𝐵 ↦ ( 𝑔 ∈ ( ( 2nd𝑥 ) 𝐾 𝑦 ) , 𝑓 ∈ ( 𝐾𝑥 ) ↦ ⟨ ( ( 1st𝑔 ) ( ⟨ ( 1st ‘ ( 1st𝑥 ) ) , ( 1st ‘ ( 2nd𝑥 ) ) ⟩ · ( 1st𝑦 ) ) ( 1st𝑓 ) ) , ( ( 2nd𝑔 ) ( ⟨ ( 2nd ‘ ( 1st𝑥 ) ) , ( 2nd ‘ ( 2nd𝑥 ) ) ⟩ ( 2nd𝑦 ) ) ( 2nd𝑓 ) ) ⟩ ) ) ⟩ }
23 2 fvexi 𝐵 ∈ V
24 23 23 xpex ( 𝐵 × 𝐵 ) ∈ V
25 24 23 mpoex ( 𝑥 ∈ ( 𝐵 × 𝐵 ) , 𝑦𝐵 ↦ ( 𝑔 ∈ ( ( 2nd𝑥 ) 𝐾 𝑦 ) , 𝑓 ∈ ( 𝐾𝑥 ) ↦ ⟨ ( ( 1st𝑔 ) ( ⟨ ( 1st ‘ ( 1st𝑥 ) ) , ( 1st ‘ ( 2nd𝑥 ) ) ⟩ · ( 1st𝑦 ) ) ( 1st𝑓 ) ) , ( ( 2nd𝑔 ) ( ⟨ ( 2nd ‘ ( 1st𝑥 ) ) , ( 2nd ‘ ( 2nd𝑥 ) ) ⟩ ( 2nd𝑦 ) ) ( 2nd𝑓 ) ) ⟩ ) ) ∈ V
26 25 a1i ( ( 𝐶 ∈ V ∧ 𝐷 ∈ V ) → ( 𝑥 ∈ ( 𝐵 × 𝐵 ) , 𝑦𝐵 ↦ ( 𝑔 ∈ ( ( 2nd𝑥 ) 𝐾 𝑦 ) , 𝑓 ∈ ( 𝐾𝑥 ) ↦ ⟨ ( ( 1st𝑔 ) ( ⟨ ( 1st ‘ ( 1st𝑥 ) ) , ( 1st ‘ ( 2nd𝑥 ) ) ⟩ · ( 1st𝑦 ) ) ( 1st𝑓 ) ) , ( ( 2nd𝑔 ) ( ⟨ ( 2nd ‘ ( 1st𝑥 ) ) , ( 2nd ‘ ( 2nd𝑥 ) ) ⟩ ( 2nd𝑦 ) ) ( 2nd𝑓 ) ) ⟩ ) ) ∈ V )
27 19 20 21 22 26 6 strfv3 ( ( 𝐶 ∈ V ∧ 𝐷 ∈ V ) → 𝑂 = ( 𝑥 ∈ ( 𝐵 × 𝐵 ) , 𝑦𝐵 ↦ ( 𝑔 ∈ ( ( 2nd𝑥 ) 𝐾 𝑦 ) , 𝑓 ∈ ( 𝐾𝑥 ) ↦ ⟨ ( ( 1st𝑔 ) ( ⟨ ( 1st ‘ ( 1st𝑥 ) ) , ( 1st ‘ ( 2nd𝑥 ) ) ⟩ · ( 1st𝑦 ) ) ( 1st𝑓 ) ) , ( ( 2nd𝑔 ) ( ⟨ ( 2nd ‘ ( 1st𝑥 ) ) , ( 2nd ‘ ( 2nd𝑥 ) ) ⟩ ( 2nd𝑦 ) ) ( 2nd𝑓 ) ) ⟩ ) ) )
28 fnxpc ×c Fn ( V × V )
29 28 fndmi dom ×c = ( V × V )
30 29 ndmov ( ¬ ( 𝐶 ∈ V ∧ 𝐷 ∈ V ) → ( 𝐶 ×c 𝐷 ) = ∅ )
31 1 30 syl5eq ( ¬ ( 𝐶 ∈ V ∧ 𝐷 ∈ V ) → 𝑇 = ∅ )
32 31 fveq2d ( ¬ ( 𝐶 ∈ V ∧ 𝐷 ∈ V ) → ( comp ‘ 𝑇 ) = ( comp ‘ ∅ ) )
33 21 str0 ∅ = ( comp ‘ ∅ )
34 32 6 33 3eqtr4g ( ¬ ( 𝐶 ∈ V ∧ 𝐷 ∈ V ) → 𝑂 = ∅ )
35 31 fveq2d ( ¬ ( 𝐶 ∈ V ∧ 𝐷 ∈ V ) → ( Base ‘ 𝑇 ) = ( Base ‘ ∅ ) )
36 base0 ∅ = ( Base ‘ ∅ )
37 35 2 36 3eqtr4g ( ¬ ( 𝐶 ∈ V ∧ 𝐷 ∈ V ) → 𝐵 = ∅ )
38 37 olcd ( ¬ ( 𝐶 ∈ V ∧ 𝐷 ∈ V ) → ( ( 𝐵 × 𝐵 ) = ∅ ∨ 𝐵 = ∅ ) )
39 0mpo0 ( ( ( 𝐵 × 𝐵 ) = ∅ ∨ 𝐵 = ∅ ) → ( 𝑥 ∈ ( 𝐵 × 𝐵 ) , 𝑦𝐵 ↦ ( 𝑔 ∈ ( ( 2nd𝑥 ) 𝐾 𝑦 ) , 𝑓 ∈ ( 𝐾𝑥 ) ↦ ⟨ ( ( 1st𝑔 ) ( ⟨ ( 1st ‘ ( 1st𝑥 ) ) , ( 1st ‘ ( 2nd𝑥 ) ) ⟩ · ( 1st𝑦 ) ) ( 1st𝑓 ) ) , ( ( 2nd𝑔 ) ( ⟨ ( 2nd ‘ ( 1st𝑥 ) ) , ( 2nd ‘ ( 2nd𝑥 ) ) ⟩ ( 2nd𝑦 ) ) ( 2nd𝑓 ) ) ⟩ ) ) = ∅ )
40 38 39 syl ( ¬ ( 𝐶 ∈ V ∧ 𝐷 ∈ V ) → ( 𝑥 ∈ ( 𝐵 × 𝐵 ) , 𝑦𝐵 ↦ ( 𝑔 ∈ ( ( 2nd𝑥 ) 𝐾 𝑦 ) , 𝑓 ∈ ( 𝐾𝑥 ) ↦ ⟨ ( ( 1st𝑔 ) ( ⟨ ( 1st ‘ ( 1st𝑥 ) ) , ( 1st ‘ ( 2nd𝑥 ) ) ⟩ · ( 1st𝑦 ) ) ( 1st𝑓 ) ) , ( ( 2nd𝑔 ) ( ⟨ ( 2nd ‘ ( 1st𝑥 ) ) , ( 2nd ‘ ( 2nd𝑥 ) ) ⟩ ( 2nd𝑦 ) ) ( 2nd𝑓 ) ) ⟩ ) ) = ∅ )
41 34 40 eqtr4d ( ¬ ( 𝐶 ∈ V ∧ 𝐷 ∈ V ) → 𝑂 = ( 𝑥 ∈ ( 𝐵 × 𝐵 ) , 𝑦𝐵 ↦ ( 𝑔 ∈ ( ( 2nd𝑥 ) 𝐾 𝑦 ) , 𝑓 ∈ ( 𝐾𝑥 ) ↦ ⟨ ( ( 1st𝑔 ) ( ⟨ ( 1st ‘ ( 1st𝑥 ) ) , ( 1st ‘ ( 2nd𝑥 ) ) ⟩ · ( 1st𝑦 ) ) ( 1st𝑓 ) ) , ( ( 2nd𝑔 ) ( ⟨ ( 2nd ‘ ( 1st𝑥 ) ) , ( 2nd ‘ ( 2nd𝑥 ) ) ⟩ ( 2nd𝑦 ) ) ( 2nd𝑓 ) ) ⟩ ) ) )
42 27 41 pm2.61i 𝑂 = ( 𝑥 ∈ ( 𝐵 × 𝐵 ) , 𝑦𝐵 ↦ ( 𝑔 ∈ ( ( 2nd𝑥 ) 𝐾 𝑦 ) , 𝑓 ∈ ( 𝐾𝑥 ) ↦ ⟨ ( ( 1st𝑔 ) ( ⟨ ( 1st ‘ ( 1st𝑥 ) ) , ( 1st ‘ ( 2nd𝑥 ) ) ⟩ · ( 1st𝑦 ) ) ( 1st𝑓 ) ) , ( ( 2nd𝑔 ) ( ⟨ ( 2nd ‘ ( 1st𝑥 ) ) , ( 2nd ‘ ( 2nd𝑥 ) ) ⟩ ( 2nd𝑦 ) ) ( 2nd𝑓 ) ) ⟩ ) )