Welzl orders
Lax195003.WelzlOrders Β· concepts/Lax195003/WelzlOrders.lean Β· lax-195003
No public endorsements yet.
Loading reviewβ¦
Sign in with ORCIDNatural Language Statement
Definition
Let be a set system on a finite ground set. A set crosses a total order whenever two consecutive elements lie on opposite sides of . Its crossing count is the number of such consecutive pairs, and the crossing number of the order is the largest crossing count over all sets in . A Welzl order of crossing number at most k is a total order whose crossing number is at most k.
Concept map
In the paper
- page 3 of the paper of lax-326031, Graph Classes and Width Parameters
Lean source view on GitHub
| 1 | import Mathlib.Data.Fin.Basic |
| 2 | import Mathlib.Data.Nat.Lattice |
| 3 | import Mathlib.Data.Set.Card |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: Welzl orders |
| 8 | type: definition |
| 9 | --- |
| 10 | Let `π` be a set system on a finite ground set. A set `X β π` crosses |
| 11 | a total order whenever two consecutive elements lie on opposite sides of |
| 12 | `X`. Its crossing count is the number of such consecutive pairs, and the |
| 13 | crossing number of the order is the largest crossing count over all sets in |
| 14 | `π`. A Welzl order of crossing number at most *k* is a total order whose |
| 15 | crossing number is at most *k*. |
| 16 | |
| 17 | # Formalization notes |
| 18 | |
| 19 | A total order of `Fin n` is represented by a permutation `Ο`, with `Ο v` the |
| 20 | position of `v`. Consecutive pairs are counted by their earlier endpoint: |
| 21 | `u` contributes exactly when some `v` has natural-number position |
| 22 | `(Ο u).val + 1` and precisely one of `u` and `v` lies in the set. Comparing |
| 23 | the natural values, rather than adding inside `Fin n`, avoids turning the |
| 24 | last and first positions into an artificial cyclic pair. |
| 25 | |
| 26 | The crossing number is a natural supremum. Every crossing count is at most |
| 27 | `n - 1`, so the set is bounded; for an empty family the natural convention |
| 28 | `sSup β = 0` gives the expected crossing number zero. `IsWelzlOrder` is a |
| 29 | `Prop`-valued bound rather than a structure carrying data derivable from the |
| 30 | order and the set system. |
| 31 | |
| 32 | -/ |
| 33 | |
| 34 | namespace Lax195003.WelzlOrders |
| 35 | |
| 36 | /-- A set system on `Ξ±`: a family of subsets of the ground set `Ξ±`. -/ |
| 37 | abbrev SetSystem (Ξ± : Type*) := Set (Set Ξ±) |
| 38 | |
| 39 | /-- The number of consecutive pairs in the order `Ο` with exactly one |
| 40 | endpoint in `X`. -/ |
| 41 | noncomputable def crossingCount {n : β} (Ο : Equiv.Perm (Fin n)) |
| 42 | (X : Set (Fin n)) : β := |
| 43 | {u : Fin n | β v : Fin n, |
| 44 | (Ο v).val = (Ο u).val + 1 β§ (u β X β v β X)}.ncard |
| 45 | |
| 46 | /-- The crossing number of `Ο` with respect to `π`: the largest crossing |
| 47 | count of a member of the set system. -/ |
| 48 | noncomputable def crossingNumber {n : β} (π : SetSystem (Fin n)) |
| 49 | (Ο : Equiv.Perm (Fin n)) : β := |
| 50 | sSup {k : β | β X β π, k = crossingCount Ο X} |
| 51 | |
| 52 | /-- The order `Ο` is a Welzl order of crossing number at most `k` for the |
| 53 | set system `π`. -/ |
| 54 | def IsWelzlOrder {n : β} (π : SetSystem (Fin n)) |
| 55 | (Ο : Equiv.Perm (Fin n)) (k : β) : Prop := |
| 56 | crossingNumber π Ο β€ k |
| 57 | |
| 58 | end Lax195003.WelzlOrders |
| 59 |
Formalization notes
A total order of is represented by a permutation , with the position of . Consecutive pairs are counted by their earlier endpoint: contributes exactly when some has natural-number position and precisely one of and lies in the set. Comparing the natural values, rather than adding inside , avoids turning the last and first positions into an artificial cyclic pair.
The crossing number is a natural supremum. Every crossing count is at most , so the set is bounded; for an empty family the natural convention gives the expected crossing number zero. is a -valued bound rather than a structure carrying data derivable from the order and the set system.
Builds on
none
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments