Metamath Proof Explorer


Theorem imasds

Description: The distance function of an image structure. (Contributed by Mario Carneiro, 23-Feb-2015) (Revised by Mario Carneiro, 11-Jul-2015) (Revised by Thierry Arnoux, 16-Jun-2019) (Revised by AV, 6-Oct-2020)

Ref Expression
Hypotheses imasbas.u
|- ( ph -> U = ( F "s R ) )
imasbas.v
|- ( ph -> V = ( Base ` R ) )
imasbas.f
|- ( ph -> F : V -onto-> B )
imasbas.r
|- ( ph -> R e. Z )
imasds.e
|- E = ( dist ` R )
imasds.d
|- D = ( dist ` U )
Assertion imasds
|- ( ph -> D = ( x e. B , y e. B |-> inf ( U_ n e. NN ran ( g e. { h e. ( ( V X. V ) ^m ( 1 ... n ) ) | ( ( F ` ( 1st ` ( h ` 1 ) ) ) = x /\ ( F ` ( 2nd ` ( h ` n ) ) ) = y /\ A. i e. ( 1 ... ( n - 1 ) ) ( F ` ( 2nd ` ( h ` i ) ) ) = ( F ` ( 1st ` ( h ` ( i + 1 ) ) ) ) ) } |-> ( RR*s gsum ( E o. g ) ) ) , RR* , < ) ) )

Proof

Step Hyp Ref Expression
1 imasbas.u
 |-  ( ph -> U = ( F "s R ) )
2 imasbas.v
 |-  ( ph -> V = ( Base ` R ) )
3 imasbas.f
 |-  ( ph -> F : V -onto-> B )
4 imasbas.r
 |-  ( ph -> R e. Z )
5 imasds.e
 |-  E = ( dist ` R )
6 imasds.d
 |-  D = ( dist ` U )
7 eqid
 |-  ( +g ` R ) = ( +g ` R )
8 eqid
 |-  ( .r ` R ) = ( .r ` R )
9 eqid
 |-  ( Scalar ` R ) = ( Scalar ` R )
10 eqid
 |-  ( Base ` ( Scalar ` R ) ) = ( Base ` ( Scalar ` R ) )
11 eqid
 |-  ( .s ` R ) = ( .s ` R )
12 eqid
 |-  ( .i ` R ) = ( .i ` R )
13 eqid
 |-  ( TopOpen ` R ) = ( TopOpen ` R )
14 eqid
 |-  ( le ` R ) = ( le ` R )
15 eqidd
 |-  ( ph -> U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( F ` ( p ( +g ` R ) q ) ) >. } = U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( F ` ( p ( +g ` R ) q ) ) >. } )
16 eqidd
 |-  ( ph -> U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( F ` ( p ( .r ` R ) q ) ) >. } = U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( F ` ( p ( .r ` R ) q ) ) >. } )
17 eqidd
 |-  ( ph -> U_ q e. V ( p e. ( Base ` ( Scalar ` R ) ) , x e. { ( F ` q ) } |-> ( F ` ( p ( .s ` R ) q ) ) ) = U_ q e. V ( p e. ( Base ` ( Scalar ` R ) ) , x e. { ( F ` q ) } |-> ( F ` ( p ( .s ` R ) q ) ) ) )
18 eqidd
 |-  ( ph -> U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( p ( .i ` R ) q ) >. } = U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( p ( .i ` R ) q ) >. } )
19 eqidd
 |-  ( ph -> ( ( TopOpen ` R ) qTop F ) = ( ( TopOpen ` R ) qTop F ) )
20 eqidd
 |-  ( ph -> ( x e. B , y e. B |-> inf ( U_ n e. NN ran ( g e. { h e. ( ( V X. V ) ^m ( 1 ... n ) ) | ( ( F ` ( 1st ` ( h ` 1 ) ) ) = x /\ ( F ` ( 2nd ` ( h ` n ) ) ) = y /\ A. i e. ( 1 ... ( n - 1 ) ) ( F ` ( 2nd ` ( h ` i ) ) ) = ( F ` ( 1st ` ( h ` ( i + 1 ) ) ) ) ) } |-> ( RR*s gsum ( E o. g ) ) ) , RR* , < ) ) = ( x e. B , y e. B |-> inf ( U_ n e. NN ran ( g e. { h e. ( ( V X. V ) ^m ( 1 ... n ) ) | ( ( F ` ( 1st ` ( h ` 1 ) ) ) = x /\ ( F ` ( 2nd ` ( h ` n ) ) ) = y /\ A. i e. ( 1 ... ( n - 1 ) ) ( F ` ( 2nd ` ( h ` i ) ) ) = ( F ` ( 1st ` ( h ` ( i + 1 ) ) ) ) ) } |-> ( RR*s gsum ( E o. g ) ) ) , RR* , < ) ) )
21 eqidd
 |-  ( ph -> ( ( F o. ( le ` R ) ) o. `' F ) = ( ( F o. ( le ` R ) ) o. `' F ) )
22 1 2 7 8 9 10 11 12 13 5 14 15 16 17 18 19 20 21 3 4 imasval
 |-  ( ph -> U = ( ( { <. ( Base ` ndx ) , B >. , <. ( +g ` ndx ) , U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( F ` ( p ( +g ` R ) q ) ) >. } >. , <. ( .r ` ndx ) , U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( F ` ( p ( .r ` R ) q ) ) >. } >. } u. { <. ( Scalar ` ndx ) , ( Scalar ` R ) >. , <. ( .s ` ndx ) , U_ q e. V ( p e. ( Base ` ( Scalar ` R ) ) , x e. { ( F ` q ) } |-> ( F ` ( p ( .s ` R ) q ) ) ) >. , <. ( .i ` ndx ) , U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( p ( .i ` R ) q ) >. } >. } ) u. { <. ( TopSet ` ndx ) , ( ( TopOpen ` R ) qTop F ) >. , <. ( le ` ndx ) , ( ( F o. ( le ` R ) ) o. `' F ) >. , <. ( dist ` ndx ) , ( x e. B , y e. B |-> inf ( U_ n e. NN ran ( g e. { h e. ( ( V X. V ) ^m ( 1 ... n ) ) | ( ( F ` ( 1st ` ( h ` 1 ) ) ) = x /\ ( F ` ( 2nd ` ( h ` n ) ) ) = y /\ A. i e. ( 1 ... ( n - 1 ) ) ( F ` ( 2nd ` ( h ` i ) ) ) = ( F ` ( 1st ` ( h ` ( i + 1 ) ) ) ) ) } |-> ( RR*s gsum ( E o. g ) ) ) , RR* , < ) ) >. } ) )
23 eqid
 |-  ( ( { <. ( Base ` ndx ) , B >. , <. ( +g ` ndx ) , U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( F ` ( p ( +g ` R ) q ) ) >. } >. , <. ( .r ` ndx ) , U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( F ` ( p ( .r ` R ) q ) ) >. } >. } u. { <. ( Scalar ` ndx ) , ( Scalar ` R ) >. , <. ( .s ` ndx ) , U_ q e. V ( p e. ( Base ` ( Scalar ` R ) ) , x e. { ( F ` q ) } |-> ( F ` ( p ( .s ` R ) q ) ) ) >. , <. ( .i ` ndx ) , U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( p ( .i ` R ) q ) >. } >. } ) u. { <. ( TopSet ` ndx ) , ( ( TopOpen ` R ) qTop F ) >. , <. ( le ` ndx ) , ( ( F o. ( le ` R ) ) o. `' F ) >. , <. ( dist ` ndx ) , ( x e. B , y e. B |-> inf ( U_ n e. NN ran ( g e. { h e. ( ( V X. V ) ^m ( 1 ... n ) ) | ( ( F ` ( 1st ` ( h ` 1 ) ) ) = x /\ ( F ` ( 2nd ` ( h ` n ) ) ) = y /\ A. i e. ( 1 ... ( n - 1 ) ) ( F ` ( 2nd ` ( h ` i ) ) ) = ( F ` ( 1st ` ( h ` ( i + 1 ) ) ) ) ) } |-> ( RR*s gsum ( E o. g ) ) ) , RR* , < ) ) >. } ) = ( ( { <. ( Base ` ndx ) , B >. , <. ( +g ` ndx ) , U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( F ` ( p ( +g ` R ) q ) ) >. } >. , <. ( .r ` ndx ) , U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( F ` ( p ( .r ` R ) q ) ) >. } >. } u. { <. ( Scalar ` ndx ) , ( Scalar ` R ) >. , <. ( .s ` ndx ) , U_ q e. V ( p e. ( Base ` ( Scalar ` R ) ) , x e. { ( F ` q ) } |-> ( F ` ( p ( .s ` R ) q ) ) ) >. , <. ( .i ` ndx ) , U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( p ( .i ` R ) q ) >. } >. } ) u. { <. ( TopSet ` ndx ) , ( ( TopOpen ` R ) qTop F ) >. , <. ( le ` ndx ) , ( ( F o. ( le ` R ) ) o. `' F ) >. , <. ( dist ` ndx ) , ( x e. B , y e. B |-> inf ( U_ n e. NN ran ( g e. { h e. ( ( V X. V ) ^m ( 1 ... n ) ) | ( ( F ` ( 1st ` ( h ` 1 ) ) ) = x /\ ( F ` ( 2nd ` ( h ` n ) ) ) = y /\ A. i e. ( 1 ... ( n - 1 ) ) ( F ` ( 2nd ` ( h ` i ) ) ) = ( F ` ( 1st ` ( h ` ( i + 1 ) ) ) ) ) } |-> ( RR*s gsum ( E o. g ) ) ) , RR* , < ) ) >. } )
24 23 imasvalstr
 |-  ( ( { <. ( Base ` ndx ) , B >. , <. ( +g ` ndx ) , U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( F ` ( p ( +g ` R ) q ) ) >. } >. , <. ( .r ` ndx ) , U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( F ` ( p ( .r ` R ) q ) ) >. } >. } u. { <. ( Scalar ` ndx ) , ( Scalar ` R ) >. , <. ( .s ` ndx ) , U_ q e. V ( p e. ( Base ` ( Scalar ` R ) ) , x e. { ( F ` q ) } |-> ( F ` ( p ( .s ` R ) q ) ) ) >. , <. ( .i ` ndx ) , U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( p ( .i ` R ) q ) >. } >. } ) u. { <. ( TopSet ` ndx ) , ( ( TopOpen ` R ) qTop F ) >. , <. ( le ` ndx ) , ( ( F o. ( le ` R ) ) o. `' F ) >. , <. ( dist ` ndx ) , ( x e. B , y e. B |-> inf ( U_ n e. NN ran ( g e. { h e. ( ( V X. V ) ^m ( 1 ... n ) ) | ( ( F ` ( 1st ` ( h ` 1 ) ) ) = x /\ ( F ` ( 2nd ` ( h ` n ) ) ) = y /\ A. i e. ( 1 ... ( n - 1 ) ) ( F ` ( 2nd ` ( h ` i ) ) ) = ( F ` ( 1st ` ( h ` ( i + 1 ) ) ) ) ) } |-> ( RR*s gsum ( E o. g ) ) ) , RR* , < ) ) >. } ) Struct <. 1 , ; 1 2 >.
25 dsid
 |-  dist = Slot ( dist ` ndx )
26 snsstp3
 |-  { <. ( dist ` ndx ) , ( x e. B , y e. B |-> inf ( U_ n e. NN ran ( g e. { h e. ( ( V X. V ) ^m ( 1 ... n ) ) | ( ( F ` ( 1st ` ( h ` 1 ) ) ) = x /\ ( F ` ( 2nd ` ( h ` n ) ) ) = y /\ A. i e. ( 1 ... ( n - 1 ) ) ( F ` ( 2nd ` ( h ` i ) ) ) = ( F ` ( 1st ` ( h ` ( i + 1 ) ) ) ) ) } |-> ( RR*s gsum ( E o. g ) ) ) , RR* , < ) ) >. } C_ { <. ( TopSet ` ndx ) , ( ( TopOpen ` R ) qTop F ) >. , <. ( le ` ndx ) , ( ( F o. ( le ` R ) ) o. `' F ) >. , <. ( dist ` ndx ) , ( x e. B , y e. B |-> inf ( U_ n e. NN ran ( g e. { h e. ( ( V X. V ) ^m ( 1 ... n ) ) | ( ( F ` ( 1st ` ( h ` 1 ) ) ) = x /\ ( F ` ( 2nd ` ( h ` n ) ) ) = y /\ A. i e. ( 1 ... ( n - 1 ) ) ( F ` ( 2nd ` ( h ` i ) ) ) = ( F ` ( 1st ` ( h ` ( i + 1 ) ) ) ) ) } |-> ( RR*s gsum ( E o. g ) ) ) , RR* , < ) ) >. }
27 ssun2
 |-  { <. ( TopSet ` ndx ) , ( ( TopOpen ` R ) qTop F ) >. , <. ( le ` ndx ) , ( ( F o. ( le ` R ) ) o. `' F ) >. , <. ( dist ` ndx ) , ( x e. B , y e. B |-> inf ( U_ n e. NN ran ( g e. { h e. ( ( V X. V ) ^m ( 1 ... n ) ) | ( ( F ` ( 1st ` ( h ` 1 ) ) ) = x /\ ( F ` ( 2nd ` ( h ` n ) ) ) = y /\ A. i e. ( 1 ... ( n - 1 ) ) ( F ` ( 2nd ` ( h ` i ) ) ) = ( F ` ( 1st ` ( h ` ( i + 1 ) ) ) ) ) } |-> ( RR*s gsum ( E o. g ) ) ) , RR* , < ) ) >. } C_ ( ( { <. ( Base ` ndx ) , B >. , <. ( +g ` ndx ) , U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( F ` ( p ( +g ` R ) q ) ) >. } >. , <. ( .r ` ndx ) , U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( F ` ( p ( .r ` R ) q ) ) >. } >. } u. { <. ( Scalar ` ndx ) , ( Scalar ` R ) >. , <. ( .s ` ndx ) , U_ q e. V ( p e. ( Base ` ( Scalar ` R ) ) , x e. { ( F ` q ) } |-> ( F ` ( p ( .s ` R ) q ) ) ) >. , <. ( .i ` ndx ) , U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( p ( .i ` R ) q ) >. } >. } ) u. { <. ( TopSet ` ndx ) , ( ( TopOpen ` R ) qTop F ) >. , <. ( le ` ndx ) , ( ( F o. ( le ` R ) ) o. `' F ) >. , <. ( dist ` ndx ) , ( x e. B , y e. B |-> inf ( U_ n e. NN ran ( g e. { h e. ( ( V X. V ) ^m ( 1 ... n ) ) | ( ( F ` ( 1st ` ( h ` 1 ) ) ) = x /\ ( F ` ( 2nd ` ( h ` n ) ) ) = y /\ A. i e. ( 1 ... ( n - 1 ) ) ( F ` ( 2nd ` ( h ` i ) ) ) = ( F ` ( 1st ` ( h ` ( i + 1 ) ) ) ) ) } |-> ( RR*s gsum ( E o. g ) ) ) , RR* , < ) ) >. } )
28 26 27 sstri
 |-  { <. ( dist ` ndx ) , ( x e. B , y e. B |-> inf ( U_ n e. NN ran ( g e. { h e. ( ( V X. V ) ^m ( 1 ... n ) ) | ( ( F ` ( 1st ` ( h ` 1 ) ) ) = x /\ ( F ` ( 2nd ` ( h ` n ) ) ) = y /\ A. i e. ( 1 ... ( n - 1 ) ) ( F ` ( 2nd ` ( h ` i ) ) ) = ( F ` ( 1st ` ( h ` ( i + 1 ) ) ) ) ) } |-> ( RR*s gsum ( E o. g ) ) ) , RR* , < ) ) >. } C_ ( ( { <. ( Base ` ndx ) , B >. , <. ( +g ` ndx ) , U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( F ` ( p ( +g ` R ) q ) ) >. } >. , <. ( .r ` ndx ) , U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( F ` ( p ( .r ` R ) q ) ) >. } >. } u. { <. ( Scalar ` ndx ) , ( Scalar ` R ) >. , <. ( .s ` ndx ) , U_ q e. V ( p e. ( Base ` ( Scalar ` R ) ) , x e. { ( F ` q ) } |-> ( F ` ( p ( .s ` R ) q ) ) ) >. , <. ( .i ` ndx ) , U_ p e. V U_ q e. V { <. <. ( F ` p ) , ( F ` q ) >. , ( p ( .i ` R ) q ) >. } >. } ) u. { <. ( TopSet ` ndx ) , ( ( TopOpen ` R ) qTop F ) >. , <. ( le ` ndx ) , ( ( F o. ( le ` R ) ) o. `' F ) >. , <. ( dist ` ndx ) , ( x e. B , y e. B |-> inf ( U_ n e. NN ran ( g e. { h e. ( ( V X. V ) ^m ( 1 ... n ) ) | ( ( F ` ( 1st ` ( h ` 1 ) ) ) = x /\ ( F ` ( 2nd ` ( h ` n ) ) ) = y /\ A. i e. ( 1 ... ( n - 1 ) ) ( F ` ( 2nd ` ( h ` i ) ) ) = ( F ` ( 1st ` ( h ` ( i + 1 ) ) ) ) ) } |-> ( RR*s gsum ( E o. g ) ) ) , RR* , < ) ) >. } )
29 fvex
 |-  ( Base ` R ) e. _V
30 2 29 eqeltrdi
 |-  ( ph -> V e. _V )
31 fornex
 |-  ( V e. _V -> ( F : V -onto-> B -> B e. _V ) )
32 30 3 31 sylc
 |-  ( ph -> B e. _V )
33 mpoexga
 |-  ( ( B e. _V /\ B e. _V ) -> ( x e. B , y e. B |-> inf ( U_ n e. NN ran ( g e. { h e. ( ( V X. V ) ^m ( 1 ... n ) ) | ( ( F ` ( 1st ` ( h ` 1 ) ) ) = x /\ ( F ` ( 2nd ` ( h ` n ) ) ) = y /\ A. i e. ( 1 ... ( n - 1 ) ) ( F ` ( 2nd ` ( h ` i ) ) ) = ( F ` ( 1st ` ( h ` ( i + 1 ) ) ) ) ) } |-> ( RR*s gsum ( E o. g ) ) ) , RR* , < ) ) e. _V )
34 32 32 33 syl2anc
 |-  ( ph -> ( x e. B , y e. B |-> inf ( U_ n e. NN ran ( g e. { h e. ( ( V X. V ) ^m ( 1 ... n ) ) | ( ( F ` ( 1st ` ( h ` 1 ) ) ) = x /\ ( F ` ( 2nd ` ( h ` n ) ) ) = y /\ A. i e. ( 1 ... ( n - 1 ) ) ( F ` ( 2nd ` ( h ` i ) ) ) = ( F ` ( 1st ` ( h ` ( i + 1 ) ) ) ) ) } |-> ( RR*s gsum ( E o. g ) ) ) , RR* , < ) ) e. _V )
35 22 24 25 28 34 6 strfv3
 |-  ( ph -> D = ( x e. B , y e. B |-> inf ( U_ n e. NN ran ( g e. { h e. ( ( V X. V ) ^m ( 1 ... n ) ) | ( ( F ` ( 1st ` ( h ` 1 ) ) ) = x /\ ( F ` ( 2nd ` ( h ` n ) ) ) = y /\ A. i e. ( 1 ... ( n - 1 ) ) ( F ` ( 2nd ` ( h ` i ) ) ) = ( F ` ( 1st ` ( h ` ( i + 1 ) ) ) ) ) } |-> ( RR*s gsum ( E o. g ) ) ) , RR* , < ) ) )