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

Theorem 2lgslem1 15735
Description: Lemma 1 for 2lgs 15748. (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 15732 . . 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 5607 . 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 12599 . . . . . . . 8  |-  ( P  e.  Prime  ->  P  e.  ZZ )
4 4nn 9242 . . . . . . . 8  |-  4  e.  NN
5 znq 9787 . . . . . . . 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 10464 . . . . 5  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( |_ `  ( P  /  4 ) )  e.  ZZ )
98peano2zd 9540 . . . 4  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( ( |_ `  ( P  /  4
) )  +  1 )  e.  ZZ )
10 nnoddn2prmb 12751 . . . . . 6  |-  ( P  e.  ( Prime  \  {
2 } )  <->  ( P  e.  Prime  /\  -.  2  ||  P ) )
11 oddprm 12748 . . . . . 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 9536 . . . 4  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( ( P  - 
1 )  /  2
)  e.  ZZ )
149, 13fzfigd 10620 . . 3  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( ( ( |_
`  ( P  / 
4 ) )  +  1 ) ... (
( P  -  1 )  /  2 ) )  e.  Fin )
1514mptexd 5839 . . . 4  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( y  e.  ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) 
|->  ( y  x.  2 ) )  e.  _V )
16 eqid 2209 . . . . 5  |-  ( ( ( |_ `  ( P  /  4 ) )  +  1 ) ... ( ( P  - 
1 )  /  2
) )  =  ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) )
17 eqid 2209 . . . . 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 15733 . . . 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 5536 . . . . 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 2871 . . . 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 1469 . . 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 10976 . . . . 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 1845 . . 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 10464 . . . . 5  |-  ( P  e.  Prime  ->  ( |_
`  ( P  / 
4 ) )  e.  ZZ )
2726adantr 276 . . . 4  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( |_ `  ( P  /  4 ) )  e.  ZZ )
28 oddm1d2 12369 . . . . . 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 15734 . . . 4  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( |_ `  ( P  /  4 ) )  <_  ( ( P  -  1 )  / 
2 ) )
32 eluz2 9696 . . . 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 1186 . . 3  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( ( P  - 
1 )  /  2
)  e.  ( ZZ>= `  ( |_ `  ( P  /  4 ) ) ) )
34 hashfzp1 11013 . . 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 2248 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 1375   E.wex 1518    e. wcel 2180   E.wrex 2489   {crab 2492   _Vcvv 2779    \ cdif 3174   {csn 3646   class class class wbr 4062    |-> cmpt 4124   -1-1-onto->wf1o 5293   ` cfv 5294  (class class class)co 5974   Fincfn 6857   1c1 7968    + caddc 7970    x. cmul 7972    < clt 8149    <_ cle 8150    - cmin 8285    / cdiv 8787   NNcn 9078   2c2 9129   4c4 9131   ZZcz 9414   ZZ>=cuz 9690   QQcq 9782   ...cfz 10172   |_cfl 10455    mod cmo 10511  ♯chash 10964    || cdvds 12264   Primecprime 12595
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 617  ax-in2 618  ax-io 713  ax-5 1473  ax-7 1474  ax-gen 1475  ax-ie1 1519  ax-ie2 1520  ax-8 1530  ax-10 1531  ax-11 1532  ax-i12 1533  ax-bndl 1535  ax-4 1536  ax-17 1552  ax-i9 1556  ax-ial 1560  ax-i5r 1561  ax-13 2182  ax-14 2183  ax-ext 2191  ax-coll 4178  ax-sep 4181  ax-nul 4189  ax-pow 4237  ax-pr 4272  ax-un 4501  ax-setind 4606  ax-iinf 4657  ax-cnex 8058  ax-resscn 8059  ax-1cn 8060  ax-1re 8061  ax-icn 8062  ax-addcl 8063  ax-addrcl 8064  ax-mulcl 8065  ax-mulrcl 8066  ax-addcom 8067  ax-mulcom 8068  ax-addass 8069  ax-mulass 8070  ax-distr 8071  ax-i2m1 8072  ax-0lt1 8073  ax-1rid 8074  ax-0id 8075  ax-rnegex 8076  ax-precex 8077  ax-cnre 8078  ax-pre-ltirr 8079  ax-pre-ltwlin 8080  ax-pre-lttrn 8081  ax-pre-apti 8082  ax-pre-ltadd 8083  ax-pre-mulgt0 8084  ax-pre-mulext 8085  ax-arch 8086  ax-caucvg 8087
This theorem depends on definitions:  df-bi 117  df-dc 839  df-3or 984  df-3an 985  df-tru 1378  df-fal 1381  df-xor 1398  df-nf 1487  df-sb 1789  df-eu 2060  df-mo 2061  df-clab 2196  df-cleq 2202  df-clel 2205  df-nfc 2341  df-ne 2381  df-nel 2476  df-ral 2493  df-rex 2494  df-reu 2495  df-rmo 2496  df-rab 2497  df-v 2781  df-sbc 3009  df-csb 3105  df-dif 3179  df-un 3181  df-in 3183  df-ss 3190  df-nul 3472  df-if 3583  df-pw 3631  df-sn 3652  df-pr 3653  df-op 3655  df-uni 3868  df-int 3903  df-iun 3946  df-br 4063  df-opab 4125  df-mpt 4126  df-tr 4162  df-id 4361  df-po 4364  df-iso 4365  df-iord 4434  df-on 4436  df-ilim 4437  df-suc 4439  df-iom 4660  df-xp 4702  df-rel 4703  df-cnv 4704  df-co 4705  df-dm 4706  df-rn 4707  df-res 4708  df-ima 4709  df-iota 5254  df-fun 5296  df-fn 5297  df-f 5298  df-f1 5299  df-fo 5300  df-f1o 5301  df-fv 5302  df-riota 5927  df-ov 5977  df-oprab 5978  df-mpo 5979  df-1st 6256  df-2nd 6257  df-recs 6421  df-frec 6507  df-1o 6532  df-2o 6533  df-er 6650  df-en 6858  df-dom 6859  df-fin 6860  df-pnf 8151  df-mnf 8152  df-xr 8153  df-ltxr 8154  df-le 8155  df-sub 8287  df-neg 8288  df-reap 8690  df-ap 8697  df-div 8788  df-inn 9079  df-2 9137  df-3 9138  df-4 9139  df-n0 9338  df-z 9415  df-uz 9691  df-q 9783  df-rp 9818  df-fz 10173  df-fl 10457  df-mod 10512  df-seqfrec 10637  df-exp 10728  df-ihash 10965  df-cj 11319  df-re 11320  df-im 11321  df-rsqrt 11475  df-abs 11476  df-dvds 12265  df-prm 12596
This theorem is referenced by:  2lgs  15748
  Copyright terms: Public domain W3C validator