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(Data/Nat/Order/Basic): le_one_iff_eq_zero_or_eq_one #6949

Closed
wants to merge 1 commit into from

Conversation

mo271
Copy link
Collaborator

@mo271 mo271 commented Sep 4, 2023


Open in Gitpod

@mo271 mo271 added awaiting-review The author would like community review of the PR awaiting-CI new-feature Add features not present in Mathlib 3 labels Sep 4, 2023
@mo271
Copy link
Collaborator Author

mo271 commented Sep 4, 2023

This is basically the not_iff_not of the statement one_lt_iff_ne_zero_and_ne_one just above, but this proof:

theorem le_one_iff_eq_zero_or_eq_one : ∀ {n : ℕ}, n ≤ 1 ↔ n = 0 ∨ n = 1 := by
  refine' not_iff_not.mp _
  rw [Nat.not_le, one_lt_iff_ne_zero_and_ne_one]
  exact not_or.symm

is not nicer...

Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks 🎉

bors merge

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-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 Sep 4, 2023
bors bot pushed a commit that referenced this pull request Sep 4, 2023
Co-authored-by: Moritz Firsching <firsching@google.com>
@bors
Copy link

bors bot commented Sep 4, 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(Data/Nat/Order/Basic): le_one_iff_eq_zero_or_eq_one [Merged by Bors] - feat(Data/Nat/Order/Basic): le_one_iff_eq_zero_or_eq_one Sep 4, 2023
@bors bors bot closed this Sep 4, 2023
@bors bors bot deleted the mo271/le_one_iff_eq_zero_or_eq_one branch September 4, 2023 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature Add features not present in Mathlib 3 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

3 participants