Metamath Proof Explorer


Theorem xrsdsval

Description: The metric of the extended real number structure. (Contributed by Mario Carneiro, 20-Aug-2015)

Ref Expression
Hypothesis xrsds.d D=dist𝑠*
Assertion xrsdsval A*B*ADB=ifABB+𝑒AA+𝑒B

Proof

Step Hyp Ref Expression
1 xrsds.d D=dist𝑠*
2 breq12 x=Ay=BxyAB
3 id y=By=B
4 xnegeq x=Ax=A
5 3 4 oveqan12rd x=Ay=By+𝑒x=B+𝑒A
6 id x=Ax=A
7 xnegeq y=By=B
8 6 7 oveqan12d x=Ay=Bx+𝑒y=A+𝑒B
9 2 5 8 ifbieq12d x=Ay=Bifxyy+𝑒xx+𝑒y=ifABB+𝑒AA+𝑒B
10 1 xrsds D=x*,y*ifxyy+𝑒xx+𝑒y
11 ovex B+𝑒AV
12 ovex A+𝑒BV
13 11 12 ifex ifABB+𝑒AA+𝑒BV
14 9 10 13 ovmpoa A*B*ADB=ifABB+𝑒AA+𝑒B