The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V30. Combinatorics

Mathlib.Combinatorics.SimpleGraph.Walk.Operations

175 declarations and 3 deprecated aliases. Mathlib docs · Source

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 equalities
  • SimpleGraph.Walk.append: Concatenate two compatible walks
  • SimpleGraph.Walk.concat: Concatenate an edge to the end of a walk
  • SimpleGraph.Walk.reverse: Reverse a walk
  • SimpleGraph.Walk.drop: Remove the first n darts of a walk
  • SimpleGraph.Walk.take: Take the first n darts of a walk
  • SimpleGraph.Walk.tail: Remove the first dart of a walk
  • SimpleGraph.Walk.dropLast: Remove the last dart of a walk

Tags

walks

theorem SimpleGraph.Walk.concatRecAux.match_1.congr_eq_2 E1 #

∀ {V : Type u_1} {G : SimpleGraph V} {u : V} (motive : (v : V) → G.Walk u v → Sort u_2) (v : V) (x : G.Walk u v)
  (h_1 : Unit → motive u SimpleGraph.Walk.nil)
  (h_2 : (v v_1 : V) → (h : G.Adj u v_1) → (p : G.Walk v_1 v) → motive v (SimpleGraph.Walk.cons h p)) (v_1 v_2 : V)
  (h : G.Adj u v_2) (p : G.Walk v_2 v_1),
  v = v_1 →
    x ≍ SimpleGraph.Walk.cons h p →
      (match v, x with
        | .(u), SimpleGraph.Walk.nil => h_1 ()
        | v, SimpleGraph.Walk.cons h p => h_2 v v_3 h p) ≍
        h_2 v_1 v_2 h p

theorem SimpleGraph.Walk.concatRecAux.match_1.congr_eq_1 E1 #

∀ {V : Type u_1} {G : SimpleGraph V} {u : V} (motive : (v : V) → G.Walk u v → Sort u_2) (v : V) (x : G.Walk u v)
  (h_1 : Unit → motive u SimpleGraph.Walk.nil)
  (h_2 : (v v_1 : V) → (h : G.Adj u v_1) → (p : G.Walk v_1 v) → motive v (SimpleGraph.Walk.cons h p)),
  v = u →
    x ≍ SimpleGraph.Walk.nil →
      (match v, x with
        | .(u), SimpleGraph.Walk.nil => h_1 ()
        | v, SimpleGraph.Walk.cons h p => h_2 v v_1 h p) ≍
        h_1 ()

theorem SimpleGraph.Walk.drop.match_1.congr_eq_2 E1 #

∀ {V : Type u_1} {G : SimpleGraph V} {u : V} (motive : (v : V) → G.Walk u v → ℕ → Sort u_2) (v : V) (p : G.Walk u v)
  (n : ℕ) (h_1 : (x : ℕ) → motive u SimpleGraph.Walk.nil x) (h_2 : (v : V) → (p : G.Walk u v) → motive v p 0)
  (h_3 : (v v_1 : V) → (h : G.Adj u v_1) → (q : G.Walk v_1 v) → (n : ℕ) → motive v (SimpleGraph.Walk.cons h q) n.succ)
  (v_1 : V) (p_1 : G.Walk u v_1),
  v = v_1 →
    p ≍ p_1 →
      n = 0 →
        (v_1 = u → p_1 ≍ SimpleGraph.Walk.nil → False) →
          (match v, p, n with
            | .(u), SimpleGraph.Walk.nil, x => h_1 x
            | v, p, 0 => h_2 v p
            | v, SimpleGraph.Walk.cons h q, n.succ => h_3 v v_2 h q n) ≍
            h_2 v_1 p_1

theorem SimpleGraph.Walk.copy.hcongr_9 E1 #

∀ (V V' : Type u),
  V = V' →
    ∀ (G : SimpleGraph V) (G' : SimpleGraph V'),
      G ≍ G' →
        ∀ (u : V) (u' : V'),
          u ≍ u' →
            ∀ (v : V) (v' : V'),
              v ≍ v' →
                ∀ (u'_1 : V) (u'' : V'),
                  u'_1 ≍ u'' →
                    ∀ (v'_1 : V) (v'' : V'),
                      v'_1 ≍ v'' →
                        ∀ (p : G.Walk u v) (p' : G'.Walk u' v'),
                          p ≍ p' →
                            ∀ (hu : u = u'_1) (hu' : u' = u''),
                              hu ≍ hu' → ∀ (hv : v = v'_1) (hv' : v' = v''), hv ≍ hv' → p.copy hu hv ≍ p'.copy hu' hv'

theorem SimpleGraph.Walk.copy.congr_simp E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v u' v' : V} (p p_1 : G.Walk u v),
  p = p_1 → ∀ (hu : u = u') (hv : v = v'), p.copy hu hv = p_1.copy hu hv

theorem SimpleGraph.Walk.concat.congr_simp E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p p_1 : G.Walk u v),
  p = p_1 → ∀ (h : G.Adj v w), p.concat h = p_1.concat h

theorem SimpleGraph.Walk.drop.match_1.congr_eq_3 E1 #

∀ {V : Type u_1} {G : SimpleGraph V} {u : V} (motive : (v : V) → G.Walk u v → ℕ → Sort u_2) (v : V) (p : G.Walk u v)
  (n : ℕ) (h_1 : (x : ℕ) → motive u SimpleGraph.Walk.nil x) (h_2 : (v : V) → (p : G.Walk u v) → motive v p 0)
  (h_3 : (v v_1 : V) → (h : G.Adj u v_1) → (q : G.Walk v_1 v) → (n : ℕ) → motive v (SimpleGraph.Walk.cons h q) n.succ)
  (v_1 v_2 : V) (h : G.Adj u v_2) (q : G.Walk v_2 v_1) (n_1 : ℕ),
  v = v_1 →
    p ≍ SimpleGraph.Walk.cons h q →
      n = n_1.succ →
        (match v, p, n with
          | .(u), SimpleGraph.Walk.nil, x => h_1 x
          | v, p, 0 => h_2 v p
          | v, SimpleGraph.Walk.cons h q, n.succ => h_3 v v_3 h q n) ≍
          h_3 v_1 v_2 h q n_1

theorem SimpleGraph.Walk.Nil.hcongr_5 E1 #

∀ (V V' : Type u),
  V = V' →
    ∀ (G : SimpleGraph V) (G' : SimpleGraph V'),
      G ≍ G' →
        ∀ (v : V) (v' : V'),
          v ≍ v' → ∀ (w : V) (w' : V'), w ≍ w' → ∀ (a : G.Walk v w) (a' : G'.Walk v' w'), a ≍ a' → a.Nil ≍ a'.Nil

theorem SimpleGraph.Walk.drop.match_1.congr_eq_1 E1 #

∀ {V : Type u_1} {G : SimpleGraph V} {u : V} (motive : (v : V) → G.Walk u v → ℕ → Sort u_2) (v : V) (p : G.Walk u v)
  (n : ℕ) (h_1 : (x : ℕ) → motive u SimpleGraph.Walk.nil x) (h_2 : (v : V) → (p : G.Walk u v) → motive v p 0)
  (h_3 : (v v_1 : V) → (h : G.Adj u v_1) → (q : G.Walk v_1 v) → (n : ℕ) → motive v (SimpleGraph.Walk.cons h q) n.succ)
  (x : ℕ),
  v = u →
    p ≍ SimpleGraph.Walk.nil →
      n = x →
        (match v, p, n with
          | .(u), SimpleGraph.Walk.nil, x => h_1 x
          | v, p, 0 => h_2 v p
          | v, SimpleGraph.Walk.cons h q, n.succ => h_3 v v_1 h q n) ≍
          h_1 x

def SimpleGraph.Walk.copy E3 #

{V : Type u} → {G : SimpleGraph V} → {u v u' v' : V} → G.Walk u v → u = u' → v = v' → G.Walk u' v'

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."

theorem SimpleGraph.Walk.copy_rfl_rfl E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), p.copy ⋯ ⋯ = p

theorem SimpleGraph.Walk.copy_copy E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v u' v' u'' v'' : V} (p : G.Walk u v) (hu : u = u') (hv : v = v') (hu' : u' = u'')
  (hv' : v' = v''), (p.copy hu hv).copy hu' hv' = p.copy ⋯ ⋯

theorem SimpleGraph.Walk.copy_nil E0 #

∀ {V : Type u} {G : SimpleGraph V} {u u' : V} (hu : u = u'), SimpleGraph.Walk.nil.copy hu hu = SimpleGraph.Walk.nil

theorem SimpleGraph.Walk.copy_cons E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w u' w' : V} (h : G.Adj u v) (p : G.Walk v w) (hu : u = u') (hw : w = w'),
  (SimpleGraph.Walk.cons h p).copy hu hw = SimpleGraph.Walk.cons ⋯ (p.copy ⋯ hw)

theorem SimpleGraph.Walk.cons_copy E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w v' w' : V} (h : G.Adj u v) (p : G.Walk v' w') (hv : v' = v) (hw : w' = w),
  SimpleGraph.Walk.cons h (p.copy hv hw) = (SimpleGraph.Walk.cons ⋯ p).copy ⋯ hw

def SimpleGraph.Walk.append E3 #

{V : Type u} → {G : SimpleGraph V} → {u v w : V} → G.Walk u v → G.Walk v w → G.Walk u w

The concatenation of two compatible walks.

def SimpleGraph.Walk.concat E3 #

{V : Type u} → {G : SimpleGraph V} → {u v w : V} → G.Walk u v → G.Adj v w → G.Walk u w

The reversed version of SimpleGraph.Walk.cons, concatenating an edge to the end of a walk.

theorem SimpleGraph.Walk.concat_eq_append E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (h : G.Adj v w),
  p.concat h = p.append (SimpleGraph.Walk.cons h SimpleGraph.Walk.nil)

def SimpleGraph.Walk.reverseAux E0 #

{V : Type u} → {G : SimpleGraph V} → {u v w : V} → G.Walk u v → G.Walk u w → G.Walk v w

The concatenation of the reverse of the first walk with the second walk.

def SimpleGraph.Walk.reverse E3 #

{V : Type u} → {G : SimpleGraph V} → {u v : V} → G.Walk u v → G.Walk v u

The walk in reverse.

theorem SimpleGraph.Walk.cons_append E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w x : V} (h : G.Adj u v) (p : G.Walk v w) (q : G.Walk w x),
  (SimpleGraph.Walk.cons h p).append q = SimpleGraph.Walk.cons h (p.append q)

theorem SimpleGraph.Walk.cons_nil_append E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (h : G.Adj u v) (p : G.Walk v w),
  (SimpleGraph.Walk.cons h SimpleGraph.Walk.nil).append p = SimpleGraph.Walk.cons h p

theorem SimpleGraph.Walk.nil_append E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), SimpleGraph.Walk.nil.append p = p

theorem SimpleGraph.Walk.append_nil E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), p.append SimpleGraph.Walk.nil = p

theorem SimpleGraph.Walk.append_assoc E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w x : V} (p : G.Walk u v) (q : G.Walk v w) (r : G.Walk w x),
  p.append (q.append r) = (p.append q).append r

theorem SimpleGraph.Walk.append_copy_copy E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w u' v' w' : V} (p : G.Walk u v) (q : G.Walk v w) (hu : u = u') (hv : v = v')
  (hw : w = w'), (p.copy hu hv).append (q.copy hv hw) = (p.append q).copy hu hw

theorem SimpleGraph.Walk.concat_nil E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (h : G.Adj u v),
  SimpleGraph.Walk.nil.concat h = SimpleGraph.Walk.cons h SimpleGraph.Walk.nil

theorem SimpleGraph.Walk.concat_cons E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w x : V} (h : G.Adj u v) (p : G.Walk v w) (h' : G.Adj w x),
  (SimpleGraph.Walk.cons h p).concat h' = SimpleGraph.Walk.cons h (p.concat h')

theorem SimpleGraph.Walk.append_concat E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w x : V} (p : G.Walk u v) (q : G.Walk v w) (h : G.Adj w x),
  p.append (q.concat h) = (p.append q).concat h

theorem SimpleGraph.Walk.concat_append E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w x : V} (p : G.Walk u v) (h : G.Adj v w) (q : G.Walk w x),
  (p.concat h).append q = p.append (SimpleGraph.Walk.cons h q)

theorem SimpleGraph.Walk.exists_cons_eq_concat E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (h : G.Adj u v) (p : G.Walk v w),
  ∃ x q, ∃ (h' : G.Adj x w), SimpleGraph.Walk.cons h p = q.concat h'

A non-trivial cons walk is representable as a concat walk.

theorem SimpleGraph.Walk.exists_concat_eq_cons E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (h : G.Adj v w),
  ∃ x, ∃ (h' : G.Adj u x), ∃ q, p.concat h = SimpleGraph.Walk.cons h' q

A non-trivial concat walk is representable as a cons walk.

theorem SimpleGraph.Walk.reverse_nil E0 #

∀ {V : Type u} {G : SimpleGraph V} {u : V}, SimpleGraph.Walk.nil.reverse = SimpleGraph.Walk.nil

theorem SimpleGraph.Walk.reverse_singleton E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (h : G.Adj u v),
  (SimpleGraph.Walk.cons h SimpleGraph.Walk.nil).reverse = SimpleGraph.Walk.cons ⋯ SimpleGraph.Walk.nil

theorem SimpleGraph.Walk.reverse_toWalk E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (h : G.Adj u v), h.toWalk.reverse = ⋯.toWalk

theorem SimpleGraph.Walk.cons_reverseAux E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w x : V} (p : G.Walk u v) (q : G.Walk w x) (h : G.Adj w u),
  (SimpleGraph.Walk.cons h p).reverseAux q = p.reverseAux (SimpleGraph.Walk.cons ⋯ q)

theorem SimpleGraph.Walk.append_reverseAux E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w x : V} (p : G.Walk u v) (q : G.Walk v w) (r : G.Walk u x),
  (p.append q).reverseAux r = q.reverseAux (p.reverseAux r)

theorem SimpleGraph.Walk.reverseAux_append E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w x : V} (p : G.Walk u v) (q : G.Walk u w) (r : G.Walk w x),
  (p.reverseAux q).append r = p.reverseAux (q.append r)

theorem SimpleGraph.Walk.reverseAux_eq_reverse_append E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (q : G.Walk u w), p.reverseAux q = p.reverse.append q

theorem SimpleGraph.Walk.reverse_cons E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (h : G.Adj u v) (p : G.Walk v w),
  (SimpleGraph.Walk.cons h p).reverse = p.reverse.append (SimpleGraph.Walk.cons ⋯ SimpleGraph.Walk.nil)

theorem SimpleGraph.Walk.reverse_copy E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v u' v' : V} (p : G.Walk u v) (hu : u = u') (hv : v = v'),
  (p.copy hu hv).reverse = p.reverse.copy hv hu

theorem SimpleGraph.Walk.reverse_append E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (q : G.Walk v w),
  (p.append q).reverse = q.reverse.append p.reverse

theorem SimpleGraph.Walk.reverse_concat E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (h : G.Adj v w),
  (p.concat h).reverse = SimpleGraph.Walk.cons ⋯ p.reverse

theorem SimpleGraph.Walk.reverse_reverse E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), p.reverse.reverse = p

theorem SimpleGraph.Walk.reverse_surjective E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V}, Function.Surjective SimpleGraph.Walk.reverse

theorem SimpleGraph.Walk.reverse_injective E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V}, Function.Injective SimpleGraph.Walk.reverse

theorem SimpleGraph.Walk.reverse_bijective E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V}, Function.Bijective SimpleGraph.Walk.reverse

theorem SimpleGraph.Walk.length_copy E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v u' v' : V} (p : G.Walk u v) (hu : u = u') (hv : v = v'),
  (p.copy hu hv).length = p.length

theorem SimpleGraph.Walk.length_append E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (q : G.Walk v w),
  (p.append q).length = p.length + q.length

theorem SimpleGraph.Walk.length_concat E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (h : G.Adj v w), (p.concat h).length = p.length + 1

theorem SimpleGraph.Walk.length_reverseAux E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (q : G.Walk u w),
  (p.reverseAux q).length = p.length + q.length

theorem SimpleGraph.Walk.length_reverse E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), p.reverse.length = p.length

theorem SimpleGraph.Walk.getVert_append E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (q : G.Walk v w) (i : ℕ),
  (p.append q).getVert i = if i < p.length then p.getVert i else q.getVert (i - p.length)

theorem SimpleGraph.Walk.getVert_append' E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (q : G.Walk v w) (i : ℕ),
  (p.append q).getVert i = if i ≤ p.length then p.getVert i else q.getVert (i - p.length)

This uses p instead of q when i = p.length unlike the unprimed version.

theorem SimpleGraph.Walk.getVert_reverse E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (i : ℕ), p.reverse.getVert i = p.getVert (p.length - i)

def SimpleGraph.Walk.concatRecAux E0 #

{V : Type u} →
  {G : SimpleGraph V} →
    {motive : (u v : V) → G.Walk u v → Sort u_1} →
      ({u : V} → motive u u SimpleGraph.Walk.nil) →
        ({u v w : V} → (p : G.Walk u v) → (h : G.Adj v w) → motive u v p → motive u w (p.concat h)) →
          {u v : V} → (p : G.Walk u v) → motive v u p.reverse

Auxiliary definition for SimpleGraph.Walk.concatRec

def SimpleGraph.Walk.concatRec E1 #

{V : Type u} →
  {G : SimpleGraph V} →
    {motive : (u v : V) → G.Walk u v → Sort u_1} →
      ({u : V} → motive u u SimpleGraph.Walk.nil) →
        ({u v w : V} → (p : G.Walk u v) → (h : G.Adj v w) → motive u v p → motive u w (p.concat h)) →
          {u v : V} → (p : G.Walk u v) → motive u v p

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.

theorem SimpleGraph.Walk.concatRec_nil E0 #

∀ {V : Type u} {G : SimpleGraph V} {motive : (u v : V) → G.Walk u v → Sort u_1}
  (Hnil : {u : V} → motive u u SimpleGraph.Walk.nil)
  (Hconcat : {u v w : V} → (p : G.Walk u v) → (h : G.Adj v w) → motive u v p → motive u w (p.concat h)) (u : V),
  SimpleGraph.Walk.concatRec Hnil Hconcat SimpleGraph.Walk.nil = Hnil

theorem SimpleGraph.Walk.concatRec_concat E0 #

∀ {V : Type u} {G : SimpleGraph V} {motive : (u v : V) → G.Walk u v → Sort u_1}
  (Hnil : {u : V} → motive u u SimpleGraph.Walk.nil)
  (Hconcat : {u v w : V} → (p : G.Walk u v) → (h : G.Adj v w) → motive u v p → motive u w (p.concat h)) {u v w : V}
  (p : G.Walk u v) (h : G.Adj v w),
  SimpleGraph.Walk.concatRec Hnil Hconcat (p.concat h) = Hconcat p h (SimpleGraph.Walk.concatRec Hnil Hconcat p)

theorem SimpleGraph.Walk.concat_ne_nil E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (h : G.Adj v u), p.concat h ≠ SimpleGraph.Walk.nil

theorem SimpleGraph.Walk.concat_inj E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v v' w : V} {p : G.Walk u v} {h : G.Adj v w} {p' : G.Walk u v'} {h' : G.Adj v' w},
  p.concat h = p'.concat h' → ∃ (hv : v = v'), p.copy ⋯ hv = p'

theorem SimpleGraph.Walk.support_concat E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (h : G.Adj v w), (p.concat h).support = p.support ++ [w]

theorem SimpleGraph.Walk.support_copy E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v u' v' : V} (p : G.Walk u v) (hu : u = u') (hv : v = v'),
  (p.copy hu hv).support = p.support

theorem SimpleGraph.Walk.support_append E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (p' : G.Walk v w),
  (p.append p').support = p.support ++ p'.support.tail

theorem SimpleGraph.Walk.support_reverse E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), p.reverse.support = p.support.reverse

theorem SimpleGraph.Walk.support_append_eq_support_dropLast_append E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (p' : G.Walk v w),
  (p.append p').support = p.support.dropLast ++ p'.support

theorem SimpleGraph.Walk.tail_support_append E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (p' : G.Walk v w),
  (p.append p').support.tail = p.support.tail ++ p'.support.tail

theorem SimpleGraph.Walk.dropLast_support_concat E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), p.support.dropLast ++ [v] = p.support

theorem SimpleGraph.Walk.ext_support E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {p q : G.Walk u v}, p.support = q.support → p = q

theorem SimpleGraph.Walk.mem_tail_support_append_iff E0 #

∀ {V : Type u} {G : SimpleGraph V} {t u v w : V} (p : G.Walk u v) (p' : G.Walk v w),
  t ∈ (p.append p').support.tail ↔ t ∈ p.support.tail ∨ t ∈ p'.support.tail

theorem SimpleGraph.Walk.mem_support_append_iff E0 #

∀ {V : Type u} {G : SimpleGraph V} {t u v w : V} (p : G.Walk u v) (p' : G.Walk v w),
  t ∈ (p.append p').support ↔ t ∈ p.support ∨ t ∈ p'.support

theorem SimpleGraph.Walk.support_prefix_support_concat E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (hadj : G.Adj v w),
  p.support <+: (p.concat hadj).support

theorem SimpleGraph.Walk.support_subset_support_concat E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (hadj : G.Adj v w), p.support ⊆ (p.concat hadj).support

theorem SimpleGraph.Walk.support_prefix_support_append E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (q : G.Walk v w), p.support <+: (p.append q).support

theorem SimpleGraph.Walk.support_subset_support_append_left E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (q : G.Walk v w), p.support ⊆ (p.append q).support

theorem SimpleGraph.Walk.support_suffix_support_append E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (q : G.Walk v w), q.support <:+ (p.append q).support

theorem SimpleGraph.Walk.support_subset_support_append_right E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (q : G.Walk v w), q.support ⊆ (p.append q).support

theorem SimpleGraph.Walk.coe_support_append E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (p' : G.Walk v w),
  ↑(p.append p').support = {u} + ↑p.support.tail + ↑p'.support.tail

theorem SimpleGraph.Walk.coe_support_append' E0 #

∀ {V : Type u} {G : SimpleGraph V} [inst : DecidableEq V] {u v w : V} (p : G.Walk u v) (p' : G.Walk v w),
  ↑(p.append p').support = ↑p.support + ↑p'.support - {v}

theorem SimpleGraph.Walk.ofSupport_support E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), SimpleGraph.Walk.ofSupport p.support ⋯ ⋯ = p.copy ⋯ ⋯

theorem SimpleGraph.Walk.darts_concat E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (h : G.Adj v w),
  (p.concat h).darts = p.darts.concat { fst := v, snd := w, adj := h }

theorem SimpleGraph.Walk.darts_copy E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v u' v' : V} (p : G.Walk u v) (hu : u = u') (hv : v = v'),
  (p.copy hu hv).darts = p.darts

theorem SimpleGraph.Walk.darts_append E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (p' : G.Walk v w),
  (p.append p').darts = p.darts ++ p'.darts

theorem SimpleGraph.Walk.darts_reverse E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v),
  p.reverse.darts = (List.map SimpleGraph.Dart.symm p.darts).reverse

theorem SimpleGraph.Walk.mem_darts_reverse E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {d : G.Dart} {p : G.Walk u v}, d ∈ p.reverse.darts ↔ d.symm ∈ p.darts

theorem SimpleGraph.Walk.ofDarts_darts E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {p : G.Walk u v} (hp : ¬p.Nil),
  SimpleGraph.Walk.ofDarts p.darts ⋯ ⋯ = p.copy ⋯ ⋯

theorem SimpleGraph.Walk.edges_concat E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (h : G.Adj v w),
  (p.concat h).edges = p.edges.concat s(v, w)

theorem SimpleGraph.Walk.edges_copy E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v u' v' : V} (p : G.Walk u v) (hu : u = u') (hv : v = v'),
  (p.copy hu hv).edges = p.edges

theorem SimpleGraph.Walk.edges_append E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (p' : G.Walk v w),
  (p.append p').edges = p.edges ++ p'.edges

theorem SimpleGraph.Walk.edges_reverse E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), p.reverse.edges = p.edges.reverse

theorem SimpleGraph.Walk.dart_snd_mem_support_of_mem_darts E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) {d : G.Dart}, d ∈ p.darts → d.toProd.2 ∈ p.support

theorem SimpleGraph.Walk.fst_mem_support_of_mem_edges E1 #

∀ {V : Type u} {G : SimpleGraph V} {t u v w : V} (p : G.Walk v w), s(t, u) ∈ p.edges → t ∈ p.support

theorem SimpleGraph.Walk.snd_mem_support_of_mem_edges E1 #

∀ {V : Type u} {G : SimpleGraph V} {t u v w : V} (p : G.Walk v w), s(t, u) ∈ p.edges → u ∈ p.support

theorem SimpleGraph.Walk.mem_support_of_mem_edges E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} {e : Sym2 V} {p : G.Walk u v}, e ∈ p.edges → w ∈ e → w ∈ p.support

theorem SimpleGraph.Walk.edges_nodup_of_support_nodup E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {p : G.Walk u v}, p.support.Nodup → p.edges.Nodup

theorem SimpleGraph.Walk.nodup_tail_support_reverse E1 #

∀ {V : Type u} {G : SimpleGraph V} {u : V} {p : G.Walk u u}, p.reverse.support.tail.Nodup ↔ p.support.tail.Nodup

theorem SimpleGraph.Walk.edgeSet_reverse E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), p.reverse.edgeSet = p.edgeSet

theorem SimpleGraph.Walk.edgeSet_concat E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (h : G.Adj v w),
  (p.concat h).edgeSet = insert s(v, w) p.edgeSet

theorem SimpleGraph.Walk.edgeSet_append E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (p : G.Walk u v) (q : G.Walk v w),
  (p.append q).edgeSet = p.edgeSet ∪ q.edgeSet

theorem SimpleGraph.Walk.edgeSet_copy E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v u' v' : V} (p : G.Walk u v) (hu : u = u') (hv : v = v'),
  (p.copy hu hv).edgeSet = p.edgeSet

theorem SimpleGraph.Walk.nil_append_iff E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} {p : G.Walk u v} {q : G.Walk v w}, (p.append q).Nil ↔ p.Nil ∧ q.Nil

theorem SimpleGraph.Walk.Nil.append E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} {p : G.Walk u v} {q : G.Walk v w}, p.Nil → q.Nil → (p.append q).Nil

theorem SimpleGraph.Walk.nil_reverse E0 #

∀ {V : Type u} {G : SimpleGraph V} {v w : V} {p : G.Walk v w}, p.reverse.Nil ↔ p.Nil

def SimpleGraph.Walk.drop E3 #

{V : Type u} → {G : SimpleGraph V} → {u v : V} → (p : G.Walk u v) → (n : ℕ) → G.Walk (p.getVert n) v

The walk obtained by removing the first n darts of a walk.

theorem SimpleGraph.Walk.drop_length E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n : ℕ), (p.drop n).length = p.length - n

theorem SimpleGraph.Walk.drop_getVert E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n m : ℕ), (p.drop n).getVert m = p.getVert (n + m)

theorem SimpleGraph.Walk.drop_add_heq E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n m : ℕ), p.drop (n + m) ≍ (p.drop n).drop m

theorem SimpleGraph.Walk.drop_add_eq E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n m : ℕ), p.drop (n + m) = ((p.drop n).drop m).copy ⋯ ⋯

theorem SimpleGraph.Walk.nil_drop_iff E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n : ℕ), (p.drop n).Nil ↔ p.length ≤ n

theorem SimpleGraph.Walk.drop_cons_eq E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (h : G.Adj u v) (p : G.Walk v w) (n : ℕ) (hn : n ≠ 0),
  (SimpleGraph.Walk.cons h p).drop n = (p.drop (n - 1)).copy ⋯ ⋯

theorem SimpleGraph.Walk.darts_drop E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n : ℕ), (p.drop n).darts = List.drop n p.darts

theorem SimpleGraph.Walk.edges_drop E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n : ℕ), (p.drop n).edges = List.drop n p.edges

def SimpleGraph.Walk.take E3 #

{V : Type u} → {G : SimpleGraph V} → {u v : V} → (p : G.Walk u v) → (n : ℕ) → G.Walk u (p.getVert n)

The walk obtained by taking the first n darts of a walk.

theorem SimpleGraph.Walk.take_zero E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), p.take 0 = SimpleGraph.Walk.nil.copy ⋯ ⋯

theorem SimpleGraph.Walk.take_length E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n : ℕ), (p.take n).length = min n p.length

theorem SimpleGraph.Walk.take_getVert E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n m : ℕ), (p.take n).getVert m = p.getVert (min n m)

theorem SimpleGraph.Walk.take_add_heq E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n m : ℕ),
  p.take (n + m) ≍ (p.take n).append ((p.drop n).take m)

theorem SimpleGraph.Walk.take_add_eq E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n m : ℕ),
  p.take (n + m) = ((p.take n).append ((p.drop n).take m)).copy ⋯ ⋯

theorem SimpleGraph.Walk.nil_take_iff E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n : ℕ), (p.take n).Nil ↔ p.Nil ∨ n = 0

theorem SimpleGraph.Walk.support_take E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n : ℕ), (p.take n).support = List.take (n + 1) p.support

theorem SimpleGraph.Walk.take_take E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n m : ℕ), (p.take n).take m = (p.take (min n m)).copy ⋯ ⋯

theorem SimpleGraph.Walk.take_of_length_le E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {n : ℕ} {p : G.Walk u v} (h : p.length ≤ n), p.take n = p.copy ⋯ ⋯

theorem SimpleGraph.Walk.take_cons_eq E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (h : G.Adj u v) (p : G.Walk v w) (n : ℕ) (hn : n ≠ 0),
  (SimpleGraph.Walk.cons h p).take n = SimpleGraph.Walk.cons h ((p.take (n - 1)).copy ⋯ ⋯)

theorem SimpleGraph.Walk.darts_take E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n : ℕ), (p.take n).darts = List.take n p.darts

theorem SimpleGraph.Walk.edges_take E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n : ℕ), (p.take n).edges = List.take n p.edges

theorem SimpleGraph.Walk.penultimate_concat E0 #

∀ {V : Type u} {G : SimpleGraph V} {t u v : V} (p : G.Walk u v) (h : G.Adj v t), (p.concat h).penultimate = v

theorem SimpleGraph.Walk.snd_reverse E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), p.reverse.snd = p.penultimate

theorem SimpleGraph.Walk.penultimate_reverse E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), p.reverse.penultimate = p.snd

def SimpleGraph.Walk.tail E3 #

{V : Type u} → {G : SimpleGraph V} → {u v : V} → (p : G.Walk u v) → G.Walk p.snd v

The walk obtained by removing the first dart of a walk. A nil walk stays nil.

theorem SimpleGraph.Walk.darts_tail E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {p : G.Walk u v}, p.tail.darts = p.darts.tail

theorem SimpleGraph.Walk.edges_tail E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {p : G.Walk u v}, p.tail.edges = p.edges.tail

theorem SimpleGraph.Walk.drop_zero E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), p.drop 0 = p.copy ⋯ ⋯

theorem SimpleGraph.Walk.nil_drop_of_length_le E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {n : ℕ} {p : G.Walk u v}, p.length ≤ n → (p.drop n).Nil

theorem SimpleGraph.Walk.drop_support_eq_support_drop_min E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n : ℕ),
  (p.drop n).support = List.drop (min n p.length) p.support

theorem SimpleGraph.Walk.drop_drop E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n m : ℕ), (p.drop n).drop m = (p.drop (n + m)).copy ⋯ ⋯

theorem SimpleGraph.Walk.append_take_drop_eq E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n : ℕ), (p.take n).append (p.drop n) = p

def SimpleGraph.Walk.dropLast E3 #

{V : Type u} → {G : SimpleGraph V} → {u v : V} → (p : G.Walk u v) → G.Walk u p.penultimate

The walk obtained by removing the last dart of a walk. A nil walk stays nil.

theorem SimpleGraph.Walk.tail_nil E0 #

∀ {V : Type u} {G : SimpleGraph V} {v : V}, SimpleGraph.Walk.nil.tail = SimpleGraph.Walk.nil

theorem SimpleGraph.Walk.tail_cons_nil E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (h : G.Adj u v),
  (SimpleGraph.Walk.cons h SimpleGraph.Walk.nil).tail = SimpleGraph.Walk.nil

theorem SimpleGraph.Walk.tail_cons E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (h : G.Adj u v) (p : G.Walk v w),
  (SimpleGraph.Walk.cons h p).tail = p.copy ⋯ ⋯

theorem SimpleGraph.Walk.dropLast_nil E0 #

∀ {V : Type u} {G : SimpleGraph V} {v : V}, SimpleGraph.Walk.nil.dropLast = SimpleGraph.Walk.nil

theorem SimpleGraph.Walk.dropLast_cons_nil E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (h : G.Adj u v),
  (SimpleGraph.Walk.cons h SimpleGraph.Walk.nil).dropLast = SimpleGraph.Walk.nil

theorem SimpleGraph.Walk.dropLast_cons_cons E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w w' : V} (h : G.Adj u v) (h₂ : G.Adj v w) (p : G.Walk w w'),
  (SimpleGraph.Walk.cons h (SimpleGraph.Walk.cons h₂ p)).dropLast =
    SimpleGraph.Walk.cons h (SimpleGraph.Walk.cons h₂ p).dropLast

theorem SimpleGraph.Walk.dropLast_cons_of_not_nil E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v w : V} (h : G.Adj u v) (p : G.Walk v w) (hp : ¬p.Nil),
  (SimpleGraph.Walk.cons h p).dropLast = SimpleGraph.Walk.cons h (p.dropLast.copy ⋯ ⋯)

theorem SimpleGraph.Walk.darts_dropLast E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {p : G.Walk u v}, p.dropLast.darts = p.darts.dropLast

theorem SimpleGraph.Walk.edges_dropLast E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {p : G.Walk u v}, p.dropLast.edges = p.edges.dropLast

theorem SimpleGraph.Walk.dropLast_concat E0 #

∀ {V : Type u} {G : SimpleGraph V} {t u v : V} (p : G.Walk u v) (h : G.Adj v t), (p.concat h).dropLast = p.copy ⋯ ⋯

theorem SimpleGraph.Walk.cons_tail_eq E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (hp : ¬p.Nil), SimpleGraph.Walk.cons ⋯ p.tail = p

theorem SimpleGraph.Walk.concat_dropLast E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {p : G.Walk u v} (hp : G.Adj p.penultimate v), p.dropLast.concat hp = p

