Documentation

Mathlib.Combinatorics.Quiver.Path.Vertices

Path Vertices #

This file provides lemmas for reasoning about the vertices of a path.

def Quiver.Path.end {V : Type u_1} [Quiver V] {a b : V} :
Path a b → V

The end vertex of a path. A path p : Path a b has p.end = b.

Equations
    Instances For
      @[simp]
      theorem Quiver.Path.end_cons {V : Type u_1} [Quiver V] {a b c : V} (p : Path a b) (e : b ⟶ c) :
      (p.cons e).end = c
      def Quiver.Path.vertices {V : Type u_1} [Quiver V] {a b : V} :
      Path a b → List V

      The list of vertices in a path, including the start and end vertices.

      Equations
        Instances For
          @[simp]
          theorem Quiver.Path.vertices_nil {V : Type u_1} [Quiver V] (a : V) :
          @[simp]
          theorem Quiver.Path.vertices_cons {V : Type u_1} [Quiver V] {a b c : V} (p : Path a b) (e : b ⟶ c) :
          theorem Quiver.Path.mem_vertices_cons {V : Type u_1} [Quiver V] {a b c : V} (p : Path a b) (e : b ⟶ c) {x : V} :

          The vertex list of cons — convenient simp form.

          @[simp]
          theorem Quiver.Path.vertices_length {V : Type u_2} [Quiver V] {a b : V} (p : Path a b) :

          The length of vertices list equals path length plus one

          theorem Quiver.Path.vertices_ne_nil {V : Type u_1} [Quiver V] {a b : V} (p : Path a b) :
          theorem Quiver.Path.start_mem_vertices {V : Type u_1} [Quiver V] {a b : V} (p : Path a b) :
          @[simp]
          theorem Quiver.Path.vertices_head? {V : Type u_1} [Quiver V] {a b : V} (p : Path a b) :

          The head of the vertices list is the start vertex

          @[simp]
          theorem Quiver.Path.vertices_head_eq {V : Type u_1} [Quiver V] {a b : V} (p : Path a b) (h : p.vertices ≠ [] := ⋯) :

          The head of the vertices list is the start vertex.

          @[simp]
          theorem Quiver.Path.getElem_vertices_zero {V : Type u_1} [Quiver V] {a b : V} (p : Path a b) :
          @[simp]
          theorem Quiver.Path.vertices_getLast {V : Type u_1} [Quiver V] {a b : V} (p : Path a b) (h : p.vertices ≠ [] := ⋯) :
          @[simp]
          theorem Quiver.Path.dropLast_append_end_eq {V : Type u_1} [Quiver V] {a b : V} (p : Path a b) :
          @[simp]
          theorem Quiver.Path.vertices_comp {V : Type u_1} [Quiver V] {a b c : V} (p : Path a b) (q : Path b c) :
          @[simp]
          theorem Quiver.Path.length_eq_zero_iff {V : Type u_1} [Quiver V] {a : V} (p : Path a a) :
          theorem Quiver.Path.vertices_comp_get_length_eq {V : Type u_1} [Quiver V] {a b c : V} (p₁ : Path a c) (pā‚‚ : Path c b) (h : p₁.length < (p₁.comp pā‚‚).vertices.length := by simp) :
          (p₁.comp pā‚‚).vertices.get ⟨p₁.length, h⟩ = c
          @[simp]
          theorem Quiver.Path.vertices_toPath {V : Type u_1} [Quiver V] {i j : V} (e : i ⟶ j) :
          theorem Quiver.Path.nil_of_comp_eq_nil_left {V : Type u_1} [Quiver V] {a b : V} {p : Path a b} {q : Path b a} (h : p.comp q = nil) :
          p.length = 0

          If a composition is nil, the left component must be nil (proved via lengths, avoiding dependent pattern-matching).

          theorem Quiver.Path.nil_of_comp_eq_nil_right {V : Type u_1} [Quiver V] {a b : V} {p : Path a b} {q : Path b a} (h : p.comp q = nil) :
          q.length = 0

          If a composition is nil, the right component must be nil

          theorem Quiver.Path.comp_eq_nil_iff {V : Type u_1} [Quiver V] {a b : V} {p : Path a b} {q : Path b a} :
          @[simp]
          theorem Quiver.Path.end_mem_vertices {V : Type u_1} [Quiver V] {a b : V} (p : Path a b) :

          Path vertices decomposition #

          theorem Quiver.Path.exists_eq_comp_of_le_length {V : Type u_1} [Quiver V] {a b : V} (p : Path a b) {n : ā„•} (hn : n ≤ p.length) :
          ∃ (v : V) (p₁ : Path a v) (pā‚‚ : Path v b), p = p₁.comp pā‚‚ ∧ p₁.length = n

          Given a path p : Path a b and an index n ≤ p.length, we can split p = p₁.comp pā‚‚ with p₁.length = n.

          theorem Quiver.Path.exists_eq_comp_and_length_eq_of_lt_length {V : Type u_1} [Quiver V] {a b : V} (p : Path a b) (n : ā„•) (hn : n < p.vertices.length) :
          ∃ (v : V) (p₁ : Path a v) (pā‚‚ : Path v b), p = p₁.comp pā‚‚ ∧ p₁.length = n ∧ v = p.vertices[n]

          split_at_vertex decomposes a path p at the vertex sitting in position i of its vertices

          theorem Quiver.Path.exists_eq_comp_of_mem_vertices {V : Type u_1} [Quiver V] {a b : V} (p : Path a b) {v : V} (hv : v ∈ p.vertices) :
          ∃ (p₁ : Path a v) (pā‚‚ : Path v b), p = p₁.comp pā‚‚

          If a vertex v occurs in the list of vertices of a path p : Path a b, then p can be decomposed as a concatenation of a subpath from a to v and a subpath from v to b.

          theorem Quiver.Path.exists_eq_comp_and_notMem_tail_of_mem_vertices {V : Type u_1} [Quiver V] {a b : V} (p : Path a b) {v : V} (hv : v ∈ p.vertices) :
          ∃ (p₁ : Path a v) (pā‚‚ : Path v b), p = p₁.comp pā‚‚ ∧ v āˆ‰ pā‚‚.vertices.tail

          Split a path at the last occurrence of a vertex.