Metamath Proof Explorer


Theorem dchr2sum

Description: An orthogonality relation for Dirichlet characters: the sum of X ( a ) x. * Y ( a ) over all a is nonzero only when X = Y . Part of Theorem 6.5.2 of Shapiro p. 232. (Contributed by Mario Carneiro, 28-Apr-2016)

Ref Expression
Hypotheses dchr2sum.g G = DChr N
dchr2sum.z Z = /N
dchr2sum.d D = Base G
dchr2sum.b B = Base Z
dchr2sum.x φ X D
dchr2sum.y φ Y D
Assertion dchr2sum φ a B X a Y a = if X = Y ϕ N 0

Proof

Step Hyp Ref Expression
1 dchr2sum.g G = DChr N
2 dchr2sum.z Z = /N
3 dchr2sum.d D = Base G
4 dchr2sum.b B = Base Z
5 dchr2sum.x φ X D
6 dchr2sum.y φ Y D
7 eqid 0 G = 0 G
8 1 3 dchrrcl X D N
9 5 8 syl φ N
10 1 dchrabl N G Abel
11 ablgrp G Abel G Grp
12 9 10 11 3syl φ G Grp
13 eqid - G = - G
14 3 13 grpsubcl G Grp X D Y D X - G Y D
15 12 5 6 14 syl3anc φ X - G Y D
16 1 2 3 7 15 4 dchrsum φ a B X - G Y a = if X - G Y = 0 G ϕ N 0
17 5 adantr φ a B X D
18 6 adantr φ a B Y D
19 eqid + G = + G
20 eqid inv g G = inv g G
21 3 19 20 13 grpsubval X D Y D X - G Y = X + G inv g G Y
22 17 18 21 syl2anc φ a B X - G Y = X + G inv g G Y
23 9 adantr φ a B N
24 23 10 11 3syl φ a B G Grp
25 3 20 grpinvcl G Grp Y D inv g G Y D
26 24 18 25 syl2anc φ a B inv g G Y D
27 1 2 3 19 17 26 dchrmul φ a B X + G inv g G Y = X × f inv g G Y
28 22 27 eqtrd φ a B X - G Y = X × f inv g G Y
29 28 fveq1d φ a B X - G Y a = X × f inv g G Y a
30 1 2 3 4 17 dchrf φ a B X : B
31 30 ffnd φ a B X Fn B
32 1 2 3 4 26 dchrf φ a B inv g G Y : B
33 32 ffnd φ a B inv g G Y Fn B
34 4 fvexi B V
35 34 a1i φ a B B V
36 simpr φ a B a B
37 fnfvof X Fn B inv g G Y Fn B B V a B X × f inv g G Y a = X a inv g G Y a
38 31 33 35 36 37 syl22anc φ a B X × f inv g G Y a = X a inv g G Y a
39 1 3 18 20 dchrinv φ a B inv g G Y = * Y
40 39 fveq1d φ a B inv g G Y a = * Y a
41 1 2 3 4 18 dchrf φ a B Y : B
42 fvco3 Y : B a B * Y a = Y a
43 41 36 42 syl2anc φ a B * Y a = Y a
44 40 43 eqtrd φ a B inv g G Y a = Y a
45 44 oveq2d φ a B X a inv g G Y a = X a Y a
46 29 38 45 3eqtrd φ a B X - G Y a = X a Y a
47 46 sumeq2dv φ a B X - G Y a = a B X a Y a
48 3 7 13 grpsubeq0 G Grp X D Y D X - G Y = 0 G X = Y
49 12 5 6 48 syl3anc φ X - G Y = 0 G X = Y
50 49 ifbid φ if X - G Y = 0 G ϕ N 0 = if X = Y ϕ N 0
51 16 47 50 3eqtr3d φ a B X a Y a = if X = Y ϕ N 0