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/100-theorems-list): friendship theorem (nr 83) #3970

Closed
wants to merge 159 commits into from

Conversation

awainverse
Copy link
Collaborator

defines friendship graphs
proves the friendship theorem (freek #83)


@awainverse awainverse 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 Aug 31, 2020
Comment on lines +19 to +20
- The friendship theorem (Erdős, Rényi, Sós 1966) states that every finite friendship graph has a
politician.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you give a full reference to the paper?

Is their proof the one you are formalising? If not, can you add references to what you are following?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've provided a link to the paper in question, and the paper with the proof that's closest to what we used. I'm going to have to figure out the standard format for full references.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think this is the right bibtex and all?

@semorrison
Copy link
Collaborator

Looks nice!

awainverse and others added 3 commits August 31, 2020 17:52
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
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!


/-- If `d ≤ 1`, a `d`-regular friendship graph has at most one vertex, which is
trivially a politician. -/
lemma deg_le_one_friendship_has_pol (hd : G.is_regular_of_degree d) (hd1 : d ≤ 1) :
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
lemma deg_le_one_friendship_has_pol (hd : G.is_regular_of_degree d) (hd1 : d ≤ 1) :
lemma exists_politician_of_degree_le_one (hd : G.is_regular_of_degree d) (hd1 : d ≤ 1) :

I think a lot of names here could be updated to the mathlib style guide. Of course this is the archive, and not mathlib-proper. But on the other hand, you could view this as an opportunity to showcase "how it's done".

In a similar spirit, I think some of the docstrings could be improved a bit, so that they are clear, even when read out of context.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oof, sorry for not going through those, wrote those months ago, so it all looked normal to me by now.
It should be a lot better now, although most names are a little longer.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

Choose a reason for hiding this comment

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

@awainverse Would you please also rewrite some of the docstrings a bit, like I wrote in the second half of the post upstairs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, sorry.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think the docstrings are a little more clear. If this doesn't look good, could you give me an example of a docstring that isn't clear on its own?

/-- We know that a friendship graph has a politician or is regular, so we assume it's regular.
If the degree is at most 2, we observe by casework that it has a politician anyway.
If the degree is at least 3, the graph cannot exist. -/
theorem friendship_theorem : exists_politician G :=
Copy link
Member

Choose a reason for hiding this comment

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

Btw, I'm ok with keeping this name as it is. 😄

@jcommelin jcommelin 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 1, 2020
@awainverse awainverse 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 1, 2020
@jcommelin jcommelin 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 1, 2020
@jcommelin
Copy link
Member

Please rewrite the docstrings a bit, so that they make sense out of context. Once that is done, this looks good to me!

@awainverse awainverse 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 1, 2020
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

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Sep 1, 2020
bors bot pushed a commit that referenced this pull request Sep 1, 2020
defines friendship graphs
proves the friendship theorem (freek #83)




Co-authored-by: Aaron Anderson <awainverse@gmail.com>
@bors
Copy link

bors bot commented Sep 1, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(archive/100-theorems-list): friendship theorem (nr 83) [Merged by Bors] - feat(archive/100-theorems-list): friendship theorem (nr 83) Sep 1, 2020
@bors bors bot closed this Sep 1, 2020
@bors bors bot deleted the friendship_final branch September 1, 2020 07:23
PatrickMassot pushed a commit that referenced this pull request Sep 8, 2020
defines friendship graphs
proves the friendship theorem (freek #83)




Co-authored-by: Aaron Anderson <awainverse@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants