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(archive/imo): formalize IMO 2013 problem Q5 #5787

Closed
wants to merge 24 commits into from

Conversation

dwrensha
Copy link
Member


(reopening #5786 from a non-fork branch)

This ended up getting rather long. I'm willing to work some more on golfing it down, especially if an expert can provide some hints.

exact le_of_all_pow_lt_succ x y hx hy' h
end

lemma power_bound (n: ℕ) (ε:ℚ) (ha: 0 < ε) : 1 + (n:ℚ) * ε ≤ (1 + ε)^n :=
Copy link
Collaborator

@jsm28 jsm28 Jan 17, 2021

Choose a reason for hiding this comment

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

This seems like a more generally useful lemma that belongs in mathlib proper. Not in the specific form with and , but in various forms with the exponent being from any one of , or (in the first two cases you can probably prove something for powers of numbers in some kind of ordered semiring / ordered field) and whatever the weakest inequalities on the arguments are for the result to be true.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree that this could be generally useful. I've pushed a commit that generalizes ℚ to linear_ordered_comm_ring, and I've added a TODO about moving it into mathlib proper. I don't know about generalizing the exponent -- that sounds like it might make things a bit more complicated.

Copy link
Member

@hrmacbeth hrmacbeth Jan 18, 2021

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, and actually one_add_sub_mul_le_pow is even closer to what I need. Thanks!

@dwrensha dwrensha added the awaiting-review The author would like community review of the PR label Jan 18, 2021
archive/imo/imo2013_q5.lean Outdated Show resolved Hide resolved
archive/imo/imo2013_q5.lean Outdated Show resolved Hide resolved
archive/imo/imo2013_q5.lean Outdated Show resolved Hide resolved
archive/imo/imo2013_q5.lean Outdated Show resolved Hide resolved
@dwrensha
Copy link
Member Author

@bryangingechen Thanks for the review. I've cleaned up the formatting and split out some lemmas.

@bryangingechen bryangingechen added the imo Formalisation of an IMO problem label Jan 19, 2021
@bryangingechen
Copy link
Collaborator

@dwrensha I did some more golfing / formatting. If you're happy with my changes, feel free to merge.

Thanks!
bors d+

@bors
Copy link

bors bot commented Jan 27, 2021

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

@bryangingechen bryangingechen added awaiting-author A reviewer has asked the author a question or requested changes delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels Jan 27, 2021
@dwrensha
Copy link
Member Author

bors r+

bors bot pushed a commit that referenced this pull request Jan 27, 2021
Co-authored-by: Bryan Gin-ge Chen <bryangingechen@gmail.com>
@bors
Copy link

bors bot commented Jan 28, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(archive/imo): formalize IMO 2013 problem Q5 [Merged by Bors] - feat(archive/imo): formalize IMO 2013 problem Q5 Jan 28, 2021
@bors bors bot closed this Jan 28, 2021
@bors bors bot deleted the imo2013_q5 branch January 28, 2021 00:38
b-mehta pushed a commit that referenced this pull request Apr 2, 2021
Co-authored-by: Bryan Gin-ge Chen <bryangingechen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-author A reviewer has asked the author a question or requested changes delegated The PR author may merge after reviewing final suggestions. imo Formalisation of an IMO problem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants