Skip to content

feat(SimpleGraph/Connectivity): add vertex reachability and connectivity numbers#36063

Closed
SproutSeeds wants to merge 4 commits intoleanprover-community:masterfrom
SproutSeeds:cody/issue-34960-vertex-connectivity
Closed

feat(SimpleGraph/Connectivity): add vertex reachability and connectivity numbers#36063
SproutSeeds wants to merge 4 commits intoleanprover-community:masterfrom
SproutSeeds:cody/issue-34960-vertex-connectivity

Conversation

@SproutSeeds
Copy link
Copy Markdown

@SproutSeeds SproutSeeds commented Mar 3, 2026

Summary

Adds a first-pass vertex connectivity API for simple graphs.

  • define SimpleGraph.isolateVerts
  • define SimpleGraph.IsVertexReachable and SimpleGraph.IsVertexConnected
  • define SimpleGraph.vertexReachability and SimpleGraph.vertexConnectivity
  • add basic lemmas for reflexivity, symmetry, monotonicity, antitonicity, and the k = 0 and k = 1 characterizations

Closes #34960.

Local checks

  • ~/.elan/bin/lake build Mathlib/Combinatorics/SimpleGraph/Connectivity/VertexConnectivity.lean
  • ~/.elan/bin/lake exe lint-style Mathlib/Combinatorics/SimpleGraph/Connectivity/VertexConnectivity.lean
  • bash scripts/mathlib-issue-local-gate.sh --repo /Users/codymitchell/Documents/code/mathlib4 --issue 34960 --build-target Mathlib/Combinatorics/SimpleGraph/Connectivity/VertexConnectivity.lean --lint-module Mathlib.Combinatorics.SimpleGraph.Connectivity.VertexConnectivity --skip-mk-all

@github-actions github-actions Bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Mar 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 3, 2026

Welcome new contributor!

Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions.

We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the awaiting-author tag, or another reason described in the Lifecycle of a PR. The review dashboard has a dedicated webpage which shows whether your PR is on the review queue, and (if not), why.

If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR.

Thank you again for joining our community.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 3, 2026

PR summary 3426e8e0f1

Import changes for modified files

No significant changes to the import graph

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

Declarations diff

+ IsVertexConnected
+ IsVertexConnected.connected
+ IsVertexConnected.preconnected
+ IsVertexConnected.zero
+ IsVertexReachable
+ IsVertexReachable.anti
+ IsVertexReachable.mono
+ IsVertexReachable.reachable
+ IsVertexReachable.refl
+ IsVertexReachable.symm
+ IsVertexReachable.zero
+ isVertexConnected_one
+ isVertexReachable_comm
+ isVertexReachable_one
+ isolateVerts
+ isolateVerts_empty
+ isolateVerts_le
+ isolateVerts_mono
+ le_vertexConnectivity
+ le_vertexReachability
+ vertexConnectivity
+ vertexConnectivity_le_vertexReachability
+ vertexReachability

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

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

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


No changes to technical debt.

You can run this locally as

./scripts/reporting/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).

@github-actions github-actions Bot added the t-combinatorics Combinatorics label Mar 3, 2026
@SproutSeeds SproutSeeds marked this pull request as ready for review March 3, 2026 16:49
@SproutSeeds
Copy link
Copy Markdown
Author

Thanks for flagging this. You are right that this overlaps with #33355, and I should have coordinated first. I am closing this PR to avoid duplicate review load. Sorry for the noise here. I will help on #33355 instead and coordinate there.

@SproutSeeds SproutSeeds closed this Mar 4, 2026
@grunweg grunweg added the LLM-generated PRs with substantial input from LLMs - review accordingly label Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LLM-generated PRs with substantial input from LLMs - review accordingly new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! t-combinatorics Combinatorics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Graph theory def: Vertex connectivity

2 participants