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

Theorem lgsdir2lem5 13727
Description: Lemma for lgsdir2 13728. (Contributed by Mario Carneiro, 4-Feb-2015.)
Assertion
Ref Expression
lgsdir2lem5  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  e. 
{ 3 ,  5 }  /\  ( B  mod  8 )  e. 
{ 3 ,  5 } ) )  -> 
( ( A  x.  B )  mod  8
)  e.  { 1 ,  7 } )

Proof of Theorem lgsdir2lem5
StepHypRef Expression
1 8nn 9045 . . . . . . . . 9  |-  8  e.  NN
2 zmodcl 10300 . . . . . . . . 9  |-  ( ( A  e.  ZZ  /\  8  e.  NN )  ->  ( A  mod  8
)  e.  NN0 )
31, 2mpan2 423 . . . . . . . 8  |-  ( A  e.  ZZ  ->  ( A  mod  8 )  e. 
NN0 )
43adantr 274 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( A  mod  8
)  e.  NN0 )
5 elprg 3603 . . . . . . 7  |-  ( ( A  mod  8 )  e.  NN0  ->  ( ( A  mod  8 )  e.  { 3 ,  5 }  <->  ( ( A  mod  8 )  =  3  \/  ( A  mod  8 )  =  5 ) ) )
64, 5syl 14 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( A  mod  8 )  e.  {
3 ,  5 }  <-> 
( ( A  mod  8 )  =  3  \/  ( A  mod  8 )  =  5 ) ) )
7 zmodcl 10300 . . . . . . . . 9  |-  ( ( B  e.  ZZ  /\  8  e.  NN )  ->  ( B  mod  8
)  e.  NN0 )
81, 7mpan2 423 . . . . . . . 8  |-  ( B  e.  ZZ  ->  ( B  mod  8 )  e. 
NN0 )
98adantl 275 . . . . . . 7  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( B  mod  8
)  e.  NN0 )
10 elprg 3603 . . . . . . 7  |-  ( ( B  mod  8 )  e.  NN0  ->  ( ( B  mod  8 )  e.  { 3 ,  5 }  <->  ( ( B  mod  8 )  =  3  \/  ( B  mod  8 )  =  5 ) ) )
119, 10syl 14 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( B  mod  8 )  e.  {
3 ,  5 }  <-> 
( ( B  mod  8 )  =  3  \/  ( B  mod  8 )  =  5 ) ) )
126, 11anbi12d 470 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( ( A  mod  8 )  e. 
{ 3 ,  5 }  /\  ( B  mod  8 )  e. 
{ 3 ,  5 } )  <->  ( (
( A  mod  8
)  =  3  \/  ( A  mod  8
)  =  5 )  /\  ( ( B  mod  8 )  =  3  \/  ( B  mod  8 )  =  5 ) ) ) )
13 simpll 524 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  3 ) )  ->  A  e.  ZZ )
14 3z 9241 . . . . . . . . . 10  |-  3  e.  ZZ
1514a1i 9 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  3 ) )  -> 
3  e.  ZZ )
16 simplr 525 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  3 ) )  ->  B  e.  ZZ )
17 nnq 9592 . . . . . . . . . . 11  |-  ( 8  e.  NN  ->  8  e.  QQ )
181, 17ax-mp 5 . . . . . . . . . 10  |-  8  e.  QQ
1918a1i 9 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  3 ) )  -> 
8  e.  QQ )
20 8pos 8981 . . . . . . . . . 10  |-  0  <  8
2120a1i 9 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  3 ) )  -> 
0  <  8 )
22 simprl 526 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  3 ) )  -> 
( A  mod  8
)  =  3 )
23 lgsdir2lem1 13723 . . . . . . . . . . . 12  |-  ( ( ( 1  mod  8
)  =  1  /\  ( -u 1  mod  8 )  =  7 )  /\  ( ( 3  mod  8 )  =  3  /\  ( -u 3  mod  8 )  =  5 ) )
2423simpri 112 . . . . . . . . . . 11  |-  ( ( 3  mod  8 )  =  3  /\  ( -u 3  mod  8 )  =  5 )
2524simpli 110 . . . . . . . . . 10  |-  ( 3  mod  8 )  =  3
2622, 25eqtr4di 2221 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  3 ) )  -> 
( A  mod  8
)  =  ( 3  mod  8 ) )
27 simprr 527 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  3 ) )  -> 
( B  mod  8
)  =  3 )
2827, 25eqtr4di 2221 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  3 ) )  -> 
( B  mod  8
)  =  ( 3  mod  8 ) )
2913, 15, 16, 15, 19, 21, 26, 28modqmul12d 10334 . . . . . . . 8  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  3 ) )  -> 
( ( A  x.  B )  mod  8
)  =  ( ( 3  x.  3 )  mod  8 ) )
3029orcd 728 . . . . . . 7  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  3 ) )  -> 
( ( ( A  x.  B )  mod  8 )  =  ( ( 3  x.  3 )  mod  8 )  \/  ( ( A  x.  B )  mod  8 )  =  (
-u ( 3  x.  3 )  mod  8
) ) )
3130ex 114 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  3 )  ->  (
( ( A  x.  B )  mod  8
)  =  ( ( 3  x.  3 )  mod  8 )  \/  ( ( A  x.  B )  mod  8
)  =  ( -u ( 3  x.  3 )  mod  8 ) ) ) )
32 simpll 524 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  3 ) )  ->  A  e.  ZZ )
33 znegcl 9243 . . . . . . . . . . 11  |-  ( 3  e.  ZZ  ->  -u 3  e.  ZZ )
3414, 33mp1i 10 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  3 ) )  ->  -u 3  e.  ZZ )
35 simplr 525 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  3 ) )  ->  B  e.  ZZ )
3614a1i 9 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  3 ) )  -> 
3  e.  ZZ )
3718a1i 9 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  3 ) )  -> 
8  e.  QQ )
3820a1i 9 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  3 ) )  -> 
0  <  8 )
39 simprl 526 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  3 ) )  -> 
( A  mod  8
)  =  5 )
4024simpri 112 . . . . . . . . . . 11  |-  ( -u
3  mod  8 )  =  5
4139, 40eqtr4di 2221 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  3 ) )  -> 
( A  mod  8
)  =  ( -u
3  mod  8 ) )
42 simprr 527 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  3 ) )  -> 
( B  mod  8
)  =  3 )
4342, 25eqtr4di 2221 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  3 ) )  -> 
( B  mod  8
)  =  ( 3  mod  8 ) )
4432, 34, 35, 36, 37, 38, 41, 43modqmul12d 10334 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  3 ) )  -> 
( ( A  x.  B )  mod  8
)  =  ( (
-u 3  x.  3 )  mod  8 ) )
45 3cn 8953 . . . . . . . . . . 11  |-  3  e.  CC
4645, 45mulneg1i 8323 . . . . . . . . . 10  |-  ( -u
3  x.  3 )  =  -u ( 3  x.  3 )
4746oveq1i 5863 . . . . . . . . 9  |-  ( (
-u 3  x.  3 )  mod  8 )  =  ( -u (
3  x.  3 )  mod  8 )
4844, 47eqtrdi 2219 . . . . . . . 8  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  3 ) )  -> 
( ( A  x.  B )  mod  8
)  =  ( -u ( 3  x.  3 )  mod  8 ) )
4948olcd 729 . . . . . . 7  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  3 ) )  -> 
( ( ( A  x.  B )  mod  8 )  =  ( ( 3  x.  3 )  mod  8 )  \/  ( ( A  x.  B )  mod  8 )  =  (
-u ( 3  x.  3 )  mod  8
) ) )
5049ex 114 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  3 )  ->  (
( ( A  x.  B )  mod  8
)  =  ( ( 3  x.  3 )  mod  8 )  \/  ( ( A  x.  B )  mod  8
)  =  ( -u ( 3  x.  3 )  mod  8 ) ) ) )
51 simpll 524 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  5 ) )  ->  A  e.  ZZ )
5214a1i 9 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  5 ) )  -> 
3  e.  ZZ )
53 simplr 525 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  5 ) )  ->  B  e.  ZZ )
5414, 33mp1i 10 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  5 ) )  ->  -u 3  e.  ZZ )
5518a1i 9 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  5 ) )  -> 
8  e.  QQ )
5620a1i 9 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  5 ) )  -> 
0  <  8 )
57 simprl 526 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  5 ) )  -> 
( A  mod  8
)  =  3 )
5857, 25eqtr4di 2221 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  5 ) )  -> 
( A  mod  8
)  =  ( 3  mod  8 ) )
59 simprr 527 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  5 ) )  -> 
( B  mod  8
)  =  5 )
6059, 40eqtr4di 2221 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  5 ) )  -> 
( B  mod  8
)  =  ( -u
3  mod  8 ) )
6151, 52, 53, 54, 55, 56, 58, 60modqmul12d 10334 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  5 ) )  -> 
( ( A  x.  B )  mod  8
)  =  ( ( 3  x.  -u 3
)  mod  8 ) )
6245, 45mulneg2i 8324 . . . . . . . . . 10  |-  ( 3  x.  -u 3 )  = 
-u ( 3  x.  3 )
6362oveq1i 5863 . . . . . . . . 9  |-  ( ( 3  x.  -u 3
)  mod  8 )  =  ( -u (
3  x.  3 )  mod  8 )
6461, 63eqtrdi 2219 . . . . . . . 8  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  5 ) )  -> 
( ( A  x.  B )  mod  8
)  =  ( -u ( 3  x.  3 )  mod  8 ) )
6564olcd 729 . . . . . . 7  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  5 ) )  -> 
( ( ( A  x.  B )  mod  8 )  =  ( ( 3  x.  3 )  mod  8 )  \/  ( ( A  x.  B )  mod  8 )  =  (
-u ( 3  x.  3 )  mod  8
) ) )
6665ex 114 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  5 )  ->  (
( ( A  x.  B )  mod  8
)  =  ( ( 3  x.  3 )  mod  8 )  \/  ( ( A  x.  B )  mod  8
)  =  ( -u ( 3  x.  3 )  mod  8 ) ) ) )
67 simpll 524 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  5 ) )  ->  A  e.  ZZ )
6814, 33mp1i 10 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  5 ) )  ->  -u 3  e.  ZZ )
69 simplr 525 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  5 ) )  ->  B  e.  ZZ )
7018a1i 9 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  5 ) )  -> 
8  e.  QQ )
7120a1i 9 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  5 ) )  -> 
0  <  8 )
72 simprl 526 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  5 ) )  -> 
( A  mod  8
)  =  5 )
7372, 40eqtr4di 2221 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  5 ) )  -> 
( A  mod  8
)  =  ( -u
3  mod  8 ) )
74 simprr 527 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  5 ) )  -> 
( B  mod  8
)  =  5 )
7574, 40eqtr4di 2221 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  5 ) )  -> 
( B  mod  8
)  =  ( -u
3  mod  8 ) )
7667, 68, 69, 68, 70, 71, 73, 75modqmul12d 10334 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  5 ) )  -> 
( ( A  x.  B )  mod  8
)  =  ( (
-u 3  x.  -u 3
)  mod  8 ) )
7745, 45mul2negi 8325 . . . . . . . . . 10  |-  ( -u
3  x.  -u 3
)  =  ( 3  x.  3 )
7877oveq1i 5863 . . . . . . . . 9  |-  ( (
-u 3  x.  -u 3
)  mod  8 )  =  ( ( 3  x.  3 )  mod  8 )
7976, 78eqtrdi 2219 . . . . . . . 8  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  5 ) )  -> 
( ( A  x.  B )  mod  8
)  =  ( ( 3  x.  3 )  mod  8 ) )
8079orcd 728 . . . . . . 7  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  5 ) )  -> 
( ( ( A  x.  B )  mod  8 )  =  ( ( 3  x.  3 )  mod  8 )  \/  ( ( A  x.  B )  mod  8 )  =  (
-u ( 3  x.  3 )  mod  8
) ) )
8180ex 114 . . . . . 6  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  5 )  ->  (
( ( A  x.  B )  mod  8
)  =  ( ( 3  x.  3 )  mod  8 )  \/  ( ( A  x.  B )  mod  8
)  =  ( -u ( 3  x.  3 )  mod  8 ) ) ) )
8231, 50, 66, 81ccased 960 . . . . 5  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( ( ( A  mod  8 )  =  3  \/  ( A  mod  8 )  =  5 )  /\  (
( B  mod  8
)  =  3  \/  ( B  mod  8
)  =  5 ) )  ->  ( (
( A  x.  B
)  mod  8 )  =  ( ( 3  x.  3 )  mod  8 )  \/  (
( A  x.  B
)  mod  8 )  =  ( -u (
3  x.  3 )  mod  8 ) ) ) )
8312, 82sylbid 149 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( ( A  mod  8 )  e. 
{ 3 ,  5 }  /\  ( B  mod  8 )  e. 
{ 3 ,  5 } )  ->  (
( ( A  x.  B )  mod  8
)  =  ( ( 3  x.  3 )  mod  8 )  \/  ( ( A  x.  B )  mod  8
)  =  ( -u ( 3  x.  3 )  mod  8 ) ) ) )
8483imp 123 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  e. 
{ 3 ,  5 }  /\  ( B  mod  8 )  e. 
{ 3 ,  5 } ) )  -> 
( ( ( A  x.  B )  mod  8 )  =  ( ( 3  x.  3 )  mod  8 )  \/  ( ( A  x.  B )  mod  8 )  =  (
-u ( 3  x.  3 )  mod  8
) ) )
85 simpll 524 . . . . . 6  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  e. 
{ 3 ,  5 }  /\  ( B  mod  8 )  e. 
{ 3 ,  5 } ) )  ->  A  e.  ZZ )
86 simplr 525 . . . . . 6  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  e. 
{ 3 ,  5 }  /\  ( B  mod  8 )  e. 
{ 3 ,  5 } ) )  ->  B  e.  ZZ )
8785, 86zmulcld 9340 . . . . 5  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  e. 
{ 3 ,  5 }  /\  ( B  mod  8 )  e. 
{ 3 ,  5 } ) )  -> 
( A  x.  B
)  e.  ZZ )
881a1i 9 . . . . 5  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  e. 
{ 3 ,  5 }  /\  ( B  mod  8 )  e. 
{ 3 ,  5 } ) )  -> 
8  e.  NN )
8987, 88zmodcld 10301 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  e. 
{ 3 ,  5 }  /\  ( B  mod  8 )  e. 
{ 3 ,  5 } ) )  -> 
( ( A  x.  B )  mod  8
)  e.  NN0 )
90 elprg 3603 . . . 4  |-  ( ( ( A  x.  B
)  mod  8 )  e.  NN0  ->  ( ( ( A  x.  B
)  mod  8 )  e.  { ( ( 3  x.  3 )  mod  8 ) ,  ( -u ( 3  x.  3 )  mod  8 ) }  <->  ( (
( A  x.  B
)  mod  8 )  =  ( ( 3  x.  3 )  mod  8 )  \/  (
( A  x.  B
)  mod  8 )  =  ( -u (
3  x.  3 )  mod  8 ) ) ) )
9189, 90syl 14 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  e. 
{ 3 ,  5 }  /\  ( B  mod  8 )  e. 
{ 3 ,  5 } ) )  -> 
( ( ( A  x.  B )  mod  8 )  e.  {
( ( 3  x.  3 )  mod  8
) ,  ( -u ( 3  x.  3 )  mod  8 ) }  <->  ( ( ( A  x.  B )  mod  8 )  =  ( ( 3  x.  3 )  mod  8
)  \/  ( ( A  x.  B )  mod  8 )  =  ( -u ( 3  x.  3 )  mod  8 ) ) ) )
9284, 91mpbird 166 . 2  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  e. 
{ 3 ,  5 }  /\  ( B  mod  8 )  e. 
{ 3 ,  5 } ) )  -> 
( ( A  x.  B )  mod  8
)  e.  { ( ( 3  x.  3 )  mod  8 ) ,  ( -u (
3  x.  3 )  mod  8 ) } )
93 df-9 8944 . . . . . . . 8  |-  9  =  ( 8  +  1 )
94 8cn 8964 . . . . . . . . 9  |-  8  e.  CC
95 ax-1cn 7867 . . . . . . . . 9  |-  1  e.  CC
9694, 95addcomi 8063 . . . . . . . 8  |-  ( 8  +  1 )  =  ( 1  +  8 )
9793, 96eqtri 2191 . . . . . . 7  |-  9  =  ( 1  +  8 )
98 3t3e9 9035 . . . . . . 7  |-  ( 3  x.  3 )  =  9
9994mulid2i 7923 . . . . . . . 8  |-  ( 1  x.  8 )  =  8
10099oveq2i 5864 . . . . . . 7  |-  ( 1  +  ( 1  x.  8 ) )  =  ( 1  +  8 )
10197, 98, 1003eqtr4i 2201 . . . . . 6  |-  ( 3  x.  3 )  =  ( 1  +  ( 1  x.  8 ) )
102101oveq1i 5863 . . . . 5  |-  ( ( 3  x.  3 )  mod  8 )  =  ( ( 1  +  ( 1  x.  8 ) )  mod  8
)
103 1nn 8889 . . . . . . 7  |-  1  e.  NN
104 nnq 9592 . . . . . . 7  |-  ( 1  e.  NN  ->  1  e.  QQ )
105103, 104ax-mp 5 . . . . . 6  |-  1  e.  QQ
106 1z 9238 . . . . . 6  |-  1  e.  ZZ
107 modqcyc 10315 . . . . . 6  |-  ( ( ( 1  e.  QQ  /\  1  e.  ZZ )  /\  ( 8  e.  QQ  /\  0  <  8 ) )  -> 
( ( 1  +  ( 1  x.  8 ) )  mod  8
)  =  ( 1  mod  8 ) )
108105, 106, 18, 20, 107mp4an 425 . . . . 5  |-  ( ( 1  +  ( 1  x.  8 ) )  mod  8 )  =  ( 1  mod  8
)
109102, 108eqtri 2191 . . . 4  |-  ( ( 3  x.  3 )  mod  8 )  =  ( 1  mod  8
)
11023simpli 110 . . . . 5  |-  ( ( 1  mod  8 )  =  1  /\  ( -u 1  mod  8 )  =  7 )
111110simpli 110 . . . 4  |-  ( 1  mod  8 )  =  1
112109, 111eqtri 2191 . . 3  |-  ( ( 3  x.  3 )  mod  8 )  =  1
113 znegcl 9243 . . . . . . . 8  |-  ( 1  e.  ZZ  ->  -u 1  e.  ZZ )
114106, 113mp1i 10 . . . . . . 7  |-  ( T. 
->  -u 1  e.  ZZ )
115 3nn 9040 . . . . . . . . . 10  |-  3  e.  NN
116115, 115nnmulcli 8900 . . . . . . . . 9  |-  ( 3  x.  3 )  e.  NN
117116nnzi 9233 . . . . . . . 8  |-  ( 3  x.  3 )  e.  ZZ
118117a1i 9 . . . . . . 7  |-  ( T. 
->  ( 3  x.  3 )  e.  ZZ )
119106a1i 9 . . . . . . 7  |-  ( T. 
->  1  e.  ZZ )
12018a1i 9 . . . . . . 7  |-  ( T. 
->  8  e.  QQ )
12120a1i 9 . . . . . . 7  |-  ( T. 
->  0  <  8
)
122 eqidd 2171 . . . . . . 7  |-  ( T. 
->  ( -u 1  mod  8 )  =  (
-u 1  mod  8
) )
123109a1i 9 . . . . . . 7  |-  ( T. 
->  ( ( 3  x.  3 )  mod  8
)  =  ( 1  mod  8 ) )
124114, 114, 118, 119, 120, 121, 122, 123modqmul12d 10334 . . . . . 6  |-  ( T. 
->  ( ( -u 1  x.  ( 3  x.  3 ) )  mod  8
)  =  ( (
-u 1  x.  1 )  mod  8 ) )
125124mptru 1357 . . . . 5  |-  ( (
-u 1  x.  (
3  x.  3 ) )  mod  8 )  =  ( ( -u
1  x.  1 )  mod  8 )
12645, 45mulcli 7925 . . . . . . 7  |-  ( 3  x.  3 )  e.  CC
127126mulm1i 8322 . . . . . 6  |-  ( -u
1  x.  ( 3  x.  3 ) )  =  -u ( 3  x.  3 )
128127oveq1i 5863 . . . . 5  |-  ( (
-u 1  x.  (
3  x.  3 ) )  mod  8 )  =  ( -u (
3  x.  3 )  mod  8 )
12995mulm1i 8322 . . . . . 6  |-  ( -u
1  x.  1 )  =  -u 1
130129oveq1i 5863 . . . . 5  |-  ( (
-u 1  x.  1 )  mod  8 )  =  ( -u 1  mod  8 )
131125, 128, 1303eqtr3i 2199 . . . 4  |-  ( -u ( 3  x.  3 )  mod  8 )  =  ( -u 1  mod  8 )
132110simpri 112 . . . 4  |-  ( -u
1  mod  8 )  =  7
133131, 132eqtri 2191 . . 3  |-  ( -u ( 3  x.  3 )  mod  8 )  =  7
134112, 133preq12i 3665 . 2  |-  { ( ( 3  x.  3 )  mod  8 ) ,  ( -u (
3  x.  3 )  mod  8 ) }  =  { 1 ,  7 }
13592, 134eleqtrdi 2263 1  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  e. 
{ 3 ,  5 }  /\  ( B  mod  8 )  e. 
{ 3 ,  5 } ) )  -> 
( ( A  x.  B )  mod  8
)  e.  { 1 ,  7 } )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 103    <-> wb 104    \/ wo 703    = wceq 1348   T. wtru 1349    e. wcel 2141   {cpr 3584   class class class wbr 3989  (class class class)co 5853   0cc0 7774   1c1 7775    + caddc 7777    x. cmul 7779    < clt 7954   -ucneg 8091   NNcn 8878   3c3 8930   5c5 8932   7c7 8934   8c8 8935   9c9 8936   NN0cn0 9135   ZZcz 9212   QQcq 9578    mod cmo 10278
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  ax-pre-mulext 7892  ax-arch 7893
This theorem depends on definitions:  df-bi 116  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-rmo 2456  df-rab 2457  df-v 2732  df-sbc 2956  df-csb 3050  df-dif 3123  df-un 3125  df-in 3127  df-ss 3134  df-pw 3568  df-sn 3589  df-pr 3590  df-op 3592  df-uni 3797  df-int 3832  df-iun 3875  df-br 3990  df-opab 4051  df-mpt 4052  df-id 4278  df-po 4281  df-iso 4282  df-xp 4617  df-rel 4618  df-cnv 4619  df-co 4620  df-dm 4621  df-rn 4622  df-res 4623  df-ima 4624  df-iota 5160  df-fun 5200  df-fn 5201  df-f 5202  df-fv 5206  df-riota 5809  df-ov 5856  df-oprab 5857  df-mpo 5858  df-1st 6119  df-2nd 6120  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-div 8590  df-inn 8879  df-2 8937  df-3 8938  df-4 8939  df-5 8940  df-6 8941  df-7 8942  df-8 8943  df-9 8944  df-n0 9136  df-z 9213  df-q 9579  df-rp 9611  df-fl 10226  df-mod 10279
This theorem is referenced by:  lgsdir2  13728
  Copyright terms: Public domain W3C validator