THE CLEANABLE TABLE

the declarations whose dependence on choice actually came out

275 declarations across 60 modules were rewritten to remove a dependence on the axiom of choice, and the Lean kernel accepted every one. Four were refused and one kept its dependence. This is the list.

The unit is a compiler-generated _proof_N term rather than a lemma anyone wrote, and that is the finding rather than a caveat. The removable dependence in these libraries sits in terms the elaborator emitted, so it comes out by changing the tactic that emits them and not by editing a proof.

Measured with gonzalgo · Lean 4.32.1 with Mathlib v4.32.1 · every rewrite checked by the Lean kernel, not the elaborator

librarymoduledeclarationoccurrencesoutcome
BatteriesBatteries.Data.Char.AsciiCasingChar.toLower_eq_of_not_isUpper1removed
BatteriesBatteries.Data.String.LemmasString.Legacy.Iterator.hasNext_cons_addChar2removed
BatteriesBatteries.Data.String.LemmasString.splitAux_of_valid2removed
InitInit.Data.Array.ExtractArray.extract_eq_self_iff2removed
InitInit.Data.Array.LemmasArray.back?_eq_none_iff3removed
InitInit.Data.BitVec.BitblastBitVec.carry_succ2removed
InitInit.Data.BitVec.BitblastBitVec.carry_succ2removed
InitInit.Data.BitVec.BitblastBitVec.intMin_udiv_ne_zero_of_ne_zero4removed
InitInit.Data.BitVec.BitblastBitVec.saddOverflow_eq10removed
InitInit.Data.BitVec.BitblastBitVec.sdivOverflow_eq2removed
InitInit.Data.BitVec.BitblastBitVec.sdivOverflow_eq2removed
InitInit.Data.BitVec.BitblastBitVec.sdivOverflow_eq2removed
InitInit.Data.BitVec.BitblastBitVec.ssubOverflow_eq14removed
InitInit.Data.BitVec.BitblastBitVec.ult_eq_not_carry2removed
InitInit.Data.BitVec.BitblastBitVec.umulOverflow_eq2removed
InitInit.Data.BitVec.LemmasBitVec.clzAuxRec_eq_iff_of_getLsbD_false1removed
InitInit.Data.BitVec.LemmasBitVec.clzAuxRec_eq_iff_of_getLsbD_false1removed
InitInit.Data.BitVec.LemmasBitVec.clzAuxRec_eq_zero_iff1removed
InitInit.Data.BitVec.LemmasBitVec.clzAuxRec_eq_zero_iff1removed
InitInit.Data.BitVec.LemmasBitVec.getLsbD_false_of_clzAuxRec1removed
InitInit.Data.BitVec.LemmasBitVec.getLsbD_false_of_clzAuxRec1removed
InitInit.Data.BitVec.LemmasBitVec.getLsbD_intMax2removed
InitInit.Data.BitVec.LemmasBitVec.getLsbD_intMin4removed
InitInit.Data.BitVec.LemmasBitVec.getLsbD_shiftConcat_eq_decide2removed
InitInit.Data.BitVec.LemmasBitVec.getLsbD_shiftConcat_eq_decide3removed
InitInit.Data.BitVec.LemmasBitVec.getLsbD_true_of_eq_clzAuxRec_of_ne_zero1removed
InitInit.Data.BitVec.LemmasBitVec.getLsbD_true_of_eq_clzAuxRec_of_ne_zero1removed
InitInit.Data.BitVec.LemmasBitVec.getMsbD_extractLsb2removed
InitInit.Data.BitVec.LemmasBitVec.getMsbD_extractLsb4removed
InitInit.Data.BitVec.LemmasBitVec.getMsbD_extractLsb'2removed
InitInit.Data.BitVec.LemmasBitVec.getMsbD_extractLsb'4removed
InitInit.Data.BitVec.LemmasBitVec.getMsbD_twoPow2removed
InitInit.Data.BitVec.LemmasBitVec.le_add_iff_sub_le2removed
InitInit.Data.BitVec.LemmasBitVec.le_toInt_shiftRight2removed
InitInit.Data.BitVec.LemmasBitVec.msb_one4removed
InitInit.Data.BitVec.LemmasBitVec.msb_setWidth2removed
InitInit.Data.BitVec.LemmasBitVec.sdivOverflow_eq_negOverflow_of_eq_allOnes2removed
InitInit.Data.BitVec.LemmasBitVec.setWidth_setWidth1removed
InitInit.Data.BitVec.LemmasBitVec.sle_eq_not_slt3removed
InitInit.Data.BitVec.LemmasBitVec.sle_eq_slt_or_eq2removed
InitInit.Data.BitVec.LemmasBitVec.sub_le_sub_iff_le2removed
InitInit.Data.BitVec.LemmasBitVec.toInt_mul_toInt_lt_neg_two_pow_iff1removed
InitInit.Data.BitVec.LemmasBitVec.toInt_mul_toInt_lt_neg_two_pow_iff1removed
InitInit.Data.BitVec.LemmasBitVec.toInt_neg_iff2removed
InitInit.Data.BitVec.LemmasBitVec.toInt_pos_iff2removed
InitInit.Data.BitVec.LemmasBitVec.toInt_shiftRight_lt2removed
InitInit.Data.BitVec.LemmasBitVec.toInt_sub_toInt_lt_twoPow_iff4removed
InitInit.Data.BitVec.LemmasBitVec.toInt_sub_toInt_lt_twoPow_iff5removed
InitInit.Data.BitVec.LemmasBitVec.toNat_signExtend_of_le2removed
InitInit.Data.BitVec.LemmasBitVec.twoPow_le_toInt_sub_toInt_iff3removed
InitInit.Data.BitVec.LemmasBitVec.two_pow_le_toInt_mul_toInt_iff1removed
InitInit.Data.BitVec.LemmasBitVec.two_pow_le_toInt_mul_toInt_iff1removed
InitInit.Data.BitVec.LemmasBitVec.two_pow_le_toInt_mul_toInt_iff2removed
InitInit.Data.BitVec.LemmasBitVec.uaddOverflow_assoc2removed
InitInit.Data.BitVec.LemmasBitVec.ult_eq_msb_of_msb_neq3removed
InitInit.Data.ByteArray.LemmasByteArray.extract_eq_empty_iff2removed
InitInit.Data.Fin.LemmasFin.coe_sub_iff_le2removed
InitInit.Data.Fin.LemmasFin.coe_sub_iff_le2removed
InitInit.Data.Fin.LemmasFin.coe_sub_iff_lt2removed
InitInit.Data.Fin.LemmasFin.coe_sub_iff_lt2removed
InitInit.Data.Fin.LemmasNat.mod_eq_sub_of_lt_two_mul2removed
InitInit.Data.Int.CooperInt.cooper_resolution_dvd_right2removed
InitInit.Data.Int.DivMod.LemmasInt.add_one_tdiv8removed
InitInit.Data.Int.DivMod.LemmasInt.add_one_tdiv_of_pos2removed
InitInit.Data.Int.DivMod.LemmasInt.bmod_neg_iff2removed
InitInit.Data.Int.DivMod.LemmasInt.bmod_neg_iff4removed
InitInit.Data.Int.DivMod.LemmasInt.ediv_le_iff_le_mul2removed
InitInit.Data.Int.DivMod.LemmasInt.fdiv_fmod_unique'8removed
InitInit.Data.Int.DivMod.LemmasInt.le_mul_iff_le_left2removed
InitInit.Data.Int.DivMod.LemmasInt.mul_fdiv_self_le2removed
InitInit.Data.Int.DivMod.LemmasInt.natAbs_ediv1removed
InitInit.Data.Int.DivMod.LemmasInt.natCast_eq_zero2removed
InitInit.Data.Int.DivMod.LemmasInt.tdiv_tmod_unique8removed
InitInit.Data.Int.DivMod.LemmasInt.tdiv_tmod_unique2removed
InitInit.Data.Int.DivMod.LemmasInt.tdiv_tmod_unique'9removed
InitInit.Data.Int.GcdInt.eq_zero_of_lcm_eq_zero4removed
InitInit.Data.Int.LemmasAuxInt.eq_natCast_toNat2removed
InitInit.Data.Int.LemmasAuxInt.lt_toNat2removed
InitInit.Data.Int.LemmasAuxInt.mul_le_mul_of_natAbs_le3removed
InitInit.Data.Int.LemmasAuxInt.natCast_le_zero2removed
InitInit.Data.Int.LemmasAuxInt.natCast_ne_zero4removed
InitInit.Data.Int.LemmasAuxInt.natCast_ne_zero_iff_pos3removed
InitInit.Data.Int.LemmasAuxInt.natCast_nonpos_iff2removed
InitInit.Data.Int.LemmasAuxInt.natCast_toNat_eq_self2removed
InitInit.Data.Int.LemmasAuxInt.neg_lt_self_iff2removed
InitInit.Data.Int.LemmasAuxInt.neg_nonpos_iff2removed
InitInit.Data.Int.LemmasAuxInt.pos_iff_toNat_pos2removed
InitInit.Data.Int.LemmasAuxInt.toNat_eq_zero2removed
InitInit.Data.Int.LemmasAuxInt.toNat_le2removed
InitInit.Data.Int.LemmasAuxInt.toNat_lt'2removed
InitInit.Data.Int.LemmasAuxInt.toNat_lt_toNat2removed
InitInit.Data.Int.PowInt.pow_lt_pow_of_lt2removed
InitInit.Data.List.Nat.RangeList.count_range_1'1removed
InitInit.Data.List.Nat.RangeList.erase_range'1removed
InitInit.Data.List.Nat.RangeList.erase_range'1removed
InitInit.Data.List.Nat.RangeList.erase_range'2removed
InitInit.Data.List.Nat.RangeList.find?_range'_eq_some2removed
InitInit.Data.List.Nat.RangeList.find?_range'_eq_some4removed
InitInit.Data.List.Nat.RangeList.range'_eq_singleton_iff4removed
InitInit.Data.List.Nat.RangeList.sum_range'4removed
InitInit.Data.List.Nat.RangeList.sum_range'4removed
InitInit.Data.List.Nat.SumList.sum_pos_iff_exists_pos_nat2removed
InitInit.Data.Nat.Bitwise.LemmasNat.testBit_log23removed
InitInit.Data.Nat.Bitwise.LemmasNat.testBit_log23removed
InitInit.Data.Nat.Bitwise.LemmasNat.testBit_two_pow_sub_succ2removed
InitInit.Data.Nat.Div.LemmasNat.div_le_iff_le_mul2removed
InitInit.Data.Nat.Div.LemmasNat.le_mul_iff_le_left2removed
InitInit.Data.Nat.LemmasNat.add_eq_left2removed
InitInit.Data.Nat.LemmasNat.add_eq_max_iff2removed
InitInit.Data.Nat.LemmasNat.add_eq_min_iff4removed
InitInit.Data.Nat.LemmasNat.add_eq_one_iff6removed
InitInit.Data.Nat.LemmasNat.add_eq_right2removed
InitInit.Data.Nat.LemmasNat.add_eq_three_iff10removed
InitInit.Data.Nat.LemmasNat.add_eq_two_iff8removed
InitInit.Data.Nat.LemmasNat.add_eq_zero4removed
InitInit.Data.Nat.LemmasNat.add_lt_iff_lt_sub_right2removed
InitInit.Data.Nat.LemmasNat.add_pos_iff_pos_or_pos2removed
InitInit.Data.Nat.LemmasNat.le_add_one_iff2removed
InitInit.Data.Nat.LemmasNat.le_and_le_add_one_iff4removed
InitInit.Data.Nat.LemmasNat.le_iff_lt_add_one2removed
InitInit.Data.Nat.LemmasNat.left_eq_add2removed
InitInit.Data.Nat.LemmasNat.lt_sub_iff_add_lt'2removed
InitInit.Data.Nat.LemmasNat.max_eq_zero_iff4removed
InitInit.Data.Nat.LemmasNat.min_eq_zero_iff2removed
InitInit.Data.Nat.LemmasNat.one_lt_iff_ne_zero_and_ne_one6removed
InitInit.Data.Nat.LemmasNat.pow_eq_zero5removed
InitInit.Data.Nat.LemmasNat.pow_lt_pow_iff_pow_mul_le_pow2removed
InitInit.Data.Nat.LemmasNat.right_eq_add2removed
InitInit.Data.Nat.LemmasNat.sub_lt_iff_lt_add2removed
InitInit.Data.Nat.LemmasNat.sub_lt_iff_lt_add'2removed
InitInit.Data.Nat.LemmasNat.sub_lt_sub_iff_right2removed
InitInit.Data.Nat.ModNat.mul_lt_mul_left2removed
InitInit.Data.Nat.Power2.LemmasNat.and_sub_one_testBit_log25removed
InitInit.Data.Nat.Power2.LemmasNat.and_sub_one_testBit_log23removed
InitInit.Data.Nat.ToStringNat.toDigits_of_base_le2removed
InitInit.Data.Range.LemmasStd.Legacy.Range.forIn'_loop_eq_forIn'_range'2removed
InitInit.Data.Range.LemmasStd.Legacy.Range.forM_loop_eq_forM_range'2removed
InitInit.Data.Range.LemmasStd.Legacy.Range.size_eq2removed
InitInit.Data.Range.LemmasStd.Legacy.Range.size_eq2removed
InitInit.Data.Range.LemmasStd.Legacy.Range.size_eq2removed
InitInit.Data.Range.Polymorphic.IntLemmasInt.getElem!_toArray_roo_ne_zero_iff7removed
InitInit.Data.Range.Polymorphic.IntLemmasInt.getElem!_toList_roc_ne_zero_iff7removed
InitInit.Data.Range.Polymorphic.IntLemmasInt.getElem?_toList_rco2removed
InitInit.Data.Range.Polymorphic.IntLemmasInt.toArray_rcc_eq_singleton_append_iff2removed
InitInit.Data.Range.Polymorphic.IntLemmasInt.toArray_rco_eq_singleton_iff5removed
InitInit.Data.Range.Polymorphic.IntLemmasInt.toArray_roo_eq_singleton_iff2removed
InitInit.Data.Range.Polymorphic.IntLemmasInt.toList_rcc_eq_cons_iff2removed
InitInit.Data.Range.Polymorphic.IntLemmasInt.toList_rcc_eq_nil_iff2removed
InitInit.Data.Range.Polymorphic.IntLemmasInt.toList_rcc_eq_singleton_iff7removed
InitInit.Data.Range.Polymorphic.IntLemmasInt.toList_rcc_ne_nil_iff2removed
InitInit.Data.Range.Polymorphic.IntLemmasInt.toList_rco_eq_singleton_iff5removed
InitInit.Data.Range.Polymorphic.IntLemmasInt.toList_roc_eq_singleton_iff7removed
InitInit.Data.Range.Polymorphic.IntLemmasInt.toList_roo_eq_singleton_iff7removed
InitInit.Data.Range.Polymorphic.IntLemmasInt.zero_lt_getElem!_toArray_roc_iff8removed
InitInit.Data.Range.Polymorphic.IntLemmasInt.zero_ne_getElem!_toList_roo_iff7removed
InitInit.Data.Range.Polymorphic.Internal.SignedBitVecBitVec.Signed.sle_iff_rotate_le_rotate2removed
InitInit.Data.Range.Polymorphic.Internal.SignedBitVecBitVec.Signed.sle_iff_rotate_le_rotate2removed
InitInit.Data.Range.Polymorphic.NatStd.instLawfulRcoIntersectionNat11removed
InitInit.Data.Range.Polymorphic.NatStd.instLawfulRcoIntersectionNat_112removed
InitInit.Data.Range.Polymorphic.NatStd.instLawfulRcoIntersectionNat_28removed
InitInit.Data.Range.Polymorphic.NatStd.instLawfulRcoIntersectionNat_310removed
InitInit.Data.Range.Polymorphic.NatStd.instLawfulRcoIntersectionNat_411removed
InitInit.Data.Range.Polymorphic.NatStd.instLawfulRcoIntersectionNat_57removed
InitInit.Data.Range.Polymorphic.NatStd.instLawfulRcoIntersectionNat_67removed
InitInit.Data.Range.Polymorphic.NatStd.instLawfulRcoIntersectionNat_77removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.getElem!_toArray_roc_eq_zero_iff2removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.getElem!_toArray_roo_eq_zero_iff2removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.getElem!_toList_rco_eq_zero_iff2removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.getElem!_toList_rco_eq_zero_iff2removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.getElem!_toList_roc_eq_zero_iff2removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.getElem!_toList_roo_eq_zero_iff2removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.toArray_rcc_eq_singleton_append_iff2removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.toArray_rco_eq_singleton_iff5removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.toList_rcc_eq_cons_iff2removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.toList_rcc_eq_nil_iff2removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.toList_rcc_eq_singleton_iff7removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.toList_rcc_ne_nil_iff2removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.toList_rco_eq_singleton_iff5removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.toList_ric_eq_singleton_iff4removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.toList_rio_eq_singleton_iff7removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.toList_roc_eq_singleton_iff7removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.toList_roo_eq_singleton_iff7removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.zero_lt_getElem!_toArray_roc_iff4removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.zero_lt_getElem!_toArray_roo_iff3removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.zero_lt_getElem!_toList_rco_iff4removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.zero_lt_getElem!_toList_roc_iff4removed
InitInit.Data.Range.Polymorphic.NatLemmasNat.zero_lt_getElem!_toList_roo_iff3removed
InitInit.Data.Range.Polymorphic.SIntHasModel.succMany?_eq2removed
InitInit.Data.SInt.LemmasISize.le_iff_lt_or_eq2removed
InitInit.Data.SInt.LemmasInt16.le_iff_lt_or_eq2removed
InitInit.Data.SInt.LemmasInt32.le_iff_lt_or_eq2removed
InitInit.Data.SInt.LemmasInt64.le_iff_lt_or_eq2removed
InitInit.Data.SInt.LemmasInt8.le_iff_lt_or_eq2removed
InitInit.Data.String.BasicString.Pos.Raw.isValid_push2removed
InitInit.Data.String.BasicString.Pos.sliceFrom_inj2removed
InitInit.Data.String.BasicString.Pos.slice_inj2removed
InitInit.Data.String.BasicString.Slice.Pos.sliceFrom_inj2removed
InitInit.Data.String.BasicString.Slice.Pos.slice_inj2removed
InitInit.Data.String.DecodeByteArray.utf8DecodeChar?_eq_utf8DecodeChar?_extract2removed
InitInit.Data.String.DecodeByteArray.utf8DecodeChar?_eq_utf8DecodeChar?_extract2removed
InitInit.Data.String.DecodeByteArray.utf8DecodeChar?_eq_utf8DecodeChar?_extract2removed
InitInit.Data.String.DecodeByteArray.utf8DecodeChar?_eq_utf8DecodeChar?_extract2removed
InitInit.Data.String.Lemmas.BasicString.Slice.slice_eq_self_iff2removed
InitInit.Data.String.Lemmas.OrderString.Pos.sliceFrom_le_sliceFrom_iff2removed
InitInit.Data.String.Lemmas.OrderString.Pos.sliceFrom_lt_sliceFrom_iff2removed
InitInit.Data.String.Lemmas.OrderString.Pos.slice_le_slice_iff2removed
InitInit.Data.String.Lemmas.OrderString.Pos.slice_lt_slice_iff2removed
InitInit.Data.String.Lemmas.OrderString.Slice.Pos.sliceFrom_le_sliceFrom_iff2removed
InitInit.Data.String.Lemmas.OrderString.Slice.Pos.sliceFrom_lt_sliceFrom_iff2removed
InitInit.Data.String.Lemmas.OrderString.Slice.Pos.slice_le_slice_iff2removed
InitInit.Data.String.Lemmas.OrderString.Slice.Pos.slice_lt_slice_iff2removed
InitInit.Data.String.Lemmas.Pattern.String.ForwardSearcherString.Slice.Pattern.Model.ForwardSliceSearcher.prefixFunctionRecurrence_eq_prefixFunction1removed
InitInit.Data.String.PosRawString.Pos.Raw.dec_lt_iff2removed
InitInit.Data.String.PosRawString.Pos.Raw.le_dec2removed
InitInit.Data.String.TerminationString.Slice.Pos.le_iff_remainingBytes_le2removed
InitInit.Data.String.TerminationString.Slice.Pos.lt_iff_remainingBytes_lt2removed
InitInit.Data.String.TerminationString.Slice.Pos.remainingBytes_inj2removed
InitInit.Grind.Ordered.IntLean.Grind.instLawfulOrderLTInt5removed
InitInit.Grind.Ordered.IntLean.Grind.instOrderedAddInt2removed
InitInit.Grind.Ring.BasicLean.Grind.IsCharP.mk'_aux2removed
InitInit.Grind.ToIntLean.Grind.IntInterval.wrap_eq_self_iff2removed
InitInit.Grind.ToIntLean.Grind.IntInterval.wrap_eq_self_iff2removed
InitInit.Grind.ToIntLean.Grind.IntInterval.wrap_eq_self_iff2removed
InitInit.GrindInstances.NatLean.Grind.instExistsAddOfLTNat2removed
InitInit.GrindInstances.Ring.NatLean.Grind.instLawfulOrderLTNat5removed
InitInit.GrindInstances.Ring.NatLean.Grind.instOrderedRingNat2removed
LeanLean.Meta.Sym.Simp.HaveLean.Meta.Sym.Simp.toHave1removed
LeanLean.Util.DiffLean.Diff.diff1removed
LeanLean.Util.DiffLean.Diff.diff1removed
MathlibMathlib.Algebra.Group.Fin.BasicFin.lt_sub_iff2removed
MathlibMathlib.Algebra.SkewPolynomial.BasicSkewPolynomial.coeff_erase1kernel rejected
MathlibMathlib.CategoryTheory.Limits.Shapes.BinaryBiproductsCategoryTheory.Limits.BinaryBicone.toBiconeFunctor7kernel rejected
MathlibMathlib.Data.List.InfixList.take_isPrefix_take2removed
MathlibMathlib.LinearAlgebra.RootSystem.Finite.G2RootPairing.EmbeddedG2.isOrthogonal_short_and_long_aux2removed
MathlibMathlib.Logic.Equiv.DefsEquiv.propEquivBool1kernel rejected
MathlibMathlib.MeasureTheory.VectorMeasure.BasicMeasureTheory.VectorMeasure.dirac1kernel rejected
MathlibMathlib.Order.Interval.Finset.BoxInt.mem_box12still classical
MathlibMathlib.Tactic.DeriveFintypeMathlib.Deriving.Fintype.mkFintypeInstanceHandler1removed
PlausiblePlausible.GenPlausible.Gen.chooseNatLt2removed
StdStd.Data.DTreeMap.Internal.BalancedStd.DTreeMap.Internal.Impl.balancedAtRoot_one_one1removed
StdStd.Data.DTreeMap.Internal.BalancedStd.DTreeMap.Internal.Impl.balancedAtRoot_one_two2removed
StdStd.Data.DTreeMap.Internal.BalancedStd.DTreeMap.Internal.Impl.balancedAtRoot_two_one2removed
StdStd.Data.DTreeMap.Internal.BalancedStd.DTreeMap.Internal.Impl.balancedAtRoot_zero_iff2removed
StdStd.Data.DTreeMap.Internal.BalancedStd.DTreeMap.Internal.Impl.balancedAtRoot_zero_iff'2removed
StdStd.Data.DTreeMap.Internal.BalancingStd.DTreeMap.Internal.Impl.BalanceLPrecond.erase6removed
StdStd.Data.DTreeMap.Internal.BalancingStd.DTreeMap.Internal.Impl.BalancedAtRoot.adjust_left10removed
StdStd.Data.DTreeMap.Internal.BalancingStd.DTreeMap.Internal.Impl.BalancedAtRoot.erase_left6removed
StdStd.Data.DTreeMap.Internal.BalancingStd.DTreeMap.Internal.Impl.balance!_desc2removed
StdStd.Data.DTreeMap.Internal.BalancingStd.DTreeMap.Internal.Impl.balance!_eq_balanceₘ2removed
StdStd.Data.DTreeMap.Internal.BalancingStd.DTreeMap.Internal.Impl.balance!_eq_balanceₘ2removed
StdStd.Data.DTreeMap.Internal.BalancingStd.DTreeMap.Internal.Impl.balanceLErasePrecond_zero_iff2removed
StdStd.Data.DTreeMap.Internal.BalancingStd.DTreeMap.Internal.Impl.balanceLErasePrecond_zero_iff'6removed
StdStd.Data.DTreeMap.Internal.BalancingStd.DTreeMap.Internal.Impl.balanced_doubleL2removed
StdStd.Data.DTreeMap.Internal.BalancingStd.DTreeMap.Internal.Impl.balanced_doubleL2removed
StdStd.Data.DTreeMap.Internal.BalancingStd.DTreeMap.Internal.Impl.balanced_doubleL2removed
StdStd.Data.DTreeMap.Internal.BalancingStd.DTreeMap.Internal.Impl.balanced_doubleR2removed
StdStd.Data.DTreeMap.Internal.BalancingStd.DTreeMap.Internal.Impl.balanced_doubleR2removed
StdStd.Data.DTreeMap.Internal.BalancingStd.DTreeMap.Internal.Impl.balanced_doubleR2removed
StdStd.Data.DTreeMap.Internal.BalancingStd.DTreeMap.Internal.Impl.balanced_singleL2removed
StdStd.Data.DTreeMap.Internal.BalancingStd.DTreeMap.Internal.Impl.balanced_singleL2removed
StdStd.Data.DTreeMap.Internal.BalancingStd.DTreeMap.Internal.Impl.balanced_singleR2removed
StdStd.Data.DTreeMap.Internal.BalancingStd.DTreeMap.Internal.Impl.balanced_singleR2removed
StdStd.Data.DTreeMap.Internal.ModelStd.DTreeMap.Internal.Impl.updateCell10removed
StdStd.Data.DTreeMap.Internal.ModelStd.DTreeMap.Internal.Impl.updateCell10removed
StdStd.Data.DTreeMap.Internal.OperationsStd.DTreeMap.Internal.Impl.erase6removed
StdStd.Data.DTreeMap.Internal.OperationsStd.DTreeMap.Internal.Impl.erase6removed
StdStd.Data.DTreeMap.Internal.OperationsStd.DTreeMap.Internal.Impl.insert6removed
StdStd.Data.DTreeMap.Internal.OperationsStd.DTreeMap.Internal.Impl.insert6removed
StdStd.Data.DTreeMap.Internal.OperationsStd.DTreeMap.Internal.Impl.insertMax6removed
StdStd.Data.DTreeMap.Internal.OperationsStd.DTreeMap.Internal.Impl.insertMin6removed
StdStd.Data.DTreeMap.Internal.OperationsStd.DTreeMap.Internal.Impl.link6removed
StdStd.Data.DTreeMap.Internal.OperationsStd.DTreeMap.Internal.Impl.link6removed
StdStd.Data.DTreeMap.Internal.OperationsStd.DTreeMap.Internal.Impl.link2removed
StdStd.Data.DTreeMap.Internal.OperationsStd.DTreeMap.Internal.Impl.link26removed
StdStd.Data.DTreeMap.Internal.OperationsStd.DTreeMap.Internal.Impl.link26removed
StdStd.Sat.AIG.BasicStd.Sat.AIG.mkGate2removed
StdStd.Sat.AIG.CachedStd.Sat.AIG.mkGateCached2removed
StdStd.Tactic.BVDecide.Bitblast.BVExpr.BasicStd.Tactic.BVDecide.BVExpr.decEq2removed
StdStd.Tactic.BVDecide.Bitblast.BVExpr.BasicStd.Tactic.BVDecide.BVExpr.decEq2removed
StdStd.Tactic.BVDecide.LRAT.Internal.ConvertStd.Tactic.BVDecide.LRAT.Internal.CNF.lift2removed

occurrences is how many uses of Classical.propDecidable the generated term carried. outcome is removed where the kernel accepted the rewritten term, kernel rejected where it refused, and still classical where the rewrite left the dependence in place. The full data carries the generated term's name and, for the four refusals, the kernel's message verbatim.

Get the data

cleanable.json · cleanable.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/Substitute.lean

ConstantInfo.value? must be passed allowOpaque := true or theorem proof terms read as empty and every occurrence count comes back zero. Method: 10.5281/zenodo.21769846.

Where it lives

The distribution is the useful part: Init 223, Std 41, Mathlib 9, Batteries 3, Lean 3, Plausible 1. Four fifths of the removable classical dependence in this measurement is in Lean core, and only nine declarations are in Mathlib.

That matters for what anyone can do about it. Lean core's position on the tactic behaviour behind most of these is on record: avoiding choice is a deliberate non-goal there, stated in response to the omega report and without disputing any figure. So the largest share of what is removable sits where removal is not wanted, and the share sitting where it might be welcomed is small.

The four the kernel refused

Every refusal is a type mismatch rather than a timeout or a missing instance: the substituted term elaborated and then failed to check. Those are the interesting ones, because they are cases where a Decidable instance exists and is still not interchangeable with the classical one at the point it is used. The kernel's message is carried verbatim in the data for each.

What this is not

It is not a claim that 275 theorems were made constructive. Removing a use of Classical.propDecidable from a generated term removes one route to the axiom; whether the declaration still reaches choice by another route is a separate question this table does not answer. The Dominator Table is where routes are counted.