Skip to content

[Merged by Bors] - feat(GroupTheory): add DivisibleHull#29275

Closed
wwylele wants to merge 20 commits intoleanprover-community:masterfrom
wwylele:wwylele-hahn-localize
Closed

[Merged by Bors] - feat(GroupTheory): add DivisibleHull#29275
wwylele wants to merge 20 commits intoleanprover-community:masterfrom
wwylele:wwylele-hahn-localize

Conversation

@wwylele
Copy link
Copy Markdown
Collaborator

@wwylele wwylele commented Sep 3, 2025

This is part of Hahn embedding theorem #27268, where an a ordered group is first embedded in a divisible group / Q-module. I am aware at #25662 there is also an ongoing rewrite of LocalizedModule that this PR uses. Hopefully I avoided interfering it by using mostly with public API.


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 3, 2025

PR summary 09100dc0a5

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Algebra.Order.Monoid.PNat (new file) 633
Mathlib.GroupTheory.DivisibleHull (new file) 1041

Declarations diff

+ DivisibleHull
+ IsOrderedCancelMonoid.of_mul_lt_mul_left
+ PNat.equivNonZeroDivisorsNat
+ archimedeanClassMk_mk_eq
+ archimedeanClassOrderHom
+ archimedeanClassOrderHomInv
+ archimedeanClassOrderIso
+ archimedeanClassOrderIso_apply
+ archimedeanClassOrderIso_symm_apply
+ coe
+ coeAddMonoidHom
+ coeOrderAddMonoidHom
+ coe_add
+ coe_inj
+ coe_injective
+ ind
+ instance : Coe M (DivisibleHull M)
+ instance : IsOrderedCancelAddMonoid (DivisibleHull M)
+ instance : IsStrictOrderedModule ℚ (DivisibleHull M)
+ instance : IsStrictOrderedModule ℚ≥0 (DivisibleHull M)
+ instance : LE (DivisibleHull M)
+ instance : LinearOrder (DivisibleHull M)
+ instance : Module ℚ (DivisibleHull M)
+ instance : SMul ℚ (DivisibleHull M)
+ liftOn
+ liftOn_mk
+ liftOn₂
+ liftOn₂_mk
+ mk
+ mk_add_mk
+ mk_add_mk_left
+ mk_eq_mk
+ mk_eq_mk_iff_smul_eq_smul
+ mk_le_mk
+ mk_left_injective
+ mk_lt_mk
+ neg_mk
+ nnqsmul_mk
+ nsmul_mk
+ pow_le_pow_iff_left
+ qsmul_def
+ qsmul_mk
+ qsmul_of_nonneg
+ qsmul_of_nonpos
+ zero_qsmul
+ zsmul_mk
++ mk_zero

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

@wwylele wwylele force-pushed the wwylele-hahn-localize branch 2 times, most recently from a93a1b4 to 49935c3 Compare September 3, 2025 00:55
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Sep 3, 2025

/-- The divisible hull of a Abelian group (as a ℤ-module) is the localized module by
`Submonoid.pos ℤ`, thus a ℕ-divisble group, or a ℚ-module -/
abbrev DivisibleHull := LocalizedModule (Submonoid.pos ℤ) M
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't quite understand what the plan with LocalizedModule is, though I think the idea might be to entirely deprecate it in favor of OreLocalization at some point in the future. Might be worth checking in on that.

def archimedeanClassOrderHom : ArchimedeanClass M →o ArchimedeanClass (DivisibleHull M) :=
ArchimedeanClass.orderHom (mkOrderAddMonoidHom M)

theorem archimedeanClassMk_mk (m : M) (s : Submonoid.pos ℤ) :
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does this seem reasonable?

Suggested change
theorem archimedeanClassMk_mk (m : M) (s : Submonoid.pos ℤ) :
@[simp]
theorem archimedeanClassMk_mk (m : M) (s : Submonoid.pos ℤ) :

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I removed this because this sent some simp in archimedeanClassOrderIso in a loop, but I'll investigate it

Comment on lines +264 to +266
apply_fun ArchimedeanClass.mk at h
simp_rw [archimedeanClassMk_mk] at h
exact archimedeanClassOrderHom_injective M h))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You could then do:

Suggested change
apply_fun ArchimedeanClass.mk at h
simp_rw [archimedeanClassMk_mk] at h
exact archimedeanClassOrderHom_injective M h))
apply archimedeanClassOrderHom_injective M
simp))

@wwylele wwylele force-pushed the wwylele-hahn-localize branch from 49935c3 to b9ddffd Compare September 4, 2025 01:06
mathlib-bors bot pushed a commit that referenced this pull request Sep 4, 2025
…9277)

Part of #29275. I put it immediately under `IsLocalization (nonZeroDivisors ℤ) ℚ` given the similarity.
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Sep 4, 2025
@wwylele wwylele force-pushed the wwylele-hahn-localize branch from b9ddffd to c0fbed2 Compare September 5, 2025 00:30
@wwylele
Copy link
Copy Markdown
Collaborator Author

wwylele commented Sep 6, 2025

I added a second file Mathlib/GroupTheory/DivisibleHull2.lean to showcase generalizing this to AddCommMonoid. The unfortunate part of this generalization is the Q-module needs to be made manually. Not sure if this is the mathematically correct definition and whether we want this

Copy link
Copy Markdown
Collaborator

@vihdzp vihdzp left a comment

Choose a reason for hiding this comment

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

Some initial comments on the module version (which I agree is the better one to have).

@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Sep 7, 2025
@wwylele wwylele force-pushed the wwylele-hahn-localize branch 2 times, most recently from 835db3c to a883036 Compare September 7, 2025 18:23
CBirkbeck pushed a commit to CBirkbeck/mathlib4 that referenced this pull request Sep 8, 2025
…anprover-community#29277)

Part of leanprover-community#29275. I put it immediately under `IsLocalization (nonZeroDivisors ℤ) ℚ` given the similarity.
yuanyi-350 pushed a commit to yuanyi-350/yuanyi_mathlib4 that referenced this pull request Sep 10, 2025
…anprover-community#29277)

Part of leanprover-community#29275. I put it immediately under `IsLocalization (nonZeroDivisors ℤ) ℚ` given the similarity.
mathlib-bors bot pushed a commit that referenced this pull request Sep 11, 2025
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Sep 11, 2025
@wwylele wwylele force-pushed the wwylele-hahn-localize branch from a883036 to 14e9660 Compare September 11, 2025 18:59
@wwylele wwylele marked this pull request as ready for review September 11, 2025 19:33
robertmaxton42 pushed a commit to robertmaxton42/mathlib4 that referenced this pull request Sep 11, 2025
…anprover-community#29277)

Part of leanprover-community#29275. I put it immediately under `IsLocalization (nonZeroDivisors ℤ) ℚ` given the similarity.
@wwylele wwylele removed the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 18, 2025
@wwylele wwylele requested a review from YaelDillies September 18, 2025 13:10
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

Don't forget Violeta's comments!

@wwylele wwylele force-pushed the wwylele-hahn-localize branch from 8559f86 to bc3a1d3 Compare September 18, 2025 15:12
@wwylele wwylele requested a review from YaelDillies September 18, 2025 16:00
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

Thanks!

maintainer delegate

@github-actions
Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by YaelDillies.

@ghost ghost added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Sep 18, 2025
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Oct 2, 2025
…anprover-community#29277)

Part of leanprover-community#29275. I put it immediately under `IsLocalization (nonZeroDivisors ℤ) ℚ` given the similarity.
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Oct 2, 2025
zhuyizheng pushed a commit to zhuyizheng/mathlib4 that referenced this pull request Oct 2, 2025
Copy link
Copy Markdown
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Oct 9, 2025

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

@ghost ghost added delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Oct 9, 2025
Co-authored-by: Johan Commelin <johan@commelin.net>
@wwylele
Copy link
Copy Markdown
Collaborator Author

wwylele commented Oct 9, 2025

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Oct 9, 2025
This is part of Hahn embedding theorem #27268, where an a ordered group is first embedded in a divisible group / Q-module. I am aware at #25662 there is also an ongoing rewrite of `LocalizedModule` that this PR uses. Hopefully I avoided interfering it by using mostly with public API.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Oct 9, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(GroupTheory): add DivisibleHull [Merged by Bors] - feat(GroupTheory): add DivisibleHull Oct 9, 2025
@mathlib-bors mathlib-bors bot closed this Oct 9, 2025
Jlh18 pushed a commit to Jlh18/mathlib4 that referenced this pull request Oct 14, 2025
This is part of Hahn embedding theorem leanprover-community#27268, where an a ordered group is first embedded in a divisible group / Q-module. I am aware at leanprover-community#25662 there is also an ongoing rewrite of `LocalizedModule` that this PR uses. Hopefully I avoided interfering it by using mostly with public API.
BeibeiX0 pushed a commit to BeibeiX0/mathlib4 that referenced this pull request Nov 7, 2025
This is part of Hahn embedding theorem leanprover-community#27268, where an a ordered group is first embedded in a divisible group / Q-module. I am aware at leanprover-community#25662 there is also an ongoing rewrite of `LocalizedModule` that this PR uses. Hopefully I avoided interfering it by using mostly with public API.
@wwylele wwylele deleted the wwylele-hahn-localize branch November 20, 2025 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). t-group-theory Group theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants