Skip to content

Commit 0a24ddb

Browse files
b-mehtagrunweg
andcommitted
chore(Mathlib/Tactic): stop norm_num importing the Bochner integral (#39602)
Motivation: importing `Mathlib.Tactic.NormNum` shouldn't require us to build the Bochner integral and fundamental theorem of algebra. To enable this, we move `FiniteField.primitiveChar_to_Complex` to a new file. We also make `FiniteField.primitiveChar_to_Complex` not exposed, since its definitional properties should not be relied upon. Co-authored-by: Michael Rothgang <rothgang@math.uni-bonn.de>
1 parent c94e5d4 commit 0a24ddb

4 files changed

Lines changed: 45 additions & 23 deletions

File tree

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5690,6 +5690,7 @@ public import Mathlib.NumberTheory.LSeries.ZMod
56905690
public import Mathlib.NumberTheory.LSeries.ZetaZeros
56915691
public import Mathlib.NumberTheory.LegendreSymbol.AddCharacter
56925692
public import Mathlib.NumberTheory.LegendreSymbol.Basic
5693+
public import Mathlib.NumberTheory.LegendreSymbol.Complex
56935694
public import Mathlib.NumberTheory.LegendreSymbol.GaussEisensteinLemmas
56945695
public import Mathlib.NumberTheory.LegendreSymbol.JacobiSymbol
56955696
public import Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.Basic

Mathlib/Analysis/SpecialFunctions/Complex/CircleAddChar.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Authors: David Loeffler
55
-/
66
module
77

8+
public import Mathlib.Analysis.Complex.Polynomial.Basic
89
public import Mathlib.Analysis.SpecialFunctions.Complex.Circle
910
public import Mathlib.NumberTheory.LegendreSymbol.AddCharacter
1011
public import Mathlib.RingTheory.RootsOfUnity.AlgebraicallyClosed
11-
public import Mathlib.Topology.Instances.AddCircle.Real
1212

1313
/-!
1414
# Additive characters valued in the unit circle

Mathlib/NumberTheory/LegendreSymbol/AddCharacter.lean

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ public import Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots
99
public import Mathlib.FieldTheory.Finite.Trace
1010
public import Mathlib.Algebra.Group.AddChar
1111
public import Mathlib.Data.ZMod.Units
12-
public import Mathlib.Analysis.Complex.Polynomial.Basic
1312

1413
/-!
1514
# Additive characters of finite rings and fields
@@ -40,6 +39,7 @@ additive character
4039

4140
@[expose] public section
4241

42+
assert_not_exists MeasureTheory.integral
4343

4444
universe u v
4545

@@ -291,25 +291,4 @@ lemma starComp_apply (hR : 0 < ringChar R) {φ : AddChar R ℂ} (a : R) :
291291

292292
end Ring
293293

294-
section Field
295-
296-
variable (F : Type*) [Field F] [Finite F]
297-
298-
private lemma ringChar_ne : ringChar ℂ ≠ ringChar F := by
299-
simpa only [ringChar.eq_zero] using (CharP.ringChar_ne_zero_of_finite F).symm
300-
301-
/-- A primitive additive character on the finite field `F` with values in `ℂ`. -/
302-
noncomputable def FiniteField.primitiveChar_to_Complex : AddChar F ℂ := by
303-
letI ch := primitiveChar F ℂ <| by exact ringChar_ne F
304-
refine MonoidHom.compAddChar ?_ ch.char
305-
exact (IsCyclotomicExtension.algEquiv {(ch.n : ℕ)} ℂ (CyclotomicField ch.n ℂ) ℂ).toMonoidHom
306-
307-
lemma FiniteField.primitiveChar_to_Complex_isPrimitive :
308-
(primitiveChar_to_Complex F).IsPrimitive := by
309-
refine IsPrimitive.compMulHom_of_isPrimitive (PrimitiveAddChar.prim _) ?_
310-
let nn := (primitiveChar F ℂ <| ringChar_ne F).n
311-
exact (IsCyclotomicExtension.algEquiv {(nn : ℕ)} ℂ (CyclotomicField nn ℂ) ℂ).injective
312-
313-
end Field
314-
315294
end AddChar
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/-
2+
Copyright (c) 2022 Michael Stoll. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Michael Stoll
5+
-/
6+
module
7+
8+
public import Mathlib.Analysis.Complex.Polynomial.Basic
9+
public import Mathlib.NumberTheory.LegendreSymbol.AddCharacter
10+
11+
/-!
12+
# Additive characters on finite fields
13+
14+
We construct a primitive additive character on a finite field `F` with values in `ℂ`.
15+
This file is kept separate from `Mathlib.NumberTheory.LegendreSymbol.AddCharacter` to avoid
16+
importing the fundamental theorem of algebra and Bochner integral into that file.
17+
-/
18+
19+
namespace AddChar
20+
21+
section Field
22+
23+
variable (F : Type*) [Field F] [Finite F]
24+
25+
lemma ringChar_ne : ringChar ℂ ≠ ringChar F := by
26+
simpa only [ringChar.eq_zero] using (CharP.ringChar_ne_zero_of_finite F).symm
27+
28+
/-- A primitive additive character on the finite field `F` with values in `ℂ`. -/
29+
public noncomputable def FiniteField.primitiveChar_to_Complex : AddChar F ℂ := by
30+
letI ch := primitiveChar F ℂ <| by exact ringChar_ne F
31+
refine MonoidHom.compAddChar ?_ ch.char
32+
exact (IsCyclotomicExtension.algEquiv {(ch.n : ℕ)} ℂ (CyclotomicField ch.n ℂ) ℂ).toMonoidHom
33+
34+
public lemma FiniteField.primitiveChar_to_Complex_isPrimitive :
35+
(primitiveChar_to_Complex F).IsPrimitive := by
36+
refine IsPrimitive.compMulHom_of_isPrimitive (PrimitiveAddChar.prim _) ?_
37+
let nn := (primitiveChar F ℂ <| ringChar_ne F).n
38+
exact (IsCyclotomicExtension.algEquiv {(nn : ℕ)} ℂ (CyclotomicField nn ℂ) ℂ).injective
39+
40+
end Field
41+
42+
end AddChar

0 commit comments

Comments
 (0)