MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  lgsdilem Unicode version

Theorem lgsdilem 20577
Description: Lemma for lgsdi 20587 and lgsdir 20585: 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 737 . . . . . . . . . . 11  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  B  =/=  0 )
21biantrud 493 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( 0  <_  B  <->  ( 0  <_  B  /\  B  =/=  0 ) ) )
3 0re 8854 . . . . . . . . . . 11  |-  0  e.  RR
4 simpl2 959 . . . . . . . . . . . . 13  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  B  e.  ZZ )
54zred 10133 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  B  e.  RR )
65adantr 451 . . . . . . . . . . 11  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  B  e.  RR )
7 ltlen 8938 . . . . . . . . . . 11  |-  ( ( 0  e.  RR  /\  B  e.  RR )  ->  ( 0  <  B  <->  ( 0  <_  B  /\  B  =/=  0 ) ) )
83, 6, 7sylancr 644 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( 0  <  B  <->  ( 0  <_  B  /\  B  =/=  0 ) ) )
9 simpl1 958 . . . . . . . . . . . . . . . . 17  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  A  e.  ZZ )
109zred 10133 . . . . . . . . . . . . . . . 16  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  A  e.  RR )
1110adantr 451 . . . . . . . . . . . . . . 15  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  A  e.  RR )
1211renegcld 9226 . . . . . . . . . . . . . 14  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  -u A  e.  RR )
1312recnd 8877 . . . . . . . . . . . . 13  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  -u A  e.  CC )
1413mul01d 9027 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( -u A  x.  0 )  =  0 )
1511recnd 8877 . . . . . . . . . . . . 13  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  A  e.  CC )
166recnd 8877 . . . . . . . . . . . . 13  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  B  e.  CC )
1715, 16mulneg1d 9248 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( -u A  x.  B
)  =  -u ( A  x.  B )
)
1814, 17breq12d 4052 . . . . . . . . . . 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 )
) )
193a1i 10 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
0  e.  RR )
2010lt0neg1d 9358 . . . . . . . . . . . . 13  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  ( A  <  0  <->  0  <  -u A ) )
2120biimpa 470 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
0  <  -u A )
22 ltmul2 9623 . . . . . . . . . . . 12  |-  ( ( 0  e.  RR  /\  B  e.  RR  /\  ( -u A  e.  RR  /\  0  <  -u A ) )  ->  ( 0  < 
B  <->  ( -u A  x.  0 )  <  ( -u A  x.  B ) ) )
2319, 6, 12, 21, 22syl112anc 1186 . . . . . . . . . . 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 )
) )
2410, 5remulcld 8879 . . . . . . . . . . . . 13  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  ( A  x.  B )  e.  RR )
2524adantr 451 . . . . . . . . . . . 12  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( A  x.  B
)  e.  RR )
2625lt0neg1d 9358 . . . . . . . . . . 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 ) ) )
2718, 23, 263bitr4d 276 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( 0  <  B  <->  ( A  x.  B )  <  0 ) )
282, 8, 273bitr2rd 273 . . . . . . . . 9  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( ( A  x.  B )  <  0  <->  0  <_  B ) )
29 lenlt 8917 . . . . . . . . . 10  |-  ( ( 0  e.  RR  /\  B  e.  RR )  ->  ( 0  <_  B  <->  -.  B  <  0 ) )
303, 6, 29sylancr 644 . . . . . . . . 9  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( 0  <_  B  <->  -.  B  <  0 ) )
3128, 30bitrd 244 . . . . . . . 8  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  -> 
( ( A  x.  B )  <  0  <->  -.  B  <  0 ) )
3231ifbid 3596 . . . . . . 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 ) )
33 oveq2 5882 . . . . . . . . . 10  |-  ( if ( B  <  0 ,  -u 1 ,  1 )  =  -u 1  ->  ( -u 1  x.  if ( B  <  0 ,  -u 1 ,  1 ) )  =  ( -u 1  x.  -u 1 ) )
34 neg1cn 9829 . . . . . . . . . . . 12  |-  -u 1  e.  CC
3534mulm1i 9240 . . . . . . . . . . 11  |-  ( -u
1  x.  -u 1
)  =  -u -u 1
36 ax-1cn 8811 . . . . . . . . . . . 12  |-  1  e.  CC
3736negnegi 9132 . . . . . . . . . . 11  |-  -u -u 1  =  1
3835, 37eqtri 2316 . . . . . . . . . 10  |-  ( -u
1  x.  -u 1
)  =  1
3933, 38syl6eq 2344 . . . . . . . . 9  |-  ( if ( B  <  0 ,  -u 1 ,  1 )  =  -u 1  ->  ( -u 1  x.  if ( B  <  0 ,  -u 1 ,  1 ) )  =  1 )
40 oveq2 5882 . . . . . . . . . 10  |-  ( if ( B  <  0 ,  -u 1 ,  1 )  =  1  -> 
( -u 1  x.  if ( B  <  0 ,  -u 1 ,  1 ) )  =  (
-u 1  x.  1 ) )
4136mulm1i 9240 . . . . . . . . . 10  |-  ( -u
1  x.  1 )  =  -u 1
4240, 41syl6eq 2344 . . . . . . . . 9  |-  ( if ( B  <  0 ,  -u 1 ,  1 )  =  1  -> 
( -u 1  x.  if ( B  <  0 ,  -u 1 ,  1 ) )  =  -u
1 )
4339, 42ifsb 3587 . . . . . . . 8  |-  ( -u
1  x.  if ( B  <  0 , 
-u 1 ,  1 ) )  =  if ( B  <  0 ,  1 ,  -u
1 )
44 ifnot 3616 . . . . . . . 8  |-  if ( -.  B  <  0 ,  -u 1 ,  1 )  =  if ( B  <  0 ,  1 ,  -u 1
)
4543, 44eqtr4i 2319 . . . . . . 7  |-  ( -u
1  x.  if ( B  <  0 , 
-u 1 ,  1 ) )  =  if ( -.  B  <  0 ,  -u 1 ,  1 )
4632, 45syl6eqr 2346 . . . . . 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 ) ) )
47 iftrue 3584 . . . . . . . 8  |-  ( A  <  0  ->  if ( A  <  0 ,  -u 1 ,  1 )  =  -u 1
)
4847adantl 452 . . . . . . 7  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  A  <  0 )  ->  if ( A  <  0 ,  -u 1 ,  1 )  =  -u 1
)
4948oveq1d 5889 . . . . . 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 ) ) )
5046, 49eqtr4d 2331 . . . . 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 ) ) )
51 iffalse 3585 . . . . . . . 8  |-  ( -.  A  <  0  ->  if ( A  <  0 ,  -u 1 ,  1 )  =  1 )
5251adantl 452 . . . . . . 7  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  if ( A  <  0 ,  -u
1 ,  1 )  =  1 )
5352oveq1d 5889 . . . . . 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 ) ) )
5434, 36keepel 3635 . . . . . . . 8  |-  if ( B  <  0 , 
-u 1 ,  1 )  e.  CC
5554mulid2i 8856 . . . . . . 7  |-  ( 1  x.  if ( B  <  0 ,  -u
1 ,  1 ) )  =  if ( B  <  0 , 
-u 1 ,  1 )
565adantr 451 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  B  e.  RR )
573a1i 10 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  0  e.  RR )
5810adantr 451 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  A  e.  RR )
59 lenlt 8917 . . . . . . . . . . . . 13  |-  ( ( 0  e.  RR  /\  A  e.  RR )  ->  ( 0  <_  A  <->  -.  A  <  0 ) )
603, 10, 59sylancr 644 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0
) )  ->  (
0  <_  A  <->  -.  A  <  0 ) )
6160biimpar 471 . . . . . . . . . . 11  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  0  <_  A )
62 simplrl 736 . . . . . . . . . . 11  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  A  =/=  0 )
6358, 61, 62ne0gt0d 8972 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  0  <  A )
64 ltmul2 9623 . . . . . . . . . 10  |-  ( ( B  e.  RR  /\  0  e.  RR  /\  ( A  e.  RR  /\  0  <  A ) )  -> 
( B  <  0  <->  ( A  x.  B )  <  ( A  x.  0 ) ) )
6556, 57, 58, 63, 64syl112anc 1186 . . . . . . . . 9  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( B  <  0  <->  ( A  x.  B )  <  ( A  x.  0 ) ) )
6658recnd 8877 . . . . . . . . . . 11  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  A  e.  CC )
6766mul01d 9027 . . . . . . . . . 10  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( A  x.  0 )  =  0 )
6867breq2d 4051 . . . . . . . . 9  |-  ( ( ( ( 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
) )
6965, 68bitrd 244 . . . . . . . 8  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  A  <  0
)  ->  ( B  <  0  <->  ( A  x.  B )  <  0
) )
7069ifbid 3596 . . . . . . 7  |-  ( ( ( ( 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 ) )
7155, 70syl5eq 2340 . . . . . 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 ( ( A  x.  B
)  <  0 ,  -u 1 ,  1 ) )
7253, 71eqtr2d 2329 . . . . 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 ) ) )
7350, 72pm2.61dan 766 . . . 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 ) ) )
7473adantr 451 . . 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 ) ) )
75 simpr 447 . . . . 5  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  N  <  0 )  ->  N  <  0 )
7675biantrurd 494 . . . 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 ) ) )
7776ifbid 3596 . . 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 ) )
7875biantrurd 494 . . . . 5  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  N  <  0 )  -> 
( A  <  0  <->  ( N  <  0  /\  A  <  0 ) ) )
7978ifbid 3596 . . . 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 ) )
8075biantrurd 494 . . . . 5  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  N  <  0 )  -> 
( B  <  0  <->  ( N  <  0  /\  B  <  0 ) ) )
8180ifbid 3596 . . . 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 ) )
8279, 81oveq12d 5892 . . 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 ) ) )
8374, 77, 823eqtr3d 2336 . 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 ) ) )
84 simpr 447 . . . . . 6  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  N  <  0
)  ->  -.  N  <  0 )
8584intnanrd 883 . . . . 5  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  N  <  0
)  ->  -.  ( N  <  0  /\  ( A  x.  B )  <  0 ) )
86 iffalse 3585 . . . . 5  |-  ( -.  ( N  <  0  /\  ( A  x.  B
)  <  0 )  ->  if ( ( N  <  0  /\  ( A  x.  B
)  <  0 ) ,  -u 1 ,  1 )  =  1 )
8785, 86syl 15 . . . 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 )
88 1t1e1 9886 . . . 4  |-  ( 1  x.  1 )  =  1
8987, 88syl6eqr 2346 . . 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 ) )
9084intnanrd 883 . . . . 5  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  N  <  0
)  ->  -.  ( N  <  0  /\  A  <  0 ) )
91 iffalse 3585 . . . . 5  |-  ( -.  ( N  <  0  /\  A  <  0
)  ->  if (
( N  <  0  /\  A  <  0
) ,  -u 1 ,  1 )  =  1 )
9290, 91syl 15 . . . 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 )
9384intnanrd 883 . . . . 5  |-  ( ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  N  e.  ZZ )  /\  ( A  =/=  0  /\  B  =/=  0 ) )  /\  -.  N  <  0
)  ->  -.  ( N  <  0  /\  B  <  0 ) )
94 iffalse 3585 . . . . 5  |-  ( -.  ( N  <  0  /\  B  <  0
)  ->  if (
( N  <  0  /\  B  <  0
) ,  -u 1 ,  1 )  =  1 )
9593, 94syl 15 . . . 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 )
9692, 95oveq12d 5892 . . 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 ) )
9789, 96eqtr4d 2331 . 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 ) ) )
9883, 97pm2.61dan 766 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    <-> wb 176    /\ wa 358    /\ w3a 934    = wceq 1632    e. wcel 1696    =/= wne 2459   ifcif 3578   class class class wbr 4039  (class class class)co 5874   CCcc 8751   RRcr 8752   0cc0 8753   1c1 8754    x. cmul 8758    < clt 8883    <_ cle 8884   -ucneg 9054   ZZcz 10040
This theorem is referenced by:  lgsdir  20585  lgsdi  20587
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1536  ax-5 1547  ax-17 1606  ax-9 1644  ax-8 1661  ax-13 1698  ax-14 1700  ax-6 1715  ax-7 1720  ax-11 1727  ax-12 1878  ax-ext 2277  ax-sep 4157  ax-nul 4165  ax-pow 4204  ax-pr 4230  ax-un 4528  ax-resscn 8810  ax-1cn 8811  ax-icn 8812  ax-addcl 8813  ax-addrcl 8814  ax-mulcl 8815  ax-mulrcl 8816  ax-mulcom 8817  ax-addass 8818  ax-mulass 8819  ax-distr 8820  ax-i2m1 8821  ax-1ne0 8822  ax-1rid 8823  ax-rnegex 8824  ax-rrecex 8825  ax-cnre 8826  ax-pre-lttri 8827  ax-pre-lttrn 8828  ax-pre-ltadd 8829  ax-pre-mulgt0 8830
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1532  df-nf 1535  df-sb 1639  df-eu 2160  df-mo 2161  df-clab 2283  df-cleq 2289  df-clel 2292  df-nfc 2421  df-ne 2461  df-nel 2462  df-ral 2561  df-rex 2562  df-reu 2563  df-rab 2565  df-v 2803  df-sbc 3005  df-csb 3095  df-dif 3168  df-un 3170  df-in 3172  df-ss 3179  df-nul 3469  df-if 3579  df-pw 3640  df-sn 3659  df-pr 3660  df-op 3662  df-uni 3844  df-br 4040  df-opab 4094  df-mpt 4095  df-id 4325  df-po 4330  df-so 4331  df-xp 4711  df-rel 4712  df-cnv 4713  df-co 4714  df-dm 4715  df-rn 4716  df-res 4717  df-ima 4718  df-iota 5235  df-fun 5273  df-fn 5274  df-f 5275  df-f1 5276  df-fo 5277  df-f1o 5278  df-fv 5279  df-ov 5877  df-oprab 5878  df-mpt2 5879  df-riota 6320  df-er 6676  df-en 6880  df-dom 6881  df-sdom 6882  df-pnf 8885  df-mnf 8886  df-xr 8887  df-ltxr 8888  df-le 8889  df-sub 9055  df-neg 9056  df-z 10041
  Copyright terms: Public domain W3C validator