@[simp]
theorem WList.take_prefixUntilVertex {α : Type u_1} {β : Type u_2} {x : α} {w : WList α β} [DecidableEq α] (hx : x ∈ w) :
@[simp]
theorem WList.drop_suffixFromVertex {α : Type u_1} {β : Type u_2} {x : α} {w : WList α β} [DecidableEq α] (hx : x ∈ w) :
theorem WList.suffixFromVertex_isSuffix_of_idxOf_le {α : Type u_1} {β : Type u_2} [DecidableEq α] {w : WList α β} {vl uf : α} (hvl : vl ∈ w) (huf : uf ∈ w) (hle : w.idxOf vl ≤ w.idxOf uf) :
(w.suffixFromVertex uf).IsSuffix (w.suffixFromVertex vl)
theorem WList.drop_eq_suffixFromVertex_of_idxOf {α : Type u_1} {β : Type u_2} {x : α} {w : WList α β} {n : ℕ} [DecidableEq α] (hx : x ∈ w) (hn : n = w.idxOf x) :
theorem WList.take_length_prefixUntilVertex {α : Type u_1} {β : Type u_2} {x : α} {w : WList α β} [DecidableEq α] (hx : x ∈ w) :
theorem WList.prefixUntilVertex_concat_of_exists {α : Type u_1} {β : Type u_2} {v x : α} {e : β} {w : WList α β} [DecidableEq α] (h : v ∈ w) :
theorem WList.suffixFromVertex_concat_of_exists {α : Type u_1} {β : Type u_2} {v x : α} {e : β} [DecidableEq α] (w : WList α β) (hb : v ∈ w) :
theorem WList.suffixFromVertex_concat_of_forall {α : Type u_1} {β : Type u_2} {x : α} {e : β} [DecidableEq α] (w : WList α β) (hb : x ∉ w) :
theorem WList.dedup_cons_of_mem {α : Type u_1} {β : Type u_2} {x : α} {w : WList α β} [DecidableEq α] (hxw : x ∈ w) (e : β) :
@[simp]
@[simp]
theorem WList.dedup_eq_self {α : Type u_1} {β : Type u_2} {w : WList α β} [DecidableEq α] (hw : w.vertex.Nodup) :
theorem WList.dedup_isSublist_deloop {α : Type u_1} {β : Type u_2} [DecidableEq α] (w : WList α β) :
Bypass repeated vertices while preserving endpoints and nonemptiness.
For different endpoints, apply dedup to the entire list. For equal endpoints,
retain the first edge and apply dedup to the tail.
Equations
- (WList.nil x_1).cycleBypass = WList.nil x_1
- (WList.cons x_1 e w).cycleBypass = if x_1 = w.last then WList.cons x_1 e w.dedup else (WList.cons x_1 e w).dedup
Instances For
@[simp]
@[simp]
theorem WList.cycleBypass_isSublist {α : Type u_1} {β : Type u_2} [DecidableEq α] (w : WList α β) :
w.cycleBypass.IsSublist w
theorem WList.cycleBypass_nonempty {α : Type u_1} {β : Type u_2} [DecidableEq α] {w : WList α β} (hw : w.Nonempty) :
@[simp]
theorem WList.cycleBypass_nonempty_iff {α : Type u_1} {β : Type u_2} {w : WList α β} [DecidableEq α] :
theorem WList.cycleBypass_eq_self_iff {α : Type u_1} {β : Type u_2} {w : WList α β} [DecidableEq α] :
cycleBypass fixes vertex-simple lists and closed lists with vertex-simple tails.
@[simp]
theorem WList.cycleBypass_cycleBypass {α : Type u_1} {β : Type u_2} [DecidableEq α] (w : WList α β) :