Skip to content

[Merged by Bors] - feat(Geometry/Convex): star-convex sets in a convex space#40230

Closed
YaelDillies wants to merge 10 commits into
leanprover-community:masterfrom
YaelDillies:star_convex
Closed

[Merged by Bors] - feat(Geometry/Convex): star-convex sets in a convex space#40230
YaelDillies wants to merge 10 commits into
leanprover-community:masterfrom
YaelDillies:star_convex

Conversation

@YaelDillies
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies commented Jun 4, 2026

Define IsStarConvexSet,a predicate for a set in a ConvexSpace to be star-convex at a point. Add a few lemmas about IsAffineMap as preliminaries to lemmas about star-convex sets in a module.

The existing Module-specific StarConvex predicate will be deprecated in a future PR.


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

PR summary 65ca858de0

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Analysis.Convex.MetricSpace Mathlib.Geometry.Convex.ConvexSpace.Module 1
Mathlib.Geometry.Convex.Star (new file) 876

Declarations diff (regex)

+ IsAffineMap.add
+ IsAffineMap.map_smul_add_smul
+ IsAffineMap.map_sum_weights
+ IsAffineMap.neg
+ IsAffineMap.sub
+ IsConvexSet.isStarConvexSet
+ IsStarConvexSet
+ IsStarConvexSet.add
+ IsStarConvexSet.empty
+ IsStarConvexSet.iInter
+ IsStarConvexSet.iInter₂
+ IsStarConvexSet.iUnion
+ IsStarConvexSet.iUnion₂
+ IsStarConvexSet.image
+ IsStarConvexSet.inter
+ IsStarConvexSet.mem
+ IsStarConvexSet.neg
+ IsStarConvexSet.pi
+ IsStarConvexSet.preimage
+ IsStarConvexSet.prod
+ IsStarConvexSet.sInter
+ IsStarConvexSet.sUnion
+ IsStarConvexSet.singleton
+ IsStarConvexSet.sub
+ IsStarConvexSet.union
+ IsStarConvexSet.univ
+ instance : IsModuleConvexSpace R (M × N)
- instance [ConvexSpace R N] [IsModuleConvexSpace R N] : IsModuleConvexSpace R (M × N)

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

Lean-aware diff — post-build, computed from the Lean environment (commit 65ca858).

  • +29 new declarations
  • −0 removed declarations
+Convexity.IsAffineMap.add
+Convexity.IsAffineMap.fun_add
+Convexity.IsAffineMap.fun_neg
+Convexity.IsAffineMap.fun_sub
+Convexity.IsAffineMap.map_smul_add_smul
+Convexity.IsAffineMap.map_sum_weights
+Convexity.IsAffineMap.neg
+Convexity.IsAffineMap.sub
+Convexity.IsConvexSet.isStarConvexSet
+Convexity.IsStarConvexSet
+Convexity.IsStarConvexSet.add
+Convexity.IsStarConvexSet.empty
+Convexity.IsStarConvexSet.iInter
+Convexity.IsStarConvexSet.iInter₂
+Convexity.IsStarConvexSet.iUnion
+Convexity.IsStarConvexSet.iUnion₂
+Convexity.IsStarConvexSet.image
+Convexity.IsStarConvexSet.inter
+Convexity.IsStarConvexSet.mem
+Convexity.IsStarConvexSet.neg
+Convexity.IsStarConvexSet.pi
+Convexity.IsStarConvexSet.preimage
+Convexity.IsStarConvexSet.prod
+Convexity.IsStarConvexSet.sInter
+Convexity.IsStarConvexSet.sUnion
+Convexity.IsStarConvexSet.singleton
+Convexity.IsStarConvexSet.sub
+Convexity.IsStarConvexSet.union
+Convexity.IsStarConvexSet.univ

No changes to strong technical debt.

No changes to weak technical debt.

Current commit 65ca858de0
Reference commit bb482f116b

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/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).

@github-actions github-actions Bot added the t-convex-geometry Affine geometry, cones, simplices label Jun 4, 2026
Copy link
Copy Markdown
Contributor

@b-mehta b-mehta left a comment

Choose a reason for hiding this comment

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

We already have StarConvex but I'm guessing this is in greater generality? It would be nice to

  • mention this in the docstring, and explain why we have two (perhaps this is temporary)
  • have some link between them

@YaelDillies YaelDillies temporarily deployed to cache-upload-forks June 4, 2026 16:52 — with GitHub Actions Inactive
Copy link
Copy Markdown
Contributor

@b-mehta b-mehta left a comment

Choose a reason for hiding this comment

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

Looks generally nice!

Comment thread Mathlib/Geometry/Convex/Star.lean Outdated
Comment thread Mathlib/Geometry/Convex/Star.lean
Comment thread Mathlib/Geometry/Convex/Star.lean
Comment thread Mathlib/Geometry/Convex/Star.lean
Comment thread Mathlib/Geometry/Convex/Star.lean
Comment thread Mathlib/Geometry/Convex/Star.lean
Comment thread Mathlib/Geometry/Convex/Star.lean Outdated
@YaelDillies YaelDillies temporarily deployed to cache-upload-forks June 4, 2026 17:25 — with GitHub Actions Inactive
@b-mehta b-mehta added the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 4, 2026
@YaelDillies YaelDillies removed the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 4, 2026
@b-mehta
Copy link
Copy Markdown
Contributor

b-mehta commented Jun 4, 2026

It looks like your new changes do a bunch of things unrelated to star-convexity. And these changes aren't in the PR description.
Was this accidental?

@YaelDillies YaelDillies temporarily deployed to cache-upload-forks June 4, 2026 17:52 — with GitHub Actions Inactive
@b-mehta b-mehta added the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 4, 2026
@YaelDillies
Copy link
Copy Markdown
Contributor Author

I have added more lemmas about star-convexity I realised I needed in order to deprecate the StarConvex API, as well as required preliminary lemmas

@YaelDillies YaelDillies removed the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 4, 2026
Comment thread Mathlib/Geometry/Convex/Star.lean
@b-mehta
Copy link
Copy Markdown
Contributor

b-mehta commented Jun 4, 2026

I have added more lemmas about star-convexity I realised I needed in order to deprecate the StarConvex API, as well as required preliminary lemmas

I'm not sure I follow. Lemmas like IsAffineMap.add aren't about StarConvex, nor is it required for any of the other things in this PR, so it seems to fit into neither of these categories. In addition, these unrelated changes aren't in your PR description, and both points of my comment above are still outstanding. So I will put this back to awaiting-author, until these three are addressed!

@b-mehta b-mehta added the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 4, 2026
@YaelDillies
Copy link
Copy Markdown
Contributor Author

@YaelDillies YaelDillies removed the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 4, 2026
@YaelDillies
Copy link
Copy Markdown
Contributor Author

  • have some link between them

This will wait until #40235 if you don't mind.

Copy link
Copy Markdown
Contributor

@b-mehta b-mehta left a comment

Choose a reason for hiding this comment

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

Thanks!

bors merge

@mathlib-triage mathlib-triage Bot added the ready-to-merge This PR has been sent to bors. label Jun 4, 2026
@YaelDillies YaelDillies temporarily deployed to cache-upload-forks June 4, 2026 18:20 — with GitHub Actions Inactive
mathlib-bors Bot pushed a commit that referenced this pull request Jun 4, 2026
Define `IsStarConvexSet`,a predicate for a set in a `ConvexSpace` to be star-convex at a point. Add a few lemmas about `IsAffineMap` as preliminaries to lemmas about star-convex sets in a module.

The existing `Module`-specific `StarConvex` predicate will be deprecated in a future PR.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors Bot commented Jun 4, 2026

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat(Geometry/Convex): star-convex sets in a convex space [Merged by Bors] - feat(Geometry/Convex): star-convex sets in a convex space Jun 4, 2026
@mathlib-bors mathlib-bors Bot closed this Jun 4, 2026
@YaelDillies YaelDillies deleted the star_convex branch June 4, 2026 19:03
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-convex-geometry Affine geometry, cones, simplices

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants