Skip to content

Commit 878dc46

Browse files
committed
feat(NumberTheory/GaussSum): add shift and conjugation lemmas (#39459)
1 parent a6d7083 commit 878dc46

2 files changed

Lines changed: 19 additions & 6 deletions

File tree

Mathlib/NumberTheory/DirichletCharacter/GaussSum.lean

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,8 @@ lemma factorsThrough_of_gaussSum_ne_zero [IsDomain R] {χ : DirichletCharacter R
4040
(hd : d ∣ N) (he : e.mulShift d = 1) (h_ne : gaussSum χ e ≠ 0) :
4141
χ.FactorsThrough d := by
4242
rw [DirichletCharacter.factorsThrough_iff_ker_unitsMap hd]
43-
intro u hu
44-
rw [MonoidHom.mem_ker, ← Units.val_inj, MulChar.coe_toUnitHom]
45-
simpa only [Units.val_one, ne_eq, h_ne, not_false_eq_true, mul_eq_right₀] using
46-
gaussSum_aux_of_mulShift e χ hd he hu
43+
intro _ hu
44+
simpa [← Units.val_inj, h_ne] using gaussSum_aux_of_mulShift e χ hd he hu
4745

4846
/-- If `χ` is primitive, but `e` is not, then `gaussSum χ e = 0`. -/
4947
lemma gaussSum_eq_zero_of_isPrimitive_of_not_isPrimitive [IsDomain R]
@@ -60,7 +58,6 @@ lemma gaussSum_mulShift_of_isPrimitive [IsDomain R] {χ : DirichletCharacter R N
6058
(hχ : IsPrimitive χ) (a : ZMod N) :
6159
gaussSum χ (e.mulShift a) = χ⁻¹ a * gaussSum χ e := by
6260
by_cases ha : IsUnit a
63-
· conv_rhs => rw [← gaussSum_mulShift χ e ha.unit]
64-
rw [IsUnit.unit_spec, MulChar.inv_apply_eq_inv, Ring.inverse_mul_cancel_left _ _ (ha.map χ)]
61+
· simpa [ha.unit_spec] using gaussSum_mulShift_eq χ e ha.unit
6562
· rw [MulChar.map_nonunit _ ha, zero_mul]
6663
exact gaussSum_eq_zero_of_isPrimitive_of_not_isPrimitive _ hχ (not_isPrimitive_mulShift e ha)

Mathlib/NumberTheory/GaussSum.lean

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ public import Mathlib.NumberTheory.LegendreSymbol.AddCharacter
99
public import Mathlib.NumberTheory.LegendreSymbol.ZModChar
1010
public import Mathlib.Algebra.CharP.CharAndCard
1111

12+
import Mathlib.NumberTheory.MulChar.Lemmas
13+
1214
/-!
1315
# Gauss sums
1416
@@ -77,6 +79,20 @@ theorem gaussSum_mulShift (χ : MulChar R R') (ψ : AddChar R R') (a : Rˣ) :
7779
simp_rw [← mul_assoc, ← map_mul]
7880
exact Fintype.sum_bijective _ a.mulLeft_bijective _ _ fun x ↦ rfl
7981

82+
/-- Replacing `ψ` by `mulShift ψ a` multiplies the Gauss sum by `χ⁻¹ a`. -/
83+
theorem gaussSum_mulShift_eq (χ : MulChar R R') (ψ : AddChar R R') (a : Rˣ) :
84+
gaussSum χ (ψ.mulShift a) = χ⁻¹ a * gaussSum χ ψ := by
85+
rw [← gaussSum_mulShift χ ψ a, inv_apply_eq_inv,
86+
Ring.inverse_mul_cancel_left _ _ (a.isUnit.map χ)]
87+
88+
/-- Taking complex conjugates of a Gauss sum inverts both characters. -/
89+
lemma star_gaussSum_eq (χ : MulChar R ℂ) (ψ : AddChar R ℂ) :
90+
star (gaussSum χ ψ) = gaussSum χ⁻¹ ψ⁻¹ :=
91+
calc
92+
_ = ∑ x, star (ψ x) * χ⁻¹ x := by simp [gaussSum, star_mul, MulChar.star_apply']
93+
_ = ∑ x, ψ⁻¹ x * χ⁻¹ x := by simp [← starRingEnd_apply, map_neg_eq_conj]
94+
_ = _ := by simp [mul_comm, gaussSum]
95+
8096
end GaussSumDef
8197

8298
/-!

0 commit comments

Comments
 (0)