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

Theorem lgsdir2lem5 13533
Description: Lemma for lgsdir2 13534. (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 9020 . . . . . . . . 9  |-  8  e.  NN
2 zmodcl 10275 . . . . . . . . 9  |-  ( ( A  e.  ZZ  /\  8  e.  NN )  ->  ( A  mod  8
)  e.  NN0 )
31, 2mpan2 422 . . . . . . . 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 3595 . . . . . . 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 10275 . . . . . . . . 9  |-  ( ( B  e.  ZZ  /\  8  e.  NN )  ->  ( B  mod  8
)  e.  NN0 )
81, 7mpan2 422 . . . . . . . 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 3595 . . . . . . 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 465 . . . . 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 519 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  3 ) )  ->  A  e.  ZZ )
14 3z 9216 . . . . . . . . . 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 520 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  3 ) )  ->  B  e.  ZZ )
17 nnq 9567 . . . . . . . . . . 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 8956 . . . . . . . . . 10  |-  0  <  8
2120a1i 9 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  3 ) )  -> 
0  <  8 )
22 simprl 521 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  3 ) )  -> 
( A  mod  8
)  =  3 )
23 lgsdir2lem1 13529 . . . . . . . . . . . 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 2216 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  3 ) )  -> 
( A  mod  8
)  =  ( 3  mod  8 ) )
27 simprr 522 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  3 ) )  -> 
( B  mod  8
)  =  3 )
2827, 25eqtr4di 2216 . . . . . . . . 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 10309 . . . . . . . 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 723 . . . . . . 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 519 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  3 ) )  ->  A  e.  ZZ )
33 znegcl 9218 . . . . . . . . . . 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 520 . . . . . . . . . 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 521 . . . . . . . . . . 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 2216 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  3 ) )  -> 
( A  mod  8
)  =  ( -u
3  mod  8 ) )
42 simprr 522 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  3 ) )  -> 
( B  mod  8
)  =  3 )
4342, 25eqtr4di 2216 . . . . . . . . . 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 10309 . . . . . . . . 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 8928 . . . . . . . . . . 11  |-  3  e.  CC
4645, 45mulneg1i 8298 . . . . . . . . . 10  |-  ( -u
3  x.  3 )  =  -u ( 3  x.  3 )
4746oveq1i 5851 . . . . . . . . 9  |-  ( (
-u 3  x.  3 )  mod  8 )  =  ( -u (
3  x.  3 )  mod  8 )
4844, 47eqtrdi 2214 . . . . . . . 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 724 . . . . . . 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 519 . . . . . . . . . 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 520 . . . . . . . . . 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 521 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  5 ) )  -> 
( A  mod  8
)  =  3 )
5857, 25eqtr4di 2216 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  5 ) )  -> 
( A  mod  8
)  =  ( 3  mod  8 ) )
59 simprr 522 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  3  /\  ( B  mod  8 )  =  5 ) )  -> 
( B  mod  8
)  =  5 )
6059, 40eqtr4di 2216 . . . . . . . . . 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 10309 . . . . . . . . 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 8299 . . . . . . . . . 10  |-  ( 3  x.  -u 3 )  = 
-u ( 3  x.  3 )
6362oveq1i 5851 . . . . . . . . 9  |-  ( ( 3  x.  -u 3
)  mod  8 )  =  ( -u (
3  x.  3 )  mod  8 )
6461, 63eqtrdi 2214 . . . . . . . 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 724 . . . . . . 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 519 . . . . . . . . . 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 520 . . . . . . . . . 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 521 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  5 ) )  -> 
( A  mod  8
)  =  5 )
7372, 40eqtr4di 2216 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  5 ) )  -> 
( A  mod  8
)  =  ( -u
3  mod  8 ) )
74 simprr 522 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  =  5  /\  ( B  mod  8 )  =  5 ) )  -> 
( B  mod  8
)  =  5 )
7574, 40eqtr4di 2216 . . . . . . . . . 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 10309 . . . . . . . . 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 8300 . . . . . . . . . 10  |-  ( -u
3  x.  -u 3
)  =  ( 3  x.  3 )
7877oveq1i 5851 . . . . . . . . 9  |-  ( (
-u 3  x.  -u 3
)  mod  8 )  =  ( ( 3  x.  3 )  mod  8 )
7976, 78eqtrdi 2214 . . . . . . . 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 723 . . . . . . 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 955 . . . . 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 519 . . . . . 6  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  e. 
{ 3 ,  5 }  /\  ( B  mod  8 )  e. 
{ 3 ,  5 } ) )  ->  A  e.  ZZ )
86 simplr 520 . . . . . 6  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ )  /\  ( ( A  mod  8 )  e. 
{ 3 ,  5 }  /\  ( B  mod  8 )  e. 
{ 3 ,  5 } ) )  ->  B  e.  ZZ )
8785, 86zmulcld 9315 . . . . 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 10276 . . . 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 3595 . . . 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 8919 . . . . . . . 8  |-  9  =  ( 8  +  1 )
94 8cn 8939 . . . . . . . . 9  |-  8  e.  CC
95 ax-1cn 7842 . . . . . . . . 9  |-  1  e.  CC
9694, 95addcomi 8038 . . . . . . . 8  |-  ( 8  +  1 )  =  ( 1  +  8 )
9793, 96eqtri 2186 . . . . . . 7  |-  9  =  ( 1  +  8 )
98 3t3e9 9010 . . . . . . 7  |-  ( 3  x.  3 )  =  9
9994mulid2i 7898 . . . . . . . 8  |-  ( 1  x.  8 )  =  8
10099oveq2i 5852 . . . . . . 7  |-  ( 1  +  ( 1  x.  8 ) )  =  ( 1  +  8 )
10197, 98, 1003eqtr4i 2196 . . . . . 6  |-  ( 3  x.  3 )  =  ( 1  +  ( 1  x.  8 ) )
102101oveq1i 5851 . . . . 5  |-  ( ( 3  x.  3 )  mod  8 )  =  ( ( 1  +  ( 1  x.  8 ) )  mod  8
)
103 1nn 8864 . . . . . . 7  |-  1  e.  NN
104 nnq 9567 . . . . . . 7  |-  ( 1  e.  NN  ->  1  e.  QQ )
105103, 104ax-mp 5 . . . . . 6  |-  1  e.  QQ
106 1z 9213 . . . . . 6  |-  1  e.  ZZ
107 modqcyc 10290 . . . . . 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 424 . . . . 5  |-  ( ( 1  +  ( 1  x.  8 ) )  mod  8 )  =  ( 1  mod  8
)
109102, 108eqtri 2186 . . . 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 2186 . . 3  |-  ( ( 3  x.  3 )  mod  8 )  =  1
113 znegcl 9218 . . . . . . . 8  |-  ( 1  e.  ZZ  ->  -u 1  e.  ZZ )
114106, 113mp1i 10 . . . . . . 7  |-  ( T. 
->  -u 1  e.  ZZ )
115 3nn 9015 . . . . . . . . . 10  |-  3  e.  NN
116115, 115nnmulcli 8875 . . . . . . . . 9  |-  ( 3  x.  3 )  e.  NN
117116nnzi 9208 . . . . . . . 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 2166 . . . . . . 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 10309 . . . . . 6  |-  ( T. 
->  ( ( -u 1  x.  ( 3  x.  3 ) )  mod  8
)  =  ( (
-u 1  x.  1 )  mod  8 ) )
125124mptru 1352 . . . . 5  |-  ( (
-u 1  x.  (
3  x.  3 ) )  mod  8 )  =  ( ( -u
1  x.  1 )  mod  8 )
12645, 45mulcli 7900 . . . . . . 7  |-  ( 3  x.  3 )  e.  CC
127126mulm1i 8297 . . . . . 6  |-  ( -u
1  x.  ( 3  x.  3 ) )  =  -u ( 3  x.  3 )
128127oveq1i 5851 . . . . 5  |-  ( (
-u 1  x.  (
3  x.  3 ) )  mod  8 )  =  ( -u (
3  x.  3 )  mod  8 )
12995mulm1i 8297 . . . . . 6  |-  ( -u
1  x.  1 )  =  -u 1
130129oveq1i 5851 . . . . 5  |-  ( (
-u 1  x.  1 )  mod  8 )  =  ( -u 1  mod  8 )
131125, 128, 1303eqtr3i 2194 . . . 4  |-  ( -u ( 3  x.  3 )  mod  8 )  =  ( -u 1  mod  8 )
132110simpri 112 . . . 4  |-  ( -u
1  mod  8 )  =  7
133131, 132eqtri 2186 . . 3  |-  ( -u ( 3  x.  3 )  mod  8 )  =  7
134112, 133preq12i 3657 . 2  |-  { ( ( 3  x.  3 )  mod  8 ) ,  ( -u (
3  x.  3 )  mod  8 ) }  =  { 1 ,  7 }
13592, 134eleqtrdi 2258 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 698    = wceq 1343   T. wtru 1344    e. wcel 2136   {cpr 3576   class class class wbr 3981  (class class class)co 5841   0cc0 7749   1c1 7750    + caddc 7752    x. cmul 7754    < clt 7929   -ucneg 8066   NNcn 8853   3c3 8905   5c5 8907   7c7 8909   8c8 8910   9c9 8911   NN0cn0 9110   ZZcz 9187   QQcq 9553    mod cmo 10253
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  ax-pre-mulext 7867  ax-arch 7868
This theorem depends on definitions:  df-bi 116  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-rmo 2451  df-rab 2452  df-v 2727  df-sbc 2951  df-csb 3045  df-dif 3117  df-un 3119  df-in 3121  df-ss 3128  df-pw 3560  df-sn 3581  df-pr 3582  df-op 3584  df-uni 3789  df-int 3824  df-iun 3867  df-br 3982  df-opab 4043  df-mpt 4044  df-id 4270  df-po 4273  df-iso 4274  df-xp 4609  df-rel 4610  df-cnv 4611  df-co 4612  df-dm 4613  df-rn 4614  df-res 4615  df-ima 4616  df-iota 5152  df-fun 5189  df-fn 5190  df-f 5191  df-fv 5195  df-riota 5797  df-ov 5844  df-oprab 5845  df-mpo 5846  df-1st 6105  df-2nd 6106  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-div 8565  df-inn 8854  df-2 8912  df-3 8913  df-4 8914  df-5 8915  df-6 8916  df-7 8917  df-8 8918  df-9 8919  df-n0 9111  df-z 9188  df-q 9554  df-rp 9586  df-fl 10201  df-mod 10254
This theorem is referenced by:  lgsdir2  13534
  Copyright terms: Public domain W3C validator