-
Notifications
You must be signed in to change notification settings - Fork 299
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
Conversation
…prover-community/mathlib into freek_83_friendship_theorem
- The friendship theorem (Erdős, Rényi, Sós 1966) states that every finite friendship graph has a | ||
politician. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
Looks nice! |
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
There was a problem hiding this 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) : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sorry.
There was a problem hiding this comment.
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 := |
There was a problem hiding this comment.
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. 😄
Please rewrite the docstrings a bit, so that they make sense out of context. Once that is done, this looks good to me! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 🎉
bors merge
defines friendship graphs proves the friendship theorem (freek #83) Co-authored-by: Aaron Anderson <awainverse@gmail.com>
Pull request successfully merged into master. Build succeeded: |
defines friendship graphs proves the friendship theorem (freek #83) Co-authored-by: Aaron Anderson <awainverse@gmail.com>
defines friendship graphs
proves the friendship theorem (freek #83)