Commit 2026-11-08 15:51 1c2b1558

View on Github →

chore(NumberTheory): move declarations from namespace RingOfIntegers to NumberField.RingOfIntegers (#45809) (Most of) the declarations about NumberField.RingOfIntegers in Mathlib.NumberTheory.NumberField.Norm, Mathlib.NumberTheory.NumberField.ClassNumber and Mathlib.NumberTheory.NumberField.Ideal.KummerDedekind were in the namespace RingOfIntegers rather than in NumberField.RingOfIntegers. This prevented dot notation, and it looks like a forgotten namespace NumberField. The other files about rings of integers already use NumberField.RingOfIntegers. This PR moves these 26 declarations into NumberField.RingOfIntegers:

  • Norm: norm and the eight lemmas about it (coe_norm, dvd_norm, isUnit_norm, …);
  • ClassNumber: the five isPrincipalIdealRing_of_… criteria;
  • Ideal.KummerDedekind: exponent, ZModXQuotSpanEquivQuotSpan, ZModXQuotSpanEquivQuotSpanPair, monicFactorsMod and the lemmas about them. The old names are deprecated aliases, collected at the end of each file. References in the module docstrings use the new names. Downstream changes:
  • Cyclotomic/PID: the two uses of RingOfIntegers.isPrincipalIdealRing_of_abs_discr_lt now use the full name. A qualified name resolves to the root declaration first, so during the deprecation period it would pick the deprecated alias.
  • Cyclotomic/Ideal: open … NumberField RingOfIntegers becomes open … NumberField NumberField.RingOfIntegers. With NumberField open, open RingOfIntegers opens both the root namespace and NumberField.RingOfIntegers, which would make bare exponent ambiguous between the alias and the new declaration.
  • Units/Basic (second commit): now that dot notation is available, RingOfIntegers.norm ℚ x becomes x.norm ℚ. Zulip discussion: #mathlib4 > RingOfIntegers: namespace question @ 💬 🤖 Generated with Claude Code

Estimated changes