Skip to content

[Merged by Bors] - feat(Combinatorics/SimpleGraphs): generalize SimpleGraph.map to any function#36130

Closed
vbeffara wants to merge 13 commits intoleanprover-community:masterfrom
vbeffara:SimpleGraph/map_noninj
Closed

[Merged by Bors] - feat(Combinatorics/SimpleGraphs): generalize SimpleGraph.map to any function#36130
vbeffara wants to merge 13 commits intoleanprover-community:masterfrom
vbeffara:SimpleGraph/map_noninj

Conversation

@vbeffara
Copy link
Collaborator

@vbeffara vbeffara commented Mar 4, 2026

The point is to be able to use map to define graph contractions. Added the injectivity assumption where needed.


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 Mar 4, 2026
@github-actions
Copy link

github-actions bot commented Mar 4, 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

github-actions bot commented Mar 4, 2026

PR summary 80f4a5fc04

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ map_adj'

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 4, 2026
@vbeffara vbeffara requested a review from YaelDillies March 4, 2026 12:43
@vbeffara vbeffara added the easy < 20s of review time. See the lifecycle page for guidelines. label Mar 4, 2026
@vbeffara vbeffara requested a review from SnirBroshi March 4, 2026 12:48
Copy link
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.

Looks good!

maintainer merge

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

🚀 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 Mar 4, 2026
@b-mehta b-mehta changed the title feat(Combionatorics/SimpleGraphs): generalize SimpleGraph.map to any function feat(Combinatorics/SimpleGraphs): generalize SimpleGraph.map to any function Mar 4, 2026
Copy link
Collaborator

@SnirBroshi SnirBroshi left a comment

Choose a reason for hiding this comment

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

Thanks for doing this!

vbeffara and others added 7 commits March 4, 2026 21:57
Co-authored-by: Snir Broshi <26556598+SnirBroshi@users.noreply.github.com>
Co-authored-by: Snir Broshi <26556598+SnirBroshi@users.noreply.github.com>
Co-authored-by: Snir Broshi <26556598+SnirBroshi@users.noreply.github.com>
Co-authored-by: Snir Broshi <26556598+SnirBroshi@users.noreply.github.com>
Co-authored-by: Snir Broshi <26556598+SnirBroshi@users.noreply.github.com>
Co-authored-by: Snir Broshi <26556598+SnirBroshi@users.noreply.github.com>
Co-authored-by: Snir Broshi <26556598+SnirBroshi@users.noreply.github.com>
Copy link
Contributor

@ocfnash ocfnash 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 d+

Comment on lines +598 to +601
{ f with map_rel_iff' := by {
rw [Equiv.coe_toEmbedding]
grind [Equiv.apply_eq_iff_eq, map_adj', Adj.ne]
} }
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{ f with map_rel_iff' := by {
rw [Equiv.coe_toEmbedding]
grind [Equiv.apply_eq_iff_eq, map_adj', Adj.ne]
} }
{ f with map_rel_iff' := by aesop (add simp map_adj') }

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Mar 5, 2026

✌️ vbeffara can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@mathlib-triage mathlib-triage bot added delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Mar 5, 2026
@vbeffara
Copy link
Collaborator Author

vbeffara commented Mar 5, 2026

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Mar 5, 2026
…unction (#36130)

The point is to be able to use map to define graph contractions. Added the injectivity assumption where needed.
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Mar 5, 2026

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Combinatorics/SimpleGraphs): generalize SimpleGraph.map to any function [Merged by Bors] - feat(Combinatorics/SimpleGraphs): generalize SimpleGraph.map to any function Mar 5, 2026
@mathlib-bors mathlib-bors bot closed this Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). easy < 20s of review time. See the lifecycle page for guidelines. 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.

5 participants