Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions of TypeDensity.Measure.PrimitiveLocus

Definition
TypeDensity_Measure_PrimitiveLocus

by asving · Oct 16, 2026 · Mathlib 0df444a (Lean v4.33.1)

type-density

The primitive locus, state measures, and integral closures

Mass computations for the coefficient measure (the primitive locus of O^(n+1), total masses of state measures, the Haar property of the unramified coefficient measure), lifting lemmas for generators of residue cells, and the structure of the integral closure of a complete DVR with finite residue field in a finite extension of its fraction field (complete, local, a DVR), with the p-adic specializations.

Main results

  • primitive_locus_mass: the primitive vectors of O^(n+1) have mass 1 - q^(-(n+1)).
  • state_measure_total_mass: an atlas with N charts has total state mass N q^(-n).
  • unramified_coefficient_measure_haar: the unramified coefficient measure is a Haar probability measure with the expected cylinder masses.
  • integral_closure_is_local, integral_closure_is_dvr, integral_closure_own_adic_complete.
  • polynomial_type_degree: a polynomial type is valid and has the polynomial's degree.

Provenance: Thm_SurfaceBlowupV2_*: primitive_locus_mass, scaled_normalization_identity, state_measure_total_mass, units_lift_from_local_quotient, residue_ideal_has_fixed_generator_lift, unramified_coefficient_measure_haar, integral_closure_{adic_complete, finite_reduction, is_local, is_dvr, own_adic_complete}, irreducible_factor_invariant_degree, polynomial_type_degree, padicIntegers_{isDVR, maximal_adic_complete, residueField_finite}, quotient_ring_length_intrinsic.

Definition code
-- Generated by the TypeDensity exporter from TypeDensity/Measure/PrimitiveLocus.lean (namespace TypeDensity); do not edit.
import Definitions.Def_TypeDensity_Basic
import Definitions.Def_TypeDensity_Formula_LawAlgebra
import Definitions.Def_TypeDensity_Algebra_AlgebraType
import Definitions.Def_TypeDensity_Measure_AdicCylinders
import Definitions.Def_TypeDensity_Measure_HenselProducts
import Definitions.Def_TypeDensity_Unramified_Extension
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
import Mathlib.Topology.Algebra.MvPolynomial
import Mathlib.Algebra.Group.Pi.Units
import Mathlib.Order.CompletePartialOrder
import Mathlib.RingTheory.Polynomial.Resultant.Basic
import Mathlib.RingTheory.SimpleRing.Principal
import Mathlib.Algebra.GroupWithZero.Submonoid.CancelMulZero
import Mathlib.Algebra.Module.StablyFree.Basic
import Mathlib.NumberTheory.Padics.RingHoms
set_option autoImplicit false

open MeasureTheory

open scoped BigOperators ENNReal

namespace TypeDensity

/-- The integral closure of a complete DVR in a finite extension (assumed `O`-finite) is
`𝔪_O`-adically complete. -/
theorem integral_closure_adic_complete (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)] [IsAdicComplete (IsLocalRing.maximalIdeal O) O]
    [Finite (IsLocalRing.ResidueField O)] :
    IsAdicComplete (IsLocalRing.maximalIdeal O) (integralClosure O L) := by
  obtain ⟨h1, h2, -⟩ := integral_closure_finite_free O K L
  exact finite_free_adic_complete O (integralClosure O L) _

/-- The integral closure has finite reduction modulo `𝔪_O`. -/
theorem integral_closure_finite_reduction (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)] [IsAdicComplete (IsLocalRing.maximalIdeal O) O]
    [Finite (IsLocalRing.ResidueField O)] :
    Finite (integralClosure O L ⧸
      (IsLocalRing.maximalIdeal O).map (algebraMap O (integralClosure O L))) := by
  obtain ⟨h1, h2, -⟩ := integral_closure_finite_free O K L
  have : Finite (O ⧸ IsLocalRing.maximalIdeal O) := ‹Finite (IsLocalRing.ResidueField O)›
  have hfin := finite_free_residue_quotient O (integralClosure O L)
    (IsLocalRing.maximalIdeal O)
  rw [Ideal.smul_top_eq_map] at hfin
  exact Finite.of_equiv _ (Submodule.Quotient.restrictScalarsEquiv O _).toEquiv

/-- The integral closure of a complete DVR with finite residue field in a finite extension
(assumed `O`-finite) is a local ring. -/
theorem integral_closure_is_local (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)] [IsAdicComplete (IsLocalRing.maximalIdeal O) O]
    [Finite (IsLocalRing.ResidueField O)] :
    IsLocalRing (integralClosure O L) := by
  have h1 := integral_closure_adic_complete O K L
  have h2 := integral_closure_finite_reduction O K L
  have : IsAdicComplete ((IsLocalRing.maximalIdeal O).map
      (algebraMap O (integralClosure O L))) (integralClosure O L) :=
    (IsAdicComplete.map_algebraMap_iff _ _).mpr h1
  exact complete_domain_finite_quotient_local (integralClosure O L)
    ((IsLocalRing.maximalIdeal O).map (algebraMap O (integralClosure O L)))

/-- The integral closure of a complete DVR with finite residue field in a finite extension
(assumed `O`-finite) is a DVR. -/
theorem integral_closure_is_dvr (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)]
    [IsAdicComplete (IsLocalRing.maximalIdeal O) O] [Finite (IsLocalRing.ResidueField O)] :
    IsDiscreteValuationRing (integralClosure O L) := by
  have := integral_closure_is_local O K L
  have hD := integral_closure_is_dedekind O K L
  have hN : IsNoetherianRing (integralClosure O L) := inferInstance
  exact ((IsDiscreteValuationRing.TFAE (R := integralClosure O L)
    (integral_closure_not_field O K L)).out 0 2).mpr hD

/-- The ring of integers of a finite extension of `ℚ_[p]` is a DVR. -/
theorem padicIntegers_isDVR (p : ℕ) [Fact p.Prime] (K : Type) [Field K] [Algebra ℚ_[p] K]
    [Algebra ℤ_[p] K] [IsScalarTower ℤ_[p] ℚ_[p] K] [FiniteDimensional ℚ_[p] K] :
    IsDiscreteValuationRing (padicIntegers p K) := by
  have : Algebra.IsSeparable ℚ_[p] K :=
    Algebra.IsAlgebraic.isSeparable_of_perfectField
  have : Finite (IsLocalRing.ResidueField ℤ_[p]) :=
    Finite.of_equiv (ZMod p) (PadicInt.residueField (p := p)).toEquiv.symm
  have : Module.Finite ℤ_[p] (integralClosure ℤ_[p] K) :=
    IsIntegralClosure.finite ℤ_[p] ℚ_[p] K (integralClosure ℤ_[p] K)
  exact integral_closure_is_dvr ℤ_[p] ℚ_[p] K

end TypeDensity

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me