A WList α β is an alternating list [v₀, e₁, v₁, ... , eₙ, vₙ] where the vᵢ have type α
and the eᵢ have type β. The first and last terms always have type α.
The definition does not depend on Graph, but the intended use case is where α and β are the
vertex and edge types of some G : Graph α β, and the WList is though of as a walk of G.
The abstract definition allows us to easily express the idea that a particular
list of vertices and edges is a walk in more than one graph.
(Note that a WList α β may not correspond to an actual walk in any Graph α β.
For instance, if all eᵢ are equal, and there are at least three different vᵢ,
then such a graph would have to have an edge with more than two ends. )
- nil {α : Type u_3} {β : Type u_4} (u : α) : WList α β
- cons {α : Type u_3} {β : Type u_4} (u : α) (e : β) (w : WList α β) : WList α β
Instances For
Equations
- WList.instRepr = { reprPrec := fun (w : WList α β) (n : ℕ) => Std.Format.text "W[" ++ w.repr_aux n ++ Std.Format.text "]" }
First and Last #
Vertex/Edge Lists #
Membership #
w.UniqueMem x means that x : α appears in w exactly once.
- nil {α : Type u_1} {β : Type u_2} (x : α) : (WList.nil x).UniqueMem x
- cons_eq {α : Type u_1} {β : Type u_2} {x : α} (e : β) (w : WList α β) (h : x ∉ w) : (cons x e w).UniqueMem x
- cons_ne {α : Type u_1} {β : Type u_2} {x u : α} (h : u ≠ x) (e : β) (w : WList α β) (hw : w.UniqueMem x) : (cons u e w).UniqueMem x
Instances For
Vertex/Edge Sets #
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Emptiness #
Alias of the forward direction of WList.nil_iff_eq_nil.
Alias of the reverse direction of not_nonempty_iff.
Alias of the reverse direction of WList.not_nil_iff.
Equations
- (WList.nil x).DecidableNonempty = ⋯.mpr instDecidableFalse
- (WList.cons x e w_2).DecidableNonempty = ⋯.mpr instDecidableTrue
The first edge of a nonempty WList
Equations
- WList.Nonempty.firstEdge (WList.nil x_2) hw = ⋯.elim
- WList.Nonempty.firstEdge (WList.cons x_2 e w) hw = e
Instances For
Alias of the forward direction of WList.nonempty_iff_exists_edge.
Nontriviality #
Length #
w.DInc e x y means that w contains [x,e,y] as a contiguous sublist.
(DInc stands for 'directed incidence')`
- cons_left {α : Type u_1} {β : Type u_2} (x : α) (e : β) (w : WList α β) : (WList.cons x e w).DInc e x w.first
- cons {α : Type u_1} {β : Type u_2} (u : α) (f : β) {w : WList α β} {e : β} {x y : α} (hw : w.DInc e x y) : (WList.cons u f w).DInc e x y
Instances For
Equations
w.IsLink e x y means that w contains [x,e,y] or [y,e,x] as a contiguous sublist.
- cons_left {α : Type u_1} {β : Type u_2} (x : α) (e : β) (w : WList α β) : (WList.cons x e w).IsLink e x w.first
- cons_right {α : Type u_1} {β : Type u_2} (x : α) (e : β) (w : WList α β) : (WList.cons x e w).IsLink e w.first x
- cons {α : Type u_1} {β : Type u_2} (u : α) (f : β) {w : WList α β} {e : β} {x y : α} (hw : w.IsLink e x y) : (WList.cons u f w).IsLink e x y
Instances For
Equations
- h.other = Exists.choose h