Metamath Proof Explorer


Theorem ofres

Description: Restrict the operands of a function operation to the same domain as that of the operation itself. (Contributed by Mario Carneiro, 15-Sep-2014)

Ref Expression
Hypotheses ofres.1 ( 𝜑𝐹 Fn 𝐴 )
ofres.2 ( 𝜑𝐺 Fn 𝐵 )
ofres.3 ( 𝜑𝐴𝑉 )
ofres.4 ( 𝜑𝐵𝑊 )
ofres.5 ( 𝐴𝐵 ) = 𝐶
Assertion ofres ( 𝜑 → ( 𝐹f 𝑅 𝐺 ) = ( ( 𝐹𝐶 ) ∘f 𝑅 ( 𝐺𝐶 ) ) )

Proof

Step Hyp Ref Expression
1 ofres.1 ( 𝜑𝐹 Fn 𝐴 )
2 ofres.2 ( 𝜑𝐺 Fn 𝐵 )
3 ofres.3 ( 𝜑𝐴𝑉 )
4 ofres.4 ( 𝜑𝐵𝑊 )
5 ofres.5 ( 𝐴𝐵 ) = 𝐶
6 eqidd ( ( 𝜑𝑥𝐴 ) → ( 𝐹𝑥 ) = ( 𝐹𝑥 ) )
7 eqidd ( ( 𝜑𝑥𝐵 ) → ( 𝐺𝑥 ) = ( 𝐺𝑥 ) )
8 1 2 3 4 5 6 7 offval ( 𝜑 → ( 𝐹f 𝑅 𝐺 ) = ( 𝑥𝐶 ↦ ( ( 𝐹𝑥 ) 𝑅 ( 𝐺𝑥 ) ) ) )
9 inss1 ( 𝐴𝐵 ) ⊆ 𝐴
10 5 9 eqsstrri 𝐶𝐴
11 fnssres ( ( 𝐹 Fn 𝐴𝐶𝐴 ) → ( 𝐹𝐶 ) Fn 𝐶 )
12 1 10 11 sylancl ( 𝜑 → ( 𝐹𝐶 ) Fn 𝐶 )
13 inss2 ( 𝐴𝐵 ) ⊆ 𝐵
14 5 13 eqsstrri 𝐶𝐵
15 fnssres ( ( 𝐺 Fn 𝐵𝐶𝐵 ) → ( 𝐺𝐶 ) Fn 𝐶 )
16 2 14 15 sylancl ( 𝜑 → ( 𝐺𝐶 ) Fn 𝐶 )
17 ssexg ( ( 𝐶𝐴𝐴𝑉 ) → 𝐶 ∈ V )
18 10 3 17 sylancr ( 𝜑𝐶 ∈ V )
19 inidm ( 𝐶𝐶 ) = 𝐶
20 fvres ( 𝑥𝐶 → ( ( 𝐹𝐶 ) ‘ 𝑥 ) = ( 𝐹𝑥 ) )
21 20 adantl ( ( 𝜑𝑥𝐶 ) → ( ( 𝐹𝐶 ) ‘ 𝑥 ) = ( 𝐹𝑥 ) )
22 fvres ( 𝑥𝐶 → ( ( 𝐺𝐶 ) ‘ 𝑥 ) = ( 𝐺𝑥 ) )
23 22 adantl ( ( 𝜑𝑥𝐶 ) → ( ( 𝐺𝐶 ) ‘ 𝑥 ) = ( 𝐺𝑥 ) )
24 12 16 18 18 19 21 23 offval ( 𝜑 → ( ( 𝐹𝐶 ) ∘f 𝑅 ( 𝐺𝐶 ) ) = ( 𝑥𝐶 ↦ ( ( 𝐹𝑥 ) 𝑅 ( 𝐺𝑥 ) ) ) )
25 8 24 eqtr4d ( 𝜑 → ( 𝐹f 𝑅 𝐺 ) = ( ( 𝐹𝐶 ) ∘f 𝑅 ( 𝐺𝐶 ) ) )