Documentation

ChipFiringWithLean.Orientation

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:

The main results are:

structure CFOrientation {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) :

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.

Instances For
    @[reducible, inline]
    abbrev flow {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} (O : CFOrientation G) (u v : V) :

    The flow from u to v under orientation O: the multiplicity of the directed edge (u,v).

    Equations
    Instances For
      theorem opp_flow {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} (O : CFOrientation G) (u v : V) :
      flow O u v + flow O v u = num_edges G u v

      The total flow on an undirected edge equals its multiplicity: flow O u v + flow O v u = num_edges G u v.

      theorem eq_orient {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} (O1 O2 : CFOrientation G) :
      O1 = O2 ∀ (u v : V), flow O1 u v = flow O2 u v

      Two orientations are equal iff they assign the same flow to every directed pair.

      theorem double_sum {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (f : V × V) :
      u : V, v : V, f (u, v) = e : V × V, f e

      Helper lema for the count below.

      Helper lemma for later calculations. Puzzlingly intricate for such a simple statement! Perhaps it can be simplified.

      def indeg {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) (v : V) :

      Number of edges directed into a vertex under an orientation

      Equations
      Instances For
        theorem indeg_eq_sum_flow {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} (O : CFOrientation G) (v : V) :
        indeg G O v = w : V, flow O w v

        The in-degree of v equals the sum of flows into v from all vertices.

        def outdeg {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) (v : V) :

        Number of edges directed out of a vertex under an orientation

        Equations
        Instances For
          def is_source {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) (v : V) :

          A vertex is a source if it has no incoming edges (indegree = 0)

          Equations
          Instances For
            def is_sink {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) (v : V) :

            A vertex is a sink if it has no outgoing edges (outdegree = 0)

            Equations
            Instances For
              def directed_edge {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) (u v : V) :

              directed_edge G O u v holds when there is a directed edge from u to v in orientation O.

              Equations
              Instances For
                def list_get_safe {α : Type} (l : List α) (i : ) :

                Helper function for safe list access

                Equations
                Instances For
                  structure DirectedPath {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} (O : CFOrientation G) :

                  A directed path in a graph under an orientation

                  Instances For
                    def non_repeating {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} {O : CFOrientation G} (p : DirectedPath O) :

                    A directed path is non-repeating if its vertex list has no duplicates.

                    Equations
                    Instances For

                      A non-repeating directed path has length at most |V|.

                      def is_acyclic {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) :

                      An orientation is acyclic if it has no directed cycles and maintains consistent edge directions between vertices

                      Equations
                      Instances For
                        noncomputable def ancestors {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) (v : V) :

                        The set of ancestors of a vertex v (nodes x such that there is a path x -> ... -> v)

                        Equations
                        Instances For
                          noncomputable def vertexLevelMeasure {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) (v : V) :

                          Measure for vertex_level termination: number of ancestors.

                          Equations
                          Instances For
                            theorem indeg_ge_one_of_not_source {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) (v : V) :
                            ¬is_source G O vindeg G O v 1

                            Vertices that are not sources must have at least one incoming edge.

                            theorem indeg_minus_one_nonneg_of_not_source {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) (v : V) :
                            ¬is_source G O v0 (indeg G O v) - 1

                            For vertices that are not sources, indegree - 1 is non-negative.

                            theorem subset_source {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) (S : Finset V) :
                            S.Nonemptyis_acyclic G OvS, wS, flow O w v = 0

                            In an acyclic orientation, every nonempty subset of vertices contains a vertex with no incoming flow from within the subset (a relative source).

                            theorem acyclic_has_source {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) :
                            is_acyclic G O∃ (v : V), is_source G O v

                            Lemma: A non-empty graph with an acyclic orientation must have at least one source.

                            theorem is_source_of_unique_source {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} (O : CFOrientation G) {q : V} (h_acyclic : is_acyclic G O) (h_unique_source : ∀ (w : V), is_source G O ww = q) :
                            is_source G O q

                            If every source of an acyclic orientation must equal q, then q is indeed a source.

                            def config_of_source {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} {O : CFOrientation G} {q : V} (h_acyclic : is_acyclic G O) (h_unique_source : ∀ (w : V), is_source G O ww = q) :
                            Config V q

                            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.

                              def ordiv {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) :

                              The divisor associated with an orientation assigns indegree - 1 to each vertex [Corry-Perkinson], Definition 4.7, part 1; written D(O) there.

                              Equations
                              Instances For
                                def orqed {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} (O : CFOrientation G) {q : V} (h_acyclic : is_acyclic G O) (h_unique_source : ∀ (w : V), is_source G O ww = q) :

                                The orientation divisor ordiv G O bundled as a q_eff_div, using acyclicity to prove $q$-effectivity.

                                Equations
                                • orqed O h_acyclic h_unique_source = { D := ordiv G O, h_eff := }
                                Instances For
                                  def orientation_to_config {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) (q : V) (h_acyclic : is_acyclic G O) (h_unique_source : ∀ (w : V), is_source G O ww = q) :
                                  Config V q

                                  The configuration c(O) associated to an acyclic orientation O. [Corry-Perkinson], Definition 4.7 (part 2)

                                  Equations
                                  Instances For
                                    theorem orientation_to_config_indeg {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) (q : V) (h_acyclic : is_acyclic G O) (h_unique_source : ∀ (w : V), is_source G O ww = q) (v : V) :
                                    (orientation_to_config G O q h_acyclic h_unique_source).vertex_degree v = if v = q then 0 else (indeg G O v) - 1

                                    Lemma: CFOrientation to config preserves indegrees

                                    theorem config_and_divisor_from_O {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} (O : CFOrientation G) {q : V} (h_acyclic : is_acyclic G O) (h_unique_source : ∀ (w : V), is_source G O ww = q) :
                                    orientation_to_config G O q h_acyclic h_unique_source = toConfig (orqed O h_acyclic h_unique_source)

                                    Compatibility between configurations and divisors from an orientation

                                    theorem sum_filter_eq_map {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (M : Multiset (V × V)) (crit : VV × VProp) [(v : V) → (e : V × V) → Decidable (crit v e)] :
                                    v : V, (Multiset.filter (crit v) M).card = (Multiset.map (fun (e : V × V) => {v : V | crit v e}.card) M).sum

                                    Helper lemma to simplify handshking argument. Is something like this already in Mathlib somewhere?

                                    theorem orientation_determined_by_indegrees {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} (O O' : CFOrientation G) :
                                    is_acyclic G Ois_acyclic G O'(∀ (v : V), indeg G O v = indeg G O' v)O = O'

                                    An acyclic orientation is uniquely determined by its indegree sequence. See [Corry-Perkinson], Lemma 4.3.

                                    theorem helper_config_to_orientation_unique {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (q : V) (c : Config V q) (h_super : superstable G q c) (h_max : maximal_superstable G c) (O₁ O₂ : CFOrientation G) (h_acyc₁ : is_acyclic G O₁) (h_acyc₂ : is_acyclic G O₂) (h_src₁ : is_source G O₁ q) (h_src₂ : is_source G O₂ q) (h_unique_source₁ : ∀ (w : V), is_source G O₁ ww = q) (h_unique_source₂ : ∀ (w : V), is_source G O₂ ww = q) (h_eq₁ : orientation_to_config G O₁ q h_acyc₁ h_unique_source₁ = c) (h_eq₂ : orientation_to_config G O₂ q h_acyc₂ h_unique_source₂ = c) :
                                    O₁ = O₂

                                    Lemma proving uniqueness of orientations giving same config

                                    theorem degree_ordiv {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} (O : CFOrientation G) :
                                    deg (ordiv G O) = genus G - 1

                                    The degree of an orientation divisor equals $g - 1$, where $g$ is the genus of $G$.

                                    theorem config_degree_from_O {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} (O : CFOrientation G) {q : V} (h_acyclic : is_acyclic G O) (h_unique_source : ∀ (w : V), is_source G O ww = q) :
                                    config_degree (orientation_to_config G O q h_acyclic h_unique_source) = genus G

                                    The configuration degree of an acyclic orientation with unique source equals the genus.

                                    theorem ordiv_unwinnable {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) :
                                    is_acyclic G O¬winnable G (ordiv G O)

                                    The orientation divisor $D(\mathcal{O})$ of an acyclic orientation $\mathcal{O}$ is not winnable. This is part of [Corry-Perkinson], Proposition 4.11.

                                    theorem ordiv_q_reduced {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} (O : CFOrientation G) {q : V} (h_acyclic : is_acyclic G O) (h_unique_source : ∀ (w : V), is_source G O ww = q) :
                                    q_reduced G q (ordiv G O)

                                    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.

                                    theorem helper_orientation_config_superstable {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) (q : V) (h_acyc : is_acyclic G O) (h_unique_source : ∀ (w : V), is_source G O ww = q) :
                                    superstable G q (orientation_to_config G O q h_acyc h_unique_source)

                                    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
                                    Instances For

                                      The reverse orientation $\overline{\mathcal{O}}$ obtained by reversing all edge directions. See [Corry-Perkinson], Definition 5.7.

                                      Equations
                                      Instances For
                                        theorem flow_reverse {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} (O : CFOrientation G) (v w : V) :

                                        The flow of the reverse orientation $\overline{\mathcal{O}}$ from $v$ to $w$ equals the flow of $\mathcal{O}$ from $w$ to $v$.

                                        theorem indeg_reverse_eq_outdeg {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) (v : 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$.

                                        theorem edge_endpoints_distinct {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (e : V × V) (he : e G.edges) :
                                        e.1 e.2

                                        Helper lemma: In a loopless graph, each edge has distinct endpoints

                                        theorem edge_incident_vertices_count {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (e : V × V) (he : e G.edges) :
                                        {v : V | e.1 = v e.2 = v}.card = 2

                                        Helper lemma: Each edge is incident to exactly two vertices

                                        theorem map_inc_eq_map_two_nat {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) :
                                        (Multiset.map (fun (e : V × V) => {v : V | e.1 = v e.2 = v}.card) G.edges).sum = 2 * G.edges.card

                                        Helper lemma: Summing mapped incidence counts equals summing constant 2 (Nat version).

                                        theorem degree_eq_total_flow {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (S : Multiset (V × V)) (v : V) :
                                        (∀ eS, e.1 e.2)u : V, (Multiset.filter (fun (e : V × V) => e = (v, u) e = (u, v)) S).card = (Multiset.filter (fun (e : V × V) => e.1 = v e.2 = v) S).card

                                        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.

                                        theorem sum_num_edges_eq_filter_count {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (v : V) :
                                        u : V, num_edges G v u = (Multiset.filter (fun (e : V × V) => e.1 = v e.2 = v) G.edges).card
                                        theorem helper_sum_vertex_degrees {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) :
                                        v : V, vertex_degree G v = 2 * G.edges.card

                                        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.

                                        def multiset_of_count {T : Type u_1} [Fintype T] (f : T) :

                                        Create a multiset with a given count function. This seems likely to be in Mathlib already, but I didn't find it.

                                        Equations
                                        Instances For
                                          @[simp]
                                          theorem count_of_multiset_of_count {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (f : V × V) (e : V × V) :
                                          def orientation_from_flow {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} (f : V × V) (h_count_preserving : ∀ (v w : V), f (v, w) + f (w, v) = num_edges G v w) (h_no_bidirectional : ∀ (v w : V), f (v, w) = 0 f (w, v) = 0) :

                                          Construct a CFOrientation from an explicit flow function, given proofs that it respects edge multiplicities and has no bidirectional edges.

                                          Equations
                                          Instances For
                                            def burn_orientation {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} {q : V} {c : Config V q} (L : burn_list G c) (h_full : ∀ (v : V), v L.list) :

                                            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
                                            Instances For
                                              theorem nodup_of_map_nodup (S : Type u_1) (T : Type u_2) (L : List S) (f : ST) :
                                              (List.map f L).NodupL.Nodup

                                              Utility for proving acyclicity. This is a fairly basic fact that may be in Mathlib, but I haven't found it.

                                              def dec (L : List ) :

                                              A list of natural numbers is decreasing (dec) if every element is greater than all subsequent elements.

                                              Equations
                                              Instances For
                                                theorem nodup_of_dec (L : List ) (h_dec : dec L) :

                                                A decreasing list has no duplicates.

                                                def dec' (L : List ) :

                                                An equivalent pairwise-consecutive formulation of dec: each element is greater than the next.

                                                Equations
                                                Instances For
                                                  theorem dec_iff_dec' (L : List ) :

                                                  The definitions dec and dec' are equivalent.

                                                  @[irreducible]
                                                  theorem dp_dec {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} {q : V} {c : Config V q} (L : burn_list G c) (h_full : ∀ (v : V), v L.list) (p : DirectedPath (burn_orientation L h_full)) :
                                                  dec (List.map (fun (v : V) => List.idxOf v L.list) p.vertices)

                                                  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.

                                                  theorem burn_nodup {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} {q : V} {c : Config V q} (L : burn_list G c) (h_full : ∀ (v : V), v L.list) (p : DirectedPath (burn_orientation L h_full)) :

                                                  Every directed path in burn_orientation L has no repeated vertices.

                                                  theorem burn_acyclic {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} {q : V} {c : Config V q} (L : burn_list G c) (h_full : ∀ (v : V), v L.list) :

                                                  The orientation constructed from a complete burn list is acyclic.

                                                  theorem burn_unique_source {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} {q : V} {c : Config V q} (L : burn_list G c) (h_full : ∀ (v : V), v L.list) (w : V) :
                                                  is_source G (burn_orientation L h_full) ww = q

                                                  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.

                                                  theorem superstable_dhar {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] {G : CFGraph V} {q : V} {c : Config V q} (h_ss : superstable G q c) :
                                                  ∃ (O : CFOrientation G) (h_acyc : is_acyclic G O) (h_unique_source : ∀ (w : V), is_source G O ww = q), config_ge (orientation_to_config G O q h_acyc h_unique_source) c

                                                  Theorem: Dhar's burning algorithm produces, from a superstable configuration, an orientation giving a maximal superstable above it.

                                                  theorem orientation_config_maximal {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (O : CFOrientation G) (q : V) (h_acyc : is_acyclic G O) (h_unique_source : ∀ (w : V), is_source G O ww = q) :
                                                  maximal_superstable G (orientation_to_config G O q h_acyc h_unique_source)

                                                  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)

                                                  theorem maximal_superstable_exists {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (q : V) (c : Config V q) (h_super : superstable G q c) :
                                                  ∃ (c' : Config V q), maximal_superstable G c' config_ge c' c

                                                  Every superstable configuration extends to a maximal superstable configuration

                                                  theorem maximal_superstable_orientation {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (q : V) (c : Config V q) (h_max : maximal_superstable G c) :
                                                  ∃ (O : CFOrientation G) (h_acyc : is_acyclic G O) (h_unique_source : ∀ (w : V), is_source G O ww = q), orientation_to_config G O q h_acyc h_unique_source = c

                                                  Every maximal superstable configuration comes from an acyclic orientation [Corry-Perkinson], Theorem 4.8, part 2 (surjectivity)

                                                  theorem orientation_superstable_bijection {V : Type} [DecidableEq V] [Fintype V] [Nonempty V] (G : CFGraph V) (q : V) :
                                                  let α := { O : CFOrientation G // is_acyclic G O ∀ (w : V), is_source G O ww = q }; let β := { c : Config V q // maximal_superstable G c }; let f_raw := fun (O_sub : α) => orientation_to_config G (↑O_sub) q ; have f := fun (O_sub : α) => f_raw O_sub, ; Function.Bijective f

                                                  Proposition 4.1.11: Bijection between acyclic orientations with source q and maximal superstable configurations Corry-Perkinson], Theorem 4.8, part 3 (bijection)