While this submission is a draft, it cannot be used by other submissions.

Neighborhood diversity

Lax825442.NeighborhoodDiversity · concepts/Lax825442/NeighborhoodDiversity.lean · lax-825442

definition

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Definition

    Neighborhood diversity is the minimum number of parts partitioning the vertices such that each part is a module and induces either a clique or an independent set. The empty graph has value zero.

    Concept map
    1 concept
    100%
    DefinitionThis concept

    Lean source view on GitHub

    1import Mathlib.Combinatorics.SimpleGraph.Finite
    2import Mathlib.Data.Set.Card
    3import Mathlib.Order.Lattice.Nat
    4
    5/-!
    6---
    7title: Neighborhood diversity
    8type: definition
    9---
    10Neighborhood diversity is the minimum number of parts partitioning the
    11vertices such that each part is a module and induces either a clique or an
    12independent set. The empty graph has value zero.
    13-/
    14
    15namespace Lax825442.NeighborhoodDiversity
    16
    17/-- A partition into `k` parts, each a module and each inducing a clique or
    18an independent set. Empty labels are allowed and disappear at the minimum. -/
    19def HasNeighborhoodDiversityAtMost {V : Type} [Fintype V] [DecidableEq V]
    20 (G : SimpleGraph V) (k : ℕ) : Prop :=
    21 ∃ part : V → Fin k,
    22 (∀ u v w : V,
    23 (part u = part v ∧ part w ≠ part u) → (G.Adj u w ↔ G.Adj v w)) ∧
    24 (∀ i : Fin k,
    25 (∀ u v : V,
    26 (u ≠ v ∧ (part u = i ∧ part v = i)) → G.Adj u v) ∨
    27 (∀ u v : V,
    28 (part u = i ∧ part v = i) → ¬ G.Adj u v))
    29
    30/-- The minimum number of neighborhood-diversity parts. -/
    31noncomputable def neighborhoodDiversity {V : Type} [Fintype V] [DecidableEq V]
    32 (G : SimpleGraph V) : ℕ :=
    33 sInf {k | HasNeighborhoodDiversityAtMost G k}
    34
    35end Lax825442.NeighborhoodDiversity
    36

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…