Metamath Proof Explorer


Definition df-coa

Description: Definition of the composition of arrows. Since arrows are tagged with domain and codomain, this does not need to be a quinary operation like the regular composition in a category comp . Instead, it is a partial binary operation on arrows, which is defined when the domain of the first arrow matches the codomain of the second. (Contributed by Mario Carneiro, 11-Jan-2017)

Ref Expression
Assertion df-coa compa = ( 𝑐 ∈ Cat ↦ ( 𝑔 ∈ ( Arrow ‘ 𝑐 ) , 𝑓 ∈ { ∈ ( Arrow ‘ 𝑐 ) ∣ ( coda ) = ( doma𝑔 ) } ↦ ⟨ ( doma𝑓 ) , ( coda𝑔 ) , ( ( 2nd𝑔 ) ( ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ ( comp ‘ 𝑐 ) ( coda𝑔 ) ) ( 2nd𝑓 ) ) ⟩ ) )

Detailed syntax breakdown

Step Hyp Ref Expression
0 ccoa compa
1 vc 𝑐
2 ccat Cat
3 vg 𝑔
4 carw Arrow
5 1 cv 𝑐
6 5 4 cfv ( Arrow ‘ 𝑐 )
7 vf 𝑓
8 vh
9 ccoda coda
10 8 cv
11 10 9 cfv ( coda )
12 cdoma doma
13 3 cv 𝑔
14 13 12 cfv ( doma𝑔 )
15 11 14 wceq ( coda ) = ( doma𝑔 )
16 15 8 6 crab { ∈ ( Arrow ‘ 𝑐 ) ∣ ( coda ) = ( doma𝑔 ) }
17 7 cv 𝑓
18 17 12 cfv ( doma𝑓 )
19 13 9 cfv ( coda𝑔 )
20 c2nd 2nd
21 13 20 cfv ( 2nd𝑔 )
22 18 14 cop ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩
23 cco comp
24 5 23 cfv ( comp ‘ 𝑐 )
25 22 19 24 co ( ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ ( comp ‘ 𝑐 ) ( coda𝑔 ) )
26 17 20 cfv ( 2nd𝑓 )
27 21 26 25 co ( ( 2nd𝑔 ) ( ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ ( comp ‘ 𝑐 ) ( coda𝑔 ) ) ( 2nd𝑓 ) )
28 18 19 27 cotp ⟨ ( doma𝑓 ) , ( coda𝑔 ) , ( ( 2nd𝑔 ) ( ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ ( comp ‘ 𝑐 ) ( coda𝑔 ) ) ( 2nd𝑓 ) ) ⟩
29 3 7 6 16 28 cmpo ( 𝑔 ∈ ( Arrow ‘ 𝑐 ) , 𝑓 ∈ { ∈ ( Arrow ‘ 𝑐 ) ∣ ( coda ) = ( doma𝑔 ) } ↦ ⟨ ( doma𝑓 ) , ( coda𝑔 ) , ( ( 2nd𝑔 ) ( ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ ( comp ‘ 𝑐 ) ( coda𝑔 ) ) ( 2nd𝑓 ) ) ⟩ )
30 1 2 29 cmpt ( 𝑐 ∈ Cat ↦ ( 𝑔 ∈ ( Arrow ‘ 𝑐 ) , 𝑓 ∈ { ∈ ( Arrow ‘ 𝑐 ) ∣ ( coda ) = ( doma𝑔 ) } ↦ ⟨ ( doma𝑓 ) , ( coda𝑔 ) , ( ( 2nd𝑔 ) ( ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ ( comp ‘ 𝑐 ) ( coda𝑔 ) ) ( 2nd𝑓 ) ) ⟩ ) )
31 0 30 wceq compa = ( 𝑐 ∈ Cat ↦ ( 𝑔 ∈ ( Arrow ‘ 𝑐 ) , 𝑓 ∈ { ∈ ( Arrow ‘ 𝑐 ) ∣ ( coda ) = ( doma𝑔 ) } ↦ ⟨ ( doma𝑓 ) , ( coda𝑔 ) , ( ( 2nd𝑔 ) ( ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ ( comp ‘ 𝑐 ) ( coda𝑔 ) ) ( 2nd𝑓 ) ) ⟩ ) )