Skip to content

Commit 9dd2956

Browse files
feat(NumberTheory/NumberField/Completion/FinitePlace): add multiplicity lemmas (#39008)
This adds some more API for multiplicities of prime ideals in factorizations (and some more basic API lemmas, too), in preparation for a proof of the Northcott property for heights on number fields. We also extend the API for `HasFinite{Mul|}Support` a bit.
1 parent d8de6b6 commit 9dd2956

5 files changed

Lines changed: 113 additions & 1 deletion

File tree

Mathlib/Algebra/FiniteSupport/Basic.lean

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ module
77

88
public import Mathlib.Algebra.BigOperators.Group.Finset.Lemmas
99
public import Mathlib.Algebra.FiniteSupport.Defs
10+
public import Mathlib.Algebra.Group.Action.Pi
11+
public import Mathlib.Algebra.GroupWithZero.Action.Defs
1012
public import Mathlib.Algebra.Order.Group.Indicator
1113
public import Mathlib.Data.Set.Finite.Lattice
1214

13-
import Mathlib.Algebra.Group.Support
15+
import Mathlib.Algebra.GroupWithZero.Indicator
16+
import Mathlib.Algebra.Module.Basic
1417

1518
/-!
1619
# Make `fun_prop` work for finite (multiplicative) support
@@ -181,6 +184,54 @@ lemma HasFiniteMulSupport.of_comp [One β] (hfg : (f ∘ g).HasFiniteMulSupport)
181184
refine Set.Finite.subset hfg fun _ ha ↦ Set.mem_setOf.mpr fun H ↦ Set.mem_setOf.mp ha ?_
182185
grind
183186

187+
-- The additive version is a special case of `Function.HasFiniteSupport.smul_left`.
188+
@[fun_prop]
189+
lemma HasFiniteSupport.hasFiniteMulSupport_fun_pow {M : Type*} [Monoid M] (f : α → M) {g : α → ℕ}
190+
(hg : g.HasFiniteSupport) :
191+
(fun a : α ↦ f a ^ g a).HasFiniteMulSupport :=
192+
Set.Finite.subset hg fun a ha ↦ by contrapose! ha; simp_all
193+
194+
section MulZeroClass
195+
196+
variable {M : Type*} [MulZeroClass M]
197+
198+
@[to_fun (attr := fun_prop)]
199+
lemma HasFiniteSupport.mul_left {f : α → M} (hf : f.HasFiniteSupport) (g : α → M) :
200+
(f * g).HasFiniteSupport :=
201+
Set.Finite.subset hf fun _ ha ↦ support_mul_subset_left f g ha
202+
203+
@[to_fun (attr := fun_prop)]
204+
lemma HasFiniteSupport.mul_right (f : α → M) {g : α → M} (hg : g.HasFiniteSupport) :
205+
(f * g).HasFiniteSupport :=
206+
Set.Finite.subset hg fun _ ha ↦ support_mul_subset_right f g ha
207+
208+
end MulZeroClass
209+
184210
end Function
185211

212+
@[fun_prop]
213+
lemma Multiset.hasFiniteSupport_count {α : Type*} [DecidableEq α] (s : Multiset α) :
214+
(count · s).HasFiniteSupport :=
215+
s.toFinset.finite_toSet.subset <| by simp
216+
186217
end
218+
219+
namespace Function.HasFiniteSupport
220+
221+
public section SMul
222+
223+
variable {α R M : Type*} [Zero M]
224+
225+
@[to_fun (attr := fun_prop)]
226+
lemma smul_left [Zero R] [SMulWithZero R M] {f : α → R} (hf : f.HasFiniteSupport) (g : α → M) :
227+
(f • g).HasFiniteSupport :=
228+
Set.Finite.subset hf fun _ ha ↦ support_smul_subset_left f g ha
229+
230+
@[to_fun (attr := fun_prop)]
231+
lemma smul_right [SMulZeroClass R M] (f : α → R) {g : α → M} (hg : g.HasFiniteSupport) :
232+
(f • g).HasFiniteSupport :=
233+
Set.Finite.subset hg fun _ ha ↦ support_smul_subset_right f g ha
234+
235+
end SMul
236+
237+
end Function.HasFiniteSupport

Mathlib/NumberTheory/NumberField/Completion/FinitePlace.lean

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ theorem maximalIdeal_mk (v : HeightOneSpectrum (𝓞 K)) : maximalIdeal (mk v) =
352352
rw [← mk_eq_iff, mk_maximalIdeal]
353353

354354
/-- The equivalence between finite places and maximal ideals. -/
355+
@[simps apply]
355356
noncomputable def equivHeightOneSpectrum :
356357
FinitePlace K ≃ HeightOneSpectrum (𝓞 K) where
357358
toFun := maximalIdeal
@@ -393,6 +394,13 @@ theorem hasFiniteMulSupport {x : K} (h_x_nezero : x ≠ 0) :
393394

394395
@[deprecated (since := "2026-03-03")] alias mulSupport_finite := hasFiniteMulSupport
395396

397+
lemma hasFiniteMulSupport_fun_pow_multiplicity {M : Type*} [CommMonoid M] {I : Ideal (𝓞 K)}
398+
(hI : I ≠ ⊥) (f : Ideal (𝓞 K) → M) :
399+
(fun v : FinitePlace K ↦
400+
f v.maximalIdeal.asIdeal ^ multiplicity v.maximalIdeal.asIdeal I).HasFiniteMulSupport :=
401+
UniqueFactorizationMonoid.hasFiniteMulSupport_fun_pow_multiplicity _
402+
(asIdeal_injective.comp maximalIdeal_injective) (fun v ↦ v.maximalIdeal.irreducible) hI
403+
396404
protected
397405
lemma add_le (v : FinitePlace K) (x y : K) :
398406
v (x + y) ≤ max (v x) (v y) := by
@@ -414,6 +422,17 @@ alias IsDedekindDomain.HeightOneSpectrum.equivHeightOneSpectrum_symm_apply :=
414422
@[deprecated (since := "2026-03-11")]
415423
alias IsDedekindDomain.HeightOneSpectrum.embedding_mul_absNorm := embedding_mul_absNorm
416424

425+
lemma finprod_finitePlace_pow_multiplicity {I : Ideal (𝓞 K)} (hI : I ≠ ⊥) :
426+
∏ᶠ v : FinitePlace K, v.maximalIdeal.asIdeal ^ multiplicity v.maximalIdeal.asIdeal I = I := by
427+
conv_rhs => rw [← finprod_heightOneSpectrum_pow_multiplicity hI]
428+
simp only [← finprod_comp_equiv (equivHeightOneSpectrum (K := K)), equivHeightOneSpectrum_apply]
429+
430+
lemma apply_mul_absNorm_pow_eq_one (v : FinitePlace K) {x : 𝓞 K} (hx : x ≠ 0) :
431+
v x * v.maximalIdeal.asIdeal.absNorm ^ multiplicity v.maximalIdeal.asIdeal (span {x}) = 1 := by
432+
have hnz : span {x} ≠ ⊥ := mt Submodule.span_singleton_eq_bot.mp hx
433+
rw [← norm_embedding_eq v x, ← Nat.cast_pow, ← map_pow, ← maxPowDividing_eq_pow_multiplicity hnz]
434+
exact HeightOneSpectrum.embedding_mul_absNorm K v.maximalIdeal hx
435+
417436
end FinitePlace
418437

419438
section LiesOver

Mathlib/RingTheory/Algebraic/Integral.lean

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,32 @@ theorem iff_exists_smul_integral [IsReduced R] :
192192
⟨(exists_integral_multiple ·), fun ⟨_, hy, int⟩ ↦
193193
of_smul_isIntegral (by rwa [isNilpotent_iff_eq_zero]) int⟩
194194

195+
section integralClosure
196+
197+
variable {K : Type*} [CommRing K] [Algebra S K] [Algebra R K] [IsIntegralClosure S R K]
198+
199+
variable (S)
200+
201+
omit [Algebra R S] in
202+
/-- If `x : K` is algebraic over some ring `R`, then a nonzero `R`-multiple of it is contained
203+
in the integral closure of `R` in `K`. -/
204+
lemma exists_smul_eq {x : K} (hx : IsAlgebraic R x) :
205+
∃ (r : R) (s : S), r ≠ 0 ∧ r • x = algebraMap S K s := by
206+
obtain ⟨r, hr, h⟩ := hx.exists_integral_multiple
207+
obtain ⟨s, hs⟩ := IsIntegralClosure.isIntegral_iff (A := S) |>.mp h
208+
exact ⟨r, s, hr, hs.symm⟩
209+
210+
/-- If `x : K` is algebraic over `ℤ`, then a nonzero `ℕ`-multiple of it is contained in the
211+
integral closure of `ℤ` in `K`. -/
212+
lemma exists_nsmul_eq [IsIntegralClosure S ℤ K] {x : K} (hx : IsAlgebraic ℤ x) :
213+
∃ (m : ℕ) (s : S), m ≠ 0 ∧ m • x = algebraMap S K s := by
214+
obtain ⟨a, s, ha, h⟩ := hx.exists_smul_eq S
215+
obtain ⟨n, rfl | rfl⟩ := a.eq_nat_or_neg
216+
· exact ⟨n, s, mod_cast ha, mod_cast h⟩
217+
· exact ⟨n, -s, by simpa using ha, by simp [← h]⟩
218+
219+
end integralClosure
220+
195221
section restrictScalars
196222

197223
variable (R) [NoZeroDivisors S]

Mathlib/RingTheory/DedekindDomain/Ideal/Lemmas.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,12 @@ theorem prime : Prime v.asIdeal := Ideal.prime_of_isPrime v.ne_bot v.isPrime
510510
instance : Coe (HeightOneSpectrum R) (Ideal R) where
511511
coe P := P.asIdeal
512512

513+
omit [IsDedekindDomain R] in
514+
lemma asIdeal_injective : (HeightOneSpectrum.asIdeal (R := R)).Injective :=
515+
fun ⦃_ _⦄ h ↦ HeightOneSpectrum.ext h
516+
517+
alias asIdeal_inj := HeightOneSpectrum.ext
518+
513519
/--
514520
The (nonzero) prime elements of the monoid with zero `Ideal R` correspond
515521
to an element of type `HeightOneSpectrum R`.

Mathlib/RingTheory/UniqueFactorizationDomain/Multiplicity.lean

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ public import Mathlib.Algebra.BigOperators.Finprod
99
public import Mathlib.RingTheory.Multiplicity
1010
public import Mathlib.RingTheory.UniqueFactorizationDomain.NormalizedFactors
1111

12+
import Mathlib.Algebra.FiniteSupport.Basic
13+
1214
/-!
1315
# Unique factorization and multiplicity
1416
@@ -176,4 +178,12 @@ lemma pow_dvd_pow_iff_dvd {a b : R} {n : ℕ} (hn : n ≠ 0) : a ^ n ∣ b ^ n
176178
rwa [emultiplicity_pow hp, emultiplicity_pow hp,
177179
ENat.mul_le_mul_left_iff (by exact_mod_cast hn) (ENat.coe_ne_top _)] at this
178180

181+
@[fun_prop]
182+
lemma hasFiniteMulSupport_fun_pow_multiplicity {α M : Type*} [CommMonoid M] [Subsingleton Rˣ]
183+
(f : α → M) {g : α → R} (hgi : g.Injective) (hg : ∀ s, Irreducible (g s)) {r : R} (hr : r ≠ 0) :
184+
(fun s : α ↦ f s ^ multiplicity (g s) r).HasFiniteMulSupport := by
185+
classical
186+
simp only [multiplicity_eq_count_normalizedFactors (hg _) hr, normalize_eq]
187+
fun_prop
188+
179189
end UniqueFactorizationMonoid

0 commit comments

Comments
 (0)