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

Theorem lgsdirprm 24336
Description: The Legendre symbol is completely multiplicative at the primes. (Contributed by Mario Carneiro, 4-Feb-2015.)
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 1033 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =  2 )  ->  A  e.  ZZ )
2 simpl2 1034 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =  2 )  ->  B  e.  ZZ )
3 lgsdir2 24335 . . . 4  |-  ( ( A  e.  ZZ  /\  B  e.  ZZ )  ->  ( ( A  x.  B )  /L 2 )  =  ( ( A  /L 2 )  x.  ( B  /L 2 ) ) )
41, 2, 3syl2anc 673 . . 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 468 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =  2 )  ->  P  =  2 )
65oveq2d 6324 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =  2 )  ->  ( ( A  x.  B )  /L P )  =  ( ( A  x.  B )  /L 2 ) )
75oveq2d 6324 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =  2 )  ->  ( A  /L P )  =  ( A  /L 2 ) )
85oveq2d 6324 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =  2 )  ->  ( B  /L P )  =  ( B  /L 2 ) )
97, 8oveq12d 6326 . . 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 2515 . 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 1033 . . . . . 6  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  A  e.  ZZ )
12 simpl2 1034 . . . . . 6  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  B  e.  ZZ )
1311, 12zmulcld 11069 . . . . 5  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( A  x.  B
)  e.  ZZ )
14 simpl3 1035 . . . . . 6  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  P  e.  Prime )
15 prmz 14705 . . . . . 6  |-  ( P  e.  Prime  ->  P  e.  ZZ )
1614, 15syl 17 . . . . 5  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  P  e.  ZZ )
17 lgscl 24317 . . . . 5  |-  ( ( ( A  x.  B
)  e.  ZZ  /\  P  e.  ZZ )  ->  ( ( A  x.  B )  /L
P )  e.  ZZ )
1813, 16, 17syl2anc 673 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( A  x.  B )  /L
P )  e.  ZZ )
1918zcnd 11064 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( A  x.  B )  /L
P )  e.  CC )
20 lgscl 24317 . . . . . 6  |-  ( ( A  e.  ZZ  /\  P  e.  ZZ )  ->  ( A  /L
P )  e.  ZZ )
2111, 16, 20syl2anc 673 . . . . 5  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( A  /L
P )  e.  ZZ )
22 lgscl 24317 . . . . . 6  |-  ( ( B  e.  ZZ  /\  P  e.  ZZ )  ->  ( B  /L
P )  e.  ZZ )
2312, 16, 22syl2anc 673 . . . . 5  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( B  /L
P )  e.  ZZ )
2421, 23zmulcld 11069 . . . 4  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( A  /L P )  x.  ( B  /L
P ) )  e.  ZZ )
2524zcnd 11064 . . 3  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( A  /L P )  x.  ( B  /L
P ) )  e.  CC )
2619, 25subcld 10005 . . . 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 )
2726abscld 13575 . . . . . 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.  RR )
28 prmnn 14704 . . . . . . . 8  |-  ( P  e.  Prime  ->  P  e.  NN )
2914, 28syl 17 . . . . . . 7  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  P  e.  NN )
3029nnrpd 11362 . . . . . 6  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  P  e.  RR+ )
3126absge0d 13583 . . . . . 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 ) ) ) ) )
32 2re 10701 . . . . . . . 8  |-  2  e.  RR
3332a1i 11 . . . . . . 7  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
2  e.  RR )
3429nnred 10646 . . . . . . 7  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  P  e.  RR )
3519abscld 13575 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( abs `  (
( A  x.  B
)  /L P ) )  e.  RR )
3625abscld 13575 . . . . . . . . 9  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( abs `  (
( A  /L
P )  x.  ( B  /L P ) ) )  e.  RR )
3735, 36readdcld 9688 . . . . . . . 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 )
3819, 25abs2dif2d 13597 . . . . . . . 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 ) ) ) ) )
39 1red 9676 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
1  e.  RR )
40 lgsle1 24318 . . . . . . . . . . 11  |-  ( ( ( A  x.  B
)  e.  ZZ  /\  P  e.  ZZ )  ->  ( abs `  (
( A  x.  B
)  /L P ) )  <_  1
)
4113, 16, 40syl2anc 673 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( abs `  (
( A  x.  B
)  /L P ) )  <_  1
)
42 eqid 2471 . . . . . . . . . . . . . 14  |-  { x  e.  ZZ  |  ( abs `  x )  <_  1 }  =  { x  e.  ZZ  |  ( abs `  x )  <_  1 }
4342lgscl2 24315 . . . . . . . . . . . . 13  |-  ( ( A  e.  ZZ  /\  P  e.  ZZ )  ->  ( A  /L
P )  e.  {
x  e.  ZZ  | 
( abs `  x
)  <_  1 }
)
4411, 16, 43syl2anc 673 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( A  /L
P )  e.  {
x  e.  ZZ  | 
( abs `  x
)  <_  1 }
)
4542lgscl2 24315 . . . . . . . . . . . . 13  |-  ( ( B  e.  ZZ  /\  P  e.  ZZ )  ->  ( B  /L
P )  e.  {
x  e.  ZZ  | 
( abs `  x
)  <_  1 }
)
4612, 16, 45syl2anc 673 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( B  /L
P )  e.  {
x  e.  ZZ  | 
( abs `  x
)  <_  1 }
)
4742lgslem3 24305 . . . . . . . . . . . 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 } )
4844, 46, 47syl2anc 673 . . . . . . . . . . 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 }
)
49 fveq2 5879 . . . . . . . . . . . . . 14  |-  ( x  =  ( ( A  /L P )  x.  ( B  /L P ) )  ->  ( abs `  x
)  =  ( abs `  ( ( A  /L P )  x.  ( B  /L
P ) ) ) )
5049breq1d 4405 . . . . . . . . . . . . 13  |-  ( x  =  ( ( A  /L P )  x.  ( B  /L P ) )  ->  ( ( abs `  x )  <_  1  <->  ( abs `  ( ( A  /L P )  x.  ( B  /L P ) ) )  <_  1
) )
5150elrab 3184 . . . . . . . . . . . 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 ) )
5251simprbi 471 . . . . . . . . . . 11  |-  ( ( ( A  /L
P )  x.  ( B  /L P ) )  e.  { x  e.  ZZ  |  ( abs `  x )  <_  1 }  ->  ( abs `  (
( A  /L
P )  x.  ( B  /L P ) ) )  <_  1
)
5348, 52syl 17 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( abs `  (
( A  /L
P )  x.  ( B  /L P ) ) )  <_  1
)
5435, 36, 39, 39, 41, 53le2addd 10253 . . . . . . . . 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 ) )
55 df-2 10690 . . . . . . . . 9  |-  2  =  ( 1  +  1 )
5654, 55syl6breqr 4436 . . . . . . . 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 )
5727, 37, 33, 38, 56letrd 9809 . . . . . . 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 )
58 prmuz2 14721 . . . . . . . . 9  |-  ( P  e.  Prime  ->  P  e.  ( ZZ>= `  2 )
)
59 eluzle 11195 . . . . . . . . 9  |-  ( P  e.  ( ZZ>= `  2
)  ->  2  <_  P )
6014, 58, 593syl 18 . . . . . . . 8  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
2  <_  P )
61 simpr 468 . . . . . . . 8  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  P  =/=  2 )
62 ltlen 9753 . . . . . . . . 9  |-  ( ( 2  e.  RR  /\  P  e.  RR )  ->  ( 2  <  P  <->  ( 2  <_  P  /\  P  =/=  2 ) ) )
6332, 34, 62sylancr 676 . . . . . . . 8  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( 2  <  P  <->  ( 2  <_  P  /\  P  =/=  2 ) ) )
6460, 61, 63mpbir2and 936 . . . . . . 7  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
2  <  P )
6527, 33, 34, 57, 64lelttrd 9810 . . . . . 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 )
66 modid 12154 . . . . . 6  |-  ( ( ( ( abs `  (
( ( A  x.  B )  /L
P )  -  (
( A  /L
P )  x.  ( B  /L P ) ) ) )  e.  RR  /\  P  e.  RR+ )  /\  (
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 ) ) ) ) )
6727, 30, 31, 65, 66syl22anc 1293 . . . . 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 ) ) ) ) )
6811zcnd 11064 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  A  e.  CC )
6912zcnd 11064 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  B  e.  CC )
70 eldifsn 4088 . . . . . . . . . . . . . . 15  |-  ( P  e.  ( Prime  \  {
2 } )  <->  ( P  e.  Prime  /\  P  =/=  2 ) )
7114, 61, 70sylanbrc 677 . . . . . . . . . . . . . 14  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  ->  P  e.  ( Prime  \  { 2 } ) )
72 oddprm 14844 . . . . . . . . . . . . . 14  |-  ( P  e.  ( Prime  \  {
2 } )  -> 
( ( P  - 
1 )  /  2
)  e.  NN )
7371, 72syl 17 . . . . . . . . . . . . 13  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( P  - 
1 )  /  2
)  e.  NN )
7473nnnn0d 10949 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( P  - 
1 )  /  2
)  e.  NN0 )
7568, 69, 74mulexpd 12469 . . . . . . . . . . 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
) ) ) )
76 zexpcl 12325 . . . . . . . . . . . . . 14  |-  ( ( A  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  NN0 )  ->  ( A ^ (
( P  -  1 )  /  2 ) )  e.  ZZ )
7711, 74, 76syl2anc 673 . . . . . . . . . . . . 13  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( A ^ (
( P  -  1 )  /  2 ) )  e.  ZZ )
7877zcnd 11064 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( A ^ (
( P  -  1 )  /  2 ) )  e.  CC )
79 zexpcl 12325 . . . . . . . . . . . . . 14  |-  ( ( B  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  NN0 )  ->  ( B ^ (
( P  -  1 )  /  2 ) )  e.  ZZ )
8012, 74, 79syl2anc 673 . . . . . . . . . . . . 13  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( B ^ (
( P  -  1 )  /  2 ) )  e.  ZZ )
8180zcnd 11064 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( B ^ (
( P  -  1 )  /  2 ) )  e.  CC )
8278, 81mulcomd 9682 . . . . . . . . . . 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 ) ) ) )
8375, 82eqtrd 2505 . . . . . . . . . 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
) ) ) )
8483oveq1d 6323 . . . . . . . . 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 ) )
85 lgsvalmod 24322 . . . . . . . . . 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 ) )
8613, 71, 85syl2anc 673 . . . . . . . . 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 ) )
8721zred 11063 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( A  /L
P )  e.  RR )
8877zred 11063 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( A ^ (
( P  -  1 )  /  2 ) )  e.  RR )
89 lgsvalmod 24322 . . . . . . . . . . . 12  |-  ( ( A  e.  ZZ  /\  P  e.  ( Prime  \  { 2 } ) )  ->  ( ( A  /L P )  mod  P )  =  ( ( A ^
( ( P  - 
1 )  /  2
) )  mod  P
) )
9011, 71, 89syl2anc 673 . . . . . . . . . . 11  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( A  /L P )  mod 
P )  =  ( ( A ^ (
( P  -  1 )  /  2 ) )  mod  P ) )
91 modmul1 12177 . . . . . . . . . . 11  |-  ( ( ( ( A  /L P )  e.  RR  /\  ( A ^ ( ( P  -  1 )  / 
2 ) )  e.  RR )  /\  (
( B  /L
P )  e.  ZZ  /\  P  e.  RR+ )  /\  ( ( A  /L P )  mod 
P )  =  ( ( A ^ (
( P  -  1 )  /  2 ) )  mod  P ) )  ->  ( (
( A  /L
P )  x.  ( B  /L P ) )  mod  P )  =  ( ( ( A ^ ( ( P  -  1 )  /  2 ) )  x.  ( B  /L P ) )  mod  P ) )
9287, 88, 23, 30, 90, 91syl221anc 1303 . . . . . . . . . 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 ) )
9323zcnd 11064 . . . . . . . . . . . . 13  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( B  /L
P )  e.  CC )
9478, 93mulcomd 9682 . . . . . . . . . . . 12  |-  ( ( ( 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 ) ) ) )
9594oveq1d 6323 . . . . . . . . . . 11  |-  ( ( ( 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
) )
9623zred 11063 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( B  /L
P )  e.  RR )
9780zred 11063 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( B ^ (
( P  -  1 )  /  2 ) )  e.  RR )
98 lgsvalmod 24322 . . . . . . . . . . . . 13  |-  ( ( B  e.  ZZ  /\  P  e.  ( Prime  \  { 2 } ) )  ->  ( ( B  /L P )  mod  P )  =  ( ( B ^
( ( P  - 
1 )  /  2
) )  mod  P
) )
9912, 71, 98syl2anc 673 . . . . . . . . . . . 12  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( B  /L P )  mod 
P )  =  ( ( B ^ (
( P  -  1 )  /  2 ) )  mod  P ) )
100 modmul1 12177 . . . . . . . . . . . 12  |-  ( ( ( ( B  /L P )  e.  RR  /\  ( B ^ ( ( P  -  1 )  / 
2 ) )  e.  RR )  /\  (
( A ^ (
( P  -  1 )  /  2 ) )  e.  ZZ  /\  P  e.  RR+ )  /\  ( ( B  /L P )  mod 
P )  =  ( ( B ^ (
( P  -  1 )  /  2 ) )  mod  P ) )  ->  ( (
( B  /L
P )  x.  ( A ^ ( ( P  -  1 )  / 
2 ) ) )  mod  P )  =  ( ( ( B ^ ( ( P  -  1 )  / 
2 ) )  x.  ( A ^ (
( P  -  1 )  /  2 ) ) )  mod  P
) )
10196, 97, 77, 30, 99, 100syl221anc 1303 . . . . . . . . . . 11  |-  ( ( ( 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 ) )
10295, 101eqtrd 2505 . . . . . . . . . 10  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( ( A ^ ( ( P  -  1 )  / 
2 ) )  x.  ( B  /L
P ) )  mod 
P )  =  ( ( ( B ^
( ( P  - 
1 )  /  2
) )  x.  ( A ^ ( ( P  -  1 )  / 
2 ) ) )  mod  P ) )
10392, 102eqtrd 2505 . . . . . . . . 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
) )
10484, 86, 1033eqtr4d 2515 . . . . . . . 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 ) )
105 moddvds 14389 . . . . . . . . 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 ) ) ) ) )
10629, 18, 24, 105syl3anc 1292 . . . . . . . 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 ) ) ) ) )
107104, 106mpbid 215 . . . . . . 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 ) ) ) )
10818, 24zsubcld 11068 . . . . . . . 8  |-  ( ( ( 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 )
109 dvdsabsb 14399 . . . . . . . 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 ) ) ) ) ) )
11016, 108, 109syl2anc 673 . . . . . . 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 ) ) ) ) ) )
111107, 110mpbid 215 . . . . . 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 ) ) ) ) )
112 nn0abscl 13452 . . . . . . . . 9  |-  ( ( ( ( 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. 
NN0 )
113108, 112syl 17 . . . . . . . 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 ) ) ) )  e. 
NN0 )
114113nn0zd 11061 . . . . . . 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.  ZZ )
115 dvdsval3 14386 . . . . . . 7  |-  ( ( P  e.  NN  /\  ( abs `  ( ( ( A  x.  B
)  /L P )  -  ( ( A  /L P )  x.  ( B  /L P ) ) ) )  e.  ZZ )  ->  ( 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 ) )
11629, 114, 115syl2anc 673 . . . . . 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 ) ) ) )  <->  ( ( abs `  ( ( ( A  x.  B )  /L P )  -  ( ( A  /L P )  x.  ( B  /L P ) ) ) )  mod  P
)  =  0 ) )
117111, 116mpbid 215 . . . . 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 )
11867, 117eqtr3d 2507 . . . 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 )
11926, 118abs00d 13585 . . 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 )
12019, 25, 119subeq0d 10013 . 2  |-  ( ( ( A  e.  ZZ  /\  B  e.  ZZ  /\  P  e.  Prime )  /\  P  =/=  2 )  -> 
( ( A  x.  B )  /L
P )  =  ( ( A  /L
P )  x.  ( B  /L P ) ) )
12110, 120pm2.61dane 2730 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 setvar class
Syntax hints:    -> wi 4    <-> wb 189    /\ wa 376    /\ w3a 1007    = wceq 1452    e. wcel 1904    =/= wne 2641   {crab 2760    \ cdif 3387   {csn 3959   class class class wbr 4395   ` cfv 5589  (class class class)co 6308   RRcr 9556   0cc0 9557   1c1 9558    + caddc 9560    x. cmul 9562    < clt 9693    <_ cle 9694    - cmin 9880    / cdiv 10291   NNcn 10631   2c2 10681   NN0cn0 10893   ZZcz 10961   ZZ>=cuz 11182   RR+crp 11325    mod cmo 12129   ^cexp 12310   abscabs 13374    || cdvds 14382   Primecprime 14701    /Lclgs 24301
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1677  ax-4 1690  ax-5 1766  ax-6 1813  ax-7 1859  ax-8 1906  ax-9 1913  ax-10 1932  ax-11 1937  ax-12 1950  ax-13 2104  ax-ext 2451  ax-rep 4508  ax-sep 4518  ax-nul 4527  ax-pow 4579  ax-pr 4639  ax-un 6602  ax-cnex 9613  ax-resscn 9614  ax-1cn 9615  ax-icn 9616  ax-addcl 9617  ax-addrcl 9618  ax-mulcl 9619  ax-mulrcl 9620  ax-mulcom 9621  ax-addass 9622  ax-mulass 9623  ax-distr 9624  ax-i2m1 9625  ax-1ne0 9626  ax-1rid 9627  ax-rnegex 9628  ax-rrecex 9629  ax-cnre 9630  ax-pre-lttri 9631  ax-pre-lttrn 9632  ax-pre-ltadd 9633  ax-pre-mulgt0 9634  ax-pre-sup 9635
This theorem depends on definitions:  df-bi 190  df-or 377  df-an 378  df-3or 1008  df-3an 1009  df-tru 1455  df-ex 1672  df-nf 1676  df-sb 1806  df-eu 2323  df-mo 2324  df-clab 2458  df-cleq 2464  df-clel 2467  df-nfc 2601  df-ne 2643  df-nel 2644  df-ral 2761  df-rex 2762  df-reu 2763  df-rmo 2764  df-rab 2765  df-v 3033  df-sbc 3256  df-csb 3350  df-dif 3393  df-un 3395  df-in 3397  df-ss 3404  df-pss 3406  df-nul 3723  df-if 3873  df-pw 3944  df-sn 3960  df-pr 3962  df-tp 3964  df-op 3966  df-uni 4191  df-int 4227  df-iun 4271  df-br 4396  df-opab 4455  df-mpt 4456  df-tr 4491  df-eprel 4750  df-id 4754  df-po 4760  df-so 4761  df-fr 4798  df-we 4800  df-xp 4845  df-rel 4846  df-cnv 4847  df-co 4848  df-dm 4849  df-rn 4850  df-res 4851  df-ima 4852  df-pred 5387  df-ord 5433  df-on 5434  df-lim 5435  df-suc 5436  df-iota 5553  df-fun 5591  df-fn 5592  df-f 5593  df-f1 5594  df-fo 5595  df-f1o 5596  df-fv 5597  df-riota 6270  df-ov 6311  df-oprab 6312  df-mpt2 6313  df-om 6712  df-1st 6812  df-2nd 6813  df-wrecs 7046  df-recs 7108  df-rdg 7146  df-1o 7200  df-2o 7201  df-oadd 7204  df-er 7381  df-map 7492  df-en 7588  df-dom 7589  df-sdom 7590  df-fin 7591  df-sup 7974  df-inf 7975  df-card 8391  df-cda 8616  df-pnf 9695  df-mnf 9696  df-xr 9697  df-ltxr 9698  df-le 9699  df-sub 9882  df-neg 9883  df-div 10292  df-nn 10632  df-2 10690  df-3 10691  df-4 10692  df-5 10693  df-6 10694  df-7 10695  df-8 10696  df-9 10697  df-n0 10894  df-z 10962  df-uz 11183  df-q 11288  df-rp 11326  df-fz 11811  df-fzo 11943  df-fl 12061  df-mod 12130  df-seq 12252  df-exp 12311  df-hash 12554  df-cj 13239  df-re 13240  df-im 13241  df-sqrt 13375  df-abs 13376  df-dvds 14383  df-gcd 14548  df-prm 14702  df-phi 14793  df-pc 14866  df-lgs 24302
This theorem is referenced by:  lgsdir  24337
  Copyright terms: Public domain W3C validator