Skip to content

feat(NumberTheory/NumberField/Cyclotomic): the Kronecker-Weber theorem - #46376

Open
xroblot wants to merge 10 commits into
leanprover-community:masterfrom
xroblot:kronecker-weber
Open

xroblot wants to merge 10 commits into
leanprover-community:masterfrom
xroblot:kronecker-weber

Conversation

@xroblot

@xroblot xroblot commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

This PR proves the Kronecker-Weber theorem: every abelian extension of ℚ is contained in a cyclotomic field. The main result is

theorem kronecker_weber (K : Type*) [Field K] [NumberField K] [IsAbelianGalois ℚ K] :
    ∃ n : ℕ, Nonempty (K →+* CyclotomicField n ℚ)

that is, a number field K that is an abelian Galois extension of ℚ embeds into the cyclotomic field ℚ(ζₙ) for some n. The proof follows Lemmermeyer, Kronecker-Weber via Stickelberger, and derives the theorem from Stickelberger's theorem (#46022).

This PR is not ready for review yet. It shows the complete proof compiling against Mathlib and tracks the progress of its upstreaming. The files KroneckerWeberPrereqs.lean and KroneckerWeberAlgebraPrereqs.lean temporarily gather the results needed for the proof that are not yet in Mathlib; they will be submitted in separate PRs, and this PR will shrink as they are merged.

🤖 Claude extracted this PR from my SKW project.


@github-actions github-actions Bot added the increases-technical-debt Automatically added label for PRs which increase "strong" technical debts label Nov 23, 2026
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

PR summary 58b54f1876

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
34 files Mathlib.Analysis.Fourier.ZMod Mathlib.Analysis.SpecialFunctions.Complex.CircleAddChar Mathlib.NumberTheory.AddCharacter.Trace Mathlib.NumberTheory.Cyclotomic.Discriminant Mathlib.NumberTheory.Cyclotomic.Gal Mathlib.NumberTheory.Cyclotomic.PrimitiveRoots Mathlib.NumberTheory.DirichletCharacter.GaussSum Mathlib.NumberTheory.FLT.Three Mathlib.NumberTheory.Fermat Mathlib.NumberTheory.GaussSum Mathlib.NumberTheory.JacobiSum.Basic Mathlib.NumberTheory.LSeries.DirichletContinuation Mathlib.NumberTheory.LSeries.Nonvanishing Mathlib.NumberTheory.LSeries.PrimesInAP Mathlib.NumberTheory.LSeries.WeakPNT Mathlib.NumberTheory.LSeries.ZMod Mathlib.NumberTheory.LSeries.ZetaZeros Mathlib.NumberTheory.LegendreSymbol.AddCharacter Mathlib.NumberTheory.LegendreSymbol.Complex Mathlib.NumberTheory.LegendreSymbol.JacobiSymbol Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.GaussSum Mathlib.NumberTheory.LegendreSymbol.QuadraticReciprocity Mathlib.NumberTheory.LucasLehmer Mathlib.NumberTheory.NumberField.CMField Mathlib.NumberTheory.NumberField.Cyclotomic.Basic Mathlib.NumberTheory.NumberField.Cyclotomic.Embeddings Mathlib.NumberTheory.NumberField.Cyclotomic.Ideal Mathlib.NumberTheory.NumberField.Cyclotomic.PID Mathlib.NumberTheory.NumberField.Cyclotomic.Three Mathlib.NumberTheory.PrimesCongruentOne Mathlib.RingTheory.LittleWedderburn Mathlib.RingTheory.Polynomial.Cyclotomic.Eval Mathlib.Tactic.NormNum.LegendreSymbol Mathlib.Tactic
1
Mathlib.NumberTheory.NumberField.Cyclotomic.Galois Mathlib.NumberTheory.NumberField.Ideal.Basic 2
Mathlib.NumberTheory.RamificationInertia.HilbertTheory 3
Mathlib.RingTheory.RootsOfUnity.Quotient (new file) 2017
Mathlib.NumberTheory.MulChar.Teichmuller (new file) 2020
Mathlib.NumberTheory.NumberField.QuadraticField.Basic (new file) 3069
Mathlib.NumberTheory.NumberField.Cyclotomic.StickelbergerPrereqs (new file) 3709
Mathlib.NumberTheory.NumberField.Cyclotomic.KroneckerWeberAlgebraPrereqs (new file) Mathlib.NumberTheory.NumberField.Cyclotomic.Stickelberger (new file) 3710
Mathlib.NumberTheory.NumberField.Cyclotomic.KroneckerWeberPrereqs (new file) 3738
Mathlib.NumberTheory.NumberField.Cyclotomic.KroneckerWeber (new file) 3740

Declarations diff (regex)

+ (⋂ₙ
+ AlgEquiv.algebraMap_restrictNormalHom_smul
+ AlgEquiv.algebraMap_restrictNormalHom_smul'
+ Algebra.adjoin_root_eq_top_of_isSplittingField'
+ Algebra.intCast_trace_int_eq_sum_automorphisms
+ Algebra.norm_one_add_smul_eq_one_of_isUnit
+ ArithmeticFunction.isMultiplicative_totient
+ ArithmeticFunction.totient
+ ArithmeticFunction.totient_apply
+ ClassGroup.mk_eq_mk'
+ DistribMulAction.coe_toLinearEquiv
+ ExpChar.not_dvd_orderOf
+ Finset.multiplicity_prod
+ Fintype.prod_compl_zero
+ FixedPoints.intermediateField_inf
+ FractionalIdeal.count_coe_eq_multiplicity
+ FractionalIdeal.count_coe_mul_inv_eq_multiplicity_sub
+ FractionalIdeal.count_eq_multiplicity_num_sub
+ FractionalIdeal.count_extendedHom
+ FractionalIdeal.count_ringEquivOfRingEquiv
+ FractionalIdeal.count_smul
+ FractionalIdeal.eq_iff_count_eq
+ FractionalIdeal.extended_eq_map_num_mul_inv
+ FractionalIdeal.num_ne_bot_of_ne_zero
+ FractionalIdeal.ringEquivOfRingEquiv_eq_extended
+ FractionalIdeal.ringEquivOfRingEquiv_eq_map_num_mul_inv
+ FractionalIdeal.smul_eq_ringEquivOfRingEquiv
+ Ideal.HasTeichmullerLift
+ Ideal.HasTeichmullerLift.equiv
+ Ideal.HasTeichmullerLift.equiv_apply
+ Ideal.HasTeichmullerLift.of_card
+ Ideal.HasTeichmullerLift.of_card_of_isPrime
+ Ideal.IsDedekindDomain.emultiplicity_map_eq_ramificationIdx_mul'
+ Ideal.IsDedekindDomain.multiplicity_map_eq_ramificationIdx_mul
+ Ideal.IsDedekindDomain.ramificationIdx_mul_multiplicity_under_eq
+ Ideal.Quotient.isScalarTower_of_liesOver_liesOver
+ Ideal.cotangentEquivCotangentSpace
+ Ideal.cotangentEquivCotangentSpace_apply
+ Ideal.cotangentEquivCotangentSpace_smul
+ Ideal.cotangentMap
+ Ideal.cotangentMap_injective
+ Ideal.cotangentMap_surjective
+ Ideal.cotangentMap_toCotangent
+ Ideal.finrank_cotangent_eq_one
+ Ideal.liesOver_of_absNorm_dvd_prime_pow
+ Ideal.mapEquiv
+ Ideal.mapEquiv_eq_bot_iff
+ Ideal.pointwise_smul_def'
+ Ideal.pow_liesOver_of_le_ramificationIdx
+ Ideal.prime_of_isMaximal
+ Ideal.residueFieldEquiv
+ Ideal.residueFieldEquiv_mk
+ Ideal.smul_eq_bot_iff
+ Ideal.smul_mem_of_mem_stabilizer
+ Ideal.smul_mem_pow_of_mem_stabilizer
+ Ideal.subgroupOf_inertia
+ InfinitePlace.isReal_of_isGalois
+ IntermediateField.adjoin_root_eq_top_of_isSplittingField'
+ IntermediateField.finiteDimensional_restrict
+ IntermediateField.finrank_dvd_finrank_of_isGalois_of_sup_eq_top
+ IntermediateField.finrank_lift
+ IntermediateField.finrank_restrict
+ IntermediateField.finrank_sup_dvd_mul_of_isGalois
+ IntermediateField.finrank_sup_eq_of_inf_eq_bot
+ IntermediateField.finrank_sup_mul_finrank_inf_eq
+ IntermediateField.lift_iSup
+ IntermediateField.linearDisjoint_iff_linearDisjoint_fieldRange
+ IsAbelianGalois.exists_isCyclic_primePow_iSup_eq_top
+ IsCyclotomicExtension.Rat.apply_eq_pow_iff_galEquivZMod_eq
+ IsCyclotomicExtension.Rat.galEquivZMod_ratComplexConj
+ IsCyclotomicExtension.Rat.gcd_inf
+ IsCyclotomicExtension.Rat.isCoprime_discr_of_coprime
+ IsCyclotomicExtension.Rat.linearDisjoint_of_coprime
+ IsCyclotomicExtension.Rat.map_galEquivZMod_symm_apply
+ IsCyclotomicExtension.Rat.map_galEquivZMod_symm_smul
+ IsCyclotomicExtension.primitiveRoots_nonempty
+ IsDedekindDomain.HeightOneSpectrum.equivOfRingEquiv_apply_asIdeal
+ IsDedekindDomain.HeightOneSpectrum.under_surjective
+ IsFractionRing.map_algebraMap
+ IsFractionRing.map_algebraMap_apply
+ IsFundamentalDiscr.eq_one_of_isSquare
+ IsGalois.fixedField_inj
+ IsGalois.fixingSubgroup_inj
+ IsGaloisGroup.fixedPoints_sup_eq_top_of_isComplement
+ IsGaloisGroup.isSeparable
+ IsGaloisGroup.restrictHom_eq_restrictHom
+ IsGaloisGroup.restrictHom_eq_restrictNormal
+ IsPrimitiveRoot.eq_pow_mul_of_pow_eq
+ IsPrimitiveRoot.isIntegral'
+ IsPrimitiveRoot.not_coprime_absNorm_of_mk_eq_one
+ IsUnramifiedIn.of_algEquiv
+ IsUnramifiedIn.tower_bot
+ List.sum_getElem_rotate
+ MonoidHom.card_quotient_ker_eq_orderOf
+ MulAut.conjNormal_apply_of_isMulCommutative
+ MulSemiringAction.toRingHom_mul
+ MulSemiringAction.toRingHom_one
+ Nat.base_mul_ofDigits_modEq
+ Nat.base_pow_mul_ofDigits_modEq
+ Nat.digits_base_pow_sub_one
+ Nat.digits_eq_replicate_base_sub_one_iff
+ Nat.ofDigits_digitsAppend
+ Nat.ofDigits_eq_base_pow_length_sub_one_iff
+ Nat.ofDigits_eq_sum
+ Nat.ofDigits_rotate_lt
+ Nat.sub_one_mul_sum_mul_pow_mod_eq
+ Nat.sum_ofDigits_rotate
+ Nat.totient_lcm_mul_totient_gcd
+ NumberField.ComplexEmbedding.IsConj.eq_inv_of_isPrimitiveRoot
+ NumberField.ComplexEmbedding.IsConj.eq_inv_of_pow_eq_one
+ NumberField.IsCMField.complexConj_eq_inv_of_isPrimitiveRoot
+ NumberField.QuadraticField.discr_ne_one
+ NumberField.isUnit_iff_natAbs_norm
+ NumberField.of_isQuadraticExtension
+ NumberField.sup
+ Squarefree.isUnit_of_pow
+ Subgroup.card_dvd_lcm_of_isCyclic_of_injective
+ Subgroup.index_eq_iff_card_mul_eq_card
+ Subgroup.lcm_index_eq_card_of_isCyclic_of_inf_eq_bot
+ Subgroup.subgroupOfEquivComm
+ Subgroup.subgroupOf_inf
+ UnramifiedOutside
+ UnramifiedOutside.of_isCyclotomicExtension
+ UnramifiedOutside.of_isCyclotomicExtension'
+ UnramifiedOutside.tower_bot
+ ZMod.cast_trace_eq_trace
+ ZMod.map_cast
+ ZMod.orderOf_pow_sub_one
+ _root_.FractionalIdeal.smul_mk0
+ _root_.IntermediateField.fixingSubgroup_inf
+ _root_.IsArithFrobAt.of_coe
+ _root_.IsArithFrobAt.smul_residue
+ _root_.IsLocalization.map_toRingHom_apply
+ _root_.stickelberger_theorem
+ apply_eq_det_smul_of_finrank_eq_one
+ canonicalEquiv_apply
+ canonicalEquiv_eq_extended
+ canonicalEquiv_smul
+ card_inertia_dvd_card_sub_one
+ card_inertia_dvd_card_sub_one'
+ card_inertia_notMem_iff
+ cast_trace_eq_algebraMap_trace
+ closure_isPrimePow_orderOf_eq_top
+ coeIdeal_smul
+ coe_equivPrimesOverPrimesOver_symm_apply
+ coe_unitsComplexConj
+ coprime_absNorm_of_isCoprime_span_singleton
+ cotangentInertiaAction_apply_eq_smul
+ cotangentMap_mk_smul
+ cyclotomic_lcm
+ decompositionField
+ decompositionField_def
+ decompositionField_le_iff
+ decompositionField_le_iff_primesOver
+ decompositionField_le_inertiaField
+ det_eq_one_iff_eq_id_of_finrank_eq_one
+ discr_eq_quadraticAlgebra_discr
+ discr_half
+ discr_neg
+ discr_pos
+ discr_quadraticAlgebra
+ discr_quadraticAlgebra_eq
+ discr_sqrtd
+ does
+ dvd_of_intCast_dvd_sum_zsmul_toInteger_pow
+ dvd_sub_of_intCast_dvd_sum_zsmul_toInteger_pow
+ embeddingEquiv
+ embeddingEquiv_symm_apply
+ embeddingEquiv_symm_apply_omega
+ eq_decompositionField_iff
+ eq_decompositionField_iff'
+ eq_det_smul_id_of_finrank_eq_one
+ eq_inertiaField_iff
+ eq_inertiaField_iff'
+ eq_of_liesOver
+ eq_one_of_forall_sub_mem_pow
+ eq_one_of_tameCharacter_eq_one
+ eq_or_eq_of_relfinrank_prime
+ equivPrimesOverPrimesOver
+ equivUnits
+ equivUnits_add
+ equivUnits_apply
+ equivUnits_spec
+ eval_one_cyclotomic_of_not_isPrimePow
+ exists_eq_algebraMap_mul_pow_of_pow_eq_algebraMap
+ exists_equivUnits_eq
+ exists_gaussSum_pow_eq_algebraMap
+ exists_isMaximal_le_of_prime_dvd_absNorm
+ exists_maximalReal
+ exists_natAbs_norm_gaussSum_eq_pow
+ exists_natCast_dvd_pow_sub_intCast_pow
+ exists_notMem_and_notMem_and_spanSingleton_div_eq
+ exists_root_adjoin_eq_top_of_isCyclic'
+ exists_sq_eq_discr
+ exists_teichmuller_zpow_apply_eq_pow
+ exists_torsion_realunits_pow_indexRealUnits_eq_mul
+ extendedMulDistribMulAction
+ extendedSMul
+ extendedSMul_def
+ extended_id
+ finiteMultiplicity_gaussSum
+ finiteMultiplicity_jacobiSum
+ finrank_decompositionField_bot
+ finrank_decompositionField_top
+ finrank_eq_of_equiv_equiv
+ finrank_eq_two_mul
+ finrank_inertiaField_bot
+ finrank_inertiaField_top
+ fixedField_spec_of_index_eq_prime_pow
+ fixingSubgroupEquiv_apply_apply
+ fixingSubgroupEquiv_symm_apply_apply
+ fixingSubgroup_decompositionField
+ fixingSubgroup_inertiaField
+ galEquivZMod_symm_unitsMap_restrictGalEquivZMod
+ gaussSum
+ gaussSum_add_of_dvd
+ gaussSum_congr
+ gaussSum_def
+ gaussSum_eq_neg_one_of_dvd
+ gaussSum_frob
+ gaussSum_mem
+ gaussSum_mem_span_zeta_sub_one
+ gaussSum_mul_gaussSum
+ gaussSum_mul_gaussSum_neg
+ gaussSum_ne_zero
+ gaussSum_zero
+ hasTeichmullerLift
+ iSup_primaryComponent_eq_top
+ indexRealUnits_eq_one
+ indexRealUnits_eq_one'
+ inertiaDegIn_above_le
+ inertiaDegIn_below_le
+ inertiaDeg_eq_one
+ inertiaField
+ inertiaField_def
+ inertiaField_le_iff
+ inertiaField_le_iff_ramificationIdx_eq_finrank
+ inertiaStabilizerEquiv
+ inertia_isComplement_fixingSubgroup
+ inertia_smul_residue
+ instance (φ : G →* Rˣ) : IsCyclic (G ⧸ φ.ker)
+ instance : Algebra.IsQuadraticExtension ℤ (𝓞 K)
+ instance : DistribMulAction (MulAction.stabilizer M I) I.Cotangent
+ instance : MulAction G (HeightOneSpectrum R)
+ instance : MulDistribMulAction G (ClassGroup R)
+ instance : MulDistribMulAction G (FractionalIdeal R⁰ K)
+ instance : MulSemiringAction (MulAction.stabilizer M I) (R ⧸ I)
+ instance : MulSemiringAction G (FractionRing R)
+ instance : SMul (MulAction.stabilizer M I) (R ⧸ I)
+ instance : SMul (MulAction.stabilizer M I) I.Cotangent
+ instance : SMul G (ClassGroup R)
+ instance : SMulCommClass (I.inertia (MulAction.stabilizer M I)) (R ⧸ I) I.Cotangent
+ instance : SMulDistribClass (MulAction.stabilizer M I) R (R ⧸ I)
+ instance [IsDedekindDomain S] (Q : Ideal S) [Q.IsMaximal] [NeZero Q] :
+ instance {K L : Type*} [Field K] [Field L] [Algebra K L] [FiniteDimensional K L] [IsGalois K L]
+ instance {K L : Type*} [Field K] [Field L] [NumberField K] [NumberField L] [Algebra K L]
+ instance {n : ℕ} [NeZero n] {K : Type*} [Field K] [NumberField K] [IsCyclotomicExtension {n} ℚ K] :
+ irreducible_X_pow_sub_C_of_isSplittingField
+ isCyclic_iff_isCyclic_units
+ isCyclic_inertia
+ isCyclic_inertia'
+ isCyclic_of_prime_pow
+ isDecompositionRing_of_isFractionRing
+ isFundamentalDiscr_discr
+ isInertiaRing_of_isFractionRing
+ isMaximal_span_zeta_sub_one
+ isPrincipal_prod_smul_pow_of_coprime
+ isPrincipal_prod_smul_pow_of_orderOf_eq
+ isReal_embeddingEquiv_symm_iff
+ isTotallyComplex_iff_discr_neg
+ isTotallyComplex_iff_exists_isComplex
+ isTotallyComplex_iff_not_isTotallyReal
+ isTotallyReal_fixedField_ratComplexConj
+ isTotallyReal_iff_discr_pos
+ isTotallyReal_iff_not_isTotallyComplex
+ isUnit_sub_one_iff
+ isUnit_sub_one_iff_isUnit_eval_one_cyclotomic
+ isUnit_sub_one_iff_of_prime_pow
+ isUnit_sub_one_of_not_isPrimePow
+ isUnramifiedAt
+ isUnramifiedAt_bot_of_isSeparable
+ isUnramifiedIn
+ isUnramifiedIn_of_isCyclotomicExtension
+ isUnramifiedIn_sup
+ isUnramifiedIn_sup'
+ jacobiSum
+ jacobiSum_ne_zero
+ kronecker_weber
+ kw_2_quadratic_real_discr
+ kw_abelian_kummer
+ kw_class_trivial
+ kw_cyclic_odd_primePow_le_cyclotomic
+ kw_cyclic_two_pow_le_cyclotomic
+ kw_eq_of_unique_prime_subfield
+ kw_kummer
+ kw_kummer₀
+ kw_mu_pth_power_ideal
+ kw_mu_val_p
+ kw_mu_val_p_of_liesOver
+ kw_mu_val_p_of_liesOver_ne
+ kw_ramification_reduction
+ kw_ramification_reduction_of_sup_eq_top
+ kw_reduce_to_prime_power
+ kw_reduce_to_prime_power_aux
+ kw_reduce_to_unramified_outside_p
+ kw_split_prime
+ kw_unit_conj_pow
+ kw_unit_eq_mul_pow
+ kw_unit_root_of_unity
+ le_decompositionField_iff
+ le_decompositionField_iff_ramificationIdx_inertiaDeg_eq_one
+ le_inertiaField_iff
+ le_inertiaField_iff_ramificationIdx_eq_one
+ liesOver_under_of_liesOver
+ liftEquiv_symm_apply
+ lift_decompositionField
+ lift_inertiaField
+ mapAut
+ mapIntAlgEquiv
+ map_ringHomComp_teichmuller_zpow_apply
+ mem_iSup_primaryComponent
+ mem_iSup_primaryComponent_primeFactors
+ mem_iSup_primaryComponent_primeFactors_aux
+ mem_sup_zpowers_pow_of_coprime
+ mk_gaussSum_one_eq_neg_zeta_sub_one
+ mk_surjective
+ mk_teichmuller_apply
+ mk_teichmuller_apply_coe
+ modEq_one_of_apply_eq_pow
+ mul_valGauss_eq
+ mul_valGauss_eq_mul_sum
+ multiplicity_smul
+ nonempty_algEquiv_iff_discr_eq
+ nonempty_algEquiv_quadraticAlgebra_discr
+ nonempty_algEquiv_quadraticAlgebra_int
+ not_dvd_pow_self_sub_one
+ not_isSquare_discr
+ not_isSquare_intCast
+ not_isUnit_gaussSum
+ numberField_isGalois_isCyclic_of_finrank_eq
+ of
+ orderOf_pow_of_orderOf_eq_mul
+ orderOf_teichmuller
+ primesOverToUnits
+ primesOverToUnits_apply
+ primesOverToUnits_injective
+ primesOverToUnits_spec
+ primesOverToUnits_surjective
+ primesOver_mem_orbit
+ principalIdeals_le_comap
+ prop_kw_2_power
+ prop_kw_2_power'
+ prop_kw_2_quadratic_real_unique
+ prop_kw_exponent_p
+ prop_kw_exponent_p_eq
+ prop_kw_odd_prime_power
+ quotientInfEquivProdNormalQuotient_coe_apply
+ quotientMk_span_zeta_sub_one_apply
+ quotientMk_span_zeta_sub_one_comp
+ ramificationIdxIn_above_le
+ ramificationIdxIn_below_le
+ ramificationIdxIn_dvd_finrank
+ ramificationIdxIn_sup_eq_lcm
+ ramificationIdx_eq_of_sup_eq_top
+ ramificationIdx_eq_one
+ ramificationIdx_eq_sub_one
+ ramificationIdx_eq_sub_one'
+ ramificationIdx_inertiaDeg_sup_eq_one
+ ramificationIdx_inertiaDeg_sup_eq_one_of_isGalois
+ ramificationIdx_sup_eq_one
+ ramificationIdx_sup_eq_one_of_isGalois
+ ramificationIdx_under_eq_one
+ ratComplexConj
+ ratComplexConj_apply
+ restrictGalEquivZMod
+ restrictGalEquivZMod_apply
+ restrictGalEquivZMod_apply_of_pow_eq
+ restrictNormal_smul_eq
+ restrictScalars_decompositionField
+ restrictScalars_inertiaField
+ ringHomComp_teichmuller_zpow_ne_one
+ rootsOfUnityMapQuot
+ rootsOfUnityMapQuot_apply
+ rootsOfUnityMapQuot_coe_apply
+ rootsOfUnityMapQuot_inj
+ rootsOfUnityMapQuot_injective
+ rootsOfUnityMapQuot_injective_of_notMem
+ smul_asIdeal
+ smul_def
+ smul_eq_equivOfRingEquiv
+ smul_eq_galRestrict_apply
+ smul_gaussSum_eq_mul_gaussSum
+ smul_gaussSum_eq_mul_restrictGalEquivZMod
+ smul_gaussSum_eq_self
+ smul_gaussSum_pow_eq_self
+ smul_id_of_finrank_eq_one_symm_apply
+ smul_mk
+ smul_mk'
+ smul_mk0
+ smul_teichmuller_zpow_apply_eq_mul_restrictGalEquivZMod
+ smul_teichmuller_zpow_apply_eq_self
+ smul_toCotangent
+ smul_traceChar_apply_eq_mulShift
+ smul_traceChar_apply_eq_self
+ spanSingleton_smul
+ span_singleton_eq_prod_of_gaussSum_pow_eq
+ span_singleton_gaussSum_eq_prod
+ stabilizer_smul_mk
+ stabilizer_smul_smul
+ sub_mem_pow_of_coprime
+ sub_mem_pow_of_sub_mem
+ sub_mem_sq_of_tameCharacter_eq_one
+ sum_equivUnits
+ sum_inv_mul_pow_succ
+ sum_pow_of_ne_zero
+ sum_teichmuller_inv_mul_cast_trace
+ sum_teichmuller_inv_mul_cast_trace_aux
+ sum_univ_id_eq_ite
+ tameCharacter
+ tameCharacter_apply
+ tameCharacter_conj
+ tameCharacter_injective
+ teichmuller
+ teichmuller_apply_coe
+ teichmuller_apply_coe_pow_eq_one
+ teichmuller_mk_coe
+ teichmuller_ne_one
+ teichmuller_ne_one_iff
+ teichmuller_pow_eq_one
+ teichmuller_zpow_eq_one_of_dvd
+ three_le_pow
+ toSubfield_fixedField_ratComplexConj
+ two_mul_sum_valGauss
+ unitRep
+ unitRep_spec
+ unramifiedOutside_sup
+ unramifiedOutside_sup'
+ valGauss
+ valGauss_add_le
+ valGauss_add_valGauss
+ valGauss_add_valGauss_neg
+ valGauss_add_valGauss_sub
+ valGauss_congr
+ valGauss_eq_sum_digits
+ valGauss_eq_zero_of_dvd
+ valGauss_eq_zero_of_not_liesOver
+ valGauss_le_self
+ valGauss_le_sum_digits
+ valGauss_ofDigits_le_sum
+ valGauss_one
+ valGauss_smul
+ valGauss_zero
+ zeta_sub_one_dvd_trace_sub_smul
+ zeta_sub_one_mem
+ zeta_sub_one_notMem_sq
+ zeta_sub_one_pow_dvd_norm_one_add_smul_sub
++ instance [IsGalois K L] :
+++- primesOver_eq_singleton
++-+ inertiaDeg_eq
++-+ ramificationIdxIn_eq
++-+ ramificationIdx_eq
+-++ inertiaDegIn_eq
- Ideal.rootsOfUnityMapQuot
- Ideal.rootsOfUnityMapQuot_apply
- Ideal.rootsOfUnityMapQuot_inj
- Ideal.rootsOfUnityMapQuot_injective

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

✅ Lean-aware diff — post-build, computed from the Lean environment (commit e8f9123).

  • +500 new declarations
  • −0 removed declarations

(showing first 200 of 500 lines)

+AddSubgroup.addSubgroupOfEquivComm
+AddSubgroup.addSubgroupOf_inf
+AddSubgroup.index_eq_iff_card_mul_eq_card
+AlgEquiv.algebraMap_restrictNormalHom_smul
+AlgEquiv.algebraMap_restrictNormalHom_smul'
+Algebra.IsUnramifiedIn.of_algEquiv
+Algebra.IsUnramifiedIn.tower_bot
+Algebra.adjoin_root_eq_top_of_isSplittingField'
+Algebra.intCast_trace_int_eq_sum_automorphisms
+Algebra.isUnramifiedAt_bot_of_isSeparable
+Algebra.norm_one_add_smul_eq_one_of_isUnit
+ArithmeticFunction.isMultiplicative_totient
+ArithmeticFunction.totient
+ArithmeticFunction.totient_apply
+ClassGroup.instMulDistribMulAction
+ClassGroup.instMulSemiringActionFractionRing
+ClassGroup.instSMul
+ClassGroup.mapAut
+ClassGroup.mk_eq_mk'
+ClassGroup.principalIdeals_le_comap
+ClassGroup.smul_mk
+ClassGroup.smul_mk'
+ClassGroup.smul_mk0
+CommGroup.closure_isPrimePow_orderOf_eq_top
+CommGroup.iSup_primaryComponent_eq_top
+CommGroup.mem_iSup_primaryComponent
+CommGroup.mem_iSup_primaryComponent_primeFactors
+CommGroup.mem_iSup_primaryComponent_primeFactors_aux
+DistribMulAction.coe_toLinearEquiv
+ExpChar.not_dvd_orderOf
+FiniteField.sum_inv_mul_pow_succ
+FiniteField.sum_pow_of_ne_zero
+FiniteField.sum_univ_id_eq_ite
+Finset.multiplicity_prod
+Fintype.prod_compl_zero
+Fintype.sum_compl_zero
+FixedPoints.intermediateField_inf
+FractionalIdeal.canonicalEquiv_apply
+FractionalIdeal.canonicalEquiv_eq_extended
+FractionalIdeal.canonicalEquiv_smul
+FractionalIdeal.coeIdeal_smul
+FractionalIdeal.count_coe_eq_multiplicity
+FractionalIdeal.count_coe_mul_inv_eq_multiplicity_sub
+FractionalIdeal.count_eq_multiplicity_num_sub
+FractionalIdeal.count_extendedHom
+FractionalIdeal.count_ringEquivOfRingEquiv
+FractionalIdeal.count_smul
+FractionalIdeal.eq_iff_count_eq
+FractionalIdeal.exists_notMem_and_notMem_and_spanSingleton_div_eq
+FractionalIdeal.extendedMulDistribMulAction
+FractionalIdeal.extendedSMul
+FractionalIdeal.extendedSMul_def
+FractionalIdeal.extended_eq_map_num_mul_inv
+FractionalIdeal.extended_id
+FractionalIdeal.instMulDistribMulActionNonZeroDivisors
+FractionalIdeal.num_ne_bot_of_ne_zero
+FractionalIdeal.ringEquivOfRingEquiv_eq_extended
+FractionalIdeal.ringEquivOfRingEquiv_eq_map_num_mul_inv
+FractionalIdeal.smul_def
+FractionalIdeal.smul_eq_ringEquivOfRingEquiv
+FractionalIdeal.smul_mk0
+FractionalIdeal.spanSingleton_smul
+Ideal.HasTeichmullerLift
+Ideal.HasTeichmullerLift.bijective_rootsOfUnityMapQuot
+Ideal.HasTeichmullerLift.casesOn
+Ideal.HasTeichmullerLift.equiv
+Ideal.HasTeichmullerLift.equiv.congr_simp
+Ideal.HasTeichmullerLift.equiv_apply
+Ideal.HasTeichmullerLift.mk
+Ideal.HasTeichmullerLift.of_card
+Ideal.HasTeichmullerLift.of_card_of_isPrime
+Ideal.HasTeichmullerLift.rec
+Ideal.HasTeichmullerLift.recOn
+Ideal.IsDecompositionRing.eq_of_liesOver
+Ideal.IsDecompositionRing.inertiaDegIn_eq
+Ideal.IsDecompositionRing.inertiaDeg_eq
+Ideal.IsDecompositionRing.inertiaDeg_eq_one
+Ideal.IsDecompositionRing.primesOver_eq_singleton
+Ideal.IsDecompositionRing.ramificationIdxIn_eq
+Ideal.IsDecompositionRing.ramificationIdx_eq
+Ideal.IsDecompositionRing.ramificationIdx_eq_one
+Ideal.IsDedekindDomain.emultiplicity_map_eq_ramificationIdx_mul'
+Ideal.IsDedekindDomain.multiplicity_map_eq_ramificationIdx_mul
+Ideal.IsDedekindDomain.ramificationIdx_mul_multiplicity_under_eq
+Ideal.IsInertiaRing.inertiaDegIn_eq
+Ideal.IsInertiaRing.inertiaDeg_eq
+Ideal.IsInertiaRing.isUnramifiedAt
+Ideal.IsInertiaRing.isUnramifiedIn
+Ideal.IsInertiaRing.primesOver_eq_singleton
+Ideal.IsInertiaRing.ramificationIdxIn_eq
+Ideal.IsInertiaRing.ramificationIdx_eq
+Ideal.Quotient.isScalarTower_of_liesOver_liesOver
+Ideal.card_inertia_dvd_card_sub_one
+Ideal.card_inertia_dvd_card_sub_one'
+Ideal.card_inertia_notMem_iff
+Ideal.coe_equivPrimesOverPrimesOver_symm_apply
+Ideal.coprime_absNorm_of_isCoprime_span_singleton
+Ideal.cotangentEquivCotangentSpace
+Ideal.cotangentEquivCotangentSpace_apply
+Ideal.cotangentEquivCotangentSpace_smul
+Ideal.cotangentInertiaAction_apply_eq_smul
+Ideal.cotangentMap
+Ideal.cotangentMap_injective
+Ideal.cotangentMap_surjective
+Ideal.cotangentMap_toCotangent
+Ideal.decompositionField
+Ideal.decompositionField_def
+Ideal.decompositionField_le_iff
+Ideal.decompositionField_le_iff_primesOver
+Ideal.decompositionField_le_inertiaField
+Ideal.eq_decompositionField_iff
+Ideal.eq_decompositionField_iff'
+Ideal.eq_inertiaField_iff
+Ideal.eq_inertiaField_iff'
+Ideal.eq_one_of_forall_sub_mem_pow
+Ideal.eq_one_of_tameCharacter_eq_one
+Ideal.equivPrimesOverPrimesOver
+Ideal.equivPrimesOverPrimesOver.congr_simp
+Ideal.exists_isMaximal_le_of_prime_dvd_absNorm
+Ideal.finrank_cotangent_eq_one
+Ideal.finrank_decompositionField_bot
+Ideal.finrank_decompositionField_top
+Ideal.finrank_inertiaField_bot
+Ideal.finrank_inertiaField_top
+Ideal.fixingSubgroup_decompositionField
+Ideal.fixingSubgroup_inertiaField
+Ideal.inertiaDegIn_above_le
+Ideal.inertiaDegIn_below_le
+Ideal.inertiaField
+Ideal.inertiaField_def
+Ideal.inertiaField_le_iff
+Ideal.inertiaField_le_iff_ramificationIdx_eq_finrank
+Ideal.inertiaStabilizerEquiv
+Ideal.inertia_smul_residue
+Ideal.instDistribMulActionSubtypeMemSubgroupStabilizerCotangent
+Ideal.instIsGaloisGroupSubtypeAlgEquivMemSubgroupInertiaIntermediateFieldInertiaFieldOfIsGalois
+Ideal.instIsGaloisGroupSubtypeAlgEquivMemSubgroupStabilizerIntermediateFieldDecompositionFieldOfIsGalois
+Ideal.instMulSemiringActionSubtypeMemSubgroupStabilizerQuotient
+Ideal.instSMulCommClassSubtypeMemSubgroupStabilizerInertiaQuotientCotangent
+Ideal.instSMulDistribClassSubtypeMemSubgroupStabilizerQuotient
+Ideal.instSMulSubtypeMemSubgroupStabilizerCotangent
+Ideal.instSMulSubtypeMemSubgroupStabilizerQuotient
+Ideal.isCyclic_inertia
+Ideal.isCyclic_inertia'
+Ideal.isDecompositionRing_of_isFractionRing
+Ideal.isInertiaRing_of_isFractionRing
+Ideal.le_decompositionField_iff
+Ideal.le_decompositionField_iff_ramificationIdx_inertiaDeg_eq_one
+Ideal.le_inertiaField_iff
+Ideal.le_inertiaField_iff_ramificationIdx_eq_one
+Ideal.liesOver_of_absNorm_dvd_prime_pow
+Ideal.lift_decompositionField
+Ideal.lift_inertiaField
+Ideal.mapEquiv
+Ideal.mapEquiv.congr_simp
+Ideal.mapEquiv_apply
+Ideal.mapEquiv_eq_bot_iff
+Ideal.mapEquiv_symm_apply
+Ideal.mapHom.congr_simp
+Ideal.pointwise_smul_def'
+Ideal.pow_liesOver_of_le_ramificationIdx
+Ideal.prime_of_isMaximal
+Ideal.ramificationIdxIn_above_le
+Ideal.ramificationIdxIn_below_le
+Ideal.ramificationIdxIn_dvd_finrank
+Ideal.ramificationIdx_inertiaDeg_sup_eq_one
+Ideal.ramificationIdx_inertiaDeg_sup_eq_one_of_isGalois
+Ideal.ramificationIdx_sup_eq_one
+Ideal.ramificationIdx_sup_eq_one_of_isGalois
+Ideal.residueFieldEquiv
+Ideal.residueFieldEquiv_mk
+Ideal.restrictScalars_decompositionField
+Ideal.restrictScalars_inertiaField
+Ideal.rootsOfUnityMapQuot_coe_apply
+Ideal.rootsOfUnityMapQuot_injective_of_notMem
+Ideal.smul_eq_bot_iff
+Ideal.smul_mem_of_mem_stabilizer
+Ideal.smul_mem_pow_of_mem_stabilizer
+Ideal.smul_toCotangent
+Ideal.stabilizer_smul_mk
+Ideal.stabilizer_smul_smul
+Ideal.sub_mem_pow_of_coprime
+Ideal.sub_mem_pow_of_sub_mem
+Ideal.sub_mem_sq_of_tameCharacter_eq_one
+Ideal.subgroupOf_inertia
+Ideal.tameCharacter
+Ideal.tameCharacter_apply
+Ideal.tameCharacter_conj
+Ideal.tameCharacter_injective
+Ideal.torsionMapQuot.congr_simp
+Int.IsFundamentalDiscr.eq_one_of_isSquare
+IntermediateField.adjoin_root_eq_top_of_isSplittingField'
+IntermediateField.eq_or_eq_of_relfinrank_prime
+IntermediateField.finiteDimensional_restrict
+IntermediateField.finrank_dvd_finrank_of_isGalois_of_sup_eq_top
+IntermediateField.finrank_lift
+IntermediateField.finrank_restrict
+IntermediateField.finrank_sup_dvd_mul_of_isGalois
+IntermediateField.finrank_sup_eq_of_inf_eq_bot
+IntermediateField.finrank_sup_mul_finrank_inf_eq

Increase in strong tech debt: (relative, absolute) = (2.00, 0.67)
Current number Change Type (strong)
3518 5 backward.isDefEq.respectTransparency
488 1 erw
3 2 maxHeartbeats modifications
Increase in weak tech debt: (relative, absolute) = (4.00, 0.00)
Current number Change Type (weak)
5159 4 exposed public sections

Current commit 58b54f1876
Reference commit 90e6eec9fe

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@mathlib-dependent-issues mathlib-dependent-issues Bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Nov 23, 2026
@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Nov 24, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) increases-technical-debt Automatically added label for PRs which increase "strong" technical debts merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant