Merge sequences and their radius-r width
Lax185574.MergeSequences · concepts/Lax185574/MergeSequences.lean · lax-185574
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
A merge sequence of a graph G is a sequence (𝒫₁, R₁), …, (𝒫_m, R_m) such that:
- 𝒫₁ is the partition into singletons and 𝒫_m = {V(G)},
- 𝒫₁ ≼ ⋯ ≼ 𝒫_m,
- R₁ ⊆ ⋯ ⊆ R_m ⊆ (V(G) choose 2), and
- for every i ∈ [m] and X, Y ∈ 𝒫_i, the set XY ∖ R_i is contained either in E(G) or in E(Ḡ), that is, the pair X, Y is homogeneous once pairs in R_i are ignored.
Here XY is the set of pairs xy with x ∈ X, y ∈ Y and x ≠ y. Condition 4 says that 𝒫_i is homogeneous modulo R_i. The radius-r width of the merge sequence is
max_{2 ≤ i ≤ m} max_{v ∈ V(G)} |Ball^{R_i}r(v)/𝒫{i−1}|.
The offset in the indices of R_i and 𝒫_{i−1} is intentional.
Concept map
In the paper
- page 31 of this submission's paper
Lean source view on GitHub
| 1 | import Lax185574.Partitions |
| 2 | import Lax185574.GraphBalls |
| 3 | import Mathlib.Order.Lattice.Nat |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: Merge sequences and their radius-r width |
| 8 | type: definition |
| 9 | --- |
| 10 | A *merge sequence* of a graph G is a sequence (𝒫₁, R₁), …, (𝒫_m, R_m) |
| 11 | such that: |
| 12 | |
| 13 | 1. 𝒫₁ is the partition into singletons and 𝒫_m = {V(G)}, |
| 14 | 2. 𝒫₁ ≼ ⋯ ≼ 𝒫_m, |
| 15 | 3. R₁ ⊆ ⋯ ⊆ R_m ⊆ (V(G) choose 2), and |
| 16 | 4. for every i ∈ [m] and X, Y ∈ 𝒫_i, the set XY ∖ R_i is contained |
| 17 | either in E(G) or in E(Ḡ), that is, the pair X, Y is homogeneous once |
| 18 | pairs in R_i are ignored. |
| 19 | |
| 20 | Here XY is the set of pairs xy with x ∈ X, y ∈ Y and x ≠ y. Condition 4 |
| 21 | says that 𝒫_i is *homogeneous modulo R_i*. The *radius-r width* of the |
| 22 | merge sequence is |
| 23 | |
| 24 | max_{2 ≤ i ≤ m} max_{v ∈ V(G)} |Ball^{R_i}_r(v)/𝒫_{i−1}|. |
| 25 | |
| 26 | The offset in the indices of R_i and 𝒫_{i−1} is intentional. |
| 27 | |
| 28 | # Formalization notes |
| 29 | |
| 30 | A merge sequence is a nonempty list of pairs of a partition, as in |
| 31 | `Lax185574.Partitions`, and a simple graph on the vertex type, whose |
| 32 | edges are the pairs of R_i. So R_i ⊆ (V(G) choose 2) holds by |
| 33 | construction, and R_i ⊆ R_{i+1} is the subgraph order. The partition |
| 34 | into singletons is `⊥` and the partition with one part is `⊤`. |
| 35 | |
| 36 | Homogeneity modulo R names the parts X and Y by vertices a and b with |
| 37 | X = 𝒫(a) and Y = 𝒫(b), as for flips in `Lax185574.Flips`. The ball |
| 38 | Ball^{R_i}_r(v) is the ball in the graph R_i, `GraphBalls.graphBall`. |
| 39 | The width is the supremum of a set of natural numbers, finite on a |
| 40 | finite vertex type, and the empty maximum (a sequence of length one) is |
| 41 | 0. Algorithms exchange merge sequences as lists of pairs of a partition |
| 42 | and a graph, in the encodings of `Lax185574.Encodings` and |
| 43 | `Lax185574.Partitions`. |
| 44 | -/ |
| 45 | |
| 46 | namespace Lax185574.MergeSequences |
| 47 | |
| 48 | open Lax185574.Partitions Lax185574.GraphBalls |
| 49 | |
| 50 | universe z |
| 51 | |
| 52 | variable {V : Type z} |
| 53 | |
| 54 | /-- `P` is homogeneous modulo `R`: for every pair of parts `𝒫(a)`, |
| 55 | `𝒫(b)`, the pairs of distinct vertices between them that are not in |
| 56 | `R` are all edges of `G`, or all non-edges of `G`. -/ |
| 57 | def HomogeneousModulo (G : SimpleGraph V) (P : Setoid V) (R : SimpleGraph V) : Prop := |
| 58 | ∀ a b : V, |
| 59 | (∀ x y : V, P x a → P y b → x ≠ y → ¬ R.Adj x y → G.Adj x y) ∨ |
| 60 | (∀ x y : V, P x a → P y b → x ≠ y → ¬ R.Adj x y → ¬ G.Adj x y) |
| 61 | |
| 62 | /-- `ms` is a merge sequence of `G`: it starts with the partition into |
| 63 | singletons and ends with the partition with one part, the partitions |
| 64 | get coarser and the relations grow, and every partition is homogeneous |
| 65 | modulo its relation. -/ |
| 66 | def IsMergeSequence (G : SimpleGraph V) (ms : List (Setoid V × SimpleGraph V)) : Prop := |
| 67 | ∃ h : ms ≠ [], |
| 68 | (ms.head h).1 = ⊥ ∧ (ms.getLast h).1 = ⊤ ∧ |
| 69 | (∀ (t : ℕ) (ht : t + 1 < ms.length), ms[t].1 ≤ ms[t + 1].1 ∧ ms[t].2 ≤ ms[t + 1].2) ∧ |
| 70 | ∀ (t : ℕ) (ht : t < ms.length), HomogeneousModulo G ms[t].1 ms[t].2 |
| 71 | |
| 72 | /-- The radius-`r` width of the merge sequence `ms`: the largest number |
| 73 | of parts of `𝒫_t` that meet a ball of radius `r` in `R_{t+1}`. -/ |
| 74 | noncomputable def mergeWidth (r : ℕ) (ms : List (Setoid V × SimpleGraph V)) : ℕ := |
| 75 | sSup {K | ∃ (t : ℕ) (ht : t + 1 < ms.length) (v : V), |
| 76 | K = partCount ms[t].1 (graphBall ms[t + 1].2 r {v})} |
| 77 | |
| 78 | end Lax185574.MergeSequences |
| 79 |
Formalization notes
A merge sequence is a nonempty list of pairs of a partition, as in , and a simple graph on the vertex type, whose edges are the pairs of R_i. So R_i ⊆ (V(G) choose 2) holds by construction, and R_i ⊆ R_{i+1} is the subgraph order. The partition into singletons is and the partition with one part is .
Homogeneity modulo R names the parts X and Y by vertices a and b with X = 𝒫(a) and Y = 𝒫(b), as for flips in . The ball Ball^{R_i}_r(v) is the ball in the graph R_i, . The width is the supremum of a set of natural numbers, finite on a finite vertex type, and the empty maximum (a sequence of length one) is 0. Algorithms exchange merge sequences as lists of pairs of a partition and a graph, in the encodings of and .
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments