THE SPEND-POINT TABLE

where choice is spent, and where it is only inherited

Dominance says which site a theorem's classical dependence is responsible to. It does not say where the axiom is actually spent, and the two come apart hard.

15 of these 20 sites contain no direct use of a choice primitive anywhere in their subtree. Between them they dominate 25,992 theorems while spending nothing — every primitive use is above them in the graph. Rebuilding such a site does not remove a use of choice; it removes a route to one.

Measured with gonzalgo · Lean 4.32.1 with Mathlib v4.32.1 · dominator subtrees over 766,564 constants, primitives counted where cited directly

#sitetheorems dominatedsubtreespendersprimitives cited
1Classical.propDecidable91,858112,1586,775Classical.byContradiction x5338, Classical.propDecidable x1540
2Classical.byContradiction23,55030,1691,854Classical.byContradiction x1854
3CategoryTheory.Functor.category5,2717,5580(none — inherits)
4Std.DHashMap.Internal.Raw.WF.out4,8995,0000(none — inherits)
5Classical.indefiniteDescription4,7115,45244Classical.em x30, Classical.indefiniteDescription x14
6Set.instCompleteAtomicBooleanAlgebra3,4304,0470(none — inherits)
7lt_or_eq_of_le2,0182,1511Classical.propDecidable x1
8Set.image_univ1,4841,8380(none — inherits)
9GroupWithZero.toDivisionMonoid1,2901,5580(none — inherits)
10eq_or_lt_of_le1,2211,3140(none — inherits)
11LE.le.eq_or_lt1,1791,2710(none — inherits)
12CategoryTheory.Functor.comp1,1121,5150(none — inherits)
13String.toList1,1114,5570(none — inherits)
14AddAction.orbitRel1,0441,3110(none — inherits)
15QuotientAddGroup.leftRel1,0091,2710(none — inherits)
16map_sub8569990(none — inherits)
17Classical.not_not7927991Classical.propDecidable x1
18GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebra7228280(none — inherits)
19String.compare7023,4270(none — inherits)
20Filter.comap6627840(none — inherits)

subtree is the constants under the site in the dominator tree. spenders is how many of them cite a choice primitive (Classical.propDecidable, byContradiction, indefiniteDescription, em) directly rather than through another constant. Zero means the site inherits the axiom entirely.

Get the data

spend-points.json · spend-points.csv · CC-BY-4.0 · version 2026-08-12

One of the gonzalgo indexes — standing measurements of what formal libraries rest on, remeasured as the libraries move.

Reproduce it

lake env lean -D maxErrors=4000 lean/Dump.lean
python analysis/spendpoints.py

Code and derived data: 10.5281/zenodo.21883963.

The two that carry almost everything

Classical.propDecidable has 6,775 spenders in its subtree and Classical.byContradiction 1,854. Between them they account for nearly all direct spending in the library, and propDecidable's own subtree spends byContradiction 5,338 times against its own 1,540 — the decidability fallback reaches the axiom mostly through excluded middle rather than directly.

Everything below them in this table is structural. A functor category instance dominates 5,271 theorems and spends nothing. Hash-map well-formedness dominates 4,899 and spends nothing. These are places classical dependence passes through, not places it originates.

Why the distinction changes what you would do

A repair aimed at a spend point removes a use of the axiom. A repair aimed at a pure dominator reroutes a large number of theorems without removing anything, and only helps if the route it removes was the only one. Both are visible as large numbers in a dominance ranking and they are not the same kind of target.

String.toList is the sharpest case here: 1,111 theorems dominated, a subtree of 4,557 constants, and no spender in any of them.