Skip to content

[Merged by Bors] - chore(Topology/SubsetProperties): Refactor SubsetProperties.lean#7628

Closed
loefflerd wants to merge 13 commits intomasterfrom
DL_refactor_ssetprops
Closed

[Merged by Bors] - chore(Topology/SubsetProperties): Refactor SubsetProperties.lean#7628
loefflerd wants to merge 13 commits intomasterfrom
DL_refactor_ssetprops

Conversation

@loefflerd
Copy link
Copy Markdown
Contributor

Split up the 2000-line Topology/SubsetProperties.lean into several smaller files. Not only is it too huge, but the name is very unhelpful, since actually about 90% of the file is about compactness; I've moved this material into various files inside a new subdirectory Topology/Compactness/.


Open in Gitpod

loefflerd and others added 2 commits October 11, 2023 18:19
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@ocfnash ocfnash self-requested a review October 11, 2023 16:47
@grunweg
Copy link
Copy Markdown
Contributor

grunweg commented Oct 11, 2023

Thank you for doing this! Just as a heads-up: this conflicts with #7576 (and also #7591).

@alexjbest
Copy link
Copy Markdown
Member

@loefflerd was the reviewdog misbehaving here? Or being not as helpful as it could be somehow, I'd like to improve it if so but the history is now very confusing

Copy link
Copy Markdown
Contributor

@ocfnash ocfnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have carefully checked over this (admittedly by hand) and I can attest that the following summary is accurate:

  1. The file Mathlib.Topology.SubsetProperties has been renamed to Mathlib.Topology.Compactness.Compact as well as having its length cut from about 2k lines to about 1k lines.
  2. The c.1k lines removed from Mathlib.Topology.SubsetProperties exactly correspond to the content added in the four new files Topology.Clopen, Topology.Irreducible, Topology.Compactness.LocallyCompact, Topology.Compactness.SigmaCompact. Indeed there is a character-by-character match except for file headers and four locations (occuring in the new file Topology.irreducible) where α : Type u was changed to α : Type*.
  3. The file Topology.Paracompact was renamed to Topology.Compactness.Paracompact
  4. Two results (isClosed_and_discrete_iff and Filter.codiscrete) were moved out of Mathlib.Topology.SubsetProperties and placed in Topology.DiscreteSubset.
  5. File headers were added / updated according to the changes, in some cases by migrating comments from Mathlib.Topology.SubsetProperties (e.g., remarks about IsPreirreducible).
  6. All other files changed have only had their import statements fixed to handle the new file layout.

Thanks for doing this.

bors d+


/-- Criterion for a subset `S ⊆ α` to be closed and discrete in terms of the punctured
neighbourhood filter at an arbitrary point of `α`. (Compare `discreteTopology_subtype_iff`.) -/
theorem isClosed_and_discrete_iff {α : Type*} [TopologicalSpace α] {S : Set α} :
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recognise that when splitting a large file it is best to keep any ancillary changes to an absolute minimum but perhaps here we could make an exception and use carrier types that are consistent with the cofinite_cocompact above

Suggested change
theorem isClosed_and_discrete_iff {α : Type*} [TopologicalSpace α] {S : Set α} :
theorem isClosed_and_discrete_iff {X : Type*} [TopologicalSpace X] {S : Set X} :

(likewise in Filter.codiscrete below)

@bors
Copy link
Copy Markdown

bors bot commented Oct 11, 2023

✌️ loefflerd can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@ghost ghost added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Oct 11, 2023
loefflerd and others added 2 commits October 11, 2023 23:12
Co-authored-by: Oliver Nash <github@olivernash.org>
@loefflerd
Copy link
Copy Markdown
Contributor Author

bors r+

@PatrickMassot
Copy link
Copy Markdown
Member

Thanks a lot @loefflerd! This is very tedious work that is very useful.

bors bot pushed a commit that referenced this pull request Oct 11, 2023
Split up the 2000-line `Topology/SubsetProperties.lean` into several smaller files. Not only is it too huge, but the name is very unhelpful, since actually about 90% of the file is about compactness; I've moved this material into various files inside a new subdirectory `Topology/Compactness/`.
@bors
Copy link
Copy Markdown

bors bot commented Oct 11, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title chore(Topology/SubsetProperties): Refactor SubsetProperties.lean [Merged by Bors] - chore(Topology/SubsetProperties): Refactor SubsetProperties.lean Oct 11, 2023
@bors bors bot closed this Oct 11, 2023
@bors bors bot deleted the DL_refactor_ssetprops branch October 11, 2023 22:43
urkud added a commit that referenced this pull request Mar 10, 2025
mathlib-bors bot pushed a commit that referenced this pull request Mar 10, 2025
tukamilano pushed a commit that referenced this pull request Mar 20, 2025
idontgetoutmuch pushed a commit to idontgetoutmuch/mathlib4 that referenced this pull request Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants