Lean sources

The unified Lean 4 / Mathlib codebase (namespace SurfaceBlowup), 77 files, 53679 lines, syntax-highlighted with line anchors; every identifier defined in the codebase links to its definition. Lines carrying a coloured chip are cited by the paper ↔ Lean map. Raw files sit next to the pages (same path, .lean). Root files: SurfaceBlowup.lean · Tests.lean · README.md · lakefile.lean · lean-toolchain · lake-manifest.json.

Toolchain: Lean v4.35.0, Mathlib 56a0058 (pinned in lakefile.lean). Main theorems: main_dvr, main_field_form, main_field_form_ramified, recip_main; trust boundary: Basic.lean. Corollaries added in v1.2: universal_type_laws, reciprocity_ringHom. Declaration index (reverse map Lean → paper).

SurfaceBlowup/

filetitlelinespublic declscited by the paper map
Basic.leanStatement-level definitions (the trust boundary)5037943
Main.leanMain theorems12033

SurfaceBlowup/Algebra/

filetitlelinespublic declscited by the paper map
AlgebraType.leanAlgebra types and integral closures over a discrete valuation ring645323
FactorInvariant.leanInvariance of factor invariants and uniqueness of algebra types32460

SurfaceBlowup/Assembly/

filetitlelinespublic declscited by the paper map
Formulas.leanThe density formulas for the route-F densities14022
MonicCells.leanMonic, projective and divisor cells134393
NullBridges.leanStrict-transform measures, type events and the projective null bridge490184
TypeEvents.leanType events and divisor counts1329170

SurfaceBlowup/Blowup/

filetitlelinespublic declscited by the paper map
CechStability.leanStability of the finite Čech coefficients31243
Charts.leanBlow-up charts, the exceptional line, and curve data11581442
CurveOrders.leanCurve orders, the exceptional line, and finitely supported local data1050261
CurveSections.leanCurve sections on the two-chart blow-up1115182
Directions.leanClosed points and divisors on the exceptional line154160
DivisorPoints.leanExceptional divisor points of two-chart curve data1461102
ExceptionalLayers.leanExceptional layers of the point blow-up843111
FixedTangentCellBijection.leanStrict transforms give a bijection on a fixed tangent cell48044
H0Comparison.leanComparing surface functions with Čech data on the blow-up1245203
NilpotentGluing.leanNilpotent gluing of exceptional levels1492163
PointTransport.leanTransport of points between blow-up charts1283240
StrictNormalizer.leanStrict transforms and the strict normalizer1497225
TwoChartCurveData.leanTwo-chart curve data1390120

SurfaceBlowup/Cluster/

filetitlelinespublic declscited by the paper map
Defs.leanThe cluster density5632
Main.leanTheorem 1.1, cluster clause15543

SurfaceBlowup/Corollaries/

filetitlelinespublic declscited by the paper map
AdicCompact.leanThe adic topology of a complete DVR with finite residue field17382
Nonneg.leanNonnegativity of the universal expressions, and real-valued forms of the main theorems19973
RationalForm.leanThe three laws as rational functions, and reciprocity as an automorphism of `ℚ(q)`230136

SurfaceBlowup/Etale/

filetitlelinespublic declscited by the paper map
Algebra.leanThe étale monic density in algebra language5821
Defs.leanThe étale convention for the type densities6031
Main.leanThe étale convention agrees with the published densities13994

SurfaceBlowup/Formula/

filetitlelinespublic declscited by the paper map
FiniteFieldCounts.leanCounting over finite fields7831
LawAlgebra.leanExpression and law algebra, children of tangent patterns914462
PatternCounts.leanCounting divisors with a given tangent pattern66173
RationalEval.leanEvaluating the universal rational functions6610
StateCombinatorics.leanCombinatorics of states, ranks and safety of the laws611147
TypeTransport.leanTransport of factorization types and cell measures28181

SurfaceBlowup/Measure/

filetitlelinespublic declscited by the paper map
AdicCylinders.leanAdic congruences, adic cylinders and division charts989475
AdicTransport.leanAdic congruences, adic perturbations and transport of cylinder measures323100
Atlas.leanIdeal-chart atlases and atlas independence of the state measure31574
Haar.leanHaar measures on unramified extensions and strict-transform normalizations37562
HenselProducts.leanHensel factorization, finite products and coefficient measures1267250
MemberBoxes.leanMeasure of member boxes60122
MemberCharts.leanCharts of concrete members and the inseparable locus602143
Normalizer.leanGenerator normalization and residue-ideal counts38195
PrimitiveLocus.leanThe primitive locus, state measures, and integral closures382142
StateVolumes.leanSingle-state residue ideal counts and Haar-measure transport20942

SurfaceBlowup/Reciprocity/

filetitlelinespublic declscited by the paper map
Defs.leanReciprocity: definitions and basic lemmas10499523
Main.leanThe reciprocity law (Theorem 1.2)30258
Patterns.leanPattern sums, crossing factorization and unitarity10472311
Plethysm.leanPlethystic calculus for the reciprocity law1034487
Quantum.leanReciprocity: the quantum torus, dilations and reciprocal substitution9197211

SurfaceBlowup/Recursion/

filetitlelinespublic declscited by the paper map
ChildMembers.leanChild members and terminal states of the blowup recursion1215144
Events.leanReturn and exit events of the blowup recursion923147
Members.leanMembers of the recursion universe1426712
OrderDefect.leanOrder defects and child data for the blowup recursion1150142
RootCellLaw.leanThe root cell law136674
Termination.leanTermination of the recursion1317223

SurfaceBlowup/Surfaces/

filetitlelinespublic declscited by the paper map
ChartCompletions.leanCompletions of the blow-up charts of the concrete surface89470
Completeness.leanCompleteness of the concrete surface413140
ConcreteAtlas.leanIdeal atlases and curve data on the concrete surface72550
ConcretePoints.leanClosed points on the blow-up of the concrete surface43970
ConcreteStrictTransforms.leanVolumes and strict transforms on the concrete surface48862
Lengths.leanConcrete surfaces, chart substitutions and lengths1284807
PowerSeries.leanPower series, residue bases and the local structure of concrete surfaces1011251
Regularity.leanRegularity of the concrete surface691151
TruncatedSeries.leanTruncations of `k⟦T, X⟧` and contacts on the special fibre556160

SurfaceBlowup/Unramified/

filetitlelinespublic declscited by the paper map
DescentTypes.leanTypes under unramified base change36673
Extension.leanBinary forms, factor cells and unramified extensions1160600
FactorCells.leanFactor cells: residue cells of factor products and root-field isomorphisms547110
FrobeniusDescent.leanFrobenius descent for unramified extensions1189154
HomogeneousCells.leanMeasure-preserving maps between homogeneous cells78252
LocalDescent.leanLocal lengths and finite quotients of completions19052
PolynomialTypes.leanPolynomial types, form products and residue cells1251191

Tests/

filetitlelinespublic declscited by the paper map
Cluster.leanRegression guard for the cluster density5933
NonVacuity.leanNon-vacuity of the hypotheses of `main_dvr`128121
PadicInt.leanNon-vacuity in mixed characteristic: the `p`-adic integers12183
Ramified.leanNon-vacuity over a ramified base: `ℚ_p(√p)`10591
Regression.leanRegression guards for the universal density expressions20332316