Skip to content

[Merged by Bors] - feat(Algebra/Order): ArchimedeanClass ball#27885

Closed
wwylele wants to merge 15 commits intoleanprover-community:masterfrom
wwylele:wwylele-hahn-ball
Closed

[Merged by Bors] - feat(Algebra/Order): ArchimedeanClass ball#27885
wwylele wants to merge 15 commits intoleanprover-community:masterfrom
wwylele:wwylele-hahn-ball

Conversation

@wwylele
Copy link
Copy Markdown
Collaborator

@wwylele wwylele commented Aug 2, 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).


Open in Gitpod

@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 Aug 2, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 2, 2025

PR summary aced7b254a

Import changes exceeding 2%

% File
+2.01% Mathlib.Algebra.Order.Archimedean.Class

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Algebra.Order.Archimedean.Class 745 760 +15 (+2.01%)
Import changes for all files
Files Import difference
Mathlib.Algebra.Order.Archimedean.Class 15

Declarations diff

+ Iio_eq_bot
+ Ioi_eq_top
+ ballSubgroup
+ ballSubgroup_antitone
+ ballSubgroup_top
+ closedBallSubgroup
+ closedBallSubgroup_top
+ mem_ballSubgroup_iff
+ mem_closedBallSubgroup_iff
+ mem_subgroup_iff
+ subgroup
+ subgroup_antitone
+ subgroup_eq_bot
+ subgroup_strictAntiOn
+ subsemigroup
+ subsemigroup_eq_subgroup_of_ne_top

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

@YaelDillies YaelDillies added the awaiting-author A reviewer has asked the author a question or requested changes. label Aug 10, 2025
@wwylele wwylele force-pushed the wwylele-hahn-ball branch 2 times, most recently from 210eb47 to 28a1f91 Compare August 10, 2025 20:27
@wwylele
Copy link
Copy Markdown
Collaborator Author

wwylele commented Aug 10, 2025

Removed the module part from the PR and addressed the comments. It seems that I hit some unknown error in CI, so I rebased on latest master branch

@wwylele wwylele removed the awaiting-author A reviewer has asked the author a question or requested changes. label Aug 10, 2025
Comment on lines +534 to +539
/-- An open ball defined by `MulArchimedeanClass.subgroup` of `UpperSet.Ioi A`.
For `A = ⊤`, we assign the junk value `⊥`. -/
@[to_additive "An open ball defined by `ArchimedeanClass.addSubgroup` of `UpperSet.Ioi A`.
For `A = ⊤`, we assign the junk value `⊥`. "]
noncomputable
abbrev ballSubgroup (A : MulArchimedeanClass M) := subgroup (UpperSet.Ioi A)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's a bit confusing to use an uppercase letter for an element, which is usually used for types. Why not use {m : M} (c : MulArchimedeanClass M)?

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 have been using (A : MulArchimedeanClass M) (a : M) (h : mk a = A) throughout the file. I don't quite remember how I chose this, but maybe I already committed to it so I should make it consistent?

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.

Oh, it turns out a lot of (A : MulArchimedeanClass M) have gone from previous refactoring, so maybe I should change this

Comment on lines +574 to +583
/-- A subgroup `G` is called a grade at `c` iff
`ballSubgroup c` and `G` are complements in the lattice under `closedBallSubgroup c` -/
@[to_additive "A subgroup `G` is called a grade at `c` iff
`ballAddSubgroup c` and `G` are complements in the lattice under `closedBallAddSubgroup c`"]
def IsGradeSubgroup (c : MulArchimedeanClass M) (G : Subgroup M) :=
Disjoint (ballSubgroup c) G ∧ ballSubgroup c ⊔ G = closedBallSubgroup c
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This docstring doesn't teach me anything more than what I can already infer from the Lean code, but what does it mean to be a grade?

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.

Let me see if I can explain this more in the file level doc to avoid duplicating the explanation for to_additive

Copy link
Copy Markdown
Collaborator Author

@wwylele wwylele Aug 11, 2025

Choose a reason for hiding this comment

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

Updated the file doc to provide some motivation. This is also where I'd like suggestions on better names. I named this originally from graded ring, because there are examples where an ordered ring is graded by archimedean classes (This makes more sense after #28179 defines addition on archimedean classes). Though, this is not generally true for all ordered rings, nor for ordered groups, so the name is not really accurate. Other names I have considered are

  • "summand", as in direct sum. Feels too generic
  • "residue": for an ordered field, this isomorphic to the residue field of the ArchimedeanClass.addValuation in [Merged by Bors] - feat: LinearOrderedAddCommGroupWithTop (ArchimedeanClass R) #28179. But this is only applicable to ring/field
  • "sphere": not really correct. Sphere usually is the set difference between closedBall and ball, but the one here is isomorphic to a quotient group.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry, I don't get it. Where does this appear in the proof of Hahn's embedding theorem?

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.

In https://www.jstor.org/stable/2032549?origin=crossref, this is $K_t$ on page 861 (whereas $H_t$ and $H'_t$ are closed/open balls). In the context of the paper, because the group was already assumed divisible, $K_t$ always exists. I don't assume additional condition yet, so this is only a Prop for now.

In https://www.ams.org/journals/proc/1952-003-06/S0002-9939-1952-0052045-1/, because the proof is done for only ordered real vector space, the "grade" submodule degenerates to one dimensional (thus become basis for finite dimensional spaces). This is $e_t$ on page 979

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry, I remain unconvinced by the design, in particular whether it should be a Prop or a definition, or even simply inlined. Do you mind moving it to the PR where it is used?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@YaelDillies YaelDillies added the awaiting-author A reviewer has asked the author a question or requested changes. label Aug 11, 2025
@wwylele wwylele force-pushed the wwylele-hahn-ball branch from 2154848 to 31fbc85 Compare August 11, 2025 12:49
@wwylele wwylele removed the awaiting-author A reviewer has asked the author a question or requested changes. label Aug 11, 2025
@wwylele wwylele requested a review from YaelDillies August 12, 2025 14:18
@wwylele wwylele force-pushed the wwylele-hahn-ball branch from 31fbc85 to d203967 Compare August 12, 2025 14:22
@github-actions github-actions bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Aug 12, 2025
@wwylele wwylele force-pushed the wwylele-hahn-ball branch from d203967 to 5ab6c3f Compare August 12, 2025 14:22
@wwylele
Copy link
Copy Markdown
Collaborator Author

wwylele commented Aug 12, 2025

Rebased and updated to the new to_additive doc string

@ghost ghost added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Aug 14, 2025
@wwylele wwylele removed the awaiting-author A reviewer has asked the author a question or requested changes. label Aug 14, 2025
@riccardobrasca
Copy link
Copy Markdown
Member

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 Aug 14, 2025
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
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Aug 14, 2025

Build failed:

@riccardobrasca
Copy link
Copy Markdown
Member

Can you please merge master and fix the error? Thanks!

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Aug 14, 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 the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Aug 14, 2025
@wwylele
Copy link
Copy Markdown
Collaborator Author

wwylele commented Aug 14, 2025

Apparently I missed a few to_additive doc fix, plus there is a recent rename of StrictAntiOn.le_iff_ge. Will merge soon once the fix passes

@wwylele
Copy link
Copy Markdown
Collaborator Author

wwylele commented Aug 14, 2025

bors r+

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
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Aug 14, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Algebra/Order): ArchimedeanClass ball [Merged by Bors] - feat(Algebra/Order): ArchimedeanClass ball Aug 14, 2025
@mathlib-bors mathlib-bors bot closed this Aug 14, 2025
Julian added a commit to Aaron1011/mathlib4 that referenced this pull request Aug 16, 2025
* origin/master: (508 commits)
  feat(Logic/Basic): forall_and_index (leanprover-community#27737)
  feat(Algebra/intNorm): `x` divides `intNorm x` (leanprover-community#28021)
  feat(RingTheory/MvPolynomial/MonomialOrder): some lemmas about degree (leanprover-community#26000)
  chore: more elementary Motzkin polynomial proof (leanprover-community#28482)
  feat: e-seminormed monoid (leanprover-community#27385)
  feat(RingTheory): ` (⊥ : Ideal R) ^ n = ⊥` (leanprover-community#28171)
  fix(LinearAlgebra/Dimension/ErdosKaplansky): authorship (leanprover-community#28513)
  chore: golf entire `X_pow_eq_monomial` (leanprover-community#28504)
  feat(RingTheory): invertible modules and Picard group (leanprover-community#25337)
  chore: use delta `deriving` for leanprover-community#380 (leanprover-community#28498)
  feat: add bilinear maps for vector/matrix products (leanprover-community#28130)
  feat(Counterexamples): topologists' sine curve (leanprover-community#25833)
  feat(Analysis/Convex): doubly stochastic matrices have operator norm at most one (leanprover-community#28453)
  chore(Topology/Compactification): deprecate duplicate `ultrafilter_pure_injective` (leanprover-community#28436)
  feat: add `@[simp]` to `Multiset.cons_le_cons` and `Finset.insert_subset_insert` (leanprover-community#28285)
  feat: make `ring` work for semifields (leanprover-community#28494)
  feat: filtering lists and bounded quantifiers are primitive recursive (leanprover-community#26295)
  chore(Analysis/Analytic): split `Analytic.Basic` (leanprover-community#26270)
  refactor: tidy `mulVec` and `vecMul` lemmas about `•` (leanprover-community#28450)
  feat(Order/WellFounded): Acc and infinite descending chain (leanprover-community#28120)
  feat(NumberTheory/Padics): {Int,Rat}.padicValuation (leanprover-community#27667)
  chore(*): address a few timeout-related porting notes (leanprover-community#28483)
  feat(Algebra): toAlgebra_algebraMap (leanprover-community#28238)
  feat(Shrink): `IsCancelMul` instance (leanprover-community#28407)
  chore(Geometry): golf entire `chart_eq'` and `orthogonalProjection_orthogonalProjection` (leanprover-community#28485)
  feat: shifted geometric series and a `ProbabilityMeasure` version of `measure_iUnion_le` (leanprover-community#28087)
  chore(LinearAlgebra/PiTensorProduct): `rw` away use of `erw` in `lifts_zero` (leanprover-community#27554)
  feat(RingTheory): faithfully flat ring maps (leanprover-community#24530)
  chore(Geometry/RingedSpace): remove use of `erw` in `stalkSpecializes_stalkMap` (leanprover-community#27656)
  chore: add the Brownian motion project to downstream_repos.yml (leanprover-community#28459)
  feat(CategoryTheory/Sites/SheafOfTypes): composition of a sheaf with uliftFunctor is still a sheaf (leanprover-community#27816)
  feat(Valuation/DiscreteValuationRel): val relations with compatible valuations to Zm0 are IsDiscrete (leanprover-community#27213)
  chore(*): process a bunch of `aesop`-related porting notes (leanprover-community#28402)
  feat(CategoryTheory): abstract argument for the stability under transfinite compositions (leanprover-community#26030)
  chore: bump toolchain to v4.23.0-rc2 (leanprover-community#28454)
  chore(FieldTheory/Finite): fermat's little theorem in Nat form (leanprover-community#27962)
  feat(Combinatorics/SimpleGraph/Paths): add theorem `SimpleGraph.Walk.IsPath.concat` (leanprover-community#27582)
  feat(Slope): slope_pos_iff_of_le and related lemmas (leanprover-community#28039)
  feat: tactic analysis framework (leanprover-community#26683)
  chore(Data/EReal): deprecate `add_pos_of_nonneg_of_pos` and `add_ne_top_iff_of_ne_bot` (duplicates) (leanprover-community#28424)
  feat(MathlibTest/FieldSimp): add a few more tests (leanprover-community#28413)
  chore(RingTheory/HahnSeries): deprecate duplicate `orderTop_add_orderTop_le_orderTop_mul` (leanprover-community#28231)
  chore(AlgebraicGeometry/IdealSheaf): deprecate duplicate `AlgebraicGeometry.Scheme.IdealSheafData.Scheme.zeroLocus_radical` (leanprover-community#28202)
  feat(Algebra/Order): ArchimedeanClass ball (leanprover-community#27885)
  chore(Geometry/RingedSpace): remove use of `erw` in `isUnit_of_isUnit_germ` (leanprover-community#27660)
  feat(SkewMonoidAlgebra): coeff_mul lemmas (leanprover-community#27255)
  chore(LinearAlgebra): golf entire `isUnit_det` (leanprover-community#28438)
  chore(FieldTheory/IntermediateField): golf entire `coe_sum` and `coe_prod` (leanprover-community#28431)
  feat: separate linter error message for empty doc-strings (leanprover-community#27895)
  feat(RingTheory/PowerSeries/Binomial): add basic lemmas, golf (leanprover-community#27497)
  ...
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).
mathlib-bors bot pushed a commit that referenced this pull request Sep 1, 2025
This continues #27885 and promotes `ArchimedeanClass.addSubgroup` to a submodule. Balls are promoted to submodules with shorter names `ball` and `closedBall`, as they will be used a lot in the proof of Hahn embedding theorem (if you don't agree with this I can rename them to `ballSubmodule` and `closedBallSubmodule`)
mathlib-bors bot pushed a commit that referenced this pull request Sep 1, 2025
This continues #27885 and promotes `ArchimedeanClass.addSubgroup` to a submodule. Balls are promoted to submodules with shorter names `ball` and `closedBall`, as they will be used a lot in the proof of Hahn embedding theorem (if you don't agree with this I can rename them to `ballSubmodule` and `closedBallSubmodule`)
mathlib-bors bot pushed a commit that referenced this pull request Sep 1, 2025
This continues #27885 and promotes `ArchimedeanClass.addSubgroup` to a submodule. Balls are promoted to submodules with shorter names `ball` and `closedBall`, as they will be used a lot in the proof of Hahn embedding theorem (if you don't agree with this I can rename them to `ballSubmodule` and `closedBallSubmodule`)
@wwylele wwylele deleted the wwylele-hahn-ball branch September 2, 2025 01:31
CBirkbeck pushed a commit to CBirkbeck/mathlib4 that referenced this pull request Sep 8, 2025
…munity#28449)

This continues leanprover-community#27885 and promotes `ArchimedeanClass.addSubgroup` to a submodule. Balls are promoted to submodules with shorter names `ball` and `closedBall`, as they will be used a lot in the proof of Hahn embedding theorem (if you don't agree with this I can rename them to `ballSubmodule` and `closedBallSubmodule`)
yuanyi-350 pushed a commit to yuanyi-350/yuanyi_mathlib4 that referenced this pull request Sep 10, 2025
…munity#28449)

This continues leanprover-community#27885 and promotes `ArchimedeanClass.addSubgroup` to a submodule. Balls are promoted to submodules with shorter names `ball` and `closedBall`, as they will be used a lot in the proof of Hahn embedding theorem (if you don't agree with this I can rename them to `ballSubmodule` and `closedBallSubmodule`)
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Oct 2, 2025
…munity#28449)

This continues leanprover-community#27885 and promotes `ArchimedeanClass.addSubgroup` to a submodule. Balls are promoted to submodules with shorter names `ball` and `closedBall`, as they will be used a lot in the proof of Hahn embedding theorem (if you don't agree with this I can rename them to `ballSubmodule` and `closedBallSubmodule`)
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). large-import Automatically added label for PRs with a significant increase in transitive imports 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.

4 participants