Draft — mutable and not usable as a dependency; its citation marks the draft state.

Lax18.FiniteGraphPartitions

Finite graph vertex partitions

concepts/Lax18/FiniteGraphPartitions.lean · lax-18

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.

    Concept map

    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A

    Definition

    A finite vertex partition is an indexed family of nonempty vertex sets which are pairwise disjoint and cover the whole vertex set. The indexing keeps the number of parts explicit, which is convenient for the regularity lemma.

    An equitable partition is one in which any two parts have sizes differing by at most one. This is the clean textbook convention: there is no exceptional leftover class.

    Lean source view on GitHub

    1import Mathlib.Data.Finset.Basic
    2import Mathlib.Data.Finset.Card
    3import Mathlib.Data.Fintype.Basic
    4
    5/-!
    6---
    7title: Finite graph vertex partitions
    8type: definition
    9---
    10A finite vertex partition is an indexed family of nonempty vertex sets which
    11are pairwise disjoint and cover the whole vertex set. The indexing keeps the
    12number of parts explicit, which is convenient for the regularity lemma.
    13
    14An equitable partition is one in which any two parts have sizes differing by
    15at most one. This is the clean textbook convention: there is no exceptional
    16leftover class.
    17-/
    18
    19namespace Lax18.FiniteGraphPartitions
    20
    21universe u
    22
    23/-- An indexed partition of a finite vertex set. -/
    24structure VertexPartition (V : Type u) [Fintype V] [DecidableEq V] where
    25 /-- The number of parts. -/
    26 partCount : ℕ
    27 /-- The part indexed by `i`. -/
    28 part : Fin partCount → Finset V
    29 /-- Every part is nonempty. -/
    30 nonempty_part : ∀ i : Fin partCount, (part i).Nonempty
    31 /-- Distinct parts are disjoint. -/
    32 pairwise_disjoint :
    33 ∀ i j : Fin partCount, i ≠ j → Disjoint (part i) (part j)
    34 /-- The parts cover all vertices. -/
    35 covers : ∀ v : V, ∃ i : Fin partCount, v ∈ part i
    36
    37namespace VertexPartition
    38
    39variable {V : Type u} [Fintype V] [DecidableEq V]
    40
    41/-- The size of a part of a vertex partition. -/
    42def partSize (P : VertexPartition V) (i : Fin P.partCount) : ℕ :=
    43 (P.part i).card
    44
    45/-- A partition is equitable if any two part sizes differ by at most one. -/
    46def Equitable (P : VertexPartition V) : Prop :=
    47 ∀ i j : Fin P.partCount,
    48 P.partSize i ≤ P.partSize j + 1
    49 P.partSize j ≤ P.partSize i + 1
    50
    51/-- A partition has exactly `k` parts. -/
    52def HasPartCount (P : VertexPartition V) (k : ℕ) : Prop :=
    53 P.partCount = k
    54
    55end VertexPartition
    56
    57end Lax18.FiniteGraphPartitions
    58

    Community review

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above; your ORCID profile must share a public name.

    0 comments

    Loading discussion…