Skip to content

feat(Topology/EMetricSpace/BoundedVariation): more BoundedVariationOn and eVariationOn API#41519

Open
teorth wants to merge 27 commits into
leanprover-community:masterfrom
teorth:boundedvariation
Open

feat(Topology/EMetricSpace/BoundedVariation): more BoundedVariationOn and eVariationOn API#41519
teorth wants to merge 27 commits into
leanprover-community:masterfrom
teorth:boundedvariation

Conversation

@teorth

@teorth teorth commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Various API for BoundedVariationOn and eVariationOn, including a formula for the eVariationOn for finite sets such as pairs, or the variation of the identity function, or more generally a monotone function.


Note: to obtain the variation formula for finite sets, Data.Finset.Sort was added to the imports.

Open in Gitpod

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

PR summary e74f9ee260

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Topology.EMetricSpace.BoundedVariation 1339 1341 +2 (+0.15%)
Import changes for all files
Files Import difference
4 files Mathlib.Analysis.ConstantSpeed Mathlib.MeasureTheory.VectorMeasure.BoundedVariation Mathlib.Topology.EMetricSpace.BoundedVariation Mathlib.Topology.EMetricSpace.VariationOnFromTo
2

Declarations diff (regex)

+ BoundedVariationOn.id_Icc
+ MonotoneOn.eVariationOn_eq
+ _root_.BoundedVariationOn.of_finite
+ _root_.BoundedVariationOn.of_finset
+ eVariationOn_id
+ eVariationOn_id_Icc
+ image_range_of_monotone
+ pair
+ union'

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

  • +8 new declarations
  • −0 removed declarations
+BoundedVariationOn.id_Icc
+BoundedVariationOn.of_finite
+MonotoneOn.eVariationOn_eq
+eVariationOn.image_range_of_monotone
+eVariationOn.pair
+eVariationOn.union'
+eVariationOn_id
+eVariationOn_id_Icc

No changes to strong technical debt.

No changes to weak technical debt.

Current commit e74f9ee260
Reference commit 69b866d83a

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-topology Topological spaces, uniform spaces, metric spaces, filters label Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

✅ PR Title Formatted Correctly

The title of this PR has been updated to match our commit style conventions.
Thank you!

@teorth teorth changed the title feat(Topology/EMetricSpace/BoundedVariation): More BoundedVariationOn and eVariationOn API feat(Topology/EMetricSpace/BoundedVariation): more BoundedVariationOn and eVariationOn API Jul 9, 2026
@CoolRmal CoolRmal self-assigned this Jul 9, 2026
Comment thread Mathlib/Topology/EMetricSpace/BoundedVariation.lean Outdated
Comment thread Mathlib/Topology/EMetricSpace/BoundedVariation.lean Outdated
Comment thread Mathlib/Topology/EMetricSpace/BoundedVariation.lean Outdated
Comment thread Mathlib/Topology/EMetricSpace/BoundedVariation.lean Outdated
Comment thread Mathlib/Topology/EMetricSpace/BoundedVariation.lean Outdated
Comment thread Mathlib/Topology/EMetricSpace/BoundedVariation.lean Outdated
Comment thread Mathlib/Topology/EMetricSpace/BoundedVariation.lean Outdated
Comment thread Mathlib/Topology/EMetricSpace/BoundedVariation.lean Outdated
Comment thread Mathlib/Topology/EMetricSpace/BoundedVariation.lean Outdated
Comment thread Mathlib/Topology/EMetricSpace/BoundedVariation.lean Outdated
@CoolRmal

CoolRmal commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Most comments are about the coding style and relatively minor. The only major concern I have is MonotoneOn.eVariationOn_eq and theorems dependent on it.

@CoolRmal

CoolRmal commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

awaiting-author

@github-actions github-actions Bot added the awaiting-author A reviewer has asked the author a question or requested changes. label Jul 9, 2026
teorth and others added 15 commits July 9, 2026 10:10
Co-authored-by: Yongxi (Aaron) Lin <97214596+CoolRmal@users.noreply.github.com>
Co-authored-by: Yongxi (Aaron) Lin <97214596+CoolRmal@users.noreply.github.com>
Co-authored-by: Yongxi (Aaron) Lin <97214596+CoolRmal@users.noreply.github.com>
Co-authored-by: Yongxi (Aaron) Lin <97214596+CoolRmal@users.noreply.github.com>
Co-authored-by: Yongxi (Aaron) Lin <97214596+CoolRmal@users.noreply.github.com>
Co-authored-by: Yongxi (Aaron) Lin <97214596+CoolRmal@users.noreply.github.com>
Co-authored-by: Yongxi (Aaron) Lin <97214596+CoolRmal@users.noreply.github.com>
Co-authored-by: Yongxi (Aaron) Lin <97214596+CoolRmal@users.noreply.github.com>
Co-authored-by: Yongxi (Aaron) Lin <97214596+CoolRmal@users.noreply.github.com>
Co-authored-by: Yongxi (Aaron) Lin <97214596+CoolRmal@users.noreply.github.com>
@teorth

teorth commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

I have now folded the proof of MonotoneOn.eVariation_le into that of MonotoneOn.eVariation_eq and made MonotoneOn.eVariation_le a deprecated corollary. Also, I have removed BoundedVariationOn.of_singleton (and made BoundedVariationOn.of_finset private) as both are superseded by BoundedVariationOn.of_finite.

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author A reviewer has asked the author a question or requested changes. label Jul 9, 2026
Comment thread Mathlib/Topology/EMetricSpace/BoundedVariation.lean Outdated
Comment thread Mathlib/Topology/EMetricSpace/BoundedVariation.lean Outdated
Comment thread Mathlib/Topology/EMetricSpace/BoundedVariation.lean Outdated
Comment thread Mathlib/Topology/EMetricSpace/BoundedVariation.lean
@CoolRmal

Copy link
Copy Markdown
Contributor

I think this LGTM now, I'll put it on the maintainer queue after you address the comments.

awaiting-author

@github-actions github-actions Bot added the awaiting-author A reviewer has asked the author a question or requested changes. label Jul 10, 2026
Comment thread Mathlib/Topology/EMetricSpace/BoundedVariation.lean Outdated
teorth and others added 5 commits July 9, 2026 22:15
Co-authored-by: Yongxi (Aaron) Lin <97214596+CoolRmal@users.noreply.github.com>
Co-authored-by: Yongxi (Aaron) Lin <97214596+CoolRmal@users.noreply.github.com>
Co-authored-by: Yongxi (Aaron) Lin <97214596+CoolRmal@users.noreply.github.com>
Co-authored-by: Yongxi (Aaron) Lin <97214596+CoolRmal@users.noreply.github.com>
@teorth

teorth commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author A reviewer has asked the author a question or requested changes. label Jul 10, 2026
@CoolRmal

Copy link
Copy Markdown
Contributor

maintainer merge

@github-actions

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by CoolRmal.

@mathlib-triage mathlib-triage Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. t-topology Topological spaces, uniform spaces, metric spaces, filters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants