Skip to content

[Merged by Bors] - feat(Algebra/Order): Hahn embedding theorem, part 1#27043

Closed
wwylele wants to merge 2 commits intoleanprover-community:masterfrom
wwylele:wwylele-hahn-subgroup
Closed

[Merged by Bors] - feat(Algebra/Order): Hahn embedding theorem, part 1#27043
wwylele wants to merge 2 commits intoleanprover-community:masterfrom
wwylele:wwylele-hahn-subgroup

Conversation

@wwylele
Copy link
Copy Markdown
Collaborator

@wwylele wwylele commented Jul 12, 2025

Part 1 of Hahn embedding theorem, or the core part of it. This proves that one can embed an ordered module in HahnSeries.

To obtain the full Hahn embedding theorem, one needs to specialize the coefficient of HahnSeries to Real as a module over Rat, and compose with another embedding from ordered group to ordered module. These will be in part 2

There is a debatable design here: throughout the file, all lemmas uses an input HahnEmbedding.Seed. Because the the final theorem is an existence theorem without specifying what HahnEmbedding.Seed is used, it is possible to Classical.choose a seed from the very beginning (provided R = Real ), and the entire file will just use the same chosen seed. Overall, choosing everything from the beginning will likely make the code a little bit more concise.

I decided against choosing anything till the final step, for the reason that such choice is not canonical for an arbitrary module, and there may be future use of this construction with more canonical choice for specific modules. Examples are:

  • if the input is a HahnSeries Γ R, the canonical choice for the stratum would be HahnSeries.single
  • for the field version of Hahn embedding theorem ("every linearly ordered field can be embedded in HahnSeries as a field", not implemented), the canonical choice should ensure that all stratum form a graded ring, and the coeff should map (1 : M) to (1 : R).

But if the argument is not strong enough, I am OK with converting everything to a classical choose.


Open in Gitpod

@wwylele wwylele added the WIP Work in progress label Jul 12, 2025
@github-actions github-actions bot added t-algebra Algebra (groups, rings, fields, etc) large-import Automatically added label for PRs with a significant increase in transitive imports labels Jul 12, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 12, 2025

PR summary bbd46d79f2

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Algebra.Order.Module.HahnEmbedding (new file) 1092

Declarations diff

+ ArchimedeanStrata
+ IsPartial
+ Partial
+ Seed
+ apply_of_mem_stratum
+ archimedeanClassMk_eq_iff
+ archimedeanClassMk_le_of_eval_eq
+ archimedeanClassMk_of_mem_stratum
+ archimedean_stratum
+ ball_eq_closedBall
+ baseDomain
+ baseEmbedding
+ baseEmbedding_le_extendFun
+ baseEmbedding_le_sSupFun
+ baseEmbedding_pos
+ baseEmbedding_strictMono
+ coeff'
+ coeff_baseEmbedding
+ coeff_eq_of_mem
+ coeff_eq_zero_of_mem
+ coeff_ne_zero
+ domain_baseEmbedding
+ eval
+ evalCoeff
+ evalCoeff_eq
+ evalCoeff_eq_zero
+ eval_eq_truncLT
+ eval_lt
+ eval_ne
+ eval_smul
+ eval_zero
+ exists_domain_eq_top
+ exists_isMax
+ exists_sub_mem_ball
+ extend
+ extendFun
+ extendFun_strictMono
+ hahnCoeff
+ hahnCoeff_apply
+ hahnEmbedding_isOrderedModule
+ iSupIndep_stratum
+ iSupIndep_stratum'
+ instance : DirectSum.Decomposition u.stratum' := (u.isInternal_stratum').chooseDecomposition _
+ instance [IsOrderedAddMonoid R] : Inhabited (Partial seed)
+ isInternal_stratum'
+ isPartial_baseEmbedding
+ isPartial_extendFun
+ isPartial_sSupFun
+ isWF_support_evalCoeff
+ le_sSupFun
+ lt_extend
+ mem_domain
+ mem_domain_baseEmbedding
+ nontrivial_stratum
+ orderTop_eq_archimedeanClassMk
+ orderTop_eq_finiteArchimedeanClassMk
+ orderTop_eq_iff
+ sSup
+ sSupFun
+ sSupFun_strictMono
+ stratum'
+ stratum_eq_bot_iff
+ stratum_top
+ toOrderAddMonoidHom
+ toOrderAddMonoidHom_apply
+ toOrderAddMonoidHom_injective
+ truncLT_eval_mem_range_extendFun
+ truncLT_mem_range_baseEmbedding
+ truncLT_mem_range_extendFun
+ truncLT_mem_range_sSupFun

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

@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 Jul 12, 2025
@wwylele wwylele force-pushed the wwylele-hahn-subgroup branch 2 times, most recently from 5a02521 to 2861287 Compare July 12, 2025 23:42
@wwylele wwylele force-pushed the wwylele-hahn-subgroup branch from 2861287 to e564788 Compare July 13, 2025 15:31
@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jul 19, 2025
@leanprover-community-bot-assistant
Copy link
Copy Markdown
Collaborator

This pull request has conflicts, please merge master and resolve them.

@wwylele wwylele force-pushed the wwylele-hahn-subgroup branch from e564788 to 46d3115 Compare July 25, 2025 00:48
@github-actions github-actions 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 Jul 25, 2025
@wwylele wwylele force-pushed the wwylele-hahn-subgroup branch 3 times, most recently from 046c802 to 2bc8246 Compare August 1, 2025 22:43
mathlib-bors bot pushed a commit that referenced this pull request Aug 11, 2025
@wwylele wwylele force-pushed the wwylele-hahn-subgroup branch from f5f1cfa to 8e23334 Compare August 14, 2025 14:33
mathlib-bors bot pushed a commit that referenced this pull request Aug 14, 2025
Part of #27043  (Hahn embedding theorem). For concepts in this part, I don't find good names from literature, so I took inspiration from #27451 (`Valuation.ball`) and `Metric.ball` / `Metric.closedBall` (`ArchimedeanClass M` actually becomes a `Valuation` when `M` is a ring so these names make sense).
mathlib-bors bot pushed a commit that referenced this pull request Aug 14, 2025
Part of #27043  (Hahn embedding theorem). For concepts in this part, I don't find good names from literature, so I took inspiration from #27451 (`Valuation.ball`) and `Metric.ball` / `Metric.closedBall` (`ArchimedeanClass M` actually becomes a `Valuation` when `M` is a ring so these names make sense).
@mathlib4-merge-conflict-bot
Copy link
Copy Markdown
Collaborator

This pull request has conflicts, please merge master and resolve them.

@mathlib4-merge-conflict-bot mathlib4-merge-conflict-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 Aug 14, 2025
@YaelDillies YaelDillies changed the title feat (Algebra/Order): Hahn embedding theorem part 1 feat(Algebra/Order): Hahn embedding theorem, part 1 Aug 19, 2025
Paul-Lez pushed a commit to Paul-Lez/mathlib4 that referenced this pull request Aug 23, 2025
Paul-Lez pushed a commit to Paul-Lez/mathlib4 that referenced this pull request Aug 23, 2025
Part of leanprover-community#27043  (Hahn embedding theorem). For concepts in this part, I don't find good names from literature, so I took inspiration from leanprover-community#27451 (`Valuation.ball`) and `Metric.ball` / `Metric.closedBall` (`ArchimedeanClass M` actually becomes a `Valuation` when `M` is a ring so these names make sense).
pechersky pushed a commit to pechersky/mathlib4 that referenced this pull request Aug 25, 2025
Part of leanprover-community#27043  (Hahn embedding theorem). For concepts in this part, I don't find good names from literature, so I took inspiration from leanprover-community#27451 (`Valuation.ball`) and `Metric.ball` / `Metric.closedBall` (`ArchimedeanClass M` actually becomes a `Valuation` when `M` is a ring so these names make sense).
@wwylele wwylele force-pushed the wwylele-hahn-subgroup branch from 70d5a1f to 90c5c36 Compare August 27, 2025 01:41
@wwylele
Copy link
Copy Markdown
Collaborator Author

wwylele commented Sep 4, 2025

Did another wave of renaming and put them in the HahnEmbedding namespace. I shortened them to avoid repeating so now they are HahnEmbedding.Seed, HahnEmbedding.Partial etc...
Also renamed ArchimedeanBallComplements to ArchimeadeanStrata

@YaelDillies YaelDillies added the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 7, 2025
@wwylele wwylele removed the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 7, 2025
@YaelDillies YaelDillies added the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 11, 2025
@wwylele wwylele removed the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 11, 2025
@mathlib4-merge-conflict-bot
Copy link
Copy Markdown
Collaborator

This pull request has conflicts, please merge master and resolve them.

@mathlib4-merge-conflict-bot mathlib4-merge-conflict-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 Sep 12, 2025
@wwylele wwylele force-pushed the wwylele-hahn-subgroup branch from 8ab002a to 5c9f120 Compare September 12, 2025 13:22
@github-actions github-actions 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 Sep 12, 2025
@YaelDillies YaelDillies added the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 12, 2025
@wwylele wwylele removed the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 12, 2025
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 merge

@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 13, 2025
@riccardobrasca
Copy link
Copy Markdown
Member

This is a huge PR, but I think it's OK since it is only adding a new file, thanks!

bors merge

@ghost ghost added ready-to-merge This PR has been sent to bors. and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Sep 14, 2025
mathlib-bors bot pushed a commit that referenced this pull request Sep 14, 2025
Part 1 of Hahn embedding theorem, or the core part of it. This proves that one can embed an ordered module in HahnSeries.

To obtain the full Hahn embedding theorem, one needs to specialize the coefficient of HahnSeries to Real as a module over Rat, and compose with another embedding from ordered group to ordered module. These will be in part 2

There is a debatable design here: throughout the file, all lemmas uses an input `HahnEmbedding.Seed`. Because the the final theorem is an existence theorem without specifying what `HahnEmbedding.Seed` is used, it is possible to `Classical.choose` a seed from the very beginning (provided `R = Real` ), and the entire file will just use the same chosen seed. Overall, choosing everything from the beginning will likely make the code a little bit more concise. 

I decided against choosing anything till the final step, for the reason that such choice is not canonical for an arbitrary module, and there may be future use of this construction with more canonical choice for specific modules. Examples are:
 - if the input is a `HahnSeries Γ R`, the canonical choice for the `stratum` would be `HahnSeries.single`
 - for the field version of Hahn embedding theorem ("every linearly ordered field can be embedded in `HahnSeries` as a field", not implemented), the canonical choice should ensure that all `stratum` form a graded ring, and the `coeff` should map `(1 : M)` to `(1 : R)`.

But if the argument is not strong enough, I am OK with converting everything to a classical choose.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Sep 14, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Algebra/Order): Hahn embedding theorem, part 1 [Merged by Bors] - feat(Algebra/Order): Hahn embedding theorem, part 1 Sep 14, 2025
@mathlib-bors mathlib-bors bot closed this Sep 14, 2025
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Oct 2, 2025
…nity#27043)

Part 1 of Hahn embedding theorem, or the core part of it. This proves that one can embed an ordered module in HahnSeries.

To obtain the full Hahn embedding theorem, one needs to specialize the coefficient of HahnSeries to Real as a module over Rat, and compose with another embedding from ordered group to ordered module. These will be in part 2

There is a debatable design here: throughout the file, all lemmas uses an input `HahnEmbedding.Seed`. Because the the final theorem is an existence theorem without specifying what `HahnEmbedding.Seed` is used, it is possible to `Classical.choose` a seed from the very beginning (provided `R = Real` ), and the entire file will just use the same chosen seed. Overall, choosing everything from the beginning will likely make the code a little bit more concise. 

I decided against choosing anything till the final step, for the reason that such choice is not canonical for an arbitrary module, and there may be future use of this construction with more canonical choice for specific modules. Examples are:
 - if the input is a `HahnSeries Γ R`, the canonical choice for the `stratum` would be `HahnSeries.single`
 - for the field version of Hahn embedding theorem ("every linearly ordered field can be embedded in `HahnSeries` as a field", not implemented), the canonical choice should ensure that all `stratum` form a graded ring, and the `coeff` should map `(1 : M)` to `(1 : R)`.

But if the argument is not strong enough, I am OK with converting everything to a classical choose.
zhuyizheng pushed a commit to zhuyizheng/mathlib4 that referenced this pull request Oct 2, 2025
…nity#27043)

Part 1 of Hahn embedding theorem, or the core part of it. This proves that one can embed an ordered module in HahnSeries.

To obtain the full Hahn embedding theorem, one needs to specialize the coefficient of HahnSeries to Real as a module over Rat, and compose with another embedding from ordered group to ordered module. These will be in part 2

There is a debatable design here: throughout the file, all lemmas uses an input `HahnEmbedding.Seed`. Because the the final theorem is an existence theorem without specifying what `HahnEmbedding.Seed` is used, it is possible to `Classical.choose` a seed from the very beginning (provided `R = Real` ), and the entire file will just use the same chosen seed. Overall, choosing everything from the beginning will likely make the code a little bit more concise. 

I decided against choosing anything till the final step, for the reason that such choice is not canonical for an arbitrary module, and there may be future use of this construction with more canonical choice for specific modules. Examples are:
 - if the input is a `HahnSeries Γ R`, the canonical choice for the `stratum` would be `HahnSeries.single`
 - for the field version of Hahn embedding theorem ("every linearly ordered field can be embedded in `HahnSeries` as a field", not implemented), the canonical choice should ensure that all `stratum` form a graded ring, and the `coeff` should map `(1 : M)` to `(1 : R)`.

But if the argument is not strong enough, I am OK with converting everything to a classical choose.
@wwylele wwylele deleted the wwylele-hahn-subgroup branch November 20, 2025 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants