Metamath Proof Explorer


Theorem setccofval

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

Ref Expression
Hypotheses setcbas.c 𝐶 = ( SetCat ‘ 𝑈 )
setcbas.u ( 𝜑𝑈𝑉 )
setcco.o · = ( comp ‘ 𝐶 )
Assertion setccofval ( 𝜑· = ( 𝑣 ∈ ( 𝑈 × 𝑈 ) , 𝑧𝑈 ↦ ( 𝑔 ∈ ( 𝑧m ( 2nd𝑣 ) ) , 𝑓 ∈ ( ( 2nd𝑣 ) ↑m ( 1st𝑣 ) ) ↦ ( 𝑔𝑓 ) ) ) )

Proof

Step Hyp Ref Expression
1 setcbas.c 𝐶 = ( SetCat ‘ 𝑈 )
2 setcbas.u ( 𝜑𝑈𝑉 )
3 setcco.o · = ( comp ‘ 𝐶 )
4 eqid ( Hom ‘ 𝐶 ) = ( Hom ‘ 𝐶 )
5 1 2 4 setchomfval ( 𝜑 → ( Hom ‘ 𝐶 ) = ( 𝑥𝑈 , 𝑦𝑈 ↦ ( 𝑦m 𝑥 ) ) )
6 eqidd ( 𝜑 → ( 𝑣 ∈ ( 𝑈 × 𝑈 ) , 𝑧𝑈 ↦ ( 𝑔 ∈ ( 𝑧m ( 2nd𝑣 ) ) , 𝑓 ∈ ( ( 2nd𝑣 ) ↑m ( 1st𝑣 ) ) ↦ ( 𝑔𝑓 ) ) ) = ( 𝑣 ∈ ( 𝑈 × 𝑈 ) , 𝑧𝑈 ↦ ( 𝑔 ∈ ( 𝑧m ( 2nd𝑣 ) ) , 𝑓 ∈ ( ( 2nd𝑣 ) ↑m ( 1st𝑣 ) ) ↦ ( 𝑔𝑓 ) ) ) )
7 1 2 5 6 setcval ( 𝜑𝐶 = { ⟨ ( Base ‘ ndx ) , 𝑈 ⟩ , ⟨ ( Hom ‘ ndx ) , ( Hom ‘ 𝐶 ) ⟩ , ⟨ ( comp ‘ ndx ) , ( 𝑣 ∈ ( 𝑈 × 𝑈 ) , 𝑧𝑈 ↦ ( 𝑔 ∈ ( 𝑧m ( 2nd𝑣 ) ) , 𝑓 ∈ ( ( 2nd𝑣 ) ↑m ( 1st𝑣 ) ) ↦ ( 𝑔𝑓 ) ) ) ⟩ } )
8 catstr { ⟨ ( Base ‘ ndx ) , 𝑈 ⟩ , ⟨ ( Hom ‘ ndx ) , ( Hom ‘ 𝐶 ) ⟩ , ⟨ ( comp ‘ ndx ) , ( 𝑣 ∈ ( 𝑈 × 𝑈 ) , 𝑧𝑈 ↦ ( 𝑔 ∈ ( 𝑧m ( 2nd𝑣 ) ) , 𝑓 ∈ ( ( 2nd𝑣 ) ↑m ( 1st𝑣 ) ) ↦ ( 𝑔𝑓 ) ) ) ⟩ } Struct ⟨ 1 , 1 5 ⟩
9 ccoid comp = Slot ( comp ‘ ndx )
10 snsstp3 { ⟨ ( comp ‘ ndx ) , ( 𝑣 ∈ ( 𝑈 × 𝑈 ) , 𝑧𝑈 ↦ ( 𝑔 ∈ ( 𝑧m ( 2nd𝑣 ) ) , 𝑓 ∈ ( ( 2nd𝑣 ) ↑m ( 1st𝑣 ) ) ↦ ( 𝑔𝑓 ) ) ) ⟩ } ⊆ { ⟨ ( Base ‘ ndx ) , 𝑈 ⟩ , ⟨ ( Hom ‘ ndx ) , ( Hom ‘ 𝐶 ) ⟩ , ⟨ ( comp ‘ ndx ) , ( 𝑣 ∈ ( 𝑈 × 𝑈 ) , 𝑧𝑈 ↦ ( 𝑔 ∈ ( 𝑧m ( 2nd𝑣 ) ) , 𝑓 ∈ ( ( 2nd𝑣 ) ↑m ( 1st𝑣 ) ) ↦ ( 𝑔𝑓 ) ) ) ⟩ }
11 2 2 xpexd ( 𝜑 → ( 𝑈 × 𝑈 ) ∈ V )
12 mpoexga ( ( ( 𝑈 × 𝑈 ) ∈ V ∧ 𝑈𝑉 ) → ( 𝑣 ∈ ( 𝑈 × 𝑈 ) , 𝑧𝑈 ↦ ( 𝑔 ∈ ( 𝑧m ( 2nd𝑣 ) ) , 𝑓 ∈ ( ( 2nd𝑣 ) ↑m ( 1st𝑣 ) ) ↦ ( 𝑔𝑓 ) ) ) ∈ V )
13 11 2 12 syl2anc ( 𝜑 → ( 𝑣 ∈ ( 𝑈 × 𝑈 ) , 𝑧𝑈 ↦ ( 𝑔 ∈ ( 𝑧m ( 2nd𝑣 ) ) , 𝑓 ∈ ( ( 2nd𝑣 ) ↑m ( 1st𝑣 ) ) ↦ ( 𝑔𝑓 ) ) ) ∈ V )
14 7 8 9 10 13 3 strfv3 ( 𝜑· = ( 𝑣 ∈ ( 𝑈 × 𝑈 ) , 𝑧𝑈 ↦ ( 𝑔 ∈ ( 𝑧m ( 2nd𝑣 ) ) , 𝑓 ∈ ( ( 2nd𝑣 ) ↑m ( 1st𝑣 ) ) ↦ ( 𝑔𝑓 ) ) ) )