Metamath Proof Explorer


Theorem caofdi

Description: Transfer a distributive law to the function operation. (Contributed by Mario Carneiro, 26-Jul-2014)

Ref Expression
Hypotheses caofdi.1 ( 𝜑𝐴𝑉 )
caofdi.2 ( 𝜑𝐹 : 𝐴𝐾 )
caofdi.3 ( 𝜑𝐺 : 𝐴𝑆 )
caofdi.4 ( 𝜑𝐻 : 𝐴𝑆 )
caofdi.5 ( ( 𝜑 ∧ ( 𝑥𝐾𝑦𝑆𝑧𝑆 ) ) → ( 𝑥 𝑇 ( 𝑦 𝑅 𝑧 ) ) = ( ( 𝑥 𝑇 𝑦 ) 𝑂 ( 𝑥 𝑇 𝑧 ) ) )
Assertion caofdi ( 𝜑 → ( 𝐹f 𝑇 ( 𝐺f 𝑅 𝐻 ) ) = ( ( 𝐹f 𝑇 𝐺 ) ∘f 𝑂 ( 𝐹f 𝑇 𝐻 ) ) )

Proof

Step Hyp Ref Expression
1 caofdi.1 ( 𝜑𝐴𝑉 )
2 caofdi.2 ( 𝜑𝐹 : 𝐴𝐾 )
3 caofdi.3 ( 𝜑𝐺 : 𝐴𝑆 )
4 caofdi.4 ( 𝜑𝐻 : 𝐴𝑆 )
5 caofdi.5 ( ( 𝜑 ∧ ( 𝑥𝐾𝑦𝑆𝑧𝑆 ) ) → ( 𝑥 𝑇 ( 𝑦 𝑅 𝑧 ) ) = ( ( 𝑥 𝑇 𝑦 ) 𝑂 ( 𝑥 𝑇 𝑧 ) ) )
6 5 adantlr ( ( ( 𝜑𝑤𝐴 ) ∧ ( 𝑥𝐾𝑦𝑆𝑧𝑆 ) ) → ( 𝑥 𝑇 ( 𝑦 𝑅 𝑧 ) ) = ( ( 𝑥 𝑇 𝑦 ) 𝑂 ( 𝑥 𝑇 𝑧 ) ) )
7 2 ffvelrnda ( ( 𝜑𝑤𝐴 ) → ( 𝐹𝑤 ) ∈ 𝐾 )
8 3 ffvelrnda ( ( 𝜑𝑤𝐴 ) → ( 𝐺𝑤 ) ∈ 𝑆 )
9 4 ffvelrnda ( ( 𝜑𝑤𝐴 ) → ( 𝐻𝑤 ) ∈ 𝑆 )
10 6 7 8 9 caovdid ( ( 𝜑𝑤𝐴 ) → ( ( 𝐹𝑤 ) 𝑇 ( ( 𝐺𝑤 ) 𝑅 ( 𝐻𝑤 ) ) ) = ( ( ( 𝐹𝑤 ) 𝑇 ( 𝐺𝑤 ) ) 𝑂 ( ( 𝐹𝑤 ) 𝑇 ( 𝐻𝑤 ) ) ) )
11 10 mpteq2dva ( 𝜑 → ( 𝑤𝐴 ↦ ( ( 𝐹𝑤 ) 𝑇 ( ( 𝐺𝑤 ) 𝑅 ( 𝐻𝑤 ) ) ) ) = ( 𝑤𝐴 ↦ ( ( ( 𝐹𝑤 ) 𝑇 ( 𝐺𝑤 ) ) 𝑂 ( ( 𝐹𝑤 ) 𝑇 ( 𝐻𝑤 ) ) ) ) )
12 ovexd ( ( 𝜑𝑤𝐴 ) → ( ( 𝐺𝑤 ) 𝑅 ( 𝐻𝑤 ) ) ∈ V )
13 2 feqmptd ( 𝜑𝐹 = ( 𝑤𝐴 ↦ ( 𝐹𝑤 ) ) )
14 3 feqmptd ( 𝜑𝐺 = ( 𝑤𝐴 ↦ ( 𝐺𝑤 ) ) )
15 4 feqmptd ( 𝜑𝐻 = ( 𝑤𝐴 ↦ ( 𝐻𝑤 ) ) )
16 1 8 9 14 15 offval2 ( 𝜑 → ( 𝐺f 𝑅 𝐻 ) = ( 𝑤𝐴 ↦ ( ( 𝐺𝑤 ) 𝑅 ( 𝐻𝑤 ) ) ) )
17 1 7 12 13 16 offval2 ( 𝜑 → ( 𝐹f 𝑇 ( 𝐺f 𝑅 𝐻 ) ) = ( 𝑤𝐴 ↦ ( ( 𝐹𝑤 ) 𝑇 ( ( 𝐺𝑤 ) 𝑅 ( 𝐻𝑤 ) ) ) ) )
18 ovexd ( ( 𝜑𝑤𝐴 ) → ( ( 𝐹𝑤 ) 𝑇 ( 𝐺𝑤 ) ) ∈ V )
19 ovexd ( ( 𝜑𝑤𝐴 ) → ( ( 𝐹𝑤 ) 𝑇 ( 𝐻𝑤 ) ) ∈ V )
20 1 7 8 13 14 offval2 ( 𝜑 → ( 𝐹f 𝑇 𝐺 ) = ( 𝑤𝐴 ↦ ( ( 𝐹𝑤 ) 𝑇 ( 𝐺𝑤 ) ) ) )
21 1 7 9 13 15 offval2 ( 𝜑 → ( 𝐹f 𝑇 𝐻 ) = ( 𝑤𝐴 ↦ ( ( 𝐹𝑤 ) 𝑇 ( 𝐻𝑤 ) ) ) )
22 1 18 19 20 21 offval2 ( 𝜑 → ( ( 𝐹f 𝑇 𝐺 ) ∘f 𝑂 ( 𝐹f 𝑇 𝐻 ) ) = ( 𝑤𝐴 ↦ ( ( ( 𝐹𝑤 ) 𝑇 ( 𝐺𝑤 ) ) 𝑂 ( ( 𝐹𝑤 ) 𝑇 ( 𝐻𝑤 ) ) ) ) )
23 11 17 22 3eqtr4d ( 𝜑 → ( 𝐹f 𝑇 ( 𝐺f 𝑅 𝐻 ) ) = ( ( 𝐹f 𝑇 𝐺 ) ∘f 𝑂 ( 𝐹f 𝑇 𝐻 ) ) )