Metamath Proof Explorer


Theorem coaval

Description: Value of composition for composable arrows. (Contributed by Mario Carneiro, 11-Jan-2017)

Ref Expression
Hypotheses homdmcoa.o · = ( compa𝐶 )
homdmcoa.h 𝐻 = ( Homa𝐶 )
homdmcoa.f ( 𝜑𝐹 ∈ ( 𝑋 𝐻 𝑌 ) )
homdmcoa.g ( 𝜑𝐺 ∈ ( 𝑌 𝐻 𝑍 ) )
coaval.x = ( comp ‘ 𝐶 )
Assertion coaval ( 𝜑 → ( 𝐺 · 𝐹 ) = ⟨ 𝑋 , 𝑍 , ( ( 2nd𝐺 ) ( ⟨ 𝑋 , 𝑌 𝑍 ) ( 2nd𝐹 ) ) ⟩ )

Proof

Step Hyp Ref Expression
1 homdmcoa.o · = ( compa𝐶 )
2 homdmcoa.h 𝐻 = ( Homa𝐶 )
3 homdmcoa.f ( 𝜑𝐹 ∈ ( 𝑋 𝐻 𝑌 ) )
4 homdmcoa.g ( 𝜑𝐺 ∈ ( 𝑌 𝐻 𝑍 ) )
5 coaval.x = ( comp ‘ 𝐶 )
6 eqid ( Arrow ‘ 𝐶 ) = ( Arrow ‘ 𝐶 )
7 1 6 5 coafval · = ( 𝑔 ∈ ( Arrow ‘ 𝐶 ) , 𝑓 ∈ { ∈ ( Arrow ‘ 𝐶 ) ∣ ( coda ) = ( doma𝑔 ) } ↦ ⟨ ( doma𝑓 ) , ( coda𝑔 ) , ( ( 2nd𝑔 ) ( ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ ( coda𝑔 ) ) ( 2nd𝑓 ) ) ⟩ )
8 6 2 homarw ( 𝑌 𝐻 𝑍 ) ⊆ ( Arrow ‘ 𝐶 )
9 8 4 sselid ( 𝜑𝐺 ∈ ( Arrow ‘ 𝐶 ) )
10 fveqeq2 ( = 𝐹 → ( ( coda ) = ( doma𝑔 ) ↔ ( coda𝐹 ) = ( doma𝑔 ) ) )
11 6 2 homarw ( 𝑋 𝐻 𝑌 ) ⊆ ( Arrow ‘ 𝐶 )
12 3 adantr ( ( 𝜑𝑔 = 𝐺 ) → 𝐹 ∈ ( 𝑋 𝐻 𝑌 ) )
13 11 12 sselid ( ( 𝜑𝑔 = 𝐺 ) → 𝐹 ∈ ( Arrow ‘ 𝐶 ) )
14 2 homacd ( 𝐹 ∈ ( 𝑋 𝐻 𝑌 ) → ( coda𝐹 ) = 𝑌 )
15 12 14 syl ( ( 𝜑𝑔 = 𝐺 ) → ( coda𝐹 ) = 𝑌 )
16 simpr ( ( 𝜑𝑔 = 𝐺 ) → 𝑔 = 𝐺 )
17 16 fveq2d ( ( 𝜑𝑔 = 𝐺 ) → ( doma𝑔 ) = ( doma𝐺 ) )
18 4 adantr ( ( 𝜑𝑔 = 𝐺 ) → 𝐺 ∈ ( 𝑌 𝐻 𝑍 ) )
19 2 homadm ( 𝐺 ∈ ( 𝑌 𝐻 𝑍 ) → ( doma𝐺 ) = 𝑌 )
20 18 19 syl ( ( 𝜑𝑔 = 𝐺 ) → ( doma𝐺 ) = 𝑌 )
21 17 20 eqtrd ( ( 𝜑𝑔 = 𝐺 ) → ( doma𝑔 ) = 𝑌 )
22 15 21 eqtr4d ( ( 𝜑𝑔 = 𝐺 ) → ( coda𝐹 ) = ( doma𝑔 ) )
23 10 13 22 elrabd ( ( 𝜑𝑔 = 𝐺 ) → 𝐹 ∈ { ∈ ( Arrow ‘ 𝐶 ) ∣ ( coda ) = ( doma𝑔 ) } )
24 otex ⟨ ( doma𝑓 ) , ( coda𝑔 ) , ( ( 2nd𝑔 ) ( ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ ( coda𝑔 ) ) ( 2nd𝑓 ) ) ⟩ ∈ V
25 24 a1i ( ( 𝜑 ∧ ( 𝑔 = 𝐺𝑓 = 𝐹 ) ) → ⟨ ( doma𝑓 ) , ( coda𝑔 ) , ( ( 2nd𝑔 ) ( ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ ( coda𝑔 ) ) ( 2nd𝑓 ) ) ⟩ ∈ V )
26 simprr ( ( 𝜑 ∧ ( 𝑔 = 𝐺𝑓 = 𝐹 ) ) → 𝑓 = 𝐹 )
27 26 fveq2d ( ( 𝜑 ∧ ( 𝑔 = 𝐺𝑓 = 𝐹 ) ) → ( doma𝑓 ) = ( doma𝐹 ) )
28 2 homadm ( 𝐹 ∈ ( 𝑋 𝐻 𝑌 ) → ( doma𝐹 ) = 𝑋 )
29 12 28 syl ( ( 𝜑𝑔 = 𝐺 ) → ( doma𝐹 ) = 𝑋 )
30 29 adantrr ( ( 𝜑 ∧ ( 𝑔 = 𝐺𝑓 = 𝐹 ) ) → ( doma𝐹 ) = 𝑋 )
31 27 30 eqtrd ( ( 𝜑 ∧ ( 𝑔 = 𝐺𝑓 = 𝐹 ) ) → ( doma𝑓 ) = 𝑋 )
32 16 fveq2d ( ( 𝜑𝑔 = 𝐺 ) → ( coda𝑔 ) = ( coda𝐺 ) )
33 2 homacd ( 𝐺 ∈ ( 𝑌 𝐻 𝑍 ) → ( coda𝐺 ) = 𝑍 )
34 18 33 syl ( ( 𝜑𝑔 = 𝐺 ) → ( coda𝐺 ) = 𝑍 )
35 32 34 eqtrd ( ( 𝜑𝑔 = 𝐺 ) → ( coda𝑔 ) = 𝑍 )
36 35 adantrr ( ( 𝜑 ∧ ( 𝑔 = 𝐺𝑓 = 𝐹 ) ) → ( coda𝑔 ) = 𝑍 )
37 21 adantrr ( ( 𝜑 ∧ ( 𝑔 = 𝐺𝑓 = 𝐹 ) ) → ( doma𝑔 ) = 𝑌 )
38 31 37 opeq12d ( ( 𝜑 ∧ ( 𝑔 = 𝐺𝑓 = 𝐹 ) ) → ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ = ⟨ 𝑋 , 𝑌 ⟩ )
39 38 36 oveq12d ( ( 𝜑 ∧ ( 𝑔 = 𝐺𝑓 = 𝐹 ) ) → ( ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ ( coda𝑔 ) ) = ( ⟨ 𝑋 , 𝑌 𝑍 ) )
40 simprl ( ( 𝜑 ∧ ( 𝑔 = 𝐺𝑓 = 𝐹 ) ) → 𝑔 = 𝐺 )
41 40 fveq2d ( ( 𝜑 ∧ ( 𝑔 = 𝐺𝑓 = 𝐹 ) ) → ( 2nd𝑔 ) = ( 2nd𝐺 ) )
42 26 fveq2d ( ( 𝜑 ∧ ( 𝑔 = 𝐺𝑓 = 𝐹 ) ) → ( 2nd𝑓 ) = ( 2nd𝐹 ) )
43 39 41 42 oveq123d ( ( 𝜑 ∧ ( 𝑔 = 𝐺𝑓 = 𝐹 ) ) → ( ( 2nd𝑔 ) ( ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ ( coda𝑔 ) ) ( 2nd𝑓 ) ) = ( ( 2nd𝐺 ) ( ⟨ 𝑋 , 𝑌 𝑍 ) ( 2nd𝐹 ) ) )
44 31 36 43 oteq123d ( ( 𝜑 ∧ ( 𝑔 = 𝐺𝑓 = 𝐹 ) ) → ⟨ ( doma𝑓 ) , ( coda𝑔 ) , ( ( 2nd𝑔 ) ( ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ ( coda𝑔 ) ) ( 2nd𝑓 ) ) ⟩ = ⟨ 𝑋 , 𝑍 , ( ( 2nd𝐺 ) ( ⟨ 𝑋 , 𝑌 𝑍 ) ( 2nd𝐹 ) ) ⟩ )
45 9 23 25 44 ovmpodv2 ( 𝜑 → ( · = ( 𝑔 ∈ ( Arrow ‘ 𝐶 ) , 𝑓 ∈ { ∈ ( Arrow ‘ 𝐶 ) ∣ ( coda ) = ( doma𝑔 ) } ↦ ⟨ ( doma𝑓 ) , ( coda𝑔 ) , ( ( 2nd𝑔 ) ( ⟨ ( doma𝑓 ) , ( doma𝑔 ) ⟩ ( coda𝑔 ) ) ( 2nd𝑓 ) ) ⟩ ) → ( 𝐺 · 𝐹 ) = ⟨ 𝑋 , 𝑍 , ( ( 2nd𝐺 ) ( ⟨ 𝑋 , 𝑌 𝑍 ) ( 2nd𝐹 ) ) ⟩ ) )
46 7 45 mpi ( 𝜑 → ( 𝐺 · 𝐹 ) = ⟨ 𝑋 , 𝑍 , ( ( 2nd𝐺 ) ( ⟨ 𝑋 , 𝑌 𝑍 ) ( 2nd𝐹 ) ) ⟩ )