Metamath Proof Explorer


Theorem reabsifpos

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

Ref Expression
Assertion reabsifpos A A = if 0 < A A A

Proof

Step Hyp Ref Expression
1 0re 0
2 ltle 0 A 0 < A 0 A
3 1 2 mpan A 0 < A 0 A
4 3 imdistani A 0 < A A 0 A
5 absid A 0 A A = A
6 4 5 syl A 0 < A A = A
7 6 eqcomd A 0 < A A = A
8 id A A
9 0red A 0
10 8 9 lenltd A A 0 ¬ 0 < A
11 10 pm5.32i A A 0 A ¬ 0 < A
12 absnid A A 0 A = A
13 11 12 sylbir A ¬ 0 < A A = A
14 13 eqcomd A ¬ 0 < A A = A
15 7 14 ifeqda A if 0 < A A A = A
16 15 eqcomd A A = if 0 < A A A