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

feat(*): backport Nat.le from Lean4 #8756

Closed
wants to merge 3 commits into from
Closed

feat(*): backport Nat.le from Lean4 #8756

wants to merge 3 commits into from

Conversation

semorrison
Copy link
Collaborator

This is the companion PR to leanprover-community/lean#603, updating mathlib3 to use the definition of Nat.le preferred in Lean4.

It's not always smooth sailing, and in particular it's now more awkward to use cases or induction on inequalities in nat.

If anyone sees a way to do this better, please let me know!

Until we merge the PR to Lean3 itself, this PR won't build, but it does appear to build locally!


Open in Gitpod

@semorrison semorrison added the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Aug 19, 2021
@github-actions github-actions bot removed the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Aug 19, 2021
bors bot pushed a commit to leanprover-community/lean that referenced this pull request Aug 20, 2021
The corresponding PR to mathlib is leanprover-community/mathlib#8756.

Co-authored-by: Gabriel Ebner <gebner@gebner.org>
Comment on lines +356 to +359
cases nat.eq_or_lt_of_le m_lt_n with h succ_m_lt_n,
{ -- the difficult case at the squashed position: we first obtain the values from
-- the sequence
subst h,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
cases nat.eq_or_lt_of_le m_lt_n with h succ_m_lt_n,
{ -- the difficult case at the squashed position: we first obtain the values from
-- the sequence
subst h,
rcases m_lt_n.eq_or_lt with rfl|succ_m_lt_n,
{ -- the difficult case at the squashed position: we first obtain the values from
-- the sequence

and similar below

@semorrison semorrison added the WIP Work in progress label Aug 21, 2021
@semorrison
Copy link
Collaborator Author

Unfortunately when we made nat.le irreducible in leanprover-community/lean#603 we broke lots more things, so this PR is incomplete. Discussion at https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Nat.2Ele.20backport.

@semorrison
Copy link
Collaborator Author

Nat.le in Lean4 now matches the Lean3 definition, so this is not needed:

https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Nat.2Ele.20backport/near/250280446

@semorrison semorrison closed this Aug 23, 2021
@semorrison semorrison deleted the nat.le branch September 9, 2021 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants