Skip to content

feat(RingTheory/Valuation): define ball, closed ball, and sphere#27451

Open
kckennylau wants to merge 1 commit intoleanprover-community:masterfrom
kckennylau:valuation-ball
Open

feat(RingTheory/Valuation): define ball, closed ball, and sphere#27451
kckennylau wants to merge 1 commit intoleanprover-community:masterfrom
kckennylau:valuation-ball

Conversation

@kckennylau
Copy link
Copy Markdown
Collaborator

From the 2025 Local Class Field Theory Workshop.


Open in Gitpod

@kckennylau kckennylau requested review from erdOne and pechersky July 25, 2025 00:20
@github-actions github-actions bot added the t-algebra Algebra (groups, rings, fields, etc) label Jul 25, 2025
@github-actions
Copy link
Copy Markdown

PR summary 962b24680e

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ ball
+ closedBall
+ mem_ball_iff
+ mem_closedBall_iff
+ mem_sphere_iff
+ sphere

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

@pechersky
Copy link
Copy Markdown
Contributor

Should this be abbrevs? Do we want to go through and refactor the Valued files to use these?

@JovanGerb
Copy link
Copy Markdown
Contributor

I think they should be defs, just like the Metric variants.

@wwylele
Copy link
Copy Markdown
Collaborator

wwylele commented Aug 1, 2025

Do these naturally carry algebraic structures that we should define right away? Are they subrings?

@JovanGerb
Copy link
Copy Markdown
Contributor

The open and closed balls are closed under addition, but if the radius is too big they are not closed under multiplication. So I guess they can be of type AddSubgroup R instead of Set R.

@JovanGerb
Copy link
Copy Markdown
Contributor

Moreover, they could be a Submodule v.integer R. But then it would have to be defined in Ringtheory/Valuation/Integers.lean

@pechersky
Copy link
Copy Markdown
Contributor

pechersky commented Aug 1, 2025

We already have https://leanprover-community.github.io/mathlib4_docs/Mathlib/RingTheory/Valuation/Basic.html#Valuation.ltAddSubgroup, and in #26829, I define the le, ideal, and submodule versions.

@JovanGerb
Copy link
Copy Markdown
Contributor

Interesting. Then I would think that ltSubmodule/leSubmodule can be used instead of ball/closedBall. Maybe then ltSubmodule/leSubmodule could be renamed to ball/closedBall`?

@grunweg grunweg added t-ring-theory Ring theory and removed t-algebra Algebra (groups, rings, fields, etc) labels Aug 4, 2025
@kckennylau
Copy link
Copy Markdown
Collaborator Author

kckennylau commented Aug 5, 2025

@JovanGerb the ball doesn't contain 0 if the radius is 0, so ball doesn't come with any structure, but for closedBall, as @pechersky demonstrated, it is naturally an AddSubgroup (as well as Submodule 𝓞 R).

So maybe the name closedBall can be reserved for the Submodule 𝓞 R?

@kckennylau
Copy link
Copy Markdown
Collaborator Author

@adamtopaz What do you think the correct thing to do is? To summarise,

  • ball = { x | v x < r } naturally comes with the structure of open set
  • closedBall = { x | v x ≤ r } naturally comes with the structure of closed set, AddSubgroup R, and Submodule 𝓞 R.
  • sphere = { x | v x = r } naturally comes with the structure of closed set, and SubMulAction 𝒪ˣ R (???).

And I'm asking whether these names (ball, closedBall, sphere) should be bundled with one of the natural structures above.

@kckennylau
Copy link
Copy Markdown
Collaborator Author

In private conversations we are now exploring an alternative route via UniformSpace.ball.

@kckennylau
Copy link
Copy Markdown
Collaborator Author

I have now made an alternative #27987 for people to decide which one is better.

@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 11, 2025
@mathlib4-merge-conflict-bot
Copy link
Copy Markdown
Collaborator

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

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).
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) t-ring-theory Ring theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants