The Dominator Table _◻✕
← Back Forward → ↑ Up Home Find Status Log

The Dominator Table

which sites Mathlib's use of choice actually rests on

Asking which constant a theorem's classical dependence is responsible to is not the same as asking which constants its proof touches, and the answers are far apart. 116,766 theorems reach the order lemma lt_or_eq_of_le; 2,018 would stop being classical if it were rebuilt. Reachability overstates responsibility by 58x in that one case.

The column below is the second number. A site's count is the theorems whose every route to Classical.choice passes through it, so repairing it repairs exactly them and nothing else.

Measured with gonzalgo · Lean 4.32.1 with Mathlib v4.32.1 · 790,171 declarations, 30,015,601 dependency edges, one dominator tree over all 766,564 constants

#sitekindareatheorems dominatedeligible
1Classical.propDecidabledefinitionclassical logic91,858yes
2Classical.byContradictiontheoremclassical logic23,550yes
3CategoryTheory.Functor.categorydefinitioncategory theory5,271yes
4Std.DHashMap.Internal.Raw.WF.outtheoremStd: hash maps4,899yes
5Classical.indefiniteDescriptiondefinitionclassical logic4,711yes
6Set.instCompleteAtomicBooleanAlgebradefinitionsets3,430yes
7lt_or_eq_of_letheoremorder / root namespace2,018yes
8Set.image_univtheoremsets1,484yes
9GroupWithZero.toDivisionMonoiddefinitionGroupWithZero1,290yes
10eq_or_lt_of_letheoremorder / root namespace1,221yes
11LE.le.eq_or_lttheoremLE1,179yes
12CategoryTheory.Functor.compdefinitioncategory theory1,112yes
13String.toListdefinitionstrings1,111yes
14AddAction.orbitReldefinitionAddAction1,044yes
15QuotientAddGroup.leftReldefinitionQuotientAddGroup1,009yes
16map_subtheoremorder / root namespace856yes
17Classical.not_nottheoremclassical logic792yes
18GeneralizedBooleanAlgebra.toGeneralizedCoheytingAlgebradefinitionGeneralizedBooleanAlgebra722yes
19String.comparedefinitionstrings702yes
20Filter.comapdefinitionfilters662yes
21CategoryTheory.Functor.fromPUnitdefinitioncategory theory616yes
22LE.le.lt_or_eqtheoremLE583yes
23List.nodup_rangetheoremlists534yes
24Nat.testBit_two_pow_sub_succtheoremNat520yes
25subset_interior_iff_isOpentheoremorder / root namespace511yes
26Classical.not_foralltheoremclassical logic497yes
27Classical.emtheoremclassical logic476yes
28CategoryTheory.instCompleteLatticePresievedefinitioncategory theory450yes
29Nat.mul_lt_mul_lefttheoremNat440yes
30MulAction.orbitReldefinitionMulAction423yes
31Array.foldrM_congrtheoremarrays410yes
32monotone_nat_of_le_succtheoremorder / root namespace405yes
33WellFounded.extrinsicFixdefinitionWellFounded398yes
34IsUnit.unitdefinitionIsUnit397yes
35BooleanAlgebra.toBiheytingAlgebradefinitionBooleanAlgebra381yes
36Std.DHashMap.Internal.Raw.foldRev_eqtheoremStd: hash maps374yes
37WellFounded.extrinsicFix₂definitionWellFounded366yes
38Multiset.add_right_injtheoremmultisets363yes
39List.eq_nil_iff_forall_not_memtheoremlists363yes
40LinearMap.rangedefinitionLinearMap358yes
41Set.mul_mem_centertheoremsets351yes
42Std.IterM.toArraydefinitionStd: other348yes
43AddSubmonoid.instCompleteLattice._proof_1theoremAddSubmonoid337yes
44CategoryTheory.shiftFunctordefinitioncategory theory335yes
45Lean.Name.quickCmpdefinitionLean333yes
46Submodule.completeLatticedefinitionSubmodule333yes
47Nat.mono_casttheoremNat328yes
48AddSubmonoid.instCompleteLatticedefinitionAddSubmonoid326yes
49CategoryTheory.Sieve.instCompleteLatticedefinitioncategory theory322yes
50Classical.ofNonemptydefinitionclassical logic321yes
51emtheoremorder / root namespace316yes
52QuotientGroup.leftReldefinitionQuotientGroup308yes
53GroupWithZero.noZeroDivisorstheoremGroupWithZero288yes
54CategoryTheory.MorphismProperty.instCompleteBooleanAlgebradefinitioncategory theory284yes
55Real.instLTdefinitionReal283yes
56LinearEquiv.ofBijectivedefinitionLinearEquiv281yes
57IsLocallyConstant.tfaetheoremIsLocallyConstant279yes
58zpow_ne_zerotheoremorder / root namespace279yes
59Set.biInter_rangetheoremsets270yes
60Std.DTreeMap.Internal.Impl.WF.orderedtheoremStd: other266yes
61FreeAlgebra.lift._proof_4theoremFreeAlgebra263yes
62DFinsupp.zipWithdefinitionDFinsupp262yes
63eq_or_netheoremorder / root namespace260yes
64Equiv.ofBijectivedefinitionEquiv258yes
65Equiv.Perm.permGroupdefinitionEquiv250yes
66List.nodup_finRangetheoremlists244yes
67NNRealdefinitionNNReal243yes
68Set.forall_mem_image2theoremsets239yes
69Subsemigroup.centerdefinitionSubsemigroup238yes
70List.Perm.uniontheoremlists237yes
71List.min?_eq_some_ifftheoremlists237yes
72Int.natCast_eq_zerotheoremInt236yes
73Classical.choosedefinitionclassical logic232yes
74SeminormedAddCommGroup.toIsTopologicalAddGrouptheoremSeminormedAddCommGroup231yes
75isOpen_iff_nhdstheoremorder / root namespace230yes
76Classical.or_iff_not_imp_lefttheoremclassical logic230yes
77List.min?_eq_some_iff_subtypetheoremlists228yes
78Nat.testBit_two_pow_sub_onetheoremNat224yes
79isOpen_iff_mem_nhdstheoremorder / root namespace223yes
80and_forall_netheoremorder / root namespace215yes
81TensorAlgebra.liftdefinitionTensorAlgebra211yes
82Array.getElem_extracttheoremarrays202yes
83IsStrictOrderedRing.toIsOrderedRingtheoremIsStrictOrderedRing202yes
84CategoryTheory.Iso.refldefinitioncategory theory200yes
85InfHomClass.toOrderHomClasstheoremInfHomClass198yes
86CommGroupWithZero.toDivisionCommMonoiddefinitionCommGroupWithZero198yes
87MonoidHom.mrange._proof_1theoremMonoidHom197yes
88HomologicalComplex.Hom.commtheoremHomologicalComplex196yes
89Multiset.eq_zero_of_forall_notMemtheoremmultisets196yes
90Equiv.symm_apply_eqtheoremEquiv196yes
91Equiv.apply_eq_iff_eq_symm_applytheoremEquiv194yes
92IsLeftCancelAdd.addLeftReflectLE_of_addLeftReflectLTtheoremIsLeftCancelAdd194yes
93Int.natCast_eq_zero._simp_1theoremInt193yes
94Int.natAbs_edivtheoremInt191yes
95SimpleGraph.edgeSetdefinitionSimpleGraph190yes
96Nat.cast_nonneg'theoremNat188yes
97by_contradictiontheoremorder / root namespace186yes
98MonoidHom.mrangedefinitionMonoidHom186yes
99Fin.fintypedefinitionFin185yes
100AlgebraicGeometry.LocallyRingedSpace.instCategorydefinitionAlgebraicGeometry184yes

Showing the first 100 of 1,500 rows. The tail is long and flat — rank 1,500 dominates 16. The full set is in the JSON and the CSV.

theorems dominated counts theorems for which this site is the sole route to the axiom. eligible is false when the site's own type is classical, so no constructive replacement for it can exist — true of only 2 of the 1,500, which is the negative result in the eligibility note: the test does not discriminate among load-bearing sites. The full data carries each site's chain, and constant_alone where the site's label constant dominates fewer theorems by itself than the chain does together.

Get the data

dominator-table.json · dominator-table.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. Cite the series as 10.5281/zenodo.21900625, which resolves to the current deposit.

Reproduce it

# regenerate the declaration graph (~3 min, ~600 MB)
lake env lean -D maxErrors=4000 lean/Dump.lean
python analysis/dominators.py

ConstantInfo.value? must be passed allowOpaque := true or theorem proofs read as empty and every statement-versus-proof figure is wrong rather than imprecise. Code and derived data: 10.5281/zenodo.21883963.

Two results worth reading off it

60.1% of classically dependent theorems have no responsible site at all. Their immediate dominator is the axiom itself, so no local repair anywhere in the library reaches them. That is the ceiling on what this kind of work can do, and it was not previously known.

Outside classical logic proper, the largest sites are infrastructure rather than mathematics: a functor category instance at 5,271, hash-map well-formedness at 4,899, the powerset Boolean algebra at 3,430, string conversion at 1,111. The places where choice is load-bearing are not the places anyone would have pointed at.

Why sites rather than constants

A run of constants that each dominate the next, losing no theorems between them, is one repair and not several — severing any member frees the same theorems. Counting them separately would count one repair many times. 182 of the 1,500 rows here are such chains; the rest are single constants.

The hash-map row is the clearest case. Std.DHashMap.Internal.Raw.WF.out, wfImp_alter and isHashSelf_updateBucket_alter dominate 4,892, 4,896 and 4,899 theorems taken individually, and they are one site of 4,899. Read as three constants they look like three findings; read as a site they are one piece of infrastructure.

What is not here yet

A reach column. The 58x figure above is one measured pair; computing reach for every row means a second traversal of the full graph and it has not been run. It is missing rather than estimated.

MeasurementsMethodSources
measurements Log  ·  Status F-Keys