Monadically Stable and Monadically Dependent Graph Classes
Main results: MonadicDependence, WeaklySparseMonDepIsNowhereDense
1Overview
All Entries
- def Biclique
- lem BipartiteRamsey
- def ComparabilityGrid
- def Flip
- def Subdivision
- def WeaklySparse
- def NowhereDense
- lem NowhereDenseBridge
- def StarCrossing
- lem SubdividedBicliqueRamsey
- def CliqueCrossing
- def HalfGraphCrossing
- def MonadicDependence
- lem WeaklySparseMonDepIsNowhereDense
2 Main Results
Preliminaries
The biclique of order \(k\) is the complete bipartite graph \(K_{k,k}\): the bipartite graph with sides \(a_1, \ldots, a_k\) and \(b_1, \ldots, b_k\), where \(a_i\) and \(b_j\) are adjacent for all \(i, j \in [k]\).
Let \(G\) be a graph and \(k \in \mathbb{N}\). We say that \(G\) contains the biclique of order \(k\) as a subgraph if there exist pairwise distinct vertices \(a_1, \ldots, a_k, b_1, \ldots, b_k \in V(G)\) such that \(a_i b_j \in E(G)\) for all \(i, j \in [k]\). No conditions are imposed on the remaining adjacencies between these vertices.
| 1 | import Mathlib.Combinatorics.SimpleGraph.Basic |
| 2 | |
| 3 | namespace Dev.MonadicDependence.Biclique |
| 4 | |
| 5 | /-- The biclique of order `k` is the complete bipartite graph `K_{k,k}` |
| 6 | on vertex set `Fin k ⊕ Fin k`: sides `a_1,…,a_k` (the `Sum.inl i`) and |
| 7 | `b_1,…,b_k` (the `Sum.inr j`), with `a_i` adjacent to `b_j` for all |
| 8 | `i, j ∈ Fin k`. |
| 9 | |
| 10 | "`G` contains the biclique of order `k` as a subgraph" (Mählmann, p. 22; |
| 11 | see `statement.tex`) is `(biclique k).IsContained G` — i.e., an injective |
| 12 | graph homomorphism `biclique k →g G`, equivalently `2k` distinct vertices |
| 13 | of `G` forming the bipartite edge pattern, with no constraint on other |
| 14 | adjacencies. Mathlib exposes this relation via the scoped notation |
| 15 | `biclique k ⊑ G` and supplies `completeBipartiteGraph_isContained_iff` |
| 16 | for a finset-level characterization. -/ |
| 17 | abbrev biclique (k : ℕ) : SimpleGraph (Fin k ⊕ Fin k) := |
| 18 | completeBipartiteGraph (Fin k) (Fin k) |
| 19 | |
| 20 | end Dev.MonadicDependence.Biclique |
| 21 |
For \(n \in \mathbb{N}\), the comparability grid of order \(n\) is the graph with vertex set \(\{a_{i, j} : i, j \in [n]\}\) in which two distinct vertices \(a_{i, j}\) and \(a_{i', j'}\) are adjacent if and only if at least one of the following holds:
- \(i = i'\) (“same row”), or
- \(j = j'\) (“same column”), or
- \(i < i' \Leftrightarrow j < j'\) (“comparable”: \((i, j)\) and \((i', j')\) are ordered the same way in both coordinates).
No other edges are present.
| 1 | import Mathlib.Combinatorics.SimpleGraph.Basic |
| 2 | |
| 3 | namespace Dev.MonadicDependence.ComparabilityGrid |
| 4 | |
| 5 | /-- The comparability grid of order `n` (Mählmann, p. 15) is the graph on |
| 6 | vertex set `Fin n × Fin n` in which two distinct vertices `(i, j)` and |
| 7 | `(i', j')` are adjacent iff at least one of: `i = i'` (same row), |
| 8 | `j = j'` (same column), or `i < i' ↔ j < j'` (comparable — ordered the |
| 9 | same way in both coordinates). |
| 10 | |
| 11 | Built with `SimpleGraph.fromRel`, which adds the `p ≠ q` guard and |
| 12 | symmetrizes by disjunction. The extra disjunct from symmetrization, |
| 13 | `j' < j ↔ i' < i`, coincides with `i < i' ↔ j < j'` whenever the two |
| 14 | pairs differ in both coordinates (by trichotomy on `Fin n`), so the |
| 15 | adjacency of `comparabilityGrid n` matches the source verbatim — see |
| 16 | `review.tex`. -/ |
| 17 | def comparabilityGrid (n : ℕ) : SimpleGraph (Fin n × Fin n) := |
| 18 | SimpleGraph.fromRel fun p q => |
| 19 | p.1 = q.1 ∨ p.2 = q.2 ∨ (p.1 < q.1 ↔ p.2 < q.2) |
| 20 | |
| 21 | end Dev.MonadicDependence.ComparabilityGrid |
| 22 |
Let \(G\) be a graph, \(\mathcal{K}\) a partition of \(V(G)\), and \(F \subseteq \mathcal{K}^2\) a symmetric relation. For a vertex \(v \in V(G)\), let \(\mathcal{K}(v) \in \mathcal{K}\) denote the unique part containing \(v\).
The flip of \(G\) by \((\mathcal{K}, F)\), denoted \(G \oplus F\) (leaving \(\mathcal{K}\) implicit when clear from context), is the graph with vertex set \(V(G)\) and with edges defined, for every pair of distinct vertices \(u, v \in V(G)\), by \[uv \in E(G \oplus F) \;\Longleftrightarrow\; \begin{cases} uv \notin E(G) & \text{if } (\mathcal{K}(u), \mathcal{K}(v)) \in F, \\ uv \in E(G) & \text{otherwise.} \end{cases}\]
We call \(G \oplus F\) a \(\mathcal{K}\)-flip of \(G\).
For \(k \in \mathbb{N}\), a graph \(H\) is a \(k\)-flip of \(G\) if there exists a partition \(\mathcal{K}\) of \(V(G)\) with \(|\mathcal{K}| \leq k\) and a symmetric relation \(F \subseteq \mathcal{K}^2\) such that \(H = G \oplus F\).
In particular, taking \(F = \emptyset\) yields \(G \oplus \emptyset = G\), so every graph \(G\) is a \(1\)-flip of itself (via the trivial one-part partition).
| 1 | import Mathlib.Combinatorics.SimpleGraph.Basic |
| 2 | |
| 3 | namespace Dev.MonadicDependence.Flip |
| 4 | |
| 5 | variable {V α : Type*} |
| 6 | |
| 7 | /-- The flip `G ⊕ F` of a graph `G` by a coloring `κ : V → α` and a |
| 8 | symmetric relation `F : α → α → Prop` (Mählmann p. 22). For distinct |
| 9 | `u, v ∈ V`, the pair is adjacent in the flip iff `G`'s adjacency is |
| 10 | toggled exactly when `(κ u, κ v) ∈ F`: |
| 11 | |
| 12 | - if `F (κ u) (κ v)`, then `uv ∈ E(flip)` iff `uv ∉ E(G)`; |
| 13 | - otherwise, `uv ∈ E(flip)` iff `uv ∈ E(G)`. |
| 14 | |
| 15 | The coloring `κ : V → α` encodes the partition `𝓚` of Mählmann's |
| 16 | definition as the preimages of colors; `α` plays the role of the set of |
| 17 | parts. The `k`-flip concept (partition with at most `k` parts) is left |
| 18 | implicit: downstream uses only the concrete flip operation, applied to |
| 19 | specific layer partitions of the `r`-crossings. -/ |
| 20 | def flip (G : SimpleGraph V) (κ : V → α) (F : α → α → Prop) |
| 21 | (Fsymm : Symmetric F) : SimpleGraph V where |
| 22 | Adj u v := u ≠ v ∧ (G.Adj u v ↔ ¬ F (κ u) (κ v)) |
| 23 | symm u v := by |
| 24 | rintro ⟨hne, h⟩ |
| 25 | refine ⟨Ne.symm hne, ?_⟩ |
| 26 | rw [SimpleGraph.adj_comm, |
| 27 | not_congr (show F (κ v) (κ u) ↔ F (κ u) (κ v) from |
| 28 | ⟨fun h => Fsymm h, fun h => Fsymm h⟩)] |
| 29 | exact h |
| 30 | loopless := ⟨fun _ ⟨hne, _⟩ => hne rfl⟩ |
| 31 | |
| 32 | end Dev.MonadicDependence.Flip |
| 33 |
Let \(H\) be a (simple) graph and \(r \in \mathbb{N}\). The \(r\)-subdivision of \(H\), denoted \(H^{(r)}\), is the graph obtained from \(H\) by replacing every edge \(uv \in E(H)\) with a path \(u, x^{uv}_1, x^{uv}_2, \ldots, x^{uv}_r, v\), where the internal vertices \(x^{uv}_1, \ldots, x^{uv}_r\) are fresh and pairwise disjoint across edges. Equivalently, \(H^{(r)}\) has vertex set \(V(H) \,\cup\, \{x^e_i : e \in E(H), i \in [r]\}\) and edges forming the \(r+1\)-edge path along each original edge of \(H\). For \(r = 0\) we have \(H^{(0)} = H\).
The \(r\)-subdivided clique of order \(n\) is \((K_n)^{(r)}\). The \(r\)-subdivided biclique of order \(n\) is \((K_{n,n})^{(r)}\), where \(K_{n,n}\) denotes the biclique of order \(n\) (Definition Biclique). The vertices of \(V(H) \subseteq V(H^{(r)})\) are called the principal vertices of the subdivision; the fresh \(x^e_i\) are the subdivision vertices.
Let \(G\) be a graph. We say \(G\) contains \(H^{(r)}\) as a subgraph if there is an injection \(\iota\) from \(V(H^{(r)})\) to \(V(G)\) such that every edge of \(H^{(r)}\) maps to an edge of \(G\). We say \(G\) contains \(H^{(r)}\) as an induced subgraph if \(\iota\) can be chosen so that \(uv \in E(H^{(r)})\) if and only if \(\iota(u)\iota(v) \in E(G)\), for every pair of distinct \(u, v \in V(H^{(r)})\).
| 1 | import Mathlib.Combinatorics.SimpleGraph.Basic |
| 2 | |
| 3 | namespace Dev.MonadicDependence.Subdivision |
| 4 | |
| 5 | /-- Vertex type of the `r`-subdivision of the complete graph `K_n`. |
| 6 | Either a principal vertex `.inl i` (with `i : Fin n`) or a subdivision |
| 7 | vertex `.inr (e, k)`, where `e : {p : Fin n × Fin n // p.1 < p.2}` |
| 8 | represents the edge `{e.1, e.2}` of `K_n` oriented by `<`, and |
| 9 | `k : Fin r` is its position along the path `e.1 ↝ e.2` (0-indexed). -/ |
| 10 | abbrev SubdividedCliqueVert (n r : ℕ) : Type := |
| 11 | Fin n ⊕ ({p : Fin n × Fin n // p.1 < p.2} × Fin r) |
| 12 | |
| 13 | /-- Vertex type of the `r`-subdivision of the biclique `K_{n,n}`. |
| 14 | Either a root (`.inl (.inl i)` = `aᵢ` or `.inl (.inr j)` = `bⱼ`) or a |
| 15 | subdivision vertex `.inr ((i, j), k)` = `π_{i,j,k+1}`, the `(k+1)`-st |
| 16 | interior vertex on the `a_i ↝ b_j` path (`k : Fin r`). -/ |
| 17 | abbrev SubdividedBicliqueVert (n r : ℕ) : Type := |
| 18 | (Fin n ⊕ Fin n) ⊕ ((Fin n × Fin n) × Fin r) |
| 19 | |
| 20 | /-- The `r`-subdivision of the complete graph on `Fin n`. Each edge |
| 21 | `{i, j}` of `K_n` (represented as the ordered pair `(i, j)` with `i < j`) |
| 22 | is replaced by a path of length `r + 1`: |
| 23 | `i — π₀ — π₁ — ⋯ — π_{r-1} — j`. For `r = 0` the graph equals `K_n` |
| 24 | (the subdivision-vertex component is indexed by `Fin 0 = ∅`, so it is |
| 25 | empty, and the principal-principal clause `r = 0` kicks in). |
| 26 | |
| 27 | `SimpleGraph.fromRel` adds the `x ≠ y` guard and symmetrizes by |
| 28 | disjunction, so the catch-all `False` branch accounts for pattern pairs |
| 29 | whose reverse is handled by an earlier clause. -/ |
| 30 | def subdividedClique (n r : ℕ) : SimpleGraph (SubdividedCliqueVert n r) := |
| 31 | SimpleGraph.fromRel fun x y => |
| 32 | match x, y with |
| 33 | | .inl _, .inl _ => r = 0 |
| 34 | | .inl i, .inr ⟨e, k⟩ => |
| 35 | (i = e.val.1 ∧ k.val = 0) ∨ (i = e.val.2 ∧ k.val = r - 1) |
| 36 | | .inr ⟨e, k⟩, .inr ⟨e', k'⟩ => e = e' ∧ k.val + 1 = k'.val |
| 37 | | _, _ => False |
| 38 | |
| 39 | /-- The `r`-subdivision of the biclique `K_{n,n}`. Each edge `a_i b_j` is |
| 40 | replaced by the `(r+1)`-edge path |
| 41 | `a_i — π_{i,j,1} — ⋯ — π_{i,j,r} — b_j`. For `r = 0` the graph equals |
| 42 | `K_{n,n}` (subdivision-vertex component empty; the root-root clauses |
| 43 | produce the biclique). |
| 44 | |
| 45 | Shares the vertex type with the star/clique/half-graph `r`-crossings |
| 46 | (`Dev.MonadicDependence.StarCrossing`, |
| 47 | `Dev.MonadicDependence.CliqueCrossing`, |
| 48 | `Dev.MonadicDependence.HalfGraphCrossing`), which augment this graph's |
| 49 | adjacency without changing its vertices. -/ |
| 50 | def subdividedBiclique (n r : ℕ) : SimpleGraph (SubdividedBicliqueVert n r) := |
| 51 | SimpleGraph.fromRel fun x y => |
| 52 | match x, y with |
| 53 | | .inl (.inl _), .inl (.inr _) => r = 0 |
| 54 | | .inl (.inl i), .inr ⟨⟨a, _⟩, k⟩ => i = a ∧ k.val = 0 |
| 55 | | .inl (.inr j), .inr ⟨⟨_, b⟩, k⟩ => j = b ∧ k.val = r - 1 |
| 56 | | .inr ⟨e, k⟩, .inr ⟨e', k'⟩ => e = e' ∧ k.val + 1 = k'.val |
| 57 | | _, _ => False |
| 58 | |
| 59 | end Dev.MonadicDependence.Subdivision |
| 60 |
For \(r \geq 1\) and \(n \in \mathbb{N}\), the star \(r\)-crossing of order \(n\) is the \(r\)-subdivided biclique of order \(n\), i.e. the graph \((K_{n,n})^{(r)}\) (Definition Subdivision, Definition Biclique).
Concretely, its vertex set consists of
- the \(2n\) roots \(a_1, \ldots, a_n, b_1, \ldots, b_n\), and
- for every pair \((i, j) \in [n]^2\), \(r\) fresh path vertices \(\pi_{i,j,1}, \ldots, \pi_{i,j,r}\), pairwise disjoint across \((i, j)\).
For every \((i, j) \in [n]^2\) the edges \(a_i\,\pi_{i,j,1},\ \pi_{i,j,1}\,\pi_{i,j,2},\ \ldots,\ \pi_{i,j,r-1}\,\pi_{i,j,r},\ \pi_{i,j,r}\,b_j\) form an \((r+1)\)-edge path from \(a_i\) to \(b_j\); no other edges are present. In particular roots appear on no path, and two roots \(a_i, a_{i'}\) (resp. \(b_j, b_{j'}\)) are never adjacent.
Layer partition. The vertices of the star \(r\)-crossing of order \(n\) are partitioned into \(r + 2\) layers \(L_0, L_1, \ldots, L_{r+1}\):
- \(L_0 := \{a_1, \ldots, a_n\}\),
- \(L_\ell := \{\pi_{i,j,\ell} : i, j \in [n]\}\) for \(\ell \in [r]\),
- \(L_{r+1} := \{b_1, \ldots, b_n\}\).
Write \(\mathcal{L}_{r,n}^{\mathrm{star}} := \{L_0, \ldots, L_{r+1}\}\) for the layer partition.
Flipped star \(r\)-crossing. For \(r \geq 1\) and \(n \in \mathbb{N}\), a graph \(H\) is a flipped star \(r\)-crossing of order \(n\) if there exists a symmetric relation \(F \subseteq (\mathcal{L}_{r,n}^{\mathrm{star}})^2\) such that \(H\) is (isomorphic to) the flip \(\mathrm{Star}_{r,n} \oplus F\) of the star \(r\)-crossing \(\mathrm{Star}_{r,n}\) of order \(n\) via the layer partition \(\mathcal{L}_{r,n}^{\mathrm{star}}\) (Definition Flip).
The number of flipped star \(r\)-crossings of order \(n\) (up to isomorphism) is at most \(2^{(r+2)^2}\). Taking \(F = \emptyset\) gives the (unflipped) star \(r\)-crossing of order \(n\) as a special case.
| 1 | import Mathlib.Combinatorics.SimpleGraph.Maps |
| 2 | import Dev.MonadicDependence.Subdivision.Contract |
| 3 | import Dev.MonadicDependence.Flip.Contract |
| 4 | |
| 5 | namespace Dev.MonadicDependence.StarCrossing |
| 6 | |
| 7 | open Dev.MonadicDependence.Subdivision |
| 8 | open Dev.MonadicDependence.Flip |
| 9 | |
| 10 | /-- The star `r`-crossing of order `n` (Mählmann p. 14): the |
| 11 | `r`-subdivided biclique. It has `2n` roots `a_i, b_j` and, for every |
| 12 | `(i, j) ∈ [n]²`, an internal `r`-vertex path |
| 13 | `a_i — π_{i,j,1} — ⋯ — π_{i,j,r} — b_j`; no other edges are present. |
| 14 | Definitionally equal to `subdividedBiclique n r`. -/ |
| 15 | abbrev starCrossing (n r : ℕ) : SimpleGraph (SubdividedBicliqueVert n r) := |
| 16 | subdividedBiclique n r |
| 17 | |
| 18 | /-- The layer partition of the star / clique / half-graph `r`-crossing |
| 19 | vertex set (`SubdividedBicliqueVert n r`), indexed by `Fin (r + 2)`: |
| 20 | layer `0` = left roots `a_i` (`.inl (.inl _)`); layer `ℓ + 1` for |
| 21 | `ℓ : Fin r` = path vertices `π_{i,j,ℓ+1}` (`.inr ⟨_, ℓ⟩`); layer `r + 1` |
| 22 | = right roots `b_j` (`.inl (.inr _)`). Shared across the three crossing |
| 23 | types. -/ |
| 24 | def layer {n r : ℕ} : SubdividedBicliqueVert n r → Fin (r + 2) |
| 25 | | .inl (.inl _) => ⟨0, by omega⟩ |
| 26 | | .inr ⟨_, ℓ⟩ => ⟨ℓ.val + 1, by omega⟩ |
| 27 | | .inl (.inr _) => ⟨r + 1, by omega⟩ |
| 28 | |
| 29 | /-- A graph `H` is a *flipped star `r`-crossing of order `n`* |
| 30 | (Mählmann p. 14) iff it is isomorphic to `flip (starCrossing n r) layer |
| 31 | F Fsymm` for some symmetric relation `F` on the `r + 2` layers. Taking |
| 32 | `F = ⊥` recovers the unflipped star `r`-crossing as a special case. -/ |
| 33 | def IsFlippedStarCrossing {V : Type*} (H : SimpleGraph V) (n r : ℕ) : Prop := |
| 34 | ∃ (F : Fin (r + 2) → Fin (r + 2) → Prop) (Fsymm : Symmetric F), |
| 35 | Nonempty (H ≃g flip (starCrossing n r) layer F Fsymm) |
| 36 | |
| 37 | end Dev.MonadicDependence.StarCrossing |
| 38 |
For \(r \geq 1\) and \(n \in \mathbb{N}\), the clique \(r\)-crossing of order \(n\) is the graph obtained from the star \(r\)-crossing of order \(n\) (Definition StarCrossing) by adding, for every root \(a_i\) (\(i \in [n]\)), all edges turning \(\{\operatorname{start}(\pi_{i,j}) : j \in [n]\} = \{\pi_{i,j,1} : j \in [n]\}\) into a clique, and similarly, for every root \(b_j\) (\(j \in [n]\)), all edges turning \(\{\operatorname{end}(\pi_{i,j}) : i \in [n]\} = \{\pi_{i,j,r} : i \in [n]\}\) into a clique.
Equivalently, the vertex set is the same as for the star \(r\)-crossing and the edges are:
- the \((r+1)\)-edge path \(a_i, \pi_{i,j,1}, \ldots, \pi_{i,j,r}, b_j\) for every \((i, j) \in [n]^2\) (shared with the star \(r\)-crossing);
- for every \(i \in [n]\) and distinct \(j, j' \in [n]\), the edge \(\pi_{i,j,1} \pi_{i,j',1}\);
- for every \(j \in [n]\) and distinct \(i, i' \in [n]\), the edge \(\pi_{i,j,r} \pi_{i',j,r}\).
No other edges are present. In particular, the \((r+1)\)-edge paths are still internally vertex-disjoint across \((i, j)\), and the interior path vertices \(\pi_{i,j,\ell}\) for \(\ell \in [2, r-1]\) have the same neighborhoods as in the star \(r\)-crossing.
Layer partition. The layer partition of the clique \(r\)-crossing of order \(n\) is the same as that of the star \(r\)-crossing (Definition StarCrossing): \(\mathcal{L}_{r,n}^{\mathrm{clique}} := \{L_0, L_1, \ldots, L_{r+1}\}\) with \(L_0 = \{a_i\}\), \(L_\ell = \{\pi_{i,j,\ell} : i, j \in [n]\}\) for \(\ell \in [r]\), \(L_{r+1} = \{b_j\}\).
Flipped clique \(r\)-crossing. For \(r \geq 1\) and \(n \in \mathbb{N}\), a graph \(H\) is a flipped clique \(r\)-crossing of order \(n\) if there exists a symmetric relation \(F \subseteq (\mathcal{L}_{r,n}^{\mathrm{clique}})^2\) such that \(H\) is (isomorphic to) the flip \(\mathrm{Clique}_{r,n} \oplus F\) of the clique \(r\)-crossing \(\mathrm{Clique}_{r,n}\) of order \(n\) via the layer partition \(\mathcal{L}_{r,n}^{\mathrm{clique}}\) (Definition Flip).
The number of flipped clique \(r\)-crossings of order \(n\) (up to isomorphism) is at most \(2^{(r+2)^2}\). Taking \(F = \emptyset\) gives the unflipped clique \(r\)-crossing of order \(n\).
| 1 | import Mathlib.Combinatorics.SimpleGraph.Maps |
| 2 | import Dev.MonadicDependence.Flip.Contract |
| 3 | import Dev.MonadicDependence.StarCrossing.Contract |
| 4 | |
| 5 | namespace Dev.MonadicDependence.CliqueCrossing |
| 6 | |
| 7 | open Dev.MonadicDependence.Subdivision |
| 8 | open Dev.MonadicDependence.Flip |
| 9 | open Dev.MonadicDependence.StarCrossing |
| 10 | |
| 11 | /-- The clique `r`-crossing of order `n` (Mählmann p. 14). Obtained from |
| 12 | the star `r`-crossing (`starCrossing n r`) by turning each root's |
| 13 | adjacent path-endpoint set into a clique: |
| 14 | |
| 15 | * for every `i : Fin n` and distinct `j, j' : Fin n`, add the edge |
| 16 | `π_{i,j,1} — π_{i,j',1}` (left end, at root `a_i`); |
| 17 | * for every `j : Fin n` and distinct `i, i' : Fin n`, add the edge |
| 18 | `π_{i,j,r} — π_{i',j,r}` (right end, at root `b_j`). |
| 19 | |
| 20 | The interior path vertices `π_{i,j,ℓ}` for `2 ≤ ℓ ≤ r − 1` keep the same |
| 21 | neighborhoods as in the star crossing. `SimpleGraph.fromRel` adds the |
| 22 | `x ≠ y` guard, so the distinct-edge requirement (`j ≠ j'` for the left |
| 23 | clique, `i ≠ i'` for the right) is automatic. -/ |
| 24 | def cliqueCrossing (n r : ℕ) : SimpleGraph (SubdividedBicliqueVert n r) := |
| 25 | starCrossing n r ⊔ |
| 26 | (SimpleGraph.fromRel fun x y => |
| 27 | match x, y with |
| 28 | | .inr ⟨⟨i, _⟩, k⟩, .inr ⟨⟨i', _⟩, k'⟩ => |
| 29 | (i = i' ∧ k.val = 0 ∧ k'.val = 0) |
| 30 | | _, _ => False) ⊔ |
| 31 | (SimpleGraph.fromRel fun x y => |
| 32 | match x, y with |
| 33 | | .inr ⟨⟨_, j⟩, k⟩, .inr ⟨⟨_, j'⟩, k'⟩ => |
| 34 | (j = j' ∧ k.val = r - 1 ∧ k'.val = r - 1) |
| 35 | | _, _ => False) |
| 36 | |
| 37 | /-- A graph `H` is a *flipped clique `r`-crossing of order `n`* |
| 38 | (Mählmann p. 14) iff it is isomorphic to `flip (cliqueCrossing n r) layer |
| 39 | F Fsymm` for some symmetric relation `F` on the `r + 2` layers. The |
| 40 | layer partition is shared with the star `r`-crossing |
| 41 | (`Dev.MonadicDependence.StarCrossing.layer`). -/ |
| 42 | def IsFlippedCliqueCrossing {V : Type*} (H : SimpleGraph V) (n r : ℕ) : Prop := |
| 43 | ∃ (F : Fin (r + 2) → Fin (r + 2) → Prop) (Fsymm : Symmetric F), |
| 44 | Nonempty (H ≃g flip (cliqueCrossing n r) layer F Fsymm) |
| 45 | |
| 46 | end Dev.MonadicDependence.CliqueCrossing |
| 47 |
For \(r \geq 1\) and \(n \in \mathbb{N}\), the half-graph \(r\)-crossing of order \(n\) has the same vertex set as the star \(r\)-crossing of order \(n\) (Definition StarCrossing): the \(2n\) roots \(a_1, \ldots, a_n, b_1, \ldots, b_n\) and the interior path vertices \(\pi_{i,j,\ell}\) for \((i, j) \in [n]^2\) and \(\ell \in [r]\).
The edges are:
- for every \((i, j) \in [n]^2\), the \(r\) internal-path edges \(\pi_{i,j,1}\,\pi_{i,j,2},\ \ldots,\ \pi_{i,j,r-1}\,\pi_{i,j,r}\);
- for every \(i \in [n]\) and every \((i', j) \in [n]^2\) with \(i \leq i'\), the edge \(a_i\,\pi_{i',j,1}\);
- for every \(j \in [n]\) and every \((i, j') \in [n]^2\) with \(j \leq j'\), the edge \(b_j\,\pi_{i,j',r}\).
No other edges are present. In particular, for \(r \geq 2\), the interior path vertices \(\pi_{i,j,\ell}\) with \(\ell \in [2, r-1]\) still have only their two path-neighbors \(\pi_{i,j,\ell-1}\) and \(\pi_{i,j,\ell+1}\); the half-graph pattern differs from the star \(r\)-crossing only at the ends of the paths (near \(a_i\) and \(b_j\)).
Layer partition. The layer partition is the same as for the star \(r\)-crossing: \(\mathcal{L}_{r,n}^{\mathrm{hg}} := \{L_0, L_1, \ldots, L_{r+1}\}\) with \(L_0 = \{a_i\}\), \(L_\ell = \{\pi_{i,j,\ell} : i, j \in [n]\}\) for \(\ell \in [r]\), \(L_{r+1} = \{b_j\}\).
Flipped half-graph \(r\)-crossing. For \(r \geq 1\) and \(n \in \mathbb{N}\), a graph \(H\) is a flipped half-graph \(r\)-crossing of order \(n\) if there exists a symmetric relation \(F \subseteq (\mathcal{L}_{r,n}^{\mathrm{hg}})^2\) such that \(H\) is (isomorphic to) the flip \(\mathrm{HG}_{r,n} \oplus F\) of the half-graph \(r\)-crossing \(\mathrm{HG}_{r,n}\) of order \(n\) via the layer partition \(\mathcal{L}_{r,n}^{\mathrm{hg}}\) (Definition Flip).
The number of flipped half-graph \(r\)-crossings of order \(n\) (up to isomorphism) is at most \(2^{(r+2)^2}\). Taking \(F = \emptyset\) gives the unflipped half-graph \(r\)-crossing of order \(n\).
| 1 | import Mathlib.Combinatorics.SimpleGraph.Maps |
| 2 | import Dev.MonadicDependence.Flip.Contract |
| 3 | import Dev.MonadicDependence.StarCrossing.Contract |
| 4 | |
| 5 | namespace Dev.MonadicDependence.HalfGraphCrossing |
| 6 | |
| 7 | open Dev.MonadicDependence.Subdivision |
| 8 | open Dev.MonadicDependence.Flip |
| 9 | open Dev.MonadicDependence.StarCrossing |
| 10 | |
| 11 | /-- The half-graph `r`-crossing of order `n` (Mählmann p. 14). Same |
| 12 | vertex set as the star `r`-crossing (`SubdividedBicliqueVert n r`). |
| 13 | Edges: |
| 14 | |
| 15 | * interior path edges |
| 16 | `π_{i,j,ℓ} — π_{i,j,ℓ+1}` for every `(i, j) ∈ [n]²` and `ℓ ∈ [r − 1]`; |
| 17 | * left half-graph ends `a_i — π_{i',j,1}` for every `i ≤ i'` and |
| 18 | `j ∈ [n]`; |
| 19 | * right half-graph ends `b_j — π_{i,j',r}` for every `j ≤ j'` and |
| 20 | `i ∈ [n]`. |
| 21 | |
| 22 | No other edges. Intended for `r ≥ 1`; for `r = 0` the definition yields |
| 23 | the empty graph on `SubdividedBicliqueVert n 0 ≃ Fin n ⊕ Fin n` (no |
| 24 | path vertices, no root edges), which lies outside Mählmann's scope. -/ |
| 25 | def halfGraphCrossing (n r : ℕ) : SimpleGraph (SubdividedBicliqueVert n r) := |
| 26 | SimpleGraph.fromRel fun x y => |
| 27 | match x, y with |
| 28 | | .inr ⟨e, k⟩, .inr ⟨e', k'⟩ => e = e' ∧ k.val + 1 = k'.val |
| 29 | | .inl (.inl i), .inr ⟨⟨i', _⟩, k⟩ => i ≤ i' ∧ k.val = 0 |
| 30 | | .inl (.inr j), .inr ⟨⟨_, j'⟩, k⟩ => j ≤ j' ∧ k.val = r - 1 |
| 31 | | _, _ => False |
| 32 | |
| 33 | /-- A graph `H` is a *flipped half-graph `r`-crossing of order `n`* |
| 34 | (Mählmann p. 14) iff it is isomorphic to `flip (halfGraphCrossing n r) |
| 35 | layer F Fsymm` for some symmetric relation `F` on the `r + 2` layers. |
| 36 | The layer partition is shared with the star `r`-crossing |
| 37 | (`Dev.MonadicDependence.StarCrossing.layer`). -/ |
| 38 | def IsFlippedHalfGraphCrossing {V : Type*} (H : SimpleGraph V) (n r : ℕ) : Prop := |
| 39 | ∃ (F : Fin (r + 2) → Fin (r + 2) → Prop) (Fsymm : Symmetric F), |
| 40 | Nonempty (H ≃g flip (halfGraphCrossing n r) layer F Fsymm) |
| 41 | |
| 42 | end Dev.MonadicDependence.HalfGraphCrossing |
| 43 |
MonadicDependence
A graph class \(\mathcal{C}\) is monadically dependent if for every radius \(r \geq 1\) there exists \(k \in \mathbb{N}\) such that \(\mathcal{C}\) excludes as induced subgraphs
- all flipped star \(r\)-crossings of order \(k\) (Definition StarCrossing), and
- all flipped clique \(r\)-crossings of order \(k\) (Definition CliqueCrossing), and
- all flipped half-graph \(r\)-crossings of order \(k\) (Definition HalfGraphCrossing), and
- the comparability grid of order \(k\) (Definition ComparabilityGrid).
Here “\(\mathcal{C}\) excludes as induced subgraphs …” means that no graph \(G \in \mathcal{C}\) contains any of the listed graphs as an induced subgraph.
| 1 | import Mathlib.Combinatorics.SimpleGraph.Copy |
| 2 | import Catalog.Sparsity.Preliminaries.Contract |
| 3 | import Dev.MonadicDependence.StarCrossing.Contract |
| 4 | import Dev.MonadicDependence.CliqueCrossing.Contract |
| 5 | import Dev.MonadicDependence.HalfGraphCrossing.Contract |
| 6 | import Dev.MonadicDependence.ComparabilityGrid.Contract |
| 7 | |
| 8 | set_option linter.dupNamespace false |
| 9 | |
| 10 | namespace Dev.MonadicDependence.MonadicDependence |
| 11 | |
| 12 | open Catalog.Sparsity.Preliminaries |
| 13 | open Dev.MonadicDependence.Flip |
| 14 | open Dev.MonadicDependence.StarCrossing |
| 15 | open Dev.MonadicDependence.CliqueCrossing |
| 16 | open Dev.MonadicDependence.HalfGraphCrossing |
| 17 | open Dev.MonadicDependence.ComparabilityGrid |
| 18 | |
| 19 | /-- A graph class `𝓒` is *monadically dependent* — Mählmann Thm 2.3 |
| 20 | clause (3), p. 9 — iff for every radius `r ≥ 1` there exists `k : ℕ` |
| 21 | such that every graph `G ∈ 𝓒` excludes (as an induced subgraph) all |
| 22 | four of the following patterns at order `k`: |
| 23 | |
| 24 | * every flip of the star `r`-crossing `starCrossing k r` via the layer |
| 25 | partition and some symmetric relation on layers, |
| 26 | * every flip of the clique `r`-crossing `cliqueCrossing k r`, |
| 27 | * every flip of the half-graph `r`-crossing `halfGraphCrossing k r`, and |
| 28 | * the comparability grid `comparabilityGrid k` (no flips — by |
| 29 | Mählmann p. 15, every "flipped comparability grid" contains a |
| 30 | non-flipped one as an induced subgraph, so the flipped variant is |
| 31 | redundant here). -/ |
| 32 | def IsMonadicallyDependent (C : GraphClass) : Prop := |
| 33 | ∀ r : ℕ, 1 ≤ r → ∃ k : ℕ, |
| 34 | ∀ {V : Type} [DecidableEq V] [Fintype V] (G : SimpleGraph V), |
| 35 | C G → |
| 36 | (∀ (F : Fin (r + 2) → Fin (r + 2) → Prop) (Fsymm : Symmetric F), |
| 37 | ¬ (flip (starCrossing k r) layer F Fsymm).IsIndContained G) ∧ |
| 38 | (∀ (F : Fin (r + 2) → Fin (r + 2) → Prop) (Fsymm : Symmetric F), |
| 39 | ¬ (flip (cliqueCrossing k r) layer F Fsymm).IsIndContained G) ∧ |
| 40 | (∀ (F : Fin (r + 2) → Fin (r + 2) → Prop) (Fsymm : Symmetric F), |
| 41 | ¬ (flip (halfGraphCrossing k r) layer F Fsymm).IsIndContained G) ∧ |
| 42 | ¬ (comparabilityGrid k).IsIndContained G |
| 43 | |
| 44 | end Dev.MonadicDependence.MonadicDependence |
| 45 |
WeaklySparseMonDepIsNowhereDense
A graph class \(\mathcal{C}\) is weakly sparse if there exists a bound \(k \in \mathbb{N}\) such that no graph from \(\mathcal{C}\) contains the biclique of order \(k\) (Definition Biclique) as a subgraph.
| 1 | import Mathlib.Combinatorics.SimpleGraph.Copy |
| 2 | import Catalog.Sparsity.Preliminaries.Contract |
| 3 | import Dev.MonadicDependence.Biclique.Contract |
| 4 | |
| 5 | namespace Dev.MonadicDependence.WeaklySparse |
| 6 | |
| 7 | open Catalog.Sparsity.Preliminaries |
| 8 | open Dev.MonadicDependence.Biclique |
| 9 | |
| 10 | /-- A graph class `𝓒` is *weakly sparse* iff there exists a bound `k` |
| 11 | such that no graph from `𝓒` contains the biclique of order `k` |
| 12 | (`Dev.MonadicDependence.Biclique`) as a subgraph — Mählmann Def. 13.5, |
| 13 | p. 167. |
| 14 | |
| 15 | "Contains as subgraph" is `SimpleGraph.IsContained` (Mathlib; |
| 16 | non-induced): an injective graph homomorphism `biclique k →g G`. -/ |
| 17 | def IsWeaklySparse (C : GraphClass) : Prop := |
| 18 | ∃ k : ℕ, ∀ {V : Type} [DecidableEq V] [Fintype V] (G : SimpleGraph V), |
| 19 | C G → ¬ (biclique k).IsContained G |
| 20 | |
| 21 | end Dev.MonadicDependence.WeaklySparse |
| 22 |
A graph class \(\mathcal{C}\) is nowhere dense if for every radius \(r \in \mathbb{N}\) there exists a bound \(N_r \in \mathbb{N}\) such that no graph from \(\mathcal{C}\) contains the \(r\)-subdivided clique of order \(N_r\) (Definition Subdivision) as a subgraph.
| 1 | import Mathlib.Combinatorics.SimpleGraph.Copy |
| 2 | import Catalog.Sparsity.Preliminaries.Contract |
| 3 | import Dev.MonadicDependence.Subdivision.Contract |
| 4 | |
| 5 | namespace Dev.MonadicDependence.NowhereDense |
| 6 | |
| 7 | open Catalog.Sparsity.Preliminaries |
| 8 | open Dev.MonadicDependence.Subdivision |
| 9 | |
| 10 | /-- A graph class `𝓒` is *nowhere dense* (Mählmann Def. 13.1, p. 166) |
| 11 | iff for every radius `r : ℕ` there is a bound `N_r : ℕ` such that no |
| 12 | graph in `𝓒` contains the `r`-subdivided clique of order `N_r` |
| 13 | (`subdividedClique N_r r` from `Dev.MonadicDependence.Subdivision`) as |
| 14 | a subgraph. |
| 15 | |
| 16 | This is the *local* nowhere-denseness of Mählmann, distinct from |
| 17 | `Catalog.Sparsity.NowhereDense.IsNowhereDense` (shallow-topological-minor |
| 18 | grad bound). The two are classically equivalent; see |
| 19 | `Dev.MonadicDependence.NowhereDenseBridge`. -/ |
| 20 | def IsNowhereDense (C : GraphClass) : Prop := |
| 21 | ∀ r : ℕ, ∃ N : ℕ, ∀ {V : Type} [DecidableEq V] [Fintype V] (G : SimpleGraph V), |
| 22 | C G → ¬ (subdividedClique N r).IsContained G |
| 23 | |
| 24 | end Dev.MonadicDependence.NowhereDense |
| 25 |
Let \(\mathcal{C}\) be a graph class. If \(\mathcal{C}\) is weakly sparse (Definition WeaklySparse) and monadically dependent (Definition MonadicDependence), then \(\mathcal{C}\) is nowhere dense (Definition NowhereDense).
| 1 | import Catalog.Sparsity.Preliminaries.Contract |
| 2 | import Dev.MonadicDependence.WeaklySparse.Contract |
| 3 | import Dev.MonadicDependence.MonadicDependence.Contract |
| 4 | import Dev.MonadicDependence.NowhereDense.Contract |
| 5 | |
| 6 | namespace Dev.MonadicDependence.WeaklySparseMonDepIsNowhereDense |
| 7 | |
| 8 | open Catalog.Sparsity.Preliminaries |
| 9 | open Dev.MonadicDependence.WeaklySparse |
| 10 | open Dev.MonadicDependence.MonadicDependence |
| 11 | open Dev.MonadicDependence.NowhereDense |
| 12 | |
| 13 | /-- Mählmann Lemma 13.7. If a graph class `C` is weakly sparse |
| 14 | (`Dev.MonadicDependence.WeaklySparse.IsWeaklySparse`) and monadically |
| 15 | dependent (`Dev.MonadicDependence.MonadicDependence.IsMonadicallyDependent`), |
| 16 | then it is nowhere dense in the local sense of |
| 17 | `Dev.MonadicDependence.NowhereDense.IsNowhereDense`. -/ |
| 18 | axiom weaklySparseMonDepIsNowhereDense (C : GraphClass) : |
| 19 | IsWeaklySparse C → IsMonadicallyDependent C → IsNowhereDense C |
| 20 | |
| 21 | end Dev.MonadicDependence.WeaklySparseMonDepIsNowhereDense |
| 22 |