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

Theorem 2lgslem1a1 25114
Description: Lemma 1 for 2lgslem1a 25116. (Contributed by AV, 16-Jun-2021.)
Assertion
Ref Expression
2lgslem1a1  |-  ( ( P  e.  NN  /\  -.  2  ||  P )  ->  A. i  e.  ( 1 ... ( ( P  -  1 )  /  2 ) ) ( i  x.  2 )  =  ( ( i  x.  2 )  mod  P ) )
Distinct variable group:    P, i

Proof of Theorem 2lgslem1a1
StepHypRef Expression
1 nnrp 11842 . . . . . 6  |-  ( P  e.  NN  ->  P  e.  RR+ )
21adantr 481 . . . . 5  |-  ( ( P  e.  NN  /\  -.  2  ||  P )  ->  P  e.  RR+ )
3 elfzelz 12342 . . . . . 6  |-  ( i  e.  ( 1 ... ( ( P  - 
1 )  /  2
) )  ->  i  e.  ZZ )
4 zre 11381 . . . . . . 7  |-  ( i  e.  ZZ  ->  i  e.  RR )
5 2re 11090 . . . . . . . 8  |-  2  e.  RR
65a1i 11 . . . . . . 7  |-  ( i  e.  ZZ  ->  2  e.  RR )
74, 6remulcld 10070 . . . . . 6  |-  ( i  e.  ZZ  ->  (
i  x.  2 )  e.  RR )
83, 7syl 17 . . . . 5  |-  ( i  e.  ( 1 ... ( ( P  - 
1 )  /  2
) )  ->  (
i  x.  2 )  e.  RR )
92, 8anim12ci 591 . . . 4  |-  ( ( ( P  e.  NN  /\ 
-.  2  ||  P
)  /\  i  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  (
( i  x.  2 )  e.  RR  /\  P  e.  RR+ ) )
10 elfznn 12370 . . . . . 6  |-  ( i  e.  ( 1 ... ( ( P  - 
1 )  /  2
) )  ->  i  e.  NN )
11 nnre 11027 . . . . . . 7  |-  ( i  e.  NN  ->  i  e.  RR )
12 nnnn0 11299 . . . . . . . 8  |-  ( i  e.  NN  ->  i  e.  NN0 )
1312nn0ge0d 11354 . . . . . . 7  |-  ( i  e.  NN  ->  0  <_  i )
14 0le2 11111 . . . . . . . . 9  |-  0  <_  2
155, 14pm3.2i 471 . . . . . . . 8  |-  ( 2  e.  RR  /\  0  <_  2 )
1615a1i 11 . . . . . . 7  |-  ( i  e.  NN  ->  (
2  e.  RR  /\  0  <_  2 ) )
17 mulge0 10546 . . . . . . 7  |-  ( ( ( i  e.  RR  /\  0  <_  i )  /\  ( 2  e.  RR  /\  0  <_  2 ) )  ->  0  <_  ( i  x.  2 ) )
1811, 13, 16, 17syl21anc 1325 . . . . . 6  |-  ( i  e.  NN  ->  0  <_  ( i  x.  2 ) )
1910, 18syl 17 . . . . 5  |-  ( i  e.  ( 1 ... ( ( P  - 
1 )  /  2
) )  ->  0  <_  ( i  x.  2 ) )
2019adantl 482 . . . 4  |-  ( ( ( P  e.  NN  /\ 
-.  2  ||  P
)  /\  i  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  0  <_  ( i  x.  2 ) )
21 elfz2 12333 . . . . . 6  |-  ( i  e.  ( 1 ... ( ( P  - 
1 )  /  2
) )  <->  ( (
1  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  ZZ  /\  i  e.  ZZ )  /\  ( 1  <_  i  /\  i  <_  ( ( P  -  1 )  /  2 ) ) ) )
2243ad2ant3 1084 . . . . . . . . . 10  |-  ( ( 1  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  ZZ  /\  i  e.  ZZ )  ->  i  e.  RR )
23 zre 11381 . . . . . . . . . . 11  |-  ( ( ( P  -  1 )  /  2 )  e.  ZZ  ->  (
( P  -  1 )  /  2 )  e.  RR )
24233ad2ant2 1083 . . . . . . . . . 10  |-  ( ( 1  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  ZZ  /\  i  e.  ZZ )  ->  ( ( P  - 
1 )  /  2
)  e.  RR )
25 2pos 11112 . . . . . . . . . . . 12  |-  0  <  2
265, 25pm3.2i 471 . . . . . . . . . . 11  |-  ( 2  e.  RR  /\  0  <  2 )
2726a1i 11 . . . . . . . . . 10  |-  ( ( 1  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  ZZ  /\  i  e.  ZZ )  ->  ( 2  e.  RR  /\  0  <  2 ) )
28 lemul1 10875 . . . . . . . . . 10  |-  ( ( i  e.  RR  /\  ( ( P  - 
1 )  /  2
)  e.  RR  /\  ( 2  e.  RR  /\  0  <  2 ) )  ->  ( i  <_  ( ( P  - 
1 )  /  2
)  <->  ( i  x.  2 )  <_  (
( ( P  - 
1 )  /  2
)  x.  2 ) ) )
2922, 24, 27, 28syl3anc 1326 . . . . . . . . 9  |-  ( ( 1  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  ZZ  /\  i  e.  ZZ )  ->  ( i  <_  (
( P  -  1 )  /  2 )  <-> 
( i  x.  2 )  <_  ( (
( P  -  1 )  /  2 )  x.  2 ) ) )
30 nncn 11028 . . . . . . . . . . . . . . . . 17  |-  ( P  e.  NN  ->  P  e.  CC )
31 peano2cnm 10347 . . . . . . . . . . . . . . . . 17  |-  ( P  e.  CC  ->  ( P  -  1 )  e.  CC )
3230, 31syl 17 . . . . . . . . . . . . . . . 16  |-  ( P  e.  NN  ->  ( P  -  1 )  e.  CC )
33 2cnd 11093 . . . . . . . . . . . . . . . 16  |-  ( P  e.  NN  ->  2  e.  CC )
34 2ne0 11113 . . . . . . . . . . . . . . . . 17  |-  2  =/=  0
3534a1i 11 . . . . . . . . . . . . . . . 16  |-  ( P  e.  NN  ->  2  =/=  0 )
3632, 33, 35divcan1d 10802 . . . . . . . . . . . . . . 15  |-  ( P  e.  NN  ->  (
( ( P  - 
1 )  /  2
)  x.  2 )  =  ( P  - 
1 ) )
3736adantr 481 . . . . . . . . . . . . . 14  |-  ( ( P  e.  NN  /\  -.  2  ||  P )  ->  ( ( ( P  -  1 )  /  2 )  x.  2 )  =  ( P  -  1 ) )
3837adantl 482 . . . . . . . . . . . . 13  |-  ( ( ( 1  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  ZZ  /\  i  e.  ZZ )  /\  ( P  e.  NN  /\ 
-.  2  ||  P
) )  ->  (
( ( P  - 
1 )  /  2
)  x.  2 )  =  ( P  - 
1 ) )
3938breq2d 4665 . . . . . . . . . . . 12  |-  ( ( ( 1  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  ZZ  /\  i  e.  ZZ )  /\  ( P  e.  NN  /\ 
-.  2  ||  P
) )  ->  (
( i  x.  2 )  <_  ( (
( P  -  1 )  /  2 )  x.  2 )  <->  ( i  x.  2 )  <_  ( P  -  1 ) ) )
40 id 22 . . . . . . . . . . . . . . . 16  |-  ( i  e.  ZZ  ->  i  e.  ZZ )
41 2z 11409 . . . . . . . . . . . . . . . . 17  |-  2  e.  ZZ
4241a1i 11 . . . . . . . . . . . . . . . 16  |-  ( i  e.  ZZ  ->  2  e.  ZZ )
4340, 42zmulcld 11488 . . . . . . . . . . . . . . 15  |-  ( i  e.  ZZ  ->  (
i  x.  2 )  e.  ZZ )
44433ad2ant3 1084 . . . . . . . . . . . . . 14  |-  ( ( 1  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  ZZ  /\  i  e.  ZZ )  ->  ( i  x.  2 )  e.  ZZ )
45 nnz 11399 . . . . . . . . . . . . . . 15  |-  ( P  e.  NN  ->  P  e.  ZZ )
4645adantr 481 . . . . . . . . . . . . . 14  |-  ( ( P  e.  NN  /\  -.  2  ||  P )  ->  P  e.  ZZ )
47 zltlem1 11430 . . . . . . . . . . . . . 14  |-  ( ( ( i  x.  2 )  e.  ZZ  /\  P  e.  ZZ )  ->  ( ( i  x.  2 )  <  P  <->  ( i  x.  2 )  <_  ( P  - 
1 ) ) )
4844, 46, 47syl2an 494 . . . . . . . . . . . . 13  |-  ( ( ( 1  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  ZZ  /\  i  e.  ZZ )  /\  ( P  e.  NN  /\ 
-.  2  ||  P
) )  ->  (
( i  x.  2 )  <  P  <->  ( i  x.  2 )  <_  ( P  -  1 ) ) )
4948biimprd 238 . . . . . . . . . . . 12  |-  ( ( ( 1  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  ZZ  /\  i  e.  ZZ )  /\  ( P  e.  NN  /\ 
-.  2  ||  P
) )  ->  (
( i  x.  2 )  <_  ( P  -  1 )  -> 
( i  x.  2 )  <  P ) )
5039, 49sylbid 230 . . . . . . . . . . 11  |-  ( ( ( 1  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  ZZ  /\  i  e.  ZZ )  /\  ( P  e.  NN  /\ 
-.  2  ||  P
) )  ->  (
( i  x.  2 )  <_  ( (
( P  -  1 )  /  2 )  x.  2 )  -> 
( i  x.  2 )  <  P ) )
5150ex 450 . . . . . . . . . 10  |-  ( ( 1  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  ZZ  /\  i  e.  ZZ )  ->  ( ( P  e.  NN  /\  -.  2  ||  P )  ->  (
( i  x.  2 )  <_  ( (
( P  -  1 )  /  2 )  x.  2 )  -> 
( i  x.  2 )  <  P ) ) )
5251com23 86 . . . . . . . . 9  |-  ( ( 1  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  ZZ  /\  i  e.  ZZ )  ->  ( ( i  x.  2 )  <_  (
( ( P  - 
1 )  /  2
)  x.  2 )  ->  ( ( P  e.  NN  /\  -.  2  ||  P )  -> 
( i  x.  2 )  <  P ) ) )
5329, 52sylbid 230 . . . . . . . 8  |-  ( ( 1  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  ZZ  /\  i  e.  ZZ )  ->  ( i  <_  (
( P  -  1 )  /  2 )  ->  ( ( P  e.  NN  /\  -.  2  ||  P )  -> 
( i  x.  2 )  <  P ) ) )
5453a1d 25 . . . . . . 7  |-  ( ( 1  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  ZZ  /\  i  e.  ZZ )  ->  ( 1  <_  i  ->  ( i  <_  (
( P  -  1 )  /  2 )  ->  ( ( P  e.  NN  /\  -.  2  ||  P )  -> 
( i  x.  2 )  <  P ) ) ) )
5554imp32 449 . . . . . 6  |-  ( ( ( 1  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  ZZ  /\  i  e.  ZZ )  /\  ( 1  <_  i  /\  i  <_  ( ( P  -  1 )  /  2 ) ) )  ->  ( ( P  e.  NN  /\  -.  2  ||  P )  -> 
( i  x.  2 )  <  P ) )
5621, 55sylbi 207 . . . . 5  |-  ( i  e.  ( 1 ... ( ( P  - 
1 )  /  2
) )  ->  (
( P  e.  NN  /\ 
-.  2  ||  P
)  ->  ( i  x.  2 )  <  P
) )
5756impcom 446 . . . 4  |-  ( ( ( P  e.  NN  /\ 
-.  2  ||  P
)  /\  i  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  (
i  x.  2 )  <  P )
58 modid 12695 . . . 4  |-  ( ( ( ( i  x.  2 )  e.  RR  /\  P  e.  RR+ )  /\  ( 0  <_  (
i  x.  2 )  /\  ( i  x.  2 )  <  P
) )  ->  (
( i  x.  2 )  mod  P )  =  ( i  x.  2 ) )
599, 20, 57, 58syl12anc 1324 . . 3  |-  ( ( ( P  e.  NN  /\ 
-.  2  ||  P
)  /\  i  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  (
( i  x.  2 )  mod  P )  =  ( i  x.  2 ) )
6059eqcomd 2628 . 2  |-  ( ( ( P  e.  NN  /\ 
-.  2  ||  P
)  /\  i  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) )  ->  (
i  x.  2 )  =  ( ( i  x.  2 )  mod 
P ) )
6160ralrimiva 2966 1  |-  ( ( P  e.  NN  /\  -.  2  ||  P )  ->  A. i  e.  ( 1 ... ( ( P  -  1 )  /  2 ) ) ( i  x.  2 )  =  ( ( i  x.  2 )  mod  P ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 196    /\ wa 384    /\ w3a 1037    = wceq 1483    e. wcel 1990    =/= wne 2794   A.wral 2912   class class class wbr 4653  (class class class)co 6650   CCcc 9934   RRcr 9935   0cc0 9936   1c1 9937    x. cmul 9941    < clt 10074    <_ cle 10075    - cmin 10266    / cdiv 10684   NNcn 11020   2c2 11070   ZZcz 11377   RR+crp 11832   ...cfz 12326    mod cmo 12668    || cdvds 14983
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1722  ax-4 1737  ax-5 1839  ax-6 1888  ax-7 1935  ax-8 1992  ax-9 1999  ax-10 2019  ax-11 2034  ax-12 2047  ax-13 2246  ax-ext 2602  ax-sep 4781  ax-nul 4789  ax-pow 4843  ax-pr 4906  ax-un 6949  ax-cnex 9992  ax-resscn 9993  ax-1cn 9994  ax-icn 9995  ax-addcl 9996  ax-addrcl 9997  ax-mulcl 9998  ax-mulrcl 9999  ax-mulcom 10000  ax-addass 10001  ax-mulass 10002  ax-distr 10003  ax-i2m1 10004  ax-1ne0 10005  ax-1rid 10006  ax-rnegex 10007  ax-rrecex 10008  ax-cnre 10009  ax-pre-lttri 10010  ax-pre-lttrn 10011  ax-pre-ltadd 10012  ax-pre-mulgt0 10013  ax-pre-sup 10014
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1038  df-3an 1039  df-tru 1486  df-ex 1705  df-nf 1710  df-sb 1881  df-eu 2474  df-mo 2475  df-clab 2609  df-cleq 2615  df-clel 2618  df-nfc 2753  df-ne 2795  df-nel 2898  df-ral 2917  df-rex 2918  df-reu 2919  df-rmo 2920  df-rab 2921  df-v 3202  df-sbc 3436  df-csb 3534  df-dif 3577  df-un 3579  df-in 3581  df-ss 3588  df-pss 3590  df-nul 3916  df-if 4087  df-pw 4160  df-sn 4178  df-pr 4180  df-tp 4182  df-op 4184  df-uni 4437  df-iun 4522  df-br 4654  df-opab 4713  df-mpt 4730  df-tr 4753  df-id 5024  df-eprel 5029  df-po 5035  df-so 5036  df-fr 5073  df-we 5075  df-xp 5120  df-rel 5121  df-cnv 5122  df-co 5123  df-dm 5124  df-rn 5125  df-res 5126  df-ima 5127  df-pred 5680  df-ord 5726  df-on 5727  df-lim 5728  df-suc 5729  df-iota 5851  df-fun 5890  df-fn 5891  df-f 5892  df-f1 5893  df-fo 5894  df-f1o 5895  df-fv 5896  df-riota 6611  df-ov 6653  df-oprab 6654  df-mpt2 6655  df-om 7066  df-1st 7168  df-2nd 7169  df-wrecs 7407  df-recs 7468  df-rdg 7506  df-er 7742  df-en 7956  df-dom 7957  df-sdom 7958  df-sup 8348  df-inf 8349  df-pnf 10076  df-mnf 10077  df-xr 10078  df-ltxr 10079  df-le 10080  df-sub 10268  df-neg 10269  df-div 10685  df-nn 11021  df-2 11079  df-n0 11293  df-z 11378  df-uz 11688  df-rp 11833  df-fz 12327  df-fl 12593  df-mod 12669
This theorem is referenced by:  2lgslem1a  25116
  Copyright terms: Public domain W3C validator