Connectivity of subgraphs and induced graphs #
Main definitions #
SimpleGraph.Subgraph.Preconnected
andSimpleGraph.Subgraph.Connected
give subgraphs connectivity predicates viaSimpleGraph.subgraph.coe
.
A subgraph is preconnected if it is preconnected when coerced to be a simple graph.
Note: This is a structure to make it so one can be precise about how dot notation resolves.
- coe : H.coe.Preconnected
Instances For
instance
SimpleGraph.Subgraph.instCoePreconnectedPreconnectedElemVertsCoe
{V : Type u}
{G : SimpleGraph V}
{H : G.Subgraph}
:
Equations
instance
SimpleGraph.Subgraph.instCoeFunPreconnectedForallForallReachableElemVertsCoe
{V : Type u}
{G : SimpleGraph V}
{H : G.Subgraph}
:
CoeFun H.Preconnected fun (x : H.Preconnected) => ∀ (u v : ↑H.verts), H.coe.Reachable u v
Equations
A subgraph is connected if it is connected when coerced to be a simple graph.
Note: This is a structure to make it so one can be precise about how dot notation resolves.
Instances For
instance
SimpleGraph.Subgraph.instCoeConnectedConnectedElemVertsCoe
{V : Type u}
{G : SimpleGraph V}
{H : G.Subgraph}
:
Equations
instance
SimpleGraph.Subgraph.instCoeFunConnectedForallForallReachableElemVertsCoe
{V : Type u}
{G : SimpleGraph V}
{H : G.Subgraph}
:
Equations
theorem
SimpleGraph.Subgraph.Connected.preconnected
{V : Type u}
{G : SimpleGraph V}
{H : G.Subgraph}
(h : H.Connected)
:
theorem
SimpleGraph.Subgraph.Connected.nonempty
{V : Type u}
{G : SimpleGraph V}
{H : G.Subgraph}
(h : H.Connected)
:
theorem
SimpleGraph.Subgraph.singletonSubgraph_connected
{V : Type u}
{G : SimpleGraph V}
{v : V}
:
(G.singletonSubgraph v).Connected
@[simp]
theorem
SimpleGraph.Subgraph.subgraphOfAdj_connected
{V : Type u}
{G : SimpleGraph V}
{v w : V}
(hvw : G.Adj v w)
:
(G.subgraphOfAdj hvw).Connected
theorem
SimpleGraph.Subgraph.Connected.exists_verts_eq_connectedComponentSupp
{V : Type u}
{G : SimpleGraph V}
{H : G.Subgraph}
(hc : H.Connected)
(h : ∀ v ∈ H.verts, ∀ (w : V), G.Adj v w → H.Adj v w)
:
∃ (c : G.ConnectedComponent), H.verts = c.supp
This lemma establishes a condition under which a subgraph is the same as a connected component.
Note the asymmetry in the hypothesis h
: v
is in H.verts
, but w
is not required to be.
Walks as subgraphs #
The subgraph consisting of the vertices and edges of the walk.
Equations
Instances For
theorem
SimpleGraph.Walk.toSubgraph_cons_nil_eq_subgraphOfAdj
{V : Type u}
{G : SimpleGraph V}
{u v : V}
(h : G.Adj u v)
:
theorem
SimpleGraph.Walk.mem_verts_toSubgraph
{V : Type u}
{G : SimpleGraph V}
{u v w : V}
(p : G.Walk u v)
:
theorem
SimpleGraph.Walk.not_nil_of_adj_toSubgraph
{V : Type u}
{G : SimpleGraph V}
{w u v x : V}
{p : G.Walk u v}
(hadj : p.toSubgraph.Adj w x)
:
theorem
SimpleGraph.Walk.start_mem_verts_toSubgraph
{V : Type u}
{G : SimpleGraph V}
{u v : V}
(p : G.Walk u v)
:
theorem
SimpleGraph.Walk.end_mem_verts_toSubgraph
{V : Type u}
{G : SimpleGraph V}
{u v : V}
(p : G.Walk u v)
:
@[simp]
theorem
SimpleGraph.Walk.verts_toSubgraph
{V : Type u}
{G : SimpleGraph V}
{u v : V}
(p : G.Walk u v)
:
theorem
SimpleGraph.Walk.mem_edges_toSubgraph
{V : Type u}
{G : SimpleGraph V}
{u v : V}
(p : G.Walk u v)
{e : Sym2 V}
:
@[simp]
theorem
SimpleGraph.Walk.edgeSet_toSubgraph
{V : Type u}
{G : SimpleGraph V}
{u v : V}
(p : G.Walk u v)
:
@[simp]
theorem
SimpleGraph.Walk.toSubgraph_append
{V : Type u}
{G : SimpleGraph V}
{u v w : V}
(p : G.Walk u v)
(q : G.Walk v w)
:
@[simp]
theorem
SimpleGraph.Walk.toSubgraph_reverse
{V : Type u}
{G : SimpleGraph V}
{u v : V}
(p : G.Walk u v)
:
@[simp]
theorem
SimpleGraph.Walk.toSubgraph_rotate
{V : Type u}
{G : SimpleGraph V}
{u v : V}
[DecidableEq V]
(c : G.Walk v v)
(h : u ∈ c.support)
:
@[simp]
theorem
SimpleGraph.Walk.toSubgraph_map
{V : Type u}
{V' : Type v}
{G : SimpleGraph V}
{G' : SimpleGraph V'}
{u v : V}
(f : G →g G')
(p : G.Walk u v)
:
theorem
SimpleGraph.Walk.adj_toSubgraph_mapLe
{V : Type u}
{G : SimpleGraph V}
{u v : V}
{G' : SimpleGraph V}
{w x : V}
{p : G.Walk u v}
(h : G ≤ G')
:
@[simp]
theorem
SimpleGraph.Walk.finite_neighborSet_toSubgraph
{V : Type u}
{G : SimpleGraph V}
{u v w : V}
(p : G.Walk u v)
:
(p.toSubgraph.neighborSet w).Finite
theorem
SimpleGraph.Walk.toSubgraph_le_induce_support
{V : Type u}
{G : SimpleGraph V}
{u v : V}
(p : G.Walk u v)
:
theorem
SimpleGraph.Walk.toSubgraph_adj_getVert
{V : Type u}
{G : SimpleGraph V}
{u v : V}
(w : G.Walk u v)
{i : ℕ}
(hi : i < w.length)
:
w.toSubgraph.Adj (w.getVert i) (w.getVert (i + 1))
theorem
SimpleGraph.Walk.toSubgraph_adj_snd
{V : Type u}
{G : SimpleGraph V}
{u v : V}
(w : G.Walk u v)
(h : ¬w.Nil)
:
w.toSubgraph.Adj u w.snd
theorem
SimpleGraph.Walk.toSubgraph_adj_penultimate
{V : Type u}
{G : SimpleGraph V}
{u v : V}
(w : G.Walk u v)
(h : ¬w.Nil)
:
w.toSubgraph.Adj w.penultimate v
theorem
SimpleGraph.Walk.IsPath.neighborSet_toSubgraph_startpoint
{V : Type u}
{G : SimpleGraph V}
{u v : V}
{p : G.Walk u v}
(hp : p.IsPath)
(hnp : ¬p.Nil)
:
theorem
SimpleGraph.Walk.IsPath.neighborSet_toSubgraph_endpoint
{V : Type u}
{G : SimpleGraph V}
{u v : V}
{p : G.Walk u v}
(hp : p.IsPath)
(hnp : ¬p.Nil)
:
theorem
SimpleGraph.Walk.IsPath.ncard_neighborSet_toSubgraph_internal_eq_two
{V : Type u}
{G : SimpleGraph V}
{v u : V}
{i : ℕ}
{p : G.Walk u v}
(hp : p.IsPath)
(h : i ≠ 0)
(h' : i < p.length)
:
theorem
SimpleGraph.Walk.IsPath.snd_of_toSubgraph_adj
{V : Type u}
{G : SimpleGraph V}
{u v v' : V}
{p : G.Walk u v}
(hp : p.IsPath)
(hadj : p.toSubgraph.Adj u v')
:
theorem
SimpleGraph.Walk.IsCycle.neighborSet_toSubgraph_endpoint
{V : Type u}
{G : SimpleGraph V}
{u : V}
{p : G.Walk u u}
(hpc : p.IsCycle)
:
theorem
SimpleGraph.Walk.IsCycle.ncard_neighborSet_toSubgraph_eq_two
{V : Type u}
{G : SimpleGraph V}
{u v : V}
{p : G.Walk u u}
(hpc : p.IsCycle)
(h : v ∈ p.support)
:
theorem
SimpleGraph.Walk.IsCycle.exists_isCycle_snd_verts_eq
{V : Type u}
{G : SimpleGraph V}
{v w : V}
{p : G.Walk v v}
(h : p.IsCycle)
(hadj : p.toSubgraph.Adj v w)
:
theorem
SimpleGraph.Walk.toSubgraph_connected
{V : Type u}
{G : SimpleGraph V}
{u v : V}
(p : G.Walk u v)
:
theorem
SimpleGraph.Subgraph.preconnected_iff_forall_exists_walk_subgraph
{V : Type u}
{G : SimpleGraph V}
(H : G.Subgraph)
:
theorem
SimpleGraph.induce_pair_connected_of_adj
{V : Type u}
{G : SimpleGraph V}
{u v : V}
(huv : G.Adj u v)
:
theorem
SimpleGraph.Subgraph.Connected.induce_verts
{V : Type u}
{G : SimpleGraph V}
{H : G.Subgraph}
(h : H.Connected)
:
(SimpleGraph.induce H.verts G).Connected
theorem
SimpleGraph.extend_finset_to_connected
{V : Type u}
{G : SimpleGraph V}
(Gpc : G.Preconnected)
{t : Finset V}
(tn : t.Nonempty)
: