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

Lax485480.WelzlTrees

Welzl trees

concepts/Lax485480/WelzlTrees.lean · lax-485480

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

    Let 𝒜𝒜 be a set system on a finite ground set and let T be a spanning tree of that ground set. A member X of 𝒜𝒜 crosses an edge of T when exactly one endpoint of the edge belongs to X. Its tree crossing count is the number of crossed edges, and the crossing number of T is the largest such count over all members of 𝒜𝒜. A Welzl tree of crossing number at most k is a spanning tree whose crossing number is at most k.

    Lean source view on GitHub

    1import Lax195003.WelzlOrders
    2import Mathlib.Combinatorics.SimpleGraph.Acyclic
    3import Mathlib.Data.Nat.Lattice
    4
    5/-!
    6---
    7title: Welzl trees
    8type: definition
    9---
    10Let `𝒜` be a set system on a finite ground set and let *T* be a spanning
    11tree of that ground set. A member *X* of `𝒜` crosses an edge of *T* when
    12exactly one endpoint of the edge belongs to *X*. Its tree crossing count is
    13the number of crossed edges, and the crossing number of *T* is the largest
    14such count over all members of `𝒜`. A Welzl tree of crossing number at
    15most *k* is a spanning tree whose crossing number is at most *k*.
    16
    17# Formalization notes
    18
    19An edge is represented by its unordered pair of endpoints. The cut of *X*
    20is defined with `Sym2.fromRel` from the symmetric relation saying that the
    21endpoints lie on opposite sides of *X*; intersecting this cut with the edge
    22set of *T* therefore counts every crossed edge exactly once.
    23
    24A spanning tree is a `SimpleGraph.IsTree` on the entire ground type, so no
    25separate spanning field is needed. The crossing number is a natural
    26supremum, following the Welzl-order definition. It is bounded by the finite
    27number of pairs of ground elements, and `sSup ∅ = 0` supplies the expected
    28value for an empty set system. `IsWelzlTree` is a proposition rather than a
    29structure carrying data already determined by the tree and set system.
    30-/
    31
    32namespace Lax485480.WelzlTrees
    33
    34open Lax195003.WelzlOrders
    35
    36/-- The symmetric cut relation determined by `X`: its two arguments lie on
    37opposite sides of `X`. -/
    38def SeparatedBy {V : Type*} (X : Set V) (u v : V) : Prop :=
    39 u ∈ X ↔ v ∉ X
    40
    41/-- The unordered pairs whose endpoints lie on opposite sides of `X`. -/
    42def cutEdges {V : Type*} (X : Set V) : Set (Sym2 V) :=
    43 Sym2.fromRel (r := SeparatedBy X) (by
    44 intro u v
    45 simp only [SeparatedBy]
    46 tauto)
    47
    48/-- The number of edges of `T` crossed by `X`. -/
    49noncomputable def treeCrossingCount {n : ℕ} (T : SimpleGraph (Fin n))
    50 (X : Set (Fin n)) : ℕ :=
    51 (T.edgeSet ∩ cutEdges X).ncard
    52
    53/-- The largest tree crossing count of a member of `𝒜`. -/
    54noncomputable def treeCrossingNumber {n : ℕ} (𝓕 : SetSystem (Fin n))
    55 (T : SimpleGraph (Fin n)) : ℕ :=
    56 sSup {k : ℕ | ∃ X ∈ 𝓕, k = treeCrossingCount T X}
    57
    58/-- `T` is a spanning Welzl tree of crossing number at most `k` for `𝒜`. -/
    59def IsWelzlTree {n : ℕ} (𝓕 : SetSystem (Fin n))
    60 (T : SimpleGraph (Fin n)) (k : ℕ) : Prop :=
    61 T.IsTree ∧ treeCrossingNumber 𝓕 T ≤ k
    62
    63end Lax485480.WelzlTrees
    64

    Formalization notes

    An edge is represented by its unordered pair of endpoints. The cut of X is defined with Sym2.fromRelSym2.fromRel from the symmetric relation saying that the endpoints lie on opposite sides of X; intersecting this cut with the edge set of T therefore counts every crossed edge exactly once.

    A spanning tree is a SimpleGraph.IsTreeSimpleGraph.IsTree on the entire ground type, so no separate spanning field is needed. The crossing number is a natural supremum, following the Welzl-order definition. It is bounded by the finite number of pairs of ground elements, and sSup=0sSup ∅ = 0 supplies the expected value for an empty set system. IsWelzlTreeIsWelzlTree is a proposition rather than a structure carrying data already determined by the tree and set system.

    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…