Skip to content

Commit 60da1e5

Browse files
xgenereuxMaría Inés de Frutos Fernández
andcommitted
feat(FunctionField): constant extensions are finite (leanprover-community#37388)
Let `F` be a function field over `Fq`. If `E` is an algebraic extension of `Fq` which is contained in `F` then it is finite over `Fq`. To implement this, we model the following tower of extensions: ``` E(X) - F / \ | E[X] Fq(X) / \ / E Fq[X] \ / Fq ``` by assuming algebra hypotheses on the level of `Fq[X]` and `E[X]` and use ``` attribute [local instance] Polynomial.algebra ``` together with the scoped `RatFunc` instances `RatFunc.liftAlgebra` and `RatFunc.isScalarTower_liftAlgebra` to obtain the appropriate algebra instances from `RatFunc Fq/E`. One annoying thing is that using these instances creates a diamond with `RatFunc.instSMulOfFractionRingPolynomial`, I am working on trying to find a fix but don't have anything at the moment. I am open to suggestions! Here are some details on this diamond: Since both `RatFunc E` and `FractionRing E[X]` (which are not defeq) have an `IsFractionRing E[X]` instance we get two maps coming from `RatFunc.liftAlgebra`: 1. (RatFunc.liftAlgebra Fq (FractionRing E[X])) 2. (RatFunc.liftAlgebra Fq (RatFunc E)) Where the first one is transported back to `RatFunc E` via `RatFunc.instSMulOfFractionRingPolynomial`. Analyzing ``` @RatFunc.instSMulOfFractionRingPolynomial _ _ (RatFunc Fq) (RatFunc.liftAlgebra Fq (FractionRing E[X])).toSMul = (RatFunc.liftAlgebra Fq (RatFunc E)).toSMul ``` we see that this boils down to `{ toFractionRing := (IsLocalization.lift ⋯) x } = (IsFractionRing.lift ⋯) x` not being defeq. Co-authored-by: María Inés de Frutos Fernández <[mariaines.dff@gmail.com](mailto:mariaines.dff@gmail.com)> Co-authored-by: Xavier Genereux <xaviergenereux@hotmail.com>
1 parent 8885ca9 commit 60da1e5

2 files changed

Lines changed: 84 additions & 28 deletions

File tree

Mathlib/NumberTheory/FunctionField.lean

Lines changed: 74 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ adding them back in lemmas when they are needed.
3636
* [D. Marcus, *Number Fields*][marcus1977number]
3737
* [J.W.S. Cassels, A. Fröhlich, *Algebraic Number Theory*][cassels1967algebraic]
3838
* [P. Samuel, *Algebraic Theory of Numbers*][samuel1967]
39+
* [M. Rosen, *Number Theory in Function Fields*][rosen2002]
3940
4041
## Tags
4142
function field, ring of integers
@@ -46,7 +47,7 @@ function field, ring of integers
4647

4748
noncomputable section
4849

49-
open scoped nonZeroDivisors Polynomial WithZero
50+
open scoped nonZeroDivisors Polynomial WithZero RatFunc
5051

5152
variable (F K : Type*) [Field F] [Field K]
5253

@@ -55,15 +56,15 @@ extension of the field of rational functions in one variable over `F`.
5556
5657
Note that `K` can be a function field over multiple, non-isomorphic, `F`.
5758
-/
58-
abbrev FunctionField [Algebra (RatFunc F) K] : Prop :=
59-
FiniteDimensional (RatFunc F) K
59+
abbrev FunctionField [Algebra F⟮X⟯ K] : Prop :=
60+
FiniteDimensional F⟮X⟯ K
6061

6162
/-- `K` is a function field over `F` iff it is a finite extension of `F(t)`. -/
6263
theorem functionField_iff (Ft : Type*) [Field Ft] [Algebra F[X] Ft]
63-
[IsFractionRing F[X] Ft] [Algebra (RatFunc F) K] [Algebra Ft K] [Algebra F[X] K]
64-
[IsScalarTower F[X] Ft K] [IsScalarTower F[X] (RatFunc F) K] :
64+
[IsFractionRing F[X] Ft] [Algebra F⟮X⟯ K] [Algebra Ft K] [Algebra F[X] K]
65+
[IsScalarTower F[X] Ft K] [IsScalarTower F[X] F⟮X⟯ K] :
6566
FunctionField F K ↔ FiniteDimensional Ft K := by
66-
let e := IsLocalization.algEquiv F[X]⁰ (RatFunc F) Ft
67+
let e := IsLocalization.algEquiv F[X]⁰ F⟮X⟯ Ft
6768
have : ∀ (c) (x : K), e c • x = c • x := by
6869
intro c x
6970
rw [Algebra.smul_def, Algebra.smul_def]
@@ -72,18 +73,18 @@ theorem functionField_iff (Ft : Type*) [Field Ft] [Algebra F[X] Ft]
7273
refine IsLocalization.ext (nonZeroDivisors F[X]) _ _ ?_ ?_ ?_ ?_ ?_ <;> intros <;>
7374
simp only [map_one, map_mul, AlgEquiv.commutes, ← IsScalarTower.algebraMap_apply]
7475
constructor <;> intro h
75-
· let b := Module.finBasis (RatFunc F) K
76+
· let b := Module.finBasis F⟮X⟯ K
7677
exact (b.mapCoeffs e this).finiteDimensional_of_finite
7778
· let b := Module.finBasis Ft K
7879
refine (b.mapCoeffs e.symm ?_).finiteDimensional_of_finite
7980
intro c x; convert (this (e.symm c) x).symm; simp only [e.apply_symm_apply]
8081

8182
namespace FunctionField
8283

83-
theorem algebraMap_injective [Algebra F[X] K] [Algebra (RatFunc F) K]
84-
[IsScalarTower F[X] (RatFunc F) K] : Function.Injective (⇑(algebraMap F[X] K)) := by
85-
rw [IsScalarTower.algebraMap_eq F[X] (RatFunc F) K]
86-
exact (algebraMap (RatFunc F) K).injective.comp (IsFractionRing.injective F[X] (RatFunc F))
84+
theorem algebraMap_injective [Algebra F[X] K] [Algebra F⟮X⟯ K]
85+
[IsScalarTower F[X] F⟮X⟯ K] : Function.Injective (algebraMap F[X] K) := by
86+
rw [IsScalarTower.algebraMap_eq F[X] F⟮X⟯ K]
87+
exact (algebraMap F⟮X⟯ K).injective.comp (IsFractionRing.injective F[X] F⟮X⟯)
8788

8889
/-- The function field analogue of `NumberField.ringOfIntegers`:
8990
`FunctionField.ringOfIntegers F K` is the integral closure of `F[X]` in `K`.
@@ -104,12 +105,12 @@ instance : IsDomain (ringOfIntegers F K) :=
104105
instance : IsIntegralClosure (ringOfIntegers F K) F[X] K :=
105106
integralClosure.isIntegralClosure _ _
106107

107-
variable [Algebra (RatFunc F) K] [IsScalarTower F[X] (RatFunc F) K]
108+
variable [Algebra F⟮X⟯ K] [IsScalarTower F[X] F⟮X⟯ K]
108109

109-
theorem algebraMap_injective : Function.Injective (⇑(algebraMap F[X] (ringOfIntegers F K))) := by
110-
have hinj : Function.Injective (⇑(algebraMap F[X] K)) := by
111-
rw [IsScalarTower.algebraMap_eq F[X] (RatFunc F) K]
112-
exact (algebraMap (RatFunc F) K).injective.comp (IsFractionRing.injective F[X] (RatFunc F))
110+
theorem algebraMap_injective : Function.Injective (algebraMap F[X] (ringOfIntegers F K)) := by
111+
have hinj : Function.Injective (algebraMap F[X] K) := by
112+
rw [IsScalarTower.algebraMap_eq F[X] F⟮X⟯ K]
113+
exact (algebraMap F⟮X⟯ K).injective.comp (IsFractionRing.injective F[X] F⟮X⟯)
113114
rw [injective_iff_map_eq_zero (algebraMap F[X] (↥(ringOfIntegers F K)))]
114115
intro p hp
115116
rw [← Subtype.coe_inj, Subalgebra.coe_zero] at hp
@@ -124,16 +125,16 @@ theorem not_isField : ¬IsField (ringOfIntegers F K) := by
124125
variable [FunctionField F K]
125126

126127
instance : IsFractionRing (ringOfIntegers F K) K :=
127-
integralClosure.isFractionRing_of_finite_extension (RatFunc F) K
128+
integralClosure.isFractionRing_of_finite_extension F⟮X⟯ K
128129

129130
instance : IsIntegrallyClosed (ringOfIntegers F K) :=
130-
integralClosure.isIntegrallyClosedOfFiniteExtension (RatFunc F)
131+
integralClosure.isIntegrallyClosedOfFiniteExtension F⟮X⟯
131132

132-
instance [Algebra.IsSeparable (RatFunc F) K] : IsNoetherian F[X] (ringOfIntegers F K) :=
133-
IsIntegralClosure.isNoetherian _ (RatFunc F) K _
133+
instance [Algebra.IsSeparable F⟮X⟯ K] : IsNoetherian F[X] (ringOfIntegers F K) :=
134+
IsIntegralClosure.isNoetherian _ F⟮X⟯ K _
134135

135-
instance [Algebra.IsSeparable (RatFunc F) K] : IsDedekindDomain (ringOfIntegers F K) :=
136-
IsIntegralClosure.isDedekindDomain F[X] (RatFunc F) K _
136+
instance [Algebra.IsSeparable F⟮X⟯ K] : IsDedekindDomain (ringOfIntegers F K) :=
137+
IsIntegralClosure.isDedekindDomain F[X] F⟮X⟯ K _
137138

138139
end ringOfIntegers
139140

@@ -189,7 +190,7 @@ alias FtInfty := RatFunc.CompletionAtInfty
189190

190191
@[deprecated "Use the anonymous `Valued` instance on `RatFunc.CompletionAtInfty`"
191192
(since := "2026-04-14")]
192-
instance valuedFtInfty [DecidableEq (RatFunc F)] :
193+
instance valuedFtInfty [DecidableEq F⟮X⟯] :
193194
Valued (RatFunc.CompletionAtInfty F) ℤᵐ⁰ :=
194195
inferInstance
195196

@@ -239,18 +240,63 @@ lemma finiteDimensional_of_adjoin_transcendental (hy : Transcendental F y) :
239240
let : Algebra F⟮x⟯ Fxy := F⟮x⟯⟮y⟯.algebra
240241
let : Module F⟮x⟯ Fxy := Algebra.toModule
241242
let : SMul F⟮x⟯ Fxy := Algebra.toSMul
242-
let : FiniteDimensional F⟮y⟯ Fyx :=
243+
have : FiniteDimensional F⟮y⟯ Fyx :=
243244
adjoin.finiteDimensional
244245
(isAlgebraic_iff_isIntegral.mp (isAlgebraic_X_over_adjoin_transcendental hy))
245-
let : FiniteDimensional Fyx K := by
246-
let := FiniteDimensional.adjoin_algebraMap_X (F := F) (K := K)
246+
have : FiniteDimensional Fyx K := by
247+
have := FiniteDimensional.adjoin_algebraMap_X (F := F) (K := K)
247248
unfold Fyx
248249
rw [adjoin_simple_comm]
249-
let : IsScalarTower F⟮x⟯ Fxy K := isScalarTower_mid' F⟮x⟯⟮y⟯
250+
have : IsScalarTower F⟮x⟯ Fxy K := isScalarTower_mid' F⟮x⟯⟮y⟯
250251
exact .right F⟮x⟯ Fxy K
251-
let : IsScalarTower F⟮y⟯ Fyx K := isScalarTower_mid' F⟮y⟯⟮x⟯
252+
have : IsScalarTower F⟮y⟯ Fyx K := isScalarTower_mid' F⟮y⟯⟮x⟯
252253
.trans F⟮y⟯ Fyx K
253254

254255
end AdjoinTranscendental
255256

257+
section constantExtension
258+
259+
open RatFunc
260+
261+
variable {F}
262+
variable [Algebra F[X] K] [FaithfulSMul F[X] K] [FunctionField F K]
263+
264+
attribute [local instance] Polynomial.algebra
265+
266+
section Unbundled
267+
268+
open Polynomial
269+
270+
variable {E : Type*} [Field E] [Algebra F E] [Algebra E[X] K] [FaithfulSMul E[X] K]
271+
272+
theorem finiteDimensional_ratFunc_of_constantExtension [IsScalarTower F[X] E[X] K] :
273+
FiniteDimensional F⟮X⟯ E⟮X⟯ :=
274+
.equiv (AlgEquiv.ofInjectiveField (IsScalarTower.toAlgHom F⟮X⟯ E⟮X⟯ K)).toLinearEquiv.symm
275+
276+
/-- Let `K` be a function field over `F`. If `E` is an algebraic extension of `F` which is
277+
contained in `K` then it is finite over `F`. -/
278+
theorem finiteDimensional_of_constantExtension [IsScalarTower F[X] E[X] K]
279+
[Algebra.IsAlgebraic F E] : FiniteDimensional F E :=
280+
have := finiteDimensional_ratFunc_of_constantExtension (F := F) (E := E) K
281+
Module.finite_of_finrank_pos ((finrank_ratFunc_ratFunc F E) ▸ Module.finrank_pos)
282+
283+
end Unbundled
284+
285+
section IntermediateField
286+
287+
variable [Algebra F K] (E : IntermediateField F K) [Algebra E[X] K] [FaithfulSMul E[X] K]
288+
[IsScalarTower F[X] E[X] K]
289+
290+
instance : FiniteDimensional F⟮X⟯ E⟮X⟯ :=
291+
finiteDimensional_ratFunc_of_constantExtension K
292+
293+
/-- Let `K` be a function field over `F`. If `E` is an algebraic extension of `F` which is
294+
contained in `K` then it is finite over `F`. -/
295+
instance [Algebra.IsAlgebraic F E] : FiniteDimensional F E :=
296+
finiteDimensional_of_constantExtension K
297+
298+
end IntermediateField
299+
300+
end constantExtension
301+
256302
end FunctionField

docs/references.bib

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4903,6 +4903,16 @@ @Article{ rooij1970
49034903
pages = {21--30}
49044904
}
49054905

4906+
@Book{ rosen2002,
4907+
author = {Rosen, Michael},
4908+
title = {Number Theory in Function Fields},
4909+
series = {Graduate Texts in Mathematics},
4910+
publisher = {Springer-Verlag New York},
4911+
isbn = {978-0-387-95335-9},
4912+
year = {2002},
4913+
language = {English}
4914+
}
4915+
49064916
@Article{ rosenblum1958,
49074917
author = {Rosenblum, M.},
49084918
title = {On a theorem of {F}uglede and {P}utnam},

0 commit comments

Comments
 (0)