Skip to content

[Merged by Bors] - feat(Combinatorics/SimpleGraph/Path): representatives of connected components - #20024

Closed
pimotte wants to merge 18 commits into
masterfrom
PO_component_rep
Closed

pimotte wants to merge 18 commits into
masterfrom
PO_component_rep

Conversation

@pimotte

@pimotte pimotte commented Dec 17, 2024 •

Copy link
Copy Markdown
Collaborator

Add the concept of a set of representatives of a connected component along with some basic lemma's on it.
In preparation for a proof of Tutte's theorem.


Open in Gitpod

Zulip thread on Tutte's

This PR is the result of cleaning up this file which gives some context to how this will be used further.

@pimotte pimotte added the t-combinatorics Combinatorics label Dec 17, 2024
@pimotte
pimotte requested a review from YaelDillies December 17, 2024 14:34
@github-actions

github-actions Bot commented Dec 17, 2024 •

Copy link
Copy Markdown

messageFile.md

@YaelDillies
YaelDillies requested a review from b-mehta December 23, 2024 14:46
@YaelDillies

Copy link
Copy Markdown
Contributor

Looks okay to me, but I wonder whether we really want to provide API about some section rather than any section

@bryangingechen

Copy link
Copy Markdown
Contributor

I think "representant" (French, I'm assuming) is usually written as "representative" in English.

@github-actions github-actions Bot added the large-import Automatically added label for PRs with a significant increase in transitive imports label Dec 24, 2024
@pimotte pimotte changed the title feat(Combinatorics/SimpleGraph/Path): representant of connected component feat(Combinatorics/SimpleGraph/Path): representatives of connected components Dec 24, 2024
@pimotte

pimotte commented Dec 24, 2024

Copy link
Copy Markdown
Collaborator Author

Looks okay to me, but I wonder whether we really want to provide API about some section rather than any section

I've adapted it to this paradigm and added some more lemma's to see how it pans out, and I like the structure, I'm not entirely sure about naming.

@YaelDillies

Copy link
Copy Markdown
Contributor

Will wait on @b-mehta's opinion

/-- A set of vertices represents a set of components if it contains exactly
one vertex from each component.
-/
structure _root_.Set.Represents (s : Set V) (C : Set (G.ConnectedComponent)) where

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, looking at this definition, it doesn't really seem like it's specific to graphs... That is, given a partition of a subset, it's reasonable to define a set of representatives for it. I could, however, believe that this formulation (using connectedComponent rather than an arbitrary partition) is helpful in your application. But it certainly doesn't look like it belongs in SimpleGraph/Path. Can we move this to a subfolder on connected components instead?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I have done this, but I have also put together #21097 as an alternative. In the past I have made missteps with Quot, and I'm still not really certain on the nuances and design of the Quot/ConnectedComponent situation.

If the alternative makes sense, I wonder if it also makes sense to migrate off supp and use the SetLike instance instead, so feel free to weigh in if you have any thoughts on that:)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I just noticed we have the SetLike instance I introduced in that PR already for connected components

Is there a particular reason we use .supp explicitly and tend not to rely on this instance?

@b-mehta b-mehta added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Jan 24, 2025
@github-actions github-actions Bot removed the large-import Automatically added label for PRs with a significant increase in transitive imports label Jan 26, 2025
@github-actions

Copy link
Copy Markdown

messageFile.md

@github-actions

Copy link
Copy Markdown

messageFile.md

@YaelDillies

Copy link
Copy Markdown
Contributor

Ah, can you merge master to fix the bot?

@github-actions

github-actions Bot commented Jan 26, 2025 •

Copy link
Copy Markdown

PR summary 7e2b7f649c

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Combinatorics.SimpleGraph.Connectivity.Represents (new file) 705

Declarations diff

+ Represents
+ disjoint_supp_of_not_mem
+ existsUnique_rep
+ image_out
+ ncard_inter
+ ncard_sdiff_of_mem
+ ncard_sdiff_of_not_mem

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@pimotte pimotte removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Jan 26, 2025
@pimotte

pimotte commented Jan 30, 2025

Copy link
Copy Markdown
Collaborator Author

Superseded by #21097 per discussion in the zulip thread linked above

@pimotte pimotte closed this Jan 30, 2025
@pimotte pimotte reopened this Feb 6, 2025
@pimotte

pimotte commented Feb 6, 2025

Copy link
Copy Markdown
Collaborator Author

Reopened after Zulip discussion on #21097 landing on it being better to not generalize for now.

@YaelDillies YaelDillies added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Feb 6, 2025
@pimotte pimotte removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Feb 6, 2025

@YaelDillies YaelDillies left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

maintainer delegate

@github-actions

github-actions Bot commented Feb 6, 2025

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by YaelDillies.

@github-actions github-actions Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Feb 6, 2025
@kbuzzard

Copy link
Copy Markdown
Member

Thanks!

bors merge

@ghost ghost added ready-to-merge This PR has been sent to bors. and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Feb 10, 2025
mathlib-bors Bot pushed a commit that referenced this pull request Feb 10, 2025
…mponents (#20024)

Add the concept of a set of representatives of a connected component along with some basic lemma's on it.
In preparation for a proof of Tutte's theorem.




Co-authored-by: Pim Otte <[email protected]>
@mathlib-bors

mathlib-bors Bot commented Feb 10, 2025

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat(Combinatorics/SimpleGraph/Path): representatives of connected components [Merged by Bors] - feat(Combinatorics/SimpleGraph/Path): representatives of connected components Feb 10, 2025
@mathlib-bors mathlib-bors Bot closed this Feb 10, 2025
@mathlib-bors
mathlib-bors Bot deleted the PO_component_rep branch February 10, 2025 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-combinatorics Combinatorics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants