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/basic): edge deletion #11054

Closed
wants to merge 11 commits into from

Conversation

kmill
Copy link
Collaborator

@kmill kmill commented Dec 25, 2021

Function to delete edges from a simple graph, and some associated lemmas.

Also defines sym2.to_rel as an inverse to sym2.from_rel.


Open in Gitpod

@kmill kmill requested a review from b-mehta December 25, 2021 22:00
@kmill kmill added the awaiting-review The author would like community review of the PR label Dec 25, 2021
Copy link
Collaborator

@b-mehta b-mehta left a comment

Choose a reason for hiding this comment

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

Can you use this to give the has_compl instance rather than something ad-hoc there?

src/combinatorics/simple_graph/subgraph.lean Outdated Show resolved Hide resolved
src/combinatorics/simple_graph/subgraph.lean Outdated Show resolved Hide resolved
Co-authored-by: Bhavik Mehta <bhavikmehta8@gmail.com>
@kmill
Copy link
Collaborator Author

kmill commented Dec 25, 2021

Can you use this to give the has_compl instance rather than something ad-hoc there?

I'm not sure what the right has_compl instance for subgraph would be. It seems there are options, but they're not involutions I think.

@b-mehta
Copy link
Collaborator

b-mehta commented Dec 26, 2021

Can you use this to give the has_compl instance rather than something ad-hoc there?

I'm not sure what the right has_compl instance for subgraph would be. It seems there are options, but they're not involutions I think.

Ah sorry, I was thinking of has_sdiff instance on simple_graph, maybe it doesn't apply

@kmill kmill changed the title feat(combinatorics/simple_graph/subgraph): edge deletion feat(combinatorics/simple_graph/basic): edge deletion Dec 26, 2021
@kmill
Copy link
Collaborator Author

kmill commented Dec 26, 2021

@b-mehta It turns out everything is better in terms of just edge deletion on simple graphs themselves, so it's switched over to that.

I thought about using sdiff to implement this, but you still have the complication of defining a simple graph from an edge set (so need to make it loopless). It seemed to be more straightforward just defining it directly.

@b-mehta
Copy link
Collaborator

b-mehta commented Dec 26, 2021

@b-mehta It turns out everything is better in terms of just edge deletion on simple graphs themselves, so it's switched over to that.

I thought about using sdiff to implement this, but you still have the complication of defining a simple graph from an edge set (so need to make it loopless). It seemed to be more straightforward just defining it directly.

Great! What about the opposite, ie using this to implement sdiff? That way you won't have the issue of making a simple graph from the edge set, since you'd be doing the reverse.

src/data/sym/sym2.lean Outdated Show resolved Hide resolved
@kmill
Copy link
Collaborator Author

kmill commented Dec 26, 2021

@b-mehta Ok, I added sym2.to_rel so that delete_edges has a similar definition to the has_sdiff instance, which uses adj := x.adj \ y.adj

Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

lgtm

bors merge

@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 27, 2021
bors bot pushed a commit that referenced this pull request Dec 27, 2021
Function to delete edges from a simple graph, and some associated lemmas.

Also defines `sym2.to_rel` as an inverse to `sym2.from_rel`.
@bors
Copy link

bors bot commented Dec 27, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(combinatorics/simple_graph/basic): edge deletion [Merged by Bors] - feat(combinatorics/simple_graph/basic): edge deletion Dec 27, 2021
@bors bors bot closed this Dec 27, 2021
@bors bors bot deleted the kmill_subgraph_edge_delete branch December 27, 2021 18:57
erdOne pushed a commit that referenced this pull request Jan 1, 2022
Function to delete edges from a simple graph, and some associated lemmas.

Also defines `sym2.to_rel` as an inverse to `sym2.from_rel`.
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

3 participants