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

Theorem 2lgslem1 15612
Description: Lemma 1 for 2lgs 15625. (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 15609 . . 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 5587 . 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 12477 . . . . . . . 8  |-  ( P  e.  Prime  ->  P  e.  ZZ )
4 4nn 9207 . . . . . . . 8  |-  4  e.  NN
5 znq 9752 . . . . . . . 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 10427 . . . . 5  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( |_ `  ( P  /  4 ) )  e.  ZZ )
98peano2zd 9505 . . . 4  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( ( |_ `  ( P  /  4
) )  +  1 )  e.  ZZ )
10 nnoddn2prmb 12629 . . . . . 6  |-  ( P  e.  ( Prime  \  {
2 } )  <->  ( P  e.  Prime  /\  -.  2  ||  P ) )
11 oddprm 12626 . . . . . 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 9501 . . . 4  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( ( P  - 
1 )  /  2
)  e.  ZZ )
149, 13fzfigd 10583 . . 3  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( ( ( |_
`  ( P  / 
4 ) )  +  1 ) ... (
( P  -  1 )  /  2 ) )  e.  Fin )
1514mptexd 5818 . . . 4  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( y  e.  ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) ) 
|->  ( y  x.  2 ) )  e.  _V )
16 eqid 2206 . . . . 5  |-  ( ( ( |_ `  ( P  /  4 ) )  +  1 ) ... ( ( P  - 
1 )  /  2
) )  =  ( ( ( |_ `  ( P  /  4
) )  +  1 ) ... ( ( P  -  1 )  /  2 ) )
17 eqid 2206 . . . . 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 15610 . . . 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 5517 . . . . 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 2862 . . . 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 1467 . . 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 10939 . . . . 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 1843 . . 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 10427 . . . . 5  |-  ( P  e.  Prime  ->  ( |_
`  ( P  / 
4 ) )  e.  ZZ )
2726adantr 276 . . . 4  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( |_ `  ( P  /  4 ) )  e.  ZZ )
28 oddm1d2 12247 . . . . . 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 15611 . . . 4  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( |_ `  ( P  /  4 ) )  <_  ( ( P  -  1 )  / 
2 ) )
32 eluz2 9661 . . . 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 1184 . . 3  |-  ( ( P  e.  Prime  /\  -.  2  ||  P )  -> 
( ( P  - 
1 )  /  2
)  e.  ( ZZ>= `  ( |_ `  ( P  /  4 ) ) ) )
34 hashfzp1 10976 . . 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 2245 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 1373   E.wex 1516    e. wcel 2177   E.wrex 2486   {crab 2489   _Vcvv 2773    \ cdif 3164   {csn 3634   class class class wbr 4047    |-> cmpt 4109   -1-1-onto->wf1o 5275   ` cfv 5276  (class class class)co 5951   Fincfn 6834   1c1 7933    + caddc 7935    x. cmul 7937    < clt 8114    <_ cle 8115    - cmin 8250    / cdiv 8752   NNcn 9043   2c2 9094   4c4 9096   ZZcz 9379   ZZ>=cuz 9655   QQcq 9747   ...cfz 10137   |_cfl 10418    mod cmo 10474  ♯chash 10927    || cdvds 12142   Primecprime 12473
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 711  ax-5 1471  ax-7 1472  ax-gen 1473  ax-ie1 1517  ax-ie2 1518  ax-8 1528  ax-10 1529  ax-11 1530  ax-i12 1531  ax-bndl 1533  ax-4 1534  ax-17 1550  ax-i9 1554  ax-ial 1558  ax-i5r 1559  ax-13 2179  ax-14 2180  ax-ext 2188  ax-coll 4163  ax-sep 4166  ax-nul 4174  ax-pow 4222  ax-pr 4257  ax-un 4484  ax-setind 4589  ax-iinf 4640  ax-cnex 8023  ax-resscn 8024  ax-1cn 8025  ax-1re 8026  ax-icn 8027  ax-addcl 8028  ax-addrcl 8029  ax-mulcl 8030  ax-mulrcl 8031  ax-addcom 8032  ax-mulcom 8033  ax-addass 8034  ax-mulass 8035  ax-distr 8036  ax-i2m1 8037  ax-0lt1 8038  ax-1rid 8039  ax-0id 8040  ax-rnegex 8041  ax-precex 8042  ax-cnre 8043  ax-pre-ltirr 8044  ax-pre-ltwlin 8045  ax-pre-lttrn 8046  ax-pre-apti 8047  ax-pre-ltadd 8048  ax-pre-mulgt0 8049  ax-pre-mulext 8050  ax-arch 8051  ax-caucvg 8052
This theorem depends on definitions:  df-bi 117  df-dc 837  df-3or 982  df-3an 983  df-tru 1376  df-fal 1379  df-xor 1396  df-nf 1485  df-sb 1787  df-eu 2058  df-mo 2059  df-clab 2193  df-cleq 2199  df-clel 2202  df-nfc 2338  df-ne 2378  df-nel 2473  df-ral 2490  df-rex 2491  df-reu 2492  df-rmo 2493  df-rab 2494  df-v 2775  df-sbc 3000  df-csb 3095  df-dif 3169  df-un 3171  df-in 3173  df-ss 3180  df-nul 3462  df-if 3573  df-pw 3619  df-sn 3640  df-pr 3641  df-op 3643  df-uni 3853  df-int 3888  df-iun 3931  df-br 4048  df-opab 4110  df-mpt 4111  df-tr 4147  df-id 4344  df-po 4347  df-iso 4348  df-iord 4417  df-on 4419  df-ilim 4420  df-suc 4422  df-iom 4643  df-xp 4685  df-rel 4686  df-cnv 4687  df-co 4688  df-dm 4689  df-rn 4690  df-res 4691  df-ima 4692  df-iota 5237  df-fun 5278  df-fn 5279  df-f 5280  df-f1 5281  df-fo 5282  df-f1o 5283  df-fv 5284  df-riota 5906  df-ov 5954  df-oprab 5955  df-mpo 5956  df-1st 6233  df-2nd 6234  df-recs 6398  df-frec 6484  df-1o 6509  df-2o 6510  df-er 6627  df-en 6835  df-dom 6836  df-fin 6837  df-pnf 8116  df-mnf 8117  df-xr 8118  df-ltxr 8119  df-le 8120  df-sub 8252  df-neg 8253  df-reap 8655  df-ap 8662  df-div 8753  df-inn 9044  df-2 9102  df-3 9103  df-4 9104  df-n0 9303  df-z 9380  df-uz 9656  df-q 9748  df-rp 9783  df-fz 10138  df-fl 10420  df-mod 10475  df-seqfrec 10600  df-exp 10691  df-ihash 10928  df-cj 11197  df-re 11198  df-im 11199  df-rsqrt 11353  df-abs 11354  df-dvds 12143  df-prm 12474
This theorem is referenced by:  2lgs  15625
  Copyright terms: Public domain W3C validator