Metamath Proof Explorer


Theorem sgnneg

Description: Negation of the signum. (Contributed by Thierry Arnoux, 1-Oct-2018)

Ref Expression
Assertion sgnneg A sgn A = sgn A

Proof

Step Hyp Ref Expression
1 recn A A
2 1 negeq0d A A = 0 A = 0
3 2 bicomd A A = 0 A = 0
4 eqidd A A = 0 0 = 0
5 3 necon3bbid A ¬ A = 0 A 0
6 5 biimpa A ¬ A = 0 A 0
7 lt0neg2 A 0 < A A < 0
8 7 adantr A A 0 0 < A A < 0
9 id A A
10 0red A 0
11 9 10 lttri2d A A 0 A < 0 0 < A
12 11 biimpa A A 0 A < 0 0 < A
13 ltnsym2 A 0 ¬ A < 0 0 < A
14 10 13 mpdan A ¬ A < 0 0 < A
15 14 adantr A A 0 ¬ A < 0 0 < A
16 12 15 jca A A 0 A < 0 0 < A ¬ A < 0 0 < A
17 pm5.17 A < 0 0 < A ¬ A < 0 0 < A A < 0 ¬ 0 < A
18 16 17 sylib A A 0 A < 0 ¬ 0 < A
19 18 con2bid A A 0 0 < A ¬ A < 0
20 8 19 bitr3d A A 0 A < 0 ¬ A < 0
21 20 ifbid A A 0 if A < 0 1 1 = if ¬ A < 0 1 1
22 ifnot if ¬ A < 0 1 1 = if A < 0 1 1
23 21 22 eqtrdi A A 0 if A < 0 1 1 = if A < 0 1 1
24 6 23 syldan A ¬ A = 0 if A < 0 1 1 = if A < 0 1 1
25 3 4 24 ifbieq12d2 A if A = 0 0 if A < 0 1 1 = if A = 0 0 if A < 0 1 1
26 renegcl A A
27 rexr A A *
28 sgnval A * sgn A = if A = 0 0 if A < 0 1 1
29 26 27 28 3syl A sgn A = if A = 0 0 if A < 0 1 1
30 df-neg sgn A = 0 sgn A
31 30 a1i A sgn A = 0 sgn A
32 rexr A A *
33 sgnval A * sgn A = if A = 0 0 if A < 0 1 1
34 32 33 syl A sgn A = if A = 0 0 if A < 0 1 1
35 34 oveq2d A 0 sgn A = 0 if A = 0 0 if A < 0 1 1
36 ovif2 0 if A = 0 0 if A < 0 1 1 = if A = 0 0 0 0 if A < 0 1 1
37 biid A = 0 A = 0
38 0m0e0 0 0 = 0
39 ovif2 0 if A < 0 1 1 = if A < 0 0 -1 0 1
40 biid A < 0 A < 0
41 0cn 0
42 ax-1cn 1
43 41 42 subnegi 0 -1 = 0 + 1
44 0p1e1 0 + 1 = 1
45 43 44 eqtr2i 1 = 0 -1
46 df-neg 1 = 0 1
47 40 45 46 ifbieq12i if A < 0 1 1 = if A < 0 0 -1 0 1
48 39 47 eqtr4i 0 if A < 0 1 1 = if A < 0 1 1
49 37 38 48 ifbieq12i if A = 0 0 0 0 if A < 0 1 1 = if A = 0 0 if A < 0 1 1
50 36 49 eqtri 0 if A = 0 0 if A < 0 1 1 = if A = 0 0 if A < 0 1 1
51 50 a1i A 0 if A = 0 0 if A < 0 1 1 = if A = 0 0 if A < 0 1 1
52 31 35 51 3eqtrd A sgn A = if A = 0 0 if A < 0 1 1
53 25 29 52 3eqtr4d A sgn A = sgn A