Metamath Proof Explorer


Theorem xmsge0

Description: The distance function in an extended metric space is nonnegative. (Contributed by Mario Carneiro, 4-Oct-2015)

Ref Expression
Hypotheses mscl.x 𝑋 = ( Base ‘ 𝑀 )
mscl.d 𝐷 = ( dist ‘ 𝑀 )
Assertion xmsge0 ( ( 𝑀 ∈ ∞MetSp ∧ 𝐴𝑋𝐵𝑋 ) → 0 ≤ ( 𝐴 𝐷 𝐵 ) )

Proof

Step Hyp Ref Expression
1 mscl.x 𝑋 = ( Base ‘ 𝑀 )
2 mscl.d 𝐷 = ( dist ‘ 𝑀 )
3 1 2 xmsxmet2 ( 𝑀 ∈ ∞MetSp → ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) ∈ ( ∞Met ‘ 𝑋 ) )
4 xmetge0 ( ( ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → 0 ≤ ( 𝐴 ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) 𝐵 ) )
5 3 4 syl3an1 ( ( 𝑀 ∈ ∞MetSp ∧ 𝐴𝑋𝐵𝑋 ) → 0 ≤ ( 𝐴 ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) 𝐵 ) )
6 ovres ( ( 𝐴𝑋𝐵𝑋 ) → ( 𝐴 ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) 𝐵 ) = ( 𝐴 𝐷 𝐵 ) )
7 6 3adant1 ( ( 𝑀 ∈ ∞MetSp ∧ 𝐴𝑋𝐵𝑋 ) → ( 𝐴 ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) 𝐵 ) = ( 𝐴 𝐷 𝐵 ) )
8 5 7 breqtrd ( ( 𝑀 ∈ ∞MetSp ∧ 𝐴𝑋𝐵𝑋 ) → 0 ≤ ( 𝐴 𝐷 𝐵 ) )