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

Theorem lgsdilem 13722
Description: Lemma for lgsdi 13732 and lgsdir 13730: 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 9223 . . . . . . . . . . 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 9290 . . . . . . . . . . 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 9334 . . . . . . . . . . . . . . . 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 8299 . . . . . . . . . . . . . 14  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  -u A  e.  RR )
1211recnd 7948 . . . . . . . . . . . . 13  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  -u A  e.  CC )
1312mul01d 8312 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( -u A  x.  0 )  =  0 )
1410recnd 7948 . . . . . . . . . . . . 13  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  A  e.  CC )
154zred 9334 . . . . . . . . . . . . . . 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 7948 . . . . . . . . . . . . 13  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  B  e.  CC )
1814, 17mulneg1d 8330 . . . . . . . . . . . 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 4002 . . . . . . . . . . 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 7921 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
0  e.  RR )
219lt0neg1d 8434 . . . . . . . . . . . . 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 8772 . . . . . . . . . . . 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 7950 . . . . . . . . . . . . 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 8434 . . . . . . . . . . 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 7920 . . . . . . . . . 10  |-  0  e.  RR
31 lenlt 7995 . . . . . . . . . 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 3547 . . . . . . 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 9289 . . . . . . . . . . 11  |-  ( ( B  e.  ZZ  /\  0  e.  ZZ )  -> DECID  B  <  0 )
363, 35mpan2 423 . . . . . . . . . 10  |-  ( B  e.  ZZ  -> DECID  B  <  0
)
37 oveq2 5861 . . . . . . . . . . . . 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 9090 . . . . . . . . . . . . 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 5861 . . . . . . . . . . . . 13  |-  ( if ( B  <  0 ,  -u 1 ,  1 )  =  1  -> 
( -u 1  x.  if ( B  <  0 ,  -u 1 ,  1 ) )  =  (
-u 1  x.  1 ) )
41 ax-1cn 7867 . . . . . . . . . . . . . 14  |-  1  e.  CC
4241mulm1i 8322 . . . . . . . . . . . . 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 3538 . . . . . . . . . . 11  |-  (DECID  B  <  0  ->  ( -u 1  x.  if ( B  <  0 ,  -u 1 ,  1 ) )  =  if ( B  <  0 ,  1 ,  -u 1 ) )
45 ifnotdc 3562 . . . . . . . . . . 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 3531 . . . . . . . 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 5868 . . . . . 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 3534 . . . . . . . 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 5868 . . . . . 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 8983 . . . . . . . . 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 3561 . . . . . . 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 7938 . . . . . 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 7921 . . . . . . . . 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 9255 . . . . . . . . . . . . . . 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 8772 . . . . . . . . 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 7948 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  A  e.  CC )
8382mul01d 8312 . . . . . . . . 9  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( A  x.  0 )  =  0 )
8483breq2d 4001 . . . . . . . 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 3547 . . . . . 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 9289 . . . . . . 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 3547 . . 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 3547 . . . 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 3547 . . . 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 5871 . . 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 3536 . . . 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 9030 . . . 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 3536 . . . 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 3536 . . . 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 5871 . . 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 9289 . . . 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 3526   class class class wbr 3989  (class class class)co 5853   CCcc 7772   RRcr 7773   0cc0 7774   1c1 7775    x. cmul 7779    < clt 7954    <_ cle 7955   -ucneg 8091   ZZcz 9212
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 4107  ax-pow 4160  ax-pr 4194  ax-un 4418  ax-setind 4521  ax-cnex 7865  ax-resscn 7866  ax-1cn 7867  ax-1re 7868  ax-icn 7869  ax-addcl 7870  ax-addrcl 7871  ax-mulcl 7872  ax-mulrcl 7873  ax-addcom 7874  ax-mulcom 7875  ax-addass 7876  ax-mulass 7877  ax-distr 7878  ax-i2m1 7879  ax-0lt1 7880  ax-1rid 7881  ax-0id 7882  ax-rnegex 7883  ax-precex 7884  ax-cnre 7885  ax-pre-ltirr 7886  ax-pre-ltwlin 7887  ax-pre-lttrn 7888  ax-pre-apti 7889  ax-pre-ltadd 7890  ax-pre-mulgt0 7891
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 3527  df-pw 3568  df-sn 3589  df-pr 3590  df-op 3592  df-uni 3797  df-int 3832  df-br 3990  df-opab 4051  df-id 4278  df-xp 4617  df-rel 4618  df-cnv 4619  df-co 4620  df-dm 4621  df-iota 5160  df-fun 5200  df-fv 5206  df-riota 5809  df-ov 5856  df-oprab 5857  df-mpo 5858  df-pnf 7956  df-mnf 7957  df-xr 7958  df-ltxr 7959  df-le 7960  df-sub 8092  df-neg 8093  df-reap 8494  df-ap 8501  df-inn 8879  df-n0 9136  df-z 9213
This theorem is referenced by:  lgsdir  13730  lgsdi  13732
  Copyright terms: Public domain W3C validator