Documentation

Mathlib.Combinatorics.SimpleGraph.Connectivity.Connected

Main definitions #

Main statements #

TODO #

IsBridge is unpractical: we shouldn't require the edge to be present. See https://github.com/leanprover-community/mathlib4/issues/31690.

Tags #

trails, paths, cycles, bridge edges

Reachable and Connected #

def SimpleGraph.Reachable {V : Type u} (G : SimpleGraph V) (u v : V) :

Two vertices are reachable if there is a walk between them. This is equivalent to Relation.ReflTransGen of G.Adj. See SimpleGraph.reachable_iff_reflTransGen.

Instances For
    theorem SimpleGraph.not_reachable_iff_isEmpty_walk {V : Type u} {G : SimpleGraph V} {u v : V} :
    Β¬G.Reachable u v ↔ IsEmpty (G.Walk u v)
    theorem SimpleGraph.Reachable.elim {V : Type u} {G : SimpleGraph V} {p : Prop} {u v : V} (h : G.Reachable u v) (hp : βˆ€ (a : G.Walk u v), p) :
    p
    theorem SimpleGraph.Reachable.elim_path {V : Type u} {G : SimpleGraph V} {p : Prop} {u v : V} (h : G.Reachable u v) (hp : βˆ€ (a : G.Path u v), p) :
    p
    theorem SimpleGraph.Walk.reachable {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) :
    G.Reachable u v
    theorem SimpleGraph.Adj.reachable {V : Type u} {G : SimpleGraph V} {u v : V} (h : G.Adj u v) :
    G.Reachable u v
    @[simp]
    theorem SimpleGraph.Reachable.rfl {V : Type u} {G : SimpleGraph V} {u : V} :
    G.Reachable u u
    theorem SimpleGraph.Reachable.symm {V : Type u} {G : SimpleGraph V} {u v : V} (huv : G.Reachable u v) :
    G.Reachable v u
    theorem SimpleGraph.reachable_comm {V : Type u} {G : SimpleGraph V} {u v : V} :
    G.Reachable u v ↔ G.Reachable v u
    theorem SimpleGraph.Reachable.trans {V : Type u} {G : SimpleGraph V} {u v w : V} (huv : G.Reachable u v) (hvw : G.Reachable v w) :
    G.Reachable u w
    theorem SimpleGraph.Reachable.map {V : Type u} {V' : Type v} {u v : V} {G : SimpleGraph V} {G' : SimpleGraph V'} (f : G β†’g G') (h : G.Reachable u v) :
    G'.Reachable (f u) (f v)
    theorem SimpleGraph.Reachable.mono {V : Type u} {u v : V} {G G' : SimpleGraph V} (h : G ≀ G') (Guv : G.Reachable u v) :
    G'.Reachable u v
    theorem SimpleGraph.Reachable.exists_isPath {V : Type u} {G : SimpleGraph V} {u v : V} (hr : G.Reachable u v) :
    βˆƒ (p : G.Walk u v), p.IsPath
    theorem SimpleGraph.Iso.reachable_iff {V : Type u} {V' : Type v} {G : SimpleGraph V} {G' : SimpleGraph V'} {Ο† : G ≃g G'} {u v : V} :
    G'.Reachable (Ο† u) (Ο† v) ↔ G.Reachable u v
    theorem SimpleGraph.Iso.symm_apply_reachable {V : Type u} {V' : Type v} {G : SimpleGraph V} {G' : SimpleGraph V'} {Ο† : G ≃g G'} {u : V} {v : V'} :
    G.Reachable (Ο†.symm v) u ↔ G'.Reachable v (Ο† u)
    theorem SimpleGraph.Reachable.mem_subgraphVerts {V : Type u} {G : SimpleGraph V} {u v : V} {H : G.Subgraph} (hr : G.Reachable u v) (h : βˆ€ v ∈ H.verts, βˆ€ (w : V), G.Adj v w β†’ H.Adj v w) (hu : u ∈ H.verts) :
    v ∈ H.verts
    @[simp]
    theorem SimpleGraph.reachable_bot {V : Type u} {u v : V} :
    βŠ₯.Reachable u v ↔ u = v

    Distinct vertices are not reachable in the empty graph.

    theorem SimpleGraph.Reachable.of_subsingleton {V : Type u} {G : SimpleGraph V} [Subsingleton V] {u v : V} :
    G.Reachable u v
    theorem SimpleGraph.Reachable.nonempty_neighborSet_left {V : Type u} {G : SimpleGraph V} {u v : V} (huv : u β‰  v) (hreach : G.Reachable u v) :
    theorem SimpleGraph.Reachable.nonempty_neighborSet_right {V : Type u} {G : SimpleGraph V} {u v : V} (huv : u β‰  v) (hreach : G.Reachable u v) :
    theorem SimpleGraph.Reachable.degree_pos_left {V : Type u} {G : SimpleGraph V} {u v : V} [Fintype ↑(G.neighborSet u)] (huv : u β‰  v) (hreach : G.Reachable u v) :
    0 < G.degree u
    theorem SimpleGraph.Reachable.degree_pos_right {V : Type u} {G : SimpleGraph V} {u v : V} [Fintype ↑(G.neighborSet v)] (huv : u β‰  v) (hreach : G.Reachable u v) :
    0 < G.degree v
    theorem SimpleGraph.not_reachable_of_neighborSet_left_eq_empty {V : Type u} {G : SimpleGraph V} {u v : V} (huv : u β‰  v) (hu : G.neighborSet u = βˆ…) :
    Β¬G.Reachable u v
    theorem SimpleGraph.not_reachable_of_neighborSet_right_eq_empty {V : Type u} {G : SimpleGraph V} {u v : V} (huv : u β‰  v) (hv : G.neighborSet v = βˆ…) :
    Β¬G.Reachable u v
    theorem SimpleGraph.not_reachable_of_left_degree_zero {V : Type u} {G : SimpleGraph V} {u v : V} [Fintype ↑(G.neighborSet u)] (huv : u β‰  v) (hu : G.degree u = 0) :
    Β¬G.Reachable u v
    theorem SimpleGraph.not_reachable_of_right_degree_zero {V : Type u} {G : SimpleGraph V} {u v : V} [Fintype ↑(G.neighborSet v)] (huv : u β‰  v) (hu : G.degree v = 0) :
    Β¬G.Reachable u v
    @[implicit_reducible]
    def SimpleGraph.reachableSetoid {V : Type u} (G : SimpleGraph V) :
    Setoid V

    The equivalence relation on vertices given by SimpleGraph.Reachable.

    Instances For

      A graph is preconnected if every pair of vertices is reachable from one another.

      Instances For
        theorem SimpleGraph.Preconnected.map {V : Type u} {V' : Type v} {G : SimpleGraph V} {H : SimpleGraph V'} (f : G β†’g H) (hf : Function.Surjective ⇑f) (hG : G.Preconnected) :
        theorem SimpleGraph.adj_of_mem_walk_support {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (hp : ¬p.Nil) {x : V} (hx : x ∈ p.support) :
        βˆƒ y ∈ p.support, G.Adj x y
        theorem SimpleGraph.mem_support_of_mem_walk_support {V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (hp : ¬p.Nil) {w : V} (hw : w ∈ p.support) :
        w ∈ G.support
        theorem SimpleGraph.mem_support_of_reachable {V : Type u} {G : SimpleGraph V} {u v : V} (huv : u β‰  v) (h : G.Reachable u v) :
        u ∈ G.support
        theorem SimpleGraph.Preconnected.exists_isPath {V : Type u} {G : SimpleGraph V} (h : G.Preconnected) (u v : V) :
        βˆƒ (p : G.Walk u v), p.IsPath
        structure SimpleGraph.Connected {V : Type u} (G : SimpleGraph V) :

        A graph is connected if it's preconnected and contains at least one vertex. This follows the convention observed by mathlib that something is connected iff it has exactly one connected component.

        There is a CoeFun instance so that h u v can be used instead of h.Preconnected u v.

        Instances For
          theorem SimpleGraph.connected_iff {V : Type u} (G : SimpleGraph V) :
          G.Connected ↔ G.Preconnected ∧ Nonempty V
          theorem SimpleGraph.connected_iff_exists_forall_reachable {V : Type u} (G : SimpleGraph V) :
          G.Connected ↔ βˆƒ (v : V), βˆ€ (w : V), G.Reachable v w
          @[implicit_reducible]
          instance SimpleGraph.instCoeFunConnectedForallForallReachable {V : Type u} (G : SimpleGraph V) :
          CoeFun G.Connected fun (x : G.Connected) => βˆ€ (u v : V), G.Reachable u v
          theorem SimpleGraph.Connected.map {V : Type u} {V' : Type v} {G : SimpleGraph V} {H : SimpleGraph V'} (f : G β†’g H) (hf : Function.Surjective ⇑f) (hG : G.Connected) :
          theorem SimpleGraph.Connected.exists_isPath {V : Type u} {G : SimpleGraph V} (h : G.Connected) (u v : V) :
          βˆƒ (p : G.Walk u v), p.IsPath
          theorem SimpleGraph.connected_bot_iff {V : Type u} :
          βŠ₯.Connected ↔ Subsingleton V ∧ Nonempty V
          theorem SimpleGraph.Connected.of_subsingleton {V : Type u} {G : SimpleGraph V} [Nonempty V] [Subsingleton V] :
          theorem SimpleGraph.Iso.connected_iff {V : Type u} {V' : Type v} {G : SimpleGraph V} {H : SimpleGraph V'} (e : G ≃g H) :
          G.Connected ↔ H.Connected
          theorem SimpleGraph.reachable_or_compl_adj {V : Type u} (G : SimpleGraph V) (u v : V) :
          G.Reachable u v ∨ Gᢜ.Adj u v

          The quotient of V by the SimpleGraph.Reachable relation gives the connected components of a graph.

          Instances For

            Gives the connected component containing a particular vertex.

            Instances For
              @[implicit_reducible]
              instance SimpleGraph.ConnectedComponent.inhabited {V : Type u} {G : SimpleGraph V} [Inhabited V] :
              Inhabited G.ConnectedComponent
              theorem SimpleGraph.ConnectedComponent.ind {V : Type u} {G : SimpleGraph V} {Ξ² : G.ConnectedComponent β†’ Prop} (h : βˆ€ (v : V), Ξ² (G.connectedComponentMk v)) (c : G.ConnectedComponent) :
              Ξ² c
              theorem SimpleGraph.ConnectedComponent.indβ‚‚ {V : Type u} {G : SimpleGraph V} {Ξ² : G.ConnectedComponent β†’ G.ConnectedComponent β†’ Prop} (h : βˆ€ (v w : V), Ξ² (G.connectedComponentMk v) (G.connectedComponentMk w)) (c d : G.ConnectedComponent) :
              Ξ² c d
              def SimpleGraph.ConnectedComponent.lift {V : Type u} {G : SimpleGraph V} {Ξ² : Sort u_1} (f : V β†’ Ξ²) (h : βˆ€ (v w : V) (p : G.Walk v w), p.IsPath β†’ f v = f w) :
              G.ConnectedComponent β†’ Ξ²

              The ConnectedComponent specialization of Quot.lift. Provides the stronger assumption that the vertices are connected by a path.

              Instances For
                @[simp]
                theorem SimpleGraph.ConnectedComponent.lift_mk {V : Type u} {G : SimpleGraph V} {Ξ² : Sort u_1} {f : V β†’ Ξ²} {h : βˆ€ (v w : V) (p : G.Walk v w), p.IsPath β†’ f v = f w} {v : V} :
                theorem SimpleGraph.ConnectedComponent.exists {V : Type u} {G : SimpleGraph V} {p : G.ConnectedComponent β†’ Prop} :
                (βˆƒ (c : G.ConnectedComponent), p c) ↔ βˆƒ (v : V), p (G.connectedComponentMk v)
                theorem SimpleGraph.ConnectedComponent.forall {V : Type u} {G : SimpleGraph V} {p : G.ConnectedComponent β†’ Prop} :
                (βˆ€ (c : G.ConnectedComponent), p c) ↔ βˆ€ (v : V), p (G.connectedComponentMk v)
                def SimpleGraph.ConnectedComponent.recOn {V : Type u} {G : SimpleGraph V} {motive : G.ConnectedComponent β†’ Sort u_1} (c : G.ConnectedComponent) (f : (v : V) β†’ motive (G.connectedComponentMk v)) (h : βˆ€ (u v : V) (p : G.Walk u v), p.IsPath β†’ β‹― β–Έ f u = f v) :
                motive c

                This is Quot.recOn specialized to connected components. For convenience, it strengthens the assumptions in the hypothesis to provide a path between the vertices.

                Instances For
                  def SimpleGraph.ConnectedComponent.map {V : Type u} {V' : Type v} {G : SimpleGraph V} {G' : SimpleGraph V'} (Ο† : G β†’g G') (C : G.ConnectedComponent) :

                  The map on connected components induced by a graph homomorphism.

                  Instances For
                    @[simp]
                    theorem SimpleGraph.ConnectedComponent.map_mk {V : Type u} {V' : Type v} {G : SimpleGraph V} {G' : SimpleGraph V'} (Ο† : G β†’g G') (v : V) :
                    @[simp]
                    theorem SimpleGraph.ConnectedComponent.map_comp {V : Type u} {V' : Type v} {V'' : Type w} {G : SimpleGraph V} {G' : SimpleGraph V'} {G'' : SimpleGraph V''} (C : G.ConnectedComponent) (Ο† : G β†’g G') (ψ : G' β†’g G'') :
                    map ψ (map Ο† C) = map (ψ.comp Ο†) C
                    @[simp]
                    theorem SimpleGraph.ConnectedComponent.surjective_map_ofLE {V : Type u} {G G' : SimpleGraph V} (h : G ≀ G') :
                    Function.Surjective (map (Hom.ofLE h))

                    An isomorphism of graphs induces a bijection of connected components.

                    Instances For
                      @[simp]
                      theorem SimpleGraph.Iso.connectedComponentEquiv_trans {V : Type u} {V' : Type v} {V'' : Type w} {G : SimpleGraph V} {G' : SimpleGraph V'} {G'' : SimpleGraph V''} (Ο† : G ≃g G') (Ο†' : G' ≃g G'') :

                      The set of vertices in a connected component of a graph.

                      Instances For
                        theorem SimpleGraph.ConnectedComponent.supp_injective_iff {V : Type u} {G : SimpleGraph V} {a₁ aβ‚‚ : G.ConnectedComponent} :
                        a₁ = aβ‚‚ ↔ a₁.supp = aβ‚‚.supp
                        @[simp]
                        theorem SimpleGraph.ConnectedComponent.supp_inj {V : Type u} {G : SimpleGraph V} {C D : G.ConnectedComponent} :
                        C.supp = D.supp ↔ C = D
                        @[simp]
                        theorem SimpleGraph.ConnectedComponent.mem_supp_iff {V : Type u} {G : SimpleGraph V} (C : G.ConnectedComponent) (v : V) :
                        v ∈ C.supp ↔ G.connectedComponentMk v = C
                        theorem SimpleGraph.ConnectedComponent.mem_supp_congr_adj {V : Type u} {G : SimpleGraph V} {v w : V} (c : G.ConnectedComponent) (hadj : G.Adj v w) :
                        v ∈ c.supp ↔ w ∈ c.supp
                        def SimpleGraph.ConnectedComponent.isoEquivSupp {V : Type u} {V' : Type v} {G : SimpleGraph V} {G' : SimpleGraph V'} (Ο† : G ≃g G') (C : G.ConnectedComponent) :
                        ↑C.supp ≃ ↑(Ο†.connectedComponentEquiv C).supp

                        The equivalence between connected components, induced by an isomorphism of graphs, itself defines an equivalence on the supports of each connected component.

                        Instances For
                          theorem SimpleGraph.ConnectedComponent.mem_coe_supp_of_adj {V : Type u} {G : SimpleGraph V} {v w : V} {H : G.Subgraph} {c : H.coe.ConnectedComponent} (hv : v ∈ Subtype.val '' ↑c) (hw : w ∈ H.verts) (hadj : H.Adj v w) :
                          w ∈ Subtype.val '' ↑c
                          theorem SimpleGraph.ConnectedComponent.eq_of_common_vertex {V : Type u} {G : SimpleGraph V} {v : V} {c c' : G.ConnectedComponent} (hc : v ∈ c.supp) (hc' : v ∈ c'.supp) :
                          c = c'
                          theorem SimpleGraph.ConnectedComponent.biUnion_supp_eq_supp {V : Type u} {G G' : SimpleGraph V} (h : G ≀ G') (c' : G'.ConnectedComponent) :
                          ⋃ (c : G.ConnectedComponent), ⋃ (_ : c.supp βŠ† c'.supp), c.supp = c'.supp
                          theorem SimpleGraph.ConnectedComponent.reachable_of_mem_supp {V : Type u} {G : SimpleGraph V} (C : G.ConnectedComponent) {u v : V} (hu : u ∈ C.supp) (hv : v ∈ C.supp) :
                          G.Reachable u v
                          theorem SimpleGraph.ConnectedComponent.mem_supp_of_adj_mem_supp {V : Type u} {G : SimpleGraph V} (C : G.ConnectedComponent) {u v : V} (hu : u ∈ C.supp) (hadj : G.Adj u v) :
                          v ∈ C.supp

                          Given a connected component C of a simple graph G, produce the induced graph on C. The declaration connected_toSimpleGraph shows it is connected, and toSimpleGraph_hom provides the homomorphism back to G.

                          Instances For

                            Homomorphism from a connected component graph to the original graph.

                            Instances For
                              theorem SimpleGraph.ConnectedComponent.toSimpleGraph_adj {V : Type u} {G : SimpleGraph V} (C : G.ConnectedComponent) {u v : V} (hu : u ∈ C) (hv : v ∈ C) :
                              C.toSimpleGraph.Adj ⟨u, hu⟩ ⟨v, hv⟩ ↔ G.Adj u v
                              theorem SimpleGraph.ConnectedComponent.reachable_toSimpleGraph {V : Type u} {G : SimpleGraph V} (C : G.ConnectedComponent) {u v : V} (hu : u ∈ C) (hv : v ∈ C) :
                              C.toSimpleGraph.Reachable ⟨u, hu⟩ ⟨v, hv⟩

                              There is a walk between every pair of vertices in a connected component.

                              theorem SimpleGraph.ConnectedComponent.maximal_connected_induce_iff {V : Type u} {G : SimpleGraph V} (s : Set V) :
                              Maximal (fun (x : Set V) => (induce x G).Connected) s ↔ βˆƒ (C : G.ConnectedComponent), C.supp = s
                              def SimpleGraph.homOfConnectedComponents {V : Type u} {V' : Type v} (G : SimpleGraph V) {H : SimpleGraph V'} (C : (c : G.ConnectedComponent) β†’ c.toSimpleGraph β†’g H) :

                              Given graph homomorphisms from each connected component of G to H, this is the graph homomorphism from G to H.

                              Instances For
                                @[simp]
                                theorem SimpleGraph.homOfConnectedComponents_apply {V : Type u} {V' : Type v} (G : SimpleGraph V) {H : SimpleGraph V'} (C : (c : G.ConnectedComponent) β†’ c.toSimpleGraph β†’g H) (x : V) :
                                (G.homOfConnectedComponents C) x = (C (G.connectedComponentMk x)) ⟨x, β‹―βŸ©

                                Bridge edges #

                                def SimpleGraph.IsBridge {V : Type u} (G : SimpleGraph V) (e : Sym2 V) :

                                An edge of a graph is a bridge if, after removing it, its incident vertices are no longer reachable from one another.

                                Instances For
                                  theorem SimpleGraph.isBridge_iff {V : Type u} {G : SimpleGraph V} {u v : V} :
                                  G.IsBridge s(u, v) ↔ G.Adj u v ∧ Β¬(G \ fromEdgeSet {s(u, v)}).Reachable u v
                                  theorem SimpleGraph.reachable_delete_edges_iff_exists_walk {V : Type u} {G : SimpleGraph V} {v w v' w' : V} :
                                  (G \ fromEdgeSet {s(v, w)}).Reachable v' w' ↔ βˆƒ (p : G.Walk v' w'), s(v, w) βˆ‰ p.edges
                                  theorem SimpleGraph.isBridge_iff_adj_and_forall_walk_mem_edges {V : Type u} {G : SimpleGraph V} {v w : V} :
                                  G.IsBridge s(v, w) ↔ G.Adj v w ∧ βˆ€ (p : G.Walk v w), s(v, w) ∈ p.edges
                                  theorem SimpleGraph.reachable_deleteEdges_iff_exists_cycle.aux {V : Type u} {G : SimpleGraph V} [DecidableEq V] {u v w : V} (hb : βˆ€ (p : G.Walk v w), s(v, w) ∈ p.edges) (c : G.Walk u u) (hc : c.IsTrail) (he : s(v, w) ∈ c.edges) (hw : w ∈ (c.takeUntil v β‹―).support) :
                                  False
                                  theorem SimpleGraph.adj_and_reachable_delete_edges_iff_exists_cycle {V : Type u} {G : SimpleGraph V} {v w : V} :
                                  G.Adj v w ∧ (G \ fromEdgeSet {s(v, w)}).Reachable v w ↔ βˆƒ (u : V) (p : G.Walk u u), p.IsCycle ∧ s(v, w) ∈ p.edges
                                  theorem SimpleGraph.isBridge_iff_adj_and_forall_cycle_notMem {V : Type u} {G : SimpleGraph V} {v w : V} :
                                  G.IsBridge s(v, w) ↔ G.Adj v w ∧ βˆ€ ⦃u : V⦄ (p : G.Walk u u), p.IsCycle β†’ s(v, w) βˆ‰ p.edges
                                  theorem SimpleGraph.isBridge_iff_mem_and_forall_cycle_notMem {V : Type u} {G : SimpleGraph V} {e : Sym2 V} :
                                  G.IsBridge e ↔ e ∈ G.edgeSet ∧ βˆ€ ⦃u : V⦄ (p : G.Walk u u), p.IsCycle β†’ e βˆ‰ p.edges

                                  Deleting a non-bridge edge from a connected graph preserves connectedness.

                                  theorem SimpleGraph.IsBridge.anti_of_mem_edgeSet {V : Type u} {G G' : SimpleGraph V} {e : Sym2 V} (hle : G ≀ G') (h : e ∈ G.edgeSet) (h' : G'.IsBridge e) :

                                  If e is an edge in G and is a bridge in a larger graph G', then it's a bridge in G.

                                  theorem SimpleGraph.IsBridge.sup_fromEdgeSet_of_not_reachable {V : Type u} {G : SimpleGraph V} {u v : V} (h : Β¬G.Reachable u v) :
                                  (G βŠ” fromEdgeSet {s(u, v)}).IsBridge s(u, v)

                                  Connecting two unreachable vertices by an edge creates a bridge.

                                  theorem SimpleGraph.IsBridge.sup_fromEdgeSet_of_not_reachable_of_isBridge {V : Type u} {G : SimpleGraph V} {u v : V} {e : Sym2 V} (h : Β¬G.Reachable u v) (h' : G.IsBridge e) :
                                  (G βŠ” fromEdgeSet {s(u, v)}).IsBridge e

                                  Connecting two unreachable vertices by an edge preserves existing bridges.

                                  2-reachability #

                                  In this section, we prove results about 2-connected components of a graph, but without naming them.

                                  theorem SimpleGraph.Walk.exists_mem_edges_of_not_reachable_deleteEdges {V : Type u} {G : SimpleGraph V} {u v : V} (w : G.Walk u v) {s : Set (Sym2 V)} (huv : Β¬(G.deleteEdges s).Reachable u v) :
                                  βˆƒ e ∈ s, e ∈ w.edges

                                  A walk between two vertices separated by a set of edges must go through one of those edges.

                                  theorem SimpleGraph.Walk.mem_edges_of_not_reachable_deleteEdges {V : Type u} {G : SimpleGraph V} {u v : V} (w : G.Walk u v) {e : Sym2 V} (huv : Β¬(G.deleteEdges {e}).Reachable u v) :
                                  e ∈ w.edges

                                  A walk between two vertices separated by an edge must go through that edge.

                                  theorem SimpleGraph.Walk.IsTrail.not_mem_edges_of_not_reachable {V : Type u} {G : SimpleGraph V} {u v x y : V} {w : G.Walk u v} (hw : w.IsTrail) (huy : Β¬(G.deleteEdges {s(x, y)}).Reachable u y) (hvy : Β¬(G.deleteEdges {s(x, y)}).Reachable v y) :
                                  s(x, y) βˆ‰ w.edges

                                  A trail doesn't go through an edge that disconnects one of its endpoints from the endpoints of the trail.

                                  theorem SimpleGraph.Walk.IsTrail.not_mem_support_of_not_reachable {V : Type u} {G : SimpleGraph V} {u v x y : V} {w : G.Walk u v} (hw : w.IsTrail) (huy : Β¬(G.deleteEdges {s(x, y)}).Reachable u y) (hvy : Β¬(G.deleteEdges {s(x, y)}).Reachable v y) :
                                  y βˆ‰ w.support

                                  A trail doesn't go through a vertex that is disconnected from its endpoints by an edge.

                                  theorem SimpleGraph.Walk.IsTrail.not_mem_support_of_subsingleton_neighborSet {V : Type u} {G : SimpleGraph V} {u v x : V} {w : G.Walk u v} (hw : w.IsTrail) (hxu : x β‰  u) (hxv : x β‰  v) (hx : (G.neighborSet x).Subsingleton) :
                                  x βˆ‰ w.support

                                  A trail doesn't go through any leaf vertex, except possibly at its endpoints.

                                  theorem SimpleGraph.Preconnected.induce_of_degree_eq_one {V : Type u} {G : SimpleGraph V} (hG : G.Preconnected) {s : Set V} (hs : βˆ€ v βˆ‰ s, (G.neighborSet v).Subsingleton) :

                                  Removing leaves from a connected graph keeps it connected.