Skip to content

feat(Analysis): StdSimplex is a MetricSpace#40176

Open
YaelDillies wants to merge 4 commits into
leanprover-community:masterfrom
YaelDillies:std_simplex_metric_space
Open

feat(Analysis): StdSimplex is a MetricSpace#40176
YaelDillies wants to merge 4 commits into
leanprover-community:masterfrom
YaelDillies:std_simplex_metric_space

Conversation

@YaelDillies
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies commented Jun 3, 2026

Endow the standard simplex over a metric space with the L^1 metric.


Open in Gitpod

@YaelDillies YaelDillies added WIP Work in progress t-analysis Analysis (normed *, calculus) labels Jun 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

PR summary e5840abad2

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Data.NNReal.Basic 927 940 +13 (+1.40%)
Mathlib.Data.ENNReal.BigOperators 936 949 +13 (+1.39%)
Mathlib.Topology.Algebra.InfiniteSum.ENNReal 1317 1323 +6 (+0.46%)
Mathlib.Analysis.Convex.MetricSpace 1493 1499 +6 (+0.40%)
Import changes for all files
Files Import difference
76 files Mathlib.Algebra.Order.Archimedean.Real.Hom Mathlib.Algebra.Order.Star.Real Mathlib.Algebra.Star.CHSH Mathlib.Analysis.Asymptotics.Defs Mathlib.Analysis.BoxIntegral.Box.Basic Mathlib.Analysis.BoxIntegral.Partition.Basic Mathlib.Analysis.BoxIntegral.Partition.Split Mathlib.Analysis.BoxIntegral.Partition.Tagged Mathlib.Analysis.Calculus.TangentCone.Basic Mathlib.Analysis.Calculus.TangentCone.Defs Mathlib.Analysis.Calculus.TangentCone.Prod Mathlib.Analysis.Complex.Exponential Mathlib.Analysis.Complex.Norm Mathlib.Analysis.Complex.Order Mathlib.Analysis.Complex.Trigonometric Mathlib.Analysis.Convex.MetricSpace Mathlib.Analysis.Normed.Field.Basic Mathlib.Analysis.Normed.Field.TransferInstance Mathlib.Analysis.Normed.Group.AddTorsor Mathlib.Analysis.Normed.Group.Basic Mathlib.Analysis.Normed.Group.Bounded Mathlib.Analysis.Normed.Group.CocompactMap Mathlib.Analysis.Normed.Group.Constructions Mathlib.Analysis.Normed.Group.Continuity Mathlib.Analysis.Normed.Group.Indicator Mathlib.Analysis.Normed.Group.Int Mathlib.Analysis.Normed.Group.Rat Mathlib.Analysis.Normed.Group.Real Mathlib.Analysis.Normed.Group.Subgroup Mathlib.Analysis.Normed.Group.Submodule Mathlib.Analysis.Normed.Module.ENormedSpace Mathlib.Analysis.Normed.Module.MStructure Mathlib.Analysis.Normed.Order.Basic Mathlib.Analysis.Normed.Order.Hom.Basic Mathlib.Analysis.Normed.Order.Hom.Ultra Mathlib.Analysis.Normed.Ring.Basic Mathlib.Analysis.Normed.Ring.Finite Mathlib.Analysis.Normed.Ring.TransferInstance Mathlib.Analysis.Normed.Ring.WithAbs Mathlib.Analysis.NormedSpace.Alternating.Basic Mathlib.Analysis.NormedSpace.Alternating.Curry Mathlib.Analysis.NormedSpace.Alternating.Uncurry.Fin Mathlib.Analysis.NormedSpace.Connected Mathlib.Analysis.NormedSpace.ENormedSpace Mathlib.Analysis.NormedSpace.Extr Mathlib.Analysis.NormedSpace.MStructure Mathlib.Analysis.NormedSpace.Multilinear.Basic Mathlib.Analysis.NormedSpace.Multilinear.Curry Mathlib.Analysis.NormedSpace.Normalize Mathlib.Analysis.NormedSpace.PiTensorProduct.InjectiveSeminorm Mathlib.Analysis.NormedSpace.PiTensorProduct.ProjectiveSeminorm Mathlib.Analysis.NormedSpace.RieszLemma Mathlib.Analysis.Rat.NatSqrt.Real Mathlib.Analysis.Real.Sqrt Mathlib.Analysis.SpecialFunctions.Log.ERealExp Mathlib.Analysis.SumOverResidueClass Mathlib.Data.Real.CompleteField Mathlib.InformationTheory.Hamming Mathlib.MeasureTheory.OuterMeasure.AE Mathlib.MeasureTheory.OuterMeasure.Basic Mathlib.MeasureTheory.OuterMeasure.BorelCantelli Mathlib.MeasureTheory.OuterMeasure.Operations Mathlib.Tactic.NormNum.RealSqrt Mathlib.Topology.Algebra.InfiniteSum.ENNReal Mathlib.Topology.Algebra.InfiniteSum.Field Mathlib.Topology.Algebra.InfiniteSum.Real Mathlib.Topology.Compactness.HilbertCubeEmbedding Mathlib.Topology.EMetricSpace.BoundedVariation Mathlib.Topology.Instances.ENNReal.ENatENNReal Mathlib.Topology.Instances.ENNReal.Lemmas Mathlib.Topology.Instances.EReal.Lemmas Mathlib.Topology.Instances.NNReal.Lemmas Mathlib.Topology.MetricSpace.CauSeqFilter Mathlib.Topology.Metrizable.CompletelyMetrizable Mathlib.Topology.Semicontinuity.Basic Mathlib.Topology.Semicontinuity.Lindelof
6
4 files Mathlib.Algebra.Order.Floor.Extended Mathlib.Data.ENNReal.BigOperators Mathlib.Data.NNReal.Basic Mathlib.Topology.Metrizable.Uniformity
13
Mathlib.Topology.MetricSpace.Finsupp (new file) 1116

Declarations diff

+ instance [EMetricSpace R] : EMetricSpace (StdSimplex R I)
+ instance [EMetricSpace X] : EMetricSpace (ι →₀ X)
+ instance [MetricSpace R] : MetricSpace (StdSimplex R I)
+ instance [MetricSpace X] : MetricSpace (ι →₀ X)
+ instance [PseudoEMetricSpace R] : PseudoEMetricSpace (StdSimplex R I)
+ instance [PseudoEMetricSpace X] : PseudoEMetricSpace (ι →₀ X)
+ instance [PseudoMetricSpace R] : PseudoMetricSpace (StdSimplex R I)
+ instance [PseudoMetricSpace X] : PseudoMetricSpace (ι →₀ X)
+ ofNNReal_finsetProd
+ ofNNReal_finsetSum
+ ofNNReal_finsuppProd
+ ofNNReal_finsuppSum
+ toReal_finsuppProd
+ toReal_finsuppSum
+ weights_injective
++ dist_def
++ edist_def
++ nndist_def

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.


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

Current commit e5840abad2
Reference commit e577c1669e

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

Also fix the variable implicitness and and names of a few existing declarations.

Renames:
* `coe_finsetSum` to `ofNNReal_finsetSum`
* `coe_finsetProd` to `ofNNReal_finsetProd`
@YaelDillies YaelDillies force-pushed the std_simplex_metric_space branch from 9c51b4c to d2d9164 Compare June 4, 2026 07:49
@YaelDillies YaelDillies added blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) and removed WIP Work in progress labels Jun 4, 2026
@YaelDillies YaelDillies temporarily deployed to cache-upload-forks June 4, 2026 08:20 — with GitHub Actions Inactive
@YaelDillies YaelDillies force-pushed the std_simplex_metric_space branch from d2d9164 to e5840ab Compare June 4, 2026 08:51
@mathlib-dependent-issues
Copy link
Copy Markdown

This PR/issue depends on:

@YaelDillies YaelDillies temporarily deployed to cache-upload-forks June 4, 2026 09:12 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) t-analysis Analysis (normed *, calculus)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant