New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - feat(combinatorics/simple_graph/connectivity): add functions to split walks and to create paths #11095
Conversation
I see many repeated blocks of tactics across different proofs (usually after |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor things.
end | ||
|
||
lemma support_take_until_subset {u v w : V} (p : G.walk v w) (h : u ∈ p.support) : | ||
(p.take_until u h).support ⊆ p.support := |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have notions of sub-walk? Should we? (It's entirely possible the answer is no!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet, and I don't immediately have any plans for them.
The closest we have at the moment is that we can give an explicit append
expression: (p.take_until u h).append (p.drop_until u h) = p
namespace walk | ||
variables {G} [decidable_eq V] | ||
|
||
/-- Given a walk, produces a walk with the same endpoints and no repeated vertices. -/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice here to say that the new walk is a path, and that this is shown below. I can imagine cases where I want to "de-dup" a walk and carry around the property, rather than work in the subtype; perhaps that means this has a better name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it to bypass
since it creates a walk that bypasses the subwalks between duplicate vertices. Maybe that's a reasonable name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks reasonable to me, but hopefully someone more familiar with the graph theory library can confirm (@b-mehta ?)!
Sorry for not checking this sooner! LGTM bors merge |
… walks and to create paths (#11095) This is chunk 3 of #8737. Introduces `take_until` and `drop_until` to split walks at a vertex, `rotate` to rotate cycles, and `to_path` to remove internal redundancy from a walk to create a path with the same endpoints. This also defines a bundled `path` type for `is_path` since `G.path u v` is a useful type.
Pull request successfully merged into master. Build succeeded: |
This is chunk 3 of #8737. Introduces
take_until
anddrop_until
to split walks at a vertex,rotate
to rotate cycles, andto_path
to remove internal redundancy from a walk to create a path with the same endpoints.This also defines a bundled
path
type foris_path
sinceG.path u v
is a useful type.