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.Connectivity.Finite

12 declarations. Mathlib docs · Source

Counting walks of a given length

Main definitions

  • walkLengthTwoEquivCommonNeighbors: bijective correspondence between walks of length two from u to v and common neighbours of u and v. Note that u and v may be the same.
  • finsetWalkLength: the Finset of length-n walks from u to v. This is used to give {p : G.walk u v | p.length = n} a Fintype instance, and it can also be useful as a recursive description of this set when V is finite.

TODO: should this be extended further?

theorem SimpleGraph.ConnectedComponent.card_le_card_of_le E1 #

∀ {V : Type u} [Finite V] {G G' : SimpleGraph V},
  G ≤ G' → Nat.card G'.ConnectedComponent ≤ Nat.card G.ConnectedComponent

theorem SimpleGraph.reachable_iff_exists_finsetWalkLength_nonempty E1 #

∀ {V : Type u} (G : SimpleGraph V) [inst : DecidableEq V] [inst_1 : Fintype V] [inst_2 : DecidableRel G.Adj] (u v : V),
  G.Reachable u v ↔ ∃ n, (G.finsetWalkLength (↑n) u v).Nonempty

instance SimpleGraph.instDecidableRelReachable E0 #

{V : Type u} → (G : SimpleGraph V) → [DecidableEq V] → [Fintype V] → [DecidableRel G.Adj] → DecidableRel G.Reachable

instance SimpleGraph.instFintypeConnectedComponent E0 #

{V : Type u} → (G : SimpleGraph V) → [DecidableEq V] → [Fintype V] → [DecidableRel G.Adj] → Fintype G.ConnectedComponent

instance SimpleGraph.instDecidablePreconnected E0 #

{V : Type u} → (G : SimpleGraph V) → [DecidableEq V] → [Fintype V] → [DecidableRel G.Adj] → Decidable G.Preconnected

instance SimpleGraph.instDecidableConnected E0 #

{V : Type u} → (G : SimpleGraph V) → [DecidableEq V] → [Fintype V] → [DecidableRel G.Adj] → Decidable G.Connected

instance SimpleGraph.instDecidableMemSupp E0 #

{V : Type u} →
  (G : SimpleGraph V) →
    [DecidableEq V] → [Fintype V] → [DecidableRel G.Adj] → (c : G.ConnectedComponent) → (v : V) → Decidable (v ∈ c.supp)

theorem SimpleGraph.disjiUnion_supp_toFinset_eq_supp_toFinset E1 #

∀ {V : Type u} {G : SimpleGraph V} [inst : DecidableEq V] [inst_1 : Fintype V] [inst_2 : DecidableRel G.Adj]
  {G' : SimpleGraph V},
  G ≤ G' →
    ∀ (c' : G'.ConnectedComponent) [inst_3 : Fintype ↑c'.supp] [inst_4 : DecidablePred fun c ↦ c.supp ⊆ c'.supp],
      {c | c.supp ⊆ c'.supp}.disjiUnion (fun c ↦ c.supp.toFinset) ⋯ = c'.supp.toFinset

abbrev SimpleGraph.oddComponents E1 #

{V : Type u} → (G : SimpleGraph V) → Set G.ConnectedComponent

The odd components are the connected components of odd cardinality. This definition excludes infinite components.

theorem SimpleGraph.ConnectedComponent.odd_oddComponents_ncard_subset_supp E1 #

∀ {V : Type u} (G : SimpleGraph V) [Finite V] {G' : SimpleGraph V},
  G ≤ G' → ∀ (c' : G'.ConnectedComponent), Odd {c | c ∈ G.oddComponents ∧ c.supp ⊆ c'.supp}.ncard ↔ Odd c'.supp.ncard

theorem SimpleGraph.odd_ncard_oddComponents E1 #

∀ {V : Type u} (G : SimpleGraph V) [Finite V], Odd G.oddComponents.ncard ↔ Odd (Nat.card V)

theorem SimpleGraph.ncard_oddComponents_mono E1 #

∀ {V : Type u} (G : SimpleGraph V) [Finite V] {G' : SimpleGraph V},
  G ≤ G' → G'.oddComponents.ncard ≤ G.oddComponents.ncard