Metamath Proof Explorer


Theorem ofoprabco

Description: Function operation as a composition with an operation. (Contributed by Thierry Arnoux, 4-Jun-2017)

Ref Expression
Hypotheses ofoprabco.1 𝑎 𝑀
ofoprabco.2 ( 𝜑𝐹 : 𝐴𝐵 )
ofoprabco.3 ( 𝜑𝐺 : 𝐴𝐶 )
ofoprabco.4 ( 𝜑𝐴𝑉 )
ofoprabco.5 ( 𝜑𝑀 = ( 𝑎𝐴 ↦ ⟨ ( 𝐹𝑎 ) , ( 𝐺𝑎 ) ⟩ ) )
ofoprabco.6 ( 𝜑𝑁 = ( 𝑥𝐵 , 𝑦𝐶 ↦ ( 𝑥 𝑅 𝑦 ) ) )
Assertion ofoprabco ( 𝜑 → ( 𝐹f 𝑅 𝐺 ) = ( 𝑁𝑀 ) )

Proof

Step Hyp Ref Expression
1 ofoprabco.1 𝑎 𝑀
2 ofoprabco.2 ( 𝜑𝐹 : 𝐴𝐵 )
3 ofoprabco.3 ( 𝜑𝐺 : 𝐴𝐶 )
4 ofoprabco.4 ( 𝜑𝐴𝑉 )
5 ofoprabco.5 ( 𝜑𝑀 = ( 𝑎𝐴 ↦ ⟨ ( 𝐹𝑎 ) , ( 𝐺𝑎 ) ⟩ ) )
6 ofoprabco.6 ( 𝜑𝑁 = ( 𝑥𝐵 , 𝑦𝐶 ↦ ( 𝑥 𝑅 𝑦 ) ) )
7 2 ffvelrnda ( ( 𝜑𝑎𝐴 ) → ( 𝐹𝑎 ) ∈ 𝐵 )
8 3 ffvelrnda ( ( 𝜑𝑎𝐴 ) → ( 𝐺𝑎 ) ∈ 𝐶 )
9 opelxpi ( ( ( 𝐹𝑎 ) ∈ 𝐵 ∧ ( 𝐺𝑎 ) ∈ 𝐶 ) → ⟨ ( 𝐹𝑎 ) , ( 𝐺𝑎 ) ⟩ ∈ ( 𝐵 × 𝐶 ) )
10 7 8 9 syl2anc ( ( 𝜑𝑎𝐴 ) → ⟨ ( 𝐹𝑎 ) , ( 𝐺𝑎 ) ⟩ ∈ ( 𝐵 × 𝐶 ) )
11 5 10 fvmpt2d ( ( 𝜑𝑎𝐴 ) → ( 𝑀𝑎 ) = ⟨ ( 𝐹𝑎 ) , ( 𝐺𝑎 ) ⟩ )
12 11 fveq2d ( ( 𝜑𝑎𝐴 ) → ( 𝑁 ‘ ( 𝑀𝑎 ) ) = ( 𝑁 ‘ ⟨ ( 𝐹𝑎 ) , ( 𝐺𝑎 ) ⟩ ) )
13 df-ov ( ( 𝐹𝑎 ) 𝑁 ( 𝐺𝑎 ) ) = ( 𝑁 ‘ ⟨ ( 𝐹𝑎 ) , ( 𝐺𝑎 ) ⟩ )
14 13 a1i ( ( 𝜑𝑎𝐴 ) → ( ( 𝐹𝑎 ) 𝑁 ( 𝐺𝑎 ) ) = ( 𝑁 ‘ ⟨ ( 𝐹𝑎 ) , ( 𝐺𝑎 ) ⟩ ) )
15 6 adantr ( ( 𝜑𝑎𝐴 ) → 𝑁 = ( 𝑥𝐵 , 𝑦𝐶 ↦ ( 𝑥 𝑅 𝑦 ) ) )
16 simprl ( ( ( 𝜑𝑎𝐴 ) ∧ ( 𝑥 = ( 𝐹𝑎 ) ∧ 𝑦 = ( 𝐺𝑎 ) ) ) → 𝑥 = ( 𝐹𝑎 ) )
17 simprr ( ( ( 𝜑𝑎𝐴 ) ∧ ( 𝑥 = ( 𝐹𝑎 ) ∧ 𝑦 = ( 𝐺𝑎 ) ) ) → 𝑦 = ( 𝐺𝑎 ) )
18 16 17 oveq12d ( ( ( 𝜑𝑎𝐴 ) ∧ ( 𝑥 = ( 𝐹𝑎 ) ∧ 𝑦 = ( 𝐺𝑎 ) ) ) → ( 𝑥 𝑅 𝑦 ) = ( ( 𝐹𝑎 ) 𝑅 ( 𝐺𝑎 ) ) )
19 ovexd ( ( 𝜑𝑎𝐴 ) → ( ( 𝐹𝑎 ) 𝑅 ( 𝐺𝑎 ) ) ∈ V )
20 15 18 7 8 19 ovmpod ( ( 𝜑𝑎𝐴 ) → ( ( 𝐹𝑎 ) 𝑁 ( 𝐺𝑎 ) ) = ( ( 𝐹𝑎 ) 𝑅 ( 𝐺𝑎 ) ) )
21 12 14 20 3eqtr2d ( ( 𝜑𝑎𝐴 ) → ( 𝑁 ‘ ( 𝑀𝑎 ) ) = ( ( 𝐹𝑎 ) 𝑅 ( 𝐺𝑎 ) ) )
22 21 mpteq2dva ( 𝜑 → ( 𝑎𝐴 ↦ ( 𝑁 ‘ ( 𝑀𝑎 ) ) ) = ( 𝑎𝐴 ↦ ( ( 𝐹𝑎 ) 𝑅 ( 𝐺𝑎 ) ) ) )
23 ovex ( 𝑥 𝑅 𝑦 ) ∈ V
24 23 rgen2w 𝑥𝐵𝑦𝐶 ( 𝑥 𝑅 𝑦 ) ∈ V
25 eqid ( 𝑥𝐵 , 𝑦𝐶 ↦ ( 𝑥 𝑅 𝑦 ) ) = ( 𝑥𝐵 , 𝑦𝐶 ↦ ( 𝑥 𝑅 𝑦 ) )
26 25 fmpo ( ∀ 𝑥𝐵𝑦𝐶 ( 𝑥 𝑅 𝑦 ) ∈ V ↔ ( 𝑥𝐵 , 𝑦𝐶 ↦ ( 𝑥 𝑅 𝑦 ) ) : ( 𝐵 × 𝐶 ) ⟶ V )
27 24 26 mpbi ( 𝑥𝐵 , 𝑦𝐶 ↦ ( 𝑥 𝑅 𝑦 ) ) : ( 𝐵 × 𝐶 ) ⟶ V
28 6 feq1d ( 𝜑 → ( 𝑁 : ( 𝐵 × 𝐶 ) ⟶ V ↔ ( 𝑥𝐵 , 𝑦𝐶 ↦ ( 𝑥 𝑅 𝑦 ) ) : ( 𝐵 × 𝐶 ) ⟶ V ) )
29 27 28 mpbiri ( 𝜑𝑁 : ( 𝐵 × 𝐶 ) ⟶ V )
30 5 10 fmpt3d ( 𝜑𝑀 : 𝐴 ⟶ ( 𝐵 × 𝐶 ) )
31 1 fcomptf ( ( 𝑁 : ( 𝐵 × 𝐶 ) ⟶ V ∧ 𝑀 : 𝐴 ⟶ ( 𝐵 × 𝐶 ) ) → ( 𝑁𝑀 ) = ( 𝑎𝐴 ↦ ( 𝑁 ‘ ( 𝑀𝑎 ) ) ) )
32 29 30 31 syl2anc ( 𝜑 → ( 𝑁𝑀 ) = ( 𝑎𝐴 ↦ ( 𝑁 ‘ ( 𝑀𝑎 ) ) ) )
33 2 feqmptd ( 𝜑𝐹 = ( 𝑎𝐴 ↦ ( 𝐹𝑎 ) ) )
34 3 feqmptd ( 𝜑𝐺 = ( 𝑎𝐴 ↦ ( 𝐺𝑎 ) ) )
35 4 7 8 33 34 offval2 ( 𝜑 → ( 𝐹f 𝑅 𝐺 ) = ( 𝑎𝐴 ↦ ( ( 𝐹𝑎 ) 𝑅 ( 𝐺𝑎 ) ) ) )
36 22 32 35 3eqtr4rd ( 𝜑 → ( 𝐹f 𝑅 𝐺 ) = ( 𝑁𝑀 ) )