Definitions of TypeDensity.Recursion.Members
DefinitionTypeDensity_Recursion_MembersMembers of the recursion universe
This file sets up the objects on which the measure-theoretic recursion of Theorem 8.1 runs.
A MeasuredSurface is a regular local surface over a complete DVR with finite residue field,
equipped with a state and an atlas of division charts, hence with a state measure; a
SurfaceUniverse is a family of measured surfaces closed under passing to the children of
tangent cells. Concrete members (ConcreteMember) are the surfaces O[[T,X]]/(π − u T^a X^b);
for them we prove the chart, measurability and finiteness inputs, and the structure of the
generators of state ideals. We also define the recursion events (type, return and exit events).
Main definitions
CellAssignment,MeasuredSurface,SurfaceUniverse,ConcreteMember,ChildMember,CellChildData,SurfaceUniverse.Terminates,SurfaceUniverse.LawStatement.
Main results
concrete_member_charts,concrete_member_cell_measurable,concrete_member_stateSet_measurable,concrete_member_measure_finite_support: measure-theoretic inputs for concrete members.concrete_member_curve_order_free,concrete_member_state_generator_division,concrete_member_division_chart_measure: generators of state ideals give division charts.cell_datum_point_equiv: children of a cell correspond to points of two-chart curve data.concrete_type_add_of_index_map: additivity of algebra types along a child decomposition.curve_sections_connecting_map_exists: the connecting map of the Čech sequence.
Provenance: Def_SurfaceBlowupV2_{CellAssignments, MeasuredSurfaces, ConcreteMembers, CellChildData, RecursionEvents}; Thm_SurfaceBlowupV2_{allowed_pattern_of_divisor_unique, baseChange_bijective_of_finite_cokernel, boundary_contact_length_ne_zero_iff, cell_child_mem_stateSet, cell_datum_point_equiv, chart_cell_law_generic, coefficient_measure_pi_one, concrete_member_{charts, cell_measurable, data_exists, stateSet_measurable, measure_finite_support, state_generator_contact_length, state_generator_regular, division_chart_measure, state_generator_transverse, curve_order_free, state_generator_division}, concrete_surface_crossing_curve_free, concrete_type_add_of_index_map, coordinate_ideal_measurableEmbedding, curve_sections_connecting_map_exists}.
-- Generated by the TypeDensity exporter from TypeDensity/Recursion/Members.lean (namespace TypeDensity); do not edit.
import Definitions.Def_TypeDensity_Basic
import Definitions.Def_TypeDensity_Formula_LawAlgebra
import Definitions.Def_TypeDensity_Measure_AdicCylinders
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_Blowup_Directions
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 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.Topology.Algebra.MvPolynomial
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
set_option autoImplicit false
noncomputable section
namespace TypeDensity
open IsLocalRing MeasureTheory
open scoped BigOperators ENNReal
section CellAssignments
variable (k : Type) [Field k]
open scoped Classical in
/-- The child state at the point Q of a degree-d tangent divisor Dv of a parent in state s,
equations (7.1)–(7.2): the point at infinity (old t-boundary) gives T(a,a; Dv(∞), c−d) resp.
T(a+b,a; Dv(∞), c−d); at a crossing the point Z = 0 (old x-boundary) gives T(a+b,b; Dv(Z), h−d);
every other point gives S(a; Dv(Q)) resp. S(a+b; Dv(Q)). -/
def pointChildState (s : State) (d : ℕ) (Dv : ExceptionalDivisor k) (Q : ClosedDirection k) :
State :=
match s with
| State.single a c =>
if Q = infinityDirection k then State.crossing a a (Dv Q) (c - d) else State.single a (Dv Q)
| State.crossing a b c h =>
if Q = infinityDirection k then State.crossing (a + b) a (Dv Q) (c - d)
else if Q = zeroDirection k then State.crossing (a + b) b (Dv Q) (h - d)
else State.single (a + b) (Dv Q)
/-- A cell assignment for the pattern P and the divisor Dv: a bijection between the entries of the
children list `children s P` and the support of Dv, sending the j-th entry to a point of the
prescribed degree whose child state (`pointChildState`) is the listed state. Existence follows
from `HasPattern` by counting. -/
structure CellAssignment (s : State) (P : TangentPattern s.degree) (Dv : ExceptionalDivisor k) where
pt : Fin (children s P).length → ClosedDirection k
inj : Function.Injective pt
supp : ∀ Q : ClosedDirection k, 0 < Dv Q ↔ ∃ j, pt j = Q
deg : ∀ j, directionDegree k (pt j) = ((children s P).get j).1
state : ∀ j, ((children s P).get j).2 = pointChildState k s P.d.val Dv (pt j)
end CellAssignments
/-- A surface realizing a state, over a complete DVR O with finite residue field and its compact
adic Borel structure, together with a finite atlas of division charts of its state set. -/
structure MeasuredSurface where
O : Type
[instCommRing : CommRing O]
[instDomain : IsDomain O]
[instDVR : IsDiscreteValuationRing O]
[instComplete : IsAdicComplete (maximalIdeal O) O]
[instFinite : Finite (ResidueField O)]
[instTop : TopologicalSpace O]
[instTopRing : IsTopologicalRing O]
[instCompact : CompactSpace O]
[instT2 : T2Space O]
[instSecond : SecondCountableTopology O]
[instMeas : MeasurableSpace O]
[instBorel : BorelSpace O]
htop : IsAdic (maximalIdeal O)
R : Type
[instCommRingR : CommRing R]
[instDomainR : IsDomain R]
[instAlgebra : Algebra O R]
[instRegular : IsRegularLocalRing R]
S : SurfaceData O R
s : State
valid : s.Valid
atlas : IdealAtlas O R S.pi s.degree (surfaceStateSet O R S s)
attribute [instance] MeasuredSurface.instCommRing MeasuredSurface.instDomain
MeasuredSurface.instDVR MeasuredSurface.instComplete MeasuredSurface.instFinite
MeasuredSurface.instTop
MeasuredSurface.instTopRing MeasuredSurface.instCompact MeasuredSurface.instT2
MeasuredSurface.instSecond
MeasuredSurface.instMeas MeasuredSurface.instBorel MeasuredSurface.instCommRingR
MeasuredSurface.instDomainR
MeasuredSurface.instAlgebra MeasuredSurface.instRegular
namespace MeasuredSurface
variable (M : MeasuredSurface)
/-- The residue cardinality q of the coefficient ring. -/
abbrev q : ℕ := Nat.card (ResidueField M.O)
/-- The state set `surfaceStateSet` of the surface in its state. -/
abbrev stateSet : Set (Ideal M.R) := surfaceStateSet M.O M.R M.S M.s
/-- The intrinsic σ-algebra `idealChartSigma` on the curve ideals of the surface. -/
instance measurableSpaceIdeal : MeasurableSpace (Ideal M.R) := idealChartSigma M.O M.R M.S.pi
/-- The state measure `stateMeasure` for the chosen atlas, with the intrinsic σ-algebra. -/
noncomputable def μ : Measure (Ideal M.R) := stateMeasure M.O M.R M.S.pi M.s.degree M.q M.atlas
/-- Allowed patterns of the state, as a type. -/
abbrev allowedPattern : Type := {P : TangentPattern M.s.degree // Allowed M.s P}
/-- A tangent cell index: an allowed pattern together with a divisor realizing it. -/
abbrev cellIndex : Type := Σ P : M.allowedPattern, patternDivisors (ResidueField M.R) M.s P.1
/-- The degree `d` of the tangent pattern of a cell. -/
def cellDegree (c : M.cellIndex) : ℕ := c.1.1.d.val
/-- The fixed-tangent cell `fixedTangentCell` attached to a cell index. -/
def cell (c : M.cellIndex) : Set (Ideal M.R) :=
fixedTangentCell M.O M.R M.S M.s (M.cellDegree c) c.2.1
/-- The list of (residue degree, state) pairs of the children of a cell. -/
def childList (c : M.cellIndex) : List (ℕ × State) := children M.s c.1.1
/-- The index type of the children of a cell. -/
abbrev childIdx (c : M.cellIndex) : Type := Fin (M.childList c).length
/-- The residue degree of the `j`-th child of a cell. -/
def childDelta (c : M.cellIndex) (j : M.childIdx c) : ℕ := ((M.childList c).get j).1
/-- The state of the `j`-th child of a cell. -/
def childState (c : M.cellIndex) (j : M.childIdx c) : State := ((M.childList c).get j).2
/-- A cell is a self cell if its pattern returns to the parent state. -/
def IsSelfCell (c : M.cellIndex) : Prop := SelfPattern M.s c.1.1
end MeasuredSurface
/-- The recursion interface record: a family of measured surfaces closed under passing to the
children of every tangent cell, with the geometric inputs of Theorem 8.1 as explicit fields (facts
about cells, child surfaces, the fixed-tangent bijections and types). No field mentions stateLaw. -/
structure SurfaceUniverse where
ι : Type 1
M : ι → MeasuredSurface
stateSet_measurable : ∀ i, MeasurableSet (M i).stateSet
volume : ∀ i, (M i).μ (M i).stateSet = densityValue (stateVolume (M i).s) (M i).q
divisors_finite : ∀ i (P : TangentPattern (M i).s.degree),
Finite (patternDivisors (ResidueField (M i).R) (M i).s P)
divisor_count : ∀ i, (M i).s.terminal = false → ∀ P : TangentPattern (M i).s.degree, Allowed
(M i).s P →
((Nat.card (patternDivisors (ResidueField (M i).R) (M i).s P) : ℕ) : ℚ) =
(tangentCount (M i).s P).eval ((M i).q : ℚ)
cell_measurable : ∀ i, (M i).s.terminal = false → ∀ c : (M i).cellIndex, MeasurableSet
((M i).cell c)
cells_cover : ∀ i, (M i).s.terminal = false → (M i).stateSet = ⋃ c : (M i).cellIndex, (M i).cell c
cells_disjoint : ∀ i, (M i).s.terminal = false →
Pairwise fun c c' : (M i).cellIndex => Disjoint ((M i).cell c) ((M i).cell c')
child : ∀ i (c : (M i).cellIndex), (M i).childIdx c → ι
child_state : ∀ i c j, (M (child i c j)).s = (M i).childState c j
child_residue : ∀ i c j, (M (child i c j)).q = (M i).q ^ (M i).childDelta c j
Φ : ∀ i (c : (M i).cellIndex), Ideal (M i).R → ∀ j : (M i).childIdx c, Ideal (M (child i c j)).R
Φ_bij : ∀ i, (M i).s.terminal = false → ∀ c,
Set.BijOn (Φ i c) ((M i).cell c) (Set.pi Set.univ fun j => (M (child i c j)).stateSet)
Φ_measurable : ∀ i, (M i).s.terminal = false → ∀ c (G : ∀ j, Set (Ideal (M (child i c j)).R)),
(∀ j, MeasurableSet (G j)) → MeasurableSet ((M i).cell c ∩ Φ i c ⁻¹' Set.pi Set.univ G)
Φ_measure : ∀ i, (M i).s.terminal = false → ∀ c (G : ∀ j, Set (Ideal (M (child i c j)).R)),
(∀ j, MeasurableSet (G j)) →
(M i).μ ((M i).cell c ∩ Φ i c ⁻¹' Set.pi Set.univ G) =
((M i).q : ℝ≥0∞)⁻¹ ^ tri ((M i).cellDegree c) * ∏ j, (M (child i c j)).μ (G j)
type_add : ∀ i, (M i).s.terminal = false → ∀ c (J : Ideal (M i).R), J ∈ (M i).cell c →
∀ τ : (M i).childIdx c → FactorType,
(∀ j, HasAlgebraType (M (child i c j)).O ((M (child i c j)).R ⧸ Φ i c J j) (τ j)) →
HasAlgebraType (M i).O ((M i).R ⧸ J) (∑ j, scaleType ((M i).childDelta c j) (τ j))
terminal_type : ∀ i (a : ℕ), (M i).s = State.single a 1 → ∀ J ∈ (M i).stateSet,
HasAlgebraType (M i).O ((M i).R ⧸ J) {(a,1)}
/-- In a surface universe `U`, every child ideal of a typed cell ideal again has an algebra type. -/
def SurfaceUniverse.ChildTypesExist (U : SurfaceUniverse) : Prop :=
∀ i, (U.M i).s.terminal = false → ∀ (c : (U.M i).cellIndex) (J : Ideal (U.M i).R),
J ∈ (U.M i).cell c → ∀ σ : FactorType, HasAlgebraType (U.M i).O ((U.M i).R ⧸ J) σ → ∀ j,
∃ τ : FactorType, HasAlgebraType (U.M (U.child i c j)).O
((U.M (U.child i c j)).R ⧸ U.Φ i c J j) τ
/-- An invariant `δ` of the ideals of a surface universe `U` does not increase when passing from a
typed cell ideal to a child, and strictly decreases on self cells. -/
def SurfaceUniverse.InvariantDecreases (U : SurfaceUniverse)
(δ : ∀ i : U.ι, Ideal (U.M i).R → ℕ) : Prop :=
∀ i, (U.M i).s.terminal = false → ∀ (c : (U.M i).cellIndex) (J : Ideal (U.M i).R),
J ∈ (U.M i).cell c → (∃ σ : FactorType, HasAlgebraType (U.M i).O ((U.M i).R ⧸ J) σ) → ∀ j,
δ (U.child i c j) (U.Φ i c J j) ≤ δ i J ∧
((U.M i).IsSelfCell c → δ (U.child i c j) (U.Φ i c J j) < δ i J)
/-- The states realized by a concrete surface with vertical exponents (a, b): S(a;c) when b = 0 and
T(a,b;c,h) when b > 0, with every displayed entry positive (compare S.a = a, S.b = b in
`surfaceStateSet`). -/
def StateShape (a b : ℕ) : State → Prop
| State.single a' c => a' = a ∧ b = 0 ∧ 0 < c
| State.crossing a' b' c h => a' = a ∧ b' = b ∧ 0 < b ∧ 0 < c ∧ 0 < h
/-- A state of the shape of a concrete surface with `0 < a` is valid. -/
theorem StateShape.valid {a b : ℕ} (ha : 0 < a) {s : State} (h : StateShape a b s) : s.Valid := by
cases s with
| single => obtain ⟨rfl, -, h3⟩ := h; exact ⟨ha, h3⟩
| crossing => obtain ⟨rfl, rfl, h3, h4, h5⟩ := h; exact ⟨ha, h3, h4, h5⟩
/-- A concrete member of the recursion universe: a complete DVR O with finite residue field and
its compact adic Borel structure, the concrete surface R = O[[T,X]]/(pi − u T^a X^b) with its
regular local structure and a `SurfaceData` whose parameters are the concrete ones, a state of
matching shape, and an ideal atlas of its state set. All fields are data or elementary
predicates. -/
structure ConcreteMember where
O : Type
[instCommRing : CommRing O]
[instDomain : IsDomain O]
[instDVR : IsDiscreteValuationRing O]
[instComplete : IsAdicComplete (maximalIdeal O) O]
[instFinite : Finite (ResidueField O)]
[instTop : TopologicalSpace O]
[instTopRing : IsTopologicalRing O]
[instCompact : CompactSpace O]
[instT2 : T2Space O]
[instSecond : SecondCountableTopology O]
[instMeas : MeasurableSpace O]
[instBorel : BorelSpace O]
htop : IsAdic (maximalIdeal O)
pi : O
hpi : Irreducible pi
u : (TwoSeries O)ˣ
a : ℕ
b : ℕ
ha : 0 < a
[instDomainR : IsDomain (ConcreteSurface O pi u a b)]
[instRegular : IsRegularLocalRing (ConcreteSurface O pi u a b)]
S : SurfaceData O (ConcreteSurface O pi u a b)
hS_pi : S.pi = pi
hS_t : S.t = surfaceT O pi u a b
hS_x : S.x = surfaceX O pi u a b
hS_a : S.a = a
hS_b : S.b = b
s : State
shape : StateShape a b s
atlas : IdealAtlas O (ConcreteSurface O pi u a b) S.pi s.degree
(surfaceStateSet O (ConcreteSurface O pi u a b) S s)
attribute [instance] ConcreteMember.instCommRing ConcreteMember.instDomain
ConcreteMember.instDVR ConcreteMember.instComplete ConcreteMember.instFinite
ConcreteMember.instTop
ConcreteMember.instTopRing ConcreteMember.instCompact ConcreteMember.instT2
ConcreteMember.instSecond
ConcreteMember.instMeas ConcreteMember.instBorel ConcreteMember.instDomainR
ConcreteMember.instRegular
namespace ConcreteMember
variable (m : ConcreteMember)
/-- The concrete surface of a member. -/
abbrev R : Type := ConcreteSurface m.O m.pi m.u m.a m.b
/-- The member as a measured surface: same coefficient ring, surface, SurfaceData, state and
atlas. -/
def toMeasured : MeasuredSurface where
O := m.O
htop := m.htop
R := m.R
S := m.S
s := m.s
valid := m.shape.valid m.ha
atlas := m.atlas
/-- The cell indices of a member, written on `m.R` (definitionally `m.toMeasured.cellIndex`):
an allowed pattern and a divisor realizing it. -/
abbrev cellIndex : Type :=
Σ P : {P : TangentPattern m.s.degree // Allowed m.s P}, patternDivisors (ResidueField m.R) m.s P.1
end ConcreteMember
section FromSurface
variable (R : Type) [CommRing R] (t x : R) [IsLocalRing R]
(e : (BlowupChart R t x ⧸ chartExceptional R t x) ≃+* Polynomial (ResidueField R))
(Dv : ExceptionalDivisor (ResidueField R)) (hinf : (infinityPoint R t x).IsPrime)
/-- The canonical map from the surface into the completed local ring at a point of the support:
through the right chart at ∞, through the left chart at an affine point. -/
def divisorFromSurface : ∀ Q, R →+* divisorLocalRing R t x e Dv hinf Q
| ⟨none, _⟩ => (@completedPointMap (BlowupChart R x t) _ (infinityPoint R t x) hinf).comp
(chartBase R x t)
| ⟨some φ, _⟩ => (completedPointMap (BlowupChart R t x) (directionPoint R t x e φ)).comp
(chartBase R t x)
end FromSurface
/-- The point of the support of Dv assigned to the j-th child by a cell assignment; kept as a
definition so that `divisorLocalRing … (asg.point j)` is not unfolded by instance resolution. -/
def CellAssignment.point {k : Type} [Field k] {s : State} {P : TangentPattern s.degree}
{Dv : ExceptionalDivisor k}
(asg : CellAssignment k s P Dv) (j : Fin (children s P).length) : divisorSupport Dv :=
⟨asg.pt j, (asg.supp _).mpr ⟨j, rfl⟩⟩
/-- A child member with its tower data over the parent coefficient ring `m.O`: a concrete member
`mc` in the state `s'` whose coefficient ring is a finite free `m.O`-algebra of rank δ with residue
field of cardinality q^δ and the same uniformizer, with coordinates `pc : mc.O ≃ₗ[m.O] m.O^δ` that
are a homeomorphism and a measurable equivalence under which the coefficient Haar measures of
`mc.O^r` are products of the parent's. Instance fields are non-dependent so that they are available
to the later fields. -/
structure ChildMember (m : ConcreteMember) (δ : ℕ) (s' : State) where
mc : ConcreteMember
[algO : Algebra m.O mc.O]
[finO : Module.Finite m.O mc.O]
[freeO : Module.Free m.O mc.O]
hrank : Module.finrank m.O mc.O = δ
hcard : Nat.card (ResidueField mc.O) = Nat.card (ResidueField m.O) ^ δ
hpi : mc.pi = algebraMap m.O mc.O m.pi
hstate : mc.s = s'
pc : mc.O ≃ₗ[m.O] (Fin δ → m.O)
pc_cont : Continuous pc ∧ Continuous pc.symm ∧ Measurable pc ∧ Measurable pc.symm
pc_measure : ∀ r : ℕ, coefficientMeasure mc.O r =
Measure.pi (fun _ : Fin r => Measure.map pc.symm (coefficientMeasure m.O δ))
attribute [instance] ChildMember.algO ChildMember.finO ChildMember.freeO
/-- The child data of a cell `c` (allowed pattern P, divisor Dv) of a concrete member `m`: the
exceptional-line isomorphism e with its formulas, the primality of the point at infinity, a
cell assignment matching the children list with the support of Dv, for each child index j a
child member (ChildMember) in the listed child state with the listed residue degree, and a ring
isomorphism Eq j from the completed local ring at the assigned point onto the child's surface
carrying the exceptional equation to T′, the old boundary to X′ at the boundary points, and the
coefficients through the tower. All fields are data or elementary predicates. -/
structure CellChildData (m : ConcreteMember) (c : m.cellIndex) where
e : (BlowupChart m.R m.S.t m.S.x ⧸ chartExceptional m.R m.S.t m.S.x) ≃+* Polynomial
(ResidueField m.R)
he : ∀ r : m.R, e (Ideal.Quotient.mk (chartExceptional m.R m.S.t m.S.x)
(chartBase m.R m.S.t m.S.x r)) =
Polynomial.C (residue m.R r)
heZ : e (Ideal.Quotient.mk (chartExceptional m.R m.S.t m.S.x) (chartSlope m.R m.S.t m.S.x)) =
Polynomial.X
hinf : (infinityPoint m.R m.S.t m.S.x).IsPrime
asg : CellAssignment (ResidueField m.R) m.s c.1.1 c.2.1
child : ∀ j : m.toMeasured.childIdx c, ChildMember m (m.toMeasured.childDelta c j)
(m.toMeasured.childState c j)
Eq : ∀ j, divisorLocalRing m.R m.S.t m.S.x e c.2.1 hinf (asg.point j) ≃+* (child j).mc.R
hEq_e : ∀ j, Eq j (divisorException m.R m.S.t m.S.x e c.2.1 hinf (asg.point j)) = (child j).mc.S.t
hEq_b : ∀ j, (asg.pt j = infinityDirection (ResidueField m.R) ∨ asg.pt j = zeroDirection
(ResidueField m.R)) →
Eq j (divisorBoundary m.R m.S.t m.S.x e c.2.1 hinf (asg.point j)) = (child j).mc.S.x
hEq_c : ∀ (j) (r : m.O), Eq j (divisorFromSurface m.R m.S.t m.S.x e c.2.1 hinf (asg.point j)
(algebraMap m.O m.R r)) = algebraMap (child j).mc.O (child j).mc.R
(algebraMap m.O (child j).mc.O r)
namespace CellChildData
variable {m : ConcreteMember} {c : m.toMeasured.cellIndex} (D : CellChildData m c)
/-- The j-th child member. -/
abbrev mc (j : m.toMeasured.childIdx c) : ConcreteMember := (D.child j).mc
/-- The point of the support assigned to the j-th child. -/
abbrev point (j : m.toMeasured.childIdx c) : divisorSupport c.2.1 := D.asg.point j
/-- The pullback into the j-th child surface as an O-algebra homomorphism. -/
def alpha (j : m.toMeasured.childIdx c) : m.R →ₐ[m.O] (D.mc j).R where
toRingHom := (D.Eq j).toRingHom.comp (divisorFromSurface m.R m.S.t m.S.x D.e c.2.1 D.hinf
(D.point j))
commutes' r := (D.hEq_c j r).trans (IsScalarTower.algebraMap_apply m.O (D.mc j).O (D.mc j).R
r).symm
/-- The strict-transform map of the recursion record on this cell: the colon strict transform
(`strictTransformIdeal`) of a parent ideal along alpha j by the d-th power of the child's
exceptional equation T′, d the degree of the cell. -/
def Φ (J : Ideal m.R) (j : m.toMeasured.childIdx c) : Ideal (D.mc j).R :=
strictTransformIdeal (D.alpha j) ((D.mc j).S.t) (m.toMeasured.cellDegree c) J
end CellChildData
namespace SurfaceUniverse
variable (U : SurfaceUniverse)
/-- The type event: ideals of the state whose curve order has type σ. -/
def typeEvent (i : U.ι) (σ : FactorType) : Set (Ideal (U.M i).R) :=
{J | J ∈ (U.M i).stateSet ∧ HasAlgebraType (U.M i).O ((U.M i).R ⧸ J) σ}
/-- The recursion tree of J is finite: J is in a terminal state, or J lies in a cell all of whose
child ideals have finite trees. -/
inductive Terminates : ∀ i : U.ι, Ideal (U.M i).R → Prop
| leaf (i : U.ι) (J : Ideal (U.M i).R) (hJ : J ∈ (U.M i).stateSet)
(ht : (U.M i).s.terminal = true) : Terminates i J
| node (i : U.ι) (c : (U.M i).cellIndex) (J : Ideal (U.M i).R) (hJ : J ∈ (U.M i).cell c)
(hnt : (U.M i).s.terminal = false)
(h : ∀ j, Terminates (U.child i c j) (U.Φ i c J j)) : Terminates i J
/-- The ideals of member `i` whose recursion tree is finite. -/
def terminatingSet (i : U.ι) : Set (Ideal (U.M i).R) := {J | U.Terminates i J}
/-- The ideals of the state set of member `i` whose recursion tree is infinite. -/
def nonterminatingSet (i : U.ι) : Set (Ideal (U.M i).R) := (U.M i).stateSet ∩ (U.terminatingSet i)ᶜ
/-- The measurable core of the type event: terminating ideals of type σ. -/
def termTypeEvent (i : U.ι) (σ : FactorType) : Set (Ideal (U.M i).R) :=
U.typeEvent i σ ∩ U.terminatingSet i
/-- The self cells of member `i`. -/
def selfCells (i : U.ι) : Type := {c : (U.M i).cellIndex // (U.M i).IsSelfCell c}
/-- The non-self (exit) cells of member `i`. -/
def exitCells (i : U.ι) : Type := {c : (U.M i).cellIndex // ¬ (U.M i).IsSelfCell c}
/-- The part of a cell whose child ideals lie in the prescribed sides G_j. -/
def childBox (i : U.ι) (c : (U.M i).cellIndex) (G : ∀ j, Set (Ideal (U.M (U.child i c j)).R)) :
Set (Ideal (U.M i).R) :=
(U.M i).cell c ∩ U.Φ i c ⁻¹' Set.pi Set.univ G
/-- The part of a cell whose children terminate with types τ_j adding up (with residue scaling) to
σ. -/
def typeBox (i : U.ι) (c : (U.M i).cellIndex) (σ : FactorType) : Set (Ideal (U.M i).R) :=
⋃ (τ : (U.M i).childIdx c → FactorType) (_ : σ = ∑ j, scaleType ((U.M i).childDelta c j) (τ j)),
U.childBox i c (fun j => U.termTypeEvent (U.child i c j) (τ j))
/-- At least k successive self returns. -/
def returnEvent : ℕ → ∀ i : U.ι, Set (Ideal (U.M i).R)
| 0, i => (U.M i).stateSet
| k+1, i => ⋃ c : U.selfCells i, U.childBox i c.1 (fun j => returnEvent k (U.child i c.1 j))
/-- Exactly k self returns, then an exit cell whose children terminate with total type σ. -/
def exitEvent (σ : FactorType) : ℕ → ∀ i : U.ι, Set (Ideal (U.M i).R)
| 0, i => ⋃ c : U.exitCells i, U.typeBox i c.1 σ
| k+1, i => ⋃ c : U.selfCells i, U.childBox i c.1 (fun j => exitEvent σ k (U.child i c.1 j))
/-- Exactly k self returns, then an exit cell all of whose children terminate. -/
def termExitEvent : ℕ → ∀ i : U.ι, Set (Ideal (U.M i).R)
| 0, i => ⋃ c : U.exitCells i, U.childBox i c.1 (fun j => U.terminatingSet (U.child i c.1 j))
| k+1, i => ⋃ c : U.selfCells i, U.childBox i c.1 (fun j => termExitEvent k (U.child i c.1 j))
/-- Exactly k self returns, then an exit cell with some nonterminating child. -/
def badExitEvent : ℕ → ∀ i : U.ι, Set (Ideal (U.M i).R)
| 0, i => ⋃ c : U.exitCells i, ⋃ j₀ : (U.M i).childIdx c.1,
U.childBox i c.1 (Function.update (fun _ => Set.univ) j₀
(U.nonterminatingSet (U.child i c.1 j₀)))
| k+1, i => ⋃ c : U.selfCells i, U.childBox i c.1 (fun j => badExitEvent k (U.child i c.1 j))
/-- The inductive statement of Theorem 8.1 for one member: the terminating type events are
measurable, the law coefficients are nonnegative and give the measures, the terminating set is
measurable and the nonterminating set is null. -/
def LawStatement (i : U.ι) : Prop :=
(∀ σ : FactorType, MeasurableSet (U.termTypeEvent i σ) ∧
0 ≤ (lawCoeff (stateLaw (U.M i).s) σ).eval ((U.M i).q : ℚ) ∧
(U.M i).μ (U.termTypeEvent i σ) =
densityValue (lawCoeff (stateLaw (U.M i).s) σ) (U.M i).q * (U.M i).μ (U.M i).stateSet) ∧
MeasurableSet (U.terminatingSet i) ∧ (U.M i).μ (U.nonterminatingSet i) = 0
end SurfaceUniverse
end TypeDensity
end