Metamath Proof Explorer


Theorem reabsifnneg

Description: Alternate expression for the absolute value of a real number. (Contributed by RP, 11-May-2024)

Ref Expression
Assertion reabsifnneg AA=if0AAA

Proof

Step Hyp Ref Expression
1 absid A0AA=A
2 1 eqcomd A0AA=A
3 0re 0
4 ltnle A0A<0¬0A
5 ltle A0A<0A0
6 4 5 sylbird A0¬0AA0
7 3 6 mpan2 A¬0AA0
8 7 imdistani A¬0AAA0
9 absnid AA0A=A
10 8 9 syl A¬0AA=A
11 10 eqcomd A¬0AA=A
12 2 11 ifeqda Aif0AAA=A
13 12 eqcomd AA=if0AAA