Skip to content

feat(RingTheory/Spectrum/Prime/Noetherian): rank of an Artinian ring over a field#38182

Open
tb65536 wants to merge 2 commits intoleanprover-community:masterfrom
tb65536:tb_finart
Open

feat(RingTheory/Spectrum/Prime/Noetherian): rank of an Artinian ring over a field#38182
tb65536 wants to merge 2 commits intoleanprover-community:masterfrom
tb65536:tb_finart

Conversation

@tb65536
Copy link
Copy Markdown
Contributor

@tb65536 tb65536 commented Apr 17, 2026

This PR proves that the rank of an Artinian ring over a field is the sum of the ranks of the localizations.

This will be applied in #37130 to prove the ramification-inertia formula (this is where the sum first shows up).

I had to upgrade the Finite instance on the prime spectrum of an Artinian ring to a Fintype instance in order to write down the sum, but this should be fine since this fintype instance can already be inferred from heavier imports: https://live.lean-lang.org/#codez=JYWwDg9gTgLgBAWQIYwBYBtgCMBQOB2E%2BAxhOAK4xJboCmctAHkuHXAN4BKcAXHACoBPMLQBUAXzgBtAMJkQnYPgDmcTgF1pASQDOAQVhLgSfIpVrNfAGJKYw%2BgAoAClFC0AyiOIwo5EGoBKXgBeHDg4JQAzWigtfB0qElocIA


Open in Gitpod

@tb65536 tb65536 added awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. t-algebra Algebra (groups, rings, fields, etc) t-ring-theory Ring theory labels Apr 17, 2026
@tb65536 tb65536 mentioned this pull request Apr 17, 2026
13 tasks
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 17, 2026

PR summary c4037aa6b4

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.RingTheory.Spectrum.Prime.Noetherian 1783 1784 +1 (+0.06%)
Mathlib.RingTheory.OrderOfVanishing.Noetherian 2269 2270 +1 (+0.04%)
Import changes for all files
Files Import difference
46 files Mathlib.AlgebraicGeometry.AffineSpace Mathlib.AlgebraicGeometry.AffineTransitionLimit Mathlib.AlgebraicGeometry.AlgClosed.Basic Mathlib.AlgebraicGeometry.Artinian Mathlib.AlgebraicGeometry.Fiber Mathlib.AlgebraicGeometry.Geometrically.Basic Mathlib.AlgebraicGeometry.Geometrically.Connected Mathlib.AlgebraicGeometry.Geometrically.Integral Mathlib.AlgebraicGeometry.Geometrically.Irreducible Mathlib.AlgebraicGeometry.Geometrically.Reduced Mathlib.AlgebraicGeometry.IdealSheaf.Functorial Mathlib.AlgebraicGeometry.IdealSheaf.IrreducibleComponent Mathlib.AlgebraicGeometry.Morphisms.ClosedImmersion Mathlib.AlgebraicGeometry.Morphisms.FinitePresentation Mathlib.AlgebraicGeometry.Morphisms.FiniteType Mathlib.AlgebraicGeometry.Morphisms.Finite Mathlib.AlgebraicGeometry.Morphisms.FlatDescent Mathlib.AlgebraicGeometry.Morphisms.FlatMono Mathlib.AlgebraicGeometry.Morphisms.Immersion Mathlib.AlgebraicGeometry.Morphisms.Integral Mathlib.AlgebraicGeometry.Morphisms.Proper Mathlib.AlgebraicGeometry.Morphisms.SchemeTheoreticallyDominant Mathlib.AlgebraicGeometry.Morphisms.Separated Mathlib.AlgebraicGeometry.Morphisms.UniversallyClosed Mathlib.AlgebraicGeometry.Morphisms.UniversallyOpen Mathlib.AlgebraicGeometry.Noetherian Mathlib.AlgebraicGeometry.PointsPi Mathlib.AlgebraicGeometry.ProjectiveSpectrum.Proper Mathlib.AlgebraicGeometry.QuasiAffine Mathlib.AlgebraicGeometry.RationalMap Mathlib.AlgebraicGeometry.Sites.ConstantSheaf Mathlib.AlgebraicGeometry.Sites.Fpqc Mathlib.AlgebraicGeometry.SpreadingOut Mathlib.AlgebraicGeometry.ValuativeCriterion Mathlib.RingTheory.AdicCompletion.Noetherian Mathlib.RingTheory.HopkinsLevitzki Mathlib.RingTheory.Ideal.KrullsHeightTheorem Mathlib.RingTheory.Jacobson.Artinian Mathlib.RingTheory.KrullDimension.Polynomial Mathlib.RingTheory.KrullDimension.Regular Mathlib.RingTheory.OrderOfVanishing.Basic Mathlib.RingTheory.OrderOfVanishing.Noetherian Mathlib.RingTheory.RegularLocalRing.Defs Mathlib.RingTheory.Spectrum.Prime.Jacobson Mathlib.RingTheory.Spectrum.Prime.LTSeries Mathlib.RingTheory.Spectrum.Prime.Noetherian
1

Declarations diff

+ exists_not_mem_forall_mem_of_ne
+ finrank_eq_sum_primeSpectrum
+ instance : Fintype (PrimeSpectrum R)
- _root_.IsArtinianRing.exists_not_mem_forall_mem_of_ne
- instance : Finite (PrimeSpectrum R)

You can run this locally as follows
## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>

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

The doc-module for scripts/pr_summary/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/reporting/technical-debt-metrics.sh 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).

Comment on lines 50 to 53
instance : Ring.KrullDimLE 0 R := .mk₀ fun _ _ ↦ inferInstance

instance : DiscreteTopology (PrimeSpectrum R) :=
discreteTopology_iff_finite_and_krullDimLE_zero.mpr ⟨inferInstance, inferInstance⟩
Copy link
Copy Markdown
Contributor Author

@tb65536 tb65536 Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These unnamed instances technically had their name changed from the namespace, but I assume that's fine given that the autogenerated names aren't supposed to be used anyway?

@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-algebra Algebra (groups, rings, fields, etc) t-ring-theory Ring theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant