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

Theorem lgsdilem 13528
Description: Lemma for lgsdi 13538 and lgsdir 13536: 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 526 . . . . . . . . . . 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 9198 . . . . . . . . . . 11  |-  0  e.  ZZ
4 simpl2 991 . . . . . . . . . . . 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 9265 . . . . . . . . . . 11  |-  ( ( 0  e.  ZZ  /\  B  e.  ZZ )  ->  ( 0  <  B  <->  ( 0  <_  B  /\  B  =/=  0 ) ) )
73, 5, 6sylancr 411 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( 0  <  B  <->  ( 0  <_  B  /\  B  =/=  0 ) ) )
8 simpl1 990 . . . . . . . . . . . . . . . . 17  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  A  e.  ZZ )
98zred 9309 . . . . . . . . . . . . . . . 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 8274 . . . . . . . . . . . . . 14  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  -u A  e.  RR )
1211recnd 7923 . . . . . . . . . . . . 13  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  -u A  e.  CC )
1312mul01d 8287 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( -u A  x.  0 )  =  0 )
1410recnd 7923 . . . . . . . . . . . . 13  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  A  e.  CC )
154zred 9309 . . . . . . . . . . . . . . 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 7923 . . . . . . . . . . . . 13  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  B  e.  CC )
1814, 17mulneg1d 8305 . . . . . . . . . . . 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 3994 . . . . . . . . . . 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 7896 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
0  e.  RR )
219lt0neg1d 8409 . . . . . . . . . . . . 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 8747 . . . . . . . . . . . 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 1232 . . . . . . . . . . 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 7925 . . . . . . . . . . . . 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 8409 . . . . . . . . . . 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 7895 . . . . . . . . . 10  |-  0  e.  RR
31 lenlt 7970 . . . . . . . . . 10  |-  ( ( 0  e.  RR  /\  B  e.  RR )  ->  ( 0  <_  B  <->  -.  B  <  0 ) )
3230, 16, 31sylancr 411 . . . . . . . . 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 3540 . . . . . . 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 9264 . . . . . . . . . . 11  |-  ( ( B  e.  ZZ  /\  0  e.  ZZ )  -> DECID  B  <  0 )
363, 35mpan2 422 . . . . . . . . . 10  |-  ( B  e.  ZZ  -> DECID  B  <  0
)
37 oveq2 5849 . . . . . . . . . . . . 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 9065 . . . . . . . . . . . . 13  |-  ( -u
1  x.  -u 1
)  =  1
3937, 38eqtrdi 2214 . . . . . . . . . . . 12  |-  ( if ( B  <  0 ,  -u 1 ,  1 )  =  -u 1  ->  ( -u 1  x.  if ( B  <  0 ,  -u 1 ,  1 ) )  =  1 )
40 oveq2 5849 . . . . . . . . . . . . 13  |-  ( if ( B  <  0 ,  -u 1 ,  1 )  =  1  -> 
( -u 1  x.  if ( B  <  0 ,  -u 1 ,  1 ) )  =  (
-u 1  x.  1 ) )
41 ax-1cn 7842 . . . . . . . . . . . . . 14  |-  1  e.  CC
4241mulm1i 8297 . . . . . . . . . . . . 13  |-  ( -u
1  x.  1 )  =  -u 1
4340, 42eqtrdi 2214 . . . . . . . . . . . 12  |-  ( if ( B  <  0 ,  -u 1 ,  1 )  =  1  -> 
( -u 1  x.  if ( B  <  0 ,  -u 1 ,  1 ) )  =  -u
1 )
4439, 43ifsbdc 3531 . . . . . . . . . . 11  |-  (DECID  B  <  0  ->  ( -u 1  x.  if ( B  <  0 ,  -u 1 ,  1 ) )  =  if ( B  <  0 ,  1 ,  -u 1 ) )
45 ifnotdc 3555 . . . . . . . . . . 11  |-  (DECID  B  <  0  ->  if ( -.  B  <  0 ,  -u 1 ,  1 )  =  if ( B  <  0 ,  1 ,  -u 1
) )
4644, 45eqtr4d 2201 . . . . . . . . . 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 1009 . . . . . . . 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 480 . . . . . . 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 2201 . . . . . 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 3524 . . . . . . . 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 5856 . . . . . 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 2201 . . . . 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 3527 . . . . . . . 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 5856 . . . . . 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 8958 . . . . . . . . 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 410 . . . . . . . 8  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  -> DECID  B  <  0
)
6359, 60, 62ifcldcd 3554 . . . . . . 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 7913 . . . . . 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 7896 . . . . . . . . 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 525 . . . . . . . . . . 11  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  A  =/=  0 )
6968neneqd 2356 . . . . . . . . . 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 9230 . . . . . . . . . . . . . . 15  |-  ( ( A  e.  ZZ  /\  0  e.  ZZ )  ->  ( A  <  0  \/  A  =  0  \/  0  <  A ) )
7371, 3, 72sylancl 410 . . . . . . . . . . . . . 14  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( A  <  0  \/  A  =  0  \/  0  < 
A ) )
74 3orass 971 . . . . . . . . . . . . . 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 719 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( ( A  =  0  \/  0  <  A )  \/  A  <  0 ) )
7770, 76ecased 1339 . . . . . . . . . . 11  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( A  =  0  \/  0  <  A ) )
7877orcomd 719 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( 0  <  A  \/  A  =  0 ) )
7969, 78ecased 1339 . . . . . . . . 9  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  0  <  A )
80 ltmul2 8747 . . . . . . . . 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 1232 . . . . . . . 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 7923 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  A  e.  CC )
8382mul01d 8287 . . . . . . . . 9  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( A  x.  0 )  =  0 )
8483breq2d 3993 . . . . . . . 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 3540 . . . . . 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 2203 . . . . 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 9264 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  0  e.  ZZ )  -> DECID  A  <  0 )
898, 3, 88sylancl 410 . . . . . 6  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  -> DECID  A  <  0
)
90 exmiddc 826 . . . . . 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 788 . . . 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 3540 . . 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 3540 . . . 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 3540 . . . 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 5859 . . 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 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 ) ) )
103 simpr 109 . . . . . 6  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  N  <  0
)  ->  -.  N  <  0 )
104103intnanrd 922 . . . . 5  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  N  <  0
)  ->  -.  ( N  <  0  /\  ( A  x.  B )  <  0 ) )
105104iffalsed 3529 . . . 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 9005 . . . 4  |-  ( 1  x.  1 )  =  1
107105, 106eqtr4di 2216 . . 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 922 . . . . 5  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  N  <  0
)  ->  -.  ( N  <  0  /\  A  <  0 ) )
109108iffalsed 3529 . . . 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 922 . . . . 5  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  N  <  0
)  ->  -.  ( N  <  0  /\  B  <  0 ) )
111110iffalsed 3529 . . . 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 5859 . . 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 2201 . 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 992 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  N  e.  ZZ )
115 zdclt 9264 . . . 4  |-  ( ( N  e.  ZZ  /\  0  e.  ZZ )  -> DECID  N  <  0 )
116114, 3, 115sylancl 410 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  -> DECID  N  <  0
)
117 exmiddc 826 . . 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 788 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 698  DECID wdc 824    \/ w3o 967    /\ w3a 968    = wceq 1343    e. wcel 2136    =/= wne 2335   ifcif 3519   class class class wbr 3981  (class class class)co 5841   CCcc 7747   RRcr 7748   0cc0 7749   1c1 7750    x. cmul 7754    < clt 7929    <_ cle 7930   -ucneg 8066   ZZcz 9187
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 604  ax-in2 605  ax-io 699  ax-5 1435  ax-7 1436  ax-gen 1437  ax-ie1 1481  ax-ie2 1482  ax-8 1492  ax-10 1493  ax-11 1494  ax-i12 1495  ax-bndl 1497  ax-4 1498  ax-17 1514  ax-i9 1518  ax-ial 1522  ax-i5r 1523  ax-13 2138  ax-14 2139  ax-ext 2147  ax-sep 4099  ax-pow 4152  ax-pr 4186  ax-un 4410  ax-setind 4513  ax-cnex 7840  ax-resscn 7841  ax-1cn 7842  ax-1re 7843  ax-icn 7844  ax-addcl 7845  ax-addrcl 7846  ax-mulcl 7847  ax-mulrcl 7848  ax-addcom 7849  ax-mulcom 7850  ax-addass 7851  ax-mulass 7852  ax-distr 7853  ax-i2m1 7854  ax-0lt1 7855  ax-1rid 7856  ax-0id 7857  ax-rnegex 7858  ax-precex 7859  ax-cnre 7860  ax-pre-ltirr 7861  ax-pre-ltwlin 7862  ax-pre-lttrn 7863  ax-pre-apti 7864  ax-pre-ltadd 7865  ax-pre-mulgt0 7866
This theorem depends on definitions:  df-bi 116  df-dc 825  df-3or 969  df-3an 970  df-tru 1346  df-fal 1349  df-nf 1449  df-sb 1751  df-eu 2017  df-mo 2018  df-clab 2152  df-cleq 2158  df-clel 2161  df-nfc 2296  df-ne 2336  df-nel 2431  df-ral 2448  df-rex 2449  df-reu 2450  df-rab 2452  df-v 2727  df-sbc 2951  df-dif 3117  df-un 3119  df-in 3121  df-ss 3128  df-if 3520  df-pw 3560  df-sn 3581  df-pr 3582  df-op 3584  df-uni 3789  df-int 3824  df-br 3982  df-opab 4043  df-id 4270  df-xp 4609  df-rel 4610  df-cnv 4611  df-co 4612  df-dm 4613  df-iota 5152  df-fun 5189  df-fv 5195  df-riota 5797  df-ov 5844  df-oprab 5845  df-mpo 5846  df-pnf 7931  df-mnf 7932  df-xr 7933  df-ltxr 7934  df-le 7935  df-sub 8067  df-neg 8068  df-reap 8469  df-ap 8476  df-inn 8854  df-n0 9111  df-z 9188
This theorem is referenced by:  lgsdir  13536  lgsdi  13538
  Copyright terms: Public domain W3C validator