Counting walks of a given length #
Main definitions #
walkLengthTwoEquivCommonNeighbors: bijective correspondence between walks of length two fromutovand common neighbours ofuandv. Note thatuandvmay be the same.finsetWalkLength: theFinsetof length-nwalks fromutov. This is used to give{p : G.walk u v | p.length = n}aFintypeinstance, and it can also be useful as a recursive description of this set whenVis finite.
TODO: should this be extended further?
theorem SimpleGraph.ConnectedComponent.card_le_card_of_le {V : Type u} [Finite V] {G G' : SimpleGraph V} (h : G ≤ G') :
theorem SimpleGraph.reachable_iff_exists_finsetWalkLength_nonempty {V : Type u} (G : SimpleGraph V) [DecidableEq V] [Fintype V] [DecidableRel G.Adj] (u v : V) :
@[instance_reducible]
instance SimpleGraph.instDecidableRelReachable {V : Type u} (G : SimpleGraph V) [DecidableEq V] [Fintype V] [DecidableRel G.Adj] :
@[instance_reducible]
instance SimpleGraph.instFintypeConnectedComponent {V : Type u} (G : SimpleGraph V) [DecidableEq V] [Fintype V] [DecidableRel G.Adj] :
@[instance_reducible]
instance SimpleGraph.instDecidablePreconnected {V : Type u} (G : SimpleGraph V) [DecidableEq V] [Fintype V] [DecidableRel G.Adj] :
@[instance_reducible]
instance SimpleGraph.instDecidableConnected {V : Type u} (G : SimpleGraph V) [DecidableEq V] [Fintype V] [DecidableRel G.Adj] :
@[instance_reducible]
instance SimpleGraph.instDecidableMemSupp {V : Type u} (G : SimpleGraph V) [DecidableEq V] [Fintype V] [DecidableRel G.Adj] (c : G.ConnectedComponent) (v : V) :
theorem SimpleGraph.disjiUnion_supp_toFinset_eq_supp_toFinset {V : Type u} {G : SimpleGraph V} [DecidableEq V] [Fintype V] [DecidableRel G.Adj] {G' : SimpleGraph V} (h : G ≤ G') (c' : G'.ConnectedComponent) [Fintype ↑c'.supp] [DecidablePred fun (c : G.ConnectedComponent) => c.supp ⊆ c'.supp] :
{c : G.ConnectedComponent | c.supp ⊆ c'.supp}.disjiUnion (fun (c : G.ConnectedComponent) => c.supp.toFinset) ⋯ = c'.supp.toFinset
@[reducible, inline]
The odd components are the connected components of odd cardinality. This definition excludes infinite components.
Instances For
theorem SimpleGraph.ConnectedComponent.odd_oddComponents_ncard_subset_supp {V : Type u} (G : SimpleGraph V) [Finite V] {G' : SimpleGraph V} (h : G ≤ G') (c' : G'.ConnectedComponent) :
theorem SimpleGraph.ncard_oddComponents_mono {V : Type u} (G : SimpleGraph V) [Finite V] {G' : SimpleGraph V} (h : G ≤ G') :