ChipFiringConfiguration #
Configurations and superstable configurations #
Fix a vertex $q \in V(G)$. A configuration
(ChipFiringConfiguration G q) is a nonnegative integer assignment
to the vertices $V(G) \setminus \{q\}$, extended by zero at $q$. This corresponds to what
Corry-Perkinson call a nonnegative configuration; we use "configuration"
to mean "nonnegative configuration" throughout this library.
A configuration $c$ is superstable if for every nonempty $S \subseteq V(G) \setminus \{q\}$, some vertex in $S$ has fewer chips than its out-degree to $V(G) \setminus S$. Equivalently, the associated divisor is $q$-reduced. A maximal superstable configuration is one that is not dominated by any other superstable configuration.
The quantity outdegreeSet G S v counts edges from $v$ to vertices outside $S$, and is the
relevant threshold for the superstability condition.
A configuration on $G$ with respect to distinguished vertex $q$ is a nonnegative integer assignment to all vertices, with the convention that $q$ holds zero chips. This is what Corry-Perkinson call a nonnegative configuration.
See: Corry-Perkinson, Definition 2.9.
- chips : CFDiv G
The divisor recording the chip count at each vertex.
The distinguished vertex $q$ has no chips.
All chip counts are nonnegative.
Instances For
The degree of a configuration is the sum of all values away from $q$: $$ \deg(c) = \sum_{v \in V(G)\setminus\{q\}} c(v). $$ Since $c(q)=0$, this is implemented as the degree of the underlying divisor.
Equations
Instances For
Two configurations are equal if their chip counts agree at every vertex.
Two configurations are equal if and only if their underlying divisors agree.
Converts a configuration $c$ to the $q$-effective divisor toDiv d c,
bundled with its proof of $q$-effectivity.
Equations
- toQEffectiveDivisor d c = { D := toDiv d c, h_eff := ⋯ }
Instances For
The degree of a $q$-effective divisor equals its value at $q$ plus the configuration degree.
Shifting the prescribed degree by $k$ adds $k$ chips at $q$.
The divisor $c-q$ has degree $\deg(c)-1$.
toQEffectiveDivisor is a left inverse of toConfig at the correct degree: converting a
$q$-effective
divisor to a configuration and back via toDiv (deg D.D) recovers the original divisor.
The divisor toDiv d c is effective if and only if $d \ge \deg(c)$, i.e. there are
enough chips at $q$ to cover any debt.
Equations
- instPartialOrderChipFiringConfiguration = { le := fun (c₁ c₂ : ChipFiringConfiguration G q) => c₁.chips ≤ c₂.chips, le_refl := ⋯, le_trans := ⋯, lt_iff_le_not_ge := ⋯, le_antisymm := ⋯ }
The configuration degree is monotone: if $c \le c'$ pointwise, then $\deg(c) \le \deg(c')$.
Two configurations are equal if one is pointwise bounded above by the other and they have the same degree.
A configuration $c$ is superstable if for every nonempty $S \subseteq V(G) \setminus \{q\}$, some vertex in $S$ has fewer chips than its out-degree to $V(G) \setminus S$.
See: Corry-Perkinson, Definition 3.12.
Equations
- superstable G q c = ∀ S ⊆ Vtilde q, S.Nonempty → ∃ v ∈ S, c.chips v < outdegreeSet G S v
Instances For
A configuration $c$ is superstable if and only if toDiv d c is $q$-reduced,
for any prescribed degree $d$.
See: Corry-Perkinson, Remark 3.14.
The canonical configuration of a $q$-reduced divisor is superstable.
A divisor is $q$-reduced if and only if it corresponds to a superstable configuration with respect to $q$.
A maximal superstable configuration is not strictly dominated by any other superstable configuration.
Equations
- maximalSuperstable G c = (superstable G q c ∧ ∀ (c' : ChipFiringConfiguration G q), superstable G q c' → c ≤ c' → c' = c)
Instances For
Subtracting a chip at $q$ from a superstable configuration gives an unwinnable divisor.
Burn lists and Dhar's burning algorithm #
A burn list for a configuration $c$ is an ordered list of distinct vertices ending at $q$.
The list is stored in reverse burn order: starting from $[q]$, each new burnable vertex is
prepended to the list. A vertex is burnable when its number of chips is less than its
out-degree into the vertices that have already burned. The key property is that a
configuration is superstable if and only if a complete burn list, one containing all
vertices, exists (superstable_burn_list).
The burnFlow function extracts an orientation from a burn list by directing each edge
toward the vertex that appears earlier in the list. This is used to construct the bijection
between maximal superstable configurations and acyclic orientations with unique source $q$
(see Orientation.lean).
A burn list for a configuration $c$ is a list $[v_1,v_2,\ldots,v_n,q]$ of distinct vertices ending at $q$, stored in reverse burn order.
For each $i$, let $$ S_i = V(G) \setminus \{v_{i+1},\ldots,v_n,q\}. $$ Then $v_i \in S_i$, and the out-degree of $v_i$ with respect to $S_i$, equivalently the number of edges from $v_i$ to the later vertices $\{v_{i+1},\ldots,v_n,q\}$, is greater than the number of chips at $v_i$.
Equations
- isBurnList G c [] = False
- isBurnList G c [x] = (x = q)
- isBurnList G c (v :: w :: rest) = (outdegreeSet G (Finset.univ \ (w :: rest).toFinset) v > c.chips v ∧ ¬(w :: rest).contains v = true ∧ isBurnList G c (w :: rest))
Instances For
A bundled burn list: a list $L$ of vertices together with a proof that it satisfies the
isBurnList conditions for configuration $c$.
The ordered vertices satisfying the burning-list conditions for the configuration.
- h_burn_list : isBurnList G c self.list
Instances For
A superstable configuration admits a complete burn list containing every vertex of $G$. This is the key output of Dhar's burning algorithm: in a superstable configuration, the whole graph burns.
The orientation induced by a burn list: for each edge $(u,v)$, direct it from $u$ to $v$ (i.e. assign nonzero flow) if $u$ appears in the list and $v$ appears before $u$. In other words, the orientation indicates the direction of the spreading fire in Dhar's burning algorithm.
Equations
Instances For
The burnFlow of a complete burn list is a valid orientation: for every edge
$\{u,v\}$, exactly numEdges G u v units of flow are directed in one of the two
directions.
The burnFlow of a complete burn list is directed: for every pair $(u,v)$, flow goes
in at most one direction.
For any vertex $v \ne q$ in a burn list, the in-flow into $v$ exceeds the number of chips at $v$. This is the key inequality used to construct an acyclic orientation from a superstable configuration.