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

Theorem lgsdirprm 13535
Description: The Legendre symbol is completely multiplicative at the primes. See theorem 9.3 in [ApostolNT] p. 180. (Contributed by Mario Carneiro, 4-Feb-2015.) (Proof shortened by AV, 18-Mar-2022.)
Assertion
Ref Expression
lgsdirprm  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  ->  (
( A  x.  B
)  /L P )  =  ( ( A  /L P )  x.  ( B  /L P ) ) )

Proof of Theorem lgsdirprm
Dummy variable  x is distinct from all other variables.
StepHypRef Expression
1 simpl1 990 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =  2 )  ->  A  e.  ZZ )
2 simpl2 991 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =  2 )  ->  B  e.  ZZ )
3 lgsdir2 13534 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( A  x.  B )  /L 2 )  =  ( ( A  /L 2 )  x.  ( B  /L 2 ) ) )
41, 2, 3syl2anc 409 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =  2 )  ->  ( ( A  x.  B )  /L 2 )  =  ( ( A  /L 2 )  x.  ( B  /L 2 ) ) )
5 simpr 109 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =  2 )  ->  P  =  2 )
65oveq2d 5857 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =  2 )  ->  ( ( A  x.  B )  /L P )  =  ( ( A  x.  B )  /L 2 ) )
75oveq2d 5857 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =  2 )  ->  ( A  /L P )  =  ( A  /L 2 ) )
85oveq2d 5857 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =  2 )  ->  ( B  /L P )  =  ( B  /L 2 ) )
97, 8oveq12d 5859 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =  2 )  ->  ( ( A  /L P )  x.  ( B  /L P ) )  =  ( ( A  /L 2 )  x.  ( B  /L 2 ) ) )
104, 6, 93eqtr4d 2208 . 2  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =  2 )  ->  ( ( A  x.  B )  /L P )  =  ( ( A  /L P )  x.  ( B  /L
P ) ) )
11 simpl1 990 . . . . . 6  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  A  e.  ZZ )
12 simpl2 991 . . . . . 6  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  B  e.  ZZ )
1311, 12zmulcld 9315 . . . . 5  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( A  x.  B
)  e.  ZZ )
14 simpl3 992 . . . . . 6  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  P  e.  Prime )
15 prmz 12039 . . . . . 6  |-  ( P  e.  Prime  ->  P  e.  ZZ )
1614, 15syl 14 . . . . 5  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  P  e.  ZZ )
17 lgscl 13515 . . . . 5  |-  ( ( ( A  x.  B
)  e.  ZZ  /\  P  e.  ZZ )  ->  ( ( A  x.  B )  /L
P )  e.  ZZ )
1813, 16, 17syl2anc 409 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( A  x.  B )  /L
P )  e.  ZZ )
1918zcnd 9310 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( A  x.  B )  /L
P )  e.  CC )
20 lgscl 13515 . . . . . 6  |-  ( ( A  e.  ZZ  /\  P  e.  ZZ )  ->  ( A  /L
P )  e.  ZZ )
2111, 16, 20syl2anc 409 . . . . 5  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( A  /L
P )  e.  ZZ )
22 lgscl 13515 . . . . . 6  |-  ( ( B  e.  ZZ  /\  P  e.  ZZ )  ->  ( B  /L
P )  e.  ZZ )
2312, 16, 22syl2anc 409 . . . . 5  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( B  /L
P )  e.  ZZ )
2421, 23zmulcld 9315 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( A  /L P )  x.  ( B  /L
P ) )  e.  ZZ )
2524zcnd 9310 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( A  /L P )  x.  ( B  /L
P ) )  e.  CC )
2619, 25subcld 8205 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( ( A  x.  B )  /L P )  -  ( ( A  /L P )  x.  ( B  /L
P ) ) )  e.  CC )
2718, 24zsubcld 9314 . . . . . . 7  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( ( A  x.  B )  /L P )  -  ( ( A  /L P )  x.  ( B  /L
P ) ) )  e.  ZZ )
28 zabscl 11024 . . . . . . 7  |-  ( ( ( ( A  x.  B )  /L
P )  -  (
( A  /L
P )  x.  ( B  /L P ) ) )  e.  ZZ  ->  ( abs `  (
( ( A  x.  B )  /L
P )  -  (
( A  /L
P )  x.  ( B  /L P ) ) ) )  e.  ZZ )
29 zq 9560 . . . . . . 7  |-  ( ( abs `  ( ( ( A  x.  B
)  /L P )  -  ( ( A  /L P )  x.  ( B  /L P ) ) ) )  e.  ZZ  ->  ( abs `  ( ( ( A  x.  B )  /L P )  -  ( ( A  /L P )  x.  ( B  /L
P ) ) ) )  e.  QQ )
3027, 28, 293syl 17 . . . . . 6  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( abs `  (
( ( A  x.  B )  /L
P )  -  (
( A  /L
P )  x.  ( B  /L P ) ) ) )  e.  QQ )
31 prmnn 12038 . . . . . . 7  |-  ( P  e.  Prime  ->  P  e.  NN )
32 nnq 9567 . . . . . . 7  |-  ( P  e.  NN  ->  P  e.  QQ )
3314, 31, 323syl 17 . . . . . 6  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  P  e.  QQ )
3426absge0d 11122 . . . . . 6  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
0  <_  ( abs `  ( ( ( A  x.  B )  /L P )  -  ( ( A  /L P )  x.  ( B  /L
P ) ) ) ) )
3526abscld 11119 . . . . . . 7  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( abs `  (
( ( A  x.  B )  /L
P )  -  (
( A  /L
P )  x.  ( B  /L P ) ) ) )  e.  RR )
36 2re 8923 . . . . . . . 8  |-  2  e.  RR
3736a1i 9 . . . . . . 7  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
2  e.  RR )
3814, 31syl 14 . . . . . . . 8  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  P  e.  NN )
3938nnred 8866 . . . . . . 7  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  P  e.  RR )
4019abscld 11119 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( abs `  (
( A  x.  B
)  /L P ) )  e.  RR )
4125abscld 11119 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( abs `  (
( A  /L
P )  x.  ( B  /L P ) ) )  e.  RR )
4240, 41readdcld 7924 . . . . . . . 8  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( abs `  (
( A  x.  B
)  /L P ) )  +  ( abs `  ( ( A  /L P )  x.  ( B  /L P ) ) ) )  e.  RR )
4319, 25abs2dif2d 11136 . . . . . . . 8  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( abs `  (
( ( A  x.  B )  /L
P )  -  (
( A  /L
P )  x.  ( B  /L P ) ) ) )  <_ 
( ( abs `  (
( A  x.  B
)  /L P ) )  +  ( abs `  ( ( A  /L P )  x.  ( B  /L P ) ) ) ) )
44 1red 7910 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
1  e.  RR )
45 lgsle1 13516 . . . . . . . . . . 11  |-  ( ( ( A  x.  B
)  e.  ZZ  /\  P  e.  ZZ )  ->  ( abs `  (
( A  x.  B
)  /L P ) )  <_  1
)
4613, 16, 45syl2anc 409 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( abs `  (
( A  x.  B
)  /L P ) )  <_  1
)
47 eqid 2165 . . . . . . . . . . . . . 14  |-  { x  e.  ZZ  |  ( abs `  x )  <_  1 }  =  { x  e.  ZZ  |  ( abs `  x )  <_  1 }
4847lgscl2 13513 . . . . . . . . . . . . 13  |-  ( ( A  e.  ZZ  /\  P  e.  ZZ )  ->  ( A  /L
P )  e.  {
x  e.  ZZ  | 
( abs `  x
)  <_  1 }
)
4911, 16, 48syl2anc 409 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( A  /L
P )  e.  {
x  e.  ZZ  | 
( abs `  x
)  <_  1 }
)
5047lgscl2 13513 . . . . . . . . . . . . 13  |-  ( ( B  e.  ZZ  /\  P  e.  ZZ )  ->  ( B  /L
P )  e.  {
x  e.  ZZ  | 
( abs `  x
)  <_  1 }
)
5112, 16, 50syl2anc 409 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( B  /L
P )  e.  {
x  e.  ZZ  | 
( abs `  x
)  <_  1 }
)
5247lgslem3 13503 . . . . . . . . . . . 12  |-  ( ( ( A  /L
P )  e.  {
x  e.  ZZ  | 
( abs `  x
)  <_  1 }  /\  ( B  /L
P )  e.  {
x  e.  ZZ  | 
( abs `  x
)  <_  1 }
)  ->  ( ( A  /L P )  x.  ( B  /L P ) )  e.  { x  e.  ZZ  |  ( abs `  x )  <_  1 } )
5349, 51, 52syl2anc 409 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( A  /L P )  x.  ( B  /L
P ) )  e. 
{ x  e.  ZZ  |  ( abs `  x
)  <_  1 }
)
54 fveq2 5485 . . . . . . . . . . . . . 14  |-  ( x  =  ( ( A  /L P )  x.  ( B  /L P ) )  ->  ( abs `  x
)  =  ( abs `  ( ( A  /L P )  x.  ( B  /L
P ) ) ) )
5554breq1d 3991 . . . . . . . . . . . . 13  |-  ( x  =  ( ( A  /L P )  x.  ( B  /L P ) )  ->  ( ( abs `  x )  <_  1  <->  ( abs `  ( ( A  /L P )  x.  ( B  /L P ) ) )  <_  1
) )
5655elrab 2881 . . . . . . . . . . . 12  |-  ( ( ( A  /L
P )  x.  ( B  /L P ) )  e.  { x  e.  ZZ  |  ( abs `  x )  <_  1 } 
<->  ( ( ( A  /L P )  x.  ( B  /L P ) )  e.  ZZ  /\  ( abs `  ( ( A  /L P )  x.  ( B  /L P ) ) )  <_  1 ) )
5756simprbi 273 . . . . . . . . . . 11  |-  ( ( ( A  /L
P )  x.  ( B  /L P ) )  e.  { x  e.  ZZ  |  ( abs `  x )  <_  1 }  ->  ( abs `  (
( A  /L
P )  x.  ( B  /L P ) ) )  <_  1
)
5853, 57syl 14 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( abs `  (
( A  /L
P )  x.  ( B  /L P ) ) )  <_  1
)
5940, 41, 44, 44, 46, 58le2addd 8457 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( abs `  (
( A  x.  B
)  /L P ) )  +  ( abs `  ( ( A  /L P )  x.  ( B  /L P ) ) ) )  <_ 
( 1  +  1 ) )
60 df-2 8912 . . . . . . . . 9  |-  2  =  ( 1  +  1 )
6159, 60breqtrrdi 4023 . . . . . . . 8  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( abs `  (
( A  x.  B
)  /L P ) )  +  ( abs `  ( ( A  /L P )  x.  ( B  /L P ) ) ) )  <_ 
2 )
6235, 42, 37, 43, 61letrd 8018 . . . . . . 7  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( abs `  (
( ( A  x.  B )  /L
P )  -  (
( A  /L
P )  x.  ( B  /L P ) ) ) )  <_ 
2 )
63 prmuz2 12059 . . . . . . . . 9  |-  ( P  e.  Prime  ->  P  e.  ( ZZ>= `  2 )
)
64 eluzle 9474 . . . . . . . . 9  |-  ( P  e.  ( ZZ>= `  2
)  ->  2  <_  P )
6514, 63, 643syl 17 . . . . . . . 8  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
2  <_  P )
66 simpr 109 . . . . . . . 8  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  P  =/=  2 )
67 2z 9215 . . . . . . . . 9  |-  2  e.  ZZ
68 zltlen 9265 . . . . . . . . 9  |-  ( ( 2  e.  ZZ  /\  P  e.  ZZ )  ->  ( 2  <  P  <->  ( 2  <_  P  /\  P  =/=  2 ) ) )
6967, 16, 68sylancr 411 . . . . . . . 8  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( 2  <  P  <->  ( 2  <_  P  /\  P  =/=  2 ) ) )
7065, 66, 69mpbir2and 934 . . . . . . 7  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
2  <  P )
7135, 37, 39, 62, 70lelttrd 8019 . . . . . 6  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( abs `  (
( ( A  x.  B )  /L
P )  -  (
( A  /L
P )  x.  ( B  /L P ) ) ) )  < 
P )
72 modqid 10280 . . . . . 6  |-  ( ( ( ( abs `  (
( ( A  x.  B )  /L
P )  -  (
( A  /L
P )  x.  ( B  /L P ) ) ) )  e.  QQ  /\  P  e.  QQ )  /\  (
0  <_  ( abs `  ( ( ( A  x.  B )  /L P )  -  ( ( A  /L P )  x.  ( B  /L
P ) ) ) )  /\  ( abs `  ( ( ( A  x.  B )  /L P )  -  ( ( A  /L P )  x.  ( B  /L
P ) ) ) )  <  P ) )  ->  ( ( abs `  ( ( ( A  x.  B )  /L P )  -  ( ( A  /L P )  x.  ( B  /L P ) ) ) )  mod  P
)  =  ( abs `  ( ( ( A  x.  B )  /L P )  -  ( ( A  /L P )  x.  ( B  /L
P ) ) ) ) )
7330, 33, 34, 71, 72syl22anc 1229 . . . . 5  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( abs `  (
( ( A  x.  B )  /L
P )  -  (
( A  /L
P )  x.  ( B  /L P ) ) ) )  mod 
P )  =  ( abs `  ( ( ( A  x.  B
)  /L P )  -  ( ( A  /L P )  x.  ( B  /L P ) ) ) ) )
7411zcnd 9310 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  A  e.  CC )
7512zcnd 9310 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  B  e.  CC )
76 eldifsn 3702 . . . . . . . . . . . . . . 15  |-  ( P  e.  ( Prime  \  {
2 } )  <->  ( P  e.  Prime  /\  P  =/=  2 ) )
7714, 66, 76sylanbrc 414 . . . . . . . . . . . . . 14  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  P  e.  ( Prime  \  { 2 } ) )
78 oddprm 12187 . . . . . . . . . . . . . 14  |-  ( P  e.  ( Prime  \  {
2 } )  -> 
( ( P  - 
1 )  /  2
)  e.  NN )
7977, 78syl 14 . . . . . . . . . . . . 13  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( P  - 
1 )  /  2
)  e.  NN )
8079nnnn0d 9163 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( P  - 
1 )  /  2
)  e.  NN0 )
8174, 75, 80mulexpd 10599 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( A  x.  B ) ^ (
( P  -  1 )  /  2 ) )  =  ( ( A ^ ( ( P  -  1 )  /  2 ) )  x.  ( B ^
( ( P  - 
1 )  /  2
) ) ) )
82 zexpcl 10466 . . . . . . . . . . . . . 14  |-  ( ( A  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  NN0 )  ->  ( A ^ (
( P  -  1 )  /  2 ) )  e.  ZZ )
8311, 80, 82syl2anc 409 . . . . . . . . . . . . 13  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( A ^ (
( P  -  1 )  /  2 ) )  e.  ZZ )
8483zcnd 9310 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( A ^ (
( P  -  1 )  /  2 ) )  e.  CC )
85 zexpcl 10466 . . . . . . . . . . . . . 14  |-  ( ( B  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  NN0 )  ->  ( B ^ (
( P  -  1 )  /  2 ) )  e.  ZZ )
8612, 80, 85syl2anc 409 . . . . . . . . . . . . 13  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( B ^ (
( P  -  1 )  /  2 ) )  e.  ZZ )
8786zcnd 9310 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( B ^ (
( P  -  1 )  /  2 ) )  e.  CC )
8884, 87mulcomd 7916 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( A ^
( ( P  - 
1 )  /  2
) )  x.  ( B ^ ( ( P  -  1 )  / 
2 ) ) )  =  ( ( B ^ ( ( P  -  1 )  / 
2 ) )  x.  ( A ^ (
( P  -  1 )  /  2 ) ) ) )
8981, 88eqtrd 2198 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( A  x.  B ) ^ (
( P  -  1 )  /  2 ) )  =  ( ( B ^ ( ( P  -  1 )  /  2 ) )  x.  ( A ^
( ( P  - 
1 )  /  2
) ) ) )
9089oveq1d 5856 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( ( A  x.  B ) ^
( ( P  - 
1 )  /  2
) )  mod  P
)  =  ( ( ( B ^ (
( P  -  1 )  /  2 ) )  x.  ( A ^ ( ( P  -  1 )  / 
2 ) ) )  mod  P ) )
91 lgsvalmod 13520 . . . . . . . . . 10  |-  ( ( ( A  x.  B
)  e.  ZZ  /\  P  e.  ( Prime  \  { 2 } ) )  ->  ( (
( A  x.  B
)  /L P )  mod  P )  =  ( ( ( A  x.  B ) ^ ( ( P  -  1 )  / 
2 ) )  mod 
P ) )
9213, 77, 91syl2anc 409 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( ( A  x.  B )  /L P )  mod 
P )  =  ( ( ( A  x.  B ) ^ (
( P  -  1 )  /  2 ) )  mod  P ) )
93 zq 9560 . . . . . . . . . . . 12  |-  ( ( A  /L P )  e.  ZZ  ->  ( A  /L P )  e.  QQ )
9421, 93syl 14 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( A  /L
P )  e.  QQ )
95 zq 9560 . . . . . . . . . . . 12  |-  ( ( A ^ ( ( P  -  1 )  /  2 ) )  e.  ZZ  ->  ( A ^ ( ( P  -  1 )  / 
2 ) )  e.  QQ )
9683, 95syl 14 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( A ^ (
( P  -  1 )  /  2 ) )  e.  QQ )
9738nngt0d 8897 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
0  <  P )
98 lgsvalmod 13520 . . . . . . . . . . . 12  |-  ( ( A  e.  ZZ  /\  P  e.  ( Prime  \  { 2 } ) )  ->  ( ( A  /L P )  mod  P )  =  ( ( A ^
( ( P  - 
1 )  /  2
) )  mod  P
) )
9911, 77, 98syl2anc 409 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( A  /L P )  mod 
P )  =  ( ( A ^ (
( P  -  1 )  /  2 ) )  mod  P ) )
10094, 96, 23, 33, 97, 99modqmul1 10308 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( ( A  /L P )  x.  ( B  /L P ) )  mod  P )  =  ( ( ( A ^ ( ( P  -  1 )  / 
2 ) )  x.  ( B  /L
P ) )  mod 
P ) )
10123zcnd 9310 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( B  /L
P )  e.  CC )
10284, 101mulcomd 7916 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( A ^
( ( P  - 
1 )  /  2
) )  x.  ( B  /L P ) )  =  ( ( B  /L P )  x.  ( A ^ ( ( P  -  1 )  / 
2 ) ) ) )
103102oveq1d 5856 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( ( A ^ ( ( P  -  1 )  / 
2 ) )  x.  ( B  /L
P ) )  mod 
P )  =  ( ( ( B  /L P )  x.  ( A ^ (
( P  -  1 )  /  2 ) ) )  mod  P
) )
104 zq 9560 . . . . . . . . . . . 12  |-  ( ( B  /L P )  e.  ZZ  ->  ( B  /L P )  e.  QQ )
10523, 104syl 14 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( B  /L
P )  e.  QQ )
106 zq 9560 . . . . . . . . . . . 12  |-  ( ( B ^ ( ( P  -  1 )  /  2 ) )  e.  ZZ  ->  ( B ^ ( ( P  -  1 )  / 
2 ) )  e.  QQ )
10786, 106syl 14 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( B ^ (
( P  -  1 )  /  2 ) )  e.  QQ )
108 lgsvalmod 13520 . . . . . . . . . . . 12  |-  ( ( B  e.  ZZ  /\  P  e.  ( Prime  \  { 2 } ) )  ->  ( ( B  /L P )  mod  P )  =  ( ( B ^
( ( P  - 
1 )  /  2
) )  mod  P
) )
10912, 77, 108syl2anc 409 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( B  /L P )  mod 
P )  =  ( ( B ^ (
( P  -  1 )  /  2 ) )  mod  P ) )
110105, 107, 83, 33, 97, 109modqmul1 10308 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( ( B  /L P )  x.  ( A ^
( ( P  - 
1 )  /  2
) ) )  mod 
P )  =  ( ( ( B ^
( ( P  - 
1 )  /  2
) )  x.  ( A ^ ( ( P  -  1 )  / 
2 ) ) )  mod  P ) )
111100, 103, 1103eqtrd 2202 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( ( A  /L P )  x.  ( B  /L P ) )  mod  P )  =  ( ( ( B ^ ( ( P  -  1 )  / 
2 ) )  x.  ( A ^ (
( P  -  1 )  /  2 ) ) )  mod  P
) )
11290, 92, 1113eqtr4d 2208 . . . . . . . 8  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( ( A  x.  B )  /L P )  mod 
P )  =  ( ( ( A  /L P )  x.  ( B  /L
P ) )  mod 
P ) )
113 moddvds 11735 . . . . . . . . 9  |-  ( ( P  e.  NN  /\  ( ( A  x.  B )  /L
P )  e.  ZZ  /\  ( ( A  /L P )  x.  ( B  /L
P ) )  e.  ZZ )  ->  (
( ( ( A  x.  B )  /L P )  mod 
P )  =  ( ( ( A  /L P )  x.  ( B  /L
P ) )  mod 
P )  <->  P  ||  (
( ( A  x.  B )  /L
P )  -  (
( A  /L
P )  x.  ( B  /L P ) ) ) ) )
11438, 18, 24, 113syl3anc 1228 . . . . . . . 8  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( ( ( A  x.  B )  /L P )  mod  P )  =  ( ( ( A  /L P )  x.  ( B  /L P ) )  mod  P )  <->  P  ||  (
( ( A  x.  B )  /L
P )  -  (
( A  /L
P )  x.  ( B  /L P ) ) ) ) )
115112, 114mpbid 146 . . . . . . 7  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  P  ||  ( ( ( A  x.  B )  /L P )  -  ( ( A  /L P )  x.  ( B  /L P ) ) ) )
116 dvdsabsb 11746 . . . . . . . 8  |-  ( ( P  e.  ZZ  /\  ( ( ( A  x.  B )  /L P )  -  ( ( A  /L P )  x.  ( B  /L
P ) ) )  e.  ZZ )  -> 
( P  ||  (
( ( A  x.  B )  /L
P )  -  (
( A  /L
P )  x.  ( B  /L P ) ) )  <->  P  ||  ( abs `  ( ( ( A  x.  B )  /L P )  -  ( ( A  /L P )  x.  ( B  /L P ) ) ) ) ) )
11716, 27, 116syl2anc 409 . . . . . . 7  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( P  ||  (
( ( A  x.  B )  /L
P )  -  (
( A  /L
P )  x.  ( B  /L P ) ) )  <->  P  ||  ( abs `  ( ( ( A  x.  B )  /L P )  -  ( ( A  /L P )  x.  ( B  /L P ) ) ) ) ) )
118115, 117mpbid 146 . . . . . 6  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  P  ||  ( abs `  (
( ( A  x.  B )  /L
P )  -  (
( A  /L
P )  x.  ( B  /L P ) ) ) ) )
119 dvdsmod0 11729 . . . . . 6  |-  ( ( P  e.  NN  /\  P  ||  ( abs `  (
( ( A  x.  B )  /L
P )  -  (
( A  /L
P )  x.  ( B  /L P ) ) ) ) )  ->  ( ( abs `  ( ( ( A  x.  B )  /L P )  -  ( ( A  /L P )  x.  ( B  /L
P ) ) ) )  mod  P )  =  0 )
12038, 118, 119syl2anc 409 . . . . 5  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( abs `  (
( ( A  x.  B )  /L
P )  -  (
( A  /L
P )  x.  ( B  /L P ) ) ) )  mod 
P )  =  0 )
12173, 120eqtr3d 2200 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( abs `  (
( ( A  x.  B )  /L
P )  -  (
( A  /L
P )  x.  ( B  /L P ) ) ) )  =  0 )
12226, 121abs00d 11124 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( ( A  x.  B )  /L P )  -  ( ( A  /L P )  x.  ( B  /L
P ) ) )  =  0 )
12319, 25, 122subeq0d 8213 . 2  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( A  x.  B )  /L
P )  =  ( ( A  /L
P )  x.  ( B  /L P ) ) )
124153ad2ant3 1010 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  ->  P  e.  ZZ )
12567a1i 9 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  ->  2  e.  ZZ )
126 zdceq 9262 . . . 4  |-  ( ( P  e.  ZZ  /\  2  e.  ZZ )  -> DECID  P  =  2 )
127124, 125, 126syl2anc 409 . . 3  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  -> DECID  P  =  2
)
128 dcne 2346 . . 3  |-  (DECID  P  =  2  <->  ( P  =  2  \/  P  =/=  2 ) )
129127, 128sylib 121 . 2  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  ->  ( P  =  2  \/  P  =/=  2 ) )
13010, 123, 129mpjaodan 788 1  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  ->  (
( A  x.  B
)  /L P )  =  ( ( A  /L P )  x.  ( B  /L P ) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 103    <-> wb 104    \/ wo 698  DECID wdc 824    /\ w3a 968    = wceq 1343    e. wcel 2136    =/= wne 2335   {crab 2447    \ cdif 3112   {csn 3575   class class class wbr 3981   ` cfv 5187  (class class class)co 5841   RRcr 7748   0cc0 7749   1c1 7750    + caddc 7752    x. cmul 7754    < clt 7929    <_ cle 7930    - cmin 8065    / cdiv 8564   NNcn 8853   2c2 8904   NN0cn0 9110   ZZcz 9187   ZZ>=cuz 9462   QQcq 9553    mod cmo 10253   ^cexp 10450   abscabs 10935    || cdvds 11723   Primecprime 12035    /Lclgs 13498
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-coll 4096  ax-sep 4099  ax-nul 4107  ax-pow 4152  ax-pr 4186  ax-un 4410  ax-setind 4513  ax-iinf 4564  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  ax-caucvg 7869
This theorem depends on definitions:  df-bi 116  df-stab 821  df-dc 825  df-3or 969  df-3an 970  df-tru 1346  df-fal 1349  df-xor 1366  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-nul 3409  df-if 3520  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-tr 4080  df-id 4270  df-po 4273  df-iso 4274  df-iord 4343  df-on 4345  df-ilim 4346  df-suc 4348  df-iom 4567  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-f1 5192  df-fo 5193  df-f1o 5194  df-fv 5195  df-isom 5196  df-riota 5797  df-ov 5844  df-oprab 5845  df-mpo 5846  df-1st 6105  df-2nd 6106  df-recs 6269  df-irdg 6334  df-frec 6355  df-1o 6380  df-2o 6381  df-oadd 6384  df-er 6497  df-en 6703  df-dom 6704  df-fin 6705  df-sup 6945  df-inf 6946  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-uz 9463  df-q 9554  df-rp 9586  df-fz 9941  df-fzo 10074  df-fl 10201  df-mod 10254  df-seqfrec 10377  df-exp 10451  df-ihash 10685  df-cj 10780  df-re 10781  df-im 10782  df-rsqrt 10936  df-abs 10937  df-clim 11216  df-proddc 11488  df-dvds 11724  df-gcd 11872  df-prm 12036  df-phi 12139  df-pc 12213  df-lgs 13499
This theorem is referenced by:  lgsdir  13536
  Copyright terms: Public domain W3C validator