Metamath Proof Explorer


Theorem rrnmval

Description: The value of the Euclidean metric. (Contributed by Jeff Madsen, 2-Sep-2009) (Revised by Mario Carneiro, 13-Sep-2015)

Ref Expression
Hypothesis rrnval.1
|- X = ( RR ^m I )
Assertion rrnmval
|- ( ( I e. Fin /\ F e. X /\ G e. X ) -> ( F ( Rn ` I ) G ) = ( sqrt ` sum_ k e. I ( ( ( F ` k ) - ( G ` k ) ) ^ 2 ) ) )

Proof

Step Hyp Ref Expression
1 rrnval.1
 |-  X = ( RR ^m I )
2 1 rrnval
 |-  ( I e. Fin -> ( Rn ` I ) = ( x e. X , y e. X |-> ( sqrt ` sum_ k e. I ( ( ( x ` k ) - ( y ` k ) ) ^ 2 ) ) ) )
3 2 3ad2ant1
 |-  ( ( I e. Fin /\ F e. X /\ G e. X ) -> ( Rn ` I ) = ( x e. X , y e. X |-> ( sqrt ` sum_ k e. I ( ( ( x ` k ) - ( y ` k ) ) ^ 2 ) ) ) )
4 fveq1
 |-  ( x = F -> ( x ` k ) = ( F ` k ) )
5 fveq1
 |-  ( y = G -> ( y ` k ) = ( G ` k ) )
6 4 5 oveqan12d
 |-  ( ( x = F /\ y = G ) -> ( ( x ` k ) - ( y ` k ) ) = ( ( F ` k ) - ( G ` k ) ) )
7 6 oveq1d
 |-  ( ( x = F /\ y = G ) -> ( ( ( x ` k ) - ( y ` k ) ) ^ 2 ) = ( ( ( F ` k ) - ( G ` k ) ) ^ 2 ) )
8 7 sumeq2sdv
 |-  ( ( x = F /\ y = G ) -> sum_ k e. I ( ( ( x ` k ) - ( y ` k ) ) ^ 2 ) = sum_ k e. I ( ( ( F ` k ) - ( G ` k ) ) ^ 2 ) )
9 8 fveq2d
 |-  ( ( x = F /\ y = G ) -> ( sqrt ` sum_ k e. I ( ( ( x ` k ) - ( y ` k ) ) ^ 2 ) ) = ( sqrt ` sum_ k e. I ( ( ( F ` k ) - ( G ` k ) ) ^ 2 ) ) )
10 9 adantl
 |-  ( ( ( I e. Fin /\ F e. X /\ G e. X ) /\ ( x = F /\ y = G ) ) -> ( sqrt ` sum_ k e. I ( ( ( x ` k ) - ( y ` k ) ) ^ 2 ) ) = ( sqrt ` sum_ k e. I ( ( ( F ` k ) - ( G ` k ) ) ^ 2 ) ) )
11 simp2
 |-  ( ( I e. Fin /\ F e. X /\ G e. X ) -> F e. X )
12 simp3
 |-  ( ( I e. Fin /\ F e. X /\ G e. X ) -> G e. X )
13 fvexd
 |-  ( ( I e. Fin /\ F e. X /\ G e. X ) -> ( sqrt ` sum_ k e. I ( ( ( F ` k ) - ( G ` k ) ) ^ 2 ) ) e. _V )
14 3 10 11 12 13 ovmpod
 |-  ( ( I e. Fin /\ F e. X /\ G e. X ) -> ( F ( Rn ` I ) G ) = ( sqrt ` sum_ k e. I ( ( ( F ` k ) - ( G ` k ) ) ^ 2 ) ) )