feat(Combinatorics/SimpleGraph/Walk): make p.Nil the simpNF of p = nil and p.length = 0#39218
Open
SnirBroshi wants to merge 6 commits into
Open
Conversation
… nil` and `p.length = 0`
PR summary 686c76b39dImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
YaelDillies
reviewed
May 12, 2026
YaelDillies
approved these changes
May 12, 2026
Contributor
YaelDillies
left a comment
There was a problem hiding this comment.
Thanks! 🚀
maintainer merge
|
🚀 Pull request has been placed on the maintainer queue by YaelDillies. |
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.
These are equivalent, and
p.Nilworks even when the endpoints of the walk aren't defeq.The main event is
Walk/Basic.lean:nil_iff_eq_nilto createeq_nil_iff_nil, tagged@[simp]and deprecated the originallength_eq_zero_ifffromp = niltop.Nil, and generalized to non-closed walksnil_iff_length_eqwhich is the symmetric iffNil.length_eq_zeroaliasexists_length_eq_zero_iffwith@[simp]and addedexists_nil_iffto replace itThe rest is fixing everything that broke (or uses of now-deprecated lemmas), and:
Walk/Maps] Addednil_map_iffto replacemap_eq_nil_iffwhich is the same but with.Nilinstead of= nilWalk/Decomp] Addednil_rotateto replacerotate_eq_nilwhich is the same but with.Nilinstead of= nilAlso renamed
set_walk_*inCounting.leanto follow the naming convention.