Skip to content

feat: typeclass for zero-dimensional spaces#37444

Open
vihdzp wants to merge 8 commits intoleanprover-community:masterfrom
vihdzp:zerodim
Open

feat: typeclass for zero-dimensional spaces#37444
vihdzp wants to merge 8 commits intoleanprover-community:masterfrom
vihdzp:zerodim

Conversation

@vihdzp
Copy link
Copy Markdown
Collaborator

@vihdzp vihdzp commented Mar 31, 2026

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 31, 2026

PR summary 4ec5d95aa6

Import changes exceeding 2%

% File
+14.08% Mathlib.Topology.UniformSpace.Ultra.Basic

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Topology.UniformSpace.Ultra.Basic 618 705 +87 (+14.08%)
Mathlib.Topology.Separation.CompletelyRegular 1550 1552 +2 (+0.13%)
Mathlib.Topology.Separation.Lemmas 1554 1555 +1 (+0.06%)
Import changes for all files
Files Import difference
5 files Mathlib.MeasureTheory.Measure.DiracProba Mathlib.MeasureTheory.Measure.LevyConvergence Mathlib.MeasureTheory.Measure.Prokhorov Mathlib.Probability.CentralLimitTheorem Mathlib.Topology.Separation.Lemmas
1
5 files Mathlib.Topology.MetricSpace.Snowflaking Mathlib.Topology.Separation.CompletelyRegular Mathlib.Topology.UniformSpace.Ultra.Completion Mathlib.Topology.UniformSpace.Ultra.Constructions Mathlib.Topology.UniformSpace.Uniformizable
2
Mathlib.Topology.UniformSpace.Ultra.Basic 87

Declarations diff

+ CompletelyRegularSpace.of_isTopologicalBasis_clopens
+ CompletelyRegularSpace.totallySeparatedSpace_of_cardinalMk_lt_continuum
+ CompletelyRegularSpace.zeroDimensionalSpace_of_cardinalMk_lt_continuum
+ IndiscreteTopology.isClopen_iff
+ ZeroDimensionalSpace
+ ZeroDimensionalSpace.of_isOpen_of_nhds
+ exists_isClopen_mem_of_isOpen
+ hasBasis_nhds_isClopen
+ instance : ZeroDimensionalSpace X := by
+ instance [Countable X] [T35Space X] : TotallySeparatedSpace X
+ instance [DiscreteTopology X] : ZeroDimensionalSpace X := by
+ instance [IndiscreteTopology X] : ZeroDimensionalSpace X := by
+ instance [T0Space X] [ZeroDimensionalSpace X] : TotallySeparatedSpace X := by
+ instance [T2Space X] [CompactSpace X] [TotallyDisconnectedSpace X] : ZeroDimensionalSpace X := by
+ instance [TotallyDisconnectedSpace H] : ZeroDimensionalSpace H := by
+ instance [ZeroDimensionalSpace X] : CompletelyRegularSpace X
+ totallyDisconnectedSpace_iff_totallySeparatedSpace
- _root_.Set.Countable.totallySeparatedSpace
- _root_.TopologicalSpace.isTopologicalBasis_clopens
- instance (priority := 100) [TotallyDisconnectedSpace H] : TotallySeparatedSpace H
- instance [Countable X] : TotallySeparatedSpace X
- totallySeparatedSpace_of_cardinalMk_lt_continuum

You can run this locally as follows
## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh contains some details about this script.


Increase in tech debt: (relative, absolute) = (1.00, 0.00)
Current number Change Type
454 1 porting notes

Current commit 11eee01e7e
Reference commit 4ec5d95aa6

You can run this locally as

./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 Mar 31, 2026
@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 Mar 31, 2026
@mathlib-dependent-issues
Copy link
Copy Markdown

This PR/issue depends on:

@github-actions github-actions bot added the large-import Automatically added label for PRs with a significant increase in transitive imports label Mar 31, 2026
@FernandoChu
Copy link
Copy Markdown
Collaborator

I wonder, what happens with the class ZeroDimensionalSpace when we get the a typeclass for IsDimensionalSpace n?

@vihdzp
Copy link
Copy Markdown
Collaborator Author

vihdzp commented Apr 1, 2026

I figured it could be similar to how we have Ring.dimensionLEOne but also Ring.krullDimLE?

@FernandoChu
Copy link
Copy Markdown
Collaborator

I see. If you're ok with it I can implement HasSmallInductiveDimensionLE so that we don't have this situation.

@vihdzp
Copy link
Copy Markdown
Collaborator Author

vihdzp commented Apr 1, 2026

Go for it! As long as the definition doesn't use too many imports, and as long as we have HasSmallInductiveDimensionLE 0 iff basis of clopens.

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) large-import Automatically added label for PRs with a significant increase in transitive imports t-topology Topological spaces, uniform spaces, metric spaces, filters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants