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

Theorem lgsdchrval 20602
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 9988 . . . . . 6  |-  ( N  e.  NN  ->  N  e.  NN0 )
21adantr 451 . . . . 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 16517 . . . . 5  |-  ( N  e.  NN0  ->  L : ZZ -onto-> B )
7 fof 5467 . . . . 5  |-  ( L : ZZ -onto-> B  ->  L : ZZ --> B )
82, 6, 73syl 18 . . . 4  |-  ( ( N  e.  NN  /\  -.  2  ||  N )  ->  L : ZZ --> B )
9 ffvelrn 5679 . . . 4  |-  ( ( L : ZZ --> B  /\  A  e.  ZZ )  ->  ( L `  A
)  e.  B )
108, 9sylan 457 . . 3  |-  ( ( ( N  e.  NN  /\ 
-.  2  ||  N
)  /\  A  e.  ZZ )  ->  ( L `
 A )  e.  B )
11 eqeq1 2302 . . . . . . 7  |-  ( y  =  ( L `  A )  ->  (
y  =  ( L `
 m )  <->  ( L `  A )  =  ( L `  m ) ) )
1211anbi1d 685 . . . . . 6  |-  ( y  =  ( L `  A )  ->  (
( y  =  ( L `  m )  /\  h  =  ( m  / L N
) )  <->  ( ( L `  A )  =  ( L `  m )  /\  h  =  ( m  / L N ) ) ) )
1312rexbidv 2577 . . . . 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
) ) ) )
1413iotabidv 5256 . . . 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 ) ) ) )
15 lgsdchr.x . . . 4  |-  X  =  ( y  e.  B  |->  ( iota h E. m  e.  ZZ  (
y  =  ( L `
 m )  /\  h  =  ( m  / L N ) ) ) )
16 iotaex 5252 . . . 4  |-  ( iota
h E. m  e.  ZZ  ( y  =  ( L `  m
)  /\  h  =  ( m  / L N
) ) )  e. 
_V
1714, 15, 16fvmpt3i 5621 . . 3  |-  ( ( L `  A )  e.  B  ->  ( X `  ( L `  A ) )  =  ( iota h E. m  e.  ZZ  (
( L `  A
)  =  ( L `
 m )  /\  h  =  ( m  / L N ) ) ) )
1810, 17syl 15 . 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 ) ) ) )
19 ovex 5899 . . 3  |-  ( A  / L N )  e.  _V
20 simprr 733 . . . . . . . . . . . . . . 15  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( L `  A )  =  ( L `  m ) )
21 simplll 734 . . . . . . . . . . . . . . . . 17  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  N  e.  NN )
2221, 1syl 15 . . . . . . . . . . . . . . . 16  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  N  e.  NN0 )
23 simplr 731 . . . . . . . . . . . . . . . 16  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  A  e.  ZZ )
24 simprl 732 . . . . . . . . . . . . . . . 16  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  m  e.  ZZ )
253, 5zndvds 16519 . . . . . . . . . . . . . . . 16  |-  ( ( N  e.  NN0  /\  A  e.  ZZ  /\  m  e.  ZZ )  ->  (
( L `  A
)  =  ( L `
 m )  <->  N  ||  ( A  -  m )
) )
2622, 23, 24, 25syl3anc 1182 . . . . . . . . . . . . . . 15  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( ( L `
 A )  =  ( L `  m
)  <->  N  ||  ( A  -  m ) ) )
2720, 26mpbid 201 . . . . . . . . . . . . . 14  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  N  ||  ( A  -  m )
)
28 moddvds 12554 . . . . . . . . . . . . . . 15  |-  ( ( N  e.  NN  /\  A  e.  ZZ  /\  m  e.  ZZ )  ->  (
( A  mod  N
)  =  ( m  mod  N )  <->  N  ||  ( A  -  m )
) )
2921, 23, 24, 28syl3anc 1182 . . . . . . . . . . . . . 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 ) ) )
3027, 29mpbird 223 . . . . . . . . . . . . 13  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( A  mod  N )  =  ( m  mod  N ) )
3130oveq1d 5889 . . . . . . . . . . . 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
) )
32 simpllr 735 . . . . . . . . . . . . 13  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  -.  2  ||  N )
33 lgsmod 20576 . . . . . . . . . . . . 13  |-  ( ( A  e.  ZZ  /\  N  e.  NN  /\  -.  2  ||  N )  -> 
( ( A  mod  N )  / L N
)  =  ( A  / L N ) )
3423, 21, 32, 33syl3anc 1182 . . . . . . . . . . . 12  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( ( A  mod  N )  / L N )  =  ( A  / L N
) )
35 lgsmod 20576 . . . . . . . . . . . . 13  |-  ( ( m  e.  ZZ  /\  N  e.  NN  /\  -.  2  ||  N )  -> 
( ( m  mod  N )  / L N
)  =  ( m  / L N ) )
3624, 21, 32, 35syl3anc 1182 . . . . . . . . . . . 12  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( ( m  mod  N )  / L N )  =  ( m  / L N
) )
3731, 34, 363eqtr3d 2336 . . . . . . . . . . 11  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( A  / L N )  =  ( m  / L N
) )
3837eqeq2d 2307 . . . . . . . . . 10  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( h  =  ( A  / L N )  <->  h  =  ( m  / L N
) ) )
3938biimprd 214 . . . . . . . . 9  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( h  =  ( m  / L N )  ->  h  =  ( A  / L N ) ) )
4039anassrs 629 . . . . . . . 8  |-  ( ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  m  e.  ZZ )  /\  ( L `  A )  =  ( L `  m ) )  ->  ( h  =  ( m  / L N )  ->  h  =  ( A  / L N ) ) )
4140expimpd 586 . . . . . . 7  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  m  e.  ZZ )  ->  (
( ( L `  A )  =  ( L `  m )  /\  h  =  ( m  / L N
) )  ->  h  =  ( A  / L N ) ) )
4241rexlimdva 2680 . . . . . 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
) ) )
43 fveq2 5541 . . . . . . . . . . . 12  |-  ( m  =  A  ->  ( L `  m )  =  ( L `  A ) )
4443eqcomd 2301 . . . . . . . . . . 11  |-  ( m  =  A  ->  ( L `  A )  =  ( L `  m ) )
4544biantrurd 494 . . . . . . . . . 10  |-  ( m  =  A  ->  (
h  =  ( m  / L N )  <-> 
( ( L `  A )  =  ( L `  m )  /\  h  =  ( m  / L N
) ) ) )
46 oveq1 5881 . . . . . . . . . . 11  |-  ( m  =  A  ->  (
m  / L N
)  =  ( A  / L N ) )
4746eqeq2d 2307 . . . . . . . . . 10  |-  ( m  =  A  ->  (
h  =  ( m  / L N )  <-> 
h  =  ( A  / L N ) ) )
4845, 47bitr3d 246 . . . . . . . . 9  |-  ( m  =  A  ->  (
( ( L `  A )  =  ( L `  m )  /\  h  =  ( m  / L N
) )  <->  h  =  ( A  / L N
) ) )
4948rspcev 2897 . . . . . . . 8  |-  ( ( A  e.  ZZ  /\  h  =  ( A  / L N ) )  ->  E. m  e.  ZZ  ( ( L `  A )  =  ( L `  m )  /\  h  =  ( m  / L N
) ) )
5049ex 423 . . . . . . 7  |-  ( A  e.  ZZ  ->  (
h  =  ( A  / L N )  ->  E. m  e.  ZZ  ( ( L `  A )  =  ( L `  m )  /\  h  =  ( m  / L N
) ) ) )
5150adantl 452 . . . . . 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
) ) ) )
5242, 51impbid 183 . . . . 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 ) ) )
5352adantr 451 . . . 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
) ) )
5453iota5 5255 . . 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 ) )
5519, 54mpan2 652 . 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 ) )
5618, 55eqtrd 2328 1  |-  ( ( ( N  e.  NN  /\ 
-.  2  ||  N
)  /\  A  e.  ZZ )  ->  ( X `
 ( L `  A ) )  =  ( A  / L N ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    <-> wb 176    /\ wa 358    = wceq 1632    e. wcel 1696   E.wrex 2557   _Vcvv 2801   class class class wbr 4039    e. cmpt 4093   iotacio 5233   -->wf 5267   -onto->wfo 5269   ` cfv 5271  (class class class)co 5874    - cmin 9053   NNcn 9762   2c2 9811   NN0cn0 9981   ZZcz 10040    mod cmo 10989    || cdivides 12547   Basecbs 13164   ZRHomczrh 16467  ℤ/nczn 16470  DChrcdchr 20487    / Lclgs 20549
This theorem is referenced by:  lgsdchr  20603
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1536  ax-5 1547  ax-17 1606  ax-9 1644  ax-8 1661  ax-13 1698  ax-14 1700  ax-6 1715  ax-7 1720  ax-11 1727  ax-12 1878  ax-ext 2277  ax-rep 4147  ax-sep 4157  ax-nul 4165  ax-pow 4204  ax-pr 4230  ax-un 4528  ax-inf2 7358  ax-cnex 8809  ax-resscn 8810  ax-1cn 8811  ax-icn 8812  ax-addcl 8813  ax-addrcl 8814  ax-mulcl 8815  ax-mulrcl 8816  ax-mulcom 8817  ax-addass 8818  ax-mulass 8819  ax-distr 8820  ax-i2m1 8821  ax-1ne0 8822  ax-1rid 8823  ax-rnegex 8824  ax-rrecex 8825  ax-cnre 8826  ax-pre-lttri 8827  ax-pre-lttrn 8828  ax-pre-ltadd 8829  ax-pre-mulgt0 8830  ax-pre-sup 8831  ax-addf 8832  ax-mulf 8833
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1532  df-nf 1535  df-sb 1639  df-eu 2160  df-mo 2161  df-clab 2283  df-cleq 2289  df-clel 2292  df-nfc 2421  df-ne 2461  df-nel 2462  df-ral 2561  df-rex 2562  df-reu 2563  df-rmo 2564  df-rab 2565  df-v 2803  df-sbc 3005  df-csb 3095  df-dif 3168  df-un 3170  df-in 3172  df-ss 3179  df-pss 3181  df-nul 3469  df-if 3579  df-pw 3640  df-sn 3659  df-pr 3660  df-tp 3661  df-op 3662  df-uni 3844  df-int 3879  df-iun 3923  df-br 4040  df-opab 4094  df-mpt 4095  df-tr 4130  df-eprel 4321  df-id 4325  df-po 4330  df-so 4331  df-fr 4368  df-we 4370  df-ord 4411  df-on 4412  df-lim 4413  df-suc 4414  df-om 4673  df-xp 4711  df-rel 4712  df-cnv 4713  df-co 4714  df-dm 4715  df-rn 4716  df-res 4717  df-ima 4718  df-iota 5235  df-fun 5273  df-fn 5274  df-f 5275  df-f1 5276  df-fo 5277  df-f1o 5278  df-fv 5279  df-ov 5877  df-oprab 5878  df-mpt2 5879  df-1st 6138  df-2nd 6139  df-tpos 6250  df-riota 6320  df-recs 6404  df-rdg 6439  df-1o 6495  df-2o 6496  df-oadd 6499  df-er 6676  df-ec 6678  df-qs 6682  df-map 6790  df-en 6880  df-dom 6881  df-sdom 6882  df-fin 6883  df-sup 7210  df-card 7588  df-cda 7810  df-pnf 8885  df-mnf 8886  df-xr 8887  df-ltxr 8888  df-le 8889  df-sub 9055  df-neg 9056  df-div 9440  df-nn 9763  df-2 9820  df-3 9821  df-4 9822  df-5 9823  df-6 9824  df-7 9825  df-8 9826  df-9 9827  df-10 9828  df-n0 9982  df-z 10041  df-dec 10141  df-uz 10247  df-q 10333  df-rp 10371  df-fz 10799  df-fzo 10887  df-fl 10941  df-mod 10990  df-seq 11063  df-exp 11121  df-hash 11354  df-cj 11600  df-re 11601  df-im 11602  df-sqr 11736  df-abs 11737  df-dvds 12548  df-gcd 12702  df-prm 12775  df-phi 12850  df-pc 12906  df-struct 13166  df-ndx 13167  df-slot 13168  df-base 13169  df-sets 13170  df-ress 13171  df-plusg 13237  df-mulr 13238  df-starv 13239  df-sca 13240  df-vsca 13241  df-tset 13243  df-ple 13244  df-ds 13246  df-0g 13420  df-imas 13427  df-divs 13428  df-mnd 14383  df-mhm 14431  df-grp 14505  df-minusg 14506  df-sbg 14507  df-mulg 14508  df-subg 14634  df-nsg 14635  df-eqg 14636  df-ghm 14697  df-cmn 15107  df-abl 15108  df-mgp 15342  df-rng 15356  df-cring 15357  df-ur 15358  df-oppr 15421  df-dvdsr 15439  df-rnghom 15512  df-subrg 15559  df-lmod 15645  df-lss 15706  df-lsp 15745  df-sra 15941  df-rgmod 15942  df-lidl 15943  df-rsp 15944  df-2idl 16000  df-cnfld 16394  df-zrh 16471  df-zn 16474  df-lgs 20550
  Copyright terms: Public domain W3C validator