Metamath Proof Explorer


Theorem xmetsym

Description: The distance function of an extended metric space is symmetric. (Contributed by Mario Carneiro, 20-Aug-2015)

Ref Expression
Assertion xmetsym ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → ( 𝐴 𝐷 𝐵 ) = ( 𝐵 𝐷 𝐴 ) )

Proof

Step Hyp Ref Expression
1 xmetcl ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → ( 𝐴 𝐷 𝐵 ) ∈ ℝ* )
2 xmetcl ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐵𝑋𝐴𝑋 ) → ( 𝐵 𝐷 𝐴 ) ∈ ℝ* )
3 2 3com23 ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → ( 𝐵 𝐷 𝐴 ) ∈ ℝ* )
4 simp1 ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → 𝐷 ∈ ( ∞Met ‘ 𝑋 ) )
5 simp3 ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → 𝐵𝑋 )
6 simp2 ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → 𝐴𝑋 )
7 xmettri2 ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ ( 𝐵𝑋𝐴𝑋𝐵𝑋 ) ) → ( 𝐴 𝐷 𝐵 ) ≤ ( ( 𝐵 𝐷 𝐴 ) +𝑒 ( 𝐵 𝐷 𝐵 ) ) )
8 4 5 6 5 7 syl13anc ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → ( 𝐴 𝐷 𝐵 ) ≤ ( ( 𝐵 𝐷 𝐴 ) +𝑒 ( 𝐵 𝐷 𝐵 ) ) )
9 xmet0 ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐵𝑋 ) → ( 𝐵 𝐷 𝐵 ) = 0 )
10 9 3adant2 ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → ( 𝐵 𝐷 𝐵 ) = 0 )
11 10 oveq2d ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → ( ( 𝐵 𝐷 𝐴 ) +𝑒 ( 𝐵 𝐷 𝐵 ) ) = ( ( 𝐵 𝐷 𝐴 ) +𝑒 0 ) )
12 2 xaddid1d ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐵𝑋𝐴𝑋 ) → ( ( 𝐵 𝐷 𝐴 ) +𝑒 0 ) = ( 𝐵 𝐷 𝐴 ) )
13 12 3com23 ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → ( ( 𝐵 𝐷 𝐴 ) +𝑒 0 ) = ( 𝐵 𝐷 𝐴 ) )
14 11 13 eqtrd ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → ( ( 𝐵 𝐷 𝐴 ) +𝑒 ( 𝐵 𝐷 𝐵 ) ) = ( 𝐵 𝐷 𝐴 ) )
15 8 14 breqtrd ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → ( 𝐴 𝐷 𝐵 ) ≤ ( 𝐵 𝐷 𝐴 ) )
16 xmettri2 ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ ( 𝐴𝑋𝐵𝑋𝐴𝑋 ) ) → ( 𝐵 𝐷 𝐴 ) ≤ ( ( 𝐴 𝐷 𝐵 ) +𝑒 ( 𝐴 𝐷 𝐴 ) ) )
17 4 6 5 6 16 syl13anc ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → ( 𝐵 𝐷 𝐴 ) ≤ ( ( 𝐴 𝐷 𝐵 ) +𝑒 ( 𝐴 𝐷 𝐴 ) ) )
18 xmet0 ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋 ) → ( 𝐴 𝐷 𝐴 ) = 0 )
19 18 3adant3 ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → ( 𝐴 𝐷 𝐴 ) = 0 )
20 19 oveq2d ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → ( ( 𝐴 𝐷 𝐵 ) +𝑒 ( 𝐴 𝐷 𝐴 ) ) = ( ( 𝐴 𝐷 𝐵 ) +𝑒 0 ) )
21 1 xaddid1d ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → ( ( 𝐴 𝐷 𝐵 ) +𝑒 0 ) = ( 𝐴 𝐷 𝐵 ) )
22 20 21 eqtrd ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → ( ( 𝐴 𝐷 𝐵 ) +𝑒 ( 𝐴 𝐷 𝐴 ) ) = ( 𝐴 𝐷 𝐵 ) )
23 17 22 breqtrd ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → ( 𝐵 𝐷 𝐴 ) ≤ ( 𝐴 𝐷 𝐵 ) )
24 1 3 15 23 xrletrid ( ( 𝐷 ∈ ( ∞Met ‘ 𝑋 ) ∧ 𝐴𝑋𝐵𝑋 ) → ( 𝐴 𝐷 𝐵 ) = ( 𝐵 𝐷 𝐴 ) )