Skip to content

feat(Topology/GDelta): a completely metrizable subspace of a metrizable space is Gδ - #42912

Open
justin-palumbo wants to merge 3 commits into
leanprover-community:masterfrom
justin-palumbo:feature-gdelta-completely-metrizable
Open

feat(Topology/GDelta): a completely metrizable subspace of a metrizable space is Gδ#42912
justin-palumbo wants to merge 3 commits into
leanprover-community:masterfrom
justin-palumbo:feature-gdelta-completely-metrizable

Conversation

@justin-palumbo

Copy link
Copy Markdown

Adds TopologicalSpace.IsCompletelyMetrizableSpace.isGδ: a completely metrizable subspace of a metrizable space is Gδ

This is one direction of a foundational fact in descriptive set theory --- the Polish subspaces of a Polish space are exact the Gδ subset.

The proof here is modeled on the exposition in Anush Tserunyan's descriptive set theory notes https://www.math.mcgill.ca/atserunyan/Teaching_notes/dst_lectures.pdf, with one adjustment; to make the formalization easier and avoid having multiple distance metrics instantiated at the same time, instead of directly defining open U_n with s = ⋂ n, U define them such that s = closure s ∩ ⋂ n, U n and then appeal to the fact closed sets are Gδ in a perfectly normal space.


This can be viewed as a companion to #42693, which - under the stronger assumption of the ambient space being Polish - establishes the other direction --- a Gδ subspace of a Polish space is itself Polish.

Together, these give Alexandrov's theorem, characterizing the Polish subspaces of an ambient Polish space as exactly the Gδ ones, and (via Metric.PiNatEmbed.exists_embedding_to_hilbert_cube) Polish spaces as exactly the Gδ subsets of the Hilbert cube. If and when both these PRs are committed, I anticipate adding these consequences to Topology/MetricSpace/Polish.lean

LLM usage: I wrote the initial version myself, while using Google's free "AI mode" to help me find relevant lemma names in the codebase, and afterward used helped Claude Opus to review, which led to simplifying some of the arguments. I take full responsibility for the code here

@github-actions github-actions Bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Aug 18, 2026
@github-actions

Copy link
Copy Markdown

Welcome new contributor!

Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests.

We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the awaiting-author tag, or another reason described in the Lifecycle of a PR. The review dashboard has a dedicated webpage which shows whether your PR is on the review queue, and (if not), why.

If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR.

Thank you again for joining our community.

@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown

PR summary 0825c476b5

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Topology.GDelta.CompletelyMetrizable (new file) 1157

Declarations diff (regex)

+ instance (priority := 90) [TopologicalSpace X]
+ instance (priority := 90) [TopologicalSpace X] [IsCompletelyMetrizableSpace X] :
+ isGδ
- instance (priority := 90) MetrizableSpace [TopologicalSpace X] [IsCompletelyMetrizableSpace X] :
- instance (priority := 90) PseudoMetrizableSpace [TopologicalSpace 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 0825c47).

  • +3 new declarations
  • −2 removed declarations
-TopologicalSpace.IsCompletelyMetrizableSpace.MetrizableSpace
+TopologicalSpace.IsCompletelyMetrizableSpace.instMetrizableSpace
+TopologicalSpace.IsCompletelyMetrizableSpace.isGδ
-TopologicalSpace.IsCompletelyPseudoMetrizableSpace.PseudoMetrizableSpace
+TopologicalSpace.IsCompletelyPseudoMetrizableSpace.instPseudoMetrizableSpace

No changes to strong technical debt.

No changes to weak technical debt.

Current commit 0825c476b5
Reference commit 618f225e1f

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 Aug 18, 2026
@github-actions

github-actions Bot commented Aug 18, 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!

@mathlib-dependent-issues mathlib-dependent-issues Bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Aug 18, 2026
@mathlib-dependent-issues

Copy link
Copy Markdown

@justin-palumbo justin-palumbo changed the title feat(Topology/Gdelta): A completely metrizable subspace of a metrizable space is Gdelta feat(Topology/GDelta): a completely metrizable subspace of a metrizable space is Gδ Aug 18, 2026
@justin-palumbo
justin-palumbo force-pushed the feature-gdelta-completely-metrizable branch from b8c916e to 0825c47 Compare August 18, 2026 21:07
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) new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! t-topology Topological spaces, uniform spaces, metric spaces, filters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant