[Merged by Bors] - feat(RingTheory/IsAdjoinRoot): add mkOfAdjoinEqTop'#36421
[Merged by Bors] - feat(RingTheory/IsAdjoinRoot): add mkOfAdjoinEqTop'#36421ROTARTSI82 wants to merge 22 commits intoleanprover-community:masterfrom
Conversation
Welcome new contributor!Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests. We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR. Thank you again for joining our community. |
PR summary 00dbc4ec64Import changes exceeding 2%
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.RingTheory.IsAdjoinRoot | 1671 | 1725 | +54 (+3.23%) |
| Mathlib.RingTheory.Valuation.Minpoly | 1686 | 1726 | +40 (+2.37%) |
| Mathlib.FieldTheory.Normal.Basic | 1686 | 1725 | +39 (+2.31%) |
| Mathlib.FieldTheory.Minpoly.MinpolyDiv | 1747 | 1748 | +1 (+0.06%) |
| Mathlib.FieldTheory.PurelyInseparable.Exponent | 1780 | 1781 | +1 (+0.06%) |
| Mathlib.Analysis.Complex.Polynomial.Basic | 2624 | 2625 | +1 (+0.04%) |
| Mathlib.NumberTheory.NumberField.InfinitePlace.Embeddings | 2696 | 2697 | +1 (+0.04%) |
Import changes for all files
| Files | Import difference |
|---|---|
224 filesMathlib.AlgebraicGeometry.EllipticCurve.IsomOfJ Mathlib.AlgebraicGeometry.EllipticCurve.Reduction Mathlib.AlgebraicGeometry.Morphisms.FormallyUnramified Mathlib.Analysis.CStarAlgebra.ApproximateUnit Mathlib.Analysis.CStarAlgebra.CStarMatrix Mathlib.Analysis.CStarAlgebra.CompletelyPositiveMap Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Basic Mathlib.Analysis.CStarAlgebra.ContinuousFunctionalCalculus.Order Mathlib.Analysis.CStarAlgebra.Fuglede Mathlib.Analysis.CStarAlgebra.GelfandDuality Mathlib.Analysis.CStarAlgebra.GelfandNaimarkSegal Mathlib.Analysis.CStarAlgebra.Hom Mathlib.Analysis.CStarAlgebra.Module.Constructions Mathlib.Analysis.CStarAlgebra.Module.Defs Mathlib.Analysis.CStarAlgebra.PositiveLinearMap Mathlib.Analysis.CStarAlgebra.Projection Mathlib.Analysis.CStarAlgebra.SpecialFunctions.PosPart Mathlib.Analysis.CStarAlgebra.Spectrum Mathlib.Analysis.CStarAlgebra.Unitary.Connected Mathlib.Analysis.CStarAlgebra.Unitary.Span Mathlib.Analysis.Complex.OpenMapping Mathlib.Analysis.Complex.Polynomial.Basic Mathlib.Analysis.Complex.Polynomial.GaussLucas Mathlib.Analysis.Complex.Polynomial.UnitTrinomial Mathlib.Analysis.Complex.UpperHalfPlane.Manifold Mathlib.Analysis.Complex.UpperHalfPlane.Measure Mathlib.Analysis.Fourier.ZMod Mathlib.Analysis.InnerProductSpace.StandardSubspace Mathlib.Analysis.Normed.Algebra.GelfandFormula Mathlib.Analysis.Normed.Algebra.GelfandMazur Mathlib.Analysis.Normed.Field.Dense Mathlib.Analysis.Normed.Field.Krasner Mathlib.Analysis.Normed.Unbundled.SpectralNorm Mathlib.Analysis.Polynomial.Factorization Mathlib.Analysis.Polynomial.MahlerMeasure Mathlib.Analysis.SpecialFunctions.Complex.CircleAddChar Mathlib.Analysis.SpecialFunctions.ContinuousFunctionalCalculus.ExpLog.Order Mathlib.Analysis.SpecialFunctions.ContinuousFunctionalCalculus.Rpow.IntegralRepresentation Mathlib.Analysis.SpecialFunctions.ContinuousFunctionalCalculus.Rpow.Order Mathlib.Analysis.SpecialFunctions.ContinuousFunctionalCalculus.Rpow.RingInverseOrder Mathlib.FieldTheory.AbelRuffini Mathlib.FieldTheory.AbsoluteGaloisGroup Mathlib.FieldTheory.AlgebraicClosure Mathlib.FieldTheory.CardinalEmb Mathlib.FieldTheory.Cardinality Mathlib.FieldTheory.Differential.Liouville Mathlib.FieldTheory.Finite.Extension Mathlib.FieldTheory.Finite.GaloisField Mathlib.FieldTheory.Finite.Trace Mathlib.FieldTheory.Galois.Abelian Mathlib.FieldTheory.Galois.Basic Mathlib.FieldTheory.Galois.GaloisClosure Mathlib.FieldTheory.Galois.Infinite Mathlib.FieldTheory.Galois.IsGaloisGroup Mathlib.FieldTheory.Galois.NormalBasis Mathlib.FieldTheory.Galois.Profinite Mathlib.FieldTheory.IsPerfectClosure Mathlib.FieldTheory.IsSepClosed Mathlib.FieldTheory.Isaacs Mathlib.FieldTheory.JacobsonNoether Mathlib.FieldTheory.KrullTopology Mathlib.FieldTheory.KummerExtension Mathlib.FieldTheory.Laurent Mathlib.FieldTheory.LinearDisjoint Mathlib.FieldTheory.Minpoly.MinpolyDiv Mathlib.FieldTheory.NormalizedTrace Mathlib.FieldTheory.PolynomialGaloisGroup Mathlib.FieldTheory.PurelyInseparable.Basic Mathlib.FieldTheory.PurelyInseparable.Exponent Mathlib.FieldTheory.PurelyInseparable.PerfectClosure Mathlib.FieldTheory.PurelyInseparable.Tower Mathlib.FieldTheory.RatFunc.AsPolynomial Mathlib.FieldTheory.RatFunc.Degree Mathlib.FieldTheory.RatFunc.IntermediateField Mathlib.FieldTheory.RatFunc.Luroth Mathlib.FieldTheory.SeparableClosure Mathlib.FieldTheory.SeparableDegree Mathlib.FieldTheory.SeparablyGenerated Mathlib.LinearAlgebra.QuadraticForm.Complex Mathlib.NumberTheory.ClassNumber.Finite Mathlib.NumberTheory.ClassNumber.FunctionField Mathlib.NumberTheory.Cyclotomic.Basic Mathlib.NumberTheory.Cyclotomic.CyclotomicCharacter 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.FunctionField Mathlib.NumberTheory.GaussSum Mathlib.NumberTheory.Height.NumberField Mathlib.NumberTheory.JacobiSum.Basic Mathlib.NumberTheory.LSeries.DirichletContinuation Mathlib.NumberTheory.LSeries.Nonvanishing Mathlib.NumberTheory.LSeries.PrimesInAP Mathlib.NumberTheory.LSeries.ZMod Mathlib.NumberTheory.LSeries.ZetaZeros Mathlib.NumberTheory.LegendreSymbol.AddCharacter Mathlib.NumberTheory.LegendreSymbol.JacobiSymbol Mathlib.NumberTheory.LegendreSymbol.QuadraticChar.GaussSum Mathlib.NumberTheory.LegendreSymbol.QuadraticReciprocity Mathlib.NumberTheory.LucasLehmer Mathlib.NumberTheory.MahlerMeasure Mathlib.NumberTheory.ModularForms.Basic Mathlib.NumberTheory.ModularForms.Bounds Mathlib.NumberTheory.ModularForms.DedekindEta Mathlib.NumberTheory.ModularForms.Delta Mathlib.NumberTheory.ModularForms.Derivative Mathlib.NumberTheory.ModularForms.Discriminant Mathlib.NumberTheory.ModularForms.EisensteinSeries.Basic Mathlib.NumberTheory.ModularForms.EisensteinSeries.E2.MDifferentiable Mathlib.NumberTheory.ModularForms.EisensteinSeries.E2.Summable Mathlib.NumberTheory.ModularForms.EisensteinSeries.E2.Transform Mathlib.NumberTheory.ModularForms.EisensteinSeries.MDifferentiable Mathlib.NumberTheory.ModularForms.EisensteinSeries.QExpansion Mathlib.NumberTheory.ModularForms.JacobiTheta.Manifold Mathlib.NumberTheory.ModularForms.LevelOne Mathlib.NumberTheory.ModularForms.NormTrace Mathlib.NumberTheory.ModularForms.Petersson Mathlib.NumberTheory.ModularForms.QExpansion Mathlib.NumberTheory.NumberField.AdeleRing Mathlib.NumberTheory.NumberField.Basic Mathlib.NumberTheory.NumberField.CMField Mathlib.NumberTheory.NumberField.CanonicalEmbedding.Basic Mathlib.NumberTheory.NumberField.CanonicalEmbedding.ConvexBody Mathlib.NumberTheory.NumberField.CanonicalEmbedding.FundamentalCone Mathlib.NumberTheory.NumberField.CanonicalEmbedding.NormLeOne Mathlib.NumberTheory.NumberField.CanonicalEmbedding.PolarCoord Mathlib.NumberTheory.NumberField.ClassNumber Mathlib.NumberTheory.NumberField.Completion.FinitePlace Mathlib.NumberTheory.NumberField.Completion.InfinitePlace Mathlib.NumberTheory.NumberField.Completion.LiesOverInstances Mathlib.NumberTheory.NumberField.Completion.Ramification Mathlib.NumberTheory.NumberField.Cyclotomic.Basic Mathlib.NumberTheory.NumberField.Cyclotomic.Embeddings Mathlib.NumberTheory.NumberField.Cyclotomic.Galois Mathlib.NumberTheory.NumberField.Cyclotomic.Ideal Mathlib.NumberTheory.NumberField.Cyclotomic.PID Mathlib.NumberTheory.NumberField.Cyclotomic.Three Mathlib.NumberTheory.NumberField.DedekindZeta Mathlib.NumberTheory.NumberField.Discriminant.Basic Mathlib.NumberTheory.NumberField.Discriminant.Defs Mathlib.NumberTheory.NumberField.Discriminant.Different Mathlib.NumberTheory.NumberField.EquivReindex Mathlib.NumberTheory.NumberField.FinitePlaces Mathlib.NumberTheory.NumberField.FractionalIdeal Mathlib.NumberTheory.NumberField.House Mathlib.NumberTheory.NumberField.Ideal.Asymptotics Mathlib.NumberTheory.NumberField.Ideal.Basic Mathlib.NumberTheory.NumberField.Ideal.KummerDedekind Mathlib.NumberTheory.NumberField.InfiniteAdeleRing Mathlib.NumberTheory.NumberField.InfinitePlace.Basic Mathlib.NumberTheory.NumberField.InfinitePlace.Completion Mathlib.NumberTheory.NumberField.InfinitePlace.Embeddings Mathlib.NumberTheory.NumberField.InfinitePlace.Ramification Mathlib.NumberTheory.NumberField.InfinitePlace.TotallyRealComplex Mathlib.NumberTheory.NumberField.Norm Mathlib.NumberTheory.NumberField.ProductFormula Mathlib.NumberTheory.NumberField.Units.Basic Mathlib.NumberTheory.NumberField.Units.DirichletTheorem Mathlib.NumberTheory.NumberField.Units.Regulator Mathlib.NumberTheory.Padics.Complex Mathlib.NumberTheory.Padics.HeightOneSpectrum Mathlib.NumberTheory.Padics.WithVal Mathlib.NumberTheory.PrimesCongruentOne Mathlib.NumberTheory.RamificationInertia.Galois Mathlib.NumberTheory.RamificationInertia.HilbertTheory Mathlib.NumberTheory.RamificationInertia.Unramified Mathlib.NumberTheory.RatFunc.Ostrowski Mathlib.RepresentationTheory.Homological.GroupCohomology.Hilbert90 Mathlib.RingTheory.AlgebraicIndependent.AlgebraicClosure Mathlib.RingTheory.DedekindDomain.AdicValuation Mathlib.RingTheory.DedekindDomain.Different Mathlib.RingTheory.DedekindDomain.FiniteAdeleRing Mathlib.RingTheory.DedekindDomain.GaussLemma Mathlib.RingTheory.DedekindDomain.IntegralClosure Mathlib.RingTheory.DedekindDomain.LinearDisjoint Mathlib.RingTheory.DedekindDomain.SInteger Mathlib.RingTheory.DedekindDomain.SelmerGroup Mathlib.RingTheory.Discriminant Mathlib.RingTheory.Etale.Field Mathlib.RingTheory.Etale.QuasiFinite Mathlib.RingTheory.FractionalIdeal.Norm Mathlib.RingTheory.Frobenius Mathlib.RingTheory.Ideal.Norm.RelNorm Mathlib.RingTheory.IntegralClosure.IntegralRestrict Mathlib.RingTheory.Invariant.Basic Mathlib.RingTheory.Invariant.Profinite Mathlib.RingTheory.LaurentSeries Mathlib.RingTheory.LittleWedderburn Mathlib.RingTheory.LocalRing.ResidueField.Polynomial Mathlib.RingTheory.Localization.NormTrace Mathlib.RingTheory.Norm.Transitivity Mathlib.RingTheory.NormalClosure Mathlib.RingTheory.Polynomial.Cyclotomic.Basic Mathlib.RingTheory.Polynomial.Cyclotomic.Eval Mathlib.RingTheory.Polynomial.Cyclotomic.Expand Mathlib.RingTheory.Polynomial.Cyclotomic.Factorization Mathlib.RingTheory.Polynomial.Cyclotomic.Roots Mathlib.RingTheory.Polynomial.Eisenstein.IsIntegral Mathlib.RingTheory.Polynomial.Selmer Mathlib.RingTheory.QuasiFinite.Polynomial Mathlib.RingTheory.RingHom.Etale Mathlib.RingTheory.RingHom.LocallyStandardSmooth Mathlib.RingTheory.RingHom.StandardSmooth Mathlib.RingTheory.RootsOfUnity.AlgebraicallyClosed Mathlib.RingTheory.RootsOfUnity.Lemmas Mathlib.RingTheory.Smooth.Fiber Mathlib.RingTheory.Smooth.Field Mathlib.RingTheory.Smooth.IntegralClosure Mathlib.RingTheory.Spectrum.Prime.Homeomorph Mathlib.RingTheory.Trace.Basic Mathlib.RingTheory.Trace.Quotient Mathlib.RingTheory.Unramified.Dedekind Mathlib.RingTheory.Unramified.Field Mathlib.RingTheory.Unramified.LocalRing Mathlib.RingTheory.Unramified.LocalStructure Mathlib.RingTheory.Valuation.Discrete.Basic Mathlib.RingTheory.Valuation.Discrete.RankOne Mathlib.RingTheory.ZariskisMainTheorem Mathlib.Tactic.NormNum.LegendreSymbol Mathlib.Tactic Mathlib.Topology.Algebra.Valued.WithVal |
1 |
Mathlib.FieldTheory.Normal.Basic Mathlib.FieldTheory.Normal.Closure |
39 |
Mathlib.RingTheory.Valuation.Minpoly |
40 |
Mathlib.NumberTheory.KummerDedekind |
50 |
Mathlib.RingTheory.IsAdjoinRoot |
54 |
Declarations diff
+ Algebra.aeval_self_charpoly_lmul
+ LinearMap.finrank_le_finrank_of_surjective
+ bijective_of_surjective_of_injective
+ minpoly.degree_le
+ minpoly.natDegree_le
+ mkOfAdjoinEqTop'
+ mkOfAdjoinEqTop'_root
- _root_.minpoly.degree_le
- _root_.minpoly.natDegree_le
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
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
|
t-algebra For the large import changes, we are a bit unsure about the placement of the |
Alternative hypothesis to existing theorem: prove the result from a Module.Free hypothesis instead of IsIntegrallyClosed. If `α` generates `S` as an algebra, then `S` is given by adjoining a root of `minpoly R α`. Co-authored-by: George Peykanu <gpeyka@uw.edu> Co-authored-by: Bryan Boehnke <bryanboehnke@gmail.com> Co-authored-by: Bianca Viray <67076332+b-viray@users.noreply.github.com>
Formalization of lemma 3.2 from https://arxiv.org/abs/2503.07846: Given a local finite ring extension R -> S, if the algebraMap is etale, then there exists a β ∈ S such that R[β] = S. Furthermore, if f(z) ∈ R[z] is the minimal polynomial of β, then f′(β) ∈ S×.
This reverts commit cc73956.
2704aea to
19a085a
Compare
|
t-ring-theory |
|
One question: I see a This particular PR is clearly of value - but knowing this information helps reviewers like me know what sorts of problems to look out for, because humans and AI diverge from Mathlib contribution guidelines differently. |
There was a problem hiding this comment.
In Mathlib we aim to prove everything in the maximal possible sensible generality. Your proofs can be broken up into much smaller lemmas, adding missing API as necessary. Please double check the maths because I'm not an expert, but I think it all works out.
This tool is good for finding lemmas: https://leandex.projectnumina.ai/
|
awaiting-author |
Co-authored-by: Artie Khovanov <artem.khovanov@gmail.com>
Co-authored-by: Artie Khovanov <artem.khovanov@gmail.com>
The theorems in Constructions.lean are generalized by https://leanprover.zulipchat.com/#narrow/channel/217875-Is-there-code-for-X.3F/topic/Embedding.20free.20modules.20into.20each.20other/near/584518236 and so we will wait for that PR. Actually, maybe the iff is valuable? idk.
|
-awaiting-author |
Co-authored-by: <riccardo.brasca@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR generalizes the existing IsAdjoinRootMonic.mkOfAdjoinEqTop construction by adding a new mkOfAdjoinEqTop' that assumes S is a finite free R-module (instead of using integrally-closed hypotheses), and supplies supporting dimension/degree lemmas needed to make the argument work.
Changes:
- Add
IsAdjoinRootMonic.mkOfAdjoinEqTop'(plus a simp lemma for its root) provingS ≃ₐ[R] AdjoinRoot (minpoly R α)fromAlgebra.adjoin R {α} = ⊤underModule.Finite+Module.Free. - Introduce general minpoly degree bounds
minpoly.natDegree_le/minpoly.degree_levia Cayley–Hamilton/charpoly ofAlgebra.lmul. - Add small helper lemmas (
OrzechProperty.bijective_of_surjective_of_injective,LinearMap.finrank_le_finrank_of_surjective) and update imports/usages accordingly.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Mathlib/RingTheory/IsAdjoinRoot.lean | Adds mkOfAdjoinEqTop' and simp lemma, using finrank/OrzechProperty to get bijectivity. |
| Mathlib/LinearAlgebra/Charpoly/Basic.lean | Refactors variable placement, adjusts charpoly_natDegree, and adds minpoly.(natDegree/degree)_le via charpoly of lmul. |
| Mathlib/LinearAlgebra/Dimension/Constructions.lean | Adds LinearMap.finrank_le_finrank_of_surjective. |
| Mathlib/RingTheory/OrzechProperty.lean | Adds bijective_of_surjective_of_injective helper. |
| Mathlib/FieldTheory/IntermediateField/Adjoin/Basic.lean | Removes the older field-specific minpoly.(natDegree/degree)_le lemmas. |
| Mathlib/Analysis/Complex/Polynomial/Basic.lean | Updates proof to use the new minpoly.natDegree_le. |
| Mathlib/FieldTheory/Minpoly/MinpolyDiv.lean | Imports charpoly lemma source to keep minpoly.natDegree_le available. |
| Mathlib/FieldTheory/Normal/Basic.lean | Imports charpoly lemma source to keep minpoly.natDegree_le available. |
| Mathlib/FieldTheory/PurelyInseparable/Exponent.lean | Imports charpoly lemma source to keep minpoly.natDegree_le available. |
| Mathlib/NumberTheory/NumberField/InfinitePlace/Embeddings.lean | Imports charpoly lemma source to keep minpoly.natDegree_le available. |
| Mathlib/RingTheory/Valuation/Minpoly.lean | Imports charpoly lemma source to keep minpoly.natDegree_le available. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| (hirr.isUnit_or_isUnit hq).resolve_left <| minpoly.not_isUnit R h.root | ||
| rw [mul_one] | ||
|
|
||
| /-- If `α` generates `S` as an algebra, then `S` is given by adjoining a root of `minpoly R α`. |
There was a problem hiding this comment.
Can you explain the difference wrt mkOfAdjoinEqTop?
| [Module.Finite R S] [Module.Free R S] [Nontrivial R] | ||
| {α : S} {hα : Algebra.adjoin R {α} = ⊤} : | ||
| (mkOfAdjoinEqTop' hα).root = α := by | ||
| simp [mkOfAdjoinEqTop', IsAdjoinRoot.root] |
There was a problem hiding this comment.
Can you add a simp lemma (whose proof will be rfl) that avoids to unfold mkOfAdjoinEqTop' here? Every definition should come with an API (maybe simps can generate it automatically).
There was a problem hiding this comment.
I updated the mkOfAdjoinEqTop' definition according to your suggestion, but the mkOfAdjoinEqTop simp lemmas still follow the way I was doing it before (I had just copied the way they did it). Should we update that too in this PR?
There was a problem hiding this comment.
If it is just a couple of lines yes please!
|
Feel free to ignore the comments by copilot if they're nonsense. |
Co-authored-by: Riccardo Brasca <riccardo.brasca@gmail.com>
|
Thanks! bors merge |
Alternative hypothesis to existing theorem: prove the result from a `Module.Free `hypothesis instead of `IsIntegrallyClosed`. If `α` generates `S` as an algebra, then `S` is given by adjoining a root of `minpoly R α`.
|
Pull request successfully merged into master. Build succeeded:
|
Alternative hypothesis to existing theorem: prove the result from a
Module.Freehypothesis instead ofIsIntegrallyClosed. IfαgeneratesSas an algebra, thenSis given by adjoining a root ofminpoly R α.Hello, we are the Algebraic Geometry group from the UW Math AI lab, and this is our first PR! This definition of
mkOfAdjoinEqTop'generalizes the existingmkOfAdjoinEqTopand shows the result fromModule.Freeinstead ofIsIntegrallyClosed. It is used in future results that we would like to upstream at https://github.com/uw-math-ai/monogenic-extensions, which is a project to formalize lemmas 3.1 and 3.2 from https://arxiv.org/abs/2503.07846.AI Usage: Claude code and Aristotle were used to fill sorries and search mathlib for existing lemmas, and the code was then golfed by hand.
Co-authored-by: George Peykanu gpeyka@uw.edu
Co-authored-by: Bryan Boehnke bryanboehnke@gmail.com
Co-authored-by: Bianca Viray 67076332+b-viray@users.noreply.github.com
-->