Orientations of chip-firing graphs #
This file defines orientations of chip-firing graphs and establishes their relationship to divisors, configurations, and the Riemann-Roch theorem.
An orientation (CFOrientation G) assigns a direction to each edge of G. The key
objects are:
indeg G O v: in-degree of vertexvunder orientation $\mathcal{O}$.ordiv G O: the divisor $D(\mathcal{O})$ assigning $\mathrm{indeg}(v) - 1$ to each vertex.orientation_to_config G O q: the configuration $c(\mathcal{O})$ for acyclic orientations with unique sourceq.
The main results are:
- Theorem 4.8 ([Corry-Perkinson]): There is a bijection between acyclic orientations
with unique source
qand maximal superstable configurations (orientation_superstable_bijection). - The divisor of an acyclic orientation is unwinnable (
ordiv_unwinnable). - The canonical divisor $K_G = D(\mathcal{O}) + D(\overline{\mathcal{O}})$ where
$\overline{\mathcal{O}}$ is the reverse orientation (
divisor_reverse_orientation). - The handshaking theorem: $\sum_v \deg(v) = 2|E|$ (
helper_sum_vertex_degrees).
An orientation of G assigns a direction to each edge: directed_edges is a multiset
of directed pairs summing to G.edges (with each undirected edge directed exactly one way).
The count_preserving field ensures total flow on each edge equals its multiplicity, and
no_bidirectional ensures no edge is directed both ways.
The set of directed edges in the orientation
- count_preserving (v w : V) : num_edges G v w = Multiset.count (v, w) self.directed_edges + Multiset.count (w, v) self.directed_edges
Preserves edge counts between vertex pairs
- no_bidirectional (v w : V) : Multiset.count (v, w) self.directed_edges = 0 ∨ Multiset.count (w, v) self.directed_edges = 0
No bidirectional edges in the orientation
Instances For
The flow from u to v under orientation O: the multiplicity of the directed edge (u,v).
Equations
- flow O u v = Multiset.count (u, v) O.directed_edges
Instances For
Helper lemma for later calculations. Puzzlingly intricate for such a simple statement! Perhaps it can be simplified.
Number of edges directed into a vertex under an orientation
Equations
- indeg G O v = (Multiset.filter (fun (e : V × V) => e.2 = v) O.directed_edges).card
Instances For
The in-degree of v equals the sum of flows into v from all vertices.
Number of edges directed out of a vertex under an orientation
Equations
- outdeg G O v = (Multiset.filter (fun (e : V × V) => e.1 = v) O.directed_edges).card
Instances For
directed_edge G O u v holds when there is a directed edge from u to v in orientation O.
Equations
- directed_edge G O u v = ((u, v) ∈ O.directed_edges)
Instances For
A directed path in a graph under an orientation
- vertices : List V
The sequence of vertices in the path
Path must not be empty (at least one vertex)
- valid_edges : List.IsChain (directed_edge G O) self.vertices
Every consecutive pair forms a directed edge
Instances For
A directed path is non-repeating if its vertex list has no duplicates.
Equations
- non_repeating p = p.vertices.Nodup
Instances For
A non-repeating directed path has length at most |V|.
An orientation is acyclic if it has no directed cycles and maintains consistent edge directions between vertices
Equations
- is_acyclic G O = ∀ (p : DirectedPath O), non_repeating p
Instances For
The set of ancestors of a vertex v (nodes x such that there is a path x -> ... -> v)
Equations
- ancestors G O v = {x : V | Relation.TransGen (fun (a b : V) => directed_edge G O a b) x v}
Instances For
Measure for vertex_level termination: number of ancestors.
Equations
- vertexLevelMeasure G O v = (ancestors G O v).card
Instances For
Vertices that are not sources must have at least one incoming edge.
For vertices that are not sources, indegree - 1 is non-negative.
In an acyclic orientation, every nonempty subset of vertices contains a vertex with no incoming flow from within the subset (a relative source).
Lemma: A non-empty graph with an acyclic orientation must have at least one source.
If every source of an acyclic orientation must equal q, then q is indeed a source.
The configuration associated to an acyclic orientation with unique source q:
assigns $\mathrm{indeg}(v) - 1$ chips to each vertex $v \neq q$, and $0$ at $q$.
Equations
Instances For
Orientation divisors and configurations #
For an orientation $\mathcal{O}$ of $G$, the orientation divisor ordiv G O is
$D(\mathcal{O})(v) = \mathrm{indeg}_{\mathcal{O}}(v) - 1$ ([Corry-Perkinson], Definition 4.7).
For an acyclic orientation $\mathcal{O}$ with unique source $q$, the associated
configuration orientation_to_config G O q assigns $\mathrm{indeg}(v) - 1$ chips to
each non-$q$ vertex. An acyclic orientation is uniquely determined by its in-degree
sequence (orientation_determined_by_indegrees), and the divisor of an acyclic orientation
is always $q$-reduced and unwinnable.
The divisor associated with an orientation assigns indegree - 1 to each vertex [Corry-Perkinson], Definition 4.7, part 1; written D(O) there.
Instances For
The orientation divisor ordiv G O bundled as a q_eff_div, using acyclicity to prove
$q$-effectivity.
Instances For
The configuration c(O) associated to an acyclic orientation O. [Corry-Perkinson], Definition 4.7 (part 2)
Equations
- orientation_to_config G O q h_acyclic h_unique_source = config_of_source h_acyclic h_unique_source
Instances For
Lemma: CFOrientation to config preserves indegrees
Compatibility between configurations and divisors from an orientation
Helper lemma to simplify handshking argument. Is something like this already in Mathlib somewhere?
An acyclic orientation is uniquely determined by its indegree sequence. See [Corry-Perkinson], Lemma 4.3.
Lemma proving uniqueness of orientations giving same config
The degree of an orientation divisor equals $g - 1$, where $g$ is the genus of $G$.
The configuration degree of an acyclic orientation with unique source equals the genus.
The orientation divisor $D(\mathcal{O})$ of an acyclic orientation $\mathcal{O}$ is not winnable. This is part of [Corry-Perkinson], Proposition 4.11.
The orientation divisor $D(\mathcal{O})$ of an acyclic orientation with unique source $q$
is $q$-reduced. Together with ordiv_unwinnable, this proves
[Corry-Perkinson], Proposition 4.11.
The configuration associated to an acyclic orientation with unique source $q$ is superstable.
The canonical divisor and reverse orientations #
The canonical divisor of $G$ is $K_G(v) = \deg(v) - 2$ for each vertex $v$
([Corry-Perkinson], Definition 4.7). The reverse orientation $\overline{\mathcal{O}}$
of an orientation $\mathcal{O}$ is obtained by reversing all edge directions. The key
identity is $D(\mathcal{O}) + D(\overline{\mathcal{O}}) = K_G$ (divisor_reverse_orientation).
This section also contains the handshaking theorem (helper_sum_vertex_degrees):
$\sum_{v \in V} \deg(v) = 2|E|$, and its corollary that $\deg(K_G) = 2g - 2$
(degree_of_canonical_divisor).
The canonical divisor assigns degree - 2 to each vertex. This is independent of orientation and equals D(O) + D(reverse(O))
Equations
- canonical_divisor G v = vertex_degree G v - 2
Instances For
The reverse orientation $\overline{\mathcal{O}}$ obtained by reversing all edge directions. See [Corry-Perkinson], Definition 5.7.
Equations
- CFOrientation.reverse G O = { directed_edges := Multiset.map Prod.swap O.directed_edges, count_preserving := ⋯, no_bidirectional := ⋯ }
Instances For
The flow of the reverse orientation $\overline{\mathcal{O}}$ from $v$ to $w$ equals the flow of $\mathcal{O}$ from $w$ to $v$.
The indegree of $v$ in the reverse orientation $\overline{\mathcal{O}}$ equals the outdegree of $v$ in $\mathcal{O}$.
The reverse of an acyclic orientation is also acyclic.
The orientation divisors of $\mathcal{O}$ and its reverse sum to the canonical divisor: $D(\mathcal{O}) + D(\overline{\mathcal{O}}) = K_G$.
Helper lemma to rewrite (in-)degree in terms of edge counts from each direction. This proof is quite clunky, and I suspect it can be simplified.
Handshaking Theorem: In a loopless multigraph (G), the sum of the degrees of all vertices is twice the number of edges:
[ \sum_{v \in V} \deg(v) = 2 \cdot #(\text{edges of }G). ]
The degree of the canonical divisor is $2g - 2$, where $g$ is the genus of $G$. This is [Corry-Perkinson], Exercise 5.8.
Orientations from burn lists #
Given a complete burn list L for a superstable configuration c, the function
burn_orientation L h_full constructs an acyclic orientation of G with unique source q
(burn_acyclic, burn_unique_source). Acyclicity is proved by showing that position in
the burn list gives a strictly decreasing labeling along any directed path (dp_dec).
The helper definitions dec and dec' formalize strictly decreasing sequences of natural
numbers, and orientation_from_flow constructs a CFOrientation from an explicit flow
function.
Create a multiset with a given count function. This seems likely to be in Mathlib already, but I didn't find it.
Equations
- multiset_of_count f = Finset.univ.val.bind fun (e : T) => Multiset.replicate (f e) e
Instances For
Construct a CFOrientation from an explicit flow function, given proofs that it respects
edge multiplicities and has no bidirectional edges.
Equations
- orientation_from_flow f h_count_preserving h_no_bidirectional = { directed_edges := multiset_of_count f, count_preserving := ⋯, no_bidirectional := ⋯ }
Instances For
The orientation constructed from a complete burn list L for a superstable configuration,
via burn_flow. This is shown to be acyclic with unique source $q$ by burn_acyclic and
burn_unique_source.
Equations
- burn_orientation L h_full = orientation_from_flow (burn_flow L) ⋯ ⋯
Instances For
Along any directed path in burn_orientation L, the positions of vertices in the burn list
are strictly decreasing. This is the key lemma for proving acyclicity.
Every directed path in burn_orientation L has no repeated vertices.
The orientation constructed from a complete burn list is acyclic.
The orientation constructed from a complete burn list has $q$ as its unique source.
The bijection between orientations and maximal superstable configurations #
This section establishes [Corry-Perkinson], Theorem 4.8: there is a bijection between acyclic orientations with unique source $q$ and maximal superstable configurations.
superstable_dhar: Given a superstable configurationc, Dhar's algorithm produces an acyclic orientation whose associated configuration dominatesc.orientation_config_maximal: Every acyclic orientation with unique source $q$ gives a maximal superstable configuration.maximal_superstable_orientation: Every maximal superstable configuration arises from some acyclic orientation.orientation_superstable_bijection: The full bijection statement.
Theorem: Dhar's burning algorithm produces, from a superstable configuration, an orientation giving a maximal superstable above it.
The configuration asssociated to an acyclic orientation with unique source is maximal superstable. [Corry-Perkinson], Theorem 4.8, part 1 (c(O) is maximal superstable)
Every superstable configuration extends to a maximal superstable configuration
Every maximal superstable configuration comes from an acyclic orientation [Corry-Perkinson], Theorem 4.8, part 2 (surjectivity)
Proposition 4.1.11: Bijection between acyclic orientations with source q and maximal superstable configurations Corry-Perkinson], Theorem 4.8, part 3 (bijection)