Skip to content

[Merged by Bors] - refactor(Analysis/LocallyConvex/AbsConvex): Redefine AbsConvex to use a single ring of scalars#29342

Closed
mans0954 wants to merge 30 commits intoleanprover-community:masterfrom
mans0954:absconvex-refactor
Closed

[Merged by Bors] - refactor(Analysis/LocallyConvex/AbsConvex): Redefine AbsConvex to use a single ring of scalars#29342
mans0954 wants to merge 30 commits intoleanprover-community:masterfrom
mans0954:absconvex-refactor

Conversation

@mans0954
Copy link
Copy Markdown
Collaborator

@mans0954 mans0954 commented Sep 4, 2025

Currently the definition of Absolutely Convex in Mathlib is a little unexpected:

def AbsConvex (s : Set E) : Prop := Balanced 𝕜 s ∧ Convex ℝ s

At the time this definition was formulated, Mathlib's definition of Convex required the scalars to be an OrderedSemiring whereas the definition of Balanced required the scalars to be a SeminormedRing. Mathlib didn't have a concept of a semi-normed ordered ring, so a set was defined as AbsConvex if it is balanced over a SeminormedRing 𝕜 and convex over .

Recently the requirements for the definition of Convex have been relaxed (#24392, #20595) so it is now possible to use a single scalar ring in common with the literature.

Previous discussion:


Open in Gitpod

@mans0954 mans0954 added the WIP Work in progress label Sep 4, 2025
@github-actions github-actions bot added t-analysis Analysis (normed *, calculus) large-import Automatically added label for PRs with a significant increase in transitive imports labels Sep 4, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 4, 2025

PR summary 724a6cb9d7

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

No declarations were harmed in the making of this PR! 🐙

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 Sep 4, 2025
@mans0954 mans0954 marked this pull request as ready for review September 4, 2025 11:25
@mans0954 mans0954 removed the WIP Work in progress label Sep 4, 2025
@github-actions github-actions bot removed the large-import Automatically added label for PRs with a significant increase in transitive imports label Sep 6, 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 Oct 2, 2025
@mathlib4-dependent-issues-bot
Copy link
Copy Markdown
Collaborator

Comment on lines +85 to +86
open ComplexOrder

Copy link
Copy Markdown
Contributor

@j-loreaux j-loreaux Oct 6, 2025

Choose a reason for hiding this comment

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

I'd venture that this is the most controversial part of this PR. I think this PR is a good change, but in the past many people have been resistant to letting (and hence also RCLike 𝕜) have a PartialOrder instance.

Suggested change
open ComplexOrder
open scoped ComplexOrder

I think this PR likely warrants a Zulip discussion.

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.

@j-loreaux
Copy link
Copy Markdown
Contributor

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Oct 14, 2025
mathlib-bors bot pushed a commit that referenced this pull request Oct 14, 2025
… a single ring of scalars (#29342)

Currently the definition of Absolutely Convex in Mathlib is a little unexpected:
```
def AbsConvex (s : Set E) : Prop := Balanced 𝕜 s ∧ Convex ℝ s
```
At the time this definition was formulated, Mathlib's definition of `Convex` required the scalars to be an `OrderedSemiring` whereas the definition of `Balanced` required the scalars to be a `SeminormedRing`. Mathlib didn't  have a concept of a semi-normed ordered ring, so a set was defined as `AbsConvex` if it is balanced over a `SeminormedRing` `𝕜` and convex over `ℝ`.

Recently the requirements for the definition of `Convex` have been relaxed (#24392, #20595) so it is now possible to use a single scalar ring in common with the literature.

Previous discussion:

- #17029 (comment)
- #26345 (comment)
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Oct 14, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title refactor(Analysis/LocallyConvex/AbsConvex): Redefine AbsConvex to use a single ring of scalars [Merged by Bors] - refactor(Analysis/LocallyConvex/AbsConvex): Redefine AbsConvex to use a single ring of scalars Oct 14, 2025
@mathlib-bors mathlib-bors bot closed this Oct 14, 2025
Jlh18 pushed a commit to Jlh18/mathlib4 that referenced this pull request Oct 24, 2025
… a single ring of scalars (leanprover-community#29342)

Currently the definition of Absolutely Convex in Mathlib is a little unexpected:
```
def AbsConvex (s : Set E) : Prop := Balanced 𝕜 s ∧ Convex ℝ s
```
At the time this definition was formulated, Mathlib's definition of `Convex` required the scalars to be an `OrderedSemiring` whereas the definition of `Balanced` required the scalars to be a `SeminormedRing`. Mathlib didn't  have a concept of a semi-normed ordered ring, so a set was defined as `AbsConvex` if it is balanced over a `SeminormedRing` `𝕜` and convex over `ℝ`.

Recently the requirements for the definition of `Convex` have been relaxed (leanprover-community#24392, leanprover-community#20595) so it is now possible to use a single scalar ring in common with the literature.

Previous discussion:

- leanprover-community#17029 (comment)
- leanprover-community#26345 (comment)
BeibeiX0 pushed a commit to BeibeiX0/mathlib4 that referenced this pull request Nov 7, 2025
… a single ring of scalars (leanprover-community#29342)

Currently the definition of Absolutely Convex in Mathlib is a little unexpected:
```
def AbsConvex (s : Set E) : Prop := Balanced 𝕜 s ∧ Convex ℝ s
```
At the time this definition was formulated, Mathlib's definition of `Convex` required the scalars to be an `OrderedSemiring` whereas the definition of `Balanced` required the scalars to be a `SeminormedRing`. Mathlib didn't  have a concept of a semi-normed ordered ring, so a set was defined as `AbsConvex` if it is balanced over a `SeminormedRing` `𝕜` and convex over `ℝ`.

Recently the requirements for the definition of `Convex` have been relaxed (leanprover-community#24392, leanprover-community#20595) so it is now possible to use a single scalar ring in common with the literature.

Previous discussion:

- leanprover-community#17029 (comment)
- leanprover-community#26345 (comment)
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-analysis Analysis (normed *, calculus)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants