Commit 2026-05-21 10:51 c87cc975
View on Github →feat(Combinatorics/SimpleGraph/Walk): make p.Nil the simpNF of p = nil and p.length = 0 (#39218)
These are equivalent, and p.Nil works even when the endpoints of the walk aren't defeq.
[#graph theory > Deprecate `p = nil` in favor of `p.Nil`?](https://leanprover.zulipchat.com/#narrow/channel/252551-graph-theory/topic/Deprecate.20.60p.20.3D.20nil.60.20in.20favor.20of.20.60p.2ENil.60.3F/with/538017334)
The main event is Walk/Basic.lean:
- Swapped sides of
nil_iff_eq_nilto createeq_nil_iff_nil, tagged@[simp]and deprecated the original - Changed the RHS of
length_eq_zero_ifffromp = niltop.Nil, and generalized to non-closed walks - Deprecated
nil_iff_length_eqwhich is the symmetric iff - Added
Nil.length_eq_zeroalias - Untagged
exists_length_eq_zero_iffwith@[simp]and addedexists_nil_iffto replace it The 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= nil - [
Walk/Decomp] Addednil_rotateto replacerotate_eq_nilwhich is the same but with.Nilinstead of= nil