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/Floor): x - 1 / 2 < round x #14964

Closed
wants to merge 14 commits into from

Conversation

Colin166
Copy link
Collaborator

Adding a new theorem to Mathlib/Algebra/Order/Floor.lean :

theorem round_half_bot : a - (1 / 2 : ℚ) < round a := by
  rw [round_eq, show (a - 1 / 2 : ℚ) = (a + 1 / 2) - 1 by ring]
  exact Int.sub_one_lt_floor (a + 1 / 2)

@Colin166 Colin166 requested a review from YaelDillies July 21, 2024 00:25
@github-actions github-actions bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Jul 21, 2024
Copy link

github-actions bot commented Jul 21, 2024

PR summary 5b76afbd63

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ round_le_add_half
+ sub_half_lt_round

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

@Colin166 Colin166 added the WIP Work in progress label Jul 21, 2024
@Colin166 Colin166 added the help-wanted The author needs attention to resolve issues label Jul 21, 2024
@Command-Master
Copy link
Collaborator

Additionally both theorems should be moved to the LinearOrderedField section, after round_eq

@Colin166 Colin166 added awaiting-review-DONT-USE Read the "Changes to the #queue" announcement on Zulip and removed help-wanted The author needs attention to resolve issues WIP Work in progress awaiting-review-DONT-USE Read the "Changes to the #queue" announcement on Zulip labels Jul 21, 2024
@YaelDillies YaelDillies changed the title Update Floor.lean feat(Order/Floor): a - 1 / 2 < round a Jul 21, 2024
@kim-em
Copy link
Contributor

kim-em commented Jul 21, 2024

This pulls in additional imports to a file making basic definitions. Please move to a later or new file.

@kim-em kim-em added the awaiting-author A reviewer has asked the author a question or requested changes label Jul 21, 2024
@Colin166 Colin166 changed the title feat(Order/Floor): a - 1 / 2 < round a feat(Order/Floor): x - 1 / 2 < round x Jul 21, 2024
@Colin166
Copy link
Collaborator Author

Without import Mathlib.Tactic.Ring Lean doesn't recognize ring as a valid tactic; that's why I included it. I will try to prove the goal in a different way.

@Colin166
Copy link
Collaborator Author

Alright issue should be fixed. I replaced ring with nlinarith

@Colin166 Colin166 removed the awaiting-author A reviewer has asked the author a question or requested changes label Jul 21, 2024
Copy link
Collaborator

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

Thanks!

maintainer merge

Copy link

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

@urkud
Copy link
Member

urkud commented Jul 21, 2024

Please update the commit message to reflect name changes. Otherwise LGTM. Thanks!
bors d+

P.S.: Also, no need to include proofs in the commit message. It's enough to list lemma names.

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Jul 21, 2024

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

@Colin166
Copy link
Collaborator Author

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Jul 21, 2024
Adding a new theorem to Mathlib/Algebra/Order/Floor.lean : 

```
theorem round_half_bot : a - (1 / 2 : ℚ) < round a := by
  rw [round_eq, show (a - 1 / 2 : ℚ) = (a + 1 / 2) - 1 by ring]
  exact Int.sub_one_lt_floor (a + 1 / 2)
```
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Jul 21, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Order/Floor): x - 1 / 2 < round x [Merged by Bors] - feat(Order/Floor): x - 1 / 2 < round x Jul 21, 2024
@mathlib-bors mathlib-bors bot closed this Jul 21, 2024
@mathlib-bors mathlib-bors bot deleted the Colin166-patch-4 branch July 21, 2024 17:10
@adomani adomani mentioned this pull request Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated maintainer-merge new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants