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

Lax9.MergeWidth

Merge-Width

concepts/Lax9/MergeWidth.lean · lax-9

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 merge sequence of a finite simple graph consists of a coarsening sequence of partitions and a monotone sequence of graphs of resolved pairs. At each step, adjacency is uniform on the unresolved pairs between any two parts. The radius-rr width of a merge sequence is the maximum number of parts of the preceding partition met by a radius-rr ball in the graph of resolved pairs. The radius-rr merge-width of a graph is the minimum width of a merge sequence of that graph. A graph class has bounded merge-width if these parameters are bounded by a function of rr throughout the class.

    Lean source view on GitHub

    1import Mathlib
    2
    3/-!
    4---
    5title: Merge-Width
    6type: definition
    7---
    8A merge sequence of a finite simple graph consists of a coarsening sequence of
    9partitions and a monotone sequence of graphs of resolved pairs. At each step,
    10adjacency is uniform on the unresolved pairs between any two parts. The
    11radius-rr width of a merge sequence is the maximum number of parts of the
    12preceding partition met by a radius-rr ball in the graph of resolved pairs.
    13The radius-rr merge-width of a graph is the minimum width of a merge sequence
    14of that graph. A graph class has bounded merge-width if these parameters are
    15bounded by a function of rr throughout the class.
    16-/
    17
    18namespace Lax9.MergeWidth
    19
    20open scoped Classical
    21
    22universe u
    23
    24variable {V : Type u} [Fintype V]
    25
    26/-- The **resolved ball** of radius rr around vv in a graph HH:
    27the set of vertices reachable from vv by a walk of length at most rr.
    28In the paper this is applied to the graph (V,Ri)(V, Rᵢ) of resolved pairs. -/
    29def resolvedBall (H : SimpleGraph V) (r : ℕ) (v : V) : Set V :=
    30 {u | ∃ w : H.Walk v u, w.length ≤ r}
    31
    32/--
    33A **merge sequence** for a finite simple graph GG is a sequence
    34(P1,R1),,(Plength,Rlength)(P₁, R₁), …, (P_length, R_length) where:
    35
    36* each partipart i is a partition of V(G)V(G) (encoded as a SetoidSetoid), with part1part 1
    37 the partition into singletons () and partlengthpart length the trivial partition
    38 with one part ();
    39* the partitions are **coarsening**: partipartjpart i ≤ part j for iji ≤ j
    40 (recall that for setoids a *coarser* partition is a *larger* relation);
    41* each resolvediresolved i is the graph (V,Ri)(V, Rᵢ) of **resolved pairs**, and these are
    42 **monotone**: resolvediresolvedjresolved i ≤ resolved j for iji ≤ j;
    43* (**uniformity**) for any two parts A,BA, B of partipart i, the *unresolved* pairs
    44 between AA and BB (pairs xyRixy ∉ Rᵢ) are either all edges or all non-edges of
    45 GG.
    46-/
    47structure MergeSeq (G : SimpleGraph V) where
    48 /-- The number mm of steps of the sequence. -/
    49 length : ℕ
    50 /-- The sequence is nonempty. -/
    51 one_le_length : 1 ≤ length
    52 /-- The partition PiPᵢ at step ii (as a setoid on the vertices). -/
    53 part : ℕ → Setoid V
    54 /-- The graph (V,Ri)(V, Rᵢ) of resolved pairs at step ii. -/
    55 resolved : ℕ → SimpleGraph V
    56 /-- P1P₁ is the partition into singletons. -/
    57 part_one : part 1 = ⊥
    58 /-- PmP_m is the trivial partition with a single part. -/
    59 part_length : part length = ⊤
    60 /-- The partitions get coarser. -/
    61 part_mono : ∀ ⦃i j⦄, 1 ≤ i → i ≤ j → j ≤ length → part i ≤ part j
    62 /-- The sets of resolved pairs are monotone. -/
    63 resolved_mono : ∀ ⦃i j⦄, 1 ≤ i → i ≤ j → j ≤ length → resolved i ≤ resolved j
    64 /-- Uniformity: unresolved pairs between two parts are all edges or all
    65 non-edges. -/
    66 uniform : ∀ ⦃i⦄, 1 ≤ i → i ≤ length → ∀ ⦃x x' y y' : V⦄,
    67 (part i).r x x' → (part i).r y y' → x ≠ y → x' ≠ y' →
    68 ¬ (resolved i).Adj x y → ¬ (resolved i).Adj x' y' →
    69 (G.Adj x y ↔ G.Adj x' y')
    70
    71namespace MergeSeq
    72
    73variable {G : SimpleGraph V}
    74
    75/-- The number of parts of part(i1)part (i-1) that are **accessible** from vv by a
    76walk of length at most rr in the resolved graph resolvediresolved i. (Note the
    77intentional mismatch of indices Pi1Pᵢ₋₁ versus RiRᵢ.) -/
    78noncomputable def numAccessible (S : MergeSeq G) (r i : ℕ) (v : V) : ℕ :=
    79 Set.ncard ((fun u => Quotient.mk (S.part (i - 1)) u) '' resolvedBall (S.resolved i) r v)
    80
    81/-- The **radius-rr width** of a merge sequence: the maximum over all steps
    82i2i ≥ 2 and vertices vv of the number of parts of Pi1Pᵢ₋₁ accessible from vv
    83within distance rr in (V,Ri)(V, Rᵢ). -/
    84noncomputable def width (S : MergeSeq G) (r : ℕ) : ℕ :=
    85 (Finset.Icc 2 S.length).sup fun i => Finset.univ.sup fun v => S.numAccessible r i v
    86
    87end MergeSeq
    88
    89/-- The **radius-rr merge-width** mwr(G)mwᵣ(G) of a graph GG: the minimum
    90radius-rr width over all merge sequences of GG. -/
    91noncomputable def mergeWidth (r : ℕ) (G : SimpleGraph V) : ℕ :=
    92 sInf {w | ∃ S : MergeSeq G, S.width r = w}
    93
    94/-- A **graph class**: a property of finite simple graphs. -/
    95def GraphClass : Type 1 := ∀ ⦃V : Type⦄ [Fintype V], SimpleGraph V → Prop
    96
    97/-- A class CC has **bounded merge-width** if there is a function ff such that
    98every GCG ∈ C satisfies mwr(G)f(r)mwᵣ(G) ≤ f(r) for all radii rr. -/
    99def BoundedMergeWidth (C : GraphClass) : Prop :=
    100 ∃ f : ℕ → ℕ, ∀ ⦃V : Type⦄ [Fintype V] (G : SimpleGraph V), C G → ∀ r, mergeWidth r G ≤ f r
    101
    102end Lax9.MergeWidth
    103

    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…