Metamath Proof Explorer


Theorem ofresid

Description: Applying an operation restricted to the range of the functions does not change the function operation. (Contributed by Thierry Arnoux, 14-Feb-2018)

Ref Expression
Hypotheses ofresid.1 ( 𝜑𝐹 : 𝐴𝐵 )
ofresid.2 ( 𝜑𝐺 : 𝐴𝐵 )
ofresid.3 ( 𝜑𝐴𝑉 )
Assertion ofresid ( 𝜑 → ( 𝐹f 𝑅 𝐺 ) = ( 𝐹f ( 𝑅 ↾ ( 𝐵 × 𝐵 ) ) 𝐺 ) )

Proof

Step Hyp Ref Expression
1 ofresid.1 ( 𝜑𝐹 : 𝐴𝐵 )
2 ofresid.2 ( 𝜑𝐺 : 𝐴𝐵 )
3 ofresid.3 ( 𝜑𝐴𝑉 )
4 1 ffvelrnda ( ( 𝜑𝑥𝐴 ) → ( 𝐹𝑥 ) ∈ 𝐵 )
5 2 ffvelrnda ( ( 𝜑𝑥𝐴 ) → ( 𝐺𝑥 ) ∈ 𝐵 )
6 4 5 opelxpd ( ( 𝜑𝑥𝐴 ) → ⟨ ( 𝐹𝑥 ) , ( 𝐺𝑥 ) ⟩ ∈ ( 𝐵 × 𝐵 ) )
7 6 fvresd ( ( 𝜑𝑥𝐴 ) → ( ( 𝑅 ↾ ( 𝐵 × 𝐵 ) ) ‘ ⟨ ( 𝐹𝑥 ) , ( 𝐺𝑥 ) ⟩ ) = ( 𝑅 ‘ ⟨ ( 𝐹𝑥 ) , ( 𝐺𝑥 ) ⟩ ) )
8 7 eqcomd ( ( 𝜑𝑥𝐴 ) → ( 𝑅 ‘ ⟨ ( 𝐹𝑥 ) , ( 𝐺𝑥 ) ⟩ ) = ( ( 𝑅 ↾ ( 𝐵 × 𝐵 ) ) ‘ ⟨ ( 𝐹𝑥 ) , ( 𝐺𝑥 ) ⟩ ) )
9 df-ov ( ( 𝐹𝑥 ) 𝑅 ( 𝐺𝑥 ) ) = ( 𝑅 ‘ ⟨ ( 𝐹𝑥 ) , ( 𝐺𝑥 ) ⟩ )
10 df-ov ( ( 𝐹𝑥 ) ( 𝑅 ↾ ( 𝐵 × 𝐵 ) ) ( 𝐺𝑥 ) ) = ( ( 𝑅 ↾ ( 𝐵 × 𝐵 ) ) ‘ ⟨ ( 𝐹𝑥 ) , ( 𝐺𝑥 ) ⟩ )
11 8 9 10 3eqtr4g ( ( 𝜑𝑥𝐴 ) → ( ( 𝐹𝑥 ) 𝑅 ( 𝐺𝑥 ) ) = ( ( 𝐹𝑥 ) ( 𝑅 ↾ ( 𝐵 × 𝐵 ) ) ( 𝐺𝑥 ) ) )
12 11 mpteq2dva ( 𝜑 → ( 𝑥𝐴 ↦ ( ( 𝐹𝑥 ) 𝑅 ( 𝐺𝑥 ) ) ) = ( 𝑥𝐴 ↦ ( ( 𝐹𝑥 ) ( 𝑅 ↾ ( 𝐵 × 𝐵 ) ) ( 𝐺𝑥 ) ) ) )
13 1 ffnd ( 𝜑𝐹 Fn 𝐴 )
14 2 ffnd ( 𝜑𝐺 Fn 𝐴 )
15 inidm ( 𝐴𝐴 ) = 𝐴
16 eqidd ( ( 𝜑𝑥𝐴 ) → ( 𝐹𝑥 ) = ( 𝐹𝑥 ) )
17 eqidd ( ( 𝜑𝑥𝐴 ) → ( 𝐺𝑥 ) = ( 𝐺𝑥 ) )
18 13 14 3 3 15 16 17 offval ( 𝜑 → ( 𝐹f 𝑅 𝐺 ) = ( 𝑥𝐴 ↦ ( ( 𝐹𝑥 ) 𝑅 ( 𝐺𝑥 ) ) ) )
19 13 14 3 3 15 16 17 offval ( 𝜑 → ( 𝐹f ( 𝑅 ↾ ( 𝐵 × 𝐵 ) ) 𝐺 ) = ( 𝑥𝐴 ↦ ( ( 𝐹𝑥 ) ( 𝑅 ↾ ( 𝐵 × 𝐵 ) ) ( 𝐺𝑥 ) ) ) )
20 12 18 19 3eqtr4d ( 𝜑 → ( 𝐹f 𝑅 𝐺 ) = ( 𝐹f ( 𝑅 ↾ ( 𝐵 × 𝐵 ) ) 𝐺 ) )