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
Conversation
There was a problem hiding this 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.
Maybe it help reviewers if I link to the place where the added theorem is used? |
bors r+ |
bors r- |
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
There was a problem hiding this comment.
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.)
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). |
I did the changes to all the uses of the theorem and added the dates. |
bors r+ |
…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/)
Build failed (retrying...):
|
…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/)
Pull request successfully merged into master. Build succeeded: |
…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/)
…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/)
…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/)
…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/)
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.