Metamath Proof Explorer


Theorem setsxms

Description: The constructed metric space is a metric space iff the provided distance function is a metric. (Contributed by Mario Carneiro, 28-Aug-2015)

Ref Expression
Hypotheses setsms.x
|- ( ph -> X = ( Base ` M ) )
setsms.d
|- ( ph -> D = ( ( dist ` M ) |` ( X X. X ) ) )
setsms.k
|- ( ph -> K = ( M sSet <. ( TopSet ` ndx ) , ( MetOpen ` D ) >. ) )
setsms.m
|- ( ph -> M e. V )
Assertion setsxms
|- ( ph -> ( K e. *MetSp <-> D e. ( *Met ` X ) ) )

Proof

Step Hyp Ref Expression
1 setsms.x
 |-  ( ph -> X = ( Base ` M ) )
2 setsms.d
 |-  ( ph -> D = ( ( dist ` M ) |` ( X X. X ) ) )
3 setsms.k
 |-  ( ph -> K = ( M sSet <. ( TopSet ` ndx ) , ( MetOpen ` D ) >. ) )
4 setsms.m
 |-  ( ph -> M e. V )
5 1 2 3 4 setsmstopn
 |-  ( ph -> ( MetOpen ` D ) = ( TopOpen ` K ) )
6 1 2 3 setsmsds
 |-  ( ph -> ( dist ` M ) = ( dist ` K ) )
7 1 2 3 setsmsbas
 |-  ( ph -> X = ( Base ` K ) )
8 7 sqxpeqd
 |-  ( ph -> ( X X. X ) = ( ( Base ` K ) X. ( Base ` K ) ) )
9 6 8 reseq12d
 |-  ( ph -> ( ( dist ` M ) |` ( X X. X ) ) = ( ( dist ` K ) |` ( ( Base ` K ) X. ( Base ` K ) ) ) )
10 2 9 eqtrd
 |-  ( ph -> D = ( ( dist ` K ) |` ( ( Base ` K ) X. ( Base ` K ) ) ) )
11 10 fveq2d
 |-  ( ph -> ( MetOpen ` D ) = ( MetOpen ` ( ( dist ` K ) |` ( ( Base ` K ) X. ( Base ` K ) ) ) ) )
12 5 11 eqtr3d
 |-  ( ph -> ( TopOpen ` K ) = ( MetOpen ` ( ( dist ` K ) |` ( ( Base ` K ) X. ( Base ` K ) ) ) ) )
13 eqid
 |-  ( TopOpen ` K ) = ( TopOpen ` K )
14 eqid
 |-  ( Base ` K ) = ( Base ` K )
15 eqid
 |-  ( ( dist ` K ) |` ( ( Base ` K ) X. ( Base ` K ) ) ) = ( ( dist ` K ) |` ( ( Base ` K ) X. ( Base ` K ) ) )
16 13 14 15 isxms2
 |-  ( K e. *MetSp <-> ( ( ( dist ` K ) |` ( ( Base ` K ) X. ( Base ` K ) ) ) e. ( *Met ` ( Base ` K ) ) /\ ( TopOpen ` K ) = ( MetOpen ` ( ( dist ` K ) |` ( ( Base ` K ) X. ( Base ` K ) ) ) ) ) )
17 16 rbaib
 |-  ( ( TopOpen ` K ) = ( MetOpen ` ( ( dist ` K ) |` ( ( Base ` K ) X. ( Base ` K ) ) ) ) -> ( K e. *MetSp <-> ( ( dist ` K ) |` ( ( Base ` K ) X. ( Base ` K ) ) ) e. ( *Met ` ( Base ` K ) ) ) )
18 12 17 syl
 |-  ( ph -> ( K e. *MetSp <-> ( ( dist ` K ) |` ( ( Base ` K ) X. ( Base ` K ) ) ) e. ( *Met ` ( Base ` K ) ) ) )
19 7 fveq2d
 |-  ( ph -> ( *Met ` X ) = ( *Met ` ( Base ` K ) ) )
20 10 19 eleq12d
 |-  ( ph -> ( D e. ( *Met ` X ) <-> ( ( dist ` K ) |` ( ( Base ` K ) X. ( Base ` K ) ) ) e. ( *Met ` ( Base ` K ) ) ) )
21 18 20 bitr4d
 |-  ( ph -> ( K e. *MetSp <-> D e. ( *Met ` X ) ) )