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

[Merged by Bors] - feat: Add exists_ideal_in_class_of_norm_le #9084

Closed
wants to merge 29 commits into from

Conversation

xroblot
Copy link
Collaborator

@xroblot xroblot commented Dec 15, 2023

@xroblot xroblot added WIP Work in progress t-number-theory Number theory (also use t-algebra or t-analysis to specialize) labels Dec 15, 2023
@riccardobrasca
Copy link
Member

If it's easy can you explicitly add the fact that if the Minkowski bound is less than 2 then the ring is principal?

@xroblot
Copy link
Collaborator Author

xroblot commented Dec 15, 2023

If it's easy can you explicitly add the fact that if the Minkowski bound is less than 2 then the ring is principal?

I added

theorem classNumber_eq_one_of_abs_discr_lt
    (h : |discr K| < (2 * (π / 4) ^ NrComplexPlaces K *
      ((finrank ℚ K) ^ (finrank ℚ K) / (finrank ℚ K).factorial)) ^ 2) :
    classNumber K = 1 := by

@riccardobrasca
Copy link
Member

If it's easy can you explicitly add the fact that if the Minkowski bound is less than 2 then the ring is principal?

I added

theorem classNumber_eq_one_of_abs_discr_lt
    (h : |discr K| < (2 * (π / 4) ^ NrComplexPlaces K *
      ((finrank ℚ K) ^ (finrank ℚ K) / (finrank ℚ K).factorial)) ^ 2) :
    classNumber K = 1 := by

When mathematically trivial consequences are trivial even in Lean is always a good sign!

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-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 Dec 18, 2023
@riccardobrasca
Copy link
Member

@xroblot what is the status of this?

@xroblot
Copy link
Collaborator Author

xroblot commented Jan 10, 2024

@xroblot what is the status of this?

I am going to update it with the results of #9210 and fix it so that it compiles. There are still some pieces that need additional work before they find their place in Mathlib (basically everything in the file Sandbox.lean). The two points are the most important:

  • First, I think it makes sense to generalise the results of CanonicalEmbedding to fractional ideals and not just integral ideals (as it is the case at the moment in this PR). For this, I opened [Merged by Bors] - feat: Generalize absNorm to fractional ideals #9613.
  • Second, I need to add some Module.Free and Module.Finite instances for ideals of number fields that surely fit in a larger scheme. I'll open soon a thread on Zulip to discuss that.

@riccardobrasca
Copy link
Member

@xroblot what is the status of this?

I am going to update it with the results of #9210 and fix it so that it compiles. There are still some pieces that need additional work before they find their place in Mathlib (basically everything in the file Sandbox.lean). The two points are the most important:

* First, I think it makes sense to generalise the results of `CanonicalEmbedding` to fractional ideals and not just integral ideals (as it is the case at the moment in this PR). For this, I opened [feat: Generalize absNorm to fractional ideals #9613](https://github.com/leanprover-community/mathlib4/pull/9613).

* Second, I need to add some `Module.Free` and `Module.Finite` instances for ideals of number fields that surely fit in a larger scheme. I'll open soon a thread on Zulip to discuss that.

I've just reviewed #9613, it is almost ready.

The fact that (fractional) ideals are free should follow immediately once we know that they're finite (we know that being torsion free and finite implies free). And finiteness should be very easy, these rings are noetherian. Am I missing something?

@xroblot
Copy link
Collaborator Author

xroblot commented Jan 10, 2024

@xroblot what is the status of this?

I am going to update it with the results of #9210 and fix it so that it compiles. There are still some pieces that need additional work before they find their place in Mathlib (basically everything in the file Sandbox.lean). The two points are the most important:

* First, I think it makes sense to generalise the results of `CanonicalEmbedding` to fractional ideals and not just integral ideals (as it is the case at the moment in this PR). For this, I opened [feat: Generalize absNorm to fractional ideals #9613](https://github.com/leanprover-community/mathlib4/pull/9613).

* Second, I need to add some `Module.Free` and `Module.Finite` instances for ideals of number fields that surely fit in a larger scheme. I'll open soon a thread on Zulip to discuss that.

I've just reviewed #9613, it is almost ready.

Thanks. I'll have a look after I am done with the merge.

The fact that (fractional) ideals are free should follow immediately once we know that they're finite (we know that being torsion free and finite implies free). And finiteness should be very easy, these rings are noetherian. Am I missing something?

No, you're right. I was not clear: it is indeed direct to see that ideals of a number field satisfy the instances that I need, what I am not sure about is if I should just add the instances for number fields or for a wider situation (and in this case, what situation?). I will probably need to add at some point an Ideal file in the number field folder for some results specific to (fractional) ideals of number fields. If you think that having the instances only in the specific case of (fractional) ideals of number fields is good enough, then it will be easy. Otherwise, I think some discussion will be necessary.

I am sorry if this is a bit vague, hopefully, it will become a bit clearer once I find the time to write things done more properly.

@xroblot
Copy link
Collaborator Author

xroblot commented Jan 10, 2024

For example, right now, I am using the following

import Mathlib.LinearAlgebra.FreeModule.PID
import Mathlib.RingTheory.DedekindDomain.Basic


section Ideal

open Module

variable {R S : Type*} [CommRing R] [IsDomain R] [IsPrincipalIdealRing R] [CommRing S] [IsDomain S]
  [Algebra R S] [Module.Free R S] [Module.Finite R S] (I : Ideal S)

instance : Module.Free R I := by
  by_cases hI : I = ⊥
  · have : Subsingleton I := Submodule.subsingleton_iff_eq_bot.mpr hI
    exact Module.Free.of_subsingleton R I
  · exact Free.of_basis (I.selfBasis (Free.chooseBasis R S) hI)

instance : Module.Finite R I := by
  by_cases hI : I = ⊥
  · have : Subsingleton I := Submodule.subsingleton_iff_eq_bot.mpr hI
    exact IsNoetherian.finite R ↥I
  · exact Finite.of_basis (I.selfBasis (Free.chooseBasis R S) hI)

end Ideal

@riccardobrasca
Copy link
Member

Of course we can think about the most general situation, but since the case you need (that is already mathematically interesting) if easy we can just add the instances and think about crazy generalizations later.

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jan 11, 2024
@riccardobrasca
Copy link
Member

@xroblot I would like to test your branch in the FLTRegular project and for some reason I need the latest mathlib, so I am merging master here.

@riccardobrasca
Copy link
Member

@xroblot I would like to test your branch in the FLTRegular project and for some reason I need the latest mathlib, so I am merging master here.

Sorry, ignore my comment.

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the blocked-by-other-PR This PR depends on another PR to Mathlib (this label is automatically managed by a bot) label Jan 18, 2024
@xroblot xroblot removed the WIP Work in progress label Jan 19, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-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 Jan 19, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the blocked-by-other-PR This PR depends on another PR to Mathlib (this label is automatically managed by a bot) label Feb 7, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 8, 2024
@riccardobrasca riccardobrasca self-assigned this Feb 8, 2024
Copy link
Member

@riccardobrasca riccardobrasca left a comment

Choose a reason for hiding this comment

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

This is really great, thanks!

bors d+

Mathlib/LinearAlgebra/Matrix/Basis.lean Show resolved Hide resolved
Mathlib/RingTheory/ClassGroup.lean Outdated Show resolved Hide resolved
Mathlib/NumberTheory/NumberField/ClassNumber.lean Outdated Show resolved Hide resolved
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Feb 8, 2024

✌️ xroblot can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@riccardobrasca
Copy link
Member

Thanks!

bors merge

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Feb 9, 2024
mathlib-bors bot pushed a commit that referenced this pull request Feb 9, 2024
Prove that each class of the classgroup of a number field contains an integral ideal of small norm.
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Feb 9, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: Add exists_ideal_in_class_of_norm_le [Merged by Bors] - feat: Add exists_ideal_in_class_of_norm_le Feb 9, 2024
@mathlib-bors mathlib-bors bot closed this Feb 9, 2024
@mathlib-bors mathlib-bors bot deleted the xfr-classgroup_bound branch February 9, 2024 12:11
atarnoam pushed a commit that referenced this pull request Feb 9, 2024
Prove that each class of the classgroup of a number field contains an integral ideal of small norm.
dagurtomas pushed a commit that referenced this pull request Mar 22, 2024
Prove that each class of the classgroup of a number field contains an integral ideal of small norm.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated ready-to-merge This PR has been sent to bors. t-number-theory Number theory (also use t-algebra or t-analysis to specialize)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants