Operations on walks #
Operations on walks that produce a new walk in the same graph.
Main definitions #
SimpleGraph.Walk.copy: Change the endpoints of a walk using equalitiesSimpleGraph.Walk.append: Concatenate two compatible walksSimpleGraph.Walk.concat: Concatenate an edge to the end of a walkSimpleGraph.Walk.reverse: Reverse a walkSimpleGraph.Walk.drop: Remove the firstndarts of a walkSimpleGraph.Walk.take: Take the firstndarts of a walkSimpleGraph.Walk.tail: Remove the first dart of a walkSimpleGraph.Walk.dropLast: Remove the last dart of a walk
Tags #
walks
Change the endpoints of a walk using equalities. This is helpful for relaxing
definitional equality constraints and to be able to state otherwise difficult-to-state
lemmas. While this is a simple wrapper around Eq.rec, it gives a canonical way to write it.
The simp-normal form is for the copy to be pushed outward. That way calculations can
occur within the "copy context."
Instances For
The concatenation of two compatible walks.
Equations
- SimpleGraph.Walk.nil.append q = q
- (SimpleGraph.Walk.cons h p).append x✝ = SimpleGraph.Walk.cons h (p.append x✝)
Instances For
The reversed version of SimpleGraph.Walk.cons, concatenating an edge to
the end of a walk.
Equations
- p.concat h = p.append (SimpleGraph.Walk.cons h SimpleGraph.Walk.nil)
Instances For
The concatenation of the reverse of the first walk with the second walk.
Equations
- SimpleGraph.Walk.nil.reverseAux x✝ = x✝
- (SimpleGraph.Walk.cons h p).reverseAux x✝ = p.reverseAux (SimpleGraph.Walk.cons ⋯ x✝)
Instances For
The walk in reverse.
Equations
Instances For
Auxiliary definition for SimpleGraph.Walk.concatRec
Equations
- SimpleGraph.Walk.concatRecAux Hnil Hconcat SimpleGraph.Walk.nil = Hnil
- SimpleGraph.Walk.concatRecAux Hnil Hconcat (SimpleGraph.Walk.cons h p) = ⋯ ▸ Hconcat p.reverse ⋯ (SimpleGraph.Walk.concatRecAux Hnil Hconcat p)
Instances For
Recursor on walks by inducting on SimpleGraph.Walk.concat.
This is inducting from the opposite end of the walk compared
to SimpleGraph.Walk.rec, which inducts on SimpleGraph.Walk.cons.
Equations
- SimpleGraph.Walk.concatRec Hnil Hconcat p = ⋯ ▸ SimpleGraph.Walk.concatRecAux Hnil Hconcat p.reverse
Instances For
The walk obtained by removing the first n darts of a walk.
Equations
- SimpleGraph.Walk.nil.drop n = SimpleGraph.Walk.nil
- p.drop 0 = p.copy ⋯ ⋯
- (SimpleGraph.Walk.cons h q).drop n_2.succ = q.drop n_2
Instances For
The walk obtained by taking the first n darts of a walk.
Equations
- SimpleGraph.Walk.nil.take n = SimpleGraph.Walk.nil
- p.take 0 = SimpleGraph.Walk.nil.copy ⋯ ⋯
- (SimpleGraph.Walk.cons h q).take n_2.succ = SimpleGraph.Walk.cons h (q.take n_2)
Instances For
The walk obtained by removing the first dart of a walk. A nil walk stays nil.
Instances For
The walk obtained by removing the last dart of a walk. A nil walk stays nil.
Instances For
Alias of SimpleGraph.Walk.tail_cons.
Alias of SimpleGraph.Walk.support_tail_of_not_nil.