Skip to content

[Merged by Bors] - feat(Geometry): the standard simplex is compact - #43202

Closed
joelriou wants to merge 5 commits into
leanprover-community:masterfrom
joelriou:stdsimplex-compact
Closed

joelriou wants to merge 5 commits into
leanprover-community:masterfrom
joelriou:stdsimplex-compact

Conversation

@joelriou

@joelriou joelriou commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

This PR expands the API for StdSimplex. It is shown that the 1-dimensional standard simplex identifies to an interval, and under suitable assumptions on R, StdSimplex R M is compact when M is finite. (This was obviously known for stdSimplex which will be deprecated in #42181.)


Open in Gitpod

@joelriou joelriou added the t-convex-geometry Affine geometry, cones, simplices label Aug 29, 2026
@github-actions github-actions Bot added the large-import Automatically added label for PRs with a significant increase in transitive imports label Aug 29, 2026
@github-actions

github-actions Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

PR summary 221a49dbb9

Import changes exceeding 2%

% File
+4.65% Mathlib.Geometry.Convex.ConvexSpace.Defs

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Geometry.Convex.ConvexSpace.Defs 881 922 +41 (+4.65%)
Import changes for all files
Files Import difference
Mathlib.Analysis.Convex.MetricSpace 2
Mathlib.Geometry.Convex.ConvexSpace.AffineSpace Mathlib.Geometry.Convex.ConvexSpace.Topology 7
7 files Mathlib.Geometry.Convex.ConvexSpace.AffineMap Mathlib.Geometry.Convex.ConvexSpace.Defs Mathlib.Geometry.Convex.ConvexSpace.Module Mathlib.Geometry.Convex.ConvexSpace.Prod Mathlib.Geometry.Convex.Hull Mathlib.Geometry.Convex.Set Mathlib.Geometry.Convex.Star
41
Mathlib.Geometry.Convex.ConvexSpace.CompactSpaceStdSimplex (new file) 1323

Declarations diff (regex)

+ compactSpace
+ diam_range_toFun_comp_weights_subset_closedBall
+ diam_range_toFun_comp_weights_subset_closedBall_eq_one
+ diam_range_toFun_comp_weights_subset_closedBall_eq_zero
+ equivIcc
+ equivIcc_single_one
+ equivIcc_single_zero
+ equivIcc_symm_one
+ equivIcc_symm_zero
+ iConvexComb_single
+ instance [Inhabited M] : Inhabited (StdSimplex R M)
+ instance [Nonempty M] : Nonempty (StdSimplex R M)
+ instance [Nontrivial M] : Nontrivial (StdSimplex R M) := by
+ instance [Subsingleton M] : Subsingleton (StdSimplex R M)
+ instance [Unique M] : Unique (StdSimplex R M)
+ isBounded_range_toFun_comp_weights
+ range_toFun_comp_weights_subset_closedBall
+ sConvexComb_map_iConvexComb
+ single_injective
+ total_fin_two
+ weights_apply_eq_one
+ weights_apply_le_one

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

  • +25 new declarations
  • −0 removed declarations
+Convexity.StdSimplex.compactSpace
+Convexity.StdSimplex.diam_range_toFun_comp_weights_subset_closedBall
+Convexity.StdSimplex.diam_range_toFun_comp_weights_subset_closedBall_eq_one
+Convexity.StdSimplex.diam_range_toFun_comp_weights_subset_closedBall_eq_zero
+Convexity.StdSimplex.equivIcc
+Convexity.StdSimplex.equivIcc.congr_simp
+Convexity.StdSimplex.equivIcc_apply_coe
+Convexity.StdSimplex.equivIcc_single_one
+Convexity.StdSimplex.equivIcc_single_zero
+Convexity.StdSimplex.equivIcc_symm_apply
+Convexity.StdSimplex.equivIcc_symm_one
+Convexity.StdSimplex.equivIcc_symm_zero
+Convexity.StdSimplex.iConvexComb_single
+Convexity.StdSimplex.instInhabited
+Convexity.StdSimplex.instNonempty
+Convexity.StdSimplex.instNontrivial
+Convexity.StdSimplex.instSubsingleton
+Convexity.StdSimplex.instUnique
+Convexity.StdSimplex.isBounded_range_toFun_comp_weights
+Convexity.StdSimplex.range_toFun_comp_weights_subset_closedBall
+Convexity.StdSimplex.single_injective
+Convexity.StdSimplex.total_fin_two
+Convexity.StdSimplex.weights_apply_eq_one
+Convexity.StdSimplex.weights_apply_le_one
+Convexity.sConvexComb_map_iConvexComb

No changes to strong technical debt.
No changes to weak technical debt.

Current commit 221a49dbb9
Reference commit bbcd1968ee

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

@jcommelin jcommelin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks 🎉

bors merge

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Aug 31, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Aug 31, 2026
This PR expands the API for `StdSimplex`. It is shown that the `1`-dimensional standard simplex identifies to an interval, and under suitable assumptions on `R`, `StdSimplex R M` is compact when `M` is finite. (This was obviously known for `stdSimplex` which will be deprecated in #42181.)
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Aug 31, 2026
@mathlib-bors

mathlib-bors Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat(Geometry): the standard simplex is compact [Merged by Bors] - feat(Geometry): the standard simplex is compact Aug 31, 2026
@mathlib-bors mathlib-bors Bot closed this Aug 31, 2026
joelriou added a commit to joelriou/mathlib4 that referenced this pull request Sep 5, 2026
…#43202)

This PR expands the API for `StdSimplex`. It is shown that the `1`-dimensional standard simplex identifies to an interval, and under suitable assumptions on `R`, `StdSimplex R M` is compact when `M` is finite. (This was obviously known for `stdSimplex` which will be deprecated in leanprover-community#42181.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bors-staging This PR is currently being built by bors on the staging branch. 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-convex-geometry Affine geometry, cones, simplices

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants