The formalization: what is proved, and how to trust it

The paper's two main theorems are machine-checked in Lean 4 over Mathlib: Theorem 1.1 for every complete discrete valuation ring with finite residue field, and Theorem 1.2 as identities of rational functions. This page says exactly what the Lean statements are, what a reader has to audit to trust them, which certificates exist, and how far the rest of the paper is formalized.

1. The four main theorems

All four depend only on the axioms propext, Classical.choice, Quot.sound (#print axioms, re-run by tools/release_check.sh; log below). The codebase contains no sorry, admit, axiom or native_decide.

main_dvr — SurfaceBlowup/Main.lean:31–51

theorem main_dvr (O : Type) [CommRing O] [IsDomain O]
    [IsDiscreteValuationRing O] [IsAdicComplete (IsLocalRing.maximalIdeal O) O]
    [Finite (IsLocalRing.ResidueField O)] [TopologicalSpace O] [IsTopologicalRing O]
    [CompactSpace O] [T2Space O] [SecondCountableTopology O] [MeasurableSpace O] [BorelSpace O]
    (htop : IsAdic (IsLocalRing.maximalIdeal O))
    (n : ℕ) (σ : FactorType) :
    SurfaceBlowup.monicDensity O n σ =
        densityValue (monicExpr n σ) (Nat.card (IsLocalRing.ResidueField O)) ∧
    SurfaceBlowup.projectiveDensity O n σ =
        densityValue (projectiveExpr n σ) (Nat.card (IsLocalRing.ResidueField O))

main_dvr is Theorem 1.1: for every complete DVR O with finite residue field (any characteristic, any ramification), with its adic topology, Borel σ-algebra and normalized Haar measure, the monic and projective type probabilities are the values at q = |k| of the universal expressions monicExpr n σ, projectiveExpr n σ (defined by the finite recursion of Sections 6–7). The hypotheses hn, hσ, hdegree are not used by the proof; they are kept so that the statement is, constant for constant, the certified one. Tests/NonVacuity.lean instantiates it at 𝔽_q⟦X⟧.

recip_main — SurfaceBlowup/Reciprocity/Main.lean:278–299

theorem recip_main (n : ℕ) (hn : 0 < n) (σ : FactorType) :
    (monicExpr n σ).rational =
      ((lawCoeff (rootLaw n) σ).subst (.inv .var)).rational ∧
    (projectiveExpr n σ).rational =
      ((projectiveExpr n σ).subst (.inv .var)).rational

recip_main is Theorem 1.2, coefficientwise: A_{n,σ}(q) = B_{n,σ}(1/q) and R_{n,σ}(1/q) = R_{n,σ}(q) in ℚ(q), where B_{n,σ} is the coefficient of the root law rootLaw n (the law of S(1;n), which root_cell_law identifies with the Xn-cluster model).

The two field forms (corollaries of main_dvr)

main_field_form — SurfaceBlowup/Main.lean:53–91

theorem main_field_form (n : ℕ) (σ : FactorType) :
    ∃ A R : RatFunc ℚ, A = (monicExpr n σ).rational ∧ R = (projectiveExpr n σ).rational ∧
      (∀ q : ℕ, PrimePower q → RegularAt A q ∧ RegularAt R q) ∧
      (∀ q : ℕ, PrimePower q → RatFunc.eval (RingHom.id ℚ) q A = (monicExpr n σ).eval q ∧
        RatFunc.eval (RingHom.id ℚ) q R = (projectiveExpr n σ).eval q) ∧
      ∀ (p : ℕ) [Fact p.Prime] (K : Type) [Field K] [Algebra ℚ_[p] K] [Algebra ℤ_[p] K]
        [IsScalarTower ℤ_[p] ℚ_[p] K] [FiniteDimensional ℚ_[p] K]
        [TopologicalSpace (padicIntegers p K)] [IsTopologicalRing (padicIntegers p K)]
        [CompactSpace (padicIntegers p K)] [T2Space (padicIntegers p K)]
        [SecondCountableTopology (padicIntegers p K)] [MeasurableSpace (padicIntegers p K)]
        [BorelSpace (padicIntegers p K)],
        PadicUnramified p K → IsAdic (Ideal.span {(p : padicIntegers p K)}) →
          monicDensity (padicIntegers p K) n σ = densityValue (monicExpr n σ)
            (Nat.card (padicIntegers p K ⧸ Ideal.span {(p : padicIntegers p K)})) ∧
          projectiveDensity (padicIntegers p K) n σ = densityValue (projectiveExpr n σ)
            (Nat.card (padicIntegers p K ⧸ Ideal.span {(p : padicIntegers p K)})) ∧
          monicDensity (padicIntegers p K) n σ = ENNReal.ofReal ((RatFunc.eval (RingHom.id ℚ)
            ((Nat.card (padicIntegers p K ⧸ Ideal.span {(p : padicIntegers p K)}) : ℕ) : ℚ) A :
              ℚ) : ℝ) ∧
          projectiveDensity (padicIntegers p K) n σ = ENNReal.ofReal ((RatFunc.eval (RingHom.id ℚ)
            ((Nat.card (padicIntegers p K ⧸ Ideal.span {(p : padicIntegers p K)}) : ℕ) : ℚ) R :
              ℚ) : ℝ)

main_field_form_ramified — SurfaceBlowup/Main.lean:93–118

theorem main_field_form_ramified (n : ℕ) (σ : FactorType) (p : ℕ) [Fact p.Prime] (K : Type)
    [Field K] [Algebra ℚ_[p] K] [Algebra ℤ_[p] K] [IsScalarTower ℤ_[p] ℚ_[p] K]
    [FiniteDimensional ℚ_[p] K]
    [TopologicalSpace (padicIntegers p K)] [IsTopologicalRing (padicIntegers p K)]
    [CompactSpace (padicIntegers p K)] [T2Space (padicIntegers p K)]
    [SecondCountableTopology (padicIntegers p K)] [MeasurableSpace (padicIntegers p K)]
    [BorelSpace (padicIntegers p K)]
    (had : letI := padicIntegers_isDVR p K; IsAdic (IsLocalRing.maximalIdeal (padicIntegers p K))) :
    letI

2. The trust boundary

Lean checks proofs, not statements. To trust the theorems above a reader must audit only:

  1. SurfaceBlowup/Basic.lean (~500 lines): factorization types, the rational expressions Expr, laws, recursion states and tangent patterns, the weights, the recursion stateLaw, the universal expressions monicExpr/projectiveExpr, and the densities monicDensity/projectiveDensity. These are, constant for constant, the owner-signed definitions published as Prove2Me nodes N001–N010 (namespace SurfaceBlowupV2), checked at kernel level by Checks/run_checks.sh.
  2. The statements of the four theorems above (in Main.lean and Reciprocity/Main.lean).

Every other file contains only proofs and auxiliary definitions that do not occur in these statements.

Human sign-off. The definitions (N001–N010) and the statement of main_field_form (Theorem 1.1 for unramified K/ℚp, Prove2Me node N660) were signed off by the owner before the formalization campaign; the statement of recip_main (N1319) was signed off on 2026-10-09. The statement of main_dvr uses only the signed definitions and is kernel-identical to the certified general-DVR statement (MONOLITH_REPORT_general_dvr). [OWNER: confirm whether the main_dvr statement text itself has been signed off.]

How the proof differs from the paper. The formal proof follows the paper's architecture (recursion on blow-up states, Gaussian measure identity, Hensel assembly, contact algebra for reciprocity) but works on the concrete surfaces O⟦T,X⟧/(π − u·T^a·X^b) rather than on all regular surfaces, replaces analytic arguments (analytic normalization, inverse-function theorem, change of variables) by finite-digit congruence and cylinder-set arguments, replaces the formal-scheme cohomology of Section 4 by explicit two-chart Čech complexes, and handles inseparability through type predicates with finite integral closures plus a Haar-null bridge (orig_monicDensity_eq). Nothing is cited from the literature: everything bottoms out in Mathlib.

3. Certificates

Copies: release check (final) · axioms of the main theorems · monolith certificate: main_field_form · monolith certificate: main_dvr (general DVR) · monolith certificate: recip_main.

'SurfaceBlowup.main_dvr' depends on axioms: [propext, Classical.choice, Quot.sound]
'SurfaceBlowup.main_field_form' depends on axioms: [propext, Classical.choice, Quot.sound]
'SurfaceBlowup.main_field_form_ramified' depends on axioms: [propext, Classical.choice, Quot.sound]
'SurfaceBlowup.recip_main' depends on axioms: [propext, Classical.choice, Quot.sound]

4. Prove2Me

The SurfaceBlowupV2 tree (1201 nodes, incl. main_field_form N660 and recip_main N1319) is published PRIVATE on Prove2Me; links resolve only for the owner's account until it is made public. main_dvr (the general-DVR theorem) and the unified SurfaceBlowup codebase are not on Prove2Me. Visibility: PRIVATE. Link pattern used on this site: https://prove2.me/theorems/{theorem_id} — [UNVERIFIED: the API documents only https://prove2.me/api/v1/theorems/{theorem_id}; the public page pattern is a guess (OWNER: confirm)]. The unified codebase was obtained from those trees by merging along the usage DAG and three golfing cycles; declarations are matched to Prove2Me nodes by name and a curated alias table.

5. How much of the paper is formalized

The map below lists every numbered statement of the paper (32 theorems, lemmas, propositions, corollaries, examples and remarks), the key displays ((1.1)–(1.4), (G), (H), (S), (T), the recursion and assembly displays, the Section 10–11 formulas), and the key unnumbered definitions — 82 entries in all. Relations: exact / definition — the Lean statement or definition is the paper's; specialization — proved in a special setting (concrete surfaces; a = b = 1); covered by lemmas — no single Lean statement, the listed declarations jointly establish the content, often restructured; instances checked — particular values only; not formalized.

entriesexact / definitionpartialnot formalized
all entries82323812
numbered statements only326224

Not formalized: the totally ramified recursion of Section 10 (only the values A(3,1)(3) = 10/121, A(4,1)(2) = 107/1533, R(4,1)(2) = 856/15841 are checked, and the projective half of Corollary 10.3 is an instance of recip_main); the literature comparisons of Section 11 (root moments, the BGMR splitting recursion, Shmueli's unramified formulas); the crossing reciprocity formula of Theorem 9.3; the scaling identities in (H); and the worked Example 5.2. The map, as JSON: data/paper_lean_map.json (with the reverse index Lean → paper); browsable reverse index: declaration index.

6. The full map

Click a column header to sort.

paperkind§relationconfidenceLean declarationsProve2Me
(1.3) the reciprocal pair of quadratic probabilitiesdisplay1covered by lemmashighTests.monicDensity_two_ramified Tests.monicExpr_two_eval Tests.single_two_law root_cell_lawN094, N1109
Type of degree n factorization typesdefinition—definitionhighFactorType typeDegree ValidTypeN001
Monic model monic type probabilitydefinition1definitionhighmonicDensity coefficientMeasure monicPolynomial HasPolynomialType factorInvariantN008
Projective model binary-form type probabilitydefinition—definitionhighprojectiveDensity primitive HasBinaryType affinePolynomialN008
Type variables Z_{e,f} laws as polynomials in type variablesdefinition—definitionhighLaw lawMul lawCoeff Coef lawCoef ExprN004, N1145, N003
Theorem 1.1 universal type lawstheorem1covered by lemmashighmain_dvr main_field_form main_field_form_ramified global_formula_regular root_cell_law monicExpr projectiveExpr Tests.main_dvr_powerSeriesN660, N060, N1109, N007, N114
(1.5) complete laws A_n, R_ndisplay1definitionhighglobalLaw monicExpr projectiveExpr rootLawN007
Cluster model and cluster law B_n the X^n modeldefinition1definitionhighrootLaw RootCellLaw root_cell_lawN007, N1109
Theorem 1.2 reciprocitytheorem1exacthighrecip_main lawCoef_globalLaw_false_eq_recipCoef recipCoef_lawCoef_globalLaw_trueN1319, N1317, N1318
Remark 1.3 formalizationremark1covered by lemmashighmain_dvr recip_main HasPolynomialTypeF orig_monicDensity_eq orig_projectiveDensity_eqN1319
(1.7) the Gaussian measure identity (overview)display1specializationmediummember_cell_box_measureN1066
Standard facts cited backgrounddefinition—covered by lemmasmediumintegral_closure_finite_free integral_closure_is_dvr unramified_is_dvr frobenius_fixed_ringN176, N182, N589, N599
(2.1) the two kinds of local statedisplay2definitionhighState State.degree State.Valid SurfaceData surfaceStateSet ConcreteSurfaceN002
Lemma 2.1 degree and flatnesslemma2specializationhighconcrete_surface_special_fiber_equiv single_special_fiber_length crossing_special_fiber_length special_fiber_single_contact_regular special_fiber_crossing_contact_regular concrete_surface_curve_free_of_length concrete_member_curve_order_freeN471, N063, N064, N506, N507, N505, N1081
Reduced-algebra type convention types of reduced algebrasdefinition—definitionmediumHasAlgebraType fieldInvariant HasPolynomialTypeF
Lemma 2.2 contact onelemma2covered by lemmasmediumterminal_law terminal_curve_order_dvr terminal_field_invariant concrete_member_terminal_type Tests.crossing_left_one_law Tests.crossing_right_one_lawN054, N1071, N1073, N1074
Allowed residue ideals, cells, occupied points geometric termsdefinition—definitionmediumsingleResidueIdeals crossingResidueIdeals HasTangentDivisor TangentPattern AllowedN005
Contact-size order induction order on statesdefinition—covered by lemmashighState.rank nonself_child_rank_ltN002, N053
Lemma 3.1 bounded division and normalizationlemma3covered by lemmasmediumdivision_linear_equivalence unique_scaled_generator_normalization scaled_normalization_identity normalizer_preserves_adic_congruence coordinate_transition_congruenceN163, N167, N166, N210
Proposition 3.2 intrinsic measureproposition3covered by lemmasmediumcoordinate_ideal_cell_bijection ideal_chart_transition_haar ideal_chart_pushforward_independent state_measure_atlas_independent idealChartSigma IdealChartN208, N221, N222, N413
Proposition 3.3 state volumesproposition3specializationhighsingle_state_volume crossing_state_volume single_residue_ideal_count crossing_residue_ideal_count concrete_single_state_volume concrete_crossing_state_volume stateVolumeN414, N415, N070, N071, N422, N425, N006
(4.1) layers of the exceptional thickeningsdisplay4covered by lemmasmediumchart_layer_polynomial_coordinates overlap_layer_laurent_coordinatesN260, N297
Lemma 4.1 passage to the formal limitlemma4covered by lemmaslowactual_cech_reductions_surjective actual_twisted_coker_reduction_bijective surface_threads_range curve_limit_level_map_surjectiveN317, N321, N347, N807
Lemma 4.2 formal functions and line bundleslemma4covered by lemmasmediumsurface_threads_injective surface_threads_range glued_function_exists_unique actual_finite_cech_coefficient_length actual_finite_cech_coefficient_triangularN346, N347, N351, N328, N329
Lemma 4.3 gluing with no compatibility conditionlemma4covered by lemmasmediumchild_ideals_curve_datum glued_generators_exist two_chart_global_function_exists concrete_two_chart_glued_generators_exist finite_support_quotient_equiv matches_divisor_degreeN972, N361, N833, N912, N287, N885
(4.6) tangent divisor and child contactsdisplay4covered by lemmasmediumHasTangentDivisor initial_form_has_tangent_divisor homogeneous_divisor_boundary_multiplicities concrete_strict_transform_multiplicity concrete_infinity_boundary_contact concrete_zero_boundary_contactN990, N989, N839, N965, N966
(4.7)–(4.8) children of S and Tdisplay4definitionhighchildren otherChildren Allowed strict_transform_mapsTo_child_idealsN005, N967
Proposition 4.4 fixed-divisor bijection and indexproposition4specializationhighstrict_transform_bijOn_child_ideals strict_transform_injOn_fixed_tangent_cell concrete_curve_order_index child_order_index_and_kernel cell_member_index_mapN974, N970, N914, N904, N1101
Theorem 5.1 one-step measure identitytheorem5specializationhighmember_cell_box_measure member_cell_box_measurable strict_quotient_cokernel_length member_center_linear_part strict_chart_one_ball_measure unramified_coefficient_measure_piN1066, N1065, N385, N1062, N396, N927
Example 5.2 a quadratic cluster chartexample5not formalizedhigh
Proposition 6.1 transition probabilitiesproposition6covered by lemmashighdivisorProbability child_volume_ratio member_cell_box_measure concrete_member_cells_cover tangent_divisor_unique rational_divisorProbability_singleN006, N074, N1066, N995, N997
(6.2) closed points of degree δdisplay6exacthighpointCount irreducible_count_moebius card_pow_eq_sum_irreducible_degrees finite_field_irreducible_countN006, N683, N682, N081
(6.3) number of divisors with a patterndisplay6exacthighdivisorCount tangentCount falling availablePoints pattern_divisor_count patternDivisors_equiv_colorings nonboundary_direction_countN006, N917, N916, N915
(6.4) Adams operationdisplay6definitionhighlawDescend scaleType adamsCoef field_invariant_unramified_tower algebra_type_unramified_descentN004, N001, N1145, N541, N543
(6.5) transitions preserve degreedisplay6exacthighchildren_degree_identityN048
(6.6) exit contribution Γ_{a;c}display6definitionhighexitLaw self_patterns_of_single_state exists_unique_selfPattern_single returnWeight nonself_child_rank_ltN552, N006, N053
(6.7) the crossing formuladisplay6definitionhighstateLawFuel state_law_unfoldN007, N551
Theorem 6.2 universal local lawstheorem6specializationmediumstateLaw universal_law_statement SurfaceUniverse.LawStatement concrete_universe_exists state_law_unfold local_law_safe global_formula_regularN007, N572, N1108, N551, N056, N060
Remark 6.3 inseparable terminal fieldsremark6covered by lemmasmediummonic_inseparable_null orig_monicDensity_eq orig_projectiveDensity_eq HasPolynomialTypeF
Proof of Theorem 6.2 induction, geometric series, terminationproof6covered by lemmasmediumrecursion_crossing_law recursion_single_law exit_event_succ_mass return_event_mass never_return_null geometric_exit_sum nonterminating_subset_return_or_bad bad_exit_nullN566, N565, N567, N028, N561, N568
Example 6.4 solving the quadratic clusterexample6exactmediumTests.single_two_law
Discriminant locus is null Haar-null exceptional setsdefinition—covered by lemmasmediummvPolynomial_zero_null monic_inseparable_null coordinate_hyperplane_nullN704
(7.1) B_r is the coefficient lawdisplay7exacthighroot_cell_law RootCellLaw repeated_root_one_chart_atlas series_quotient_equiv_adjoinRootN1109, N1080, N576
Lemma 7.1 Hensel assembly with measurelemma7covered by lemmashighmonic_cells_partition projective_cells_partition residue_cell_mass projective_cell_conditional_density factor_cells_measure_preserving form_cells_measure_preserving block_descent_bijection descended_polynomial_type monic_cell_law projectiveNormalizerN739, N744, N609, N632, N614, N946, N622, N936, N733, N006
(7.3) the assembly formulasdisplay7exacthighglobalLaw residuePatterns monicDensityF_eq_densityValue projectiveDensityF_eq_densityValueN007
(H) = (7.4) homogeneity and exchangedisplay7covered by lemmasmediumcrossingQ_symmN1276
(7.5) cluster and crossing seriesdisplay7definitionhighclusterSer crossingQ SerN1146, N1147
(7.6) plethystic exponential and logarithmdisplay7definitionhighpExp pLog moebiusSum_plethSum expSer_logSer logSer_expSer recipSer_pPow dilate_pPowN1146, N1180
Pow_v and the first-difference rule plethystic powersdefinition—exacthighpPow pPow_pPow coeff_pPow_sub_of_scongrN1146, N1190, N1193
lem-7.2lemma7covered by lemmasmediumeulerSer coeff_eulerSer patternSum prod_formalPow_adamsSer_clusterSer_scongrN1146, N1220
(G) = (7.9) global assembly as a plethystic exponentialdisplay7covered by lemmashighlawCoef_globalLaw_false lawCoef_globalLaw_true coeff_eulerSerN1220
(7.10) L_a, 𝓖_a, 𝓟_a, Φ, Φ′display7definitionhigheulerSer gaussPhiN1146, N1147
(S) = (7.11) single-boundary identitydisplay7covered by lemmasmediumcoeff_clusterSer_eq_coeff_qact coeff_qact_crossingQ_gaussPhi_eulerSer lawCoef_single_self_termN1285
(T) = (7.12) crossing identitydisplay7covered by lemmasmediumcrossingQ_eq_qmul_qplus_qdiag_qminusN1281
Example 7.3 the same quadratic in all three modelsexample7exacthighTests.monicExpr_two_eval Tests.projectiveExpr_two_eval Tests.single_two_law Tests.monicExpr_two_ramified_eval_two Tests.projectiveDensity_two_ramifiedN094, N095, N096
(8.1) the contact algebradisplay8definitionhighQSer qmul qoneN1147
(8.2) U_{a,b} and the daggerdisplay8definitionhighcrossingQ qdaggerN1147
Lemma 8.1 the bookkeeping algebralemma8covered by lemmashighqmul_assoc qdagger_qmul qplus qminus qplus_qmul qminus_qmul qdagger_qplus qdagger_qminus qdiag_mulN1241, N1245, N1147, N1246, N1247, N1249
Lemma 8.2 ordered crossing factorizationlemma8exacthighcrossingQ_eq_qmul_qplus_qdiag_qminusN1281
Lemma 8.3 crossing reciprocity from smaller clusterslemma8exacthighqcongr_crossingQ_mul_qdagger qcongr_qdiag_mul_qdaggerN1308
(8.9) the representation ρ and the operator equationdisplay8exacthighqact coeff_clusterSer_eq_coeff_qactN1147, N1285
(8.10) leading coefficient of 𝓗display8covered by lemmasmediumcoeff_qact_gaussPhi_of_lt
Lemma 9.1 Gaussian conjugationlemma9exacthighgaussPhi_qactRecip_gaussPhiInv qactRecipN1255, N1147
(9.4) the four equationsdisplay9covered by lemmasmediumcoeff_clusterSer_eq_coeff_qact clusterSer_eq_pPow gaussPhi_dilate_recipSer_clusterSer qact_gaussPhi_dilate_recipSer_scongrN1285
Proof of monic/cluster reciprocity induction closing on 1 − λ_nproof—exacthighcluster_reciprocity cluster_reciprocity_one cluster_reciprocity_step X_inv_sub_X_zpow_neg_tri_ne_zeroN1316, N1315
Lemma 9.2 three equivalent formslemma9covered by lemmasmediumlawCoef_globalLaw_false_eq_recipCoef recipCoef_lawCoef_globalLaw_true recipRat_projectiveNormalizerN1317, N1318
Theorem 9.3 reciprocity for every crossingtheorem9not formalizedhighqcongr_crossingQ_mul_qdagger cluster_reciprocityN1308, N1316
Example 9.4 the first random crossingexample9specializationmediumTests.crossing_two_two_law Tests.crossing_two_two_law_at_twoN1287
(10.1)–(10.2) one-field coefficientsdisplay10not formalizedhigh
Lemma 10.1 Euclidean weightlemma10not formalizedhigh
Theorem 10.2 the full totally ramified recursiontheorem10not formalizedhigh
Corollary 10.3 totally ramified reciprocitycorollary10specializationmediumrecip_mainN1319
(10.7) divisor-chain formuladisplay10not formalizedhigh
(10.8) prime degree closed formdisplay10instances checkedhighTests.monicExpr_three_totally_ramified_eval_three Tests.monicDensity_three_totally_ramified_of_card_eq_three Tests.monicExpr_two_evalN1130, N094
Example 10.4 the quartic uses the same crossingexample10instances checkedhighTests.monicExpr_four_totally_ramified_eval_two Tests.projectiveExpr_four_totally_ramified_eval_two Tests.monicDensity_four_totally_ramified_of_card_eq_two Tests.monicDensity_powerSeries_zmod_two_four_totally_ramifiedN1126, N1127
(11.1)–(11.3) root-count equationsdisplay11not formalizedhigh
(11.4)–(11.6) BCFG equation (7)display11not formalizedhigh
(11.7) first momentsdisplay11not formalizedhigh
(11.8) BGMR splitting recursiondisplay11not formalizedhighTests.monicExpr_two_eval Tests.projectiveExpr_two_evalN094, N095
(11.9)–(11.10) unramified-field recursiondisplay11not formalizedhighTests.monicExpr_two_evalN094
(11.11)–(11.12) Shmueli's formulasdisplay11not formalizedhigh
Appendix A passing to the formal exceptional lineproof—covered by lemmaslowactual_cech_reductions_surjective actual_twisted_coker_reduction_bijective surface_threads_rangeN317, N321, N347