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

[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
@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 <[email protected]>
Co-authored-by: Kyle Miller <[email protected]>
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.
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.

7 participants