feat(Combinatorics/SimpleGraph/Maps): G →g G.map f#38422
Open
SnirBroshi wants to merge 3 commits intoleanprover-community:masterfrom
Open
feat(Combinatorics/SimpleGraph/Maps): G →g G.map f#38422SnirBroshi wants to merge 3 commits intoleanprover-community:masterfrom
G →g G.map f#38422SnirBroshi wants to merge 3 commits intoleanprover-community:masterfrom
Conversation
5 tasks
PR summary e5c3d94642Import changes for modified filesNo significant changes to the import graph Import changes for all files
Declarations diff
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 No changes to technical debt.This script lives in the
|
eric-wieser
reviewed
Apr 23, 2026
| This is `Hom.map` spelled using colorings. The mapped graph `G.map f` can be thought of as taking | ||
| the original graph `G` and considering every color class (independent set) as a single vertex. -/ | ||
| @[simps!] | ||
| def Coloring.homMap {α : Type*} (f : G.Coloring α) : G →g G.map f := |
Member
There was a problem hiding this comment.
I'd suggest this would be better as an abbrev
Collaborator
Author
There was a problem hiding this comment.
Could you explain why? I thought abbrev is only for defining types that you want instances for (Zulip).
The simps tag provides the API. Do you instead mean @[reducible]?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The existing
SimpleGraph.Embedding.maptakes an embedding and lifts it to a graph embeddingG ↪g G.map f.#36130 generalized
SimpleGraph.mapfrom embeddings to functions, so now we can get a graph homomorphismG →g G.map fwithout requiring thatfis injective, although we still have to require that it is injective on adjacent vertices (aka a valid coloring).This adds
Coloring.homMap, andHom.mapwhich is identical but avoids coloring terminology/spelling.I'd love for suggestions to improve the docstring of
Coloring.homMap, I'm not sure about it :)Are the two versions a good idea, or should we just have the coloring one? (we have
{Hom,Embedding,Iso}.comapbut only{Embedding,Iso}.map)