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(Topology/Order/LowerUpperTopology): Dual the lower topology #5873

Closed
wants to merge 19 commits into from

Conversation

mans0954
Copy link
Collaborator

@mans0954 mans0954 commented Jul 13, 2023

Defines the upper topology, which is the dual of the lower topology on a preorder.


As requested by @YaelDillies and @ADedecker .

I have put the lower and upper topologies in the same file. However, this may complicate the lean4 porting effort, so it may be better to keep the files separate whilst mathlib and mathlib4 are being kept in sync?

Open in Gitpod

@mans0954
Copy link
Collaborator Author

I couldn't see how to deduce

instance [Preorder α] [TopologicalSpace α] [UpperTopology α] [OrderTop α] [Preorder β]
    [TopologicalSpace β] [UpperTopology β] [OrderTop β] : UpperTopology (α × β)

from

instance [Preorder α] [TopologicalSpace α] [LowerTopology α] [OrderBot α] [Preorder β]
    [TopologicalSpace β] [LowerTopology β] [OrderBot β] : LowerTopology (α × β)

I think I need some way of identifying αᵒᵈ × βᵒᵈ with (α × β)ᵒᵈ?

@mans0954 mans0954 added the awaiting-review The author would like community review of the PR label Jul 13, 2023
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Jul 19, 2023
@ADedecker
Copy link
Member

Sorry for not commenting earlier, I'll review tomorrow.

@ADedecker ADedecker self-assigned this Jul 19, 2023
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Jul 19, 2023
@mans0954
Copy link
Collaborator Author

Sorry for not commenting earlier, I'll review tomorrow.

Thanks very much - I appreciate I must have taken up a lot of people's time with my PRs.

Mathlib/Topology/Order/LowerUpperTopology.lean Outdated Show resolved Hide resolved
Mathlib/Topology/Order/LowerUpperTopology.lean Outdated Show resolved Hide resolved
Mathlib/Topology/Order/LowerUpperTopology.lean Outdated Show resolved Hide resolved
Mathlib/Topology/Order/LowerUpperTopology.lean Outdated Show resolved Hide resolved
@ADedecker ADedecker added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Jul 21, 2023
@ADedecker
Copy link
Member

I appreciate I must have taken up a lot of people's time with my PRs.

You shouldn't have to worry about that, your contributions are definitely welcome and your code is looking good, so time spent reviewing it is time well-spent!

mans0954 and others added 8 commits July 21, 2023 17:45
Co-authored-by: Anatole Dedecker <anatolededecker@gmail.com>
Co-authored-by: Anatole Dedecker <anatolededecker@gmail.com>
Co-authored-by: Anatole Dedecker <anatolededecker@gmail.com>
Co-authored-by: Anatole Dedecker <anatolededecker@gmail.com>
@mans0954 mans0954 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 Jul 21, 2023
@ADedecker ADedecker added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Jul 24, 2023
@mans0954 mans0954 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 Jul 24, 2023
Copy link
Member

@ADedecker ADedecker left a comment

Choose a reason for hiding this comment

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

One last comment, then this should be good to go!

Comment on lines 492 to 494
constructor
· apply UpperTopology.instLowerTopologyOrderDualInstTopologicalSpaceOrderDualPreorder
· apply LowerTopology.instUpperTopologyOrderDualInstTopologicalSpaceOrderDualPreorder
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
constructor
· apply UpperTopology.instLowerTopologyOrderDualInstTopologicalSpaceOrderDualPreorder
· apply LowerTopology.instUpperTopologyOrderDualInstTopologicalSpaceOrderDualPreorder
constructor <;> intro _ <;> infer_instance

If that works. Same below

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unfortunately

lemma UpperDual_iff_Lower [Preorder α] [TopologicalSpace α] :
    UpperTopology αᵒᵈ ↔ LowerTopology α := by
  constructor <;> intro _ <;> infer_instance

gives me

failed to synthesize instance
  LowerTopology α

Copy link
Member

Choose a reason for hiding this comment

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

Ah right because it doesn't know how to go backwards. Then let's keep the current proof. Could you just give an explicit name to the instances so that it looks better?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done, thanks.

@ADedecker ADedecker added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Jul 24, 2023
@ADedecker ADedecker 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 Jul 24, 2023
@ADedecker
Copy link
Member

Thanks!

maintainer merge

@github-actions
Copy link

🚀 Pull request has been placed on the maintainer queue by ADedecker.

@ocfnash
Copy link
Contributor

ocfnash commented Jul 25, 2023

bors merge

@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 Jul 25, 2023
bors bot pushed a commit that referenced this pull request Jul 25, 2023
Defines the upper topology, which is the dual of the lower topology on a preorder.



Co-authored-by: Christopher Hoskin <christopher.hoskin@overleaf.com>
Co-authored-by: Christopher Hoskin <mans0954@users.noreply.github.com>
@bors
Copy link

bors bot commented Jul 25, 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 feat(Topology/Order/LowerUpperTopology): Dual the lower topology [Merged by Bors] - feat(Topology/Order/LowerUpperTopology): Dual the lower topology Jul 25, 2023
@bors bors bot closed this Jul 25, 2023
@bors bors bot deleted the mans0954/UpperTopology branch July 25, 2023 11:29
semorrison pushed a commit that referenced this pull request Aug 14, 2023
Defines the upper topology, which is the dual of the lower topology on a preorder.



Co-authored-by: Christopher Hoskin <christopher.hoskin@overleaf.com>
Co-authored-by: Christopher Hoskin <mans0954@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

5 participants