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(Order/Basic): Add ltByCases API #9114

Closed
wants to merge 4 commits into from

Conversation

linesthatinterlace
Copy link
Collaborator

I noticed that ltByCases doesn't have any API, and it would be useful to have some when working trichotomously, especially if one wishes to define things trichotomously.

A non-dependent version is also defined.


Open in Gitpod

@linesthatinterlace linesthatinterlace added awaiting-review The author would like community review of the PR awaiting-CI labels Dec 16, 2023
Mathlib/Order/Basic.lean Outdated Show resolved Hide resolved
@linesthatinterlace linesthatinterlace changed the title feat(Order/Basic) feat(Order/Basic): Add ltByCases API Dec 17, 2023
@linesthatinterlace
Copy link
Collaborator Author

For what it's worth, in the context of actually using these, I've found ltByCases worthwhile. This is because it calls for things of the form x < y -> P, wheras using a match h : compare x y construct gives you the requirement to make P adding the h : compare x y = LT hypothesis, say. But sometimes you want the former, because you then want to define things by cases and thus generalizing h: I am not really sure how to do that in term mode! If someone knows, please let me know... but in general I do think this adds utility.

Mathlib/Order/Basic.lean Outdated Show resolved Hide resolved
@jcommelin
Copy link
Member

I think this looks good now. After you add the suggested lemma, please feel free to merge this.

bors d+

@mathlib-bors
Copy link

mathlib-bors bot commented Jan 12, 2024

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

@github-actions github-actions bot added delegated and removed awaiting-review The author would like community review of the PR labels Jan 12, 2024
@jcommelin
Copy link
Member

Thanks 🎉

bors merge

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Jan 12, 2024
mathlib-bors bot pushed a commit that referenced this pull request Jan 12, 2024
I noticed that `ltByCases` doesn't have any API, and it would be useful to have some when working trichotomously, especially if one wishes to define things trichotomously.

A non-dependent version is also defined.
@mathlib-bors
Copy link

mathlib-bors bot commented Jan 12, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Order/Basic): Add ltByCases API [Merged by Bors] - feat(Order/Basic): Add ltByCases API Jan 12, 2024
@mathlib-bors mathlib-bors bot closed this Jan 12, 2024
@mathlib-bors mathlib-bors bot deleted the ltByCases_API branch January 12, 2024 14:03
linesthatinterlace added a commit that referenced this pull request Jan 16, 2024
I noticed that `ltByCases` doesn't have any API, and it would be useful to have some when working trichotomously, especially if one wishes to define things trichotomously.

A non-dependent version is also defined.
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants