Metamath Proof Explorer


Theorem mettri2

Description: Triangle inequality for the distance function of a metric space. (Contributed by NM, 30-Aug-2006) (Revised by Mario Carneiro, 20-Aug-2015)

Ref Expression
Assertion mettri2 ( ( 𝐷 ∈ ( Met ‘ 𝑋 ) ∧ ( 𝐶𝑋𝐴𝑋𝐵𝑋 ) ) → ( 𝐴 𝐷 𝐵 ) ≤ ( ( 𝐶 𝐷 𝐴 ) + ( 𝐶 𝐷 𝐵 ) ) )

Proof

Step Hyp Ref Expression
1 metxmet ( 𝐷 ∈ ( Met ‘ 𝑋 ) → 𝐷 ∈ ( ∞Met ‘ 𝑋 ) )
2 xmettri2 ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ ( 𝐶𝑋𝐴𝑋𝐵𝑋 ) ) → ( 𝐴 𝐷 𝐵 ) ≤ ( ( 𝐶 𝐷 𝐴 ) +𝑒 ( 𝐶 𝐷 𝐵 ) ) )
3 1 2 sylan ( ( 𝐷 ∈ ( Met ‘ 𝑋 ) ∧ ( 𝐶𝑋𝐴𝑋𝐵𝑋 ) ) → ( 𝐴 𝐷 𝐵 ) ≤ ( ( 𝐶 𝐷 𝐴 ) +𝑒 ( 𝐶 𝐷 𝐵 ) ) )
4 metcl ( ( 𝐷 ∈ ( Met ‘ 𝑋 ) ∧ 𝐶𝑋𝐴𝑋 ) → ( 𝐶 𝐷 𝐴 ) ∈ ℝ )
5 4 3adant3r3 ( ( 𝐷 ∈ ( Met ‘ 𝑋 ) ∧ ( 𝐶𝑋𝐴𝑋𝐵𝑋 ) ) → ( 𝐶 𝐷 𝐴 ) ∈ ℝ )
6 metcl ( ( 𝐷 ∈ ( Met ‘ 𝑋 ) ∧ 𝐶𝑋𝐵𝑋 ) → ( 𝐶 𝐷 𝐵 ) ∈ ℝ )
7 6 3adant3r2 ( ( 𝐷 ∈ ( Met ‘ 𝑋 ) ∧ ( 𝐶𝑋𝐴𝑋𝐵𝑋 ) ) → ( 𝐶 𝐷 𝐵 ) ∈ ℝ )
8 5 7 rexaddd ( ( 𝐷 ∈ ( Met ‘ 𝑋 ) ∧ ( 𝐶𝑋𝐴𝑋𝐵𝑋 ) ) → ( ( 𝐶 𝐷 𝐴 ) +𝑒 ( 𝐶 𝐷 𝐵 ) ) = ( ( 𝐶 𝐷 𝐴 ) + ( 𝐶 𝐷 𝐵 ) ) )
9 3 8 breqtrd ( ( 𝐷 ∈ ( Met ‘ 𝑋 ) ∧ ( 𝐶𝑋𝐴𝑋𝐵𝑋 ) ) → ( 𝐴 𝐷 𝐵 ) ≤ ( ( 𝐶 𝐷 𝐴 ) + ( 𝐶 𝐷 𝐵 ) ) )