theorem SimpleGraph.Walk.support_tail_of_not_nil E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), ¬p.Nil → p.tail.support = p.support.tail

theorem SimpleGraph.Walk.cons_support_tail E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {p : G.Walk u v}, ¬p.Nil → u :: p.tail.support = p.support

theorem SimpleGraph.Walk.support_dropLast_concat E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {p : G.Walk u v}, ¬p.Nil → p.dropLast.support ++ [v] = p.support

theorem SimpleGraph.Walk.support_dropLast E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {p : G.Walk u v}, ¬p.Nil → p.dropLast.support = p.support.dropLast

theorem SimpleGraph.Walk.length_tail E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), p.tail.length = p.length - 1

theorem SimpleGraph.Walk.length_tail_add_one E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {p : G.Walk u v}, ¬p.Nil → p.tail.length + 1 = p.length

theorem SimpleGraph.Walk.length_dropLast_add_one E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {p : G.Walk u v}, ¬p.Nil → p.dropLast.length + 1 = p.length

theorem SimpleGraph.Walk.length_dropLast E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), p.dropLast.length = p.length - 1

theorem SimpleGraph.Walk.getVert_dropLast E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {n : ℕ} {p : G.Walk u v}, n < p.length → p.dropLast.getVert n = p.getVert n

theorem SimpleGraph.Walk.reverse_tail E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), p.tail.reverse = p.reverse.dropLast.copy ⋯ ⋯

theorem SimpleGraph.Walk.reverse_dropLast E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v), p.dropLast.reverse = p.reverse.tail.copy ⋯ ⋯

theorem SimpleGraph.Walk.Nil.tail E1 #

∀ {V : Type u} {G : SimpleGraph V} {v w : V} {p : G.Walk v w}, p.Nil → p.tail.Nil

theorem SimpleGraph.Walk.not_nil_of_tail_not_nil E1 #

∀ {V : Type u} {G : SimpleGraph V} {v w : V} {p : G.Walk v w}, ¬p.tail.Nil → ¬p.Nil

theorem SimpleGraph.Walk.Nil.dropLast E1 #

∀ {V : Type u} {G : SimpleGraph V} {v w : V} {p : G.Walk v w}, p.Nil → p.dropLast.Nil

theorem SimpleGraph.Walk.nil_copy E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v u' v' : V} {p : G.Walk u v} (hu : u = u') (hv : v = v'),
  (p.copy hu hv).Nil = p.Nil

theorem SimpleGraph.Walk.drop_of_length_le E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {n : ℕ} {p : G.Walk u v} (h : p.length ≤ n),
  p.drop n = SimpleGraph.Walk.nil.copy ⋯ ⋯

theorem SimpleGraph.Walk.getVert_copy E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v w x : V} (p : G.Walk u v) (i : ℕ) (h : u = w) (h' : v = x),
  (p.copy h h').getVert i = p.getVert i

theorem SimpleGraph.Walk.getVert_tail E0 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {n : ℕ} (p : G.Walk u v), p.tail.getVert n = p.getVert (n + 1)

theorem SimpleGraph.Walk.getVert_mem_tail_support E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {p : G.Walk u v}, ¬p.Nil → ∀ {i : ℕ}, i ≠ 0 → p.getVert i ∈ p.support.tail

theorem SimpleGraph.Walk.snd_dropLast_eq_snd E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {p : G.Walk u v}, p.length ≠ 1 → p.dropLast.snd = p.snd

theorem SimpleGraph.Walk.penultimate_tail_eq_penultimate E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {p : G.Walk u v}, p.length ≠ 1 → p.tail.penultimate = p.penultimate

theorem SimpleGraph.Walk.support_injective E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V}, Function.Injective SimpleGraph.Walk.support

theorem SimpleGraph.Walk.ext_getVert_le_length E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {p q : G.Walk u v},
  p.length = q.length → (∀ k ≤ p.length, p.getVert k = q.getVert k) → p = q

theorem SimpleGraph.Walk.ext_getVert E1 #

∀ {V : Type u} {G : SimpleGraph V} {u v : V} {p q : G.Walk u v}, (∀ (k : ℕ), p.getVert k = q.getVert k) → p = q

theorem SimpleGraph.Walk.support_tail_perm_support_dropLast E1 #

∀ {V : Type u} {G : SimpleGraph V} {u : V} (p : G.Walk u u), p.tail.support.Perm p.dropLast.support

theorem SimpleGraph.Walk.tail_support_perm_dropLast_support E1 #

∀ {V : Type u} {G : SimpleGraph V} {u : V} (p : G.Walk u u), p.support.tail.Perm p.support.dropLast

Deprecated aliases

NameNew nameSince
SimpleGraph.Walk.subset_support_append_leftSimpleGraph.Walk.support_subset_support_append_left2026-05-25
SimpleGraph.Walk.subset_support_append_rightSimpleGraph.Walk.support_subset_support_append_right2026-05-25
SimpleGraph.Walk.take_support_eq_support_take_succSimpleGraph.Walk.support_take2026-05-20