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: add basic API lemmas for BddAbove (range f) and BddBelow (range f) #9472

Closed
wants to merge 9 commits into from

Conversation

dupuisf
Copy link
Contributor

@dupuisf dupuisf commented Jan 5, 2024

This PR adds some basic API lemmas for BddAbove (range f) (resp BddBelow). This is a ubiquitous side condition when working with iInf/iSup in conditionally complete lattices, so I think it's worth having.


Open in Gitpod

@dupuisf dupuisf added awaiting-review The author would like community review of the PR awaiting-CI t-order Order hierarchy labels Jan 5, 2024
Comment on lines 1666 to 1672
rw [bddBelow_def] at hf ⊢
obtain ⟨C, hC⟩ := hf
refine ⟨g C, fun y hy => ?_⟩
rw [Set.mem_range] at hy
obtain ⟨y', hy'⟩ := hy
calc y = g (f y') := hy'.symm
_ ≥ g C := hg <| hC (f y') <| Set.mem_range_self _
Copy link
Member

Choose a reason for hiding this comment

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

Can't this also be golfed using OrderDual?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not easily. We need to take the dual of both β and γ, and I think the Monotone g hypothesis needs to be adapted. Maybe it's possible but it's easier to copy/paste.

@jcommelin jcommelin 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 Jan 9, 2024
@dupuisf dupuisf 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 Jan 9, 2024
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.

Could you also replace the uses of Set.range by range where the namespaces are already open?

Mathlib/Order/Bounds/Basic.lean Outdated Show resolved Hide resolved
Mathlib/Order/Bounds/Basic.lean Outdated Show resolved Hide resolved
Mathlib/Order/Bounds/Basic.lean Outdated Show resolved Hide resolved
Mathlib/Algebra/Bounds.lean Outdated Show resolved Hide resolved
Mathlib/Algebra/Bounds.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 Jan 11, 2024
dupuisf and others added 5 commits January 13, 2024 11:20
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>
@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 Jan 13, 2024
@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 Jan 13, 2024
@jcommelin
Copy link
Member

Thanks 🎉

bors merge

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-author A reviewer has asked the author a question or requested changes labels Jan 13, 2024
mathlib-bors bot pushed a commit that referenced this pull request Jan 13, 2024
…nge f)` (#9472)

This PR adds some basic API lemmas for `BddAbove (range f)` (resp `BddBelow`). This is a ubiquitous side condition when working with `iInf`/`iSup` in conditionally complete lattices, so I think it's worth having.



Co-authored-by: Frédéric Dupuis <31101893+dupuisf@users.noreply.github.com>
@jcommelin
Copy link
Member

bors r-

Sorry, I thought you were done...

bors d+

@mathlib-bors
Copy link

mathlib-bors bot commented Jan 13, 2024

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

@mathlib-bors
Copy link

mathlib-bors bot commented Jan 13, 2024

Canceled.

@dupuisf
Copy link
Contributor Author

dupuisf commented Jan 13, 2024

bors merge

mathlib-bors bot pushed a commit that referenced this pull request Jan 13, 2024
…nge f)` (#9472)

This PR adds some basic API lemmas for `BddAbove (range f)` (resp `BddBelow`). This is a ubiquitous side condition when working with `iInf`/`iSup` in conditionally complete lattices, so I think it's worth having.



Co-authored-by: Frédéric Dupuis <31101893+dupuisf@users.noreply.github.com>
@mathlib-bors
Copy link

mathlib-bors bot commented Jan 13, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: add basic API lemmas for BddAbove (range f) and BddBelow (range f) [Merged by Bors] - feat: add basic API lemmas for BddAbove (range f) and BddBelow (range f) Jan 13, 2024
@mathlib-bors mathlib-bors bot closed this Jan 13, 2024
@mathlib-bors mathlib-bors bot deleted the dupuisf/BddAbove_api branch January 13, 2024 22:57
linesthatinterlace pushed a commit that referenced this pull request Jan 16, 2024
…nge f)` (#9472)

This PR adds some basic API lemmas for `BddAbove (range f)` (resp `BddBelow`). This is a ubiquitous side condition when working with `iInf`/`iSup` in conditionally complete lattices, so I think it's worth having.



Co-authored-by: Frédéric Dupuis <31101893+dupuisf@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated ready-to-merge This PR has been sent to bors. t-order Order hierarchy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants