Metamath Proof Explorer


Theorem sgnmul

Description: Signum of a product. (Contributed by Thierry Arnoux, 2-Oct-2018)

Ref Expression
Assertion sgnmul ABsgnAB=sgnAsgnB

Proof

Step Hyp Ref Expression
1 remulcl ABAB
2 1 rexrd ABAB*
3 eqeq1 sgnAB=0sgnAB=sgnAsgnB0=sgnAsgnB
4 eqeq1 sgnAB=1sgnAB=sgnAsgnB1=sgnAsgnB
5 eqeq1 sgnAB=1sgnAB=sgnAsgnB1=sgnAsgnB
6 fveq2 A=0sgnA=sgn0
7 sgn0 sgn0=0
8 6 7 eqtrdi A=0sgnA=0
9 8 oveq1d A=0sgnAsgnB=0sgnB
10 9 adantl ABAB=0A=0sgnAsgnB=0sgnB
11 sgnclre BsgnB
12 11 recnd BsgnB
13 12 mul02d B0sgnB=0
14 13 ad3antlr ABAB=0A=00sgnB=0
15 10 14 eqtr2d ABAB=0A=00=sgnAsgnB
16 fveq2 B=0sgnB=sgn0
17 16 7 eqtrdi B=0sgnB=0
18 17 oveq2d B=0sgnAsgnB=sgnA0
19 18 adantl ABAB=0B=0sgnAsgnB=sgnA0
20 sgnclre AsgnA
21 20 recnd AsgnA
22 21 mul01d AsgnA0=0
23 22 ad3antrrr ABAB=0B=0sgnA0=0
24 19 23 eqtr2d ABAB=0B=00=sgnAsgnB
25 simpl ABA
26 25 recnd ABA
27 simpr ABB
28 27 recnd ABB
29 26 28 mul0ord ABAB=0A=0B=0
30 29 biimpa ABAB=0A=0B=0
31 15 24 30 mpjaodan ABAB=00=sgnAsgnB
32 simpll AB0<ABA
33 32 rexrd AB0<ABA*
34 oveq1 sgnA=0sgnAsgnB=0sgnB
35 34 eqeq2d sgnA=01=sgnAsgnB1=0sgnB
36 oveq1 sgnA=1sgnAsgnB=1sgnB
37 36 eqeq2d sgnA=11=sgnAsgnB1=1sgnB
38 oveq1 sgnA=1sgnAsgnB=-1sgnB
39 38 eqeq2d sgnA=11=sgnAsgnB1=-1sgnB
40 simpr AB0<ABA=0A=0
41 26 adantr AB0<ABA
42 28 adantr AB0<ABB
43 simpr AB0<AB0<AB
44 43 gt0ne0d AB0<ABAB0
45 41 42 44 mulne0bad AB0<ABA0
46 45 neneqd AB0<AB¬A=0
47 46 adantr AB0<ABA=0¬A=0
48 40 47 pm2.21dd AB0<ABA=01=0sgnB
49 27 ad2antrr AB0<AB0<AB
50 49 rexrd AB0<AB0<AB*
51 simpll AB0<AB0<AAB
52 0red AB0<AB0<A0
53 simplll AB0<AB0<AA
54 simpr AB0<AB0<A0<A
55 52 53 54 ltled AB0<AB0<A0A
56 simplr AB0<AB0<A0<AB
57 prodgt0 AB0A0<AB0<B
58 51 55 56 57 syl12anc AB0<AB0<A0<B
59 sgnp B*0<BsgnB=1
60 50 58 59 syl2anc AB0<AB0<AsgnB=1
61 60 oveq2d AB0<AB0<A1sgnB=11
62 1t1e1 11=1
63 61 62 eqtr2di AB0<AB0<A1=1sgnB
64 27 ad2antrr AB0<ABA<0B
65 64 rexrd AB0<ABA<0B*
66 simplll AB0<ABA<0A
67 66 renegcld AB0<ABA<0A
68 64 renegcld AB0<ABA<0B
69 0red AB0<ABA<00
70 simpr AB0<ABA<0A<0
71 25 lt0neg1d ABA<00<A
72 71 ad2antrr AB0<ABA<0A<00<A
73 70 72 mpbid AB0<ABA<00<A
74 69 67 73 ltled AB0<ABA<00A
75 simplr AB0<ABA<00<AB
76 26 ad2antrr AB0<ABA<0A
77 28 ad2antrr AB0<ABA<0B
78 76 77 mul2negd AB0<ABA<0AB=AB
79 75 78 breqtrrd AB0<ABA<00<AB
80 prodgt0 AB0A0<AB0<B
81 67 68 74 79 80 syl22anc AB0<ABA<00<B
82 27 lt0neg1d ABB<00<B
83 82 ad2antrr AB0<ABA<0B<00<B
84 81 83 mpbird AB0<ABA<0B<0
85 sgnn B*B<0sgnB=1
86 65 84 85 syl2anc AB0<ABA<0sgnB=1
87 86 oveq2d AB0<ABA<0-1sgnB=-1-1
88 neg1mulneg1e1 -1-1=1
89 87 88 eqtr2di AB0<ABA<01=-1sgnB
90 33 35 37 39 48 63 89 sgn3da AB0<AB1=sgnAsgnB
91 simpll ABAB<0A
92 91 rexrd ABAB<0A*
93 34 eqeq2d sgnA=01=sgnAsgnB1=0sgnB
94 36 eqeq2d sgnA=11=sgnAsgnB1=1sgnB
95 38 eqeq2d sgnA=11=sgnAsgnB1=-1sgnB
96 simpr ABAB<0A=0A=0
97 26 ad2antrr ABAB<0A=0A
98 28 ad2antrr ABAB<0A=0B
99 simplr ABAB<0A=0AB<0
100 99 lt0ne0d ABAB<0A=0AB0
101 97 98 100 mulne0bad ABAB<0A=0A0
102 101 neneqd ABAB<0A=0¬A=0
103 96 102 pm2.21dd ABAB<0A=01=0sgnB
104 27 ad2antrr ABAB<00<AB
105 104 rexrd ABAB<00<AB*
106 simplr ABAB<0B
107 26 28 mulcomd ABAB=BA
108 107 breq1d ABAB<0BA<0
109 108 biimpa ABAB<0BA<0
110 106 91 109 mul2lt0rgt0 ABAB<00<AB<0
111 105 110 85 syl2anc ABAB<00<AsgnB=1
112 111 oveq2d ABAB<00<A1sgnB=1-1
113 neg1cn 1
114 113 mullidi 1-1=1
115 112 114 eqtr2di ABAB<00<A1=1sgnB
116 106 adantr ABAB<0A<0B
117 116 rexrd ABAB<0A<0B*
118 106 91 109 mul2lt0rlt0 ABAB<0A<00<B
119 117 118 59 syl2anc ABAB<0A<0sgnB=1
120 119 oveq2d ABAB<0A<0-1sgnB=-11
121 113 mulridi -11=1
122 120 121 eqtr2di ABAB<0A<01=-1sgnB
123 92 93 94 95 103 115 122 sgn3da ABAB<01=sgnAsgnB
124 2 3 4 5 31 90 123 sgn3da ABsgnAB=sgnAsgnB