Metamath Proof Explorer


Theorem coapm

Description: Composition of arrows is a partial binary operation on arrows. (Contributed by Mario Carneiro, 11-Jan-2017)

Ref Expression
Hypotheses coapm.o · ˙ = comp a C
coapm.a A = Arrow C
Assertion coapm · ˙ A 𝑝𝑚 A × A

Proof

Step Hyp Ref Expression
1 coapm.o · ˙ = comp a C
2 coapm.a A = Arrow C
3 eqid comp C = comp C
4 1 2 3 coafval · ˙ = g A , f h A | cod a h = dom a g dom a f cod a g 2 nd g dom a f dom a g comp C cod a g 2 nd f
5 4 mpofun Fun · ˙
6 funfn Fun · ˙ · ˙ Fn dom · ˙
7 5 6 mpbi · ˙ Fn dom · ˙
8 1 2 dmcoass dom · ˙ A × A
9 8 sseli z dom · ˙ z A × A
10 1st2nd2 z A × A z = 1 st z 2 nd z
11 9 10 syl z dom · ˙ z = 1 st z 2 nd z
12 11 fveq2d z dom · ˙ · ˙ z = · ˙ 1 st z 2 nd z
13 df-ov 1 st z · ˙ 2 nd z = · ˙ 1 st z 2 nd z
14 12 13 eqtr4di z dom · ˙ · ˙ z = 1 st z · ˙ 2 nd z
15 eqid Hom a C = Hom a C
16 2 15 homarw dom a 2 nd z Hom a C cod a 1 st z A
17 id z dom · ˙ z dom · ˙
18 11 17 eqeltrrd z dom · ˙ 1 st z 2 nd z dom · ˙
19 df-br 1 st z dom · ˙ 2 nd z 1 st z 2 nd z dom · ˙
20 18 19 sylibr z dom · ˙ 1 st z dom · ˙ 2 nd z
21 1 2 eldmcoa 1 st z dom · ˙ 2 nd z 2 nd z A 1 st z A cod a 2 nd z = dom a 1 st z
22 20 21 sylib z dom · ˙ 2 nd z A 1 st z A cod a 2 nd z = dom a 1 st z
23 22 simp1d z dom · ˙ 2 nd z A
24 2 15 arwhoma 2 nd z A 2 nd z dom a 2 nd z Hom a C cod a 2 nd z
25 23 24 syl z dom · ˙ 2 nd z dom a 2 nd z Hom a C cod a 2 nd z
26 22 simp3d z dom · ˙ cod a 2 nd z = dom a 1 st z
27 26 oveq2d z dom · ˙ dom a 2 nd z Hom a C cod a 2 nd z = dom a 2 nd z Hom a C dom a 1 st z
28 25 27 eleqtrd z dom · ˙ 2 nd z dom a 2 nd z Hom a C dom a 1 st z
29 22 simp2d z dom · ˙ 1 st z A
30 2 15 arwhoma 1 st z A 1 st z dom a 1 st z Hom a C cod a 1 st z
31 29 30 syl z dom · ˙ 1 st z dom a 1 st z Hom a C cod a 1 st z
32 1 15 28 31 coahom z dom · ˙ 1 st z · ˙ 2 nd z dom a 2 nd z Hom a C cod a 1 st z
33 16 32 sselid z dom · ˙ 1 st z · ˙ 2 nd z A
34 14 33 eqeltrd z dom · ˙ · ˙ z A
35 34 rgen z dom · ˙ · ˙ z A
36 ffnfv · ˙ : dom · ˙ A · ˙ Fn dom · ˙ z dom · ˙ · ˙ z A
37 7 35 36 mpbir2an · ˙ : dom · ˙ A
38 2 fvexi A V
39 38 38 xpex A × A V
40 38 39 elpm2 · ˙ A 𝑝𝑚 A × A · ˙ : dom · ˙ A dom · ˙ A × A
41 37 8 40 mpbir2an · ˙ A 𝑝𝑚 A × A