Metamath Proof Explorer


Theorem rrxdsfival

Description: The value of the Euclidean distance function in a generalized real Euclidean space of finite dimension. (Contributed by AV, 15-Jan-2023)

Ref Expression
Hypotheses rrxdsfival.1 𝑋 = ( ℝ ↑m 𝐼 )
rrxdsfival.d 𝐷 = ( dist ‘ ( ℝ^ ‘ 𝐼 ) )
Assertion rrxdsfival ( ( 𝐼 ∈ Fin ∧ 𝐹𝑋𝐺𝑋 ) → ( 𝐹 𝐷 𝐺 ) = ( √ ‘ Σ 𝑘𝐼 ( ( ( 𝐹𝑘 ) − ( 𝐺𝑘 ) ) ↑ 2 ) ) )

Proof

Step Hyp Ref Expression
1 rrxdsfival.1 𝑋 = ( ℝ ↑m 𝐼 )
2 rrxdsfival.d 𝐷 = ( dist ‘ ( ℝ^ ‘ 𝐼 ) )
3 eqid ( ℝ^ ‘ 𝐼 ) = ( ℝ^ ‘ 𝐼 )
4 3 1 rrxdsfi ( 𝐼 ∈ Fin → ( dist ‘ ( ℝ^ ‘ 𝐼 ) ) = ( 𝑥𝑋 , 𝑦𝑋 ↦ ( √ ‘ Σ 𝑘𝐼 ( ( ( 𝑥𝑘 ) − ( 𝑦𝑘 ) ) ↑ 2 ) ) ) )
5 2 4 syl5eq ( 𝐼 ∈ Fin → 𝐷 = ( 𝑥𝑋 , 𝑦𝑋 ↦ ( √ ‘ Σ 𝑘𝐼 ( ( ( 𝑥𝑘 ) − ( 𝑦𝑘 ) ) ↑ 2 ) ) ) )
6 5 oveqd ( 𝐼 ∈ Fin → ( 𝐹 𝐷 𝐺 ) = ( 𝐹 ( 𝑥𝑋 , 𝑦𝑋 ↦ ( √ ‘ Σ 𝑘𝐼 ( ( ( 𝑥𝑘 ) − ( 𝑦𝑘 ) ) ↑ 2 ) ) ) 𝐺 ) )
7 6 3ad2ant1 ( ( 𝐼 ∈ Fin ∧ 𝐹𝑋𝐺𝑋 ) → ( 𝐹 𝐷 𝐺 ) = ( 𝐹 ( 𝑥𝑋 , 𝑦𝑋 ↦ ( √ ‘ Σ 𝑘𝐼 ( ( ( 𝑥𝑘 ) − ( 𝑦𝑘 ) ) ↑ 2 ) ) ) 𝐺 ) )
8 eqidd ( ( 𝐼 ∈ Fin ∧ 𝐹𝑋𝐺𝑋 ) → ( 𝑥𝑋 , 𝑦𝑋 ↦ ( √ ‘ Σ 𝑘𝐼 ( ( ( 𝑥𝑘 ) − ( 𝑦𝑘 ) ) ↑ 2 ) ) ) = ( 𝑥𝑋 , 𝑦𝑋 ↦ ( √ ‘ Σ 𝑘𝐼 ( ( ( 𝑥𝑘 ) − ( 𝑦𝑘 ) ) ↑ 2 ) ) ) )
9 fveq1 ( 𝑥 = 𝐹 → ( 𝑥𝑘 ) = ( 𝐹𝑘 ) )
10 fveq1 ( 𝑦 = 𝐺 → ( 𝑦𝑘 ) = ( 𝐺𝑘 ) )
11 9 10 oveqan12d ( ( 𝑥 = 𝐹𝑦 = 𝐺 ) → ( ( 𝑥𝑘 ) − ( 𝑦𝑘 ) ) = ( ( 𝐹𝑘 ) − ( 𝐺𝑘 ) ) )
12 11 oveq1d ( ( 𝑥 = 𝐹𝑦 = 𝐺 ) → ( ( ( 𝑥𝑘 ) − ( 𝑦𝑘 ) ) ↑ 2 ) = ( ( ( 𝐹𝑘 ) − ( 𝐺𝑘 ) ) ↑ 2 ) )
13 12 sumeq2sdv ( ( 𝑥 = 𝐹𝑦 = 𝐺 ) → Σ 𝑘𝐼 ( ( ( 𝑥𝑘 ) − ( 𝑦𝑘 ) ) ↑ 2 ) = Σ 𝑘𝐼 ( ( ( 𝐹𝑘 ) − ( 𝐺𝑘 ) ) ↑ 2 ) )
14 13 fveq2d ( ( 𝑥 = 𝐹𝑦 = 𝐺 ) → ( √ ‘ Σ 𝑘𝐼 ( ( ( 𝑥𝑘 ) − ( 𝑦𝑘 ) ) ↑ 2 ) ) = ( √ ‘ Σ 𝑘𝐼 ( ( ( 𝐹𝑘 ) − ( 𝐺𝑘 ) ) ↑ 2 ) ) )
15 14 adantl ( ( ( 𝐼 ∈ Fin ∧ 𝐹𝑋𝐺𝑋 ) ∧ ( 𝑥 = 𝐹𝑦 = 𝐺 ) ) → ( √ ‘ Σ 𝑘𝐼 ( ( ( 𝑥𝑘 ) − ( 𝑦𝑘 ) ) ↑ 2 ) ) = ( √ ‘ Σ 𝑘𝐼 ( ( ( 𝐹𝑘 ) − ( 𝐺𝑘 ) ) ↑ 2 ) ) )
16 simp2 ( ( 𝐼 ∈ Fin ∧ 𝐹𝑋𝐺𝑋 ) → 𝐹𝑋 )
17 simp3 ( ( 𝐼 ∈ Fin ∧ 𝐹𝑋𝐺𝑋 ) → 𝐺𝑋 )
18 fvexd ( ( 𝐼 ∈ Fin ∧ 𝐹𝑋𝐺𝑋 ) → ( √ ‘ Σ 𝑘𝐼 ( ( ( 𝐹𝑘 ) − ( 𝐺𝑘 ) ) ↑ 2 ) ) ∈ V )
19 8 15 16 17 18 ovmpod ( ( 𝐼 ∈ Fin ∧ 𝐹𝑋𝐺𝑋 ) → ( 𝐹 ( 𝑥𝑋 , 𝑦𝑋 ↦ ( √ ‘ Σ 𝑘𝐼 ( ( ( 𝑥𝑘 ) − ( 𝑦𝑘 ) ) ↑ 2 ) ) ) 𝐺 ) = ( √ ‘ Σ 𝑘𝐼 ( ( ( 𝐹𝑘 ) − ( 𝐺𝑘 ) ) ↑ 2 ) ) )
20 7 19 eqtrd ( ( 𝐼 ∈ Fin ∧ 𝐹𝑋𝐺𝑋 ) → ( 𝐹 𝐷 𝐺 ) = ( √ ‘ Σ 𝑘𝐼 ( ( ( 𝐹𝑘 ) − ( 𝐺𝑘 ) ) ↑ 2 ) ) )