Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

[Merged by Bors] - feat(archive/imo): formalize IMO 1969 problem 1 - #4261

Closed
lacker wants to merge 8 commits into
leanprover-community:masterfrom
lacker:master
Closed

lacker wants to merge 8 commits into
leanprover-community:masterfrom
lacker:master

Conversation

@lacker

@lacker lacker commented Sep 25, 2020 •

Copy link
Copy Markdown
Contributor

This is a formalization of the problem and solution for the first problem on the 1969 IMO:

Prove that there are infinitely many natural numbers $a$ with the following property: the number $z = n^4 + a$ is not prime for any natural number $n$


This is my first submission to mathlib, so please let me know if there are stylistic problems with this, or especially if I'm missing some easier way to do things.

Comment thread archive/imo/imo1969_q1.lean Outdated
Comment thread archive/imo/imo1969_q1.lean Outdated
Comment thread archive/imo/imo1969_q1.lean Outdated
Comment thread archive/imo/imo1969_q1.lean Outdated
Comment thread archive/imo/imo1969_q1.lean Outdated
Comment thread archive/imo/imo1969_q1.lean Outdated
@bryangingechen bryangingechen changed the title Formalize IMO 1969 problem 1. feat(archive/imo): formalize IMO 1969 problem 1 Sep 25, 2020
@bryangingechen bryangingechen added the awaiting-author A reviewer has asked the author a question or requested changes label Sep 25, 2020
Comment thread archive/imo/imo1969_q1.lean Outdated
Comment thread archive/imo/imo1969_q1.lean Outdated
Comment thread archive/imo/imo1969_q1.lean Outdated
Comment thread archive/imo/imo1969_q1.lean Outdated
Comment thread archive/imo/imo1969_q1.lean Outdated
Comment thread archive/imo/imo1969_q1.lean Outdated
Comment thread archive/imo/imo1969_q1.lean Outdated
@bryangingechen

Copy link
Copy Markdown
Collaborator

@lacker I've sent you an invite to create branches in this repo. The advantage of opening PRs from branches in the main mathlib repo is that our CI scripts will generate olean files for each commit and upload them to our Azure server where they can be fetched by leanproject.

@lacker

lacker commented Sep 28, 2020

Copy link
Copy Markdown
Contributor Author

Thanks reviewers. I've responded to all items of feedback, please take another look!

@jcommelin

Copy link
Copy Markdown
Member

Thanks reviewers. I've responded to all items of feedback, please take another look!

FYI, please change the label from awaiting-author to awaiting-review if you want reviewers to have another look. Most of us filter the PR queue using those labels.

@jcommelin jcommelin added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Sep 28, 2020
Comment thread archive/imo/imo1969_q1.lean Outdated
Comment thread archive/imo/imo1969_q1.lean Outdated
Comment thread archive/imo/imo1969_q1.lean Outdated
@robertylewis robertylewis added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Sep 30, 2020
@lacker lacker added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Sep 30, 2020
lemma int_large (a : ℤ) (h : 1 < a) : 1 < a.nat_abs :=
by exact_mod_cast lt_of_lt_of_le h le_nat_abs

lemma int_not_prime (a b : ℤ) (c : ℕ) (h1 : 1 < a) (h2 : 1 < b) (h3 : a*b = ↑c) : ¬ prime c :=

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
lemma int_not_prime (a b : ℤ) (c : ℕ) (h1 : 1 < a) (h2 : 1 < b) (h3 : a*b = ↑c) : ¬ prime c :=
lemma int_not_prime (a b : ℤ) (c : ℕ) (h₁ : 1 < a) (h₂ : 1 < b) (h₃ : a*b = ↑c) : ¬ prime c :=

Just a minor stylistic suggestion, not necessary to adopt. We love our unicode in mathlib. :-) You can type these just as \1, etc.

@kim-em

kim-em commented Sep 30, 2020

Copy link
Copy Markdown
Collaborator

Looks great, thank you!

bors d+

@bors

bors Bot commented Sep 30, 2020

Copy link
Copy Markdown

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

@kim-em kim-em added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels Sep 30, 2020
@lacker

lacker commented Oct 1, 2020

Copy link
Copy Markdown
Contributor Author

bors r+

bors Bot pushed a commit that referenced this pull request Oct 1, 2020
This is a formalization of the problem and solution for the first problem on the 1969 IMO:

Prove that there are infinitely many natural numbers $a$ with the following property: the number $z = n^4 + a$ is not prime for any natural number $n$
@bors

bors Bot commented Oct 1, 2020

Copy link
Copy Markdown

Pull request successfully merged into master.

Build succeeded:

@bors bors Bot changed the title feat(archive/imo): formalize IMO 1969 problem 1 [Merged by Bors] - feat(archive/imo): formalize IMO 1969 problem 1 Oct 1, 2020
@bors bors Bot closed this Oct 1, 2020
adomani pushed a commit that referenced this pull request Oct 7, 2020
This is a formalization of the problem and solution for the first problem on the 1969 IMO:

Prove that there are infinitely many natural numbers $a$ with the following property: the number $z = n^4 + a$ is not prime for any natural number $n$
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

delegated The PR author may merge after reviewing final suggestions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants