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

Theorem lgsdchrval 23366
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 10801 . . . . . 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 18369 . . . . 5  |-  ( N  e.  NN0  ->  L : ZZ -onto-> B )
7 fof 5794 . . . . 5  |-  ( L : ZZ -onto-> B  ->  L : ZZ --> B )
82, 6, 73syl 20 . . . 4  |-  ( ( N  e.  NN  /\  -.  2  ||  N )  ->  L : ZZ --> B )
98ffvelrnda 6020 . . 3  |-  ( ( ( N  e.  NN  /\ 
-.  2  ||  N
)  /\  A  e.  ZZ )  ->  ( L `
 A )  e.  B )
10 eqeq1 2471 . . . . . . 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 2973 . . . . 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 5571 . . . 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 5567 . . . 4  |-  ( iota
h E. m  e.  ZZ  ( y  =  ( L `  m
)  /\  h  =  ( m  /L N ) ) )  e. 
_V
1613, 14, 15fvmpt3i 5953 . . 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 6308 . . 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 18371 . . . . . . . . . . . . . . . 16  |-  ( ( N  e.  NN0  /\  A  e.  ZZ  /\  m  e.  ZZ )  ->  (
( L `  A
)  =  ( L `
 m )  <->  N  ||  ( A  -  m )
) )
2521, 22, 23, 24syl3anc 1228 . . . . . . . . . . . . . . 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 13853 . . . . . . . . . . . . . . 15  |-  ( ( N  e.  NN  /\  A  e.  ZZ  /\  m  e.  ZZ )  ->  (
( A  mod  N
)  =  ( m  mod  N )  <->  N  ||  ( A  -  m )
) )
2820, 22, 23, 27syl3anc 1228 . . . . . . . . . . . . . 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 6298 . . . . . . . . . . . 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 23340 . . . . . . . . . . . . 13  |-  ( ( A  e.  ZZ  /\  N  e.  NN  /\  -.  2  ||  N )  -> 
( ( A  mod  N )  /L N )  =  ( A  /L N ) )
3322, 20, 31, 32syl3anc 1228 . . . . . . . . . . . 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 23340 . . . . . . . . . . . . 13  |-  ( ( m  e.  ZZ  /\  N  e.  NN  /\  -.  2  ||  N )  -> 
( ( m  mod  N )  /L N )  =  ( m  /L N ) )
3523, 20, 31, 34syl3anc 1228 . . . . . . . . . . . 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 2516 . . . . . . . . . . 11  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( A  /L N )  =  ( m  /L
N ) )
3736eqeq2d 2481 . . . . . . . . . 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 2955 . . . . . 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 5865 . . . . . . . . . . . 12  |-  ( m  =  A  ->  ( L `  m )  =  ( L `  A ) )
4342eqcomd 2475 . . . . . . . . . . 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 6290 . . . . . . . . . . 11  |-  ( m  =  A  ->  (
m  /L N )  =  ( A  /L N ) )
4645eqeq2d 2481 . . . . . . . . . 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 3214 . . . . . . . 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 5570 . . 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 2508 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 1379    e. wcel 1767   E.wrex 2815   _Vcvv 3113   class class class wbr 4447    |-> cmpt 4505   iotacio 5548   -->wf 5583   -onto->wfo 5585   ` cfv 5587  (class class class)co 6283    - cmin 9804   NNcn 10535   2c2 10584   NN0cn0 10794   ZZcz 10863    mod cmo 11963    || cdivides 13846   Basecbs 14489   ZRHomczrh 18320  ℤ/nczn 18323  DChrcdchr 23251    /Lclgs 23313
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1601  ax-4 1612  ax-5 1680  ax-6 1719  ax-7 1739  ax-8 1769  ax-9 1771  ax-10 1786  ax-11 1791  ax-12 1803  ax-13 1968  ax-ext 2445  ax-rep 4558  ax-sep 4568  ax-nul 4576  ax-pow 4625  ax-pr 4686  ax-un 6575  ax-inf2 8057  ax-cnex 9547  ax-resscn 9548  ax-1cn 9549  ax-icn 9550  ax-addcl 9551  ax-addrcl 9552  ax-mulcl 9553  ax-mulrcl 9554  ax-mulcom 9555  ax-addass 9556  ax-mulass 9557  ax-distr 9558  ax-i2m1 9559  ax-1ne0 9560  ax-1rid 9561  ax-rnegex 9562  ax-rrecex 9563  ax-cnre 9564  ax-pre-lttri 9565  ax-pre-lttrn 9566  ax-pre-ltadd 9567  ax-pre-mulgt0 9568  ax-pre-sup 9569  ax-addf 9570  ax-mulf 9571
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3or 974  df-3an 975  df-tru 1382  df-ex 1597  df-nf 1600  df-sb 1712  df-eu 2279  df-mo 2280  df-clab 2453  df-cleq 2459  df-clel 2462  df-nfc 2617  df-ne 2664  df-nel 2665  df-ral 2819  df-rex 2820  df-reu 2821  df-rmo 2822  df-rab 2823  df-v 3115  df-sbc 3332  df-csb 3436  df-dif 3479  df-un 3481  df-in 3483  df-ss 3490  df-pss 3492  df-nul 3786  df-if 3940  df-pw 4012  df-sn 4028  df-pr 4030  df-tp 4032  df-op 4034  df-uni 4246  df-int 4283  df-iun 4327  df-br 4448  df-opab 4506  df-mpt 4507  df-tr 4541  df-eprel 4791  df-id 4795  df-po 4800  df-so 4801  df-fr 4838  df-we 4840  df-ord 4881  df-on 4882  df-lim 4883  df-suc 4884  df-xp 5005  df-rel 5006  df-cnv 5007  df-co 5008  df-dm 5009  df-rn 5010  df-res 5011  df-ima 5012  df-iota 5550  df-fun 5589  df-fn 5590  df-f 5591  df-f1 5592  df-fo 5593  df-f1o 5594  df-fv 5595  df-riota 6244  df-ov 6286  df-oprab 6287  df-mpt2 6288  df-om 6680  df-1st 6784  df-2nd 6785  df-tpos 6955  df-recs 7042  df-rdg 7076  df-1o 7130  df-2o 7131  df-oadd 7134  df-er 7311  df-ec 7313  df-qs 7317  df-map 7422  df-en 7517  df-dom 7518  df-sdom 7519  df-fin 7520  df-sup 7900  df-card 8319  df-cda 8547  df-pnf 9629  df-mnf 9630  df-xr 9631  df-ltxr 9632  df-le 9633  df-sub 9806  df-neg 9807  df-div 10206  df-nn 10536  df-2 10593  df-3 10594  df-4 10595  df-5 10596  df-6 10597  df-7 10598  df-8 10599  df-9 10600  df-10 10601  df-n0 10795  df-z 10864  df-dec 10976  df-uz 11082  df-q 11182  df-rp 11220  df-fz 11672  df-fzo 11792  df-fl 11896  df-mod 11964  df-seq 12075  df-exp 12134  df-hash 12373  df-cj 12894  df-re 12895  df-im 12896  df-sqrt 13030  df-abs 13031  df-dvds 13847  df-gcd 14003  df-prm 14076  df-phi 14154  df-pc 14219  df-struct 14491  df-ndx 14492  df-slot 14493  df-base 14494  df-sets 14495  df-ress 14496  df-plusg 14567  df-mulr 14568  df-starv 14569  df-sca 14570  df-vsca 14571  df-ip 14572  df-tset 14573  df-ple 14574  df-ds 14576  df-unif 14577  df-0g 14696  df-imas 14762  df-divs 14763  df-mnd 15731  df-mhm 15783  df-grp 15864  df-minusg 15865  df-sbg 15866  df-mulg 15867  df-subg 16000  df-nsg 16001  df-eqg 16002  df-ghm 16067  df-cmn 16603  df-abl 16604  df-mgp 16941  df-ur 16953  df-rng 16997  df-cring 16998  df-oppr 17068  df-dvdsr 17086  df-rnghom 17160  df-subrg 17222  df-lmod 17309  df-lss 17374  df-lsp 17413  df-sra 17613  df-rgmod 17614  df-lidl 17615  df-rsp 17616  df-2idl 17674  df-cnfld 18208  df-zring 18273  df-zrh 18324  df-zn 18327  df-lgs 23314
This theorem is referenced by:  lgsdchr  23367
  Copyright terms: Public domain W3C validator