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

Theorem 2lgslem1 15332
Description: Lemma 1 for 2lgs 15345. (Contributed by AV, 19-Jun-2021.)
Assertion
Ref Expression
2lgslem1  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( `  { x  e.  ZZ  |  E. i  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( x  =  ( i  x.  2 )  /\  ( P  /  2 )  < 
( x  mod  P
) ) } )  =  ( ( ( P  -  1 )  /  2 )  -  ( |_ `  ( P  /  4 ) ) ) )
Distinct variable group:    P, i, x

Proof of Theorem 2lgslem1
Dummy variables  f  y are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 2lgslem1a 15329 . . 3  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  ->  { x  e.  ZZ  |  E. i  e.  ( 1 ... ( ( P  -  1 )  /  2 ) ) ( x  =  ( i  x.  2 )  /\  ( P  / 
2 )  <  (
x  mod  P )
) }  =  {
x  e.  ZZ  |  E. i  e.  (
( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) x  =  ( i  x.  2 ) } )
21fveq2d 5562 . 2  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( `  { x  e.  ZZ  |  E. i  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( x  =  ( i  x.  2 )  /\  ( P  /  2 )  < 
( x  mod  P
) ) } )  =  ( `  {
x  e.  ZZ  |  E. i  e.  (
( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) x  =  ( i  x.  2 ) } ) )
3 prmz 12279 . . . . . . . 8  |-  ( P  e.  Prime  ->  P  e.  ZZ )
4 4nn 9154 . . . . . . . 8  |-  4  e.  NN
5 znq 9698 . . . . . . . 8  |-  ( ( P  e.  ZZ  /\  4  e.  NN )  ->  ( P  /  4
)  e.  QQ )
63, 4, 5sylancl 413 . . . . . . 7  |-  ( P  e.  Prime  ->  ( P  /  4 )  e.  QQ )
76adantr 276 . . . . . 6  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( P  /  4
)  e.  QQ )
87flqcld 10367 . . . . 5  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( |_ `  ( P  /  4 ) )  e.  ZZ )
98peano2zd 9451 . . . 4  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( ( |_ `  ( P  /  4
) )  +  1 )  e.  ZZ )
10 nnoddn2prmb 12431 . . . . . 6  |-  ( P  e.  ( Prime  \  {
2 } )  <->  ( P  e.  Prime  /\  -.  2  ||  P ) )
11 oddprm 12428 . . . . . 6  |-  ( P  e.  ( Prime  \  {
2 } )  -> 
( ( P  - 
1 )  /  2
)  e.  NN )
1210, 11sylbir 135 . . . . 5  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( ( P  - 
1 )  /  2
)  e.  NN )
1312nnzd 9447 . . . 4  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( ( P  - 
1 )  /  2
)  e.  ZZ )
149, 13fzfigd 10523 . . 3  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( ( ( |_
`  ( P  / 
4 ) )  +  1 ) ... (
( P  -  1 )  /  2 ) )  e.  Fin )
1514mptexd 5789 . . . 4  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( y  e.  ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) 
|->  ( y  x.  2 ) )  e.  _V )
16 eqid 2196 . . . . 5  |-  ( ( ( |_ `  ( P  /  4 ) )  +  1 ) ... ( ( P  - 
1 )  /  2
) )  =  ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) )
17 eqid 2196 . . . . 5  |-  ( y  e.  ( ( ( |_ `  ( P  /  4 ) )  +  1 ) ... ( ( P  - 
1 )  /  2
) )  |->  ( y  x.  2 ) )  =  ( y  e.  ( ( ( |_
`  ( P  / 
4 ) )  +  1 ) ... (
( P  -  1 )  /  2 ) )  |->  ( y  x.  2 ) )
1816, 172lgslem1b 15330 . . . 4  |-  ( y  e.  ( ( ( |_ `  ( P  /  4 ) )  +  1 ) ... ( ( P  - 
1 )  /  2
) )  |->  ( y  x.  2 ) ) : ( ( ( |_ `  ( P  /  4 ) )  +  1 ) ... ( ( P  - 
1 )  /  2
) ) -1-1-onto-> { x  e.  ZZ  |  E. i  e.  ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) x  =  ( i  x.  2 ) }
19 f1oeq1 5492 . . . . 5  |-  ( f  =  ( y  e.  ( ( ( |_
`  ( P  / 
4 ) )  +  1 ) ... (
( P  -  1 )  /  2 ) )  |->  ( y  x.  2 ) )  -> 
( f : ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) -1-1-onto-> { x  e.  ZZ  |  E. i  e.  (
( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) x  =  ( i  x.  2 ) }  <-> 
( y  e.  ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) 
|->  ( y  x.  2 ) ) : ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) -1-1-onto-> { x  e.  ZZ  |  E. i  e.  (
( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) x  =  ( i  x.  2 ) } ) )
2019spcegv 2852 . . . 4  |-  ( ( y  e.  ( ( ( |_ `  ( P  /  4 ) )  +  1 ) ... ( ( P  - 
1 )  /  2
) )  |->  ( y  x.  2 ) )  e.  _V  ->  (
( y  e.  ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) 
|->  ( y  x.  2 ) ) : ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) -1-1-onto-> { x  e.  ZZ  |  E. i  e.  (
( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) x  =  ( i  x.  2 ) }  ->  E. f  f : ( ( ( |_
`  ( P  / 
4 ) )  +  1 ) ... (
( P  -  1 )  /  2 ) ) -1-1-onto-> { x  e.  ZZ  |  E. i  e.  ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) x  =  ( i  x.  2 ) } ) )
2115, 18, 20mpisyl 1457 . . 3  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  ->  E. f  f :
( ( ( |_
`  ( P  / 
4 ) )  +  1 ) ... (
( P  -  1 )  /  2 ) ) -1-1-onto-> { x  e.  ZZ  |  E. i  e.  ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) x  =  ( i  x.  2 ) } )
22 fihasheqf1oi 10879 . . . . 5  |-  ( ( ( ( ( |_
`  ( P  / 
4 ) )  +  1 ) ... (
( P  -  1 )  /  2 ) )  e.  Fin  /\  f : ( ( ( |_ `  ( P  /  4 ) )  +  1 ) ... ( ( P  - 
1 )  /  2
) ) -1-1-onto-> { x  e.  ZZ  |  E. i  e.  ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) x  =  ( i  x.  2 ) } )  ->  ( `  (
( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) )  =  ( `  {
x  e.  ZZ  |  E. i  e.  (
( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) x  =  ( i  x.  2 ) } ) )
2322ex 115 . . . 4  |-  ( ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) )  e.  Fin  ->  (
f : ( ( ( |_ `  ( P  /  4 ) )  +  1 ) ... ( ( P  - 
1 )  /  2
) ) -1-1-onto-> { x  e.  ZZ  |  E. i  e.  ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) x  =  ( i  x.  2 ) }  ->  ( `  ( (
( |_ `  ( P  /  4 ) )  +  1 ) ... ( ( P  - 
1 )  /  2
) ) )  =  ( `  { x  e.  ZZ  |  E. i  e.  ( ( ( |_
`  ( P  / 
4 ) )  +  1 ) ... (
( P  -  1 )  /  2 ) ) x  =  ( i  x.  2 ) } ) ) )
2423exlimdv 1833 . . 3  |-  ( ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) )  e.  Fin  ->  ( E. f  f :
( ( ( |_
`  ( P  / 
4 ) )  +  1 ) ... (
( P  -  1 )  /  2 ) ) -1-1-onto-> { x  e.  ZZ  |  E. i  e.  ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) x  =  ( i  x.  2 ) }  ->  ( `  ( (
( |_ `  ( P  /  4 ) )  +  1 ) ... ( ( P  - 
1 )  /  2
) ) )  =  ( `  { x  e.  ZZ  |  E. i  e.  ( ( ( |_
`  ( P  / 
4 ) )  +  1 ) ... (
( P  -  1 )  /  2 ) ) x  =  ( i  x.  2 ) } ) ) )
2514, 21, 24sylc 62 . 2  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( `  ( ( ( |_ `  ( P  /  4 ) )  +  1 ) ... ( ( P  - 
1 )  /  2
) ) )  =  ( `  { x  e.  ZZ  |  E. i  e.  ( ( ( |_
`  ( P  / 
4 ) )  +  1 ) ... (
( P  -  1 )  /  2 ) ) x  =  ( i  x.  2 ) } ) )
266flqcld 10367 . . . . 5  |-  ( P  e.  Prime  ->  ( |_
`  ( P  / 
4 ) )  e.  ZZ )
2726adantr 276 . . . 4  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( |_ `  ( P  /  4 ) )  e.  ZZ )
28 oddm1d2 12057 . . . . . 6  |-  ( P  e.  ZZ  ->  ( -.  2  ||  P  <->  ( ( P  -  1 )  /  2 )  e.  ZZ ) )
293, 28syl 14 . . . . 5  |-  ( P  e.  Prime  ->  ( -.  2  ||  P  <->  ( ( P  -  1 )  /  2 )  e.  ZZ ) )
3029biimpa 296 . . . 4  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( ( P  - 
1 )  /  2
)  e.  ZZ )
31 2lgslem1c 15331 . . . 4  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( |_ `  ( P  /  4 ) )  <_  ( ( P  -  1 )  / 
2 ) )
32 eluz2 9607 . . . 4  |-  ( ( ( P  -  1 )  /  2 )  e.  ( ZZ>= `  ( |_ `  ( P  / 
4 ) ) )  <-> 
( ( |_ `  ( P  /  4
) )  e.  ZZ  /\  ( ( P  - 
1 )  /  2
)  e.  ZZ  /\  ( |_ `  ( P  /  4 ) )  <_  ( ( P  -  1 )  / 
2 ) ) )
3327, 30, 31, 32syl3anbrc 1183 . . 3  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( ( P  - 
1 )  /  2
)  e.  ( ZZ>= `  ( |_ `  ( P  /  4 ) ) ) )
34 hashfzp1 10916 . . 3  |-  ( ( ( P  -  1 )  /  2 )  e.  ( ZZ>= `  ( |_ `  ( P  / 
4 ) ) )  ->  ( `  ( (
( |_ `  ( P  /  4 ) )  +  1 ) ... ( ( P  - 
1 )  /  2
) ) )  =  ( ( ( P  -  1 )  / 
2 )  -  ( |_ `  ( P  / 
4 ) ) ) )
3533, 34syl 14 . 2  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( `  ( ( ( |_ `  ( P  /  4 ) )  +  1 ) ... ( ( P  - 
1 )  /  2
) ) )  =  ( ( ( P  -  1 )  / 
2 )  -  ( |_ `  ( P  / 
4 ) ) ) )
362, 25, 353eqtr2d 2235 1  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( `  { x  e.  ZZ  |  E. i  e.  ( 1 ... (
( P  -  1 )  /  2 ) ) ( x  =  ( i  x.  2 )  /\  ( P  /  2 )  < 
( x  mod  P
) ) } )  =  ( ( ( P  -  1 )  /  2 )  -  ( |_ `  ( P  /  4 ) ) ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 104    <-> wb 105    = wceq 1364   E.wex 1506    e. wcel 2167   E.wrex 2476   {crab 2479   _Vcvv 2763    \ cdif 3154   {csn 3622   class class class wbr 4033    |-> cmpt 4094   -1-1-onto->wf1o 5257   ` cfv 5258  (class class class)co 5922   Fincfn 6799   1c1 7880    + caddc 7882    x. cmul 7884    < clt 8061    <_ cle 8062    - cmin 8197    / cdiv 8699   NNcn 8990   2c2 9041   4c4 9043   ZZcz 9326   ZZ>=cuz 9601   QQcq 9693   ...cfz 10083   |_cfl 10358    mod cmo 10414  ♯chash 10867    || cdvds 11952   Primecprime 12275
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 615  ax-in2 616  ax-io 710  ax-5 1461  ax-7 1462  ax-gen 1463  ax-ie1 1507  ax-ie2 1508  ax-8 1518  ax-10 1519  ax-11 1520  ax-i12 1521  ax-bndl 1523  ax-4 1524  ax-17 1540  ax-i9 1544  ax-ial 1548  ax-i5r 1549  ax-13 2169  ax-14 2170  ax-ext 2178  ax-coll 4148  ax-sep 4151  ax-nul 4159  ax-pow 4207  ax-pr 4242  ax-un 4468  ax-setind 4573  ax-iinf 4624  ax-cnex 7970  ax-resscn 7971  ax-1cn 7972  ax-1re 7973  ax-icn 7974  ax-addcl 7975  ax-addrcl 7976  ax-mulcl 7977  ax-mulrcl 7978  ax-addcom 7979  ax-mulcom 7980  ax-addass 7981  ax-mulass 7982  ax-distr 7983  ax-i2m1 7984  ax-0lt1 7985  ax-1rid 7986  ax-0id 7987  ax-rnegex 7988  ax-precex 7989  ax-cnre 7990  ax-pre-ltirr 7991  ax-pre-ltwlin 7992  ax-pre-lttrn 7993  ax-pre-apti 7994  ax-pre-ltadd 7995  ax-pre-mulgt0 7996  ax-pre-mulext 7997  ax-arch 7998  ax-caucvg 7999
This theorem depends on definitions:  df-bi 117  df-dc 836  df-3or 981  df-3an 982  df-tru 1367  df-fal 1370  df-xor 1387  df-nf 1475  df-sb 1777  df-eu 2048  df-mo 2049  df-clab 2183  df-cleq 2189  df-clel 2192  df-nfc 2328  df-ne 2368  df-nel 2463  df-ral 2480  df-rex 2481  df-reu 2482  df-rmo 2483  df-rab 2484  df-v 2765  df-sbc 2990  df-csb 3085  df-dif 3159  df-un 3161  df-in 3163  df-ss 3170  df-nul 3451  df-if 3562  df-pw 3607  df-sn 3628  df-pr 3629  df-op 3631  df-uni 3840  df-int 3875  df-iun 3918  df-br 4034  df-opab 4095  df-mpt 4096  df-tr 4132  df-id 4328  df-po 4331  df-iso 4332  df-iord 4401  df-on 4403  df-ilim 4404  df-suc 4406  df-iom 4627  df-xp 4669  df-rel 4670  df-cnv 4671  df-co 4672  df-dm 4673  df-rn 4674  df-res 4675  df-ima 4676  df-iota 5219  df-fun 5260  df-fn 5261  df-f 5262  df-f1 5263  df-fo 5264  df-f1o 5265  df-fv 5266  df-riota 5877  df-ov 5925  df-oprab 5926  df-mpo 5927  df-1st 6198  df-2nd 6199  df-recs 6363  df-frec 6449  df-1o 6474  df-2o 6475  df-er 6592  df-en 6800  df-dom 6801  df-fin 6802  df-pnf 8063  df-mnf 8064  df-xr 8065  df-ltxr 8066  df-le 8067  df-sub 8199  df-neg 8200  df-reap 8602  df-ap 8609  df-div 8700  df-inn 8991  df-2 9049  df-3 9050  df-4 9051  df-n0 9250  df-z 9327  df-uz 9602  df-q 9694  df-rp 9729  df-fz 10084  df-fl 10360  df-mod 10415  df-seqfrec 10540  df-exp 10631  df-ihash 10868  df-cj 11007  df-re 11008  df-im 11009  df-rsqrt 11163  df-abs 11164  df-dvds 11953  df-prm 12276
This theorem is referenced by:  2lgs  15345
  Copyright terms: Public domain W3C validator