Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: generalize Ideal.spanNorm to allow non free extensions #19244

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

riccardobrasca
Copy link
Member

@riccardobrasca riccardobrasca commented Nov 19, 2024

We generalize Ideal.spanNorm to allow non-free extensions.

Currently, spanNorm, is defined as

def spanNorm (R : Type*) [CommRing R] {S : Type*} [CommRing S] [Algebra R S] (I : Ideal S) : Ideal R :=
    Ideal.span (Algebra.norm R '' (I : Set S))

but the definition is mathematically meaningless unless [Module.Finite R S] and [Module.Free R S]. We change this to

def spanNorm (R : Type*) [CommRing R] [IsDomain R] {S : Type*} [CommRing S] [IsDomain S]
    [IsIntegrallyClosed R] [IsIntegrallyClosed S] [Algebra R S] [Module.Finite R S] [NoZeroSMulDivisors R S]
    [Algebra.IsSeparable (FractionRing R) (FractionRing S)] (I : Ideal S) : Ideal R :=
  Ideal.span (Algebra.intNorm R S '' (I : Set S))

that is the mathematically correct definition, notably in the case R and S are the rings of integers in an extension of number fields.

From flt-regular

Co-authored-by: Andrew Yang [email protected]


Open in Gitpod

@riccardobrasca riccardobrasca added the WIP Work in progress label Nov 19, 2024
@riccardobrasca riccardobrasca changed the title RB/norm_non_free feat: generalize Ideal.relNorm to allow non free extensions Nov 19, 2024
Copy link

github-actions bot commented Nov 19, 2024

PR summary bfa197c8cf

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.RingTheory.Ideal.Norm.RelNorm 1692 1696 +4 (+0.24%)
Mathlib.RingTheory.Localization.Ideal 1026 1027 +1 (+0.10%)
Import changes for all files
Files Import difference
Mathlib.RingTheory.Localization.Ideal 1
Mathlib.RingTheory.Ideal.Norm.RelNorm 4

Declarations diff

+ _root_.NoZeroSMulDivisors_of_isLocalization
+ instance [NoZeroSMulDivisors A C] [Module.Finite A C] [IsIntegrallyClosed C] :
+ intNorm_mem_spanNorm
+ map_spanIntNorm
+ spanIntNorm_localization
- map_spanNorm
- spanNorm_localization
- spanNorm_mul_of_field

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

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

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


No changes to technical debt.

You can run this locally as

./scripts/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).

@github-actions github-actions bot added the t-algebra Algebra (groups, rings, fields, etc) label Nov 19, 2024
@riccardobrasca riccardobrasca changed the title feat: generalize Ideal.relNorm to allow non free extensions feat: generalize Ideal.spanNorm to allow non free extensions Nov 19, 2024
haveI : IsPrincipalIdealRing (Localization P') :=
have : IsDomain Sₚ := IsLocalization.isDomain_localization h
have : IsDedekindDomain Sₚ := IsLocalization.isDedekindDomain S h _
have : IsPrincipalIdealRing Sₚ :=
Copy link
Member Author

@riccardobrasca riccardobrasca Nov 19, 2024

Choose a reason for hiding this comment

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

This sequence of have is not very nice. I am open to any suggestion.

@riccardobrasca riccardobrasca removed the WIP Work in progress label Nov 19, 2024
Copy link
Collaborator

@faenuccio faenuccio left a comment

Choose a reason for hiding this comment

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

I have just started the review and have a couple of comments (above), I will dig into the math later on.

Mathlib/RingTheory/Localization/Ideal.lean Show resolved Hide resolved
@@ -231,6 +231,32 @@ theorem ideal_eq_iInf_comap_map_away {S : Finset R} (hS : Ideal.span (α := R) S
rw [pow_add, mul_assoc, ← mul_comm x, e]
exact I.mul_mem_left _ y.2

variable (R) in
lemma _root_.NoZeroSMulDivisors_of_isLocalization (Rₚ Sₚ : Type*) [CommRing Rₚ] [CommRing Sₚ]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I might misunderstand the situation, but I would say that this lemma holds without assuming that R_p and S_p are rings, you just need to know that they are localizations of R and S at M and at the image of M (and that M is made of non-zero divisors, of course). No?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you mean I don't need addition? IsLocalization is defined only for semirings.

Copy link
Collaborator

@faenuccio faenuccio Dec 2, 2024

Choose a reason for hiding this comment

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

No, what I meant is that I do not think that you need S (and so S_p) to be R-algebras, they only need to be R-modules. I would then expect to use IsLocalizedModule instead of IsLocalization for S_p; but you would need to manually provide the morphism from R to S, and perhaps to ask that the image of M is a monoid and that it satisfies NoZeroSmulDivisors.

I agree this can look a bit strange, but since the conclusion only pertains to the R_p-module structure of S_p, it seems to me that you are only using the algebra structures involved to have nice morphisms (which can be achieved by asking that such morphisms exist), and not because you really need S or S_p to be themselves rings.

Copy link
Member Author

Choose a reason for hiding this comment

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

I get the idea, but in practice I don't see a precise statement. If S is not a ring but only an R-module, what is the morphism from R to S? And If S is a ring then any localization as R-module is automatically a ring.

@@ -6,6 +6,7 @@ Authors: Kenny Lau, Mario Carneiro, Johan Commelin, Amelia Livingston, Anne Baan
import Mathlib.GroupTheory.MonoidLocalization.Away
import Mathlib.RingTheory.Ideal.Quotient.Operations
import Mathlib.RingTheory.Localization.Defs
import Mathlib.Algebra.Algebra.Tower
Copy link
Member Author

Choose a reason for hiding this comment

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

This new import is needed because of the very recent modification #19376. It seems harmless to import Algebra.Algebra.Tower.

Copy link
Collaborator

@faenuccio faenuccio left a comment

Choose a reason for hiding this comment

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

In reviewing the main changes (to RelNorm) I agree that the current notion is meaningless if the above algebra is not (finite, and) free over the one below, but adding that everything is integrally closed seems too much. I can very well imagine taking the norm down to Z from a ring that is not a ring of integers (and this is actually very useful if you study orders in number fields). Am I missing something?

@riccardobrasca
Copy link
Member Author

In reviewing the main changes (to RelNorm) I agree that the current notion is meaningless if the above algebra is not (finite, and) free over the one below, but adding that everything is integrally closed seems too much. I can very well imagine taking the norm down to Z from a ring that is not a ring of integers (and this is actually very useful if you study orders in number fields). Am I missing something?

This is because Algebra.intNorm wants it. I agree it is not yet general enough, but I think we can generalize this later (since IsIntegrallyClosed is a class this shouldn't be a pain to do)

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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants