Metamath Proof Explorer


Theorem eldmcoa

Description: A pair <. G , F >. is in the domain of the arrow composition, if the domain of G equals the codomain of F . (In this case we say G and F are composable.) (Contributed by Mario Carneiro, 11-Jan-2017)

Ref Expression
Hypotheses coafval.o · = ( compa𝐶 )
coafval.a 𝐴 = ( Arrow ‘ 𝐶 )
Assertion eldmcoa ( 𝐺 dom · 𝐹 ↔ ( 𝐹𝐴𝐺𝐴 ∧ ( coda𝐹 ) = ( doma𝐺 ) ) )

Proof

Step Hyp Ref Expression
1 coafval.o · = ( compa𝐶 )
2 coafval.a 𝐴 = ( Arrow ‘ 𝐶 )
3 df-br ( 𝐺 dom · 𝐹 ↔ ⟨ 𝐺 , 𝐹 ⟩ ∈ dom · )
4 otex ⟨ ( doma𝑓 ) , ( coda𝑔 ) , ( ( 2nd𝑔 ) ( ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ ( comp ‘ 𝐶 ) ( coda𝑔 ) ) ( 2nd𝑓 ) ) ⟩ ∈ V
5 4 rgen2w 𝑔𝐴𝑓 ∈ { 𝐴 ∣ ( coda ) = ( doma𝑔 ) } ⟨ ( doma𝑓 ) , ( coda𝑔 ) , ( ( 2nd𝑔 ) ( ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ ( comp ‘ 𝐶 ) ( coda𝑔 ) ) ( 2nd𝑓 ) ) ⟩ ∈ V
6 eqid ( comp ‘ 𝐶 ) = ( comp ‘ 𝐶 )
7 1 2 6 coafval · = ( 𝑔𝐴 , 𝑓 ∈ { 𝐴 ∣ ( coda ) = ( doma𝑔 ) } ↦ ⟨ ( doma𝑓 ) , ( coda𝑔 ) , ( ( 2nd𝑔 ) ( ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ ( comp ‘ 𝐶 ) ( coda𝑔 ) ) ( 2nd𝑓 ) ) ⟩ )
8 7 fmpox ( ∀ 𝑔𝐴𝑓 ∈ { 𝐴 ∣ ( coda ) = ( doma𝑔 ) } ⟨ ( doma𝑓 ) , ( coda𝑔 ) , ( ( 2nd𝑔 ) ( ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ ( comp ‘ 𝐶 ) ( coda𝑔 ) ) ( 2nd𝑓 ) ) ⟩ ∈ V ↔ · : 𝑔𝐴 ( { 𝑔 } × { 𝐴 ∣ ( coda ) = ( doma𝑔 ) } ) ⟶ V )
9 5 8 mpbi · : 𝑔𝐴 ( { 𝑔 } × { 𝐴 ∣ ( coda ) = ( doma𝑔 ) } ) ⟶ V
10 9 fdmi dom · = 𝑔𝐴 ( { 𝑔 } × { 𝐴 ∣ ( coda ) = ( doma𝑔 ) } )
11 10 eleq2i ( ⟨ 𝐺 , 𝐹 ⟩ ∈ dom · ↔ ⟨ 𝐺 , 𝐹 ⟩ ∈ 𝑔𝐴 ( { 𝑔 } × { 𝐴 ∣ ( coda ) = ( doma𝑔 ) } ) )
12 fveq2 ( 𝑔 = 𝐺 → ( doma𝑔 ) = ( doma𝐺 ) )
13 12 eqeq2d ( 𝑔 = 𝐺 → ( ( coda ) = ( doma𝑔 ) ↔ ( coda ) = ( doma𝐺 ) ) )
14 13 rabbidv ( 𝑔 = 𝐺 → { 𝐴 ∣ ( coda ) = ( doma𝑔 ) } = { 𝐴 ∣ ( coda ) = ( doma𝐺 ) } )
15 14 opeliunxp2 ( ⟨ 𝐺 , 𝐹 ⟩ ∈ 𝑔𝐴 ( { 𝑔 } × { 𝐴 ∣ ( coda ) = ( doma𝑔 ) } ) ↔ ( 𝐺𝐴𝐹 ∈ { 𝐴 ∣ ( coda ) = ( doma𝐺 ) } ) )
16 fveqeq2 ( = 𝐹 → ( ( coda ) = ( doma𝐺 ) ↔ ( coda𝐹 ) = ( doma𝐺 ) ) )
17 16 elrab ( 𝐹 ∈ { 𝐴 ∣ ( coda ) = ( doma𝐺 ) } ↔ ( 𝐹𝐴 ∧ ( coda𝐹 ) = ( doma𝐺 ) ) )
18 17 anbi2i ( ( 𝐺𝐴𝐹 ∈ { 𝐴 ∣ ( coda ) = ( doma𝐺 ) } ) ↔ ( 𝐺𝐴 ∧ ( 𝐹𝐴 ∧ ( coda𝐹 ) = ( doma𝐺 ) ) ) )
19 an12 ( ( 𝐺𝐴 ∧ ( 𝐹𝐴 ∧ ( coda𝐹 ) = ( doma𝐺 ) ) ) ↔ ( 𝐹𝐴 ∧ ( 𝐺𝐴 ∧ ( coda𝐹 ) = ( doma𝐺 ) ) ) )
20 3anass ( ( 𝐹𝐴𝐺𝐴 ∧ ( coda𝐹 ) = ( doma𝐺 ) ) ↔ ( 𝐹𝐴 ∧ ( 𝐺𝐴 ∧ ( coda𝐹 ) = ( doma𝐺 ) ) ) )
21 19 20 bitr4i ( ( 𝐺𝐴 ∧ ( 𝐹𝐴 ∧ ( coda𝐹 ) = ( doma𝐺 ) ) ) ↔ ( 𝐹𝐴𝐺𝐴 ∧ ( coda𝐹 ) = ( doma𝐺 ) ) )
22 15 18 21 3bitri ( ⟨ 𝐺 , 𝐹 ⟩ ∈ 𝑔𝐴 ( { 𝑔 } × { 𝐴 ∣ ( coda ) = ( doma𝑔 ) } ) ↔ ( 𝐹𝐴𝐺𝐴 ∧ ( coda𝐹 ) = ( doma𝐺 ) ) )
23 3 11 22 3bitri ( 𝐺 dom · 𝐹 ↔ ( 𝐹𝐴𝐺𝐴 ∧ ( coda𝐹 ) = ( doma𝐺 ) ) )