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(combinatorics/simple_graph/degree_sum): degree-sum formula and handshake lemma #5263

Closed
wants to merge 61 commits into from

Conversation

kmill
Copy link
Collaborator

@kmill kmill commented Dec 7, 2020

Adds the theorem that the sum of the degrees of the vertices of a simple graph is twice the number of edges. Also adds corollaries like the handshake lemma, which is that the number of odd-degree vertices is even.

The corollary exists_ne_odd_degree_if_exists_odd is in anticipation of Sperner's lemma.

agusakov and others added 30 commits December 2, 2020 15:00
Co-authored-by: Bhavik Mehta <bhavikmehta8@gmail.com>
Co-authored-by: Bhavik Mehta <bhavikmehta8@gmail.com>
Co-authored-by: Bryan Gin-ge Chen <bryangingechen@gmail.com>
Co-authored-by: Aaron Anderson <65780815+awainverse@users.noreply.github.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@b-mehta
Copy link
Collaborator

b-mehta commented Dec 8, 2020

Yeah I think this new definition to the dart type is the best option!

Copy link
Collaborator

@bryangingechen bryangingechen left a comment

Choose a reason for hiding this comment

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

I think the filename could be a little more general and make contact with the names of its declarations, maybe degree_sum.lean?

I made a few name suggestions; apologies if I missed some of the renamings.

LGTM once the TODO_move section is put in the right spot.

src/combinatorics/simple_graph/handshake.lean Outdated Show resolved Hide resolved
src/combinatorics/simple_graph/handshake.lean Outdated Show resolved Hide resolved
src/combinatorics/simple_graph/handshake.lean Outdated Show resolved Hide resolved
src/combinatorics/simple_graph/handshake.lean Outdated Show resolved Hide resolved
src/combinatorics/simple_graph/handshake.lean Outdated Show resolved Hide resolved
src/combinatorics/simple_graph/handshake.lean Outdated Show resolved Hide resolved
src/combinatorics/simple_graph/handshake.lean Outdated Show resolved Hide resolved
src/combinatorics/simple_graph/handshake.lean Outdated Show resolved Hide resolved
src/combinatorics/simple_graph/handshake.lean Outdated Show resolved Hide resolved
src/combinatorics/simple_graph/handshake.lean Outdated Show resolved Hide resolved
@bryangingechen bryangingechen 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 Dec 8, 2020
@kmill
Copy link
Collaborator Author

kmill commented Dec 8, 2020

I think the filename could be a little more general and make contact with the names of its declarations, maybe degree_sum.lean?

I changed it to degree_sum.lean. I was also considering darts.lean, but proving the degree-sum formula is the only use of them for now.

LGTM once the TODO_move section is put in the right spot.

I put them in data.nat.parity. CI will let us know if adding a data.zmod.basic import to that file will break anything...

@kmill kmill 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 Dec 8, 2020
@bryangingechen bryangingechen changed the title feat(combinatorics/simple_graph/handshake): degree-sum formula and handshake lemma feat(combinatorics/simple_graph/degree_sum): degree-sum formula and handshake lemma Dec 8, 2020
I'm doing this from my laptop, which doesn't have lean installed, so
this might take another commit if I made a mistake.
@kmill kmill 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 Dec 9, 2020
@kmill kmill 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 Dec 11, 2020
Copy link
Collaborator

@bryangingechen bryangingechen 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 r+

@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 Dec 11, 2020
bors bot pushed a commit that referenced this pull request Dec 11, 2020
…andshake lemma (#5263)

Adds the theorem that the sum of the degrees of the vertices of a simple graph is twice the number of edges.  Also adds corollaries like the handshake lemma, which is that the number of odd-degree vertices is even.

The corollary `exists_ne_odd_degree_if_exists_odd` is in anticipation of Sperner's lemma.

Co-authored-by: agusakov <39916842+agusakov@users.noreply.github.com>
Co-authored-by: Kyle Miller <kmill31415@gmail.com>
@bors
Copy link

bors bot commented Dec 11, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(combinatorics/simple_graph/degree_sum): degree-sum formula and handshake lemma [Merged by Bors] - feat(combinatorics/simple_graph/degree_sum): degree-sum formula and handshake lemma Dec 11, 2020
@bors bors bot closed this Dec 11, 2020
@bors bors bot deleted the degree-sum branch December 11, 2020 04:55
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