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: Number of edges of a tree #5918

Closed
wants to merge 3 commits into from

Conversation

kmill
Copy link
Contributor

@kmill kmill commented Jul 14, 2023

Port/review of mathlib#18638 directly to Mathlib4.

Co-authored-by: Yaël Dillies yael.dillies@gmail.com
Co-authored-by: Bhavik Mehta bhavikmehta8@gmail.com


Open in Gitpod

Port/review of mathlib#18638

Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Co-authored-by: Bhavik Mehta <bhavikmehta8@gmail.com>
@kmill kmill added awaiting-review The author would like community review of the PR new-feature Add features not present in Mathlib 3 labels Jul 15, 2023
Comment on lines +161 to +162
lemma IsTree.card_edgeFinset [Fintype V] [Fintype G.edgeSet] (hG : G.IsTree) :
Finset.card G.edgeFinset + 1 = Fintype.card V := by
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit sad to see Fintype and Finset.card instead of Finite and Nat.card but poking around the graph theory library I see this is consistent with the rest.

What view do @b-mehta @YaelDillies @kmill @bottine have on refactoring to the classical world?

Copy link
Contributor Author

@kmill kmill Aug 1, 2023

Choose a reason for hiding this comment

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

@ocfnash The graph theory library pre-dates Finite (and you might notice that I'm the author of Finite, so you might be able to guess my general thoughts 😉). I hope eventually we can use Finite, but that'll take switching from things like Finset.sum to suitable Set counterparts. Any thoughts of refactoring had been put on hold due to the port.

Copy link
Collaborator

Choose a reason for hiding this comment

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

finset works great for the graph theory library. I don't think there's any switching to be done, but I agree that we should have nicer ways to say "This graph is finite" than spelling out all the fintype instaces.

Copy link
Contributor

@ocfnash ocfnash 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

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review The author would like community review of the PR labels Aug 1, 2023
bors bot pushed a commit that referenced this pull request Aug 1, 2023
Port/review of [mathlib#18638](leanprover-community/mathlib#18638) directly to Mathlib4.

Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Co-authored-by: Bhavik Mehta <bhavikmehta8@gmail.com>
@bors
Copy link

bors bot commented Aug 1, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title feat: Number of edges of a tree [Merged by Bors] - feat: Number of edges of a tree Aug 1, 2023
@bors bors bot closed this Aug 1, 2023
@bors bors bot deleted the port/tree_card_edges branch August 1, 2023 13:23
semorrison pushed a commit that referenced this pull request Aug 2, 2023
Port/review of [mathlib#18638](leanprover-community/mathlib#18638) directly to Mathlib4.

Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Co-authored-by: Bhavik Mehta <bhavikmehta8@gmail.com>
semorrison pushed a commit that referenced this pull request Aug 2, 2023
Port/review of [mathlib#18638](leanprover-community/mathlib#18638) directly to Mathlib4.

Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Co-authored-by: Bhavik Mehta <bhavikmehta8@gmail.com>
semorrison pushed a commit that referenced this pull request Aug 3, 2023
Port/review of [mathlib#18638](leanprover-community/mathlib#18638) directly to Mathlib4.

Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Co-authored-by: Bhavik Mehta <bhavikmehta8@gmail.com>
semorrison pushed a commit that referenced this pull request Aug 14, 2023
Port/review of [mathlib#18638](leanprover-community/mathlib#18638) directly to Mathlib4.

Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
Co-authored-by: Bhavik Mehta <bhavikmehta8@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature Add features not present in Mathlib 3 ready-to-merge This PR has been sent to bors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants