Metamath Proof Explorer


Theorem ofval

Description: Evaluate a function operation at a point. (Contributed by Mario Carneiro, 20-Jul-2014)

Ref Expression
Hypotheses offval.1 ( 𝜑𝐹 Fn 𝐴 )
offval.2 ( 𝜑𝐺 Fn 𝐵 )
offval.3 ( 𝜑𝐴𝑉 )
offval.4 ( 𝜑𝐵𝑊 )
offval.5 ( 𝐴𝐵 ) = 𝑆
ofval.6 ( ( 𝜑𝑋𝐴 ) → ( 𝐹𝑋 ) = 𝐶 )
ofval.7 ( ( 𝜑𝑋𝐵 ) → ( 𝐺𝑋 ) = 𝐷 )
Assertion ofval ( ( 𝜑𝑋𝑆 ) → ( ( 𝐹f 𝑅 𝐺 ) ‘ 𝑋 ) = ( 𝐶 𝑅 𝐷 ) )

Proof

Step Hyp Ref Expression
1 offval.1 ( 𝜑𝐹 Fn 𝐴 )
2 offval.2 ( 𝜑𝐺 Fn 𝐵 )
3 offval.3 ( 𝜑𝐴𝑉 )
4 offval.4 ( 𝜑𝐵𝑊 )
5 offval.5 ( 𝐴𝐵 ) = 𝑆
6 ofval.6 ( ( 𝜑𝑋𝐴 ) → ( 𝐹𝑋 ) = 𝐶 )
7 ofval.7 ( ( 𝜑𝑋𝐵 ) → ( 𝐺𝑋 ) = 𝐷 )
8 eqidd ( ( 𝜑𝑥𝐴 ) → ( 𝐹𝑥 ) = ( 𝐹𝑥 ) )
9 eqidd ( ( 𝜑𝑥𝐵 ) → ( 𝐺𝑥 ) = ( 𝐺𝑥 ) )
10 1 2 3 4 5 8 9 offval ( 𝜑 → ( 𝐹f 𝑅 𝐺 ) = ( 𝑥𝑆 ↦ ( ( 𝐹𝑥 ) 𝑅 ( 𝐺𝑥 ) ) ) )
11 10 fveq1d ( 𝜑 → ( ( 𝐹f 𝑅 𝐺 ) ‘ 𝑋 ) = ( ( 𝑥𝑆 ↦ ( ( 𝐹𝑥 ) 𝑅 ( 𝐺𝑥 ) ) ) ‘ 𝑋 ) )
12 11 adantr ( ( 𝜑𝑋𝑆 ) → ( ( 𝐹f 𝑅 𝐺 ) ‘ 𝑋 ) = ( ( 𝑥𝑆 ↦ ( ( 𝐹𝑥 ) 𝑅 ( 𝐺𝑥 ) ) ) ‘ 𝑋 ) )
13 fveq2 ( 𝑥 = 𝑋 → ( 𝐹𝑥 ) = ( 𝐹𝑋 ) )
14 fveq2 ( 𝑥 = 𝑋 → ( 𝐺𝑥 ) = ( 𝐺𝑋 ) )
15 13 14 oveq12d ( 𝑥 = 𝑋 → ( ( 𝐹𝑥 ) 𝑅 ( 𝐺𝑥 ) ) = ( ( 𝐹𝑋 ) 𝑅 ( 𝐺𝑋 ) ) )
16 eqid ( 𝑥𝑆 ↦ ( ( 𝐹𝑥 ) 𝑅 ( 𝐺𝑥 ) ) ) = ( 𝑥𝑆 ↦ ( ( 𝐹𝑥 ) 𝑅 ( 𝐺𝑥 ) ) )
17 ovex ( ( 𝐹𝑋 ) 𝑅 ( 𝐺𝑋 ) ) ∈ V
18 15 16 17 fvmpt ( 𝑋𝑆 → ( ( 𝑥𝑆 ↦ ( ( 𝐹𝑥 ) 𝑅 ( 𝐺𝑥 ) ) ) ‘ 𝑋 ) = ( ( 𝐹𝑋 ) 𝑅 ( 𝐺𝑋 ) ) )
19 18 adantl ( ( 𝜑𝑋𝑆 ) → ( ( 𝑥𝑆 ↦ ( ( 𝐹𝑥 ) 𝑅 ( 𝐺𝑥 ) ) ) ‘ 𝑋 ) = ( ( 𝐹𝑋 ) 𝑅 ( 𝐺𝑋 ) ) )
20 inss1 ( 𝐴𝐵 ) ⊆ 𝐴
21 5 20 eqsstrri 𝑆𝐴
22 21 sseli ( 𝑋𝑆𝑋𝐴 )
23 22 6 sylan2 ( ( 𝜑𝑋𝑆 ) → ( 𝐹𝑋 ) = 𝐶 )
24 inss2 ( 𝐴𝐵 ) ⊆ 𝐵
25 5 24 eqsstrri 𝑆𝐵
26 25 sseli ( 𝑋𝑆𝑋𝐵 )
27 26 7 sylan2 ( ( 𝜑𝑋𝑆 ) → ( 𝐺𝑋 ) = 𝐷 )
28 23 27 oveq12d ( ( 𝜑𝑋𝑆 ) → ( ( 𝐹𝑋 ) 𝑅 ( 𝐺𝑋 ) ) = ( 𝐶 𝑅 𝐷 ) )
29 12 19 28 3eqtrd ( ( 𝜑𝑋𝑆 ) → ( ( 𝐹f 𝑅 𝐺 ) ‘ 𝑋 ) = ( 𝐶 𝑅 𝐷 ) )