Orientability of degree g - 1 divisor classes #
An–Baker–Kuperberg–Shokrieh, Canonical representatives for divisor classes on tropical
curves and the matrix–tree theorem, calls a divisor D orientable when
D(p) = indeg_𝒪(p) - 1 for some orientation 𝒪, and proves in
Theorem 4.10 of arXiv:1304.4259v2 that every divisor
of degree g - 1 on a finite graph is linearly equivalent to an orientable one.
This file proves
the finite-multigraph form in orientable_of_deg_eq and
orientable_iff_deg_eq.
Parallel edges #
CFOrientation is a count_preserving flow-count vector representing an
arbitrary edge-level orientation. Parallel edges may therefore be oriented
independently, and no simplicity hypothesis is required.
The two halves, and how each is proved #
The classes split by winnability, and the two halves are proved by unrelated arguments:
- Unwinnable classes are orientable — by an acyclic orientation. This is
orientable_of_not_winnablebelow, a corollary ofunwinnable_iff_exists_acyclic_ordiv(Foundations/AcyclicOrientation.lean). It was the one statement here that never needed simplicity even under the old model, because two parallel edges pointing opposite ways are themselves a directed2-cycle, sono_bidirectionaldiscarded no acyclic orientation. - Winnable classes need a cyclic orientation, and are reached by the ABKS route of §3.
orientable_of_forall_winnablerecords the reduction to them, but it is no longer needed for the main theorem: §3 proves all degree-(g−1)classes at once.
The ABKS route, as formalized in §3 #
The source's argument has two steps, and both are proved here.
Hakimi's criterion (
\label{thm:orient}, line 744): a divisor of degreeg − 1withχ(S, D) ≥ 0for every nonemptySis an orientation divisor, whereχ(S,D) = deg(D|_S) + |S| − e(S). Hereexists_ordiv_eq_of_chi_nonneg.ABKS obtain this from max-flow/min-cut. Section 3c takes an elementary route instead: with
d v = D v + 1the target in-degree, orient the edges one at a time (exists_isOrientationOf, induction on the edge multiset), decrementingdat the head. Some direction of the chosen edge always keeps Hakimi's inequalitye(S) ≤ ∑_{v ∈ S} d valive, because a tight set separatingbfromaand a tight set separatingafrombwould make the cross terme(S∖T, T∖S)of the submodularity refinement both zero and at least one — the edgeabsits inside it. No flow theory, and no simplicity:CFOrientationis now the edge-level orientation type, so an orientation built edge by edge packages directly.The submodularity descent (
\label{thm:eqiv_orient}, line 758): every degree-(g−1)divisor is linearly equivalent to one satisfying (1). Hereexists_linear_equiv_chi_nonneg.χ(·, D)is submodular, with the quantitative refinementχ(S,D) + χ(T,D) = χ(S∪T,D) + χ(S∩T,D) + e(S∖T, T∖S)(eulerChi_add_eulerChi), so its minimizers are closed under∩and∪(eulerChi_inter_union_eq_chiMin) and there is a minimal one,chiMinimizer G D(chiMinimizer_subset). Firing its complement raises everyχ(S, ·)aboveχ_D, with equality only forS ⊋ S₀(chiMin_le_eulerChi_set_firing).ABKS then argue that the loop terminates. The formalization replaces the loop by its fixed point:
chiPotential = χ_D · (|V| + 1) + |S₀|is bounded above by|V|and strictly increases at each step, so the divisor of greatest potential in the class — which exists byInt.exists_greatest_of_bdd— must already haveχ_D ≥ 0. No well-founded recursion is needed.
Everything in §3a–§3b (edgesWithinOf, edgesBetweenOf, numEdgesOf, edgesBetween and
their identities) is stated for an arbitrary edge multiset, because step (1) removes edges;
G.edges is substituted only at the end.
1. Orientable, and the trivial facts #
A divisor class is orientable when it contains the divisor of some orientation.
This is An–Baker–Kuperberg–Shokrieh's "linearly equivalent to an orientable divisor"; the
linear equivalence is built into the predicate because that is the form every consumer wants.
Since CFOrientation lost its no_bidirectional field it is the set of edge-level
orientations of G, multigraphs included, so this predicate now agrees with ABKS's
everywhere and not merely on simple graphs.
Equations
- Utilities.Orientable G D = ∃ (O : CFOrientation G), linearEquiv G D (ordiv G O)
Instances For
The acyclic refinement: the class contains the divisor of an acyclic orientation. By
unwinnable_iff_exists_acyclic_ordiv this is exactly unwinnability at degree genus G - 1
(acyclicallyOrientable_iff_not_winnable).
Equations
- Utilities.AcyclicallyOrientable G D = ∃ (O : CFOrientation G), isAcyclic G O ∧ linearEquiv G D (ordiv G O)
Instances For
An orientation divisor is orientable, tautologically.
Orientability is a property of the linear equivalence class.
Orientability transported the other way, so that Orientable is genuinely
class-invariant.
An orientable divisor has degree genus G - 1. This is the converse half of the main
theorem, and unlike the forward half it is unconditional: it needs neither connectivity nor
simplicity, only degree_ordiv.
An acyclically orientable divisor is orientable.
An acyclically orientable divisor has degree genus G - 1.
2. The unwinnable half, which is already done #
This section never needed a simplicity hypothesis, even under the old restricted model:
no_bidirectional discarded no acyclic orientation, because two parallel edges pointing
opposite ways form a directed 2-cycle.
Acyclic orientability is unwinnability, at degree genus G - 1. A restatement of
unwinnable_iff_exists_acyclic_ordiv (Foundations/AcyclicOrientation.lean, sorry-free)
in the vocabulary of this file.
Every unwinnable class of degree genus G - 1 is orientable, by an acyclic
orientation.
This is the unwinnable case of ABKS Theorem 4.10, for which a cyclic orientation is
never needed. It predates the ABKS route of §3, which now proves every degree-(g−1) class.
It is kept
because it says more than orientable_of_deg_eq does on unwinnable classes: the witnessing
orientation is acyclic.
The decomposition, made explicit. To orient every degree-(g−1) class it suffices to
orient the winnable ones; the unwinnable ones are already done by
orientable_of_not_winnable.
This was the reduction §2c was attacked through while the winnable case was open; §3 has
since closed that case, so the lemma is no longer on the path to orientable_of_deg_eq. It
still records why the winnable case was the hard one: such a class is by
isAcyclic_iff_not_winnable_ordiv (Foundations/OrientationReversal.lean) never the divisor
of an acyclic orientation, so any witness for it must be cyclic, and cyclic orientations were
precisely what CFOrientation.no_bidirectional failed to represent on a multigraph.
3. The ABKS route: the Euler characteristic of an induced subgraph #
χ(S, D) = deg(D|_S) + |S| - e(S) — the Euler characteristic of the induced subgraph
G[S] shifted by the degree of D restricted to S.
This is An–Baker–Kuperberg–Shokrieh's χ(S,D)
(An--Baker--Kuperberg--Shokrieh, arXiv:1304.4259), the function whose
submodularity drives the whole proof of §2c.
Equations
- Utilities.eulerChi G S D = ∑ v ∈ S, D v + ↑S.card - ↑(Utilities.edgesWithin G S)
Instances For
3a. Edge counts, on an arbitrary edge multiset #
Hakimi's criterion is proved below by induction on the edge multiset, so both counting
functions are introduced for an arbitrary M : Multiset (G.V × G.V) and specialised to
G.edges afterwards (edgesWithin_eq, numEdgesOf_edges). Multiset.countP rather than
Multiset.card ∘ Multiset.filter is the working form: countP_cons is exactly the induction
step, and the whole layer is then arithmetic.
e(S) is e_{E(G)}(S).
numEdges G v w is numEdgesOf G.edges v w.
The quantitative refinement of the submodularity of e(·)
(Picg_revised.tex:706): e(S) + e(T) + e(S∖T, T∖S) = e(S∩T) + e(S∪T). Proved by induction
on the edge multiset; the induction step is a sixteen-case check on which of S, T each
endpoint lies in.
e_M(S,T) as a double sum of edge multiplicities, for disjoint S and T. This is
the bridge between the countP form, in which submodularity is proved, and the
numEdges form, in which the effect of a set firing is computed.
e(S, T), as the double sum of edge multiplicities over S × T. For disjoint S and
T this is the number of edges with one end in each (edgesBetweenOf_eq_sum), which is what
makes it the right bookkeeping device for a set firing.
Equations
- Utilities.edgesBetween G S T = ∑ v ∈ S, ∑ w ∈ T, numEdges G v w
Instances For
edgesBetween is symmetric.
edgesBetween is monotone in its second argument.
The two forms of e(S,T) agree on disjoint sets.
3b. eulerChi is submodular #
χ(S,D) = deg(D|_S) + |S| - e(S) with the first two terms modular and -e(·) submodular:
ABKS's Lemmas lem:SubmodularLem and lem:EulerLem (Picg_revised.tex:694,704). Everything
here is edgesWithinOf_add_edgesWithinOf plus Finset.sum_union_inter and
Finset.card_union_add_card_inter.
The quantitative refinement of submodularity (Picg_revised.tex:706,
\label{lem:EulerLem}): χ(S,D) + χ(T,D) = χ(S∪T,D) + χ(S∩T,D) + e(S∖T, T∖S).
3c. Hakimi's criterion, by induction on the edge multiset #
The classical proof of \label{thm:orient} goes through max-flow/min-cut. The
route taken here is elementary: orient the edges one at
a time, maintaining Hakimi's inequality for the remaining multiset. The only thing that has to
be checked is that some direction of the chosen edge keeps the inequality, and that is
exactly edgesWithinOf_add_edgesWithinOf: if a tight set separated b from a and
another tight set separated a from b, the cross term e(S∖T, T∖S) would be both 0 and
≥ 1, the edge ab itself sitting inside it.
Because the induction removes edges, everything is stated for an arbitrary edge multiset;
G.edges is substituted only at the very end.
N orients the edge multiset M with in-degree function d: every parallel class of
M is split between the two directions, and d v edges of N point at v. Unfolded, this
is exactly CFOrientation.count_preserving together with indeg = d.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Hakimi's criterion for an arbitrary edge multiset. If d sums to the number of edges
and dominates e_M(S) on every vertex set, then M has an orientation with in-degree
function d. The induction is on the number of edges.
Hakimi's criterion (Picg_revised.tex:744, \label{thm:orient}): a divisor of degree
genus G - 1 all of whose χ(S, ·) are nonnegative is an orientation divisor — on the
nose, not merely up to linear equivalence.
No simplicity hypothesis, since 2026-08-20. This is where the old model defect lived and
where the hypothesis was consumed: the classical statement produces an edge-level orientation,
and packaging one as a CFOrientation used to require that no parallel class be split — on
the 5-banana the divisor (1, 2) satisfies the criterion and was not ordiv of any
CFOrientation. With no_bidirectional removed, CFOrientation is the edge-level
orientation type, (1, 2) is realised, and the classical statement transcribes verbatim.
ABKS cite Hakimi, Schrijver Thm 61.1 and Backman Thm 7.3, and note that the statement is
equivalent to max-flow/min-cut; no flow theory is used here. The proof is
exists_isOrientationOf, the edge-by-edge greedy orientation, applied to G.edges with
target in-degree d v = D v + 1. The hypothesis enters twice: at S = {v} it says
D v + 1 ≥ 0, so d is a well-defined natural number, and at general S it is exactly
Hakimi's inequality e(S) ≤ ∑_{v ∈ S} d v. deg D = genus G - 1 is what makes ∑ d the
number of edges.
3d. Firing a set of vertices, seen by eulerChi #
Two formulas, both instances of "chips cross the boundary of the fired set once per edge":
firing A adds e(A, T) to χ(T, ·) when T misses A, and subtracts
e(Aᶜ, T) when T sits inside A. Everything below uses only these two.
3e. The minimum of χ(·, D) and its minimal minimizer #
χ_D, the minimum of χ(S, D) over all vertex sets. Including ∅ (where χ = 0) and
V costs nothing and removes a side condition: χ_D ≤ 0 always, and at degree genus G - 1
both of those sets have χ = 0, so a negative minimum is automatically attained at a proper
nonempty set.
Equations
- Utilities.chiMin G D = Finset.univ.inf' ⋯ fun (S : Finset G.V) => Utilities.eulerChi G S D
Instances For
The minimizers of χ(·, D) are closed under ∩ and ∪ (Picg_revised.tex:696,
\label{lem:intersection}), by the quantitative refinement: the cross term is a nonnegative
integer and both new values are ≥ χ_D, so all three inequalities are equalities.
S₀(D), the minimal minimizer of χ(·, D) (Picg_revised.tex:730,
\label{cor:minimal1}). Defined as a minimizer of least cardinality; chiMinimizer_subset
shows it is contained in every other minimizer, which is what makes it the minimal one.
Equations
Instances For
S₀(D) is a minimizer.
S₀(D) is contained in every minimizer.
3f. One descent step #
ABKS's Claim (Picg_revised.tex:772): firing the complement of S₀(D) produces a divisor
whose χ is everywhere ≥ χ_D, with equality only on sets strictly containing S₀(D). The
proof below merges their four cases into two — S ⊆ S₀ and S ⊄ S₀ — which is legitimate
because the empty intersection is not a special case once χ(∅, ·) = 0 ≥ χ_D is available.
The termination measure: χ_D weighted so that a unit gain in the minimum beats any
change in |S₀(D)|, plus |S₀(D)| itself. It is bounded above by |V| (as χ_D ≤ 0 and
|S₀| ≤ |V|) and strictly increases at every descent step, which is why the descent stops.
Equations
- Utilities.chiPotential G D = Utilities.chiMin G D * (↑(Fintype.card G.V) + 1) + ↑(Utilities.chiMinimizer G D).card
Instances For
The potential is bounded above by |V|.
The submodularity descent (Picg_revised.tex:758, \label{thm:eqiv_orient}): every
divisor of degree genus G - 1 is linearly equivalent to one satisfying Hakimi's criterion.
No simplicity hypothesis: this step never mentions orientations, only eulerChi and set
firing.
ABKS run the descent as a loop and argue that it terminates. Here the loop is replaced by its
fixed point: chiPotential is bounded above by |V|, so among all divisors in the class
there is one of greatest potential (Int.exists_greatest_of_bdd), and chiPotential_lt says
that a divisor with χ_D < 0 is never of greatest potential. Hence the maximiser has
χ_D ≥ 0, which is Hakimi's criterion.
4. The main statement #
ABKS Theorem 4.10 (arXiv:1304.4259v2).
On a connected graph, simple or not, every divisor
of degree genus G - 1 is linearly equivalent to ordiv G O for some orientation O.
The simplicity hypothesis this theorem used to carry (it was called
orientable_of_deg_eq_of_simple) was an artefact of CFOrientation.no_bidirectional and has
been deleted with it; see the module docstring.
Proved by composing the two halves of the ABKS route: exists_linear_equiv_chi_nonneg (the
submodularity descent) moves the class to a representative satisfying Hakimi's criterion, and
exists_ordiv_eq_of_chi_nonneg (Hakimi) turns that representative into an orientation on the
nose. The unwinnable case also has an independent proof with an acyclic witness — see
orientable_of_not_winnable.
§2c as a biconditional. On a connected graph the orientable divisors are exactly the
divisors of degree genus G - 1. The → direction is unconditional (Orientable.deg_eq);
only ← needs connectivity.