Metamath Proof Explorer


Theorem xmstri2

Description: Triangle inequality for the distance function of an extended metric. (Contributed by Mario Carneiro, 2-Oct-2015)

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

Proof

Step Hyp Ref Expression
1 mscl.x 𝑋 = ( Base ‘ 𝑀 )
2 mscl.d 𝐷 = ( dist ‘ 𝑀 )
3 1 2 xmsxmet2 ( 𝑀 ∈ ∞MetSp → ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) ∈ ( ∞Met ‘ 𝑋 ) )
4 xmettri2 ( ( ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) ∈ ( ∞Met ‘ 𝑋 ) ∧ ( 𝐶𝑋𝐴𝑋𝐵𝑋 ) ) → ( 𝐴 ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) 𝐵 ) ≤ ( ( 𝐶 ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) 𝐴 ) +𝑒 ( 𝐶 ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) 𝐵 ) ) )
5 3 4 sylan ( ( 𝑀 ∈ ∞MetSp ∧ ( 𝐶𝑋𝐴𝑋𝐵𝑋 ) ) → ( 𝐴 ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) 𝐵 ) ≤ ( ( 𝐶 ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) 𝐴 ) +𝑒 ( 𝐶 ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) 𝐵 ) ) )
6 simpr2 ( ( 𝑀 ∈ ∞MetSp ∧ ( 𝐶𝑋𝐴𝑋𝐵𝑋 ) ) → 𝐴𝑋 )
7 simpr3 ( ( 𝑀 ∈ ∞MetSp ∧ ( 𝐶𝑋𝐴𝑋𝐵𝑋 ) ) → 𝐵𝑋 )
8 6 7 ovresd ( ( 𝑀 ∈ ∞MetSp ∧ ( 𝐶𝑋𝐴𝑋𝐵𝑋 ) ) → ( 𝐴 ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) 𝐵 ) = ( 𝐴 𝐷 𝐵 ) )
9 simpr1 ( ( 𝑀 ∈ ∞MetSp ∧ ( 𝐶𝑋𝐴𝑋𝐵𝑋 ) ) → 𝐶𝑋 )
10 9 6 ovresd ( ( 𝑀 ∈ ∞MetSp ∧ ( 𝐶𝑋𝐴𝑋𝐵𝑋 ) ) → ( 𝐶 ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) 𝐴 ) = ( 𝐶 𝐷 𝐴 ) )
11 9 7 ovresd ( ( 𝑀 ∈ ∞MetSp ∧ ( 𝐶𝑋𝐴𝑋𝐵𝑋 ) ) → ( 𝐶 ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) 𝐵 ) = ( 𝐶 𝐷 𝐵 ) )
12 10 11 oveq12d ( ( 𝑀 ∈ ∞MetSp ∧ ( 𝐶𝑋𝐴𝑋𝐵𝑋 ) ) → ( ( 𝐶 ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) 𝐴 ) +𝑒 ( 𝐶 ( 𝐷 ↾ ( 𝑋 × 𝑋 ) ) 𝐵 ) ) = ( ( 𝐶 𝐷 𝐴 ) +𝑒 ( 𝐶 𝐷 𝐵 ) ) )
13 5 8 12 3brtr3d ( ( 𝑀 ∈ ∞MetSp ∧ ( 𝐶𝑋𝐴𝑋𝐵𝑋 ) ) → ( 𝐴 𝐷 𝐵 ) ≤ ( ( 𝐶 𝐷 𝐴 ) +𝑒 ( 𝐶 𝐷 𝐵 ) ) )