Definitions of TypeDensity.Algebra.AlgebraType
DefinitionTypeDensity_Algebra_AlgebraTypeAlgebra types and integral closures over a discrete valuation ring
For a domain O with fraction field K = BaseField O, an O-algebra B has algebra type σ
when its generic fibre K ⊗_O B is a finite product of finite field extensions Lᵢ/K with finite
O-integral closures, σ being the multiset of the invariants (e, f) of these closures. This
file sets up that notion and the order defect δ_O(B), and proves the closure-finiteness and
base-change facts used to compute types: transfer of closure finiteness along finite extensions of
O and finite separable extensions of fields, types of squarefree monic polynomials, invariance
of algebra types under isomorphism and products, and the structure of integral closures in finite
extensions of K (finite free of the right rank, Dedekind, not a field).
Main definitions
TypeDensity.fieldInvariant,TypeDensity.HasAlgebraTypeTypeDensity.GenericClosure,TypeDensity.orderImage,TypeDensity.orderDefect
Main results
TypeDensity.closure_finite_descent,TypeDensity.closure_finite_ascent,TypeDensity.closure_finite_ascent_root,TypeDensity.closure_finite_of_separableTypeDensity.HasPolynomialTypeF.to_original,TypeDensity.hasPolynomialTypeF_iff_of_separableTypeDensity.squarefree_monic_has_polynomial_type,TypeDensity.polynomial_type_dvdTypeDensity.algebra_type_pi,TypeDensity.integral_closure_finite_free,TypeDensity.integral_closure_is_dedekind,TypeDensity.unramified_generic_fibre_witness
Provenance: Def_SurfaceBlowupV2_{AlgebraType, OrderDefect}; Thm_Gen_{ClosureTransfer, Ascent, SepHelpers, TypeDvd}; Thm_SurfaceBlowupV2_{adjoinRoot_base_change, algebra_type_{algEquiv, of_generic_fibre_equiv, pi}, integral_closure_{algEquiv, finite_free, invariants_degree, is_dedekind, not_field}, pi_field_maximal_ideals, unramified_{fraction_base_change, generic_fibre_witness}}.
-- Generated by the TypeDensity exporter from TypeDensity/Algebra/AlgebraType.lean (namespace TypeDensity); do not edit.
import Definitions.Def_TypeDensity_Basic
import Definitions.Def_TypeDensity_Formula_LawAlgebra
import Mathlib.FieldTheory.RatFunc.Basic
import Mathlib.MeasureTheory.Measure.Haar.Unique
import Mathlib.NumberTheory.ArithmeticFunction.Moebius
import Mathlib.NumberTheory.Padics.PadicIntegers
import Mathlib.RingTheory.IntegralClosure.IntegralRestrict
import Mathlib.RingTheory.MvPowerSeries.Basic
import Mathlib.RingTheory.RamificationInertia.Basic
import Mathlib.Topology.Algebra.Nonarchimedean.AdicTopology
import Mathlib.FieldTheory.Finite.GaloisField
import Mathlib.RingTheory.AdicCompletion.Algebra
import Mathlib.RingTheory.RegularLocalRing.Defs
import Mathlib.RingTheory.Henselian
set_option autoImplicit false
noncomputable section
namespace TypeDensity
open scoped TensorProduct
open Polynomial IsLocalRing
section Definitions
variable (O : Type) [CommRing O] [IsDomain O]
/-- The invariants (e,f) of the maximal ideal of the integral closure of O in an O-algebra L (a
field in the applications), with the junk value (0,0) when that closure is not local. -/
noncomputable def fieldInvariant (L : Type) [CommRing L] [Algebra O L] : ℕ × ℕ := by
classical
let B := integralClosure O L
exact if h : IsLocalRing B then
letI : IsLocalRing B := h
((maximalIdeal B).ramificationIdx O, (maximalIdeal B).inertiaDeg O)
else (0,0)
/-- `HasAlgebraType O B σ`: the generic fibre K ⊗_O B (K = FractionRing O) is isomorphic as a
K-algebra to a finite product of finite field extensions L_i of K whose O-integral closures are
finite O-modules, and σ is the multiset of their invariants. -/
def HasAlgebraType (B : Type) [CommRing B] [Algebra O B] (σ : FactorType) : Prop :=
∃ (ι : Type) (_ : Fintype ι) (L : ι → Type) (_ : ∀ i, Field (L i))
(_ : ∀ i, Algebra (BaseField O) (L i)) (_ : ∀ i, Algebra O (L i))
(_ : ∀ i, IsScalarTower O (BaseField O) (L i)) (_ : ∀ i, FiniteDimensional (BaseField O) (L i))
(_ : (BaseField O ⊗[O] B) ≃ₐ[BaseField O] (∀ i, L i)),
σ = ∑ i, ({fieldInvariant O (L i)} : FactorType) ∧
∀ i, Module.Finite O (integralClosure O (L i))
/-- The integral closure of O in the generic fibre K ⊗_O B (K = BaseField O), as a type: a `def`
copy of the coerced subalgebra, so that the module quotient defining `orderDefect` can be formed. -/
def GenericClosure (B : Type) [CommRing B] [Algebra O B] : Type :=
↥(integralClosure O (BaseField O ⊗[O] B))
/-- The ring structure of `GenericClosure O B`, inherited from the subalgebra. -/
instance instCommRingGenericClosure (B : Type) [CommRing B] [Algebra O B] : CommRing (GenericClosure O B) :=
inferInstanceAs (CommRing ↥(integralClosure O (BaseField O ⊗[O] B)))
/-- The `O`-algebra structure of `GenericClosure O B`, inherited from the subalgebra. -/
instance instAlgebraGenericClosure (B : Type) [CommRing B] [Algebra O B] : Algebra O (GenericClosure O B) :=
inferInstanceAs (Algebra O ↥(integralClosure O (BaseField O ⊗[O] B)))
/-- The inclusion of the closure into the generic fibre (the subalgebra's `val`). -/
def genericClosureVal (B : Type) [CommRing B] [Algebra O B] :
GenericClosure O B →ₐ[O] BaseField O ⊗[O] B :=
(integralClosure O (BaseField O ⊗[O] B)).val
/-- The O-submodule of the closure formed by the elements 1 ⊗ b, b ∈ B (the image of the order B
in its generic fibre): the preimage of the range of includeRight under the inclusion. -/
def orderImage (B : Type) [CommRing B] [Algebra O B] : Submodule O (GenericClosure O B) :=
Submodule.comap (genericClosureVal O B).toLinearMap
(LinearMap.range (Algebra.TensorProduct.includeRight : B →ₐ[O] BaseField O ⊗[O] B).toLinearMap)
/-- δ_O(B): the O-length (an ℕ∞) of the integral closure of O in K ⊗_O B modulo the image of B.
It is finite when K ⊗_O B is a product of fields and B is finite free; ⊤ is a legitimate value. -/
noncomputable def orderDefect (B : Type) [CommRing B] [Algebra O B] : ℕ∞ :=
Module.length O (GenericClosure O B ⧸ orderImage O B)
end Definitions
/-- Over a finite (hence integral) extension `O → Oδ`, the integral closures of `O` and of `Oδ` in
`L` coincide. -/
def integralClosureTowerEquiv (O Oδ L : Type) [CommRing O] [CommRing Oδ] [Algebra O Oδ]
[Module.Finite O Oδ] [CommRing L] [Algebra O L] [Algebra Oδ L] [IsScalarTower O Oδ L] :
integralClosure O L ≃ₐ[O] integralClosure Oδ L := by
have : Algebra.IsIntegral O Oδ := Algebra.IsIntegral.of_finite O Oδ
exact
{ toFun := fun x ↦ ⟨x.1, x.2.tower_top⟩
invFun := fun x ↦ ⟨x.1, isIntegral_trans _ x.2⟩
left_inv := fun _ ↦ rfl
right_inv := fun _ ↦ rfl
map_mul' := fun _ _ ↦ rfl
map_add' := fun _ _ ↦ rfl
commutes' := fun _ ↦ rfl }
theorem faithfulSMul_of_isFractionRing (O K L : Type) [CommRing O] [IsDomain O] [Field K]
[Algebra O K] [IsFractionRing O K] [Field L] [Algebra K L] [Algebra O L]
[IsScalarTower O K L] : FaithfulSMul O L := by
rw [faithfulSMul_iff_algebraMap_injective, IsScalarTower.algebraMap_eq O K L]
exact (algebraMap K L).injective.comp (IsFractionRing.injective O K)
/-- The integral closure of a DVR `O` in a finite extension `L` of `K = Frac O`, assumed finite
over `O`, is a Dedekind domain. -/
theorem integral_closure_is_dedekind (O K L : Type) [CommRing O] [IsDomain O]
[IsDiscreteValuationRing O] [Field K] [Algebra O K] [IsFractionRing O K] [Field L] [Algebra K L]
[Algebra O L] [IsScalarTower O K L] [FiniteDimensional K L]
[Module.Finite O (integralClosure O L)] :
IsDedekindDomain (integralClosure O L) := by
have := faithfulSMul_of_isFractionRing O K L
have hN : IsNoetherianRing (integralClosure O L) :=
isNoetherian_of_tower O (isNoetherian_of_isNoetherianRing_of_finite O (integralClosure O L))
have : IsFractionRing (integralClosure O L) L :=
IsIntegralClosure.isFractionRing_of_finite_extension O K L (integralClosure O L)
have : Algebra.IsIntegral O (integralClosure O L) := IsIntegralClosure.isIntegral_algebra O L
exact { hN, Ring.DimensionLEOne.of_isIntegral O (integralClosure O L),
(isIntegrallyClosed_iff L).mpr fun {x} hx ↦
⟨IsIntegralClosure.mk' (integralClosure O L) x (isIntegral_trans (R := O) _ hx),
IsIntegralClosure.algebraMap_mk' _ _ _⟩ with : IsDedekindDomain (integralClosure O L) }
section Fields
variable (K K' : Type) [Field K] [Field K'] [Algebra K K']
/-- The root-field map `K[X]/(g) → K'[X]/(h)` for `h ∣ g` over `K'`. -/
def rootHom (g : K[X]) (h : K'[X]) (hdvd : h ∣ g.map (algebraMap K K')) :
AdjoinRoot g →ₐ[K] AdjoinRoot h :=
AdjoinRoot.liftAlgHom g (Algebra.ofId K (AdjoinRoot h)) (AdjoinRoot.root h) (by
change g.eval₂ (algebraMap K (AdjoinRoot h)) _ = 0
rwa [IsScalarTower.algebraMap_eq K K' (AdjoinRoot h), ← eval₂_map, ← aeval_def,
AdjoinRoot.aeval_eq, AdjoinRoot.mk_eq_zero])
end Fields
/-- If the integral closure of a DVR `O` in a finite extension `L/K` is finite over `O`, it is
free of rank `[L : K]`. -/
theorem integral_closure_finite_free (O K L : Type) [CommRing O] [IsDomain O]
[IsDiscreteValuationRing O] [Field K] [Algebra O K] [IsFractionRing O K] [Field L]
[Algebra K L] [Algebra O L] [IsScalarTower O K L] [FiniteDimensional K L]
[hfin : Module.Finite O (integralClosure O L)] :
Module.Finite O (integralClosure O L) ∧ Module.Free O (integralClosure O L) ∧
Module.finrank O (integralClosure O L) = Module.finrank K L := by
have := faithfulSMul_of_isFractionRing O K L
have : Module.IsTorsionFree O L := .trans_faithfulSMul O K L
have : Module.IsTorsionFree O (integralClosure O L) := IsIntegralClosure.isTorsionFree O L
have : IsNoetherian O (integralClosure O L) := isNoetherian_of_isNoetherianRing_of_finite _ _
refine ⟨hfin, inferInstance, ?_⟩
have : IsLocalization (Algebra.algebraMapSubmonoid (integralClosure O L) (nonZeroDivisors O)) L :=
IsIntegralClosure.isLocalization O K L (integralClosure O L)
rw [Module.finrank_eq_card_chooseBasisIndex, Module.finrank_eq_card_basis
(Module.Basis.localizationLocalization K (nonZeroDivisors O) L
(Module.Free.chooseBasis O (integralClosure O L)))]
/-- The integral closure of a DVR `O` in a finite extension of `K = Frac O`, assumed finite over
`O`, is not a field. -/
theorem integral_closure_not_field (O K L : Type) [CommRing O] [IsDomain O]
[IsDiscreteValuationRing O] [Field K] [Algebra O K] [IsFractionRing O K] [Field L]
[Algebra K L] [Algebra O L] [IsScalarTower O K L] [FiniteDimensional K L]
[Module.Finite O (integralClosure O L)] : ¬ IsField (integralClosure O L) := fun h ↦ by
have := faithfulSMul_of_isFractionRing O K L
exact IsDiscreteValuationRing.not_isField O (isField_of_isIntegral_of_isField
(fun a b hab ↦ FaithfulSMul.algebraMap_injective O L (congrArg Subtype.val hab)) h)
end TypeDensity