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

Theorem lgsdchrval 22698
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 10598 . . . . . 6  |-  ( N  e.  NN  ->  N  e.  NN0 )
21adantr 465 . . . . 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 17992 . . . . 5  |-  ( N  e.  NN0  ->  L : ZZ -onto-> B )
7 fof 5632 . . . . 5  |-  ( L : ZZ -onto-> B  ->  L : ZZ --> B )
82, 6, 73syl 20 . . . 4  |-  ( ( N  e.  NN  /\  -.  2  ||  N )  ->  L : ZZ --> B )
98ffvelrnda 5855 . . 3  |-  ( ( ( N  e.  NN  /\ 
-.  2  ||  N
)  /\  A  e.  ZZ )  ->  ( L `
 A )  e.  B )
10 eqeq1 2449 . . . . . . 7  |-  ( y  =  ( L `  A )  ->  (
y  =  ( L `
 m )  <->  ( L `  A )  =  ( L `  m ) ) )
1110anbi1d 704 . . . . . 6  |-  ( y  =  ( L `  A )  ->  (
( y  =  ( L `  m )  /\  h  =  ( m  /L N ) )  <->  ( ( L `  A )  =  ( L `  m )  /\  h  =  ( m  /L N ) ) ) )
1211rexbidv 2748 . . . . 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 5414 . . . 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 5410 . . . 4  |-  ( iota
h E. m  e.  ZZ  ( y  =  ( L `  m
)  /\  h  =  ( m  /L N ) ) )  e. 
_V
1613, 14, 15fvmpt3i 5790 . . 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 6128 . . 3  |-  ( A  /L N )  e.  _V
19 simprr 756 . . . . . . . . . . . . . . 15  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( L `  A )  =  ( L `  m ) )
20 simplll 757 . . . . . . . . . . . . . . . . 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 754 . . . . . . . . . . . . . . . 16  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  A  e.  ZZ )
23 simprl 755 . . . . . . . . . . . . . . . 16  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  m  e.  ZZ )
243, 5zndvds 17994 . . . . . . . . . . . . . . . 16  |-  ( ( N  e.  NN0  /\  A  e.  ZZ  /\  m  e.  ZZ )  ->  (
( L `  A
)  =  ( L `
 m )  <->  N  ||  ( A  -  m )
) )
2521, 22, 23, 24syl3anc 1218 . . . . . . . . . . . . . . 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 13554 . . . . . . . . . . . . . . 15  |-  ( ( N  e.  NN  /\  A  e.  ZZ  /\  m  e.  ZZ )  ->  (
( A  mod  N
)  =  ( m  mod  N )  <->  N  ||  ( A  -  m )
) )
2820, 22, 23, 27syl3anc 1218 . . . . . . . . . . . . . 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 6118 . . . . . . . . . . . 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 758 . . . . . . . . . . . . 13  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  -.  2  ||  N )
32 lgsmod 22672 . . . . . . . . . . . . 13  |-  ( ( A  e.  ZZ  /\  N  e.  NN  /\  -.  2  ||  N )  -> 
( ( A  mod  N )  /L N )  =  ( A  /L N ) )
3322, 20, 31, 32syl3anc 1218 . . . . . . . . . . . 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 22672 . . . . . . . . . . . . 13  |-  ( ( m  e.  ZZ  /\  N  e.  NN  /\  -.  2  ||  N )  -> 
( ( m  mod  N )  /L N )  =  ( m  /L N ) )
3523, 20, 31, 34syl3anc 1218 . . . . . . . . . . . 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 2483 . . . . . . . . . . 11  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( A  /L N )  =  ( m  /L
N ) )
3736eqeq2d 2454 . . . . . . . . . 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 648 . . . . . . . 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 603 . . . . . . 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 2853 . . . . . 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 5703 . . . . . . . . . . . 12  |-  ( m  =  A  ->  ( L `  m )  =  ( L `  A ) )
4342eqcomd 2448 . . . . . . . . . . 11  |-  ( m  =  A  ->  ( L `  A )  =  ( L `  m ) )
4443biantrurd 508 . . . . . . . . . 10  |-  ( m  =  A  ->  (
h  =  ( m  /L N )  <-> 
( ( L `  A )  =  ( L `  m )  /\  h  =  ( m  /L N ) ) ) )
45 oveq1 6110 . . . . . . . . . . 11  |-  ( m  =  A  ->  (
m  /L N )  =  ( A  /L N ) )
4645eqeq2d 2454 . . . . . . . . . 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 3085 . . . . . . . 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 466 . . . . . 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 465 . . . 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 5413 . . 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 671 . 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 2475 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 1369    e. wcel 1756   E.wrex 2728   _Vcvv 2984   class class class wbr 4304    e. cmpt 4362   iotacio 5391   -->wf 5426   -onto->wfo 5428   ` cfv 5430  (class class class)co 6103    - cmin 9607   NNcn 10334   2c2 10383   NN0cn0 10591   ZZcz 10658    mod cmo 11720    || cdivides 13547   Basecbs 14186   ZRHomczrh 17943  ℤ/nczn 17946  DChrcdchr 22583    /Lclgs 22645
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2423  ax-rep 4415  ax-sep 4425  ax-nul 4433  ax-pow 4482  ax-pr 4543  ax-un 6384  ax-inf2 7859  ax-cnex 9350  ax-resscn 9351  ax-1cn 9352  ax-icn 9353  ax-addcl 9354  ax-addrcl 9355  ax-mulcl 9356  ax-mulrcl 9357  ax-mulcom 9358  ax-addass 9359  ax-mulass 9360  ax-distr 9361  ax-i2m1 9362  ax-1ne0 9363  ax-1rid 9364  ax-rnegex 9365  ax-rrecex 9366  ax-cnre 9367  ax-pre-lttri 9368  ax-pre-lttrn 9369  ax-pre-ltadd 9370  ax-pre-mulgt0 9371  ax-pre-sup 9372  ax-addf 9373  ax-mulf 9374
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 966  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2257  df-mo 2258  df-clab 2430  df-cleq 2436  df-clel 2439  df-nfc 2577  df-ne 2620  df-nel 2621  df-ral 2732  df-rex 2733  df-reu 2734  df-rmo 2735  df-rab 2736  df-v 2986  df-sbc 3199  df-csb 3301  df-dif 3343  df-un 3345  df-in 3347  df-ss 3354  df-pss 3356  df-nul 3650  df-if 3804  df-pw 3874  df-sn 3890  df-pr 3892  df-tp 3894  df-op 3896  df-uni 4104  df-int 4141  df-iun 4185  df-br 4305  df-opab 4363  df-mpt 4364  df-tr 4398  df-eprel 4644  df-id 4648  df-po 4653  df-so 4654  df-fr 4691  df-we 4693  df-ord 4734  df-on 4735  df-lim 4736  df-suc 4737  df-xp 4858  df-rel 4859  df-cnv 4860  df-co 4861  df-dm 4862  df-rn 4863  df-res 4864  df-ima 4865  df-iota 5393  df-fun 5432  df-fn 5433  df-f 5434  df-f1 5435  df-fo 5436  df-f1o 5437  df-fv 5438  df-riota 6064  df-ov 6106  df-oprab 6107  df-mpt2 6108  df-om 6489  df-1st 6589  df-2nd 6590  df-tpos 6757  df-recs 6844  df-rdg 6878  df-1o 6932  df-2o 6933  df-oadd 6936  df-er 7113  df-ec 7115  df-qs 7119  df-map 7228  df-en 7323  df-dom 7324  df-sdom 7325  df-fin 7326  df-sup 7703  df-card 8121  df-cda 8349  df-pnf 9432  df-mnf 9433  df-xr 9434  df-ltxr 9435  df-le 9436  df-sub 9609  df-neg 9610  df-div 10006  df-nn 10335  df-2 10392  df-3 10393  df-4 10394  df-5 10395  df-6 10396  df-7 10397  df-8 10398  df-9 10399  df-10 10400  df-n0 10592  df-z 10659  df-dec 10768  df-uz 10874  df-q 10966  df-rp 11004  df-fz 11450  df-fzo 11561  df-fl 11654  df-mod 11721  df-seq 11819  df-exp 11878  df-hash 12116  df-cj 12600  df-re 12601  df-im 12602  df-sqr 12736  df-abs 12737  df-dvds 13548  df-gcd 13703  df-prm 13776  df-phi 13853  df-pc 13916  df-struct 14188  df-ndx 14189  df-slot 14190  df-base 14191  df-sets 14192  df-ress 14193  df-plusg 14263  df-mulr 14264  df-starv 14265  df-sca 14266  df-vsca 14267  df-ip 14268  df-tset 14269  df-ple 14270  df-ds 14272  df-unif 14273  df-0g 14392  df-imas 14458  df-divs 14459  df-mnd 15427  df-mhm 15476  df-grp 15557  df-minusg 15558  df-sbg 15559  df-mulg 15560  df-subg 15690  df-nsg 15691  df-eqg 15692  df-ghm 15757  df-cmn 16291  df-abl 16292  df-mgp 16604  df-ur 16616  df-rng 16659  df-cring 16660  df-oppr 16727  df-dvdsr 16745  df-rnghom 16818  df-subrg 16875  df-lmod 16962  df-lss 17026  df-lsp 17065  df-sra 17265  df-rgmod 17266  df-lidl 17267  df-rsp 17268  df-2idl 17326  df-cnfld 17831  df-zring 17896  df-zrh 17947  df-zn 17950  df-lgs 22646
This theorem is referenced by:  lgsdchr  22699
  Copyright terms: Public domain W3C validator