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

Theorem lgsdchrval 22645
Description: The Legendre symbol function  X ( m )  =  ( m  /L N ), where  N is an odd positive number, is a Dirichlet character modulo  N. (Contributed by Mario Carneiro, 28-Apr-2016.)
Hypotheses
Ref Expression
lgsdchr.g  |-  G  =  (DChr `  N )
lgsdchr.z  |-  Z  =  (ℤ/n `  N )
lgsdchr.d  |-  D  =  ( Base `  G
)
lgsdchr.b  |-  B  =  ( Base `  Z
)
lgsdchr.l  |-  L  =  ( ZRHom `  Z
)
lgsdchr.x  |-  X  =  ( y  e.  B  |->  ( iota h E. m  e.  ZZ  (
y  =  ( L `
 m )  /\  h  =  ( m  /L N ) ) ) )
Assertion
Ref Expression
lgsdchrval  |-  ( ( ( N  e.  NN  /\ 
-.  2  ||  N
)  /\  A  e.  ZZ )  ->  ( X `
 ( L `  A ) )  =  ( A  /L
N ) )
Distinct variable groups:    y, B    h, m, y, L    h, N, m, y    y, X    A, h, m, y    y, Z
Allowed substitution hints:    B( h, m)    D( y, h, m)    G( y, h, m)    X( h, m)    Z( h, m)

Proof of Theorem lgsdchrval
StepHypRef Expression
1 nnnn0 10582 . . . . . 6  |-  ( N  e.  NN  ->  N  e.  NN0 )
21adantr 462 . . . . 5  |-  ( ( N  e.  NN  /\  -.  2  ||  N )  ->  N  e.  NN0 )
3 lgsdchr.z . . . . . 6  |-  Z  =  (ℤ/n `  N )
4 lgsdchr.b . . . . . 6  |-  B  =  ( Base `  Z
)
5 lgsdchr.l . . . . . 6  |-  L  =  ( ZRHom `  Z
)
63, 4, 5znzrhfo 17939 . . . . 5  |-  ( N  e.  NN0  ->  L : ZZ -onto-> B )
7 fof 5617 . . . . 5  |-  ( L : ZZ -onto-> B  ->  L : ZZ --> B )
82, 6, 73syl 20 . . . 4  |-  ( ( N  e.  NN  /\  -.  2  ||  N )  ->  L : ZZ --> B )
98ffvelrnda 5840 . . 3  |-  ( ( ( N  e.  NN  /\ 
-.  2  ||  N
)  /\  A  e.  ZZ )  ->  ( L `
 A )  e.  B )
10 eqeq1 2447 . . . . . . 7  |-  ( y  =  ( L `  A )  ->  (
y  =  ( L `
 m )  <->  ( L `  A )  =  ( L `  m ) ) )
1110anbi1d 699 . . . . . 6  |-  ( y  =  ( L `  A )  ->  (
( y  =  ( L `  m )  /\  h  =  ( m  /L N ) )  <->  ( ( L `  A )  =  ( L `  m )  /\  h  =  ( m  /L N ) ) ) )
1211rexbidv 2734 . . . . 5  |-  ( y  =  ( L `  A )  ->  ( E. m  e.  ZZ  ( y  =  ( L `  m )  /\  h  =  ( m  /L N ) )  <->  E. m  e.  ZZ  ( ( L `
 A )  =  ( L `  m
)  /\  h  =  ( m  /L N ) ) ) )
1312iotabidv 5399 . . . 4  |-  ( y  =  ( L `  A )  ->  ( iota h E. m  e.  ZZ  ( y  =  ( L `  m
)  /\  h  =  ( m  /L N ) ) )  =  ( iota h E. m  e.  ZZ  (
( L `  A
)  =  ( L `
 m )  /\  h  =  ( m  /L N ) ) ) )
14 lgsdchr.x . . . 4  |-  X  =  ( y  e.  B  |->  ( iota h E. m  e.  ZZ  (
y  =  ( L `
 m )  /\  h  =  ( m  /L N ) ) ) )
15 iotaex 5395 . . . 4  |-  ( iota
h E. m  e.  ZZ  ( y  =  ( L `  m
)  /\  h  =  ( m  /L N ) ) )  e. 
_V
1613, 14, 15fvmpt3i 5775 . . 3  |-  ( ( L `  A )  e.  B  ->  ( X `  ( L `  A ) )  =  ( iota h E. m  e.  ZZ  (
( L `  A
)  =  ( L `
 m )  /\  h  =  ( m  /L N ) ) ) )
179, 16syl 16 . 2  |-  ( ( ( N  e.  NN  /\ 
-.  2  ||  N
)  /\  A  e.  ZZ )  ->  ( X `
 ( L `  A ) )  =  ( iota h E. m  e.  ZZ  (
( L `  A
)  =  ( L `
 m )  /\  h  =  ( m  /L N ) ) ) )
18 ovex 6115 . . 3  |-  ( A  /L N )  e.  _V
19 simprr 751 . . . . . . . . . . . . . . 15  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( L `  A )  =  ( L `  m ) )
20 simplll 752 . . . . . . . . . . . . . . . . 17  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  N  e.  NN )
2120, 1syl 16 . . . . . . . . . . . . . . . 16  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  N  e.  NN0 )
22 simplr 749 . . . . . . . . . . . . . . . 16  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  A  e.  ZZ )
23 simprl 750 . . . . . . . . . . . . . . . 16  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  m  e.  ZZ )
243, 5zndvds 17941 . . . . . . . . . . . . . . . 16  |-  ( ( N  e.  NN0  /\  A  e.  ZZ  /\  m  e.  ZZ )  ->  (
( L `  A
)  =  ( L `
 m )  <->  N  ||  ( A  -  m )
) )
2521, 22, 23, 24syl3anc 1213 . . . . . . . . . . . . . . 15  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( ( L `
 A )  =  ( L `  m
)  <->  N  ||  ( A  -  m ) ) )
2619, 25mpbid 210 . . . . . . . . . . . . . 14  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  N  ||  ( A  -  m )
)
27 moddvds 13538 . . . . . . . . . . . . . . 15  |-  ( ( N  e.  NN  /\  A  e.  ZZ  /\  m  e.  ZZ )  ->  (
( A  mod  N
)  =  ( m  mod  N )  <->  N  ||  ( A  -  m )
) )
2820, 22, 23, 27syl3anc 1213 . . . . . . . . . . . . . 14  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( ( A  mod  N )  =  ( m  mod  N
)  <->  N  ||  ( A  -  m ) ) )
2926, 28mpbird 232 . . . . . . . . . . . . 13  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( A  mod  N )  =  ( m  mod  N ) )
3029oveq1d 6105 . . . . . . . . . . . 12  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( ( A  mod  N )  /L N )  =  ( ( m  mod  N )  /L N ) )
31 simpllr 753 . . . . . . . . . . . . 13  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  -.  2  ||  N )
32 lgsmod 22619 . . . . . . . . . . . . 13  |-  ( ( A  e.  ZZ  /\  N  e.  NN  /\  -.  2  ||  N )  -> 
( ( A  mod  N )  /L N )  =  ( A  /L N ) )
3322, 20, 31, 32syl3anc 1213 . . . . . . . . . . . 12  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( ( A  mod  N )  /L N )  =  ( A  /L
N ) )
34 lgsmod 22619 . . . . . . . . . . . . 13  |-  ( ( m  e.  ZZ  /\  N  e.  NN  /\  -.  2  ||  N )  -> 
( ( m  mod  N )  /L N )  =  ( m  /L N ) )
3523, 20, 31, 34syl3anc 1213 . . . . . . . . . . . 12  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( ( m  mod  N )  /L N )  =  ( m  /L
N ) )
3630, 33, 353eqtr3d 2481 . . . . . . . . . . 11  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( A  /L N )  =  ( m  /L
N ) )
3736eqeq2d 2452 . . . . . . . . . 10  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( h  =  ( A  /L
N )  <->  h  =  ( m  /L N ) ) )
3837biimprd 223 . . . . . . . . 9  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( h  =  ( m  /L
N )  ->  h  =  ( A  /L N ) ) )
3938anassrs 643 . . . . . . . 8  |-  ( ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  m  e.  ZZ )  /\  ( L `  A )  =  ( L `  m ) )  ->  ( h  =  ( m  /L N )  ->  h  =  ( A  /L N ) ) )
4039expimpd 600 . . . . . . 7  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  m  e.  ZZ )  ->  (
( ( L `  A )  =  ( L `  m )  /\  h  =  ( m  /L N ) )  ->  h  =  ( A  /L N ) ) )
4140rexlimdva 2839 . . . . . 6  |-  ( ( ( N  e.  NN  /\ 
-.  2  ||  N
)  /\  A  e.  ZZ )  ->  ( E. m  e.  ZZ  (
( L `  A
)  =  ( L `
 m )  /\  h  =  ( m  /L N ) )  ->  h  =  ( A  /L N ) ) )
42 fveq2 5688 . . . . . . . . . . . 12  |-  ( m  =  A  ->  ( L `  m )  =  ( L `  A ) )
4342eqcomd 2446 . . . . . . . . . . 11  |-  ( m  =  A  ->  ( L `  A )  =  ( L `  m ) )
4443biantrurd 505 . . . . . . . . . 10  |-  ( m  =  A  ->  (
h  =  ( m  /L N )  <-> 
( ( L `  A )  =  ( L `  m )  /\  h  =  ( m  /L N ) ) ) )
45 oveq1 6097 . . . . . . . . . . 11  |-  ( m  =  A  ->  (
m  /L N )  =  ( A  /L N ) )
4645eqeq2d 2452 . . . . . . . . . 10  |-  ( m  =  A  ->  (
h  =  ( m  /L N )  <-> 
h  =  ( A  /L N ) ) )
4744, 46bitr3d 255 . . . . . . . . 9  |-  ( m  =  A  ->  (
( ( L `  A )  =  ( L `  m )  /\  h  =  ( m  /L N ) )  <->  h  =  ( A  /L N ) ) )
4847rspcev 3070 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  h  =  ( A  /L N ) )  ->  E. m  e.  ZZ  ( ( L `  A )  =  ( L `  m )  /\  h  =  ( m  /L N ) ) )
4948ex 434 . . . . . . 7  |-  ( A  e.  ZZ  ->  (
h  =  ( A  /L N )  ->  E. m  e.  ZZ  ( ( L `  A )  =  ( L `  m )  /\  h  =  ( m  /L N ) ) ) )
5049adantl 463 . . . . . 6  |-  ( ( ( N  e.  NN  /\ 
-.  2  ||  N
)  /\  A  e.  ZZ )  ->  ( h  =  ( A  /L N )  ->  E. m  e.  ZZ  ( ( L `  A )  =  ( L `  m )  /\  h  =  ( m  /L N ) ) ) )
5141, 50impbid 191 . . . . 5  |-  ( ( ( N  e.  NN  /\ 
-.  2  ||  N
)  /\  A  e.  ZZ )  ->  ( E. m  e.  ZZ  (
( L `  A
)  =  ( L `
 m )  /\  h  =  ( m  /L N ) )  <-> 
h  =  ( A  /L N ) ) )
5251adantr 462 . . . 4  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  ( A  /L N )  e.  _V )  -> 
( E. m  e.  ZZ  ( ( L `
 A )  =  ( L `  m
)  /\  h  =  ( m  /L N ) )  <->  h  =  ( A  /L N ) ) )
5352iota5 5398 . . 3  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  ( A  /L N )  e.  _V )  -> 
( iota h E. m  e.  ZZ  ( ( L `
 A )  =  ( L `  m
)  /\  h  =  ( m  /L N ) ) )  =  ( A  /L
N ) )
5418, 53mpan2 666 . 2  |-  ( ( ( N  e.  NN  /\ 
-.  2  ||  N
)  /\  A  e.  ZZ )  ->  ( iota
h E. m  e.  ZZ  ( ( L `
 A )  =  ( L `  m
)  /\  h  =  ( m  /L N ) ) )  =  ( A  /L
N ) )
5517, 54eqtrd 2473 1  |-  ( ( ( N  e.  NN  /\ 
-.  2  ||  N
)  /\  A  e.  ZZ )  ->  ( X `
 ( L `  A ) )  =  ( A  /L
N ) )
Colors of variables: wff setvar class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 184    /\ wa 369    = wceq 1364    e. wcel 1761   E.wrex 2714   _Vcvv 2970   class class class wbr 4289    e. cmpt 4347   iotacio 5376   -->wf 5411   -onto->wfo 5413   ` cfv 5415  (class class class)co 6090    - cmin 9591   NNcn 10318   2c2 10367   NN0cn0 10575   ZZcz 10642    mod cmo 11704    || cdivides 13531   Basecbs 14170   ZRHomczrh 17890  ℤ/nczn 17893  DChrcdchr 22530    /Lclgs 22592
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1596  ax-4 1607  ax-5 1675  ax-6 1713  ax-7 1733  ax-8 1763  ax-9 1765  ax-10 1780  ax-11 1785  ax-12 1797  ax-13 1948  ax-ext 2422  ax-rep 4400  ax-sep 4410  ax-nul 4418  ax-pow 4467  ax-pr 4528  ax-un 6371  ax-inf2 7843  ax-cnex 9334  ax-resscn 9335  ax-1cn 9336  ax-icn 9337  ax-addcl 9338  ax-addrcl 9339  ax-mulcl 9340  ax-mulrcl 9341  ax-mulcom 9342  ax-addass 9343  ax-mulass 9344  ax-distr 9345  ax-i2m1 9346  ax-1ne0 9347  ax-1rid 9348  ax-rnegex 9349  ax-rrecex 9350  ax-cnre 9351  ax-pre-lttri 9352  ax-pre-lttrn 9353  ax-pre-ltadd 9354  ax-pre-mulgt0 9355  ax-pre-sup 9356  ax-addf 9357  ax-mulf 9358
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 961  df-3an 962  df-tru 1367  df-ex 1592  df-nf 1595  df-sb 1706  df-eu 2261  df-mo 2262  df-clab 2428  df-cleq 2434  df-clel 2437  df-nfc 2566  df-ne 2606  df-nel 2607  df-ral 2718  df-rex 2719  df-reu 2720  df-rmo 2721  df-rab 2722  df-v 2972  df-sbc 3184  df-csb 3286  df-dif 3328  df-un 3330  df-in 3332  df-ss 3339  df-pss 3341  df-nul 3635  df-if 3789  df-pw 3859  df-sn 3875  df-pr 3877  df-tp 3879  df-op 3881  df-uni 4089  df-int 4126  df-iun 4170  df-br 4290  df-opab 4348  df-mpt 4349  df-tr 4383  df-eprel 4628  df-id 4632  df-po 4637  df-so 4638  df-fr 4675  df-we 4677  df-ord 4718  df-on 4719  df-lim 4720  df-suc 4721  df-xp 4842  df-rel 4843  df-cnv 4844  df-co 4845  df-dm 4846  df-rn 4847  df-res 4848  df-ima 4849  df-iota 5378  df-fun 5417  df-fn 5418  df-f 5419  df-f1 5420  df-fo 5421  df-f1o 5422  df-fv 5423  df-riota 6049  df-ov 6093  df-oprab 6094  df-mpt2 6095  df-om 6476  df-1st 6576  df-2nd 6577  df-tpos 6744  df-recs 6828  df-rdg 6862  df-1o 6916  df-2o 6917  df-oadd 6920  df-er 7097  df-ec 7099  df-qs 7103  df-map 7212  df-en 7307  df-dom 7308  df-sdom 7309  df-fin 7310  df-sup 7687  df-card 8105  df-cda 8333  df-pnf 9416  df-mnf 9417  df-xr 9418  df-ltxr 9419  df-le 9420  df-sub 9593  df-neg 9594  df-div 9990  df-nn 10319  df-2 10376  df-3 10377  df-4 10378  df-5 10379  df-6 10380  df-7 10381  df-8 10382  df-9 10383  df-10 10384  df-n0 10576  df-z 10643  df-dec 10752  df-uz 10858  df-q 10950  df-rp 10988  df-fz 11434  df-fzo 11545  df-fl 11638  df-mod 11705  df-seq 11803  df-exp 11862  df-hash 12100  df-cj 12584  df-re 12585  df-im 12586  df-sqr 12720  df-abs 12721  df-dvds 13532  df-gcd 13687  df-prm 13760  df-phi 13837  df-pc 13900  df-struct 14172  df-ndx 14173  df-slot 14174  df-base 14175  df-sets 14176  df-ress 14177  df-plusg 14247  df-mulr 14248  df-starv 14249  df-sca 14250  df-vsca 14251  df-ip 14252  df-tset 14253  df-ple 14254  df-ds 14256  df-unif 14257  df-0g 14376  df-imas 14442  df-divs 14443  df-mnd 15411  df-mhm 15460  df-grp 15538  df-minusg 15539  df-sbg 15540  df-mulg 15541  df-subg 15671  df-nsg 15672  df-eqg 15673  df-ghm 15738  df-cmn 16272  df-abl 16273  df-mgp 16582  df-ur 16594  df-rng 16637  df-cring 16638  df-oppr 16705  df-dvdsr 16723  df-rnghom 16796  df-subrg 16843  df-lmod 16930  df-lss 16992  df-lsp 17031  df-sra 17231  df-rgmod 17232  df-lidl 17233  df-rsp 17234  df-2idl 17292  df-cnfld 17778  df-zring 17843  df-zrh 17894  df-zn 17897  df-lgs 22593
This theorem is referenced by:  lgsdchr  22646
  Copyright terms: Public domain W3C validator