Skip to content

Commit 60c811a

Browse files
feat: the absolute discriminant of cyclotomic fields (#10492)
We compute the absolute discriminant of cyclotomic fields. From flt-regular.
1 parent 9c73cb5 commit 60c811a

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

Mathlib/NumberTheory/Cyclotomic/Rat.lean

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ integers of a `p ^ n`-th cyclotomic extension of `ℚ`.
2020
`ℤ` in `K`.
2121
* `IsCyclotomicExtension.Rat.cyclotomicRing_isIntegralClosure_of_prime_pow`: the integral
2222
closure of `ℤ` inside `CyclotomicField (p ^ k) ℚ` is `CyclotomicRing (p ^ k) ℤ ℚ`.
23+
* `IsCyclotomicExtension.Rat.absdiscr_prime_pow` and related results: the absolute discriminant
24+
of cyclotomic fields.
2325
-/
2426

2527

@@ -344,4 +346,57 @@ theorem subOneIntegralPowerBasis'_gen_prime [IsCyclotomicExtension {p} ℚ K]
344346

345347
end IsPrimitiveRoot
346348

349+
section absdiscr
350+
351+
namespace IsCyclotomicExtension.Rat
352+
353+
open nonZeroDivisors IsPrimitiveRoot
354+
355+
variable (K p k)
356+
357+
/-- We compute the absolute discriminant of a `p ^ k`-th cyclotomic field.
358+
Beware that in the cases `p ^ k = 1` and `p ^ k = 2` the formula uses `1 / 2 = 0` and `0 - 1 = 0`.
359+
See also the results below. -/
360+
theorem absdiscr_prime_pow [NumberField K] [IsCyclotomicExtension {p ^ k} ℚ K] :
361+
NumberField.discr K =
362+
(-1) ^ ((p ^ k : ℕ).totient / 2) * p ^ ((p : ℕ) ^ (k - 1) * ((p - 1) * k - 1)) := by
363+
have hζ := (IsCyclotomicExtension.zeta_spec (p ^ k) ℚ K)
364+
let pB₁ := integralPowerBasis hζ
365+
apply (algebraMap ℤ ℚ).injective_int
366+
rw [← NumberField.discr_eq_discr _ pB₁.basis, ← Algebra.discr_localizationLocalization ℤ ℤ⁰ K]
367+
convert IsCyclotomicExtension.discr_prime_pow hζ (cyclotomic.irreducible_rat (p ^ k).2) using 1
368+
· have : pB₁.dim = (IsPrimitiveRoot.powerBasis ℚ hζ).dim := by
369+
rw [← PowerBasis.finrank, ← PowerBasis.finrank]
370+
exact RingOfIntegers.rank K
371+
rw [← Algebra.discr_reindex _ _ (finCongr this)]
372+
congr 1
373+
ext i
374+
simp_rw [Function.comp_apply, Basis.localizationLocalization_apply, powerBasis_dim,
375+
PowerBasis.coe_basis,integralPowerBasis_gen]
376+
convert ← ((IsPrimitiveRoot.powerBasis ℚ hζ).basis_eq_pow i).symm using 1
377+
· simp_rw [algebraMap_int_eq, map_mul, map_pow, map_neg, map_one, map_natCast]
378+
379+
open Nat in
380+
/-- We compute the absolute discriminant of a `p ^ (k + 1)`-th cyclotomic field.
381+
Beware that in the case `p ^ k = 2` the formula uses `1 / 2 = 0`. See also the results below. -/
382+
theorem absdiscr_prime_pow_succ [NumberField K] [IsCyclotomicExtension {p ^ (k + 1)} ℚ K] :
383+
NumberField.discr K =
384+
(-1) ^ ((p : ℕ) ^ k * (p - 1) / 2) * p ^ ((p : ℕ) ^ k * ((p - 1) * (k + 1) - 1)) := by
385+
simpa [totient_prime_pow hp.out (succ_pos k)] using absdiscr_prime_pow p (k + 1) K
386+
387+
/-- We compute the absolute discriminant of a `p`-th cyclotomic field where `p` is prime. -/
388+
theorem absdiscr_prime [NumberField K] [IsCyclotomicExtension {p} ℚ K] :
389+
NumberField.discr K = (-1) ^ (((p : ℕ) - 1) / 2) * p ^ ((p : ℕ) - 2) := by
390+
have : IsCyclotomicExtension {p ^ (0 + 1)} ℚ K := by
391+
rw [zero_add, pow_one]
392+
infer_instance
393+
rw [absdiscr_prime_pow_succ p 0 K]
394+
simp only [Int.reduceNeg, pow_zero, one_mul, zero_add, mul_one, mul_eq_mul_left_iff, gt_iff_lt,
395+
Nat.cast_pos, PNat.pos, pow_eq_zero_iff', neg_eq_zero, one_ne_zero, ne_eq, false_and, or_false]
396+
rfl
397+
398+
end IsCyclotomicExtension.Rat
399+
400+
end absdiscr
401+
347402
end PowerBasis

Mathlib/RingTheory/PowerBasis.lean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ theorem finiteDimensional [Algebra K S] (pb : PowerBasis K S) : FiniteDimensiona
8282
FiniteDimensional.of_fintype_basis pb.basis
8383
#align power_basis.finite_dimensional PowerBasis.finiteDimensional
8484

85-
theorem finrank [Algebra K S] (pb : PowerBasis K S) : FiniteDimensional.finrank K S = pb.dim := by
85+
theorem finrank [StrongRankCondition R] (pb : PowerBasis R S) :
86+
FiniteDimensional.finrank R S = pb.dim := by
8687
rw [FiniteDimensional.finrank_eq_card_basis pb.basis, Fintype.card_fin]
8788
#align power_basis.finrank PowerBasis.finrank
8889

0 commit comments

Comments
 (0)