Metamath Proof Explorer


Theorem lgsdchr

Description: The Legendre symbol function X ( m ) = ( m /L N ) , where N is an odd positive number, is a real Dirichlet character modulo N . (Contributed by Mario Carneiro, 28-Apr-2016)

Ref Expression
Hypotheses lgsdchr.g G = DChr N
lgsdchr.z Z = /N
lgsdchr.d D = Base G
lgsdchr.b B = Base Z
lgsdchr.l L = ℤRHom Z
lgsdchr.x X = y B ι h | m y = L m h = m / L N
Assertion lgsdchr N ¬ 2 N X D X : B

Proof

Step Hyp Ref Expression
1 lgsdchr.g G = DChr N
2 lgsdchr.z Z = /N
3 lgsdchr.d D = Base G
4 lgsdchr.b B = Base Z
5 lgsdchr.l L = ℤRHom Z
6 lgsdchr.x X = y B ι h | m y = L m h = m / L N
7 iotaex ι h | m y = L m h = m / L N V
8 7 a1i N ¬ 2 N y B ι h | m y = L m h = m / L N V
9 6 a1i N ¬ 2 N X = y B ι h | m y = L m h = m / L N
10 nnnn0 N N 0
11 10 adantr N ¬ 2 N N 0
12 2 4 5 znzrhfo N 0 L : onto B
13 11 12 syl N ¬ 2 N L : onto B
14 foelrn L : onto B x B a x = L a
15 13 14 sylan N ¬ 2 N x B a x = L a
16 1 2 3 4 5 6 lgsdchrval N ¬ 2 N a X L a = a / L N
17 simpr N ¬ 2 N a a
18 nnz N N
19 18 ad2antrr N ¬ 2 N a N
20 lgscl a N a / L N
21 17 19 20 syl2anc N ¬ 2 N a a / L N
22 21 zred N ¬ 2 N a a / L N
23 16 22 eqeltrd N ¬ 2 N a X L a
24 fveq2 x = L a X x = X L a
25 24 eleq1d x = L a X x X L a
26 23 25 syl5ibrcom N ¬ 2 N a x = L a X x
27 26 rexlimdva N ¬ 2 N a x = L a X x
28 27 imp N ¬ 2 N a x = L a X x
29 15 28 syldan N ¬ 2 N x B X x
30 8 9 29 fmpt2d N ¬ 2 N X : B
31 ax-resscn
32 fss X : B X : B
33 30 31 32 sylancl N ¬ 2 N X : B
34 eqid Unit Z = Unit Z
35 4 34 unitss Unit Z B
36 foelrn L : onto B y B b y = L b
37 13 36 sylan N ¬ 2 N y B b y = L b
38 15 37 anim12dan N ¬ 2 N x B y B a x = L a b y = L b
39 reeanv a b x = L a y = L b a x = L a b y = L b
40 17 adantrr N ¬ 2 N a b a
41 simprr N ¬ 2 N a b b
42 11 adantr N ¬ 2 N a b N 0
43 lgsdirnn0 a b N 0 a b / L N = a / L N b / L N
44 40 41 42 43 syl3anc N ¬ 2 N a b a b / L N = a / L N b / L N
45 2 zncrng N 0 Z CRing
46 11 45 syl N ¬ 2 N Z CRing
47 crngring Z CRing Z Ring
48 46 47 syl N ¬ 2 N Z Ring
49 48 adantr N ¬ 2 N a b Z Ring
50 5 zrhrhm Z Ring L ring RingHom Z
51 49 50 syl N ¬ 2 N a b L ring RingHom Z
52 zringbas = Base ring
53 zringmulr × = ring
54 eqid Z = Z
55 52 53 54 rhmmul L ring RingHom Z a b L a b = L a Z L b
56 51 40 41 55 syl3anc N ¬ 2 N a b L a b = L a Z L b
57 56 fveq2d N ¬ 2 N a b X L a b = X L a Z L b
58 zmulcl a b a b
59 1 2 3 4 5 6 lgsdchrval N ¬ 2 N a b X L a b = a b / L N
60 58 59 sylan2 N ¬ 2 N a b X L a b = a b / L N
61 57 60 eqtr3d N ¬ 2 N a b X L a Z L b = a b / L N
62 16 adantrr N ¬ 2 N a b X L a = a / L N
63 1 2 3 4 5 6 lgsdchrval N ¬ 2 N b X L b = b / L N
64 63 adantrl N ¬ 2 N a b X L b = b / L N
65 62 64 oveq12d N ¬ 2 N a b X L a X L b = a / L N b / L N
66 44 61 65 3eqtr4d N ¬ 2 N a b X L a Z L b = X L a X L b
67 oveq12 x = L a y = L b x Z y = L a Z L b
68 67 fveq2d x = L a y = L b X x Z y = X L a Z L b
69 fveq2 y = L b X y = X L b
70 24 69 oveqan12d x = L a y = L b X x X y = X L a X L b
71 68 70 eqeq12d x = L a y = L b X x Z y = X x X y X L a Z L b = X L a X L b
72 66 71 syl5ibrcom N ¬ 2 N a b x = L a y = L b X x Z y = X x X y
73 72 rexlimdvva N ¬ 2 N a b x = L a y = L b X x Z y = X x X y
74 39 73 syl5bir N ¬ 2 N a x = L a b y = L b X x Z y = X x X y
75 74 imp N ¬ 2 N a x = L a b y = L b X x Z y = X x X y
76 38 75 syldan N ¬ 2 N x B y B X x Z y = X x X y
77 76 ralrimivva N ¬ 2 N x B y B X x Z y = X x X y
78 ss2ralv Unit Z B x B y B X x Z y = X x X y x Unit Z y Unit Z X x Z y = X x X y
79 35 77 78 mpsyl N ¬ 2 N x Unit Z y Unit Z X x Z y = X x X y
80 1z 1
81 1 2 3 4 5 6 lgsdchrval N ¬ 2 N 1 X L 1 = 1 / L N
82 80 81 mpan2 N ¬ 2 N X L 1 = 1 / L N
83 eqid 1 Z = 1 Z
84 5 83 zrh1 Z Ring L 1 = 1 Z
85 48 84 syl N ¬ 2 N L 1 = 1 Z
86 85 fveq2d N ¬ 2 N X L 1 = X 1 Z
87 18 adantr N ¬ 2 N N
88 1lgs N 1 / L N = 1
89 87 88 syl N ¬ 2 N 1 / L N = 1
90 82 86 89 3eqtr3d N ¬ 2 N X 1 Z = 1
91 lgsne0 a N a / L N 0 a gcd N = 1
92 17 19 91 syl2anc N ¬ 2 N a a / L N 0 a gcd N = 1
93 92 biimpd N ¬ 2 N a a / L N 0 a gcd N = 1
94 16 neeq1d N ¬ 2 N a X L a 0 a / L N 0
95 2 34 5 znunit N 0 a L a Unit Z a gcd N = 1
96 11 95 sylan N ¬ 2 N a L a Unit Z a gcd N = 1
97 93 94 96 3imtr4d N ¬ 2 N a X L a 0 L a Unit Z
98 24 neeq1d x = L a X x 0 X L a 0
99 eleq1 x = L a x Unit Z L a Unit Z
100 98 99 imbi12d x = L a X x 0 x Unit Z X L a 0 L a Unit Z
101 97 100 syl5ibrcom N ¬ 2 N a x = L a X x 0 x Unit Z
102 101 rexlimdva N ¬ 2 N a x = L a X x 0 x Unit Z
103 102 imp N ¬ 2 N a x = L a X x 0 x Unit Z
104 15 103 syldan N ¬ 2 N x B X x 0 x Unit Z
105 104 ralrimiva N ¬ 2 N x B X x 0 x Unit Z
106 79 90 105 3jca N ¬ 2 N x Unit Z y Unit Z X x Z y = X x X y X 1 Z = 1 x B X x 0 x Unit Z
107 simpl N ¬ 2 N N
108 1 2 4 34 107 3 dchrelbas3 N ¬ 2 N X D X : B x Unit Z y Unit Z X x Z y = X x X y X 1 Z = 1 x B X x 0 x Unit Z
109 33 106 108 mpbir2and N ¬ 2 N X D
110 109 30 jca N ¬ 2 N X D X : B