Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions of TypeDensity.Assembly.TypeEvents

Definition
TypeDensity_Assembly_TypeEvents

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

type-density

Type events and divisor counts

Type events of polynomials over a complete DVR O with finite residue field and the combinatorics of exceptional divisors used to assemble the cell laws: unit scaling and the binary decomposition of type events, type descent along unramified blocks, the array of a divisor and divisor counts, and the law of a product of reduced forms.

Main results

  • affine_type_event_unit_scaling, binary_type_event_decomposition: elementary properties of type events.
  • descended_block_type_iff: types of polynomials in a block cell.
  • divisor_array_exists_unique, divisor_count_of_point_set, divisor_count_eval_of_point_count, affine_divisor_count: arrays and divisor counts.
  • monic_polynomial_divisor: monic polynomials correspond to affine divisors.
  • form_product_type_event_law: the law of a product of reduced forms.

Provenance: Thm_SurfaceBlowupV2_{affine_type_event_unit_scaling, array_enumeration, binary_type_event_decomposition, descended_block_type_iff, divisor_array_exists_unique, divisor_count_of_point_set, affine_divisor_count, divisor_vector_properties, form_product_type_iff, form_product_type_event_sets, form_product_type_event_law, monic_polynomial_divisor}.

Definition code
-- Generated by the TypeDensity exporter from TypeDensity/Assembly/TypeEvents.lean (namespace TypeDensity); do not edit.
import Definitions.Def_TypeDensity_Basic
import Definitions.Def_TypeDensity_Blowup_Directions
import Definitions.Def_TypeDensity_Measure_AdicCylinders
import Definitions.Def_TypeDensity_Formula_LawAlgebra
import Definitions.Def_TypeDensity_Measure_HenselProducts
import Definitions.Def_TypeDensity_Surfaces_Lengths
import Definitions.Def_TypeDensity_Surfaces_PowerSeries
import Definitions.Def_TypeDensity_Formula_FiniteFieldCounts
import Definitions.Def_TypeDensity_Formula_StateCombinatorics
import Definitions.Def_TypeDensity_Formula_PatternCounts
import Definitions.Def_TypeDensity_Unramified_Extension
import Definitions.Def_TypeDensity_Blowup_Charts
import Definitions.Def_TypeDensity_Algebra_AlgebraType
import Definitions.Def_TypeDensity_Measure_PrimitiveLocus
import Definitions.Def_TypeDensity_Algebra_FactorInvariant
import Definitions.Def_TypeDensity_Surfaces_TruncatedSeries
import Definitions.Def_TypeDensity_Blowup_TwoChartCurveData
import Definitions.Def_TypeDensity_Surfaces_ConcreteAtlas
import Definitions.Def_TypeDensity_Recursion_Members
import Definitions.Def_TypeDensity_Measure_MemberCharts
import Definitions.Def_TypeDensity_Recursion_Termination
import Definitions.Def_TypeDensity_Recursion_OrderDefect
import Definitions.Def_TypeDensity_Assembly_NullBridges
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.Topology.Algebra.MvPolynomial
import Mathlib.FieldTheory.Finite.GaloisField
import Mathlib.RingTheory.AdicCompletion.Algebra
import Mathlib.RingTheory.RegularLocalRing.Defs
import Mathlib.Algebra.Group.Pi.Units
import Mathlib.Order.CompletePartialOrder
import Mathlib.RingTheory.Henselian
import Mathlib.RingTheory.Polynomial.Resultant.Basic
import Mathlib.RingTheory.SimpleRing.Principal
import Mathlib.FieldTheory.Finite.Extension
import Mathlib.RingTheory.AdicCompletion.Noetherian
import Mathlib.RingTheory.MvPowerSeries.Equiv
import Mathlib.RingTheory.PicardGroup
import Mathlib.FieldTheory.RatFunc.AsPolynomial
import Mathlib.RingTheory.AdicCompletion.Completeness
import Mathlib.Algebra.GroupWithZero.Submonoid.CancelMulZero
import Mathlib.Algebra.Module.StablyFree.Basic
import Mathlib.NumberTheory.Padics.RingHoms
import Mathlib.Algebra.Azumaya.Basic
import Mathlib.RingTheory.AdicCompletion.RingHom
import Mathlib.RingTheory.TotallySplit
import Mathlib.RingTheory.AdicCompletion.LocalRing
import Mathlib.RingTheory.KrullDimension.NonZeroDivisors
import Mathlib.Algebra.Group.NatPowAssoc
import Mathlib.Algebra.Order.Ring.Star
import Mathlib.Data.Int.Star
import Mathlib.LinearAlgebra.Dimension.Torsion.Finite
set_option autoImplicit false

namespace TypeDensity

open scoped BigOperators ENNReal

theorem finite_directions_of_degree (k : Type) [Field k] [Finite k]
    (p : ClosedDirection k → Prop) (n : ℕ) :
    Finite {Q : ClosedDirection k // p Q ∧ directionDegree k Q = n} := by
  let f : {Q : ClosedDirection k // p Q ∧ directionDegree k Q = n} → Option (Fin (n+1) → k) :=
    fun Q => Option.map (fun φ : AffineDirection k => fun i : Fin (n+1) => φ.val.coeff i) Q.1
  refine Finite.of_injective f ?_
  rintro ⟨Q, hQ⟩ ⟨Q', hQ'⟩ h
  apply Subtype.ext
  simp only [f] at h
  cases Q with
  | none =>
    cases Q' with
    | none => rfl
    | some _ => simp at h
  | some φ =>
    cases Q' with
    | none => simp at h
    | some ψ =>
      simp only [Option.map_some, Option.some.injEq] at h
      change some φ = some ψ
      congr 1
      apply Subtype.ext
      apply Polynomial.ext
      intro i
      by_cases hi : i < n + 1
      · exact congrFun h ⟨i, hi⟩
      · have h1 : φ.val.natDegree < i := by simp [directionDegree] at hQ; omega
        have h2 : ψ.val.natDegree < i := by simp [directionDegree] at hQ'; omega
        rw [Polynomial.coeff_eq_zero_of_natDegree_lt h1,
          Polynomial.coeff_eq_zero_of_natDegree_lt h2]

section

variable (k : Type) [Field k] (S : Set (ClosedDirection k)) (n : ℕ)

abbrev DegPoints (i : Fin n) : Type := {Q : ClosedDirection k // Q ∈ S ∧ directionDegree k
    Q =
    i.val + 1}

def degreeFiberEquiv (D : ExceptionalDivisor k) (hS : ∀ Q, D Q ≠ 0 → Q ∈ S) (i j : Fin n) :
    {Q : ClosedDirection k // directionDegree k Q = i.val + 1 ∧ D Q = j.val + 1} ≃
      {q : DegPoints k S n i // D q.1 = j.val + 1} where
  toFun Q := ⟨⟨Q.1, hS Q.1 (by omega), Q.2.1⟩, Q.2.2⟩
  invFun q := ⟨q.1.1, q.1.2.2, q.2⟩
  left_inv _ := rfl
  right_inv _ := rfl

open scoped Classical in
noncomputable def divisorOfColoringFun (g : ∀ i : Fin n, DegPoints k S n i → Option (Fin n))
    (Q : ClosedDirection k) : ℕ :=
  if h : ∃ i : Fin n, Q ∈ S ∧ directionDegree k Q = i.val + 1 then
    (g h.choose ⟨Q, h.choose_spec⟩).elim 0 (fun j => j.val + 1) else 0

theorem divisorOfColoringFun_support_finite [Finite k]
    (g : ∀ i : Fin n, DegPoints k S n i → Option (Fin n)) :
    (Function.support (divisorOfColoringFun k S n g)).Finite := by
  have : ∀ i, Finite (DegPoints k S n i) := fun i => finite_directions_of_degree k _ _
  refine Set.Finite.subset (Set.finite_iUnion fun i => Set.finite_range
      (Subtype.val : DegPoints k S n i → _)) ?_
  intro Q hQ
  simp only [Function.mem_support, divisorOfColoringFun] at hQ
  split_ifs at hQ with h
  · obtain ⟨i, hi⟩ := h
    exact Set.mem_iUnion.mpr ⟨i, ⟨Q, hi⟩, rfl⟩
  · exact absurd rfl hQ

noncomputable def divisorOfColoring [Finite k]
    (g : ∀ i : Fin n, DegPoints k S n i → Option (Fin n)) : ExceptionalDivisor k :=
  Finsupp.ofSupportFinite (divisorOfColoringFun k S n g)
      (divisorOfColoringFun_support_finite k S n g)

def coloringOfDivisor (D : ExceptionalDivisor k) (hb : ∀ Q, D Q ≤ n) (i : Fin n)
    (q : DegPoints k S n i) : Option (Fin n) :=
  if h : D q.1 = 0 then none else some ⟨D q.1 - 1, by have := hb q.1; omega⟩

end

section

variable {k : Type} [Field k]

noncomputable def directionPoly : ClosedDirection k → Polynomial k
  | none => 1
  | some φ => φ.val

open scoped Classical in
noncomputable def directionOfPoly (p : Polynomial k) : ClosedDirection k :=
  if hp : p.Monic ∧ Irreducible p then some ⟨p, hp⟩ else none

end

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