Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat(Mathlib.Topology.Compactness.Compact): add sInter version of Cantor's intersection theorem #10956

Closed

Conversation

oliver-butterley
Copy link
Collaborator

@oliver-butterley oliver-butterley commented Feb 25, 2024

The iInter version of Cantor's intersection theorem is already present: IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed.
The proof of the added sInter version takes advantage of the iInter version.

Much of the addition due to conversation with Sebastien Gouezel on Zulip.

Open in Gitpod

Copy link
Collaborator Author

@oliver-butterley oliver-butterley left a comment

Choose a reason for hiding this comment

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

I believe that:
IsCompact.nonempty_sInter_of_directed_nonempty_isCompact_isClosed
would be the recommended naming scheme. However the chosen name:
IsCompact.nonempty_sInter_of_directed_nonempty_compact_closed
matches the other results in the same file.

@oliver-butterley
Copy link
Collaborator Author

Maybe it help reviewers if I link to the place where the added theorem is used?
It is used in topology.lean in this branch of this project: [https://github.com/oliver-butterley/birkhoff/tree/wip-exist-minimal]

@oliver-butterley oliver-butterley added the awaiting-review The author would like community review of the PR label Feb 25, 2024
@sgouezel
Copy link
Contributor

bors r+
Thanks!

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review The author would like community review of the PR labels Feb 27, 2024
@sgouezel
Copy link
Contributor

bors r-

@mathlib-bors
Copy link

mathlib-bors bot commented Feb 27, 2024

Canceled.

@@ -303,6 +303,15 @@ theorem IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed {ι : Type
exact (htn j).mono (subset_inter hji₀ hji)
#align is_compact.nonempty_Inter_of_directed_nonempty_compact_closed IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed

/-- Cantor's intersection theorem for `sInter`:
the intersection of a directed family of nonempty compact closed sets is nonempty. -/
theorem IsCompact.nonempty_sInter_of_directed_nonempty_compact_closed
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
theorem IsCompact.nonempty_sInter_of_directed_nonempty_compact_closed
theorem IsCompact.nonempty_sInter_of_directed_nonempty_isCompact_isClosed

We try to have theorem names that follow as closely as possible the Lean names. The other IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed is also wrong, by the way -- could you correct it, and add a deprecated alias for the old name? (If you don't know how to do that, tell me)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure thing, I've corrected the name of the newly added theorem.

I've updated the naming of the other two cantor intersection theorems and added the alias. Shall I do this as part of this PR or better as a separate PR? I've done them here but let me know and I can revert this and do a separate PR for the name change.

The mathlib style guide doesn't tell me the preferred place for the deprecated alias. Sometimes they are the end of the files and sometimes they are immediately after the associated theorem. I've put it after the theorem with a single space between the two since there is already the #align there. Otherwise at the end of the file seems more tidy to me. Give me guidance and then I can change is (and also add a note to the style guide if there is a maintainer consensus.)

@sgouezel sgouezel added awaiting-author A reviewer has asked the author a question or requested changes and removed ready-to-merge This PR has been sent to bors. labels Feb 27, 2024
@oliver-butterley oliver-butterley added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Feb 28, 2024
@sgouezel
Copy link
Contributor

Looks great. Can you just add the deprecation date before the aliases, so that we can remove them in due time. And also fix the long line, and replace the uses of deprecated theorems by the non-deprecated ones? (There should be a code action, i.e., a blue light bulb that shows up when you click on the deprecated use, suggesting the right replacement).

@oliver-butterley
Copy link
Collaborator Author

I did the changes to all the uses of the theorem and added the dates.

@sgouezel
Copy link
Contributor

bors r+
Thanks!

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review The author would like community review of the PR labels Feb 28, 2024
mathlib-bors bot pushed a commit that referenced this pull request Feb 28, 2024
…tor's intersection theorem (#10956)

The iInter version of Cantor's intersection theorem is already present: `IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed`.
The proof of the added sInter version takes advantage of the iInter version.

Much of the addition due to [conversation with Sebastien Gouezel on Zulip](https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/.E2.9C.94.20Obtain.20sInter.20version.20of.20an.20iInter.20theorem).

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/)
@mathlib-bors
Copy link

mathlib-bors bot commented Feb 28, 2024

Build failed (retrying...):

  • Build

mathlib-bors bot pushed a commit that referenced this pull request Feb 28, 2024
…tor's intersection theorem (#10956)

The iInter version of Cantor's intersection theorem is already present: `IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed`.
The proof of the added sInter version takes advantage of the iInter version.

Much of the addition due to [conversation with Sebastien Gouezel on Zulip](https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/.E2.9C.94.20Obtain.20sInter.20version.20of.20an.20iInter.20theorem).

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/)
@mathlib-bors
Copy link

mathlib-bors bot commented Feb 28, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Mathlib.Topology.Compactness.Compact): add sInter version of Cantor's intersection theorem [Merged by Bors] - feat(Mathlib.Topology.Compactness.Compact): add sInter version of Cantor's intersection theorem Feb 28, 2024
@mathlib-bors mathlib-bors bot closed this Feb 28, 2024
@mathlib-bors mathlib-bors bot deleted the oliver-butterley/cantor-intersection-wip branch February 28, 2024 17:59
riccardobrasca pushed a commit that referenced this pull request Mar 1, 2024
…tor's intersection theorem (#10956)

The iInter version of Cantor's intersection theorem is already present: `IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed`.
The proof of the added sInter version takes advantage of the iInter version.

Much of the addition due to [conversation with Sebastien Gouezel on Zulip](https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/.E2.9C.94.20Obtain.20sInter.20version.20of.20an.20iInter.20theorem).

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/)
kbuzzard pushed a commit that referenced this pull request Mar 12, 2024
…tor's intersection theorem (#10956)

The iInter version of Cantor's intersection theorem is already present: `IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed`.
The proof of the added sInter version takes advantage of the iInter version.

Much of the addition due to [conversation with Sebastien Gouezel on Zulip](https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/.E2.9C.94.20Obtain.20sInter.20version.20of.20an.20iInter.20theorem).

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/)
dagurtomas pushed a commit that referenced this pull request Mar 22, 2024
…tor's intersection theorem (#10956)

The iInter version of Cantor's intersection theorem is already present: `IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed`.
The proof of the added sInter version takes advantage of the iInter version.

Much of the addition due to [conversation with Sebastien Gouezel on Zulip](https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/.E2.9C.94.20Obtain.20sInter.20version.20of.20an.20iInter.20theorem).

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/)
@grunweg grunweg added the new-contributor This PR was made by a contributor with fewer than 5 merged PRs. Welcome to the community! label Mar 25, 2024
Louddy pushed a commit that referenced this pull request Apr 15, 2024
…tor's intersection theorem (#10956)

The iInter version of Cantor's intersection theorem is already present: `IsCompact.nonempty_iInter_of_directed_nonempty_compact_closed`.
The proof of the added sInter version takes advantage of the iInter version.

Much of the addition due to [conversation with Sebastien Gouezel on Zulip](https://leanprover.zulipchat.com/#narrow/stream/217875-Is-there-code-for-X.3F/topic/.E2.9C.94.20Obtain.20sInter.20version.20of.20an.20iInter.20theorem).

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-contributor This PR was made by a contributor with fewer than 5 merged PRs. Welcome to the community! ready-to-merge This PR has been sent to bors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants