Skip to content

feat(SimpleGraph/Coloring/VertexColoring): Matching is 2 colorable#38344

Open
robo7179 wants to merge 2 commits into
leanprover-community:masterfrom
robo7179:2-colorable
Open

feat(SimpleGraph/Coloring/VertexColoring): Matching is 2 colorable#38344
robo7179 wants to merge 2 commits into
leanprover-community:masterfrom
robo7179:2-colorable

Conversation

@robo7179

Copy link
Copy Markdown

Open in Gitpod

@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 Apr 21, 2026
@github-actions

Copy link
Copy Markdown

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. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests.

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

github-actions Bot commented Apr 21, 2026

Copy link
Copy Markdown

PR summary 23ee525659

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ colorable_two_of_maxDegree_le_one

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.

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/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 Apr 21, 2026
@github-actions

github-actions Bot commented Apr 21, 2026

Copy link
Copy Markdown

✅ PR Title Formatted Correctly

The title of this PR has been updated to match our commit style conventions.
Thank you!

@robo7179 robo7179 changed the title Feat(SimpleGraph/Coloring/VertexColoring): Matching is 2 colorable feat(SimpleGraph/Coloring/VertexColoring): Matching is 2 colorable Apr 21, 2026
@SnirBroshi

SnirBroshi commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

It's a general fact that a locally-finite graph is G.Colorable (G.maxDegree + 1), I don't think we should have a specific proof for 1.
I have the general proof, see colorable_maxDegree_add_one in #38357.
However a specific proof for Subgraph.Matching (as your title suggests) might be nice if it's simple.

@vlad902

vlad902 commented Apr 25, 2026

Copy link
Copy Markdown
Collaborator

We don't seem to have (or I just missed) that matching subgraphs are bipartite. The result would then follow immediately.

EDIT: This is nonsense. SimpleGraph.IsBipartite is defined using 2-colorability so that makes no sense. I was originally thinking of the definition SimpleGraph.IsBipartiteWith though that's not really suitable here.

@mathlib-merge-conflicts mathlib-merge-conflicts Bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jun 7, 2026
@mathlib-merge-conflicts

Copy link
Copy Markdown

This pull request has conflicts, please merge master and resolve them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) 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.

4 participants