Metamath Proof Explorer


Theorem reabssgn

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

Ref Expression
Assertion reabssgn AA=sgnAA

Proof

Step Hyp Ref Expression
1 rexr AA*
2 sgnval A*sgnA=ifA=00ifA<011
3 1 2 syl AsgnA=ifA=00ifA<011
4 3 oveq1d AsgnAA=ifA=00ifA<011A
5 ovif ifA=00ifA<011A=ifA=00AifA<011A
6 ovif ifA<011A=ifA<0-1A1A
7 ifeq2 ifA<011A=ifA<0-1A1AifA=00AifA<011A=ifA=00AifA<0-1A1A
8 6 7 ax-mp ifA=00AifA<011A=ifA=00AifA<0-1A1A
9 5 8 eqtri ifA=00ifA<011A=ifA=00AifA<0-1A1A
10 mul02lem2 A0A=0
11 10 adantr AA=00A=0
12 simpr AA=0A=0
13 12 abs00bd AA=0A=0
14 11 13 eqtr4d AA=00A=A
15 recn AA
16 15 mulm1d A-1A=A
17 15 mullidd A1A=A
18 16 17 ifeq12d AifA<0-1A1A=ifA<0AA
19 reabsifneg AA=ifA<0AA
20 18 19 eqtr4d AifA<0-1A1A=A
21 20 adantr A¬A=0ifA<0-1A1A=A
22 14 21 ifeqda AifA=00AifA<0-1A1A=A
23 9 22 eqtrid AifA=00ifA<011A=A
24 4 23 eqtr2d AA=sgnAA