Skip to content

feat(Topology/MetricSpace/Heine-Cantor): metric ε-δ forms of Heine–Cantor#41514

Open
teorth wants to merge 1 commit into
leanprover-community:masterfrom
teorth:heine-cantor-eps-delta
Open

feat(Topology/MetricSpace/Heine-Cantor): metric ε-δ forms of Heine–Cantor#41514
teorth wants to merge 1 commit into
leanprover-community:masterfrom
teorth:heine-cantor-eps-delta

Conversation

@teorth

@teorth teorth commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Add (pseudo-)metric space (or "epsilon-delta") versions of many of the versions of the Heine-Cantor theorem (continuous functions on compacta are uniformly continuous) from Topology.UniformSpace.HeineCantor into a new file
Topology.Metric.HeineCantor.


A new file needed to be created because many files downstream of this file blocked the use of UniformOnFun.

AI assistance was used to expand a small initial set of human-generated lemmas into a larger set, with the latter then reviewed by both an AI tool and myself.

Open in Gitpod

@github-actions github-actions Bot added large-import Automatically added label for PRs with a significant increase in transitive imports t-topology Topological spaces, uniform spaces, metric spaces, filters labels Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown

PR summary 598bbec437

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Topology.MetricSpace.HeineCantor (new file) 1025

Declarations diff (regex)

+ Continuous.exists_forall_dist_le_of_compactSpace
+ Continuous.exists_forall_dist_lt_of_compactSpace
+ ContinuousOn.exists_forall_dist_le_of_isCompact
+ ContinuousOn.exists_forall_dist_lt_of_isCompact
+ IsCompact.exists_forall_dist_le_of_continuousAt
+ IsCompact.exists_forall_dist_lt_of_continuousAt

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

  • +6 new declarations
  • −0 removed declarations
+Continuous.exists_forall_dist_le_of_compactSpace
+Continuous.exists_forall_dist_lt_of_compactSpace
+ContinuousOn.exists_forall_dist_le_of_isCompact
+ContinuousOn.exists_forall_dist_lt_of_isCompact
+IsCompact.exists_forall_dist_le_of_continuousAt
+IsCompact.exists_forall_dist_lt_of_continuousAt

No changes to strong technical debt.

No changes to weak technical debt.

Current commit 598bbec437
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).

@teorth teorth force-pushed the heine-cantor-eps-delta branch from be9f009 to 1a2b018 Compare July 8, 2026 21:21
@github-actions github-actions Bot removed the large-import Automatically added label for PRs with a significant increase in transitive imports label Jul 8, 2026
Add `Mathlib/Topology/MetricSpace/HeineCantor.lean` collecting the metric ε-δ
consequences of the uniform-space Heine–Cantor lemmas, each in strict (`_lt`)
and non-strict (`_le`) form:

- `ContinuousOn.exists_forall_dist_{lt,le}_of_isCompact`
- `Continuous.exists_forall_dist_{lt,le}_of_compactSpace`
- `IsCompact.exists_forall_dist_{lt,le}_of_continuousAt`

These live in a new leaf file rather than in `Pseudo/Lemmas.lean` so that the
`Topology.UniformSpace.HeineCantor` import (which transitively pulls in
`UniformOnFun`) does not leak into low-level metric files that
`assert_not_exists UniformOnFun`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@teorth teorth force-pushed the heine-cantor-eps-delta branch from 1a2b018 to 598bbec Compare July 8, 2026 21:29
@teorth teorth changed the title feat(Topology/MetricSpace): metric ε-δ form of Heine–Cantor for ContinuousOn on a compact set feat(Topology/MetricSpace/Heine-Cantor): metric ε-δ form of Heine–Cantor a compact set Jul 8, 2026
@teorth teorth changed the title feat(Topology/MetricSpace/Heine-Cantor): metric ε-δ form of Heine–Cantor a compact set feat(Topology/MetricSpace/Heine-Cantor): metric ε-δ forms of Heine–Cantor Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 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/MetricSpace/Heine-Cantor): metric ε-δ forms of Heine–Cantor feat(Topology/MetricSpace/Heine-Cantor): metric ε-δ forms of Heine–Cantor Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-topology Topological spaces, uniform spaces, metric spaces, filters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant