ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  lgsdilem Unicode version

Theorem lgsdilem 13687
Description: Lemma for lgsdi 13697 and lgsdir 13695: the sign part of the Legendre symbol is multiplicative. (Contributed by Mario Carneiro, 4-Feb-2015.)
Assertion
Ref Expression
lgsdilem  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  if ( ( N  <  0  /\  ( A  x.  B )  <  0 ) ,  -u
1 ,  1 )  =  ( if ( ( N  <  0  /\  A  <  0
) ,  -u 1 ,  1 )  x.  if ( ( N  <  0  /\  B  <  0 ) ,  -u
1 ,  1 ) ) )

Proof of Theorem lgsdilem
StepHypRef Expression
1 simplrr 531 . . . . . . . . . . 11  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  B  =/=  0 )
21biantrud 302 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( 0  <_  B  <->  ( 0  <_  B  /\  B  =/=  0 ) ) )
3 0z 9216 . . . . . . . . . . 11  |-  0  e.  ZZ
4 simpl2 996 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  B  e.  ZZ )
54adantr 274 . . . . . . . . . . 11  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  B  e.  ZZ )
6 zltlen 9283 . . . . . . . . . . 11  |-  ( ( 0  e.  ZZ  /\  B  e.  ZZ )  ->  ( 0  <  B  <->  ( 0  <_  B  /\  B  =/=  0 ) ) )
73, 5, 6sylancr 412 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( 0  <  B  <->  ( 0  <_  B  /\  B  =/=  0 ) ) )
8 simpl1 995 . . . . . . . . . . . . . . . . 17  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  A  e.  ZZ )
98zred 9327 . . . . . . . . . . . . . . . 16  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  A  e.  RR )
109adantr 274 . . . . . . . . . . . . . . 15  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  A  e.  RR )
1110renegcld 8292 . . . . . . . . . . . . . 14  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  -u A  e.  RR )
1211recnd 7941 . . . . . . . . . . . . 13  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  -u A  e.  CC )
1312mul01d 8305 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( -u A  x.  0 )  =  0 )
1410recnd 7941 . . . . . . . . . . . . 13  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  A  e.  CC )
154zred 9327 . . . . . . . . . . . . . . 15  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  B  e.  RR )
1615adantr 274 . . . . . . . . . . . . . 14  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  B  e.  RR )
1716recnd 7941 . . . . . . . . . . . . 13  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  B  e.  CC )
1814, 17mulneg1d 8323 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( -u A  x.  B
)  =  -u ( A  x.  B )
)
1913, 18breq12d 4000 . . . . . . . . . . 11  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( ( -u A  x.  0 )  <  ( -u A  x.  B )  <->  0  <  -u ( A  x.  B )
) )
20 0red 7914 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
0  e.  RR )
219lt0neg1d 8427 . . . . . . . . . . . . 13  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  ( A  <  0  <->  0  <  -u A ) )
2221biimpa 294 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
0  <  -u A )
23 ltmul2 8765 . . . . . . . . . . . 12  |-  ( ( 0  e.  RR  /\  B  e.  RR  /\  ( -u A  e.  RR  /\  0  <  -u A ) )  ->  ( 0  < 
B  <->  ( -u A  x.  0 )  <  ( -u A  x.  B ) ) )
2420, 16, 11, 22, 23syl112anc 1237 . . . . . . . . . . 11  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( 0  <  B  <->  (
-u A  x.  0 )  <  ( -u A  x.  B )
) )
259, 15remulcld 7943 . . . . . . . . . . . . 13  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  ( A  x.  B )  e.  RR )
2625adantr 274 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( A  x.  B
)  e.  RR )
2726lt0neg1d 8427 . . . . . . . . . . 11  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( ( A  x.  B )  <  0  <->  0  <  -u ( A  x.  B ) ) )
2819, 24, 273bitr4d 219 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( 0  <  B  <->  ( A  x.  B )  <  0 ) )
292, 7, 283bitr2rd 216 . . . . . . . . 9  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( ( A  x.  B )  <  0  <->  0  <_  B ) )
30 0re 7913 . . . . . . . . . 10  |-  0  e.  RR
31 lenlt 7988 . . . . . . . . . 10  |-  ( ( 0  e.  RR  /\  B  e.  RR )  ->  ( 0  <_  B  <->  -.  B  <  0 ) )
3230, 16, 31sylancr 412 . . . . . . . . 9  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( 0  <_  B  <->  -.  B  <  0 ) )
3329, 32bitrd 187 . . . . . . . 8  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( ( A  x.  B )  <  0  <->  -.  B  <  0 ) )
3433ifbid 3546 . . . . . . 7  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  if ( ( A  x.  B )  <  0 ,  -u 1 ,  1 )  =  if ( -.  B  <  0 ,  -u 1 ,  1 ) )
35 zdclt 9282 . . . . . . . . . . 11  |-  ( ( B  e.  ZZ  /\  0  e.  ZZ )  -> DECID  B  <  0 )
363, 35mpan2 423 . . . . . . . . . 10  |-  ( B  e.  ZZ  -> DECID  B  <  0
)
37 oveq2 5859 . . . . . . . . . . . . 13  |-  ( if ( B  <  0 ,  -u 1 ,  1 )  =  -u 1  ->  ( -u 1  x.  if ( B  <  0 ,  -u 1 ,  1 ) )  =  ( -u 1  x.  -u 1 ) )
38 neg1mulneg1e1 9083 . . . . . . . . . . . . 13  |-  ( -u
1  x.  -u 1
)  =  1
3937, 38eqtrdi 2219 . . . . . . . . . . . 12  |-  ( if ( B  <  0 ,  -u 1 ,  1 )  =  -u 1  ->  ( -u 1  x.  if ( B  <  0 ,  -u 1 ,  1 ) )  =  1 )
40 oveq2 5859 . . . . . . . . . . . . 13  |-  ( if ( B  <  0 ,  -u 1 ,  1 )  =  1  -> 
( -u 1  x.  if ( B  <  0 ,  -u 1 ,  1 ) )  =  (
-u 1  x.  1 ) )
41 ax-1cn 7860 . . . . . . . . . . . . . 14  |-  1  e.  CC
4241mulm1i 8315 . . . . . . . . . . . . 13  |-  ( -u
1  x.  1 )  =  -u 1
4340, 42eqtrdi 2219 . . . . . . . . . . . 12  |-  ( if ( B  <  0 ,  -u 1 ,  1 )  =  1  -> 
( -u 1  x.  if ( B  <  0 ,  -u 1 ,  1 ) )  =  -u
1 )
4439, 43ifsbdc 3537 . . . . . . . . . . 11  |-  (DECID  B  <  0  ->  ( -u 1  x.  if ( B  <  0 ,  -u 1 ,  1 ) )  =  if ( B  <  0 ,  1 ,  -u 1 ) )
45 ifnotdc 3561 . . . . . . . . . . 11  |-  (DECID  B  <  0  ->  if ( -.  B  <  0 ,  -u 1 ,  1 )  =  if ( B  <  0 ,  1 ,  -u 1
) )
4644, 45eqtr4d 2206 . . . . . . . . . 10  |-  (DECID  B  <  0  ->  ( -u 1  x.  if ( B  <  0 ,  -u 1 ,  1 ) )  =  if ( -.  B  <  0 , 
-u 1 ,  1 ) )
4736, 46syl 14 . . . . . . . . 9  |-  ( B  e.  ZZ  ->  ( -u 1  x.  if ( B  <  0 , 
-u 1 ,  1 ) )  =  if ( -.  B  <  0 ,  -u 1 ,  1 ) )
48473ad2ant2 1014 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  ->  ( -u 1  x.  if ( B  <  0 , 
-u 1 ,  1 ) )  =  if ( -.  B  <  0 ,  -u 1 ,  1 ) )
4948ad2antrr 485 . . . . . . 7  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( -u 1  x.  if ( B  <  0 ,  -u 1 ,  1 ) )  =  if ( -.  B  <  0 ,  -u 1 ,  1 ) )
5034, 49eqtr4d 2206 . . . . . 6  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  if ( ( A  x.  B )  <  0 ,  -u 1 ,  1 )  =  ( -u
1  x.  if ( B  <  0 , 
-u 1 ,  1 ) ) )
51 iftrue 3530 . . . . . . . 8  |-  ( A  <  0  ->  if ( A  <  0 ,  -u 1 ,  1 )  =  -u 1
)
5251adantl 275 . . . . . . 7  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  if ( A  <  0 ,  -u 1 ,  1 )  =  -u 1
)
5352oveq1d 5866 . . . . . 6  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( if ( A  <  0 ,  -u
1 ,  1 )  x.  if ( B  <  0 ,  -u
1 ,  1 ) )  =  ( -u
1  x.  if ( B  <  0 , 
-u 1 ,  1 ) ) )
5450, 53eqtr4d 2206 . . . . 5  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  if ( ( A  x.  B )  <  0 ,  -u 1 ,  1 )  =  ( if ( A  <  0 ,  -u 1 ,  1 )  x.  if ( B  <  0 , 
-u 1 ,  1 ) ) )
55 iffalse 3533 . . . . . . . 8  |-  ( -.  A  <  0  ->  if ( A  <  0 ,  -u 1 ,  1 )  =  1 )
5655adantl 275 . . . . . . 7  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  if ( A  <  0 ,  -u
1 ,  1 )  =  1 )
5756oveq1d 5866 . . . . . 6  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( if ( A  <  0 ,  -u 1 ,  1 )  x.  if ( B  <  0 , 
-u 1 ,  1 ) )  =  ( 1  x.  if ( B  <  0 , 
-u 1 ,  1 ) ) )
58 neg1cn 8976 . . . . . . . . 9  |-  -u 1  e.  CC
5958a1i 9 . . . . . . . 8  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  -u 1  e.  CC )
6041a1i 9 . . . . . . . 8  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  1  e.  CC )
614adantr 274 . . . . . . . . 9  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  B  e.  ZZ )
6261, 3, 35sylancl 411 . . . . . . . 8  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  -> DECID  B  <  0
)
6359, 60, 62ifcldcd 3560 . . . . . . 7  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  if ( B  <  0 ,  -u
1 ,  1 )  e.  CC )
6463mulid2d 7931 . . . . . 6  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( 1  x.  if ( B  <  0 ,  -u
1 ,  1 ) )  =  if ( B  <  0 , 
-u 1 ,  1 ) )
6515adantr 274 . . . . . . . . 9  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  B  e.  RR )
66 0red 7914 . . . . . . . . 9  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  0  e.  RR )
679adantr 274 . . . . . . . . 9  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  A  e.  RR )
68 simplrl 530 . . . . . . . . . . 11  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  A  =/=  0 )
6968neneqd 2361 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  -.  A  =  0 )
70 simpr 109 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  -.  A  <  0 )
718adantr 274 . . . . . . . . . . . . . . 15  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  A  e.  ZZ )
72 ztri3or 9248 . . . . . . . . . . . . . . 15  |-  ( ( A  e.  ZZ  /\  0  e.  ZZ )  ->  ( A  <  0  \/  A  =  0  \/  0  <  A ) )
7371, 3, 72sylancl 411 . . . . . . . . . . . . . 14  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( A  <  0  \/  A  =  0  \/  0  < 
A ) )
74 3orass 976 . . . . . . . . . . . . . 14  |-  ( ( A  <  0  \/  A  =  0  \/  0  <  A )  <-> 
( A  <  0  \/  ( A  =  0  \/  0  <  A
) ) )
7573, 74sylib 121 . . . . . . . . . . . . 13  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( A  <  0  \/  ( A  =  0  \/  0  <  A ) ) )
7675orcomd 724 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( ( A  =  0  \/  0  <  A )  \/  A  <  0 ) )
7770, 76ecased 1344 . . . . . . . . . . 11  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( A  =  0  \/  0  <  A ) )
7877orcomd 724 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( 0  <  A  \/  A  =  0 ) )
7969, 78ecased 1344 . . . . . . . . 9  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  0  <  A )
80 ltmul2 8765 . . . . . . . . 9  |-  ( ( B  e.  RR  /\  0  e.  RR  /\  ( A  e.  RR  /\  0  <  A ) )  -> 
( B  <  0  <->  ( A  x.  B )  <  ( A  x.  0 ) ) )
8165, 66, 67, 79, 80syl112anc 1237 . . . . . . . 8  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( B  <  0  <->  ( A  x.  B )  <  ( A  x.  0 ) ) )
8267recnd 7941 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  A  e.  CC )
8382mul01d 8305 . . . . . . . . 9  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( A  x.  0 )  =  0 )
8483breq2d 3999 . . . . . . . 8  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( ( A  x.  B )  <  ( A  x.  0 )  <->  ( A  x.  B )  <  0
) )
8581, 84bitrd 187 . . . . . . 7  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( B  <  0  <->  ( A  x.  B )  <  0
) )
8685ifbid 3546 . . . . . 6  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  if ( B  <  0 ,  -u
1 ,  1 )  =  if ( ( A  x.  B )  <  0 ,  -u
1 ,  1 ) )
8757, 64, 863eqtrrd 2208 . . . . 5  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  if (
( A  x.  B
)  <  0 ,  -u 1 ,  1 )  =  ( if ( A  <  0 , 
-u 1 ,  1 )  x.  if ( B  <  0 , 
-u 1 ,  1 ) ) )
88 zdclt 9282 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  0  e.  ZZ )  -> DECID  A  <  0 )
898, 3, 88sylancl 411 . . . . . 6  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  -> DECID  A  <  0
)
90 exmiddc 831 . . . . . 6  |-  (DECID  A  <  0  ->  ( A  <  0  \/  -.  A  <  0 ) )
9189, 90syl 14 . . . . 5  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  ( A  <  0  \/  -.  A  <  0 ) )
9254, 87, 91mpjaodan 793 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  if ( ( A  x.  B )  <  0 ,  -u 1 ,  1 )  =  ( if ( A  <  0 ,  -u 1 ,  1 )  x.  if ( B  <  0 , 
-u 1 ,  1 ) ) )
9392adantr 274 . . 3  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  N  <  0 )  ->  if ( ( A  x.  B )  <  0 ,  -u 1 ,  1 )  =  ( if ( A  <  0 ,  -u 1 ,  1 )  x.  if ( B  <  0 , 
-u 1 ,  1 ) ) )
94 simpr 109 . . . . 5  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  N  <  0 )  ->  N  <  0 )
9594biantrurd 303 . . . 4  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  N  <  0 )  -> 
( ( A  x.  B )  <  0  <->  ( N  <  0  /\  ( A  x.  B
)  <  0 ) ) )
9695ifbid 3546 . . 3  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  N  <  0 )  ->  if ( ( A  x.  B )  <  0 ,  -u 1 ,  1 )  =  if ( ( N  <  0  /\  ( A  x.  B
)  <  0 ) ,  -u 1 ,  1 ) )
9794biantrurd 303 . . . . 5  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  N  <  0 )  -> 
( A  <  0  <->  ( N  <  0  /\  A  <  0 ) ) )
9897ifbid 3546 . . . 4  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  N  <  0 )  ->  if ( A  <  0 ,  -u 1 ,  1 )  =  if ( ( N  <  0  /\  A  <  0
) ,  -u 1 ,  1 ) )
9994biantrurd 303 . . . . 5  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  N  <  0 )  -> 
( B  <  0  <->  ( N  <  0  /\  B  <  0 ) ) )
10099ifbid 3546 . . . 4  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  N  <  0 )  ->  if ( B  <  0 ,  -u 1 ,  1 )  =  if ( ( N  <  0  /\  B  <  0
) ,  -u 1 ,  1 ) )
10198, 100oveq12d 5869 . . 3  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  N  <  0 )  -> 
( if ( A  <  0 ,  -u
1 ,  1 )  x.  if ( B  <  0 ,  -u
1 ,  1 ) )  =  ( if ( ( N  <  0  /\  A  <  0 ) ,  -u
1 ,  1 )  x.  if ( ( N  <  0  /\  B  <  0 ) ,  -u 1 ,  1 ) ) )
10293, 96, 1013eqtr3d 2211 . 2  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  N  <  0 )  ->  if ( ( N  <  0  /\  ( A  x.  B )  <  0 ) ,  -u
1 ,  1 )  =  ( if ( ( N  <  0  /\  A  <  0
) ,  -u 1 ,  1 )  x.  if ( ( N  <  0  /\  B  <  0 ) ,  -u
1 ,  1 ) ) )
103 simpr 109 . . . . . 6  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  N  <  0
)  ->  -.  N  <  0 )
104103intnanrd 927 . . . . 5  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  N  <  0
)  ->  -.  ( N  <  0  /\  ( A  x.  B )  <  0 ) )
105104iffalsed 3535 . . . 4  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  N  <  0
)  ->  if (
( N  <  0  /\  ( A  x.  B
)  <  0 ) ,  -u 1 ,  1 )  =  1 )
106 1t1e1 9023 . . . 4  |-  ( 1  x.  1 )  =  1
107105, 106eqtr4di 2221 . . 3  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  N  <  0
)  ->  if (
( N  <  0  /\  ( A  x.  B
)  <  0 ) ,  -u 1 ,  1 )  =  ( 1  x.  1 ) )
108103intnanrd 927 . . . . 5  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  N  <  0
)  ->  -.  ( N  <  0  /\  A  <  0 ) )
109108iffalsed 3535 . . . 4  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  N  <  0
)  ->  if (
( N  <  0  /\  A  <  0
) ,  -u 1 ,  1 )  =  1 )
110103intnanrd 927 . . . . 5  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  N  <  0
)  ->  -.  ( N  <  0  /\  B  <  0 ) )
111110iffalsed 3535 . . . 4  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  N  <  0
)  ->  if (
( N  <  0  /\  B  <  0
) ,  -u 1 ,  1 )  =  1 )
112109, 111oveq12d 5869 . . 3  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  N  <  0
)  ->  ( if ( ( N  <  0  /\  A  <  0 ) ,  -u
1 ,  1 )  x.  if ( ( N  <  0  /\  B  <  0 ) ,  -u 1 ,  1 ) )  =  ( 1  x.  1 ) )
113107, 112eqtr4d 2206 . 2  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  N  <  0
)  ->  if (
( N  <  0  /\  ( A  x.  B
)  <  0 ) ,  -u 1 ,  1 )  =  ( if ( ( N  <  0  /\  A  <  0 ) ,  -u
1 ,  1 )  x.  if ( ( N  <  0  /\  B  <  0 ) ,  -u 1 ,  1 ) ) )
114 simpl3 997 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  N  e.  ZZ )
115 zdclt 9282 . . . 4  |-  ( ( N  e.  ZZ  /\  0  e.  ZZ )  -> DECID  N  <  0 )
116114, 3, 115sylancl 411 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  -> DECID  N  <  0
)
117 exmiddc 831 . . 3  |-  (DECID  N  <  0  ->  ( N  <  0  \/  -.  N  <  0 ) )
118116, 117syl 14 . 2  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  ( N  <  0  \/  -.  N  <  0 ) )
119102, 113, 118mpjaodan 793 1  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  if ( ( N  <  0  /\  ( A  x.  B )  <  0 ) ,  -u
1 ,  1 )  =  ( if ( ( N  <  0  /\  A  <  0
) ,  -u 1 ,  1 )  x.  if ( ( N  <  0  /\  B  <  0 ) ,  -u
1 ,  1 ) ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 103    <-> wb 104    \/ wo 703  DECID wdc 829    \/ w3o 972    /\ w3a 973    = wceq 1348    e. wcel 2141    =/= wne 2340   ifcif 3525   class class class wbr 3987  (class class class)co 5851   CCcc 7765   RRcr 7766   0cc0 7767   1c1 7768    x. cmul 7772    < clt 7947    <_ cle 7948   -ucneg 8084   ZZcz 9205
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 609  ax-in2 610  ax-io 704  ax-5 1440  ax-7 1441  ax-gen 1442  ax-ie1 1486  ax-ie2 1487  ax-8 1497  ax-10 1498  ax-11 1499  ax-i12 1500  ax-bndl 1502  ax-4 1503  ax-17 1519  ax-i9 1523  ax-ial 1527  ax-i5r 1528  ax-13 2143  ax-14 2144  ax-ext 2152  ax-sep 4105  ax-pow 4158  ax-pr 4192  ax-un 4416  ax-setind 4519  ax-cnex 7858  ax-resscn 7859  ax-1cn 7860  ax-1re 7861  ax-icn 7862  ax-addcl 7863  ax-addrcl 7864  ax-mulcl 7865  ax-mulrcl 7866  ax-addcom 7867  ax-mulcom 7868  ax-addass 7869  ax-mulass 7870  ax-distr 7871  ax-i2m1 7872  ax-0lt1 7873  ax-1rid 7874  ax-0id 7875  ax-rnegex 7876  ax-precex 7877  ax-cnre 7878  ax-pre-ltirr 7879  ax-pre-ltwlin 7880  ax-pre-lttrn 7881  ax-pre-apti 7882  ax-pre-ltadd 7883  ax-pre-mulgt0 7884
This theorem depends on definitions:  df-bi 116  df-dc 830  df-3or 974  df-3an 975  df-tru 1351  df-fal 1354  df-nf 1454  df-sb 1756  df-eu 2022  df-mo 2023  df-clab 2157  df-cleq 2163  df-clel 2166  df-nfc 2301  df-ne 2341  df-nel 2436  df-ral 2453  df-rex 2454  df-reu 2455  df-rab 2457  df-v 2732  df-sbc 2956  df-dif 3123  df-un 3125  df-in 3127  df-ss 3134  df-if 3526  df-pw 3566  df-sn 3587  df-pr 3588  df-op 3590  df-uni 3795  df-int 3830  df-br 3988  df-opab 4049  df-id 4276  df-xp 4615  df-rel 4616  df-cnv 4617  df-co 4618  df-dm 4619  df-iota 5158  df-fun 5198  df-fv 5204  df-riota 5807  df-ov 5854  df-oprab 5855  df-mpo 5856  df-pnf 7949  df-mnf 7950  df-xr 7951  df-ltxr 7952  df-le 7953  df-sub 8085  df-neg 8086  df-reap 8487  df-ap 8494  df-inn 8872  df-n0 9129  df-z 9206
This theorem is referenced by:  lgsdir  13695  lgsdi  13697
  Copyright terms: Public domain W3C validator