w₁.IsSublist w₂ means that w₁ is a wList using some of the vertices and edges of w₂
in the same order that they appear in w₂.
Examples include prefixes, suffixes and wLists obtained from w₂ by shortcuts.
- nil {α : Type u_1} {β : Type u_2} {x : α} {w : WList α β} (h : x ∈ w) : (WList.nil x).IsSublist w
- cons {α : Type u_1} {β : Type u_2} (x : α) (e : β) {w₁ w₂ : WList α β} (h : w₁.IsSublist w₂) : w₁.IsSublist (WList.cons x e w₂)
- cons₂ {α : Type u_1} {β : Type u_2} (x : α) (e : β) {w₁ w₂ : WList α β} (h : w₁.IsSublist w₂) (h_eq : w₁.first = w₂.first) : (WList.cons x e w₁).IsSublist (WList.cons x e w₂)
Instances For
@[instance_reducible]
The sublist order as a partial order on WList α β, for access to order API.
Equations
- WList.instPartialOrder = { le := WList.IsSublist, le_refl := ⋯, le_trans := ⋯, lt_iff_le_not_ge := ⋯, le_antisymm := ⋯ }
theorem WList.WellFormed.sublist {α : Type u_1} {β : Type u_2} {w₁ w₂ : WList α β} (h : w₂.WellFormed) (hle : w₁.IsSublist w₂) :
w₁.WellFormed
Prefixes #
instance WList.instIsPartialOrderIsPrefix {α : Type u_1} {β : Type u_2} :
IsPartialOrder (WList α β) IsPrefix
instance WList.instIsPartialOrderIsSuffix {α : Type u_1} {β : Type u_2} :
IsPartialOrder (WList α β) IsSuffix
theorem WList.IsSuffix.cons {α : Type u_1} {β : Type u_2} {w₁ w₂ : WList α β} (h : w₁.IsSuffix w₂) (x : α) (e : β) :
w₁.IsSuffix (WList.cons x e w₂)
Infixes #
IsInfix w₁ w₂ means that w₁ appears as a contiguous sub-wList of w₂.
More precisely, w₂ decomposes as wL ++ w₁ ++ wR with the obvious endpoint compatibilities.
Equations
Instances For
instance WList.IsInfix.instIsPartialOrder {α : Type u_1} {β : Type u_2} :
IsPartialOrder (WList α β) IsInfix
Decomposed wLists #
Equations
- WList.«term_⁺» = Lean.ParserDescr.trailingNode `WList.«term_⁺» 1022 0 (Lean.ParserDescr.symbol "⁺")
Instances For
@[simp]
structure WList.DecomposeTo {α : Type u_1} {β : Type u_2} [Inhabited α] (w : WList α β) (L : List (WList α β)) :
A decomposed wList is a list of wLists that appends to the original wList and the last vertex of each wList is the first vertex of the next wList.
As there is no 'emtpy' wList, we start the fold with the default value of α.
Hence, without the nonempty assumption, wList nil default decompose to the empty list.
- chain_eq : List.IsChain (fun (x1 x2 : WList α β) => x1.last = x2.first) L
Instances For
@[simp]
@[simp]
theorem WList.DecomposeTo.nil_cons {α : Type u_1} {β : Type u_2} {x : α} {w : WList α β} {L : List (WList α β)} [Inhabited α] (h : w.DecomposeTo (nil x :: L)) (hne : L ≠ []) :
w.DecomposeTo L
theorem WList.DecomposeTo.reverse {α : Type u_1} {β : Type u_2} {w : WList α β} {L : List (WList α β)} [Inhabited α] (h : w.DecomposeTo L) :
theorem WList.DecomposeTo.disjoint_of_edge_nodup {α : Type u_1} {β : Type u_2} [Inhabited α] {w : WList α β} {L : List (WList α β)} (h : w.DecomposeTo L) (hw : w.edge.Nodup) :