Skip to content

[Merged by Bors] - feat(Combinatorics/Graph): graph deletion operations#35879

Closed
Jun2M wants to merge 48 commits into
leanprover-community:masterfrom
Jun2M:GraphDelete
Closed

[Merged by Bors] - feat(Combinatorics/Graph): graph deletion operations#35879
Jun2M wants to merge 48 commits into
leanprover-community:masterfrom
Jun2M:GraphDelete

Conversation

@Jun2M
Copy link
Copy Markdown
Collaborator

@Jun2M Jun2M commented Feb 28, 2026

This PR adds definitions and basic lemmas for deleting edges and vertices from a graph in Mathlib/Combinatorics/Graph/Delete.lean.

It introduces the following operations:

  • restrict: the subgraph of G restricted to the edges in F without
    removing vertices
  • deleteEdges: the subgraph of G with the edges in F deleted
  • induce: the subgraph of G induced by the set X of vertices
  • deleteVerts : the graph obtained from G by deleting the set X of vertices

These definitions are accompanied by simp lemmas describing their edge sets, incidence relations, and basic properties such as monotonicity.

Co-authored-by: Peter Nelson apn.uni@gmail.com


Open in Gitpod

Comment thread Mathlib/Combinatorics/Graph/Basic.lean Outdated
Comment thread Mathlib/Combinatorics/Graph/Delete.lean Outdated
Comment thread Mathlib/Combinatorics/Graph/Delete.lean Outdated
Comment thread Mathlib/Combinatorics/Graph/Delete.lean Outdated
@YaelDillies YaelDillies added awaiting-author A reviewer has asked the author a question or requested changes. and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Apr 8, 2026
@Jun2M Jun2M removed the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 8, 2026
@Jun2M Jun2M requested a review from YaelDillies April 8, 2026 18:58
Comment thread Mathlib/Combinatorics/Graph/Basic.lean
Comment thread Mathlib/Combinatorics/Graph/Delete.lean Outdated
Comment thread Mathlib/Combinatorics/Graph/Delete.lean Outdated
@YaelDillies YaelDillies added the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 9, 2026
@Jun2M Jun2M removed the awaiting-author A reviewer has asked the author a question or requested changes. label Apr 9, 2026
Comment thread Mathlib/Combinatorics/Graph/Delete.lean Outdated

namespace Graph

/-- Restrict `G : Graph α β` to the edges in a set `E₀` without removing vertices -/
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.

Would restrictEdges make more sense here, to make it clear that this isn't restricting the vertex set? (I could imagine the restriction of a graph to a vertex set also being a reasonable informal description of induce)

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.

restrict is named to mirror the name already given for SimpleGraph, SimpleGraph.Subgraph.restrict. Do you think it is still worth it to break the symmetry and change the name?

Jun2M and others added 2 commits April 10, 2026 14:50
@Jun2M Jun2M requested review from YaelDillies and b-mehta April 11, 2026 00:35
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

It's in @Bhavik Mehta's hands now

maintainer merge?

@github-actions
Copy link
Copy Markdown

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

@mathlib-triage mathlib-triage Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Apr 14, 2026
Copy link
Copy Markdown
Contributor

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

Thanks!

bors merge

@mathlib-triage mathlib-triage Bot 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 Apr 15, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Apr 15, 2026
This PR adds definitions and basic lemmas for deleting edges and vertices from a graph in Mathlib/Combinatorics/Graph/Delete.lean.

It introduces the following operations:
- `restrict`: the subgraph of `G` restricted to the edges in `F` without
removing vertices
- `deleteEdges`: the subgraph of `G` with the edges in `F` deleted
- `induce`: the subgraph of `G` induced by the set `X` of vertices
- `deleteVerts` : the graph obtained from `G` by deleting the set `X` of vertices

These definitions are accompanied by simp lemmas describing their edge sets, incidence relations, and basic properties such as monotonicity.

Co-authored-by: Peter Nelson [apn.uni@gmail.com](mailto:apn.uni@gmail.com)
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors Bot commented Apr 15, 2026

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat(Combinatorics/Graph): graph deletion operations [Merged by Bors] - feat(Combinatorics/Graph): graph deletion operations Apr 15, 2026
@mathlib-bors mathlib-bors Bot closed this Apr 15, 2026
jessealama pushed a commit to jessealama/mathlib4 that referenced this pull request May 2, 2026
…unity#35879)

This PR adds definitions and basic lemmas for deleting edges and vertices from a graph in Mathlib/Combinatorics/Graph/Delete.lean.

It introduces the following operations:
- `restrict`: the subgraph of `G` restricted to the edges in `F` without
removing vertices
- `deleteEdges`: the subgraph of `G` with the edges in `F` deleted
- `induce`: the subgraph of `G` induced by the set `X` of vertices
- `deleteVerts` : the graph obtained from `G` by deleting the set `X` of vertices

These definitions are accompanied by simp lemmas describing their edge sets, incidence relations, and basic properties such as monotonicity.

Co-authored-by: Peter Nelson [apn.uni@gmail.com](mailto:apn.uni@gmail.com)
gaetanserre pushed a commit to gaetanserre/mathlib4 that referenced this pull request May 5, 2026
…unity#35879)

This PR adds definitions and basic lemmas for deleting edges and vertices from a graph in Mathlib/Combinatorics/Graph/Delete.lean.

It introduces the following operations:
- `restrict`: the subgraph of `G` restricted to the edges in `F` without
removing vertices
- `deleteEdges`: the subgraph of `G` with the edges in `F` deleted
- `induce`: the subgraph of `G` induced by the set `X` of vertices
- `deleteVerts` : the graph obtained from `G` by deleting the set `X` of vertices

These definitions are accompanied by simp lemmas describing their edge sets, incidence relations, and basic properties such as monotonicity.

Co-authored-by: Peter Nelson [apn.uni@gmail.com](mailto:apn.uni@gmail.com)
gasparattila pushed a commit to gasparattila/mathlib4 that referenced this pull request May 9, 2026
…unity#35879)

This PR adds definitions and basic lemmas for deleting edges and vertices from a graph in Mathlib/Combinatorics/Graph/Delete.lean.

It introduces the following operations:
- `restrict`: the subgraph of `G` restricted to the edges in `F` without
removing vertices
- `deleteEdges`: the subgraph of `G` with the edges in `F` deleted
- `induce`: the subgraph of `G` induced by the set `X` of vertices
- `deleteVerts` : the graph obtained from `G` by deleting the set `X` of vertices

These definitions are accompanied by simp lemmas describing their edge sets, incidence relations, and basic properties such as monotonicity.

Co-authored-by: Peter Nelson [apn.uni@gmail.com](mailto:apn.uni@gmail.com)
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.

3 participants