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

Theorem lgsdchrval 20586
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 9972 . . . . . 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 16501 . . . . 5  |-  ( N  e.  NN0  ->  L : ZZ -onto-> B )
7 fof 5451 . . . . 5  |-  ( L : ZZ -onto-> B  ->  L : ZZ --> B )
82, 6, 73syl 18 . . . 4  |-  ( ( N  e.  NN  /\  -.  2  ||  N )  ->  L : ZZ --> B )
9 ffvelrn 5663 . . . 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 2289 . . . . . . 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 2564 . . . . 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 5240 . . . 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 5236 . . . 4  |-  ( iota
h E. m  e.  ZZ  ( y  =  ( L `  m
)  /\  h  =  ( m  / L N
) ) )  e. 
_V
1714, 15, 16fvmpt3i 5605 . . 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 5883 . . 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 16503 . . . . . . . . . . . . . . . 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 12538 . . . . . . . . . . . . . . 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 5873 . . . . . . . . . . . 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 20560 . . . . . . . . . . . . 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 20560 . . . . . . . . . . . . 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 2323 . . . . . . . . . . 11  |-  ( ( ( ( N  e.  NN  /\  -.  2  ||  N )  /\  A  e.  ZZ )  /\  (
m  e.  ZZ  /\  ( L `  A )  =  ( L `  m ) ) )  ->  ( A  / L N )  =  ( m  / L N
) )
3837eqeq2d 2294 . . . . . . . . . 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 2667 . . . . . 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 5525 . . . . . . . . . . . 12  |-  ( m  =  A  ->  ( L `  m )  =  ( L `  A ) )
4443eqcomd 2288 . . . . . . . . . . 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 5865 . . . . . . . . . . 11  |-  ( m  =  A  ->  (
m  / L N
)  =  ( A  / L N ) )
4746eqeq2d 2294 . . . . . . . . . 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 2884 . . . . . . . 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 5239 . . 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 2315 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 1623    e. wcel 1684   E.wrex 2544   _Vcvv 2788   class class class wbr 4023    e. cmpt 4077   iotacio 5217   -->wf 5251   -onto->wfo 5253   ` cfv 5255  (class class class)co 5858    - cmin 9037   NNcn 9746   2c2 9795   NN0cn0 9965   ZZcz 10024    mod cmo 10973    || cdivides 12531   Basecbs 13148   ZRHomczrh 16451  ℤ/nczn 16454  DChrcdchr 20471    / Lclgs 20533
This theorem is referenced by:  lgsdchr  20587
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-rep 4131  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512  ax-inf2 7342  ax-cnex 8793  ax-resscn 8794  ax-1cn 8795  ax-icn 8796  ax-addcl 8797  ax-addrcl 8798  ax-mulcl 8799  ax-mulrcl 8800  ax-mulcom 8801  ax-addass 8802  ax-mulass 8803  ax-distr 8804  ax-i2m1 8805  ax-1ne0 8806  ax-1rid 8807  ax-rnegex 8808  ax-rrecex 8809  ax-cnre 8810  ax-pre-lttri 8811  ax-pre-lttrn 8812  ax-pre-ltadd 8813  ax-pre-mulgt0 8814  ax-pre-sup 8815  ax-addf 8816  ax-mulf 8817
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 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-nel 2449  df-ral 2548  df-rex 2549  df-reu 2550  df-rmo 2551  df-rab 2552  df-v 2790  df-sbc 2992  df-csb 3082  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-pss 3168  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-tp 3648  df-op 3649  df-uni 3828  df-int 3863  df-iun 3907  df-br 4024  df-opab 4078  df-mpt 4079  df-tr 4114  df-eprel 4305  df-id 4309  df-po 4314  df-so 4315  df-fr 4352  df-we 4354  df-ord 4395  df-on 4396  df-lim 4397  df-suc 4398  df-om 4657  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-1st 6122  df-2nd 6123  df-tpos 6234  df-riota 6304  df-recs 6388  df-rdg 6423  df-1o 6479  df-2o 6480  df-oadd 6483  df-er 6660  df-ec 6662  df-qs 6666  df-map 6774  df-en 6864  df-dom 6865  df-sdom 6866  df-fin 6867  df-sup 7194  df-card 7572  df-cda 7794  df-pnf 8869  df-mnf 8870  df-xr 8871  df-ltxr 8872  df-le 8873  df-sub 9039  df-neg 9040  df-div 9424  df-nn 9747  df-2 9804  df-3 9805  df-4 9806  df-5 9807  df-6 9808  df-7 9809  df-8 9810  df-9 9811  df-10 9812  df-n0 9966  df-z 10025  df-dec 10125  df-uz 10231  df-q 10317  df-rp 10355  df-fz 10783  df-fzo 10871  df-fl 10925  df-mod 10974  df-seq 11047  df-exp 11105  df-hash 11338  df-cj 11584  df-re 11585  df-im 11586  df-sqr 11720  df-abs 11721  df-dvds 12532  df-gcd 12686  df-prm 12759  df-phi 12834  df-pc 12890  df-struct 13150  df-ndx 13151  df-slot 13152  df-base 13153  df-sets 13154  df-ress 13155  df-plusg 13221  df-mulr 13222  df-starv 13223  df-sca 13224  df-vsca 13225  df-tset 13227  df-ple 13228  df-ds 13230  df-0g 13404  df-imas 13411  df-divs 13412  df-mnd 14367  df-mhm 14415  df-grp 14489  df-minusg 14490  df-sbg 14491  df-mulg 14492  df-subg 14618  df-nsg 14619  df-eqg 14620  df-ghm 14681  df-cmn 15091  df-abl 15092  df-mgp 15326  df-rng 15340  df-cring 15341  df-ur 15342  df-oppr 15405  df-dvdsr 15423  df-rnghom 15496  df-subrg 15543  df-lmod 15629  df-lss 15690  df-lsp 15729  df-sra 15925  df-rgmod 15926  df-lidl 15927  df-rsp 15928  df-2idl 15984  df-cnfld 16378  df-zrh 16455  df-zn 16458  df-lgs 20534
  Copyright terms: Public domain W3C validator