Skip to content

Conversation

mans0954
Copy link
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
Copy link

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
Collaborator

This PR/issue depends on:

Comment on lines 85 to 86
open ComplexOrder

Copy link
Collaborator

@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
Collaborator Author

Choose a reason for hiding this comment

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

mans0954 and others added 2 commits October 6, 2025 21:47
Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>
@j-loreaux
Copy link
Collaborator

bors merge

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot 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
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
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.

4 participants