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

Lax195003.WelzlOrdersNeighborhoodComplexity

Neighborhood complexity

concepts/Lax195003/WelzlOrdersNeighborhoodComplexity.lean · lax-195003

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

    Open claimDefinitionThis conceptRelated conceptA → B: B builds on A

    Definition

    The neighborhood complexity πG(k)π_G(k) of a finite graph G is the largest number of distinct traces N(v)AN(v) ∩ A left by vertex neighborhoods on a set A of at most k vertices. A graph satisfies the linear bound with constant c if πG(k)ckπ_G(k) ≤ c · k for every positive k. A graph class has linear neighborhood complexity if one constant c ≥ 1 works uniformly for every graph in the class.

    Lean source view on GitHub

    1import Mathlib.Combinatorics.SimpleGraph.Basic
    2import Mathlib.Data.Nat.Lattice
    3import Mathlib.Data.Set.Card
    4import Lax12.GraphClasses
    5
    6/-!
    7---
    8title: Neighborhood complexity
    9type: definition
    10---
    11The neighborhood complexity `π_G(k)` of a finite graph *G* is the largest
    12number of distinct traces `N(v) ∩ A` left by vertex neighborhoods on a set
    13*A* of at most *k* vertices. A graph satisfies the linear bound with constant
    14*c* if `π_G(k) ≤ c · k` for every positive *k*. A graph class has linear
    15neighborhood complexity if one constant *c* ≥ 1 works uniformly for every
    16graph in the class.
    17
    18# Formalization notes
    19
    20The trace count is defined directly as the natural cardinality of the set of
    21traces. On the finite carrier `Fin n` this is the exact number of distinct
    22sets `N(v) ∩ A`. Working with `Set` keeps the trace literal and requires no
    23decidability instances.
    24
    25Graph classes use the registered `Lax12.GraphClasses.GraphClass`
    26representation. The neighborhood trace count itself remains defined locally
    27below.
    28
    29The paper defines the maximum over sets of size at most `k`. On the finite
    30carrier `Fin n`, the natural supremum below is that maximum. The bound is
    31required only for positive `k`: at `k = 0`, the empty vertex set has the one
    32trace `∅`, so the literal inequality `π_G(0) ≤ c · 0` would be false.
    33-/
    34
    35namespace Lax195003.WelzlOrdersNeighborhoodComplexity
    36
    37open Lax12.GraphClasses
    38
    39/-- The number of distinct traces `N(v) ∩ A` that vertex neighborhoods leave
    40on the vertex set `A`. -/
    41noncomputable def traceCount {V : Type*} (G : SimpleGraph V)
    42 (A : Set V) : ℕ :=
    43 {S : Set V | ∃ v : V, S = G.neighborSet v ∩ A}.ncard
    44
    45/-- The maximum number of distinct neighborhood traces on a vertex set of
    46cardinality at most `k`. -/
    47noncomputable def neighborhoodComplexity {n : ℕ}
    48 (G : SimpleGraph (Fin n)) (k : ℕ) : ℕ :=
    49 sSup {q : ℕ | ∃ A : Set (Fin n),
    50 A.ncard ≤ k ∧ q = traceCount G A}
    51
    52/-- The graph `G` has neighborhood complexity at most `c · k` for every
    53positive `k`. -/
    54def HasLinearNeighborhoodComplexityWithConstant {n : ℕ}
    55 (G : SimpleGraph (Fin n)) (c : ℕ) : Prop :=
    56 ∀ k : ℕ, 1 ≤ k → neighborhoodComplexity G k ≤ c * k
    57
    58/-- One natural constant `c ≥ 1` bounds the neighborhood complexity of every
    59graph satisfying the class predicate `C` by `c · k`: the class has linear
    60neighborhood complexity. -/
    61def HasLinearNeighborhoodComplexity (C : GraphClass) : Prop :=
    62 ∃ c : ℕ, 1 ≤ c ∧
    63 ∀ (n : ℕ) (G : SimpleGraph (Fin n)), C n G →
    64 HasLinearNeighborhoodComplexityWithConstant G c
    65
    66end Lax195003.WelzlOrdersNeighborhoodComplexity
    67

    Formalization notes

    The trace count is defined directly as the natural cardinality of the set of traces. On the finite carrier FinnFin n this is the exact number of distinct sets N(v)AN(v) ∩ A. Working with SetSet keeps the trace literal and requires no decidability instances.

    Graph classes use the registered Lax12.GraphClasses.GraphClassLax12.GraphClasses.GraphClass representation. The neighborhood trace count itself remains defined locally below.

    The paper defines the maximum over sets of size at most kk. On the finite carrier FinnFin n, the natural supremum below is that maximum. The bound is required only for positive kk: at k=0k = 0, the empty vertex set has the one trace , so the literal inequality πG(0)c0π_G(0) ≤ c · 0 would be false.

    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…