Repository navigation
feat(Analysis): StdSimplex is a MetricSpace - #40176
YaelDillies wants to merge 2 commits into
Conversation
PR summary 9c3916f568Import changes exceeding 2%
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.Analysis.Convex.MetricSpace | 1552 | 1851 | +299 (+19.27%) |
Import changes for all files
| Files | Import difference |
|---|---|
Mathlib.Analysis.Convex.MetricSpace |
299 |
Declarations diff (regex)
+ dist_def
+ edist_def
+ instMetricSpace
+ instPseudoMetricSpace
+ instance [MetricSpace R] : MetricSpace (StdSimplex R I)
+ instance [PseudoMetricSpace R] : PseudoMetricSpace (StdSimplex R I)
+ nndist_def
+ nndist_induced
+ weights_injective
++ instEMetricSpace
++ instPseudoEMetricSpace
- instance [EMetricSpace X] : EMetricSpace (WithLp p <| ι →₀ X)
- instance [MetricSpace X] : MetricSpace (WithLp p <| ι →₀ X)
- instance [PseudoEMetricSpace X] : PseudoEMetricSpace (WithLp p <| ι →₀ X)
- instance [PseudoMetricSpace X] : PseudoMetricSpace (WithLp p <| ι →₀ X)
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
9c3916f).
- +13 new declarations
- −4 removed declarations
+Convexity.StdSimplex.dist_def
+Convexity.StdSimplex.edist_def
+Convexity.StdSimplex.instEMetricSpace
+Convexity.StdSimplex.instMetricSpace
+Convexity.StdSimplex.instPseudoEMetricSpace
+Convexity.StdSimplex.instPseudoMetricSpace
+Convexity.StdSimplex.nndist_def
+Convexity.StdSimplex.weights_injective
+Finsupp.instEMetricSpace
-Finsupp.instEMetricSpaceWithLpOfNNReal
+Finsupp.instMetricSpace
-Finsupp.instMetricSpaceWithLpOfNNReal
+Finsupp.instPseudoEMetricSpace
-Finsupp.instPseudoEMetricSpaceWithLpOfNNReal
+Finsupp.instPseudoMetricSpace
-Finsupp.instPseudoMetricSpaceWithLpOfNNReal
+nndist_inducedNo changes to strong technical debt.
No changes to weak technical debt.
Current commit 9c3916f568
Reference commit 0f320b07b2
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
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
9c51b4c to
d2d9164
Compare
d2d9164 to
e5840ab
Compare
|
This PR/issue depends on: |
e5840ab to
9c3916f
Compare
j-loreaux
left a comment
There was a problem hiding this comment.
It could be nice to add some characterization of the dist for a few special cases, e.g., dist (single x) (single y) = if x = y then 0 else 2.
| noncomputable instance instPseudoEMetricSpace [PseudoEMetricSpace R] : | ||
| PseudoEMetricSpace (StdSimplex R I) := | ||
| .induced (WithLp.toLp (1 : ℝ≥0) ∘ weights) <| | ||
| have : Fact ((1 : ℝ≥0) ≤ 1) := ⟨le_rfl⟩; inferInstance |
There was a problem hiding this comment.
Somewhere (at least in the PR description and the module documentation, but probably also on this instance itself), there should be a discussion of both what metric is the one equipped for StdSimplex and also why it is the one we should prefer. Surely, this one is natural, but it's worth the documentation.
|
Since Joël is working on barycentric subdivision and this was my only application for this PR, I will close it for now. |
Endow the standard simplex over a metric space with the L^1 metric.